react-reason-editor 1.0.31 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ReasonDocs-B-bZEn6_.cjs +1 -0
- package/dist/{ReasonDocs-WH3JUyEX.js → ReasonDocs-DVm2Dll7.js} +159 -156
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/layout/sidebar/types.d.ts +1 -1
- package/dist/reason-docs.cjs +1 -1
- package/dist/reason-docs.js +1 -1
- package/dist/search/relatedDocuments.d.ts +18 -0
- package/package.json +1 -1
- package/dist/ReasonDocs-DWRwDR5E.cjs +0 -1
|
@@ -9,7 +9,7 @@ return pe(At.Description,{...a,...r,ref:t})},"AlertDialogDescription")),tn=q.for
|
|
|
9
9
|
return pe(At.Close,{...a,...r,ref:t})},"AlertDialogAction")),nn=q.forwardRef(/* @__PURE__ */qt(function(e,t){const{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=Zt("AlertDialogCancel",n),o=Gt(n),i=w(t,a);/* @__PURE__ */
|
|
10
10
|
return pe(At.Close,{...o,...r,ref:i})},"AlertDialogCancel")),rn=Wt,an=Yt,on=Kt,sn=Jt,ln=tn,cn=nn,dn=Qt,un=en,hn=Object.defineProperty,pn=(e,t)=>hn(e,"name",{value:t,configurable:!0}),mn="dismissableLayer.update",fn=q.createContext({layers:/* @__PURE__ */new Set,layersWithOutsidePointerEventsDisabled:/* @__PURE__ */new Set,branches:/* @__PURE__ */new Set,dismissableSurfaces:/* @__PURE__ */new Set}),gn=/* @__PURE__ */q.forwardRef(/* @__PURE__ */pn(function(e,t){const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...c}=e,d=q.useContext(fn),[u,h]=q.useState(null),p=u?.ownerDocument??globalThis?.document,[,m]=q.useState({}),f=w(t,h),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=y?g.indexOf(y):-1,S=u?g.indexOf(u):-1,k=d.layersWithOutsidePointerEventsDisabled.size>0,C=S>=x,N=q.useRef(!1),T=yn(e=>{o?.(e),s?.(e),e.defaultPrevented||l?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:N,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:q.useCallback(e=>{if(!(e instanceof Node))return!1;const t=[...d.branches].some(t=>t.contains(e));return C&&!t},[d.branches,C])}),A=bn(e=>{if(r&&N.current)return;const t=e.target;[...d.branches].some(e=>e.contains(t))||(i?.(e),s?.(e),e.defaultPrevented||l?.())},p),M=!!u&&S===g.length-1,D=b(e=>{"Escape"===e.key&&(a?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))});return q.useEffect(()=>{if(M)return p.addEventListener("keydown",D,{capture:!0}),()=>p.removeEventListener("keydown",D,{capture:!0})},[p,M,D]),q.useEffect(()=>{if(u)return n&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Ht=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),xn(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(u),0===d.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Ht))}},[u,p,n,d]),q.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),xn())},[u,d]),q.useEffect(()=>{const e=/* @__PURE__ */pn(()=>m({}),"handleUpdate");return document.addEventListener(mn,e),()=>document.removeEventListener(mn,e)},[]),/* @__PURE__ */pe(v.div,{...c,ref:f,style:{pointerEvents:k?C?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,A.onFocusCapture),onBlurCapture:I(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,T.onPointerDownCapture)})},"DismissableLayer"));pn(function(){const e=q.useContext(fn),[t,n]=q.useState(null);return q.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n},"useDismissableLayerSurface");var vn=/* @__PURE__ */pn(()=>!0,"IS_TRUE");function yn(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o,shouldHandlePointerDownOutside:i=vn}=t,s=b(e),l=q.useRef(!1),c=q.useRef(!1),d=q.useRef(/* @__PURE__ */new Map),u=q.useRef(()=>{});return q.useEffect(()=>{function e(){c.current=!1,a.current=!1,d.current.clear()}function t(){return Array.from(d.current.values()).some(Boolean)}function h(e){if(!c.current)return;const t=e.target;t instanceof Node&&[...o].some(e=>e.contains(t))||d.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{c.current&&u.current()},0)}function p(e){c.current&&d.current.set(e.type,!1)}pn(e,"resetOutsideInteraction"),pn(t,"isOutsideInteractionIntercepted"),pn(h,"handleInteractionCapture"),pn(p,"handleInteractionBubble");const m=/* @__PURE__ */pn(o=>{if(o.target&&!l.current){let h=function(){n.removeEventListener("click",u.current);const r=t();e(),r||wn("dismissableLayer.pointerDownOutside",s,p,{discrete:!0})};if(pn(h,"handleAndDispatchPointerDownOutsideEvent"),!i(o.target))return n.removeEventListener("click",u.current),e(),void(l.current=!1);const p={originalEvent:o};c.current=!0,a.current=r&&0===o.button,d.current.clear(),r&&0===o.button?(n.removeEventListener("click",u.current),u.current=h,n.addEventListener("click",u.current,{once:!0})):h()}else n.removeEventListener("click",u.current),e();l.current=!1},"handlePointerDown"),f=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const r of f)n.addEventListener(r,h,!0),n.addEventListener(r,p);const g=window.setTimeout(()=>{n.addEventListener("pointerdown",m)},0);return()=>{window.clearTimeout(g),n.removeEventListener("pointerdown",m),n.removeEventListener("click",u.current);for(const e of f)n.removeEventListener(e,h,!0),n.removeEventListener(e,p)}},[n,s,r,a,o,i]),{onPointerDownCapture:/* @__PURE__ */pn(()=>l.current=!0,"onPointerDownCapture")}}function bn(e,t=globalThis?.document){const n=b(e),r=q.useRef(!1);return q.useEffect(()=>{const e=/* @__PURE__ */pn(e=>{e.target&&!r.current&&wn("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:/* @__PURE__ */pn(()=>r.current=!0,"onFocusCapture"),onBlurCapture:/* @__PURE__ */pn(()=>r.current=!1,"onBlurCapture")}}function xn(){const e=new CustomEvent(mn);document.dispatchEvent(e)}function wn(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?h(a,o):a.dispatchEvent(o)}pn(yn,"usePointerDownOutside"),pn(bn,"useFocusOutside"),pn(xn,"dispatchUpdate"),pn(wn,"handleAndDispatchCustomEvent");var Sn=Object.defineProperty,kn=(e,t)=>Sn(e,"name",{value:t,configurable:!0}),Cn=0,Nn=null;function Tn(){q.useEffect(()=>{Nn||(Nn={start:An(),end:An()});const{start:e,end:t}=Nn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Cn++,()=>{1===Cn&&(Nn?.start.remove(),Nn?.end.remove(),Nn=null),Cn=Math.max(0,Cn-1)}},[])}function An(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}kn(function(e){return Tn(),e.children},"FocusGuards"),kn(Tn,"useFocusGuards"),kn(An,"createFocusGuard");var Mn=Object.defineProperty,In=(e,t)=>Mn(e,"name",{value:t,configurable:!0}),Dn="focusScope.autoFocusOnMount",En="focusScope.autoFocusOnUnmount",Rn={bubbles:!1,cancelable:!0},_n=/* @__PURE__ */q.forwardRef(/* @__PURE__ */In(function(e,t){const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=q.useState(null),c=b(a),d=b(o),u=q.useRef(null),h=w(t,l),p=q.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;q.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?u.current=t:Vn(u.current,{select:!0})},t=function(e){if(p.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||Vn(u.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Vn(s)};In(e,"handleFocusIn"),In(t,"handleFocusOut"),In(n,"handleMutations"),document.addEventListener("focusin",e),document.addEventListener("focusout",t);const 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,p.paused]),q.useEffect(()=>{if(s){Hn.add(p);const e=document.activeElement;if(!s.contains(e)){const t=new CustomEvent(Dn,Rn);s.addEventListener(Dn,c),s.dispatchEvent(t),t.defaultPrevented||(zn(jn(On(s)),{select:!0}),document.activeElement===e&&Vn(s))}return()=>{s.removeEventListener(Dn,c),setTimeout(()=>{const t=new CustomEvent(En,Rn);s.addEventListener(En,d),s.dispatchEvent(t),t.defaultPrevented||Vn(e??document.body,{select:!0}),s.removeEventListener(En,d),Hn.remove(p)},0)}}},[s,c,d,p]);const m=q.useCallback(e=>{if(!n&&!r)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=Pn(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&Vn(o,{select:!0})):(e.preventDefault(),n&&Vn(r,{select:!0})):a===t&&e.preventDefault()}},[n,r,p.paused]);/* @__PURE__ */
|
|
11
11
|
return pe(v.div,{tabIndex:-1,...i,ref:h,onKeyDown:m})},"FocusScope"));function zn(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Vn(r,{select:t}),document.activeElement!==n)return}function Pn(e){const t=On(e);return[Ln(t,e),Ln(t.reverse(),e)]}function On(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:/* @__PURE__ */In(e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;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}function Ln(e,t){const n="function"==typeof t.checkVisibility&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Fn(r,{upTo:t})))return r}function Fn(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Bn(e){return e instanceof HTMLInputElement&&"select"in e}function Vn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Bn(e)&&t&&e.select()}}In(zn,"focusFirst"),In(Pn,"getTabbableEdges"),In(On,"getTabbableCandidates"),In(Ln,"findVisible"),In(Fn,"isHidden"),In(Bn,"isSelectableInput"),In(Vn,"focus");var Hn=$n();function $n(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=qn(e,t),e.unshift(t)},remove(t){e=qn(e,t),e[0]?.resume()}}}function qn(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function jn(e){return e.filter(e=>"A"!==e.tagName)}In($n,"createFocusScopesStack"),In(qn,"arrayRemove"),In(jn,"removeLinks");function Un(e){const[t,n]=q.useState(void 0);return f(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(0,Object.defineProperty)(Un,"name",{value:"useSize",configurable:!0});var Gn=Object.defineProperty,Wn=(e,t)=>Gn(e,"name",{value:t,configurable:!0}),Yn="Popper",[Kn,Xn]=p(Yn),[Zn,Jn]=Kn(Yn),Qn=/* @__PURE__ */Wn(e=>{const{__scopePopper:t,children:n}=e,[r,a]=q.useState(null),[o,i]=q.useState(void 0);/* @__PURE__ */
|
|
12
|
-
return pe(Zn,{scope:t,anchor:r,onAnchorChange:a,placementState:o,setPlacementState:i,children:n})},"Popper"),er=/* @__PURE__ */q.forwardRef(/* @__PURE__ */Wn(function(e,t){const{__scopePopper:n,virtualRef:r,...a}=e,o=Jn("PopperAnchor",n),i=q.useRef(null),s=o.onAnchorChange,l=q.useCallback(e=>{i.current=e,e&&s(e)},[s]),c=w(t,l),d=q.useRef(null);q.useEffect(()=>{if(!r)return;const e=d.current;d.current=r.current,e!==d.current&&s(d.current)});const u=o.placementState&&sr(o.placementState),h=u?.[0],p=u?.[1];return r?null:/* @__PURE__ */pe(v.div,{"data-radix-popper-side":h,"data-radix-popper-align":p,...a,ref:c})},"PopperAnchor")),tr="PopperContent",[nr,rr]=Kn(tr),ar=/* @__PURE__ */q.forwardRef(/* @__PURE__ */Wn(function(e,t){const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:o="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:u="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...g}=e,y=Jn(tr,n),[x,S]=q.useState(null),k=w(t,S),[C,I]=q.useState(null),D=Un(C),R=D?.width??0,_=D?.height??0,P=r+("center"!==o?"-"+o:""),O="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},F=Array.isArray(c)?c:[c],H=F.length>0,$={padding:O,boundary:F.filter(or),altBoundary:H},{refs:j,floatingStyles:U,placement:G,isPositioned:W,middlewareData:Y}=M({strategy:"fixed",placement:P,whileElementsMounted:/* @__PURE__ */Wn((...e)=>V(...e,{animationFrame:"always"===p}),"whileElementsMounted"),elements:{reference:y.anchor},middleware:[E({mainAxis:a+_,alignmentAxis:i}),l&&B({mainAxis:!0,crossAxis:!1,limiter:"partial"===u?T():void 0,...$}),l&&z({...$}),A({...$,apply:/* @__PURE__ */Wn(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)},"apply")}),C&&N({element:C,padding:s}),ir({arrowWidth:R,arrowHeight:_}),h&&L({strategy:"referenceHidden",...$,boundary:H?$.boundary:void 0})]}),K=y.setPlacementState;f(()=>(K(G),()=>{K(void 0)}),[G,K]);const[X,Z]=sr(G),J=b(m);f(()=>{W&&J?.()},[W,J]);const Q=Y.arrow?.x,ee=Y.arrow?.y,te=0!==Y.arrow?.centerOffset,[ne,re]=q.useState();return f(()=>{x&&re(window.getComputedStyle(x).zIndex)},[x]),/* @__PURE__ */pe("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:W?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:/* @__PURE__ */pe(nr,{scope:n,placedSide:X,placedAlign:Z,onArrowChange:I,arrowX:Q,arrowY:ee,shouldHideArrow:te,children:/* @__PURE__ */pe(v.div,{"data-side":X,"data-align":Z,...g,ref:k,style:{...g.style,animation:W?g.style?.animation:"none"}})})})},"PopperContent"));function or(e){return null!==e}Wn(or,"isNotNull");var ir=/* @__PURE__ */Wn(e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,o=0!==a.arrow?.centerOffset,i=o?0:e.arrowWidth,s=o?0:e.arrowHeight,[l,c]=sr(n),d={start:"0%",center:"50%",end:"100%"}[c],u=(a.arrow?.x??0)+i/2,h=(a.arrow?.y??0)+s/2;let p="",m="";return"bottom"===l?(p=o?d:`${u}px`,m=-s+"px"):"top"===l?(p=o?d:`${u}px`,m=`${r.floating.height+s}px`):"right"===l?(p=-s+"px",m=o?d:`${h}px`):"left"===l&&(p=`${r.floating.width+s}px`,m=o?d:`${h}px`),{data:{x:p,y:m}}}}),"transformOrigin");function sr(e){const[t,n="center"]=e.split("-");return[t,n]}Wn(sr,"getSideAndAlignFromPlacement");var lr=Qn,cr=er,dr=ar,ur=Object.defineProperty,hr=(e,t)=>ur(e,"name",{value:t,configurable:!0}),pr=/* @__PURE__ */q.forwardRef(/* @__PURE__ */hr(function(e,t){const{container:n,...r}=e,[a,o]=q.useState(!1);f(()=>o(!0),[]);const i=n||a&&globalThis?.document?.body;return i?It.createPortal(/* @__PURE__ */pe(v.div,{...r,ref:t}),i):null},"Portal")),mr=Object.defineProperty,fr=(e,t)=>mr(e,"name",{value:t,configurable:!0});function gr(e,t){return q.useReducer((e,n)=>t[e][n]??e,e)}fr(gr,"useStateMachine");var vr=/* @__PURE__ */fr(e=>{const{present:t,children:n}=e,r=yr(t),a="function"==typeof n?n({present:r.isPresent}):q.Children.only(n),o=xr(r.ref,Sr(a));return"function"==typeof n||r.isPresent?q.cloneElement(a,{ref:o}):null},"Presence");function yr(e){const[t,n]=q.useState(),r=q.useRef(null),a=q.useRef(e),o=q.useRef("none"),i=q.useRef(void 0),[s,l]=gr(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return q.useEffect(()=>{"mounted"===s?(o.current=i.current??wr(r.current),i.current=void 0):o.current="none"},[s]),f(()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,s=wr(t);e?(i.current=s,l("MOUNT")):l("none"===s||"none"===t?.display?"UNMOUNT":n&&r!==s?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),f(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=/* @__PURE__ */fr(o=>{const i=wr(r.current).includes(CSS.escape(o.animationName));if(o.target===t&&i&&(l("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},"handleAnimationEnd"),s=/* @__PURE__ */fr(e=>{e.target===t&&(o.current=wr(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:q.useCallback(e=>{if(e){const t=getComputedStyle(e);r.current=t,i.current=wr(t)}else r.current=null;n(e)},[])}}function br(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function xr(...e){const t=q.useRef(e);return t.current=e,q.useCallback(e=>{const n=t.current;let r=!1;const a=n.map(t=>{const n=br(t,e);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let e=0;e<a.length;e++){const t=a[e];"function"==typeof t?t():br(n[e],null)}}},[])}function wr(e){return e?.animationName||"none"}function Sr(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(yr,"usePresence"),fr(br,"setRef"),fr(xr,"useStableComposedRefs"),fr(wr,"getAnimationName"),fr(Sr,"getElementRef");var kr=/* @__PURE__ */new WeakMap,Cr=/* @__PURE__ */new WeakMap,Nr={},Tr=0,Ar=function(e){return e&&(e.host||Ar(e.parentNode))},Mr=function(e,t,n,r){var a=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ar(t);return n&&e.contains(n)?n:null}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);Nr[n]||(Nr[n]=/* @__PURE__ */new WeakMap);var o=Nr[n],i=[],s=/* @__PURE__ */new Set,l=new Set(a),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};a.forEach(c);var d=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))d(e);else try{var t=e.getAttribute(r),a=null!==t&&"false"!==t,l=(kr.get(e)||0)+1,c=(o.get(e)||0)+1;kr.set(e,l),o.set(e,c),i.push(e),1===l&&a&&Cr.set(e,!0),1===c&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(zi){}})};return d(t),s.clear(),Tr++,function(){i.forEach(function(e){var t=kr.get(e)-1,a=o.get(e)-1;kr.set(e,t),o.set(e,a),t||(Cr.has(e)||e.removeAttribute(r),Cr.delete(e)),a||e.removeAttribute(n)}),--Tr||(kr=/* @__PURE__ */new WeakMap,kr=/* @__PURE__ */new WeakMap,Cr=/* @__PURE__ */new WeakMap,Nr={})}},Ir=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),Mr(r,a,n,"aria-hidden")):function(){return null}},Dr=function(){return Dr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},Dr.apply(this,arguments)};function Er(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}var Rr="right-scroll-bar-position",_r="width-before-scroll-bar";function zr(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Pr="undefined"!=typeof window?q.useLayoutEffect:q.useEffect,Or=/* @__PURE__ */new WeakMap;function Lr(e,t){var n,r,a,o=(n=t||null,r=function(t){return e.forEach(function(e){return zr(e,t)})},a=le(function(){return{value:n,callback:r,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}})[0],a.callback=r,a.facade);return Pr(function(){var t=Or.get(o);if(t){var n=new Set(t),r=new Set(e),a=o.current;n.forEach(function(e){r.has(e)||zr(e,null)}),r.forEach(function(e){n.has(e)||zr(e,a)})}Or.set(o,e)},[e]),o}function Fr(e){return e}var Br=function(e){var t=e.sideCar,n=Er(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return q.createElement(r,Dr({},n))};Br.isSideCarExport=!0;var Vr=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Fr);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var a=t(e,r);return n.push(a),function(){n=n.filter(function(e){return e!==a})}},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 a=n;n=[],a.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(o)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=Dr({async:!0,ssr:!1},e),t}(),Hr=function(){},$r=q.forwardRef(function(e,t){var n=q.useRef(null),r=q.useState({onScrollCapture:Hr,onWheelCapture:Hr,onTouchMoveCapture:Hr}),a=r[0],o=r[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,h=e.sideCar,p=e.noRelative,m=e.noIsolation,f=e.inert,g=e.allowPinchZoom,v=e.as,y=void 0===v?"div":v,b=e.gapMode,x=Er(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,S=Lr([n,t]),k=Dr(Dr({},x),a);return q.createElement(q.Fragment,null,d&&q.createElement(w,{sideCar:Vr,removeScrollBar:c,shards:u,noRelative:p,noIsolation:m,inert:f,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:b}),i?q.cloneElement(q.Children.only(s),Dr(Dr({},k),{ref:S})):q.createElement(y,Dr({},k,{className:l,ref:S}),s))});$r.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$r.classNames={fullWidth:_r,zeroRight:Rr};function qr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var jr=function(){var e=0,t=null;return{add:function(n){var r,a;0==e&&(t=qr())&&(a=n,(r=t).styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ur=function(){var e,t=(e=jr(),function(t,n){q.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},Gr={left:0,top:0,right:0,gap:0},Wr=function(e){return parseInt(e||"",10)||0},Yr=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Gr;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[Wr(n),Wr(r),Wr(a)]}(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])}},Kr=Ur(),Xr="data-scroll-locked",Zr=function(e,t,n,r){var a=e.left,o=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(Xr,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Rr," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(_r," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Rr," .").concat(Rr," {\n right: 0 ").concat(r,";\n }\n \n .").concat(_r," .").concat(_r," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Xr,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Jr=function(){var e=parseInt(document.body.getAttribute("data-scroll-locked")||"0",10);return isFinite(e)?e:0},Qr=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;q.useEffect(function(){return document.body.setAttribute(Xr,(Jr()+1).toString()),function(){var e=Jr()-1;e<=0?document.body.removeAttribute(Xr):document.body.setAttribute(Xr,e.toString())}},[]);var o=q.useMemo(function(){return Yr(a)},[a]);return q.createElement(Kr,{styles:Zr(o,!t,a,n?"":"!important")})},ea=!1;if("undefined"!=typeof window)try{var ta=Object.defineProperty({},"passive",{get:function(){return ea=!0,!0}});window.addEventListener("test",ta,ta),window.removeEventListener("test",ta,ta)}catch(IE){ea=!1}var na=!!ea&&{passive:!1},ra=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},aa=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),oa(e,r)){var a=ia(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},oa=function(e,t){return"v"===e?function(e){return ra(e,"overflowY")}(t):function(e){return ra(e,"overflowX")}(t)},ia=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},sa=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},la=function(e){return[e.deltaX,e.deltaY]},ca=function(e){return e&&"current"in e?e.current:e},da=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ua=0,ha=[];function pa(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ma,fa=(ma=function(e){var t=q.useRef([]),n=q.useRef([0,0]),r=q.useRef(),a=q.useState(ua++)[0],o=q.useState(Ur)[0],i=q.useRef(e);q.useEffect(function(){i.current=e},[e]),q.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(ca),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var s=q.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=sa(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],c="deltaY"in e?e.deltaY:s[1]-o[1],d=e.target,u=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var h=window.getSelection(),p=h&&h.anchorNode;if(p&&(p===d||p.contains(d)))return!1;var m=aa(u,d);if(!m)return!0;if(m?a=u:(a="v"===u?"h":"v",m=aa(u,d)),!m)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=a),!a)return!0;var f=r.current||a;return function(e,t,n,r,a){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,s=n.target,l=t.contains(s),c=!1,d=i>0,u=0,h=0;do{if(!s)break;var p=ia(e,s),m=p[0],f=p[1]-p[2]-o*m;(m||f)&&oa(e,s)&&(u+=f,h+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(a&&Math.abs(u)<1||!a&&i>u)||!d&&(a&&Math.abs(h)<1||!a&&-i>h))&&(c=!0),c}(f,t,e,"h"===f?l:c,!0)},[]),l=q.useCallback(function(e){var n=e;if(ha.length&&ha[ha.length-1]===o){var r="deltaY"in n?la(n):sa(n),a=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)})[0];if(a&&a.should)n.cancelable&&n.preventDefault();else if(!a){var l=(i.current.shards||[]).map(ca).filter(Boolean).filter(function(e){return e.contains(n.target)});(l.length>0?s(n,l[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),c=q.useCallback(function(e,n,r,a){var o={name:e,delta:n,target:r,should:a,shadowParent:pa(r)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),d=q.useCallback(function(e){n.current=sa(e),r.current=void 0},[]),u=q.useCallback(function(t){c(t.type,la(t),t.target,s(t,e.lockRef.current))},[]),h=q.useCallback(function(t){c(t.type,sa(t),t.target,s(t,e.lockRef.current))},[]);q.useEffect(function(){return ha.push(o),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",l,na),document.addEventListener("touchmove",l,na),document.addEventListener("touchstart",d,na),function(){ha=ha.filter(function(e){return e!==o}),document.removeEventListener("wheel",l,na),document.removeEventListener("touchmove",l,na),document.removeEventListener("touchstart",d,na)}},[]);var p=e.removeScrollBar,m=e.inert;return q.createElement(q.Fragment,null,m?q.createElement(o,{styles:da(a)}):null,p?q.createElement(Qr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Vr.useMedium(ma),Br),ga=q.forwardRef(function(e,t){return q.createElement($r,Dr({},e,{ref:t,sideCar:fa}))});ga.classNames=$r.classNames;var va=Object.defineProperty,ya=(e,t)=>va(e,"name",{value:t,configurable:!0}),ba=["Enter"," "],xa=["ArrowUp","PageDown","End"],wa=["ArrowDown","PageUp","Home",...xa],Sa={ltr:[...ba,"ArrowRight"],rtl:[...ba,"ArrowLeft"]},ka={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ca="Menu",[Na,Ta,Aa]=R(Ca),[Ma,Ia]=p(Ca,[Aa,Xn,O]),Da=Xn(),Ea=O(),[Ra,_a]=Ma(Ca),[za,Pa]=Ma(Ca),Oa=/* @__PURE__ */ya(e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:o,modal:i=!0}=e,s=Da(t),[l,c]=q.useState(null),d=q.useRef(!1),u=b(o),h=P(a);return q.useEffect(()=>{const e=/* @__PURE__ */ya(()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},"handleKeyDown"),t=/* @__PURE__ */ya(()=>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})}},[]),q.useEffect(()=>{if(!n)return;const e=/* @__PURE__ */ya(()=>u(!1),"handleBlur");return window.addEventListener("blur",e),()=>window.removeEventListener("blur",e)},[n,u]),/* @__PURE__ */pe(lr,{...s,children:/* @__PURE__ */pe(Ra,{scope:t,open:n,onOpenChange:u,content:l,onContentChange:c,children:/* @__PURE__ */pe(za,{scope:t,onClose:q.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:h,modal:i,children:r})})})},"Menu"),La=/* @__PURE__ */q.forwardRef(/* @__PURE__ */ya(function(e,t){const{__scopeMenu:n,...r}=e,a=Da(n);/* @__PURE__ */
|
|
12
|
+
return pe(Zn,{scope:t,anchor:r,onAnchorChange:a,placementState:o,setPlacementState:i,children:n})},"Popper"),er=/* @__PURE__ */q.forwardRef(/* @__PURE__ */Wn(function(e,t){const{__scopePopper:n,virtualRef:r,...a}=e,o=Jn("PopperAnchor",n),i=q.useRef(null),s=o.onAnchorChange,l=q.useCallback(e=>{i.current=e,e&&s(e)},[s]),c=w(t,l),d=q.useRef(null);q.useEffect(()=>{if(!r)return;const e=d.current;d.current=r.current,e!==d.current&&s(d.current)});const u=o.placementState&&sr(o.placementState),h=u?.[0],p=u?.[1];return r?null:/* @__PURE__ */pe(v.div,{"data-radix-popper-side":h,"data-radix-popper-align":p,...a,ref:c})},"PopperAnchor")),tr="PopperContent",[nr,rr]=Kn(tr),ar=/* @__PURE__ */q.forwardRef(/* @__PURE__ */Wn(function(e,t){const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:o="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:u="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...g}=e,y=Jn(tr,n),[x,S]=q.useState(null),k=w(t,S),[C,I]=q.useState(null),D=Un(C),R=D?.width??0,_=D?.height??0,P=r+("center"!==o?"-"+o:""),O="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},F=Array.isArray(c)?c:[c],H=F.length>0,$={padding:O,boundary:F.filter(or),altBoundary:H},{refs:j,floatingStyles:U,placement:G,isPositioned:W,middlewareData:Y}=M({strategy:"fixed",placement:P,whileElementsMounted:/* @__PURE__ */Wn((...e)=>V(...e,{animationFrame:"always"===p}),"whileElementsMounted"),elements:{reference:y.anchor},middleware:[E({mainAxis:a+_,alignmentAxis:i}),l&&B({mainAxis:!0,crossAxis:!1,limiter:"partial"===u?T():void 0,...$}),l&&z({...$}),A({...$,apply:/* @__PURE__ */Wn(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)},"apply")}),C&&N({element:C,padding:s}),ir({arrowWidth:R,arrowHeight:_}),h&&L({strategy:"referenceHidden",...$,boundary:H?$.boundary:void 0})]}),K=y.setPlacementState;f(()=>(K(G),()=>{K(void 0)}),[G,K]);const[X,Z]=sr(G),J=b(m);f(()=>{W&&J?.()},[W,J]);const Q=Y.arrow?.x,ee=Y.arrow?.y,te=0!==Y.arrow?.centerOffset,[ne,re]=q.useState();return f(()=>{x&&re(window.getComputedStyle(x).zIndex)},[x]),/* @__PURE__ */pe("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:W?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:/* @__PURE__ */pe(nr,{scope:n,placedSide:X,placedAlign:Z,onArrowChange:I,arrowX:Q,arrowY:ee,shouldHideArrow:te,children:/* @__PURE__ */pe(v.div,{"data-side":X,"data-align":Z,...g,ref:k,style:{...g.style,animation:W?g.style?.animation:"none"}})})})},"PopperContent"));function or(e){return null!==e}Wn(or,"isNotNull");var ir=/* @__PURE__ */Wn(e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,o=0!==a.arrow?.centerOffset,i=o?0:e.arrowWidth,s=o?0:e.arrowHeight,[l,c]=sr(n),d={start:"0%",center:"50%",end:"100%"}[c],u=(a.arrow?.x??0)+i/2,h=(a.arrow?.y??0)+s/2;let p="",m="";return"bottom"===l?(p=o?d:`${u}px`,m=-s+"px"):"top"===l?(p=o?d:`${u}px`,m=`${r.floating.height+s}px`):"right"===l?(p=-s+"px",m=o?d:`${h}px`):"left"===l&&(p=`${r.floating.width+s}px`,m=o?d:`${h}px`),{data:{x:p,y:m}}}}),"transformOrigin");function sr(e){const[t,n="center"]=e.split("-");return[t,n]}Wn(sr,"getSideAndAlignFromPlacement");var lr=Qn,cr=er,dr=ar,ur=Object.defineProperty,hr=(e,t)=>ur(e,"name",{value:t,configurable:!0}),pr=/* @__PURE__ */q.forwardRef(/* @__PURE__ */hr(function(e,t){const{container:n,...r}=e,[a,o]=q.useState(!1);f(()=>o(!0),[]);const i=n||a&&globalThis?.document?.body;return i?It.createPortal(/* @__PURE__ */pe(v.div,{...r,ref:t}),i):null},"Portal")),mr=Object.defineProperty,fr=(e,t)=>mr(e,"name",{value:t,configurable:!0});function gr(e,t){return q.useReducer((e,n)=>t[e][n]??e,e)}fr(gr,"useStateMachine");var vr=/* @__PURE__ */fr(e=>{const{present:t,children:n}=e,r=yr(t),a="function"==typeof n?n({present:r.isPresent}):q.Children.only(n),o=xr(r.ref,Sr(a));return"function"==typeof n||r.isPresent?q.cloneElement(a,{ref:o}):null},"Presence");function yr(e){const[t,n]=q.useState(),r=q.useRef(null),a=q.useRef(e),o=q.useRef("none"),i=q.useRef(void 0),[s,l]=gr(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return q.useEffect(()=>{"mounted"===s?(o.current=i.current??wr(r.current),i.current=void 0):o.current="none"},[s]),f(()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,s=wr(t);e?(i.current=s,l("MOUNT")):l("none"===s||"none"===t?.display?"UNMOUNT":n&&r!==s?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),f(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=/* @__PURE__ */fr(o=>{const i=wr(r.current).includes(CSS.escape(o.animationName));if(o.target===t&&i&&(l("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},"handleAnimationEnd"),s=/* @__PURE__ */fr(e=>{e.target===t&&(o.current=wr(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:q.useCallback(e=>{if(e){const t=getComputedStyle(e);r.current=t,i.current=wr(t)}else r.current=null;n(e)},[])}}function br(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function xr(...e){const t=q.useRef(e);return t.current=e,q.useCallback(e=>{const n=t.current;let r=!1;const a=n.map(t=>{const n=br(t,e);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let e=0;e<a.length;e++){const t=a[e];"function"==typeof t?t():br(n[e],null)}}},[])}function wr(e){return e?.animationName||"none"}function Sr(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(yr,"usePresence"),fr(br,"setRef"),fr(xr,"useStableComposedRefs"),fr(wr,"getAnimationName"),fr(Sr,"getElementRef");var kr=/* @__PURE__ */new WeakMap,Cr=/* @__PURE__ */new WeakMap,Nr={},Tr=0,Ar=function(e){return e&&(e.host||Ar(e.parentNode))},Mr=function(e,t,n,r){var a=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ar(t);return n&&e.contains(n)?n:null}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);Nr[n]||(Nr[n]=/* @__PURE__ */new WeakMap);var o=Nr[n],i=[],s=/* @__PURE__ */new Set,l=new Set(a),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};a.forEach(c);var d=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))d(e);else try{var t=e.getAttribute(r),a=null!==t&&"false"!==t,l=(kr.get(e)||0)+1,c=(o.get(e)||0)+1;kr.set(e,l),o.set(e,c),i.push(e),1===l&&a&&Cr.set(e,!0),1===c&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(zi){}})};return d(t),s.clear(),Tr++,function(){i.forEach(function(e){var t=kr.get(e)-1,a=o.get(e)-1;kr.set(e,t),o.set(e,a),t||(Cr.has(e)||e.removeAttribute(r),Cr.delete(e)),a||e.removeAttribute(n)}),--Tr||(kr=/* @__PURE__ */new WeakMap,kr=/* @__PURE__ */new WeakMap,Cr=/* @__PURE__ */new WeakMap,Nr={})}},Ir=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),Mr(r,a,n,"aria-hidden")):function(){return null}},Dr=function(){return Dr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},Dr.apply(this,arguments)};function Er(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}var Rr="right-scroll-bar-position",_r="width-before-scroll-bar";function zr(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Pr="undefined"!=typeof window?q.useLayoutEffect:q.useEffect,Or=/* @__PURE__ */new WeakMap;function Lr(e,t){var n,r,a,o=(n=t||null,r=function(t){return e.forEach(function(e){return zr(e,t)})},a=le(function(){return{value:n,callback:r,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}})[0],a.callback=r,a.facade);return Pr(function(){var t=Or.get(o);if(t){var n=new Set(t),r=new Set(e),a=o.current;n.forEach(function(e){r.has(e)||zr(e,null)}),r.forEach(function(e){n.has(e)||zr(e,a)})}Or.set(o,e)},[e]),o}function Fr(e){return e}var Br=function(e){var t=e.sideCar,n=Er(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return q.createElement(r,Dr({},n))};Br.isSideCarExport=!0;var Vr=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Fr);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var a=t(e,r);return n.push(a),function(){n=n.filter(function(e){return e!==a})}},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 a=n;n=[],a.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(o)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=Dr({async:!0,ssr:!1},e),t}(),Hr=function(){},$r=q.forwardRef(function(e,t){var n=q.useRef(null),r=q.useState({onScrollCapture:Hr,onWheelCapture:Hr,onTouchMoveCapture:Hr}),a=r[0],o=r[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,h=e.sideCar,p=e.noRelative,m=e.noIsolation,f=e.inert,g=e.allowPinchZoom,v=e.as,y=void 0===v?"div":v,b=e.gapMode,x=Er(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,S=Lr([n,t]),k=Dr(Dr({},x),a);return q.createElement(q.Fragment,null,d&&q.createElement(w,{sideCar:Vr,removeScrollBar:c,shards:u,noRelative:p,noIsolation:m,inert:f,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:b}),i?q.cloneElement(q.Children.only(s),Dr(Dr({},k),{ref:S})):q.createElement(y,Dr({},k,{className:l,ref:S}),s))});$r.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$r.classNames={fullWidth:_r,zeroRight:Rr};function qr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var jr=function(){var e=0,t=null;return{add:function(n){var r,a;0==e&&(t=qr())&&(a=n,(r=t).styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ur=function(){var e,t=(e=jr(),function(t,n){q.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},Gr={left:0,top:0,right:0,gap:0},Wr=function(e){return parseInt(e||"",10)||0},Yr=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Gr;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[Wr(n),Wr(r),Wr(a)]}(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])}},Kr=Ur(),Xr="data-scroll-locked",Zr=function(e,t,n,r){var a=e.left,o=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(Xr,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Rr," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(_r," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Rr," .").concat(Rr," {\n right: 0 ").concat(r,";\n }\n \n .").concat(_r," .").concat(_r," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Xr,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Jr=function(){var e=parseInt(document.body.getAttribute("data-scroll-locked")||"0",10);return isFinite(e)?e:0},Qr=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;q.useEffect(function(){return document.body.setAttribute(Xr,(Jr()+1).toString()),function(){var e=Jr()-1;e<=0?document.body.removeAttribute(Xr):document.body.setAttribute(Xr,e.toString())}},[]);var o=q.useMemo(function(){return Yr(a)},[a]);return q.createElement(Kr,{styles:Zr(o,!t,a,n?"":"!important")})},ea=!1;if("undefined"!=typeof window)try{var ta=Object.defineProperty({},"passive",{get:function(){return ea=!0,!0}});window.addEventListener("test",ta,ta),window.removeEventListener("test",ta,ta)}catch(EE){ea=!1}var na=!!ea&&{passive:!1},ra=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},aa=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),oa(e,r)){var a=ia(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},oa=function(e,t){return"v"===e?function(e){return ra(e,"overflowY")}(t):function(e){return ra(e,"overflowX")}(t)},ia=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},sa=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},la=function(e){return[e.deltaX,e.deltaY]},ca=function(e){return e&&"current"in e?e.current:e},da=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ua=0,ha=[];function pa(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ma,fa=(ma=function(e){var t=q.useRef([]),n=q.useRef([0,0]),r=q.useRef(),a=q.useState(ua++)[0],o=q.useState(Ur)[0],i=q.useRef(e);q.useEffect(function(){i.current=e},[e]),q.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(ca),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var s=q.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=sa(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],c="deltaY"in e?e.deltaY:s[1]-o[1],d=e.target,u=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var h=window.getSelection(),p=h&&h.anchorNode;if(p&&(p===d||p.contains(d)))return!1;var m=aa(u,d);if(!m)return!0;if(m?a=u:(a="v"===u?"h":"v",m=aa(u,d)),!m)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=a),!a)return!0;var f=r.current||a;return function(e,t,n,r,a){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,s=n.target,l=t.contains(s),c=!1,d=i>0,u=0,h=0;do{if(!s)break;var p=ia(e,s),m=p[0],f=p[1]-p[2]-o*m;(m||f)&&oa(e,s)&&(u+=f,h+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(a&&Math.abs(u)<1||!a&&i>u)||!d&&(a&&Math.abs(h)<1||!a&&-i>h))&&(c=!0),c}(f,t,e,"h"===f?l:c,!0)},[]),l=q.useCallback(function(e){var n=e;if(ha.length&&ha[ha.length-1]===o){var r="deltaY"in n?la(n):sa(n),a=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)})[0];if(a&&a.should)n.cancelable&&n.preventDefault();else if(!a){var l=(i.current.shards||[]).map(ca).filter(Boolean).filter(function(e){return e.contains(n.target)});(l.length>0?s(n,l[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),c=q.useCallback(function(e,n,r,a){var o={name:e,delta:n,target:r,should:a,shadowParent:pa(r)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),d=q.useCallback(function(e){n.current=sa(e),r.current=void 0},[]),u=q.useCallback(function(t){c(t.type,la(t),t.target,s(t,e.lockRef.current))},[]),h=q.useCallback(function(t){c(t.type,sa(t),t.target,s(t,e.lockRef.current))},[]);q.useEffect(function(){return ha.push(o),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",l,na),document.addEventListener("touchmove",l,na),document.addEventListener("touchstart",d,na),function(){ha=ha.filter(function(e){return e!==o}),document.removeEventListener("wheel",l,na),document.removeEventListener("touchmove",l,na),document.removeEventListener("touchstart",d,na)}},[]);var p=e.removeScrollBar,m=e.inert;return q.createElement(q.Fragment,null,m?q.createElement(o,{styles:da(a)}):null,p?q.createElement(Qr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Vr.useMedium(ma),Br),ga=q.forwardRef(function(e,t){return q.createElement($r,Dr({},e,{ref:t,sideCar:fa}))});ga.classNames=$r.classNames;var va=Object.defineProperty,ya=(e,t)=>va(e,"name",{value:t,configurable:!0}),ba=["Enter"," "],xa=["ArrowUp","PageDown","End"],wa=["ArrowDown","PageUp","Home",...xa],Sa={ltr:[...ba,"ArrowRight"],rtl:[...ba,"ArrowLeft"]},ka={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ca="Menu",[Na,Ta,Aa]=R(Ca),[Ma,Ia]=p(Ca,[Aa,Xn,O]),Da=Xn(),Ea=O(),[Ra,_a]=Ma(Ca),[za,Pa]=Ma(Ca),Oa=/* @__PURE__ */ya(e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:o,modal:i=!0}=e,s=Da(t),[l,c]=q.useState(null),d=q.useRef(!1),u=b(o),h=P(a);return q.useEffect(()=>{const e=/* @__PURE__ */ya(()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},"handleKeyDown"),t=/* @__PURE__ */ya(()=>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})}},[]),q.useEffect(()=>{if(!n)return;const e=/* @__PURE__ */ya(()=>u(!1),"handleBlur");return window.addEventListener("blur",e),()=>window.removeEventListener("blur",e)},[n,u]),/* @__PURE__ */pe(lr,{...s,children:/* @__PURE__ */pe(Ra,{scope:t,open:n,onOpenChange:u,content:l,onContentChange:c,children:/* @__PURE__ */pe(za,{scope:t,onClose:q.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:h,modal:i,children:r})})})},"Menu"),La=/* @__PURE__ */q.forwardRef(/* @__PURE__ */ya(function(e,t){const{__scopeMenu:n,...r}=e,a=Da(n);/* @__PURE__ */
|
|
13
13
|
return pe(cr,{...a,...r,ref:t})},"MenuAnchor")),Fa="MenuPortal",[Ba,Va]=Ma(Fa,{forceMount:void 0}),Ha=/* @__PURE__ */ya(e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,o=_a(Fa,t);/* @__PURE__ */
|
|
14
14
|
return pe(Ba,{scope:t,forceMount:n,children:/* @__PURE__ */pe(vr,{present:n||o.open,children:/* @__PURE__ */pe(pr,{asChild:!0,container:a,children:r})})})},"MenuPortal"),$a="MenuContent",[qa,ja]=Ma($a),Ua=/* @__PURE__ */q.forwardRef(/* @__PURE__ */ya(function(e,t){const n=Va($a,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=_a($a,e.__scopeMenu),i=Pa($a,e.__scopeMenu);/* @__PURE__ */
|
|
15
15
|
return pe(Na.Provider,{scope:e.__scopeMenu,children:/* @__PURE__ */pe(vr,{present:r||o.open,children:/* @__PURE__ */pe(Na.Slot,{scope:e.__scopeMenu,children:i.modal?/* @__PURE__ */pe(Ga,{...a,ref:t}):/* @__PURE__ */pe(Wa,{...a,ref:t})})})})},"MenuContent")),Ga=/* @__PURE__ */q.forwardRef(/* @__PURE__ */ya(function(e,t){const n=_a($a,e.__scopeMenu),r=q.useRef(null),a=w(t,r);return q.useEffect(()=>{const e=r.current;if(e)return Ir(e)},[]),/* @__PURE__ */pe(Ka,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:I(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},"MenuRootContentModal")),Wa=/* @__PURE__ */q.forwardRef(/* @__PURE__ */ya(function(e,t){const n=_a($a,e.__scopeMenu);/* @__PURE__ */
|
|
@@ -35,7 +35,7 @@ return pe(Po,{...a,...r,ref:t})},"ContextMenuItemIndicator")),ri=/* @__PURE__ */
|
|
|
35
35
|
return pe(Oo,{...a,...r,ref:t})},"ContextMenuSeparator")),ai=/* @__PURE__ */Ho(e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:a,defaultOpen:o}=e,i=Uo(t),[s,l]=D({prop:a,defaultProp:o??!1,onChange:r,caller:"ContextMenuSub"});/* @__PURE__ */
|
|
36
36
|
return pe(Lo,{...i,open:s,onOpenChange:l,children:n})},"ContextMenuSub"),oi=/* @__PURE__ */q.forwardRef(/* @__PURE__ */Ho(function(e,t){const{__scopeContextMenu:n,...r}=e,a=Uo(n);/* @__PURE__ */
|
|
37
37
|
return pe(Fo,{...a,...r,ref:t})},"ContextMenuSubTrigger")),ii=/* @__PURE__ */q.forwardRef(/* @__PURE__ */Ho(function(e,t){const{__scopeContextMenu:n,...r}=e,a=Uo(n);/* @__PURE__ */
|
|
38
|
-
return pe(Bo,{...a,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"ContextMenuSubContent"));function si(e){return t=>"mouse"!==t.pointerType?e(t):void 0}Ho(si,"whenTouchOrPen");var li=Yo,ci=Ko,di=Xo,ui=Zo,hi=Jo,pi=Qo,mi=ei,fi=ti,gi=ni,vi=ri,yi=ai,bi=oi,xi=ii,wi=/* @__PURE__ */a(e=>{var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,f=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,v=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case c:case d:case a:case i:case o:case h:return e;default:switch(e=e&&e.$$typeof){case l:case u:case f:case m:case s:return e;default:return t}}case r:return t}}}function w(e){return x(e)===d}e.AsyncMode=c,e.ConcurrentMode=d,e.ContextConsumer=l,e.ContextProvider=s,e.Element=n,e.ForwardRef=u,e.Fragment=a,e.Lazy=f,e.Memo=m,e.Portal=r,e.Profiler=i,e.StrictMode=o,e.Suspense=h,e.isAsyncMode=function(e){return w(e)||x(e)===c},e.isConcurrentMode=w,e.isContextConsumer=function(e){return x(e)===l},e.isContextProvider=function(e){return x(e)===s},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},e.isForwardRef=function(e){return x(e)===u},e.isFragment=function(e){return x(e)===a},e.isLazy=function(e){return x(e)===f},e.isMemo=function(e){return x(e)===m},e.isPortal=function(e){return x(e)===r},e.isProfiler=function(e){return x(e)===i},e.isStrictMode=function(e){return x(e)===o},e.isSuspense=function(e){return x(e)===h},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===i||e===o||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===m||e.$$typeof===s||e.$$typeof===l||e.$$typeof===u||e.$$typeof===v||e.$$typeof===y||e.$$typeof===b||e.$$typeof===g)},e.typeOf=x}),Si=/* @__PURE__ */a(e=>{"production"!==process.env.NODE_ENV&&function(){var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,f=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,v=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case c:case d:case a:case i:case o:case h:return p;default:var g=p&&p.$$typeof;switch(g){case l:case u:case f:case m:case s:return g;default:return t}}case r:return t}}}var w=c,S=d,k=l,C=s,N=n,T=u,A=a,M=f,I=m,D=r,E=i,R=o,_=h,z=!1;function P(e){return x(e)===d}e.AsyncMode=w,e.ConcurrentMode=S,e.ContextConsumer=k,e.ContextProvider=C,e.Element=N,e.ForwardRef=T,e.Fragment=A,e.Lazy=M,e.Memo=I,e.Portal=D,e.Profiler=E,e.StrictMode=R,e.Suspense=_,e.isAsyncMode=function(e){return z||(z=!0),P(e)||x(e)===c},e.isConcurrentMode=P,e.isContextConsumer=function(e){return x(e)===l},e.isContextProvider=function(e){return x(e)===s},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},e.isForwardRef=function(e){return x(e)===u},e.isFragment=function(e){return x(e)===a},e.isLazy=function(e){return x(e)===f},e.isMemo=function(e){return x(e)===m},e.isPortal=function(e){return x(e)===r},e.isProfiler=function(e){return x(e)===i},e.isStrictMode=function(e){return x(e)===o},e.isSuspense=function(e){return x(e)===h},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===i||e===o||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===m||e.$$typeof===s||e.$$typeof===l||e.$$typeof===u||e.$$typeof===v||e.$$typeof===y||e.$$typeof===b||e.$$typeof===g)},e.typeOf=x}()}),ki=/* @__PURE__ */a((e,t)=>{"production"===process.env.NODE_ENV?t.exports=wi():t.exports=Si()}),Ci=/* @__PURE__ */a((e,t)=>{var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=/* @__PURE__ */new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(IE){return!1}}()?Object.assign:function(e,t){for(var o,i,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in o=Object(arguments[l]))r.call(o,c)&&(s[c]=o[c]);if(n){i=n(o);for(var d=0;d<i.length;d++)a.call(o,i[d])&&(s[i[d]]=o[i[d]])}}return s}}),Ni=/* @__PURE__ */a((e,t)=>{t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}),Ti=/* @__PURE__ */a((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)}),Ai=/* @__PURE__ */a((e,t)=>{var n=function(){};if("production"!==process.env.NODE_ENV){var r=Ni(),a={},o=Ti();n=function(e){var t="Warning: "+e;try{throw new Error(t)}catch(jw){}}}function i(e,t,i,s,l){if("production"!==process.env.NODE_ENV)for(var c in e)if(o(e,c)){var d;try{if("function"!=typeof e[c]){var u=Error((s||"React class")+": "+i+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=e[c](t,c,s,i,null,r)}catch(p){d=p}if(!d||d instanceof Error||n((s||"React class")+": type specification of "+i+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in a)){a[d.message]=!0;var h=l?l():"";n("Failed "+i+" type: "+d.message+(null!=h?h:""))}}}i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(a={})},t.exports=i}),Mi=/* @__PURE__ */a((e,t)=>{var n=ki(),r=Ci(),a=Ni(),o=Ti(),i=Ai(),s=function(){};function l(){return null}"production"!==process.env.NODE_ENV&&(s=function(e){var t="Warning: "+e;try{throw new Error(t)}catch(jw){}}),t.exports=function(e,t){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:m(l),arrayOf:function(e){return m(function(t,n,r,o,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s))return new p("Invalid "+o+" `"+i+"` of type `"+y(s)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<s.length;l++){var c=e(s,l,r,o,i+"["+l+"]",a);if(c instanceof Error)return c}return null})},element:m(function(t,n,r,a,o){var i=t[n];return e(i)?null:new p("Invalid "+a+" `"+o+"` of type `"+y(i)+"` supplied to `"+r+"`, expected a single ReactElement.")}),elementType:m(function(e,t,r,a,o){var i=e[t];return n.isValidElementType(i)?null:new p("Invalid "+a+" `"+o+"` of type `"+y(i)+"` supplied to `"+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return m(function(t,n,r,a,o){if(!(t[n]instanceof e)){var i=e.name||d;return new p("Invalid "+a+" `"+o+"` of type `"+((s=t[n]).constructor&&s.constructor.name?s.constructor.name:d)+"` supplied to `"+r+"`, expected instance of `"+i+"`.")}var s;return null})},node:m(function(e,t,n,r,a){return v(e[t])?null:new p("Invalid "+r+" `"+a+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return m(function(t,n,r,i,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[n],c=y(l);if("object"!==c)return new p("Invalid "+i+" `"+s+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var d in l)if(o(l,d)){var u=e(l,d,r,i,s+"."+d,a);if(u instanceof Error)return u}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&s(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),l;return m(function(t,n,r,a,o){for(var i=t[n],s=0;s<e.length;s++)if(h(i,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===b(t)?String(t):t});return new p("Invalid "+a+" `"+o+"` of value `"+String(i)+"` supplied to `"+r+"`, expected one of "+l+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&s("Invalid argument supplied to oneOfType, expected an instance of array."),l;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(n)+" at index "+t+"."),l}return m(function(t,n,r,i,s){for(var l=[],c=0;c<e.length;c++){var d=(0,e[c])(t,n,r,i,s,a);if(null==d)return null;d.data&&o(d.data,"expectedType")&&l.push(d.data.expectedType)}return new p("Invalid "+i+" `"+s+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return m(function(t,n,r,o,i){var s=t[n],l=y(s);if("object"!==l)return new p("Invalid "+o+" `"+i+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(r,o,i,c,b(d));var u=d(s,c,r,o,i+"."+c,a);if(u)return u}return null})},exact:function(e){return m(function(t,n,i,s,l){var c=t[n],d=y(c);if("object"!==d)return new p("Invalid "+s+" `"+l+"` of type `"+d+"` supplied to `"+i+"`, expected `object`.");for(var u in r({},t[n],e)){var h=e[u];if(o(e,u)&&"function"!=typeof h)return g(i,s,l,u,b(h));if(!h)return new p("Invalid "+s+" `"+l+"` key `"+u+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=h(c,u,i,s,l+"."+u,a);if(m)return m}return null})}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var n={},r=0;function o(o,i,l,c,u,h,m){if(c=c||d,h=h||l,m!==a){if(t){var f=/* @__PURE__ */new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+l;!n[g]&&r<3&&(s("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[g]=!0,r++)}}return null==i[l]?o?null===i[l]?new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(i,l,c,u,h)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function f(e){return m(function(t,n,r,a,o,i){var s=t[n];return y(s)!==e?new p("Invalid "+a+" `"+o+"` of type `"+b(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function g(e,t,n,r,a){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function v(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(v);if(null===t||e(t))return!0;var n=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!n)return!1;var r,a=n.call(t);if(n!==t.entries){for(;!(r=a.next()).done;)if(!v(r.value))return!1}else for(;!(r=a.next()).done;){var o=r.value;if(o&&!v(o[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function b(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=b(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,u.checkPropTypes=i,u.resetWarningCache=i.resetWarningCache,u.PropTypes=u,u}}),Ii=/* @__PURE__ */a((e,t)=>{var n=Ni();function r(){}function a(){}a.resetWarningCache=r,t.exports=function(){function e(e,t,r,a,o,i){if(i!==n){var s=/* @__PURE__ */new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return o.PropTypes=o,o}}),Di=/* @__PURE__ */n(/* @__PURE__ */a((e,t)=>{if("production"!==process.env.NODE_ENV){var n=ki();t.exports=Mi()(n.isElement,!0)}else t.exports=Ii()()})()),Ei={grad:.9,turn:360,rad:360/(2*Math.PI)},Ri=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},_i=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},zi=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Pi=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Oi=function(e){return{r:zi(e.r,0,255),g:zi(e.g,0,255),b:zi(e.b,0,255),a:zi(e.a)}},Li=function(e){return{r:_i(e.r),g:_i(e.g),b:_i(e.b),a:_i(e.a,3)}},Fi=/^#([0-9a-f]{3,8})$/i,Bi=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Vi=function(e){var t=e.r,n=e.g,r=e.b,a=e.a,o=Math.max(t,n,r),i=o-Math.min(t,n,r),s=i?o===t?(n-r)/i:o===n?2+(r-t)/i:4+(t-n)/i:0;return{h:60*(s<0?s+6:s),s:o?i/o*100:0,v:o/255*100,a:a}},Hi=function(e){var t=e.h,n=e.s,r=e.v,a=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),i=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:255*[r,s,i,i,l,r][c],g:255*[l,r,r,s,i,i][c],b:255*[i,i,l,r,r,s][c],a:a}},$i=function(e){return{h:Pi(e.h),s:zi(e.s,0,100),l:zi(e.l,0,100),a:zi(e.a)}},qi=function(e){return{h:_i(e.h),s:_i(e.s),l:_i(e.l),a:_i(e.a,3)}},ji=function(e){return Hi((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},Ui=function(e){return{h:(t=Vi(e)).h,s:(a=(200-(n=t.s))*(r=t.v)/100)>0&&a<200?n*r/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,n,r,a},Gi=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Wi=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yi=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ki=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xi={string:[[function(e){var t=Fi.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?_i(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?_i(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Yi.exec(e)||Ki.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Oi({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t,n,r=Gi.exec(e)||Wi.exec(e);return r?ji($i({h:(t=r[1],n=r[2],void 0===n&&(n="deg"),Number(t)*(Ei[n]||1)),s:Number(r[3]),l:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)})):null},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,a=e.a,o=void 0===a?1:a;return Ri(t)&&Ri(n)&&Ri(r)?Oi({r:Number(t),g:Number(n),b:Number(r),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,a=e.a,o=void 0===a?1:a;return Ri(t)&&Ri(n)&&Ri(r)?ji($i({h:Number(t),s:Number(n),l:Number(r),a:Number(o)})):null},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,a=e.a,o=void 0===a?1:a;return Ri(t)&&Ri(n)&&Ri(r)?Hi(function(e){return{h:Pi(e.h),s:zi(e.s,0,100),v:zi(e.v,0,100),a:zi(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)})):null},"hsv"]]},Zi=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},Ji=function(e,t){var n=Ui(e);return{h:n.h,s:zi(n.s+100*t,0,100),l:n.l,a:n.a}},Qi=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},es=function(e,t){var n=Ui(e);return{h:n.h,s:n.s,l:zi(n.l+100*t,0,100),a:n.a}},ts=function(){function e(e){this.parsed=function(e){return"string"==typeof e?Zi(e.trim(),Xi.string):"object"==typeof e&&null!==e?Zi(e,Xi.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return _i(Qi(this.rgba),2)},e.prototype.isDark=function(){return Qi(this.rgba)<.5},e.prototype.isLight=function(){return Qi(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Li(this.rgba)).r,n=e.g,r=e.b,o=(a=e.a)<1?Bi(_i(255*a)):"","#"+Bi(t)+Bi(n)+Bi(r)+o;var e,t,n,r,a,o},e.prototype.toRgb=function(){return Li(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Li(this.rgba)).r,n=e.g,r=e.b,(a=e.a)<1?"rgba("+t+", "+n+", "+r+", "+a+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,a},e.prototype.toHsl=function(){return qi(Ui(this.rgba))},e.prototype.toHslString=function(){return t=(e=qi(Ui(this.rgba))).h,n=e.s,r=e.l,(a=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+a+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,a},e.prototype.toHsv=function(){return e=Vi(this.rgba),{h:_i(e.h),s:_i(e.s),v:_i(e.v),a:_i(e.a,3)};var e},e.prototype.invert=function(){return ns({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),ns(Ji(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),ns(Ji(this.rgba,-e))},e.prototype.grayscale=function(){return ns(Ji(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),ns(es(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),ns(es(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?ns({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):_i(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Ui(this.rgba);return"number"==typeof e?ns({h:e,s:t.s,l:t.l,a:t.a}):_i(t.h)},e.prototype.isEqual=function(e){return this.toHex()===ns(e).toHex()},e}(),ns=function(e){return e instanceof ts?e:new ts(e)},rs=[];var as={"3d":/*#__PURE__*/j.createElement("path",{d:"M18 14.625V3.375L9 0 0 3.375v11.25L9 18l9-3.375zM9 2.136l5.918 2.22-5.98 2.242-5.919-2.22L9 2.137zM2 13.239V5.065l6.438 2.414v8.174L2 13.24zM9.438 15.7L16 13.239V5.018l-6.563 2.46V15.7z",transform:"translate(15 10)",fillRule:"evenodd"}),acrobat:/*#__PURE__*/j.createElement("path",{d:"M10.15 1.095C9.938.33 9.42-.051 8.984.005c-.528.068-1.09.382-1.314.876-.63 1.416.685 5.582.887 6.279-1.28 3.863-5.66 11.5-7.806 12.017-.045-.505.225-1.965 3.055-3.785.146-.157.315-.348.393-.472-2.392 1.168-5.492 3.044-3.628 4.448.102.079.259.146.439.213 1.426.528 3.425-1.201 5.435-5.121 2.213-.73 3.999-1.28 6.526-1.662 2.762 1.875 4.616 2.257 5.874 1.774.348-.135.898-.573 1.055-1.145-1.022 1.258-3.414.382-5.323-.82 1.763-.191 3.582-.303 4.369-.056 1 .314.965.808.954.876.079-.27.191-.708-.022-1.056-.842-1.37-4.706-.573-6.11-.427-2.212-1.336-3.74-3.717-4.358-5.436.573-2.212 1.19-3.818.742-5.413zm-.954 4.638C8.826 4.42 8.309 1.5 9.14.556c1.628.932.618 3.144.056 5.177zm3.044 6.514c-2.134.393-3.583.944-5.66 1.764.617-1.202 1.785-4.268 2.346-6.29.787 1.573 1.741 3.111 3.314 4.526z",transform:"translate(14 9)",fillRule:"evenodd"}),android:/*#__PURE__*/j.createElement("path",{d:"M17.6,9.48l1.84-3.18c0.16-0.31,0.04-0.69-0.26-0.85c-0.29-0.15-0.65-0.06-0.83,0.22l-1.88,3.24 c-2.86-1.21-6.08-1.21-8.94,0L5.65,5.67c-0.19-0.29-0.58-0.38-0.87-0.2C4.5,5.65,4.41,6.01,4.56,6.3L6.4,9.48 C3.3,11.25,1.28,14.44,1,18h22C22.72,14.44,20.7,11.25,17.6,9.48z M7,15.25c-0.69,0-1.25-0.56-1.25-1.25 c0-0.69,0.56-1.25,1.25-1.25S8.25,13.31,8.25,14C8.25,14.69,7.69,15.25,7,15.25z M17,15.25c-0.69,0-1.25-0.56-1.25-1.25 c0-0.69,0.56-1.25,1.25-1.25s1.25,0.56,1.25,1.25C18.25,14.69,17.69,15.25,17,15.25z",transform:"translate(12 8)"}),audio:/*#__PURE__*/j.createElement("path",{d:"M.25 4.75v4.5h3L7 13V1L3.25 4.75h-3zM10.375 7A3.375 3.375 0 0 0 8.5 3.977v6.037A3.355 3.355 0 0 0 10.375 7zM8.5.421v1.545A5.254 5.254 0 0 1 12.25 7a5.254 5.254 0 0 1-3.75 5.032v1.545A6.747 6.747 0 0 0 13.75 7 6.747 6.747 0 0 0 8.5.421z",transform:"translate(17 12)",fillRule:"evenodd"}),binary:/*#__PURE__*/j.createElement("path",{d:"M2.338 6.112c1.192 0 1.928-1.072 1.928-2.68 0-1.56-.576-2.504-1.8-2.504C1.274.928.538 2 .538 3.608c0 1.56.576 2.504 1.8 2.504zM1.61 3.408c0-1.008.24-1.568.776-1.568.376 0 .616.336.728.888l-1.504.776v-.096zM2.418 5.2c-.368 0-.608-.32-.72-.856l1.496-.768v.056c0 1.008-.24 1.568-.776 1.568zm7.03.8l.088-.944H8.36V.896L7.272.984v.592l-1.184.112.024.824h1.16v2.544h-1.32V6zm5.199 0l.088-.944h-1.176V.896L12.47.984v.592l-1.184.112.024.824h1.16v2.544h-1.32V6zM4.25 14l.088-.944H3.162v-4.16l-1.088.088v.592L.89 9.688l.024.824h1.16v2.544H.754V14zm5.198 0l.088-.944H8.36v-4.16l-1.088.088v.592l-1.184.112.024.824h1.16v2.544h-1.32V14zm3.287.112c1.192 0 1.928-1.072 1.928-2.68 0-1.56-.576-2.504-1.8-2.504-1.192 0-1.928 1.072-1.928 2.68 0 1.56.576 2.504 1.8 2.504zm-.728-2.704c0-1.008.24-1.568.776-1.568.376 0 .616.336.728.888l-1.504.776v-.096zm.808 1.792c-.368 0-.608-.32-.72-.856l1.496-.768v.056c0 1.008-.24 1.568-.776 1.568z",transform:"translate(16 11)",fillRule:"evenodd"}),code:/*#__PURE__*/j.createElement("path",{d:"M4.078 13.67c-1.875-.527-2.812-1.738-2.812-3.634V9.49C1.266 8.437.844 7.911 0 7.911V6.138c.844 0 1.266-.529 1.266-1.586v-.64c.015-.938.257-1.696.726-2.274C2.466 1.06 3.162.64 4.078.38l.492 1.375c-.656.25-.997.95-1.023 2.102v.695c0 1.167-.482 1.99-1.445 2.469.963.479 1.445 1.304 1.445 2.476v.688c.026 1.15.367 1.851 1.023 2.101l-.492 1.383zm7.844 0c1.875-.527 2.812-1.738 2.812-3.634V9.49c0-1.052.422-1.578 1.266-1.578V6.138c-.844 0-1.266-.529-1.266-1.586v-.64c-.015-.938-.257-1.696-.726-2.274-.474-.578-1.17-.998-2.086-1.258l-.492 1.375c.656.25.997.95 1.023 2.102v.695c0 1.167.482 1.99 1.445 2.469-.963.479-1.445 1.304-1.445 2.476v.688c-.026 1.15-.367 1.851-1.023 2.101l.492 1.383z",transform:"translate(16 13)",fillRule:"evenodd"}),code2:/*#__PURE__*/j.createElement("path",{d:"M7.4 10.6L2.8 6l4.6-4.6L6 0 0 6l6 6 1.4-1.4zm5.2 0L17.2 6l-4.6-4.6L14 0l6 6-6 6-1.4-1.4z",transform:"translate(14 14)",fillRule:"evenodd"}),compressed:/*#__PURE__*/j.createElement("path",{d:"M.25 0A.25.25 0 0 0 0 .25v1.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 2 1.75V.25A.25.25 0 0 0 1.75 0H.25zM1 17a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1H1zm0 4v3h2v-3H1zM2 2.25A.25.25 0 0 1 2.25 2h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5A.25.25 0 0 1 2 3.75v-1.5zM.25 4a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 2 5.75v-1.5A.25.25 0 0 0 1.75 4H.25zM2 6.25A.25.25 0 0 1 2.25 6h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5A.25.25 0 0 1 2 7.75v-1.5zM.25 8a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 2 9.75v-1.5A.25.25 0 0 0 1.75 8H.25zM2 10.25a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5zM.25 12a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25v-1.5a.25.25 0 0 0-.25-.25H.25zM2 14.25a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5z",transform:"translate(15 1)",fillRule:"evenodd"}),document:/*#__PURE__*/j.createElement("path",{d:"M12 4H0v2h12V4zM0 10h18V8H0v2zM0 0v2h18V0H0z",transform:"translate(15 15)",fillRule:"evenodd"}),drive:/*#__PURE__*/j.createElement("path",{d:"M2.199.289A.5.5 0 0 1 2.652 0h8.696a.5.5 0 0 1 .453.289l1.867 4a.5.5 0 0 1-.453.711H.785a.5.5 0 0 1-.453-.711l1.867-4zM13 6H1a.752.752 0 0 0-.75.75v4.5c0 .412.338.75.75.75h12c.412 0 .75-.338.75-.75v-4.5A.752.752 0 0 0 13 6zm-9.75 4.5c-.825 0-1.5-.675-1.5-1.5s.675-1.5 1.5-1.5 1.5.675 1.5 1.5-.675 1.5-1.5 1.5z",transform:"translate(17 13)",fillRule:"evenodd"}),font:/*#__PURE__*/j.createElement("path",{d:"M3.722 8.702l-.686 1.89c-.053.14-.094.28-.123.421-.03.135-.044.252-.044.352 0 .304.097.527.29.668.2.14.501.21.905.21h.414V13H.083v-.756h.343c.176 0 .325-.018.448-.053a.81.81 0 0 0 .334-.22c.1-.105.193-.249.281-.43.094-.182.197-.416.308-.704L5.787.15h1.406l4.07 11.136c.07.187.14.343.21.466.077.123.165.222.264.298.1.07.214.12.343.15.129.03.281.044.457.044h.237V13H7.826v-.756h.413c.72 0 1.081-.287 1.081-.862 0-.1-.014-.202-.044-.307a3.274 3.274 0 0 0-.105-.36l-.72-2.013H3.72zM7.009 4.65c-.188-.533-.36-1.031-.519-1.494a15.92 15.92 0 0 1-.378-1.354 7.12 7.12 0 0 1-.15.633 16.95 16.95 0 0 1-.395 1.283c-.082.229-.175.484-.28.765L4.063 7.796h4.061L7.009 4.65zm8.411 5.74c0 .562.117.984.351 1.265.24.275.61.413 1.108.413.363 0 .691-.059.984-.176.3-.117.551-.284.756-.5.211-.218.372-.481.483-.792.112-.31.168-.656.168-1.037V8.104l-1.152.053c-.51.023-.937.088-1.283.193-.34.1-.615.243-.826.43a1.546 1.546 0 0 0-.457.678c-.088.27-.132.58-.132.931zm2.18-6.32c-.346 0-.627.05-.844.15a1.182 1.182 0 0 0-.501.404 1.594 1.594 0 0 0-.237.624c-.041.24-.062.5-.062.782-.498 0-.879-.085-1.143-.255-.257-.17-.386-.463-.386-.879 0-.31.085-.574.255-.79.17-.218.401-.393.694-.528.299-.14.644-.243 1.037-.308a7.76 7.76 0 0 1 1.257-.097c.55 0 1.031.056 1.441.167.41.106.753.282 1.029.528.275.246.48.568.615.967.14.392.21.876.21 1.45v4.667c0 .252.021.46.062.624a.928.928 0 0 0 .194.395c.088.1.202.17.343.211.146.041.319.062.518.062h.053V13H19.7l-.281-1.547h-.15c-.187.252-.369.483-.544.694-.176.211-.37.393-.58.545-.211.152-.452.27-.721.352a3.053 3.053 0 0 1-.958.131c-.399 0-.77-.058-1.116-.175a2.369 2.369 0 0 1-.888-.519 2.516 2.516 0 0 1-.58-.896c-.14-.364-.211-.791-.211-1.284 0-.955.34-1.664 1.02-2.127.68-.462 1.707-.714 3.084-.755l1.495-.053V6.285a6.93 6.93 0 0 0-.053-.888 1.778 1.778 0 0 0-.229-.703 1.14 1.14 0 0 0-.51-.457c-.216-.111-.51-.167-.878-.167z",transform:"translate(13 12)",fillRule:"evenodd"}),image:/*#__PURE__*/j.createElement("path",{d:"M13 0L9.25 5l2.85 3.8-1.6 1.2C8.81 7.75 6 4 6 4l-6 8h22L13 0z",transform:"translate(13 14)",fillRule:"evenodd"}),presentation:/*#__PURE__*/j.createElement("path",{d:"M2 4H0v10c0 1.1.9 2 2 2h14v-2H2V4zm16-4H6C4.9 0 4 .9 4 2v8c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm0 10H6V2h12v8z",transform:"matrix(-1 0 0 1 34 12)",fillRule:"evenodd"}),settings:/*#__PURE__*/j.createElement("path",{d:"M13.572 8.735c.03-.24.053-.48.053-.735s-.023-.495-.053-.735l1.583-1.237a.378.378 0 0 0 .09-.48l-1.5-2.595a.377.377 0 0 0-.457-.165l-1.868.75a5.48 5.48 0 0 0-1.268-.735L9.868.815A.366.366 0 0 0 9.5.5h-3a.366.366 0 0 0-.367.315l-.285 1.988a5.762 5.762 0 0 0-1.268.735l-1.868-.75a.366.366 0 0 0-.457.165l-1.5 2.595a.37.37 0 0 0 .09.48l1.583 1.237c-.03.24-.053.488-.053.735 0 .248.022.495.053.735L.845 9.973a.378.378 0 0 0-.09.48l1.5 2.595c.09.165.292.225.458.165l1.867-.75c.39.3.81.547 1.268.735l.285 1.987c.022.18.18.315.367.315h3a.366.366 0 0 0 .367-.315l.285-1.988a5.762 5.762 0 0 0 1.268-.734l1.867.75c.173.067.368 0 .458-.165l1.5-2.595a.378.378 0 0 0-.09-.48l-1.582-1.238zM8 10.625A2.628 2.628 0 0 1 5.375 8 2.628 2.628 0 0 1 8 5.375 2.628 2.628 0 0 1 10.625 8 2.628 2.628 0 0 1 8 10.625z",transform:"translate(16 11)",fillRule:"evenodd"}),spreadsheet:/*#__PURE__*/j.createElement("path",{d:"M0 8h6V5H0v3zm0 5h6v-3H0v3zM0 3h6V0H0v3zm8 5h12V5H8v3zm0 5h12v-3H8v3zM8 0v3h12V0H8z",transform:"translate(14 14)",fillRule:"evenodd"}),vector:/*#__PURE__*/j.createElement("path",{d:"M14.5 2V1a1 1 0 0 0-1-1h-3a1 1 0 0 0-1 1v1H3.937a2 2 0 1 0 0 1h3.936A9 9 0 0 0 3 11v1h2v-1a7.003 7.003 0 0 1 4.594-6.576A1 1 0 0 0 10.5 5h3a1 1 0 0 0 .906-.576A7.003 7.003 0 0 1 19 11v1h2v-1a9 9 0 0 0-4.873-8h3.936a2 2 0 1 0 0-1H14.5zm-1-1h-3v3h3V1zM2 1.5a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm19 1a1 1 0 1 0 2 0 1 1 0 0 0-2 0z",transform:"translate(12 14)",fillRule:"evenodd"}),video:/*#__PURE__*/j.createElement("path",{d:"M10.75 3.875V1.25A.752.752 0 0 0 10 .5H1a.752.752 0 0 0-.75.75v7.5c0 .412.338.75.75.75h9c.412 0 .75-.338.75-.75V6.125l3 3V.875l-3 3z",transform:"translate(17 14)"})};!function(e){e.forEach(function(e){rs.indexOf(e)<0&&(e(ts,Xi),rs.push(e))})}([function(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var a in n)r[n[a]]=a;var o={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,i,s=r[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,d="black";if(!o.length)for(var u in n)o[u]=new e(n[u]).toRgb();for(var h in n){var p=(a=l,i=o[h],Math.pow(a.r-i.r,2)+Math.pow(a.g-i.g,2)+Math.pow(a.b-i.b,2));p<c&&(c=p,d=h)}return d}},t.string.push([function(t){var r=t.toLowerCase(),a="transparent"===r?"#0000":n[r];return a?new e(a).toRgb():null},"name"])}]);var os={color:Di.default.string,extension:Di.default.string,fold:Di.default.bool,foldColor:Di.default.string,glyphColor:Di.default.string,gradientColor:Di.default.string,gradientOpacity:Di.default.number,labelColor:Di.default.string,labelTextColor:Di.default.string,labelUppercase:Di.default.bool,radius:Di.default.number,type:Di.default.oneOf(["3d","acrobat","android","audio","binary","code","code2","compressed","document","drive","font","image","presentation","settings","spreadsheet","vector","video"])},is=40,ss=48,ls={WIDTH:is,HEIGHT:ss,X_OFFSET:0},cs=12,ds=j.useId||function(){var e=0;return function(){return e++}}(),us=function(e){var t=e.color,n=void 0===t?"whitesmoke":t,r=e.extension,a=e.fold,o=void 0===a||a,i=e.foldColor,s=e.glyphColor,l=e.gradientColor,c=void 0===l?"white":l,d=e.gradientOpacity,u=void 0===d?.25:d,h=e.labelColor,p=e.labelTextColor,m=void 0===p?"white":p,f=e.labelUppercase,g=void 0!==f&&f,v=e.radius,y=void 0===v?4:v,b=e.type,x=ds(),w="undefined"==typeof jest?x:"";/*#__PURE__*/
|
|
38
|
+
return pe(Bo,{...a,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"ContextMenuSubContent"));function si(e){return t=>"mouse"!==t.pointerType?e(t):void 0}Ho(si,"whenTouchOrPen");var li=Yo,ci=Ko,di=Xo,ui=Zo,hi=Jo,pi=Qo,mi=ei,fi=ti,gi=ni,vi=ri,yi=ai,bi=oi,xi=ii,wi=/* @__PURE__ */a(e=>{var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,f=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,v=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case c:case d:case a:case i:case o:case h:return e;default:switch(e=e&&e.$$typeof){case l:case u:case f:case m:case s:return e;default:return t}}case r:return t}}}function w(e){return x(e)===d}e.AsyncMode=c,e.ConcurrentMode=d,e.ContextConsumer=l,e.ContextProvider=s,e.Element=n,e.ForwardRef=u,e.Fragment=a,e.Lazy=f,e.Memo=m,e.Portal=r,e.Profiler=i,e.StrictMode=o,e.Suspense=h,e.isAsyncMode=function(e){return w(e)||x(e)===c},e.isConcurrentMode=w,e.isContextConsumer=function(e){return x(e)===l},e.isContextProvider=function(e){return x(e)===s},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},e.isForwardRef=function(e){return x(e)===u},e.isFragment=function(e){return x(e)===a},e.isLazy=function(e){return x(e)===f},e.isMemo=function(e){return x(e)===m},e.isPortal=function(e){return x(e)===r},e.isProfiler=function(e){return x(e)===i},e.isStrictMode=function(e){return x(e)===o},e.isSuspense=function(e){return x(e)===h},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===i||e===o||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===m||e.$$typeof===s||e.$$typeof===l||e.$$typeof===u||e.$$typeof===v||e.$$typeof===y||e.$$typeof===b||e.$$typeof===g)},e.typeOf=x}),Si=/* @__PURE__ */a(e=>{"production"!==process.env.NODE_ENV&&function(){var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,f=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,v=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case c:case d:case a:case i:case o:case h:return p;default:var g=p&&p.$$typeof;switch(g){case l:case u:case f:case m:case s:return g;default:return t}}case r:return t}}}var w=c,S=d,k=l,C=s,N=n,T=u,A=a,M=f,I=m,D=r,E=i,R=o,_=h,z=!1;function P(e){return x(e)===d}e.AsyncMode=w,e.ConcurrentMode=S,e.ContextConsumer=k,e.ContextProvider=C,e.Element=N,e.ForwardRef=T,e.Fragment=A,e.Lazy=M,e.Memo=I,e.Portal=D,e.Profiler=E,e.StrictMode=R,e.Suspense=_,e.isAsyncMode=function(e){return z||(z=!0),P(e)||x(e)===c},e.isConcurrentMode=P,e.isContextConsumer=function(e){return x(e)===l},e.isContextProvider=function(e){return x(e)===s},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},e.isForwardRef=function(e){return x(e)===u},e.isFragment=function(e){return x(e)===a},e.isLazy=function(e){return x(e)===f},e.isMemo=function(e){return x(e)===m},e.isPortal=function(e){return x(e)===r},e.isProfiler=function(e){return x(e)===i},e.isStrictMode=function(e){return x(e)===o},e.isSuspense=function(e){return x(e)===h},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===i||e===o||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===m||e.$$typeof===s||e.$$typeof===l||e.$$typeof===u||e.$$typeof===v||e.$$typeof===y||e.$$typeof===b||e.$$typeof===g)},e.typeOf=x}()}),ki=/* @__PURE__ */a((e,t)=>{"production"===process.env.NODE_ENV?t.exports=wi():t.exports=Si()}),Ci=/* @__PURE__ */a((e,t)=>{var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=/* @__PURE__ */new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(EE){return!1}}()?Object.assign:function(e,t){for(var o,i,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in o=Object(arguments[l]))r.call(o,c)&&(s[c]=o[c]);if(n){i=n(o);for(var d=0;d<i.length;d++)a.call(o,i[d])&&(s[i[d]]=o[i[d]])}}return s}}),Ni=/* @__PURE__ */a((e,t)=>{t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}),Ti=/* @__PURE__ */a((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)}),Ai=/* @__PURE__ */a((e,t)=>{var n=function(){};if("production"!==process.env.NODE_ENV){var r=Ni(),a={},o=Ti();n=function(e){var t="Warning: "+e;try{throw new Error(t)}catch(Gw){}}}function i(e,t,i,s,l){if("production"!==process.env.NODE_ENV)for(var c in e)if(o(e,c)){var d;try{if("function"!=typeof e[c]){var u=Error((s||"React class")+": "+i+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=e[c](t,c,s,i,null,r)}catch(p){d=p}if(!d||d instanceof Error||n((s||"React class")+": type specification of "+i+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in a)){a[d.message]=!0;var h=l?l():"";n("Failed "+i+" type: "+d.message+(null!=h?h:""))}}}i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(a={})},t.exports=i}),Mi=/* @__PURE__ */a((e,t)=>{var n=ki(),r=Ci(),a=Ni(),o=Ti(),i=Ai(),s=function(){};function l(){return null}"production"!==process.env.NODE_ENV&&(s=function(e){var t="Warning: "+e;try{throw new Error(t)}catch(Gw){}}),t.exports=function(e,t){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:m(l),arrayOf:function(e){return m(function(t,n,r,o,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s))return new p("Invalid "+o+" `"+i+"` of type `"+y(s)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<s.length;l++){var c=e(s,l,r,o,i+"["+l+"]",a);if(c instanceof Error)return c}return null})},element:m(function(t,n,r,a,o){var i=t[n];return e(i)?null:new p("Invalid "+a+" `"+o+"` of type `"+y(i)+"` supplied to `"+r+"`, expected a single ReactElement.")}),elementType:m(function(e,t,r,a,o){var i=e[t];return n.isValidElementType(i)?null:new p("Invalid "+a+" `"+o+"` of type `"+y(i)+"` supplied to `"+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return m(function(t,n,r,a,o){if(!(t[n]instanceof e)){var i=e.name||d;return new p("Invalid "+a+" `"+o+"` of type `"+((s=t[n]).constructor&&s.constructor.name?s.constructor.name:d)+"` supplied to `"+r+"`, expected instance of `"+i+"`.")}var s;return null})},node:m(function(e,t,n,r,a){return v(e[t])?null:new p("Invalid "+r+" `"+a+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return m(function(t,n,r,i,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[n],c=y(l);if("object"!==c)return new p("Invalid "+i+" `"+s+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var d in l)if(o(l,d)){var u=e(l,d,r,i,s+"."+d,a);if(u instanceof Error)return u}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&s(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),l;return m(function(t,n,r,a,o){for(var i=t[n],s=0;s<e.length;s++)if(h(i,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===b(t)?String(t):t});return new p("Invalid "+a+" `"+o+"` of value `"+String(i)+"` supplied to `"+r+"`, expected one of "+l+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&s("Invalid argument supplied to oneOfType, expected an instance of array."),l;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(n)+" at index "+t+"."),l}return m(function(t,n,r,i,s){for(var l=[],c=0;c<e.length;c++){var d=(0,e[c])(t,n,r,i,s,a);if(null==d)return null;d.data&&o(d.data,"expectedType")&&l.push(d.data.expectedType)}return new p("Invalid "+i+" `"+s+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return m(function(t,n,r,o,i){var s=t[n],l=y(s);if("object"!==l)return new p("Invalid "+o+" `"+i+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(r,o,i,c,b(d));var u=d(s,c,r,o,i+"."+c,a);if(u)return u}return null})},exact:function(e){return m(function(t,n,i,s,l){var c=t[n],d=y(c);if("object"!==d)return new p("Invalid "+s+" `"+l+"` of type `"+d+"` supplied to `"+i+"`, expected `object`.");for(var u in r({},t[n],e)){var h=e[u];if(o(e,u)&&"function"!=typeof h)return g(i,s,l,u,b(h));if(!h)return new p("Invalid "+s+" `"+l+"` key `"+u+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=h(c,u,i,s,l+"."+u,a);if(m)return m}return null})}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var n={},r=0;function o(o,i,l,c,u,h,m){if(c=c||d,h=h||l,m!==a){if(t){var f=/* @__PURE__ */new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+l;!n[g]&&r<3&&(s("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[g]=!0,r++)}}return null==i[l]?o?null===i[l]?new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(i,l,c,u,h)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function f(e){return m(function(t,n,r,a,o,i){var s=t[n];return y(s)!==e?new p("Invalid "+a+" `"+o+"` of type `"+b(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function g(e,t,n,r,a){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function v(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(v);if(null===t||e(t))return!0;var n=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!n)return!1;var r,a=n.call(t);if(n!==t.entries){for(;!(r=a.next()).done;)if(!v(r.value))return!1}else for(;!(r=a.next()).done;){var o=r.value;if(o&&!v(o[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function b(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=b(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,u.checkPropTypes=i,u.resetWarningCache=i.resetWarningCache,u.PropTypes=u,u}}),Ii=/* @__PURE__ */a((e,t)=>{var n=Ni();function r(){}function a(){}a.resetWarningCache=r,t.exports=function(){function e(e,t,r,a,o,i){if(i!==n){var s=/* @__PURE__ */new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return o.PropTypes=o,o}}),Di=/* @__PURE__ */n(/* @__PURE__ */a((e,t)=>{if("production"!==process.env.NODE_ENV){var n=ki();t.exports=Mi()(n.isElement,!0)}else t.exports=Ii()()})()),Ei={grad:.9,turn:360,rad:360/(2*Math.PI)},Ri=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},_i=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},zi=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Pi=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Oi=function(e){return{r:zi(e.r,0,255),g:zi(e.g,0,255),b:zi(e.b,0,255),a:zi(e.a)}},Li=function(e){return{r:_i(e.r),g:_i(e.g),b:_i(e.b),a:_i(e.a,3)}},Fi=/^#([0-9a-f]{3,8})$/i,Bi=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Vi=function(e){var t=e.r,n=e.g,r=e.b,a=e.a,o=Math.max(t,n,r),i=o-Math.min(t,n,r),s=i?o===t?(n-r)/i:o===n?2+(r-t)/i:4+(t-n)/i:0;return{h:60*(s<0?s+6:s),s:o?i/o*100:0,v:o/255*100,a:a}},Hi=function(e){var t=e.h,n=e.s,r=e.v,a=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),i=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:255*[r,s,i,i,l,r][c],g:255*[l,r,r,s,i,i][c],b:255*[i,i,l,r,r,s][c],a:a}},$i=function(e){return{h:Pi(e.h),s:zi(e.s,0,100),l:zi(e.l,0,100),a:zi(e.a)}},qi=function(e){return{h:_i(e.h),s:_i(e.s),l:_i(e.l),a:_i(e.a,3)}},ji=function(e){return Hi((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},Ui=function(e){return{h:(t=Vi(e)).h,s:(a=(200-(n=t.s))*(r=t.v)/100)>0&&a<200?n*r/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,n,r,a},Gi=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Wi=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yi=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ki=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xi={string:[[function(e){var t=Fi.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?_i(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?_i(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Yi.exec(e)||Ki.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Oi({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t,n,r=Gi.exec(e)||Wi.exec(e);return r?ji($i({h:(t=r[1],n=r[2],void 0===n&&(n="deg"),Number(t)*(Ei[n]||1)),s:Number(r[3]),l:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)})):null},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,a=e.a,o=void 0===a?1:a;return Ri(t)&&Ri(n)&&Ri(r)?Oi({r:Number(t),g:Number(n),b:Number(r),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,a=e.a,o=void 0===a?1:a;return Ri(t)&&Ri(n)&&Ri(r)?ji($i({h:Number(t),s:Number(n),l:Number(r),a:Number(o)})):null},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,a=e.a,o=void 0===a?1:a;return Ri(t)&&Ri(n)&&Ri(r)?Hi(function(e){return{h:Pi(e.h),s:zi(e.s,0,100),v:zi(e.v,0,100),a:zi(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)})):null},"hsv"]]},Zi=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},Ji=function(e,t){var n=Ui(e);return{h:n.h,s:zi(n.s+100*t,0,100),l:n.l,a:n.a}},Qi=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},es=function(e,t){var n=Ui(e);return{h:n.h,s:n.s,l:zi(n.l+100*t,0,100),a:n.a}},ts=function(){function e(e){this.parsed=function(e){return"string"==typeof e?Zi(e.trim(),Xi.string):"object"==typeof e&&null!==e?Zi(e,Xi.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return _i(Qi(this.rgba),2)},e.prototype.isDark=function(){return Qi(this.rgba)<.5},e.prototype.isLight=function(){return Qi(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Li(this.rgba)).r,n=e.g,r=e.b,o=(a=e.a)<1?Bi(_i(255*a)):"","#"+Bi(t)+Bi(n)+Bi(r)+o;var e,t,n,r,a,o},e.prototype.toRgb=function(){return Li(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Li(this.rgba)).r,n=e.g,r=e.b,(a=e.a)<1?"rgba("+t+", "+n+", "+r+", "+a+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,a},e.prototype.toHsl=function(){return qi(Ui(this.rgba))},e.prototype.toHslString=function(){return t=(e=qi(Ui(this.rgba))).h,n=e.s,r=e.l,(a=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+a+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,a},e.prototype.toHsv=function(){return e=Vi(this.rgba),{h:_i(e.h),s:_i(e.s),v:_i(e.v),a:_i(e.a,3)};var e},e.prototype.invert=function(){return ns({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),ns(Ji(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),ns(Ji(this.rgba,-e))},e.prototype.grayscale=function(){return ns(Ji(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),ns(es(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),ns(es(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?ns({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):_i(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Ui(this.rgba);return"number"==typeof e?ns({h:e,s:t.s,l:t.l,a:t.a}):_i(t.h)},e.prototype.isEqual=function(e){return this.toHex()===ns(e).toHex()},e}(),ns=function(e){return e instanceof ts?e:new ts(e)},rs=[];var as={"3d":/*#__PURE__*/j.createElement("path",{d:"M18 14.625V3.375L9 0 0 3.375v11.25L9 18l9-3.375zM9 2.136l5.918 2.22-5.98 2.242-5.919-2.22L9 2.137zM2 13.239V5.065l6.438 2.414v8.174L2 13.24zM9.438 15.7L16 13.239V5.018l-6.563 2.46V15.7z",transform:"translate(15 10)",fillRule:"evenodd"}),acrobat:/*#__PURE__*/j.createElement("path",{d:"M10.15 1.095C9.938.33 9.42-.051 8.984.005c-.528.068-1.09.382-1.314.876-.63 1.416.685 5.582.887 6.279-1.28 3.863-5.66 11.5-7.806 12.017-.045-.505.225-1.965 3.055-3.785.146-.157.315-.348.393-.472-2.392 1.168-5.492 3.044-3.628 4.448.102.079.259.146.439.213 1.426.528 3.425-1.201 5.435-5.121 2.213-.73 3.999-1.28 6.526-1.662 2.762 1.875 4.616 2.257 5.874 1.774.348-.135.898-.573 1.055-1.145-1.022 1.258-3.414.382-5.323-.82 1.763-.191 3.582-.303 4.369-.056 1 .314.965.808.954.876.079-.27.191-.708-.022-1.056-.842-1.37-4.706-.573-6.11-.427-2.212-1.336-3.74-3.717-4.358-5.436.573-2.212 1.19-3.818.742-5.413zm-.954 4.638C8.826 4.42 8.309 1.5 9.14.556c1.628.932.618 3.144.056 5.177zm3.044 6.514c-2.134.393-3.583.944-5.66 1.764.617-1.202 1.785-4.268 2.346-6.29.787 1.573 1.741 3.111 3.314 4.526z",transform:"translate(14 9)",fillRule:"evenodd"}),android:/*#__PURE__*/j.createElement("path",{d:"M17.6,9.48l1.84-3.18c0.16-0.31,0.04-0.69-0.26-0.85c-0.29-0.15-0.65-0.06-0.83,0.22l-1.88,3.24 c-2.86-1.21-6.08-1.21-8.94,0L5.65,5.67c-0.19-0.29-0.58-0.38-0.87-0.2C4.5,5.65,4.41,6.01,4.56,6.3L6.4,9.48 C3.3,11.25,1.28,14.44,1,18h22C22.72,14.44,20.7,11.25,17.6,9.48z M7,15.25c-0.69,0-1.25-0.56-1.25-1.25 c0-0.69,0.56-1.25,1.25-1.25S8.25,13.31,8.25,14C8.25,14.69,7.69,15.25,7,15.25z M17,15.25c-0.69,0-1.25-0.56-1.25-1.25 c0-0.69,0.56-1.25,1.25-1.25s1.25,0.56,1.25,1.25C18.25,14.69,17.69,15.25,17,15.25z",transform:"translate(12 8)"}),audio:/*#__PURE__*/j.createElement("path",{d:"M.25 4.75v4.5h3L7 13V1L3.25 4.75h-3zM10.375 7A3.375 3.375 0 0 0 8.5 3.977v6.037A3.355 3.355 0 0 0 10.375 7zM8.5.421v1.545A5.254 5.254 0 0 1 12.25 7a5.254 5.254 0 0 1-3.75 5.032v1.545A6.747 6.747 0 0 0 13.75 7 6.747 6.747 0 0 0 8.5.421z",transform:"translate(17 12)",fillRule:"evenodd"}),binary:/*#__PURE__*/j.createElement("path",{d:"M2.338 6.112c1.192 0 1.928-1.072 1.928-2.68 0-1.56-.576-2.504-1.8-2.504C1.274.928.538 2 .538 3.608c0 1.56.576 2.504 1.8 2.504zM1.61 3.408c0-1.008.24-1.568.776-1.568.376 0 .616.336.728.888l-1.504.776v-.096zM2.418 5.2c-.368 0-.608-.32-.72-.856l1.496-.768v.056c0 1.008-.24 1.568-.776 1.568zm7.03.8l.088-.944H8.36V.896L7.272.984v.592l-1.184.112.024.824h1.16v2.544h-1.32V6zm5.199 0l.088-.944h-1.176V.896L12.47.984v.592l-1.184.112.024.824h1.16v2.544h-1.32V6zM4.25 14l.088-.944H3.162v-4.16l-1.088.088v.592L.89 9.688l.024.824h1.16v2.544H.754V14zm5.198 0l.088-.944H8.36v-4.16l-1.088.088v.592l-1.184.112.024.824h1.16v2.544h-1.32V14zm3.287.112c1.192 0 1.928-1.072 1.928-2.68 0-1.56-.576-2.504-1.8-2.504-1.192 0-1.928 1.072-1.928 2.68 0 1.56.576 2.504 1.8 2.504zm-.728-2.704c0-1.008.24-1.568.776-1.568.376 0 .616.336.728.888l-1.504.776v-.096zm.808 1.792c-.368 0-.608-.32-.72-.856l1.496-.768v.056c0 1.008-.24 1.568-.776 1.568z",transform:"translate(16 11)",fillRule:"evenodd"}),code:/*#__PURE__*/j.createElement("path",{d:"M4.078 13.67c-1.875-.527-2.812-1.738-2.812-3.634V9.49C1.266 8.437.844 7.911 0 7.911V6.138c.844 0 1.266-.529 1.266-1.586v-.64c.015-.938.257-1.696.726-2.274C2.466 1.06 3.162.64 4.078.38l.492 1.375c-.656.25-.997.95-1.023 2.102v.695c0 1.167-.482 1.99-1.445 2.469.963.479 1.445 1.304 1.445 2.476v.688c.026 1.15.367 1.851 1.023 2.101l-.492 1.383zm7.844 0c1.875-.527 2.812-1.738 2.812-3.634V9.49c0-1.052.422-1.578 1.266-1.578V6.138c-.844 0-1.266-.529-1.266-1.586v-.64c-.015-.938-.257-1.696-.726-2.274-.474-.578-1.17-.998-2.086-1.258l-.492 1.375c.656.25.997.95 1.023 2.102v.695c0 1.167.482 1.99 1.445 2.469-.963.479-1.445 1.304-1.445 2.476v.688c-.026 1.15-.367 1.851-1.023 2.101l.492 1.383z",transform:"translate(16 13)",fillRule:"evenodd"}),code2:/*#__PURE__*/j.createElement("path",{d:"M7.4 10.6L2.8 6l4.6-4.6L6 0 0 6l6 6 1.4-1.4zm5.2 0L17.2 6l-4.6-4.6L14 0l6 6-6 6-1.4-1.4z",transform:"translate(14 14)",fillRule:"evenodd"}),compressed:/*#__PURE__*/j.createElement("path",{d:"M.25 0A.25.25 0 0 0 0 .25v1.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 2 1.75V.25A.25.25 0 0 0 1.75 0H.25zM1 17a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1H1zm0 4v3h2v-3H1zM2 2.25A.25.25 0 0 1 2.25 2h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5A.25.25 0 0 1 2 3.75v-1.5zM.25 4a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 2 5.75v-1.5A.25.25 0 0 0 1.75 4H.25zM2 6.25A.25.25 0 0 1 2.25 6h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5A.25.25 0 0 1 2 7.75v-1.5zM.25 8a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 2 9.75v-1.5A.25.25 0 0 0 1.75 8H.25zM2 10.25a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5zM.25 12a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25v-1.5a.25.25 0 0 0-.25-.25H.25zM2 14.25a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5z",transform:"translate(15 1)",fillRule:"evenodd"}),document:/*#__PURE__*/j.createElement("path",{d:"M12 4H0v2h12V4zM0 10h18V8H0v2zM0 0v2h18V0H0z",transform:"translate(15 15)",fillRule:"evenodd"}),drive:/*#__PURE__*/j.createElement("path",{d:"M2.199.289A.5.5 0 0 1 2.652 0h8.696a.5.5 0 0 1 .453.289l1.867 4a.5.5 0 0 1-.453.711H.785a.5.5 0 0 1-.453-.711l1.867-4zM13 6H1a.752.752 0 0 0-.75.75v4.5c0 .412.338.75.75.75h12c.412 0 .75-.338.75-.75v-4.5A.752.752 0 0 0 13 6zm-9.75 4.5c-.825 0-1.5-.675-1.5-1.5s.675-1.5 1.5-1.5 1.5.675 1.5 1.5-.675 1.5-1.5 1.5z",transform:"translate(17 13)",fillRule:"evenodd"}),font:/*#__PURE__*/j.createElement("path",{d:"M3.722 8.702l-.686 1.89c-.053.14-.094.28-.123.421-.03.135-.044.252-.044.352 0 .304.097.527.29.668.2.14.501.21.905.21h.414V13H.083v-.756h.343c.176 0 .325-.018.448-.053a.81.81 0 0 0 .334-.22c.1-.105.193-.249.281-.43.094-.182.197-.416.308-.704L5.787.15h1.406l4.07 11.136c.07.187.14.343.21.466.077.123.165.222.264.298.1.07.214.12.343.15.129.03.281.044.457.044h.237V13H7.826v-.756h.413c.72 0 1.081-.287 1.081-.862 0-.1-.014-.202-.044-.307a3.274 3.274 0 0 0-.105-.36l-.72-2.013H3.72zM7.009 4.65c-.188-.533-.36-1.031-.519-1.494a15.92 15.92 0 0 1-.378-1.354 7.12 7.12 0 0 1-.15.633 16.95 16.95 0 0 1-.395 1.283c-.082.229-.175.484-.28.765L4.063 7.796h4.061L7.009 4.65zm8.411 5.74c0 .562.117.984.351 1.265.24.275.61.413 1.108.413.363 0 .691-.059.984-.176.3-.117.551-.284.756-.5.211-.218.372-.481.483-.792.112-.31.168-.656.168-1.037V8.104l-1.152.053c-.51.023-.937.088-1.283.193-.34.1-.615.243-.826.43a1.546 1.546 0 0 0-.457.678c-.088.27-.132.58-.132.931zm2.18-6.32c-.346 0-.627.05-.844.15a1.182 1.182 0 0 0-.501.404 1.594 1.594 0 0 0-.237.624c-.041.24-.062.5-.062.782-.498 0-.879-.085-1.143-.255-.257-.17-.386-.463-.386-.879 0-.31.085-.574.255-.79.17-.218.401-.393.694-.528.299-.14.644-.243 1.037-.308a7.76 7.76 0 0 1 1.257-.097c.55 0 1.031.056 1.441.167.41.106.753.282 1.029.528.275.246.48.568.615.967.14.392.21.876.21 1.45v4.667c0 .252.021.46.062.624a.928.928 0 0 0 .194.395c.088.1.202.17.343.211.146.041.319.062.518.062h.053V13H19.7l-.281-1.547h-.15c-.187.252-.369.483-.544.694-.176.211-.37.393-.58.545-.211.152-.452.27-.721.352a3.053 3.053 0 0 1-.958.131c-.399 0-.77-.058-1.116-.175a2.369 2.369 0 0 1-.888-.519 2.516 2.516 0 0 1-.58-.896c-.14-.364-.211-.791-.211-1.284 0-.955.34-1.664 1.02-2.127.68-.462 1.707-.714 3.084-.755l1.495-.053V6.285a6.93 6.93 0 0 0-.053-.888 1.778 1.778 0 0 0-.229-.703 1.14 1.14 0 0 0-.51-.457c-.216-.111-.51-.167-.878-.167z",transform:"translate(13 12)",fillRule:"evenodd"}),image:/*#__PURE__*/j.createElement("path",{d:"M13 0L9.25 5l2.85 3.8-1.6 1.2C8.81 7.75 6 4 6 4l-6 8h22L13 0z",transform:"translate(13 14)",fillRule:"evenodd"}),presentation:/*#__PURE__*/j.createElement("path",{d:"M2 4H0v10c0 1.1.9 2 2 2h14v-2H2V4zm16-4H6C4.9 0 4 .9 4 2v8c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm0 10H6V2h12v8z",transform:"matrix(-1 0 0 1 34 12)",fillRule:"evenodd"}),settings:/*#__PURE__*/j.createElement("path",{d:"M13.572 8.735c.03-.24.053-.48.053-.735s-.023-.495-.053-.735l1.583-1.237a.378.378 0 0 0 .09-.48l-1.5-2.595a.377.377 0 0 0-.457-.165l-1.868.75a5.48 5.48 0 0 0-1.268-.735L9.868.815A.366.366 0 0 0 9.5.5h-3a.366.366 0 0 0-.367.315l-.285 1.988a5.762 5.762 0 0 0-1.268.735l-1.868-.75a.366.366 0 0 0-.457.165l-1.5 2.595a.37.37 0 0 0 .09.48l1.583 1.237c-.03.24-.053.488-.053.735 0 .248.022.495.053.735L.845 9.973a.378.378 0 0 0-.09.48l1.5 2.595c.09.165.292.225.458.165l1.867-.75c.39.3.81.547 1.268.735l.285 1.987c.022.18.18.315.367.315h3a.366.366 0 0 0 .367-.315l.285-1.988a5.762 5.762 0 0 0 1.268-.734l1.867.75c.173.067.368 0 .458-.165l1.5-2.595a.378.378 0 0 0-.09-.48l-1.582-1.238zM8 10.625A2.628 2.628 0 0 1 5.375 8 2.628 2.628 0 0 1 8 5.375 2.628 2.628 0 0 1 10.625 8 2.628 2.628 0 0 1 8 10.625z",transform:"translate(16 11)",fillRule:"evenodd"}),spreadsheet:/*#__PURE__*/j.createElement("path",{d:"M0 8h6V5H0v3zm0 5h6v-3H0v3zM0 3h6V0H0v3zm8 5h12V5H8v3zm0 5h12v-3H8v3zM8 0v3h12V0H8z",transform:"translate(14 14)",fillRule:"evenodd"}),vector:/*#__PURE__*/j.createElement("path",{d:"M14.5 2V1a1 1 0 0 0-1-1h-3a1 1 0 0 0-1 1v1H3.937a2 2 0 1 0 0 1h3.936A9 9 0 0 0 3 11v1h2v-1a7.003 7.003 0 0 1 4.594-6.576A1 1 0 0 0 10.5 5h3a1 1 0 0 0 .906-.576A7.003 7.003 0 0 1 19 11v1h2v-1a9 9 0 0 0-4.873-8h3.936a2 2 0 1 0 0-1H14.5zm-1-1h-3v3h3V1zM2 1.5a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm19 1a1 1 0 1 0 2 0 1 1 0 0 0-2 0z",transform:"translate(12 14)",fillRule:"evenodd"}),video:/*#__PURE__*/j.createElement("path",{d:"M10.75 3.875V1.25A.752.752 0 0 0 10 .5H1a.752.752 0 0 0-.75.75v7.5c0 .412.338.75.75.75h9c.412 0 .75-.338.75-.75V6.125l3 3V.875l-3 3z",transform:"translate(17 14)"})};!function(e){e.forEach(function(e){rs.indexOf(e)<0&&(e(ts,Xi),rs.push(e))})}([function(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var a in n)r[n[a]]=a;var o={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,i,s=r[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,d="black";if(!o.length)for(var u in n)o[u]=new e(n[u]).toRgb();for(var h in n){var p=(a=l,i=o[h],Math.pow(a.r-i.r,2)+Math.pow(a.g-i.g,2)+Math.pow(a.b-i.b,2));p<c&&(c=p,d=h)}return d}},t.string.push([function(t){var r=t.toLowerCase(),a="transparent"===r?"#0000":n[r];return a?new e(a).toRgb():null},"name"])}]);var os={color:Di.default.string,extension:Di.default.string,fold:Di.default.bool,foldColor:Di.default.string,glyphColor:Di.default.string,gradientColor:Di.default.string,gradientOpacity:Di.default.number,labelColor:Di.default.string,labelTextColor:Di.default.string,labelUppercase:Di.default.bool,radius:Di.default.number,type:Di.default.oneOf(["3d","acrobat","android","audio","binary","code","code2","compressed","document","drive","font","image","presentation","settings","spreadsheet","vector","video"])},is=40,ss=48,ls={WIDTH:is,HEIGHT:ss,X_OFFSET:0},cs=12,ds=j.useId||function(){var e=0;return function(){return e++}}(),us=function(e){var t=e.color,n=void 0===t?"whitesmoke":t,r=e.extension,a=e.fold,o=void 0===a||a,i=e.foldColor,s=e.glyphColor,l=e.gradientColor,c=void 0===l?"white":l,d=e.gradientOpacity,u=void 0===d?.25:d,h=e.labelColor,p=e.labelTextColor,m=void 0===p?"white":p,f=e.labelUppercase,g=void 0!==f&&f,v=e.radius,y=void 0===v?4:v,b=e.type,x=ds(),w="undefined"==typeof jest?x:"";/*#__PURE__*/
|
|
39
39
|
return j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 "+is+" "+ss,width:"100%",style:{maxWidth:"100%"}},/*#__PURE__*/j.createElement("defs",null,/*#__PURE__*/j.createElement("clipPath",{id:"pageRadius"+w},/*#__PURE__*/j.createElement("rect",{x:ls.X_OFFSET,y:"0",rx:y,ry:y,width:ls.WIDTH,height:ls.HEIGHT})),/*#__PURE__*/j.createElement("clipPath",{id:"foldCrop"+w},/*#__PURE__*/j.createElement("rect",{width:ls.WIDTH,height:cs,transform:"rotate(-45 0 "+cs+")"})),/*#__PURE__*/j.createElement("linearGradient",{x1:"100%",y1:"0%",y2:"100%",id:"pageGradient"+w},/*#__PURE__*/j.createElement("stop",{stopColor:c,stopOpacity:u,offset:"0%"}),/*#__PURE__*/j.createElement("stop",{stopColor:c,stopOpacity:"0",offset:"66.67%"}))),/*#__PURE__*/j.createElement("g",{id:"file",clipPath:"url(#pageRadius"+w+")"},o?/*#__PURE__*/j.createElement(j.Fragment,null,/*#__PURE__*/j.createElement("path",{d:"M"+ls.X_OFFSET+" 0 h "+(ls.WIDTH-cs)+" L "+(ls.WIDTH+ls.X_OFFSET)+" "+cs+" v "+(ls.HEIGHT-cs)+" H "+ls.X_OFFSET+" Z",fill:n}),/*#__PURE__*/j.createElement("path",{d:"M"+ls.X_OFFSET+" 0 h "+(ls.WIDTH-cs)+" L "+(ls.WIDTH+ls.X_OFFSET)+" "+cs+" v "+(ls.HEIGHT-cs)+" H "+ls.X_OFFSET+" Z",fill:"url(#pageGradient"+w+")"})):/*#__PURE__*/j.createElement(j.Fragment,null,/*#__PURE__*/j.createElement("rect",{x:ls.X_OFFSET,y:"0",width:ls.WIDTH,height:ls.HEIGHT,fill:n}),/*#__PURE__*/j.createElement("rect",{x:ls.X_OFFSET,y:"0",width:ls.WIDTH,height:ls.HEIGHT,fill:"url(#pageGradient"+w+")"}))),o&&/*#__PURE__*/j.createElement("g",{transform:"translate(28 "+cs+") rotate(-90)"},/*#__PURE__*/j.createElement("rect",{width:ls.WIDTH,height:ls.HEIGHT,fill:i||ns(n).darken(.1).toHex(),rx:y,ry:y,clipPath:"url(#foldCrop"+w+")"})),r&&/*#__PURE__*/j.createElement(j.Fragment,null,/*#__PURE__*/j.createElement("g",{id:"label"+w},/*#__PURE__*/j.createElement("rect",{fill:h||ns(n).darken(.3).toHex(),x:ls.X_OFFSET,y:ls.HEIGHT-14,width:ls.WIDTH,height:14,clipPath:"url(#pageRadius"+w+")"})),/*#__PURE__*/j.createElement("g",{id:"labelText"+w,transform:"translate("+ls.X_OFFSET+" 34)"},/*#__PURE__*/j.createElement("text",{x:ls.WIDTH/2,y:"10",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"9",fill:m,textAnchor:"middle",style:{fontWeight:"bold",textAlign:"center",pointerEvents:"none",textTransform:g?"uppercase":"none",userSelect:"none"}},r))),b&&/*#__PURE__*/j.createElement("g",{transform:"translate(-4 "+(r?0:6)+")",fill:s||ns(n).darken(.15).toHex()},as[b]))};us.propTypes=os;var hs={"3dm":{labelColor:"#8D1A11",type:"3d"},"3ds":{labelColor:"#5FB9AD",type:"3d"},"3g2":{type:"video"},"3gp":{type:"video"},"7zip":{type:"compressed"},aab:{type:"android",labelColor:"#3DDC84"},aac:{type:"audio"},aep:{type:"video"},ai:{color:"#423325",gradientOpacity:0,labelColor:"#423325",labelTextColor:"#FF7F18",labelUppercase:!0,foldColor:"#FF7F18",radius:2},aif:{type:"audio"},aiff:{type:"audio"},apk:{type:"android",labelColor:"#3DDC84"},apkm:{type:"android",labelColor:"#3DDC84"},apks:{type:"android",labelColor:"#3DDC84"},asf:{type:"video"},asp:{type:"code"},aspx:{type:"code"},avi:{type:"video"},bin:{type:"binary"},bmp:{type:"image"},c:{type:"code"},cpp:{type:"code"},cs:{type:"code"},css:{type:"code"},csv:{type:"spreadsheet"},cue:{type:"document"},dll:{type:"settings"},dmg:{type:"drive"},doc:{color:"#2C5898",foldColor:"#254A80",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#2C5898",labelUppercase:!0,type:"document"},docx:{color:"#2C5898",foldColor:"#254A80",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#2C5898",labelUppercase:!0,type:"document"},dwg:{type:"vector"},dxf:{type:"vector"},eot:{type:"font"},eps:{type:"vector"},exe:{type:"settings"},flac:{type:"audio"},flv:{type:"video"},fnt:{type:"font"},fodp:{type:"presentation"},fods:{type:"spreadsheet"},fodt:{type:"document"},fon:{type:"font"},gif:{type:"image"},gz:{type:"compressed"},heic:{type:"image"},htm:{type:"code"},html:{type:"code"},indd:{color:"#4B2B36",gradientOpacity:0,labelColor:"#4B2B36",labelTextColor:"#FF408C",labelUppercase:!0,foldColor:"#FF408C",radius:2},ini:{type:"settings"},java:{type:"code"},jpeg:{type:"image"},jpg:{type:"image"},js:{labelColor:"#F7DF1E",type:"code"},json:{type:"code"},jsx:{labelColor:"#00D8FF",type:"code"},m4a:{type:"audio"},m4v:{type:"video"},max:{labelColor:"#5FB9AD",type:"3d"},md:{type:"document"},mid:{type:"audio"},mkv:{type:"video"},mov:{type:"video"},mp3:{type:"audio"},mp4:{type:"video"},mpeg:{type:"video"},mpg:{type:"video"},obj:{type:"3d"},odp:{type:"presentation"},ods:{type:"spreadsheet"},odt:{type:"document"},ogg:{type:"audio"},ogv:{type:"video"},otf:{type:"font"},pdf:{labelColor:"#D93831",type:"acrobat"},php:{labelColor:"#8892BE",type:"code"},pkg:{type:"3d"},plist:{type:"settings"},png:{type:"image"},ppt:{color:"#D14423",foldColor:"#AB381D",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#D14423",labelUppercase:!0,type:"presentation"},pptx:{color:"#D14423",foldColor:"#AB381D",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#D14423",labelUppercase:!0,type:"presentation"},pr:{type:"video"},ps:{type:"vector"},psd:{color:"#34364E",gradientOpacity:0,labelColor:"#34364E",labelTextColor:"#31C5F0",labelUppercase:!0,foldColor:"#31C5F0",radius:2},py:{labelColor:"#FFDE57",type:"code"},rar:{type:"compressed"},rb:{labelColor:"#BB271A",type:"code"},rm:{type:"video"},rtf:{type:"document"},scss:{labelColor:"#C16A98",type:"code"},sitx:{type:"compressed"},skp:{type:"3d"},svg:{type:"vector"},swf:{type:"video"},sys:{type:"settings"},tar:{type:"compressed"},tex:{type:"document"},tif:{type:"image"},tiff:{type:"image"},ts:{labelColor:"#3478C7",type:"code"},ttf:{type:"font"},txt:{type:"document"},wav:{type:"audio"},webm:{type:"video"},wmv:{type:"video"},woff:{type:"font"},wpd:{type:"document"},wps:{type:"document"},xapk:{type:"android",labelColor:"#3DDC84"},xlr:{type:"spreadsheet"},xls:{color:"#1A754C",foldColor:"#16613F",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#1A754C",labelUppercase:!0,type:"spreadsheet"},xlsx:{color:"#1A754C",foldColor:"#16613F",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#1A754C",labelUppercase:!0,type:"spreadsheet"},yml:{type:"code"},zip:{type:"compressed"},zipx:{type:"compressed"}},ps=Object.defineProperty,ms=(e,t)=>ps(e,"name",{value:t,configurable:!0}),fs="Radio",[gs,vs]=p(fs),[ys,bs]=gs(fs);function xs(e){const{__scopeRadio:t,checked:n=!1,children:r,disabled:a,form:o,name:i,onCheck:s,required:l,value:c="on",internal_do_not_use_render:d}=e,[u,h]=q.useState(null),[p,m]=q.useState(null),f=q.useRef(!1),[g,v]=q.useReducer(e=>e+1,0),y={checked:n,disabled:a,required:l,name:i,form:o,value:c,control:u,setControl:h,hasConsumerStoppedPropagationRef:f,userInteractionCount:g,onUserInteraction:v,isFormControl:!u||(!!o||!!u.closest("form")),bubbleInput:p,setBubbleInput:m,onCheck:/* @__PURE__ */ms(()=>s?.(),"onCheck")};/* @__PURE__ */
|
|
40
40
|
return pe(ys,{scope:t,...y,children:Cs(d)?d(y):r})}ms(xs,"RadioProvider");var ws=/* @__PURE__ */q.forwardRef(/* @__PURE__ */ms(function({__scopeRadio:e,onClick:t,...n},r){const{checked:a,disabled:o,value:i,setControl:s,onCheck:l,hasConsumerStoppedPropagationRef:c,onUserInteraction:d,isFormControl:u,bubbleInput:h}=bs("RadioTrigger",e),p=w(r,s);/* @__PURE__ */
|
|
41
41
|
return pe(v.button,{type:"button",role:"radio","aria-checked":a,"data-state":Ns(a),"data-disabled":o?"":void 0,disabled:o,value:i,...n,ref:p,onClick:I(t,e=>{a||(d(),l()),h&&u&&(c.current=e.isPropagationStopped(),c.current||e.stopPropagation())})})},"RadioTrigger")),Ss=/* @__PURE__ */q.forwardRef(/* @__PURE__ */ms(function(e,t){const{__scopeRadio:n,forceMount:r,...a}=e,o=bs("RadioIndicator",n);/* @__PURE__ */
|
|
@@ -155,7 +155,7 @@ return pe(Rt.Portal,{children:/* @__PURE__ */pe(Rt.Content,{collisionPadding:8,"
|
|
|
155
155
|
return pe(Rt.Item,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Il("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-2xl px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function dp({className:e,children:t,checked:n,...r}){/* @__PURE__ */
|
|
156
156
|
return me(Rt.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item",className:Il("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-2xl py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[/* @__PURE__ */pe("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:/* @__PURE__ */pe(Rt.ItemIndicator,{children:/* @__PURE__ */pe(ye,{className:"size-4"})})}),t]})}function up({className:e,inset:t,...n}){/* @__PURE__ */
|
|
157
157
|
return pe(Rt.Label,{"data-slot":"dropdown-menu-label","data-inset":t,className:Il("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function hp({className:e,...t}){/* @__PURE__ */
|
|
158
|
-
return pe(Rt.Separator,{"data-slot":"dropdown-menu-separator",className:Il("bg-border -mx-1 my-1 h-px",e),...t})}var pp=e=>{switch(e){case"local":default:/* @__PURE__ */return pe(Ge,{className:"h-3.5 w-3.5"});case"ssh":/* @__PURE__ */return pe(pt,{className:"h-3.5 w-3.5"});case"s3":/* @__PURE__ */return pe(Ie,{className:"h-3.5 w-3.5"});case"r2":/* @__PURE__ */return pe(ze,{className:"h-3.5 w-3.5"});case"gdocs":/* @__PURE__ */return pe(Ve,{className:"h-3.5 w-3.5"});case"turso":/* @__PURE__ */return pe(Ct,{className:"h-3.5 w-3.5"})}},mp=e=>{switch(e){case"local":return"Local";case"ssh":return"SSH";case"s3":return"S3";case"r2":return"R2";case"gdocs":return"Google Docs";case"turso":return"Turso DB";default:return e}},fp=[{type:"ai",label:"AI",icon:gt},{type:"files",label:"Files",icon:Ve},{type:"outline",label:"Outline",icon:fe},{type:"openTabs",label:"Open Tabs",icon:Ke}];function gp(e,t,n,r){const a=e.includes(n);if(t){if(a){const t=e.filter(e=>e!==n);return 0!==t.length||r?t:e}return[...e,n]}return a?r?[]:e:[n]}function vp(e,t){return t||e.length<=1?e:[e[0]]}var yp=({leftPanels:e,onLeftPanelsChange:t,leftSplit:n,onLeftSplitChange:r,rightPanels:a,onRightPanelsChange:o,rightSplit:i,onRightSplitChange:s,showDynamicIsland:l,onToggleDynamicIsland:c,triggerClassName:d,tooltipSide:u="bottom",align:h="end"})=>{const p=n||i||a.length>0;/* @__PURE__ */
|
|
158
|
+
return pe(Rt.Separator,{"data-slot":"dropdown-menu-separator",className:Il("bg-border -mx-1 my-1 h-px",e),...t})}var pp=e=>{switch(e){case"local":default:/* @__PURE__ */return pe(Ge,{className:"h-3.5 w-3.5"});case"ssh":/* @__PURE__ */return pe(pt,{className:"h-3.5 w-3.5"});case"s3":/* @__PURE__ */return pe(Ie,{className:"h-3.5 w-3.5"});case"r2":/* @__PURE__ */return pe(ze,{className:"h-3.5 w-3.5"});case"gdocs":/* @__PURE__ */return pe(Ve,{className:"h-3.5 w-3.5"});case"turso":/* @__PURE__ */return pe(Ct,{className:"h-3.5 w-3.5"})}},mp=e=>{switch(e){case"local":return"Local";case"ssh":return"SSH";case"s3":return"S3";case"r2":return"R2";case"gdocs":return"Google Docs";case"turso":return"Turso DB";default:return e}},fp=[{type:"ai",label:"AI",icon:gt},{type:"files",label:"Files",icon:Ve},{type:"outline",label:"Outline",icon:fe},{type:"openTabs",label:"Open Tabs",icon:Ke},{type:"related",label:"Related",icon:Xe}];function gp(e,t,n,r){const a=e.includes(n);if(t){if(a){const t=e.filter(e=>e!==n);return 0!==t.length||r?t:e}return[...e,n]}return a?r?[]:e:[n]}function vp(e,t){return t||e.length<=1?e:[e[0]]}var yp=({leftPanels:e,onLeftPanelsChange:t,leftSplit:n,onLeftSplitChange:r,rightPanels:a,onRightPanelsChange:o,rightSplit:i,onRightSplitChange:s,showDynamicIsland:l,onToggleDynamicIsland:c,triggerClassName:d,tooltipSide:u="bottom",align:h="end"})=>{const p=n||i||a.length>0;/* @__PURE__ */
|
|
159
159
|
return me(ip,{children:[/* @__PURE__ */me(rp,{children:[/* @__PURE__ */pe(ap,{asChild:!0,children:/* @__PURE__ */pe(sp,{asChild:!0,children:/* @__PURE__ */pe(tp,{variant:"ghost",size:"sm",className:Il(d,p&&"bg-sidebar-accent text-sidebar-foreground"),children:/* @__PURE__ */pe(De,{className:"h-4 w-4"})})})}),/* @__PURE__ */pe(op,{side:u,children:/* @__PURE__ */pe("p",{children:"Split View Options"})})]}),/* @__PURE__ */me(lp,{align:h,className:"w-64",children:[
|
|
160
160
|
/* @__PURE__ */pe(up,{className:"text-xs font-semibold text-muted-foreground",children:"Left Sidebar"}),
|
|
161
161
|
/* @__PURE__ */pe(dp,{checked:n,onSelect:e=>e.preventDefault(),onCheckedChange:n=>{r(n),t(vp(e,n))},children:"Split View"}),fp.map(({type:r,label:a,icon:o})=>/* @__PURE__ */me(dp,{checked:e.includes(r),onSelect:e=>e.preventDefault(),onCheckedChange:()=>t(gp(e,n,r,!1)),children:[/* @__PURE__ */pe(o,{className:"h-4 w-4"}),/* @__PURE__ */pe("span",{children:a})]},`left-${r}`)),
|
|
@@ -225,229 +225,232 @@ return me(he,{children:[/* @__PURE__ */pe("div",{className:"flex h-full flex-col
|
|
|
225
225
|
/* @__PURE__ */pe(Ym,{onClick:()=>y(4),children:"Heading 4"}),
|
|
226
226
|
/* @__PURE__ */pe(Ym,{onClick:()=>s(/* @__PURE__ */new Set),children:"Expand All"})]})]}),
|
|
227
227
|
/* @__PURE__ */pe(Xm,{}),
|
|
228
|
-
/* @__PURE__ */pe(Km,{checked:null!==l,onCheckedChange:e=>{if(e){const e=p.find(e=>i.has(e.id));e&&f(e.level)}else f(null)},children:"Keep this collapse level as default"})]})]},e.id)})})}),rf=i("inline-flex items-center justify-center rounded-2xl border px-3 py-1.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-gray-100 text-gray-700 [a&]:hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-300 dark:[a&]:hover:bg-gray-700",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",new:"text-purple-600 dark:text-purple-300 bg-purple-600/30 dark:bg-purple-600/30",beta:"text-blue-600 dark:text-blue-300 bg-blue-600/30 dark:bg-blue-600/30",highlight:"text-green-800 dark:text-green-300 bg-green-600/30 dark:bg-green-600/30"}},defaultVariants:{variant:"default"}});function
|
|
229
|
-
return pe(n?ce:"span",{"data-slot":"badge",className:Il(
|
|
228
|
+
/* @__PURE__ */pe(Km,{checked:null!==l,onCheckedChange:e=>{if(e){const e=p.find(e=>i.has(e.id));e&&f(e.level)}else f(null)},children:"Keep this collapse level as default"})]})]},e.id)})})}),rf={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":" "};function af(e){return e.replace(/<[^>]*>/g," ").replace(/&(?:amp|lt|gt|quot|#39|nbsp);/g,e=>rf[e]??e).replace(/\s+/g," ").trim()}function of(e,t){if(!t)return 0;let n=0,r=e.indexOf(t);for(;-1!==r;)n++,r=e.indexOf(t,r+t.length);return n}var sf=/* @__PURE__ */new Set(["about","above","after","again","against","along","also","always","among","around","because","before","below","between","both","cannot","could","does","doing","down","during","each","either","every","first","from","further","have","having","here","into","just","more","most","once","only","other","over","same","shall","should","since","some","such","than","that","their","them","then","there","these","they","this","those","through","under","until","very","were","what","when","where","which","while","will","with","would","your"]);function lf(e){const t=`${e.title} ${af(e.content)}`.toLowerCase().match(/[a-z0-9]+/g)??[],n=/* @__PURE__ */new Set;for(const r of t)r.length>=4&&!sf.has(r)&&n.add(r);return n}var cf=i("inline-flex items-center justify-center rounded-2xl border px-3 py-1.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-gray-100 text-gray-700 [a&]:hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-300 dark:[a&]:hover:bg-gray-700",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",new:"text-purple-600 dark:text-purple-300 bg-purple-600/30 dark:bg-purple-600/30",beta:"text-blue-600 dark:text-blue-300 bg-blue-600/30 dark:bg-blue-600/30",highlight:"text-green-800 dark:text-green-300 bg-green-600/30 dark:bg-green-600/30"}},defaultVariants:{variant:"default"}});function df({className:e,variant:t,asChild:n=!1,...r}){/* @__PURE__ */
|
|
229
|
+
return pe(n?ce:"span",{"data-slot":"badge",className:Il(cf({variant:t}),e),...r})}var uf=[{id:"clarity",name:"Clarity",prompt:"Rewrite this paragraph for maximum clarity and straightforwardness, keeping all original meaning but removing ambiguity and simplifying complex sentences:",color:"blue"},{id:"concise",name:"Concise",prompt:"Rewrite this text to be more concise, removing redundancy and filler while preserving all key points and tone. Aim for about 50% of the original length:",color:"purple"},{id:"summarize",name:"Summarize",prompt:"Summarize the following text into a shorter paragraph, keeping the main ideas and overall tone but removing details and repetition:",color:"green"},{id:"rephrase",name:"Rephrase",prompt:"Rephrase this paragraph with fresh wording and more engaging style, varying sentence structure and word choice while preserving the core message:",color:"orange"},{id:"expand",name:"Expand",prompt:"Keep the original paragraph as-is, then expand it by adding one additional paragraph that elaborates on the main idea, gives an example, or adds helpful context for the reader:",color:"pink"}],hf="REASON-rewrite-modes",pf=()=>{try{const e=localStorage.getItem(hf);if(e)return JSON.parse(e)}catch(zi){}return uf},mf=e=>{try{localStorage.setItem(hf,JSON.stringify(e))}catch(zi){}},ff=({originalText:e,suggestedText:t,onApprove:n,onReject:r,onRegenerate:a,isLoading:o=!1,currentMode:i})=>{const[s,l]=le([]);if(te(()=>{l(pf())},[]),o)/* @__PURE__ */return me("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-popover p-3 shadow-lg",children:[/* @__PURE__ */pe(Ze,{className:"h-4 w-4 animate-spin text-muted-foreground"}),/* @__PURE__ */pe("span",{className:"text-sm text-muted-foreground",children:"Generating AI suggestion..."})]});const c=e=>{const t={blue:"bg-blue-500/10 text-blue-700 dark:text-blue-300 hover:bg-blue-500/20 border-blue-500/20",purple:"bg-purple-500/10 text-purple-700 dark:text-purple-300 hover:bg-purple-500/20 border-purple-500/20",green:"bg-green-500/10 text-green-700 dark:text-green-300 hover:bg-green-500/20 border-green-500/20",orange:"bg-orange-500/10 text-orange-700 dark:text-orange-300 hover:bg-orange-500/20 border-orange-500/20",pink:"bg-pink-500/10 text-pink-700 dark:text-pink-300 hover:bg-pink-500/20 border-pink-500/20"};return t[e||"blue"]||t.blue};/* @__PURE__ */
|
|
230
230
|
return me("div",{className:"h-full flex flex-col",children:[
|
|
231
|
-
/* @__PURE__ */me("div",{className:"p-3 border-b border-sidebar-border",children:[/* @__PURE__ */pe("div",{className:"text-xs font-semibold text-sidebar-foreground mb-3",children:"AI SUGGESTION"}),a&&s.length>0&&/* @__PURE__ */me("div",{className:"mb-3",children:[/* @__PURE__ */pe("div",{className:"text-xs text-muted-foreground mb-2",children:"Rewrite Mode:"}),/* @__PURE__ */pe("div",{className:"flex flex-wrap gap-1",children:s.map(e=>/* @__PURE__ */pe(
|
|
231
|
+
/* @__PURE__ */me("div",{className:"p-3 border-b border-sidebar-border",children:[/* @__PURE__ */pe("div",{className:"text-xs font-semibold text-sidebar-foreground mb-3",children:"AI SUGGESTION"}),a&&s.length>0&&/* @__PURE__ */me("div",{className:"mb-3",children:[/* @__PURE__ */pe("div",{className:"text-xs text-muted-foreground mb-2",children:"Rewrite Mode:"}),/* @__PURE__ */pe("div",{className:"flex flex-wrap gap-1",children:s.map(e=>/* @__PURE__ */pe(df,{variant:"outline",className:Il("cursor-pointer text-xs px-2 py-0.5 transition-colors",c(e.color),i===e.id&&"ring-2 ring-offset-1"),onClick:()=>a(e),children:e.name},e.id))})]})]}),
|
|
232
232
|
/* @__PURE__ */me("div",{className:"flex-1 overflow-auto p-3 space-y-4",children:[/* @__PURE__ */me("div",{children:[/* @__PURE__ */pe("div",{className:"text-xs font-semibold text-muted-foreground mb-2",children:"Original:"}),/* @__PURE__ */pe("div",{className:"text-sm text-foreground/70 line-through bg-muted/50 p-3 rounded-md",children:e})]}),/* @__PURE__ */me("div",{children:[/* @__PURE__ */pe("div",{className:"text-xs font-semibold text-muted-foreground mb-2",children:"Suggested:"}),/* @__PURE__ */pe("div",{className:"text-sm text-foreground font-medium bg-primary/10 p-3 rounded-md border border-primary/20",children:t})]})]}),
|
|
233
|
-
/* @__PURE__ */pe("div",{className:"border-t border-sidebar-border p-3",children:/* @__PURE__ */me("div",{className:"flex flex-col gap-2",children:[/* @__PURE__ */me(tp,{variant:"default",size:"sm",onClick:n,className:"w-full h-9 bg-green-500 hover:bg-green-600 text-white",title:"Approve",children:[/* @__PURE__ */pe(ve,{className:"h-4 w-4 mr-1"}),"Approve"]}),/* @__PURE__ */me(tp,{variant:"outline",size:"sm",onClick:r,className:"w-full h-9",title:"Reject",children:[/* @__PURE__ */pe(Nt,{className:"h-4 w-4 mr-1"}),"Reject"]})]})})]})};function
|
|
234
|
-
return pe("input",{type:t,"data-slot":"input",className:Il("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-11 w-full min-w-0 rounded-2xl border bg-card px-3 py-1 text-sm font-medium transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","focus:outline-none focus:ring-2 focus:ring-primary/50","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function hf(...e){return e.filter(Boolean).join(" ")}var pf=X(function(e,t){const{className:n,style:r,children:a,defaultSize:o,size:i,minSize:s,maxSize:l,...c}=e,d={position:"relative",outline:"none",overflow:"auto",flex:"none",...r},u=hf("split-pane-pane",n);return pe("div",{ref:t,className:u,style:d,"data-pane":"true",...c,children:a})});function mf(e,t="polite"){if("undefined"==typeof document)return;const n=document.createElement("div");n.setAttribute("role","status"),n.setAttribute("aria-live",t),n.setAttribute("aria-atomic","true"),n.style.position="absolute",n.style.left="-10000px",n.style.width="1px",n.style.height="1px",n.style.overflow="hidden",n.textContent=e,document.body.appendChild(n),setTimeout(()=>{document.body.removeChild(n)},1e3)}function ff(e){return 1e3>e?Math.round(e)+" pixels":Math.round(e/10)/100+" thousand pixels"}function gf(e){const{direction:t,index:n,isDragging:r,disabled:a,onPointerDown:o,onKeyDown:i,className:s,style:l,currentSize:c,minSize:d,maxSize:u,children:h}=e,p="horizontal"===t?"vertical":"horizontal",m={flex:"none",position:"relative",userSelect:"none",touchAction:"none",..."horizontal"===t?{width:"1px",cursor:a?"default":"col-resize"}:{height:"1px",cursor:a?"default":"row-resize"},...r&&{cursor:"horizontal"===t?"col-resize":"row-resize"},...l},f=hf("split-pane-divider",t,r&&"dragging",s),g=function(e,t){return`${"horizontal"===t?"vertical":"horizontal"} divider ${e+1}`}(n,t);return pe("div",{role:"separator","aria-orientation":p,"aria-label":g,"aria-valuenow":c,"aria-valuemin":d,"aria-valuemax":void 0===u||u===1/0?void 0:u,"aria-description":function(e){return`Use ${"horizontal"===e?"left and right arrow keys":"up and down arrow keys"} to resize. Hold Shift for larger steps. Press Home or End to minimize or maximize.`}(t),tabIndex:a?-1:0,className:f,style:m,onPointerDown:a?void 0:o,onKeyDown:a?void 0:i,"data-divider-index":n,children:h})}function vf(e,t){if("number"==typeof e)return e;if(e.endsWith("%"))return parseFloat(e)/100*t;if(e.endsWith("px"))return parseFloat(e);const n=parseFloat(e);return isNaN(n)?0:n}function yf(e,t,n){return Math.min(Math.max(e,t),n)}function bf(e,t,n,r,a){const o=[...e],i=e[t]??0,s=e[t+1]??0,l=r[t+1]??0,c=a[t+1]??1/0;let d=yf(i+n,r[t]??0,a[t]??1/0),u=yf(s-n,l,c);const h=s-u,p=Math.min(Math.abs(d-i),Math.abs(h));return n>0?(d=i+p,u=s-p):(d=i-p,u=s+p),o[t]=d,o[t+1]=u,o}function xf(e){const{direction:t,sizes:n,minSizes:r,maxSizes:a,snapPoints:o=[],snapTolerance:i=10,step:s,onResizeStart:l,onResize:c,onResizeEnd:d}=e,[u,h]=le(!1),[p,m]=le(n),f=se(null),g=se(null),v=se(!0),y=se(null),b=se(p);b.current=p;const x=se(d);x.current=d;const w=se(n);te(()=>{u||JSON.stringify(n)===JSON.stringify(w.current)||(w.current=n,m(n))},[n,u]),te(()=>(v.current=!0,()=>{v.current=!1,g.current&&(cancelAnimationFrame(g.current),g.current=null)}),[]);const S=Q((e,n)=>{if(!f.current||!v.current)return;const{dividerIndex:l,startPosition:d,startSizes:u,pointerType:h}=f.current;let p=("horizontal"===t?e:n)-d;s&&(p=function(e,t){return t>0?Math.round(e/t)*t:e}(p,s));let g=bf(u,l,p,r,a);o.length>0&&(g=g.map(e=>function(e,t,n){for(const r of t)if(n>=Math.abs(e-r))return r;return e}(e,o,i))),m(g),c&&c(g,{sizes:g,source:"pointer",pointerType:h})},[t,s,r,a,o,i,c]),k=Q(e=>{f.current&&e.pointerId===f.current.pointerId&&(e.preventDefault(),y.current={x:e.clientX,y:e.clientY},g.current||(g.current=requestAnimationFrame(()=>{g.current=null,v.current&&y.current&&S(y.current.x,y.current.y)})))},[S]),C=Q(e=>{if(!f.current||e.pointerId!==f.current.pointerId)return;const{element:t,pointerId:n,pointerType:r}=f.current;t?.hasPointerCapture?.(n)&&t.releasePointerCapture(n),g.current&&(cancelAnimationFrame(g.current),g.current=null),h(!1);const a=b.current,o=x.current;o&&o(a,{sizes:a,source:"pointer",pointerType:r}),f.current=null},[]),N=Q(e=>n=>{n.preventDefault();const r="horizontal"===t?n.clientX:n.clientY,a=n.currentTarget;a.setPointerCapture(n.pointerId);const o=n.pointerType;f.current={dividerIndex:e,startPosition:r,startSizes:p,pointerId:n.pointerId,pointerType:o,element:a},h(!0),l&&l({sizes:p,source:"pointer",pointerType:o,originalEvent:n.nativeEvent})},[t,p,l]);return te(()=>{if(u)return document.addEventListener("pointermove",k),document.addEventListener("pointerup",C),document.addEventListener("pointercancel",C),()=>{document.removeEventListener("pointermove",k),document.removeEventListener("pointerup",C),document.removeEventListener("pointercancel",C)}},[u,k,C]),{isDragging:u,currentSizes:p,handlePointerDown:N}}var wf=10,Sf=50;function kf(e){const{direction:t,sizes:n,minSizes:r,maxSizes:a,step:o=wf,largeStep:i=Sf,onResize:s,onResizeEnd:l}=e,c=se(null);return{handleKeyDown:Q(e=>d=>{if(!("horizontal"===t?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"]).includes(d.key)&&"Home"!==d.key&&"End"!==d.key&&"Escape"!==d.key)return;if(d.preventDefault(),"Escape"===d.key){if(c.current){const e=c.current;c.current=null,s&&s(e,{sizes:e,source:"keyboard",originalEvent:d.nativeEvent}),l&&l(e,{sizes:e,source:"keyboard",originalEvent:d.nativeEvent}),mf("Pane sizes restored")}return}null===c.current&&(c.current=[...n]);let u=0,h=[...n],p="arrow";switch(d.key){case"ArrowLeft":case"ArrowUp":u=-(d.shiftKey?i:o);break;case"ArrowRight":case"ArrowDown":u=d.shiftKey?i:o;break;case"Home":{p="home";const t=e+1,a=r[e]??0,o=(n[e]??0)+(n[t]??0);h[e]=a,h[t]=o-a;break}case"End":{p="end";const t=e,o=e+1,i=(n[t]??0)+(n[o]??0);h[t]=Math.min(a[t]??1/0,i-(r[o]??0)),h[o]=i-h[t];break}}if(0!==u&&(h=bf(n,e,u,r,a)),h=h.map((e,t)=>yf(e,r[t]??0,a[t]??1/0)),s&&s(h,{sizes:h,source:"keyboard",originalEvent:d.nativeEvent}),l&&l(h,{sizes:h,source:"keyboard",originalEvent:d.nativeEvent}),"home"===p)mf(`Pane ${e+1} minimized to ${ff(h[e]??0)}`);else if("end"===p)mf(`Pane ${e+1} maximized to ${ff(h[e]??0)}`);else{const t=u>0?e:e+1;mf(`Pane ${t+1} resized to ${ff(h[t]??0)}`)}},[t,n,r,a,o,i,s,l])}}function Cf(e){const{direction:t="horizontal",resizable:n=!0,snapPoints:r,snapTolerance:a=10,step:o,onResizeStart:i,onResize:s,onResizeEnd:l,className:c,style:d,divider:u,dividerStyle:h,dividerClassName:p,dividerSize:m=1,children:f}=e,g=se(null),[v,y]=le(0),b=se(0),x=ie(()=>U.toArray(f).filter(e=>"object"==typeof e&&null!==e&&"props"in e).map(e=>({props:e.props,size:e.props.size,defaultSize:e.props.defaultSize,minSize:e.props.minSize??0,maxSize:e.props.maxSize??1/0})),[f]),w=x.length,S=se(!1);2>w&&!S.current&&(S.current=!0);const{minSizes:k,maxSizes:C}=ie(()=>{if(0===v)return{minSizes:Array(w).fill(0),maxSizes:Array(w).fill(1/0)};const e=[],t=[];return x.forEach(n=>{e.push(vf(n.minSize,v)),t.push(n.maxSize===1/0?1/0:vf(n.maxSize,v))}),{minSizes:e,maxSizes:t}},[v,w,x]),N=Q(e=>{if(0===e)return Array(w).fill(0);const t=e-m*(w-1),n=x.map(e=>{const n=e.size??e.defaultSize;return void 0!==n?vf(n,t):null}),r=n.reduce((e,t)=>e+(t??0),0),a=n.filter(e=>null===e).length,o=a>0?(t-r)/a:0;return n.map(e=>null===e?o:e)},[w,x,m]),[T,A]=le(()=>N(v));te(()=>{if(0===v)return;if(!x.some(e=>void 0!==e.size))return;const e=N(v);A(t=>t.length===e.length&&t.every((t,n)=>t===e[n])?t:e)},[v,x,N]);const M=Q(e=>{const t=b.current;if(b.current=e,0===e)return;const n=x.some(e=>void 0!==e.size),r=e-m*(w-1);A(a=>a.every(e=>0===e)||a.length!==w?N(e):t>0&&t!==e?n?N(e):function(e,t){const n=e.reduce((e,t)=>e+t,0);if(0===n){const n=t/e.length;return e.map(()=>n)}return e.map(e=>e/n*t)}(a,r):0===t?N(e):a)},[w,x,N,m]),I=se(0);te(()=>{const e=g.current;if(!e)return;const n=new ResizeObserver(e=>{const n=e[0];n&&(e=>{const n=Math.round("horizontal"===t?e.width:e.height);n>0&&n!==I.current&&(I.current=n,y(n),M(n))})(n.contentRect)});return n.observe(e),()=>{n.disconnect()}},[t,M]);const D=Q((e,t)=>{A(e),s?.(e,t)},[s]),{isDragging:E,currentSizes:R,handlePointerDown:_}=xf({direction:t,sizes:T,minSizes:k,maxSizes:C,snapPoints:r,snapTolerance:a,step:o,onResizeStart:i,onResize:D,onResizeEnd:l}),{handleKeyDown:z}=kf({direction:t,sizes:R,minSizes:k,maxSizes:C,step:o,onResize:D,onResizeEnd:l}),P=Q(e=>t=>{const n={...t,pointerId:1,pointerType:"mouse",nativeEvent:t.nativeEvent};_(e)(n)},[_]),O=Q(e=>t=>{const n=t.touches[0];if(!n)return;const r={...t,clientX:n.clientX,clientY:n.clientY,pointerId:n.identifier,pointerType:"touch",nativeEvent:t.nativeEvent};_(e)(r)},[_]),L=Q(()=>{},[]),F={display:"flex",flexDirection:"horizontal"===t?"row":"column",height:"100%",width:"100%",overflow:"hidden",position:"relative",...d},B=hf("split-pane",t,c);return pe("div",{ref:g,className:B,style:F,children:v>0&&(()=>{if(2>w)return null;const e=[];return x.forEach((r,a)=>{const o=R[a]??0,i={..."horizontal"===t?{width:o+"px",height:"100%"}:{height:o+"px",width:"100%"},...r.props.style};if(e.push(pe(pf,{...r.props,style:i,children:r.props.children},"pane-"+a)),w-1>a){const r=k[a],i=C[a];e.push(pe(u??gf,{direction:t,index:a,isDragging:E,disabled:!n,onPointerDown:_(a),onMouseDown:P(a),onTouchStart:O(a),onTouchEnd:L,onKeyDown:z(a),className:p,style:h,currentSize:o,minSize:r,maxSize:i===1/0?void 0:i},"divider-"+a))}}),e})()})}function Nf(e){const{key:t,storage:n=localStorage,debounce:r=300}=e,[a,o]=le(()=>{try{const e=n.getItem(t);return e?JSON.parse(e):[]}catch{return[]}});return te(()=>{if(0===a.length)return;const e=setTimeout(()=>{try{n.setItem(t,JSON.stringify(a))}catch(e){}},r);return()=>clearTimeout(e)},[a,t,n,r]),[a,o]}var Tf="undefined"==typeof window?{getItem:()=>null,setItem:()=>{},removeItem:()=>{},clear:()=>{},key:()=>null,length:0}:window.localStorage,Af=({panels:e,split:t,persistenceKey:n,activeDocuments:r,activeId:a,activeDocument:o,headings:i=[],isMobile:s,onSelect:l,onAdd:c,onDelete:d,onDuplicate:u,onMove:h,onManageTags:p,onRename:m,onOpenChange:f,treeRef:g,outlineRef:v,editorRef:y,openTabs:b=[],activeTab:x,onTabChange:w,onTabClose:S,onTabRename:k,onSplitRight:C,onReopenLastClosed:N,canReopenLastClosed:T=!1,onNavigate:A,aiProps:M,tabItems:I,onNewChat:D})=>{const[E,R]=le(null),[_,z]=le(""),P=se(null),O=se(null),L=g??P,F=v??O,B=e=>{l(e),s&&f&&f(!1)},V=e=>{p?.(e),s&&f&&f(!1)},H=Q(e=>{R(e)},[]),$=Q(e=>{E&&u(E)},[E,u]),q=ie(()=>{const e=o?.content||"";if(!e)return[];const t=(new DOMParser).parseFromString(e,"text/html"),n=[];let r="",a=-1;for(const o of Array.from(t.body.children))/^h[1-6]$/i.test(o.tagName)?(a>=0&&(n[a]=r),a++,r=""):a>=0&&(r+=" "+(o.textContent||""));return a>=0&&(n[a]=r),n},[o?.content]),j=ie(()=>{const e=_.trim().toLowerCase();return e?i.filter(([,t],n)=>t.toLowerCase().includes(e)||(q[n]||"").toLowerCase().includes(e)):i},[_,i,q]),[U,G]=Nf({key:`sidebar-panels-${n}`,storage:Tf}),W=I??b.map(e=>({id:e,title:r.find(t=>t.id===e)?.title||"Untitled",kind:"file"})),Y=e=>{switch(e){case"files":/* @__PURE__ */return pe("div",{className:"h-full overflow-auto",children:/* @__PURE__ */pe(ef,{ref:L,documents:r,activeId:a,onSelect:B,onMove:h,onRename:m,onDelete:d,onDuplicate:u,onAddChild:e=>c(e,!1),onAddChildFolder:e=>c(e,!0),onAddSibling:e=>{c(r.find(t=>t.id===e)?.parentId||null,!1)},onAddSiblingFolder:e=>{c(r.find(t=>t.id===e)?.parentId||null,!0)},onCopy:H,onPaste:$,onManageTags:V})});case"openTabs":/* @__PURE__ */return pe("div",{className:"h-full overflow-auto",children:/* @__PURE__ */me("div",{className:"px-1 py-1",children:[/* @__PURE__ */me("div",{className:"flex items-center justify-between px-2 py-1",children:[/* @__PURE__ */pe("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Open Tabs"}),/* @__PURE__ */me("div",{className:"flex items-center gap-0.5",children:[/* @__PURE__ */pe("button",{className:"h-5 w-5 flex items-center justify-center rounded text-muted-foreground hover:bg-sidebar-accent hover:text-foreground",title:"New File",onClick:()=>c(null,!1),children:/* @__PURE__ */pe(Be,{className:"h-3.5 w-3.5"})}),D&&/* @__PURE__ */pe("button",{className:"h-5 w-5 flex items-center justify-center rounded text-muted-foreground hover:bg-sidebar-accent hover:text-foreground",title:"New Chat",onClick:D,children:/* @__PURE__ */pe(rt,{className:"h-3.5 w-3.5"})})]})]}),0===W.length?/* @__PURE__ */pe("div",{className:"px-2 py-3 text-xs text-muted-foreground",children:"No open tabs"}):W.map(({id:e,title:t,kind:n})=>{const r="chat"===n;/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */pe("div",{className:"border-t border-sidebar-border p-3",children:/* @__PURE__ */me("div",{className:"flex flex-col gap-2",children:[/* @__PURE__ */me(tp,{variant:"default",size:"sm",onClick:n,className:"w-full h-9 bg-green-500 hover:bg-green-600 text-white",title:"Approve",children:[/* @__PURE__ */pe(ve,{className:"h-4 w-4 mr-1"}),"Approve"]}),/* @__PURE__ */me(tp,{variant:"outline",size:"sm",onClick:r,className:"w-full h-9",title:"Reject",children:[/* @__PURE__ */pe(Nt,{className:"h-4 w-4 mr-1"}),"Reject"]})]})})]})};function gf({className:e,type:t,...n}){/* @__PURE__ */
|
|
234
|
+
return pe("input",{type:t,"data-slot":"input",className:Il("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-11 w-full min-w-0 rounded-2xl border bg-card px-3 py-1 text-sm font-medium transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","focus:outline-none focus:ring-2 focus:ring-primary/50","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function vf(...e){return e.filter(Boolean).join(" ")}var yf=X(function(e,t){const{className:n,style:r,children:a,defaultSize:o,size:i,minSize:s,maxSize:l,...c}=e,d={position:"relative",outline:"none",overflow:"auto",flex:"none",...r},u=vf("split-pane-pane",n);return pe("div",{ref:t,className:u,style:d,"data-pane":"true",...c,children:a})});function bf(e,t="polite"){if("undefined"==typeof document)return;const n=document.createElement("div");n.setAttribute("role","status"),n.setAttribute("aria-live",t),n.setAttribute("aria-atomic","true"),n.style.position="absolute",n.style.left="-10000px",n.style.width="1px",n.style.height="1px",n.style.overflow="hidden",n.textContent=e,document.body.appendChild(n),setTimeout(()=>{document.body.removeChild(n)},1e3)}function xf(e){return 1e3>e?Math.round(e)+" pixels":Math.round(e/10)/100+" thousand pixels"}function wf(e){const{direction:t,index:n,isDragging:r,disabled:a,onPointerDown:o,onKeyDown:i,className:s,style:l,currentSize:c,minSize:d,maxSize:u,children:h}=e,p="horizontal"===t?"vertical":"horizontal",m={flex:"none",position:"relative",userSelect:"none",touchAction:"none",..."horizontal"===t?{width:"1px",cursor:a?"default":"col-resize"}:{height:"1px",cursor:a?"default":"row-resize"},...r&&{cursor:"horizontal"===t?"col-resize":"row-resize"},...l},f=vf("split-pane-divider",t,r&&"dragging",s),g=function(e,t){return`${"horizontal"===t?"vertical":"horizontal"} divider ${e+1}`}(n,t);return pe("div",{role:"separator","aria-orientation":p,"aria-label":g,"aria-valuenow":c,"aria-valuemin":d,"aria-valuemax":void 0===u||u===1/0?void 0:u,"aria-description":function(e){return`Use ${"horizontal"===e?"left and right arrow keys":"up and down arrow keys"} to resize. Hold Shift for larger steps. Press Home or End to minimize or maximize.`}(t),tabIndex:a?-1:0,className:f,style:m,onPointerDown:a?void 0:o,onKeyDown:a?void 0:i,"data-divider-index":n,children:h})}function Sf(e,t){if("number"==typeof e)return e;if(e.endsWith("%"))return parseFloat(e)/100*t;if(e.endsWith("px"))return parseFloat(e);const n=parseFloat(e);return isNaN(n)?0:n}function kf(e,t,n){return Math.min(Math.max(e,t),n)}function Cf(e,t,n,r,a){const o=[...e],i=e[t]??0,s=e[t+1]??0,l=r[t+1]??0,c=a[t+1]??1/0;let d=kf(i+n,r[t]??0,a[t]??1/0),u=kf(s-n,l,c);const h=s-u,p=Math.min(Math.abs(d-i),Math.abs(h));return n>0?(d=i+p,u=s-p):(d=i-p,u=s+p),o[t]=d,o[t+1]=u,o}function Nf(e){const{direction:t,sizes:n,minSizes:r,maxSizes:a,snapPoints:o=[],snapTolerance:i=10,step:s,onResizeStart:l,onResize:c,onResizeEnd:d}=e,[u,h]=le(!1),[p,m]=le(n),f=se(null),g=se(null),v=se(!0),y=se(null),b=se(p);b.current=p;const x=se(d);x.current=d;const w=se(n);te(()=>{u||JSON.stringify(n)===JSON.stringify(w.current)||(w.current=n,m(n))},[n,u]),te(()=>(v.current=!0,()=>{v.current=!1,g.current&&(cancelAnimationFrame(g.current),g.current=null)}),[]);const S=Q((e,n)=>{if(!f.current||!v.current)return;const{dividerIndex:l,startPosition:d,startSizes:u,pointerType:h}=f.current;let p=("horizontal"===t?e:n)-d;s&&(p=function(e,t){return t>0?Math.round(e/t)*t:e}(p,s));let g=Cf(u,l,p,r,a);o.length>0&&(g=g.map(e=>function(e,t,n){for(const r of t)if(n>=Math.abs(e-r))return r;return e}(e,o,i))),m(g),c&&c(g,{sizes:g,source:"pointer",pointerType:h})},[t,s,r,a,o,i,c]),k=Q(e=>{f.current&&e.pointerId===f.current.pointerId&&(e.preventDefault(),y.current={x:e.clientX,y:e.clientY},g.current||(g.current=requestAnimationFrame(()=>{g.current=null,v.current&&y.current&&S(y.current.x,y.current.y)})))},[S]),C=Q(e=>{if(!f.current||e.pointerId!==f.current.pointerId)return;const{element:t,pointerId:n,pointerType:r}=f.current;t?.hasPointerCapture?.(n)&&t.releasePointerCapture(n),g.current&&(cancelAnimationFrame(g.current),g.current=null),h(!1);const a=b.current,o=x.current;o&&o(a,{sizes:a,source:"pointer",pointerType:r}),f.current=null},[]),N=Q(e=>n=>{n.preventDefault();const r="horizontal"===t?n.clientX:n.clientY,a=n.currentTarget;a.setPointerCapture(n.pointerId);const o=n.pointerType;f.current={dividerIndex:e,startPosition:r,startSizes:p,pointerId:n.pointerId,pointerType:o,element:a},h(!0),l&&l({sizes:p,source:"pointer",pointerType:o,originalEvent:n.nativeEvent})},[t,p,l]);return te(()=>{if(u)return document.addEventListener("pointermove",k),document.addEventListener("pointerup",C),document.addEventListener("pointercancel",C),()=>{document.removeEventListener("pointermove",k),document.removeEventListener("pointerup",C),document.removeEventListener("pointercancel",C)}},[u,k,C]),{isDragging:u,currentSizes:p,handlePointerDown:N}}var Tf=10,Af=50;function Mf(e){const{direction:t,sizes:n,minSizes:r,maxSizes:a,step:o=Tf,largeStep:i=Af,onResize:s,onResizeEnd:l}=e,c=se(null);return{handleKeyDown:Q(e=>d=>{if(!("horizontal"===t?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"]).includes(d.key)&&"Home"!==d.key&&"End"!==d.key&&"Escape"!==d.key)return;if(d.preventDefault(),"Escape"===d.key){if(c.current){const e=c.current;c.current=null,s&&s(e,{sizes:e,source:"keyboard",originalEvent:d.nativeEvent}),l&&l(e,{sizes:e,source:"keyboard",originalEvent:d.nativeEvent}),bf("Pane sizes restored")}return}null===c.current&&(c.current=[...n]);let u=0,h=[...n],p="arrow";switch(d.key){case"ArrowLeft":case"ArrowUp":u=-(d.shiftKey?i:o);break;case"ArrowRight":case"ArrowDown":u=d.shiftKey?i:o;break;case"Home":{p="home";const t=e+1,a=r[e]??0,o=(n[e]??0)+(n[t]??0);h[e]=a,h[t]=o-a;break}case"End":{p="end";const t=e,o=e+1,i=(n[t]??0)+(n[o]??0);h[t]=Math.min(a[t]??1/0,i-(r[o]??0)),h[o]=i-h[t];break}}if(0!==u&&(h=Cf(n,e,u,r,a)),h=h.map((e,t)=>kf(e,r[t]??0,a[t]??1/0)),s&&s(h,{sizes:h,source:"keyboard",originalEvent:d.nativeEvent}),l&&l(h,{sizes:h,source:"keyboard",originalEvent:d.nativeEvent}),"home"===p)bf(`Pane ${e+1} minimized to ${xf(h[e]??0)}`);else if("end"===p)bf(`Pane ${e+1} maximized to ${xf(h[e]??0)}`);else{const t=u>0?e:e+1;bf(`Pane ${t+1} resized to ${xf(h[t]??0)}`)}},[t,n,r,a,o,i,s,l])}}function If(e){const{direction:t="horizontal",resizable:n=!0,snapPoints:r,snapTolerance:a=10,step:o,onResizeStart:i,onResize:s,onResizeEnd:l,className:c,style:d,divider:u,dividerStyle:h,dividerClassName:p,dividerSize:m=1,children:f}=e,g=se(null),[v,y]=le(0),b=se(0),x=ie(()=>U.toArray(f).filter(e=>"object"==typeof e&&null!==e&&"props"in e).map(e=>({props:e.props,size:e.props.size,defaultSize:e.props.defaultSize,minSize:e.props.minSize??0,maxSize:e.props.maxSize??1/0})),[f]),w=x.length,S=se(!1);2>w&&!S.current&&(S.current=!0);const{minSizes:k,maxSizes:C}=ie(()=>{if(0===v)return{minSizes:Array(w).fill(0),maxSizes:Array(w).fill(1/0)};const e=[],t=[];return x.forEach(n=>{e.push(Sf(n.minSize,v)),t.push(n.maxSize===1/0?1/0:Sf(n.maxSize,v))}),{minSizes:e,maxSizes:t}},[v,w,x]),N=Q(e=>{if(0===e)return Array(w).fill(0);const t=e-m*(w-1),n=x.map(e=>{const n=e.size??e.defaultSize;return void 0!==n?Sf(n,t):null}),r=n.reduce((e,t)=>e+(t??0),0),a=n.filter(e=>null===e).length,o=a>0?(t-r)/a:0;return n.map(e=>null===e?o:e)},[w,x,m]),[T,A]=le(()=>N(v));te(()=>{if(0===v)return;if(!x.some(e=>void 0!==e.size))return;const e=N(v);A(t=>t.length===e.length&&t.every((t,n)=>t===e[n])?t:e)},[v,x,N]);const M=Q(e=>{const t=b.current;if(b.current=e,0===e)return;const n=x.some(e=>void 0!==e.size),r=e-m*(w-1);A(a=>a.every(e=>0===e)||a.length!==w?N(e):t>0&&t!==e?n?N(e):function(e,t){const n=e.reduce((e,t)=>e+t,0);if(0===n){const n=t/e.length;return e.map(()=>n)}return e.map(e=>e/n*t)}(a,r):0===t?N(e):a)},[w,x,N,m]),I=se(0);te(()=>{const e=g.current;if(!e)return;const n=new ResizeObserver(e=>{const n=e[0];n&&(e=>{const n=Math.round("horizontal"===t?e.width:e.height);n>0&&n!==I.current&&(I.current=n,y(n),M(n))})(n.contentRect)});return n.observe(e),()=>{n.disconnect()}},[t,M]);const D=Q((e,t)=>{A(e),s?.(e,t)},[s]),{isDragging:E,currentSizes:R,handlePointerDown:_}=Nf({direction:t,sizes:T,minSizes:k,maxSizes:C,snapPoints:r,snapTolerance:a,step:o,onResizeStart:i,onResize:D,onResizeEnd:l}),{handleKeyDown:z}=Mf({direction:t,sizes:R,minSizes:k,maxSizes:C,step:o,onResize:D,onResizeEnd:l}),P=Q(e=>t=>{const n={...t,pointerId:1,pointerType:"mouse",nativeEvent:t.nativeEvent};_(e)(n)},[_]),O=Q(e=>t=>{const n=t.touches[0];if(!n)return;const r={...t,clientX:n.clientX,clientY:n.clientY,pointerId:n.identifier,pointerType:"touch",nativeEvent:t.nativeEvent};_(e)(r)},[_]),L=Q(()=>{},[]),F={display:"flex",flexDirection:"horizontal"===t?"row":"column",height:"100%",width:"100%",overflow:"hidden",position:"relative",...d},B=vf("split-pane",t,c);return pe("div",{ref:g,className:B,style:F,children:v>0&&(()=>{if(2>w)return null;const e=[];return x.forEach((r,a)=>{const o=R[a]??0,i={..."horizontal"===t?{width:o+"px",height:"100%"}:{height:o+"px",width:"100%"},...r.props.style};if(e.push(pe(yf,{...r.props,style:i,children:r.props.children},"pane-"+a)),w-1>a){const r=k[a],i=C[a];e.push(pe(u??wf,{direction:t,index:a,isDragging:E,disabled:!n,onPointerDown:_(a),onMouseDown:P(a),onTouchStart:O(a),onTouchEnd:L,onKeyDown:z(a),className:p,style:h,currentSize:o,minSize:r,maxSize:i===1/0?void 0:i},"divider-"+a))}}),e})()})}function Df(e){const{key:t,storage:n=localStorage,debounce:r=300}=e,[a,o]=le(()=>{try{const e=n.getItem(t);return e?JSON.parse(e):[]}catch{return[]}});return te(()=>{if(0===a.length)return;const e=setTimeout(()=>{try{n.setItem(t,JSON.stringify(a))}catch(e){}},r);return()=>clearTimeout(e)},[a,t,n,r]),[a,o]}var Ef="undefined"==typeof window?{getItem:()=>null,setItem:()=>{},removeItem:()=>{},clear:()=>{},key:()=>null,length:0}:window.localStorage,Rf=({panels:e,split:t,persistenceKey:n,activeDocuments:r,activeId:a,activeDocument:o,headings:i=[],isMobile:s,onSelect:l,onAdd:c,onDelete:d,onDuplicate:u,onMove:h,onManageTags:p,onRename:m,onOpenChange:f,treeRef:g,outlineRef:v,editorRef:y,openTabs:b=[],activeTab:x,onTabChange:w,onTabClose:S,onTabRename:k,onSplitRight:C,onReopenLastClosed:N,canReopenLastClosed:T=!1,onNavigate:A,aiProps:M,tabItems:I,onNewChat:D})=>{const[E,R]=le(null),[_,z]=le(""),P=se(null),O=se(null),L=g??P,F=v??O,B=e=>{l(e),s&&f&&f(!1)},V=e=>{p?.(e),s&&f&&f(!1)},H=Q(e=>{R(e)},[]),$=Q(e=>{E&&u(E)},[E,u]),q=ie(()=>{const e=o?.content||"";if(!e)return[];const t=(new DOMParser).parseFromString(e,"text/html"),n=[];let r="",a=-1;for(const o of Array.from(t.body.children))/^h[1-6]$/i.test(o.tagName)?(a>=0&&(n[a]=r),a++,r=""):a>=0&&(r+=" "+(o.textContent||""));return a>=0&&(n[a]=r),n},[o?.content]),j=ie(()=>{const e=_.trim().toLowerCase();return e?i.filter(([,t],n)=>t.toLowerCase().includes(e)||(q[n]||"").toLowerCase().includes(e)):i},[_,i,q]),[U,G]=Df({key:`sidebar-panels-${n}`,storage:Ef}),W=I??b.map(e=>({id:e,title:r.find(t=>t.id===e)?.title||"Untitled",kind:"file"})),Y=ie(()=>function(e,t,n=10){if(!t)return[];const r=lf(t);if(0===r.size)return[];const a=[];for(const o of e){if(o.id===t.id||o.isFolder||o.isDeleted)continue;const e=lf(o);let n=0;for(const t of r)e.has(t)&&n++;n>0&&a.push({document:o,sharedKeywordCount:n})}return a.sort((e,t)=>t.sharedKeywordCount!==e.sharedKeywordCount?t.sharedKeywordCount-e.sharedKeywordCount:e.document.title.localeCompare(t.document.title)),a.slice(0,n)}(r,o),[r,o]),K=e=>{switch(e){case"files":/* @__PURE__ */return pe("div",{className:"h-full overflow-auto",children:/* @__PURE__ */pe(ef,{ref:L,documents:r,activeId:a,onSelect:B,onMove:h,onRename:m,onDelete:d,onDuplicate:u,onAddChild:e=>c(e,!1),onAddChildFolder:e=>c(e,!0),onAddSibling:e=>{c(r.find(t=>t.id===e)?.parentId||null,!1)},onAddSiblingFolder:e=>{c(r.find(t=>t.id===e)?.parentId||null,!0)},onCopy:H,onPaste:$,onManageTags:V})});case"openTabs":/* @__PURE__ */return pe("div",{className:"h-full overflow-auto",children:/* @__PURE__ */me("div",{className:"px-1 py-1",children:[/* @__PURE__ */me("div",{className:"flex items-center justify-between px-2 py-1",children:[/* @__PURE__ */pe("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Open Tabs"}),/* @__PURE__ */me("div",{className:"flex items-center gap-0.5",children:[/* @__PURE__ */pe("button",{className:"h-5 w-5 flex items-center justify-center rounded text-muted-foreground hover:bg-sidebar-accent hover:text-foreground",title:"New File",onClick:()=>c(null,!1),children:/* @__PURE__ */pe(Be,{className:"h-3.5 w-3.5"})}),D&&/* @__PURE__ */pe("button",{className:"h-5 w-5 flex items-center justify-center rounded text-muted-foreground hover:bg-sidebar-accent hover:text-foreground",title:"New Chat",onClick:D,children:/* @__PURE__ */pe(rt,{className:"h-3.5 w-3.5"})})]})]}),0===W.length?/* @__PURE__ */pe("div",{className:"px-2 py-3 text-xs text-muted-foreground",children:"No open tabs"}):W.map(({id:e,title:t,kind:n})=>{const r="chat"===n;/* @__PURE__ */
|
|
235
235
|
return me($m,{children:[/* @__PURE__ */pe(qm,{children:/* @__PURE__ */me("div",{className:Il("group flex items-center gap-2 px-2 py-1.5 rounded-md cursor-pointer transition-colors hover:bg-sidebar-accent",e===x&&"bg-sidebar-accent text-blue-600 font-medium"),onClick:()=>w?.(e),children:[r?/* @__PURE__ */pe(nt,{className:"shrink-0 h-4 w-4 text-blue-500"}):/* @__PURE__ */pe(xp,{filename:t,size:16}),
|
|
236
236
|
/* @__PURE__ */pe("span",{className:"flex-1 truncate text-sm",children:t}),S&&/* @__PURE__ */pe("button",{className:"shrink-0 h-4 w-4 flex items-center justify-center rounded opacity-0 group-hover:opacity-100 hover:bg-destructive/10 hover:text-destructive",onClick:t=>{t.stopPropagation(),S(e)},children:/* @__PURE__ */pe(Nt,{className:"h-3 w-3"})})]})}),/* @__PURE__ */me(Wm,{children:[k&&!r&&/* @__PURE__ */me(Ym,{onClick:()=>{const n=window.prompt("Rename document",t);n?.trim()&&k(e,n.trim())},children:[/* @__PURE__ */pe(Pe,{className:"mr-2 h-4 w-4"}),"Rename"]}),S&&/* @__PURE__ */me(Ym,{onClick:()=>S(e),className:"text-destructive focus:text-destructive",children:[/* @__PURE__ */pe(Nt,{className:"mr-2 h-4 w-4"}),"Close"]}),!r&&(C||N)&&/* @__PURE__ */pe(Xm,{}),C&&!r&&/* @__PURE__ */me(Ym,{onClick:()=>C(e),children:[/* @__PURE__ */pe(vt,{className:"mr-2 h-4 w-4"}),"Split Right"]}),N&&!r&&/* @__PURE__ */me(Ym,{onClick:N,disabled:!T,children:[/* @__PURE__ */pe(ut,{className:"mr-2 h-4 w-4"}),"Reopen Last Closed"]})]})]},e)})]})});case"outline":/* @__PURE__ */return me("div",{className:"h-full overflow-hidden flex flex-col",children:[/* @__PURE__ */me("div",{className:"px-3 py-2 border-b border-sidebar-border shrink-0",children:[/* @__PURE__ */pe("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-2",children:"Outline"}),/* @__PURE__ */me("div",{className:"relative",children:[
|
|
237
237
|
/* @__PURE__ */pe(ht,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground pointer-events-none"}),
|
|
238
|
-
/* @__PURE__ */pe(
|
|
238
|
+
/* @__PURE__ */pe(gf,{value:_,onChange:e=>z(e.target.value),placeholder:"Filter headings & text…",className:"h-7 pl-7 pr-7 text-xs"}),_&&/* @__PURE__ */pe("button",{onClick:()=>z(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:/* @__PURE__ */pe(Nt,{className:"h-3 w-3"})})]})]}),/* @__PURE__ */pe("div",{className:"flex-1 overflow-auto",children:/* @__PURE__ */pe(nf,{ref:F,headings:j,onNavigate:A,editorRef:y})})]});case"related":/* @__PURE__ */return me("div",{className:"h-full overflow-hidden flex flex-col",children:[/* @__PURE__ */pe("div",{className:"px-3 py-2 border-b border-sidebar-border shrink-0",children:/* @__PURE__ */pe("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Related"})}),/* @__PURE__ */pe("div",{className:"flex-1 overflow-auto px-1 py-1",children:0===Y.length?/* @__PURE__ */pe("div",{className:"px-2 py-3 text-xs text-muted-foreground",children:"No related documents found"}):Y.map(({document:e,sharedKeywordCount:t})=>/* @__PURE__ */me("div",{className:"group flex items-center gap-2 px-2 py-1.5 rounded-md cursor-pointer transition-colors hover:bg-sidebar-accent",onClick:()=>B(e.id),children:[
|
|
239
|
+
/* @__PURE__ */pe(Xe,{className:"shrink-0 h-4 w-4 text-muted-foreground"}),
|
|
240
|
+
/* @__PURE__ */pe("span",{className:"flex-1 truncate text-sm",children:e.title}),
|
|
241
|
+
/* @__PURE__ */pe("span",{className:"shrink-0 text-xs text-muted-foreground",children:t})]},e.id))})]});case"ai":/* @__PURE__ */return me("div",{className:"h-full overflow-hidden flex flex-col",children:[/* @__PURE__ */pe("div",{className:"px-3 py-2 border-b border-sidebar-border shrink-0",children:/* @__PURE__ */pe("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"AI Suggestions"})}),/* @__PURE__ */pe("div",{className:"flex-1 overflow-hidden",children:M?.isAiLoading?/* @__PURE__ */pe("div",{className:"h-full flex items-center justify-center p-6",children:/* @__PURE__ */me("div",{className:"text-center",children:[/* @__PURE__ */pe(Ze,{className:"h-8 w-8 animate-spin text-muted-foreground mx-auto mb-3"}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"Generating AI suggestion..."})]})}):M?.aiSuggestion?/* @__PURE__ */pe(ff,{originalText:M.aiSuggestion.originalText,suggestedText:M.aiSuggestion.suggestedText,onApprove:()=>M.onAiApprove?.(),onReject:()=>M.onAiReject?.(),onRegenerate:e=>M.onAiRegenerate?.(e),currentMode:M.aiSuggestion.mode,isLoading:!1}):/* @__PURE__ */pe("div",{className:"h-full flex items-center justify-center p-6 text-center",children:/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"Select text and click the AI button to get suggestions"})})})]})}};return 0===e.length?/* @__PURE__ */pe("div",{className:"h-full flex items-center justify-center p-6 text-center",children:/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"No panels enabled"})}):1!==e.length&&t?/* @__PURE__ */pe("div",{className:"h-full",children:/* @__PURE__ */pe(If,{direction:"vertical",onResize:G,children:e.map((t,n)=>/* @__PURE__ */pe(yf,{size:U?.[n]||`${Math.round(100/e.length)}%`,minSize:"0px",children:K(t)},t))})}):/* @__PURE__ */pe("div",{className:"h-full",children:K(e[0])})},_f="bg-white/10 dark:bg-black/20 backdrop-blur-md border-white/15 dark:border-white/10",zf=({documents:e,activeId:t,activeDocument:n,onSelect:r,onAdd:a,onDelete:o,onDuplicate:i,onMove:s,onManageTags:l,onRename:c,onSearchFocus:d,isOpen:u,onOpenChange:h,isMobile:p,leftPanels:m,onLeftPanelsChange:f,leftSplit:g,onLeftSplitChange:v,rightPanels:y,onRightPanelsChange:b,rightSplit:x,onRightSplitChange:w,onSettingsClick:S,onRestore:k,newDocumentId:C,showDynamicIsland:N,onToggleDynamicIsland:T,activeFileSourceId:A="local-default",onFileSourceChange:M,headings:I=[],onNavigate:D,editorRef:E,openTabs:R=[],activeTab:_,onTabChange:z,onTabClose:P,onTabRename:O,onSplitRight:L,onReopenLastClosed:F,canReopenLastClosed:B=!1,aiProps:V,tabItems:H,onNewChat:$})=>{const q=e.filter(e=>e.isDeleted),j=e.filter(e=>!e.isDeleted),[U,G]=le(0),W=ie(()=>{const e=new Map(j.map(e=>[e.id,e]));let t=0;for(const n of j){if(!n.isFolder)continue;let r=1,a=n.parentId;const o=/* @__PURE__ */new Set;for(;a&&e.has(a)&&!o.has(a);)o.add(a),r++,a=e.get(a)?.parentId??null;t=Math.max(t,r)}return t},[j]);te(()=>{G(e=>Math.min(e,W))},[W]);const[Y,K]=le(!0),X=se(null),Z=se(null),[J]=le(()=>Vl()),[Q,ee]=le(()=>{const e=Vl();return e.find(e=>e.id===A)||e[0]||null}),[ne,re]=le(!1);te(()=>{const e=J.find(e=>e.id===A);e&&e.id!==Q?.id&&ee(e)},[A,Q?.id,J]);const ae=U>0&&U>=W,oe=0===U?W>1?"Expand Level 1":"Expand All":ae?"Collapse All":`Expand Level ${U+1}`;te(()=>{if(C&&X.current){const e=setTimeout(()=>{const e=X.current;e&&"function"==typeof e.edit&&e.edit(C)},100);return()=>clearTimeout(e)}},[C]);const ce={leftPanels:m,leftSplit:g,onLeftPanelsChange:f,onLeftSplitChange:v,rightPanels:y,rightSplit:x,onRightPanelsChange:b,onRightSplitChange:w,activeId:t,onAdd:a,onSearchFocus:d,onFileManagerOpen:()=>re(!0),sources:J,activeSource:Q,activeFileSourceId:A,onFileSourceChange:M,onSourceSelect:e=>{const t=J.find(t=>t.id===e);t&&(ee(t),M?.(e))},allExpanded:ae,expandToggleLabel:oe,outlineExpanded:Y,onToggleAllExpanded:()=>{if(0===W)return;const e=U>=W?0:U+1;G(e),X.current&&(0===e?(X.current.cancelExpand?.(),X.current.collapseAll()):X.current.expandToLevel(e))},onToggleOutlineExpanded:()=>{const e=!Y;K(e),Z.current&&(e?Z.current.expandAll():Z.current.collapseAll())},treeRef:X,outlineRef:Z,deletedDocs:q,onRestore:k,onSettingsClick:S,showDynamicIsland:N,onToggleDynamicIsland:T,isMobile:p,openTabs:R,activeTab:_,onTabChange:z,onTabClose:P,documents:e,tabItems:H},de={panels:m,split:g,persistenceKey:"left",activeDocuments:j,activeId:t,activeDocument:n,headings:I,isMobile:p,onSelect:r,onAdd:a,onDelete:o,onDuplicate:i,onMove:s,onManageTags:l,onRename:c,onOpenChange:h,treeRef:X,outlineRef:Z,editorRef:E,openTabs:R,activeTab:_,onTabChange:z,onTabClose:P,onTabRename:O,onSplitRight:L,onReopenLastClosed:F,canReopenLastClosed:B,onNavigate:D,aiProps:V,tabItems:H,onNewChat:$};return p?/* @__PURE__ */pe(Dl,{open:u,onOpenChange:h,children:/* @__PURE__ */pe(_l,{side:"left",className:Il("w-80 p-0",_f),children:/* @__PURE__ */me("aside",{className:"h-full flex flex-col",children:[
|
|
239
242
|
/* @__PURE__ */pe(wp,{...ce}),
|
|
240
|
-
/* @__PURE__ */pe("div",{className:"flex-1 min-h-0 overflow-hidden",children:/* @__PURE__ */pe(
|
|
241
|
-
/* @__PURE__ */pe(Qh,{open:ne,onOpenChange:re,documents:j,onSelectDocument:r})]})})}):/* @__PURE__ */me("aside",{className:Il("h-screen w-full flex flex-col pt-14",
|
|
243
|
+
/* @__PURE__ */pe("div",{className:"flex-1 min-h-0 overflow-hidden",children:/* @__PURE__ */pe(Rf,{...de})}),
|
|
244
|
+
/* @__PURE__ */pe(Qh,{open:ne,onOpenChange:re,documents:j,onSelectDocument:r})]})})}):/* @__PURE__ */me("aside",{className:Il("h-screen w-full flex flex-col pt-14",_f),children:[
|
|
242
245
|
/* @__PURE__ */pe(wp,{...ce}),
|
|
243
|
-
/* @__PURE__ */pe("div",{className:"flex-1 min-h-0 overflow-hidden",children:/* @__PURE__ */pe(
|
|
244
|
-
/* @__PURE__ */pe(Qh,{open:ne,onOpenChange:re,documents:j,onSelectDocument:r})]})},
|
|
245
|
-
return pe(m,{"data-slot":"avatar",className:Il("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function
|
|
246
|
-
return pe(g,{"data-slot":"avatar-image",className:Il("aspect-square size-full",e),...t})}function
|
|
247
|
-
return pe(u,{"data-slot":"avatar-fallback",className:Il("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function
|
|
248
|
-
return pe("textarea",{"data-slot":"textarea",className:Il("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-2xl border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}function
|
|
246
|
+
/* @__PURE__ */pe("div",{className:"flex-1 min-h-0 overflow-hidden",children:/* @__PURE__ */pe(Rf,{...de})}),
|
|
247
|
+
/* @__PURE__ */pe(Qh,{open:ne,onOpenChange:re,documents:j,onSelectDocument:r})]})},Pf=({editor:e,theme:t,setTheme:n})=>{const[r,a]=le(!1);return s(),$(),te(()=>{H.setColor("default"),a(e?.isEditable??!0)},[]),te(()=>(e&&e.on("update",()=>{a(e.isEditable)}),()=>{e&&e.off("update",()=>{a(e.isEditable)})}),[e]),null},Of=C(S());function Lf({className:e,...t}){/* @__PURE__ */
|
|
248
|
+
return pe(m,{"data-slot":"avatar",className:Il("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function Ff({className:e,...t}){/* @__PURE__ */
|
|
249
|
+
return pe(g,{"data-slot":"avatar-image",className:Il("aspect-square size-full",e),...t})}function Bf({className:e,...t}){/* @__PURE__ */
|
|
250
|
+
return pe(u,{"data-slot":"avatar-fallback",className:Il("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function Vf({className:e,...t}){/* @__PURE__ */
|
|
251
|
+
return pe("textarea",{"data-slot":"textarea",className:Il("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-2xl border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}function Hf(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function $f({thread:e,active:t,onSelect:n,onSubmitBody:r,onReply:a,onResolve:o,onRemove:i}){const[s,l]=le(""),c=se(null),d=!e.text.trim();te(()=>{t&&d&&c.current?.focus()},[t,d]);const u=()=>{const t=s.trim();t&&(d?r(e.id,t):a(e.id,t),l(""))};/* @__PURE__ */
|
|
249
252
|
return me("div",{role:"button",tabIndex:0,onClick:()=>n(e.id),onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||n(e.id)},className:Il("rounded-lg border bg-card p-3 text-left shadow-sm transition-colors cursor-pointer",t?"border-primary ring-1 ring-primary/40":"hover:border-primary/40",e.resolved&&"opacity-70"),children:[
|
|
250
253
|
/* @__PURE__ */me("div",{className:"flex items-center gap-2",children:[
|
|
251
|
-
/* @__PURE__ */pe(
|
|
254
|
+
/* @__PURE__ */pe(Lf,{className:"h-6 w-6",children:/* @__PURE__ */pe(Bf,{className:"text-[10px]",style:{backgroundColor:e.authorColor,color:"#fff"},children:(h=e.authorName,h.split(" ").map(e=>e[0]).filter(Boolean).slice(0,2).join("").toUpperCase())})}),
|
|
252
255
|
/* @__PURE__ */pe("span",{className:"text-sm font-medium truncate flex-1",children:e.authorName}),
|
|
253
|
-
/* @__PURE__ */pe("span",{className:"text-[11px] text-muted-foreground shrink-0",children:
|
|
256
|
+
/* @__PURE__ */pe("span",{className:"text-[11px] text-muted-foreground shrink-0",children:Hf(e.timestamp)}),e.resolved&&/* @__PURE__ */pe(df,{variant:"secondary",className:"shrink-0",children:"Resolved"})]}),!d&&/* @__PURE__ */pe("p",{className:"mt-2 whitespace-pre-wrap break-words text-sm",children:e.text}),e.replies?.length>0&&/* @__PURE__ */pe("div",{className:"mt-2 space-y-2 border-l-2 border-border pl-2",children:e.replies.map(e=>/* @__PURE__ */me("div",{children:[/* @__PURE__ */me("div",{className:"flex items-center gap-1.5",children:[/* @__PURE__ */pe("span",{className:"text-xs font-medium",children:e.authorName}),/* @__PURE__ */pe("span",{className:"text-[10px] text-muted-foreground",children:Hf(e.timestamp)})]}),/* @__PURE__ */pe("p",{className:"whitespace-pre-wrap break-words text-sm",children:e.text})]},e.id))}),!e.resolved&&/* @__PURE__ */me("div",{className:"mt-2",onClick:e=>e.stopPropagation(),children:[/* @__PURE__ */pe(Vf,{ref:c,value:s,onChange:e=>l(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),u())},placeholder:d?"Write a comment…":"Reply…",className:"min-h-[56px] text-sm"}),/* @__PURE__ */me("div",{className:"mt-1.5 flex items-center justify-between",children:[/* @__PURE__ */me("div",{className:"flex gap-1",children:[!d&&/* @__PURE__ */me(tp,{variant:"ghost",size:"sm",className:"h-7 gap-1 px-2 text-xs",onClick:()=>o(e.id,!0),children:[/* @__PURE__ */pe(ve,{className:"h-3.5 w-3.5"})," Resolve"]}),/* @__PURE__ */me(tp,{variant:"ghost",size:"sm",className:"h-7 gap-1 px-2 text-xs text-destructive hover:text-destructive",onClick:()=>i(e.id),children:[/* @__PURE__ */pe(xt,{className:"h-3.5 w-3.5"})," Delete"]})]}),/* @__PURE__ */pe(tp,{size:"sm",className:"h-7 px-3 text-xs",onClick:u,disabled:!s.trim(),children:d?"Comment":"Reply"})]})]}),e.resolved&&/* @__PURE__ */me("div",{className:"mt-2 flex gap-1",onClick:e=>e.stopPropagation(),children:[/* @__PURE__ */me(tp,{variant:"ghost",size:"sm",className:"h-7 gap-1 px-2 text-xs",onClick:()=>o(e.id,!1),children:[/* @__PURE__ */pe(ut,{className:"h-3.5 w-3.5"})," Reopen"]}),/* @__PURE__ */me(tp,{variant:"ghost",size:"sm",className:"h-7 gap-1 px-2 text-xs text-destructive hover:text-destructive",onClick:()=>i(e.id),children:[/* @__PURE__ */pe(xt,{className:"h-3.5 w-3.5"})," Delete"]})]})]});var h}function qf({threads:e,activeId:t,onSelect:n,onSubmitBody:r,onReply:a,onResolve:o,onRemove:i,onClose:s}){const l=e.filter(e=>!e.resolved),c=e.filter(e=>e.resolved);/* @__PURE__ */
|
|
254
257
|
return me("aside",{className:"flex h-full w-full flex-col border-l border-border bg-background",children:[/* @__PURE__ */me("div",{className:"flex items-center justify-between border-b border-border px-3 py-2",children:[/* @__PURE__ */pe("h2",{className:"text-sm font-semibold",children:"Comments"}),/* @__PURE__ */pe(tp,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:s,"aria-label":"Close comments",children:/* @__PURE__ */pe(Nt,{className:"h-4 w-4"})})]}),/* @__PURE__ */pe("div",{className:"flex-1 space-y-2 overflow-y-auto p-3",children:0===e.length?/* @__PURE__ */me("div",{className:"flex flex-col items-center gap-2 py-10 text-center text-muted-foreground",children:[
|
|
255
258
|
/* @__PURE__ */pe(rt,{className:"h-8 w-8 opacity-50"}),
|
|
256
259
|
/* @__PURE__ */pe("p",{className:"text-sm",children:"No comments yet"}),
|
|
257
|
-
/* @__PURE__ */pe("p",{className:"text-xs",children:"Select text in the document, then choose “Comment”."})]}):/* @__PURE__ */me(he,{children:[l.map(e=>/* @__PURE__ */pe(Lf,{thread:e,active:e.id===t,onSelect:n,onSubmitBody:r,onReply:a,onResolve:o,onRemove:i},e.id)),c.length>0&&/* @__PURE__ */me("div",{className:"pt-2",children:[/* @__PURE__ */me("p",{className:"mb-1 px-1 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:["Resolved (",c.length,")"]}),/* @__PURE__ */pe("div",{className:"space-y-2",children:c.map(e=>/* @__PURE__ */pe(Lf,{thread:e,active:e.id===t,onSelect:n,onSubmitBody:r,onReply:a,onResolve:o,onRemove:i},e.id))})]})]})})]})}var Bf="comment";function Vf(e,t){let n=null,r=null;return e.state.doc.descendants((e,a)=>{e.isText&&e.marks.some(e=>e.type.name===Bf&&e.attrs.id===t)&&(null===n&&(n=a),r=a+e.nodeSize)}),null===n||null===r?null:{from:n,to:r}}var Hf=class e extends Error{constructor(t,n){var r,a,o="KaTeX parse error: "+t,i=n&&n.loc;if(i&&i.start<=i.end){var s=i.lexer.input;r=i.start,a=i.end,r===s.length?o+=" at end of input: ":o+=" at position "+(r+1)+": ";var l=s.slice(r,a).replace(/[^]/g,"$&̲");o+=(r>15?"…"+s.slice(r-15,r):s.slice(0,r))+l+(a+15<s.length?s.slice(a,a+15)+"…":s.slice(a))}super(o),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=r,null!=r&&null!=a&&(this.length=a-r),this.rawMessage=t}},$f=/([A-Z])/g,qf=e=>e.replace($f,"-$1").toLowerCase(),jf={"&":"&",">":">","<":"<",'"':""","'":"'"},Uf=/[&><"']/g,Gf=e=>String(e).replace(Uf,e=>jf[e]),Wf=e=>"ordgroup"===e.type||"color"===e.type?1===e.body.length?Wf(e.body[0]):e:"font"===e.type?Wf(e.body):e,Yf=/* @__PURE__ */new Set(["mathord","textord","atom"]),Kf=e=>Yf.has(Wf(e).type),Xf={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Zf(e){return void 0!==e.default?e.default:function(e){if("string"!=typeof e)return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}(Array.isArray(e.type)?e.type[0]:e.type)}function Jf(e,t,n,r){var a=n[t];e[t]=void 0!==a?r.processor?r.processor(a):a:Zf(r)}var Qf=class{constructor(e){for(var t of(void 0===e&&(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=e||{},Object.keys(Xf))){var n=Xf[t];n&&Jf(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if("function"==typeof r&&(r=r(e,t,n)),r&&"ignore"!==r&&(!0===r||"error"===r))throw new Hf("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n)}useStrictBehavior(e,t,n){var r=this.strict;if("function"==typeof r)try{r=r(e,t,n)}catch(a){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r)}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=(e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"})(e.url);if(null==t)return!1;e.protocol=t}var n="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(n)}},eg=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 tg[ng[this.id]]}sub(){return tg[rg[this.id]]}fracNum(){return tg[ag[this.id]]}fracDen(){return tg[og[this.id]]}cramp(){return tg[ig[this.id]]}text(){return tg[sg[this.id]]}isTight(){return this.size>=2}},tg=[new eg(0,0,!1),new eg(1,0,!0),new eg(2,1,!1),new eg(3,1,!0),new eg(4,2,!1),new eg(5,2,!0),new eg(6,3,!1),new eg(7,3,!0)],ng=[4,5,4,5,6,7,6,7],rg=[5,5,5,5,7,7,7,7],ag=[2,3,4,5,6,7,6,7],og=[3,3,5,5,7,7,7,7],ig=[1,1,3,3,5,5,7,7],sg=[0,1,2,3,2,3,2,3],lg={DISPLAY:tg[0],TEXT:tg[2],SCRIPT:tg[4],SCRIPTSCRIPT:tg[6]},cg=[{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]]}];var dg=[];function ug(e){for(var t=0;t<dg.length;t+=2)if(e>=dg[t]&&e<=dg[t+1])return!0;return!1}cg.forEach(e=>e.blocks.forEach(e=>dg.push(...e)));var hg=e=>e+" "+e,pg=80,mg={doubleleftarrow:"M262 157\nl10-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\n 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\n 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\nc2 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\n 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\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-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\n 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\n-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\n-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\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-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\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 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\n-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\nc-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\n 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\n 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\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 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\n 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\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 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\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-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\n-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\n-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\n 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\n-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\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 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\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 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\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-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\n-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\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:hg("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:hg("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:hg("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:hg("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.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\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:hg("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:"M200428 334\nc-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\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 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\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.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\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 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\n-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\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.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\n60.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\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 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\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.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\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 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\n-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\n 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\n 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\n-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\n-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\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-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\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.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\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-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\n 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\n 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\n-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\n-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\n 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\n-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\n 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\nm0 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\n 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\n-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\n-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\n 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\n 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\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-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\n 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\n-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\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:hg("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:hg("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:hg("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-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\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 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\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 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\nc-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\n 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\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 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\n-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\n 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\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-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\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 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\n 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\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -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\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-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\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-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\n-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\n-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\n-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,\n-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,\n-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,\n-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,\n-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\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-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\ns-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\n121.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\ns2.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\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-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\n13.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\n-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\n-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\n-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\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,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\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-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\nc-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\nM0 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\nc1.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,\n1c0,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,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 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\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-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\nc-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\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};var fg=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("toText"in e)return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}},gg={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},vg={ex:!0,em:!0,mu:!0},yg=function(e){return"string"!=typeof e&&(e=e.unit),e in gg||e in vg||"ex"===e},bg=function(e,t){var n;if(e.unit in gg)n=gg[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new Hf("Invalid unit: '"+e.unit+"'");n=r.fontMetrics().quad}r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},xg=function(e){return+e.toFixed(4)+"em"},wg=function(e){return e.filter(e=>e).join(" ")},Sg=function(e){var t="";for(var n of Object.keys(e)){var r=e[n];void 0!==r&&(t+=qf(n)+":"+r+";")}return t},kg=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)}},Cg=function(e){var t=document.createElement(e);for(var n of(t.className=wg(this.classes),Object.assign(t.style,this.style),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},Ng=/[\s"'>/=\x00-\x1f]/,Tg=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Gf(wg(this.classes))+'"');var n=Sg(this.style);for(var r of(n&&(t+=' style="'+Gf(n)+'"'),Object.keys(this.attributes))){if(Ng.test(r))throw new Hf("Invalid attribute name '"+r+"'");t+=" "+r+'="'+Gf(this.attributes[r])+'"'}t+=">";for(var a=0;a<this.children.length;a++)t+=this.children[a].toMarkup();return t+="</"+e+">"},Ag=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,kg.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Cg.call(this,"span")}toMarkup(){return Tg.call(this,"span")}},Mg=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,kg.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 Cg.call(this,"a")}toMarkup(){return Tg.call(this,"a")}},Ig=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="'+Gf(this.src)+'" alt="'+Gf(this.alt)+'"',t=Sg(this.style);return t&&(e+=' style="'+Gf(t)+'"'),e+="'/>"}},Dg={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},Eg=class{constructor(e,t,n,r,a,o,i,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=a||0,this.width=o||0,this.classes=i||[],this.style=s||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<cg.length;t++)for(var n=cg[t],r=0;r<n.blocks.length;r++){var a=n.blocks[r];if(e>=a[0]&&e<=a[1])return n.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Dg[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")).style.marginRight=xg(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=wg(this.classes)),Object.keys(this.style).length>0&&(t=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+=Gf(wg(this.classes)),t+='"');var n="";this.italic>0&&(n+="margin-right:"+xg(this.italic)+";"),(n+=Sg(this.style))&&(e=!0,t+=' style="'+Gf(n)+'"');var r=Gf(this.text);return e?(t+=">",t+=r,t+="</span>"):r}},Rg=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+'="'+Gf(this.attributes[t])+'"';e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>"}},_g=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",mg[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+Gf(this.alternate)+'"/>':'<path d="'+Gf(mg[this.pathName])+'"/>'}},zg=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+'="'+Gf(this.attributes[t])+'"';return e+="/>"}};var Pg={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Og={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]},Lg={"Å":"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 Fg(e,t,n){if(!Pg[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),a=Pg[t][r];if(!a&&e[0]in Lg&&(r=Lg[e[0]].charCodeAt(0),a=Pg[t][r]),a||"text"!==n||ug(r)&&(a=Pg[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var Bg={};var Vg={math:{},text:{}};function Hg(e,t,n,r,a,o){Vg[e][a]={font:t,group:n,replace:r},o&&r&&(Vg[e][r]=Vg[e][a])}var $g="math",qg="text",jg="main",Ug="ams",Gg="accent-token",Wg="bin",Yg="close",Kg="inner",Xg="mathord",Zg="op-token",Jg="open",Qg="punct",ev="rel",tv="spacing",nv="textord";Hg($g,jg,ev,"≡","\\equiv",!0),Hg($g,jg,ev,"≺","\\prec",!0),Hg($g,jg,ev,"≻","\\succ",!0),Hg($g,jg,ev,"∼","\\sim",!0),Hg($g,jg,ev,"⊥","\\perp"),Hg($g,jg,ev,"⪯","\\preceq",!0),Hg($g,jg,ev,"⪰","\\succeq",!0),Hg($g,jg,ev,"≃","\\simeq",!0),Hg($g,jg,ev,"∣","\\mid",!0),Hg($g,jg,ev,"≪","\\ll",!0),Hg($g,jg,ev,"≫","\\gg",!0),Hg($g,jg,ev,"≍","\\asymp",!0),Hg($g,jg,ev,"∥","\\parallel"),Hg($g,jg,ev,"⋈","\\bowtie",!0),Hg($g,jg,ev,"⌣","\\smile",!0),Hg($g,jg,ev,"⊑","\\sqsubseteq",!0),Hg($g,jg,ev,"⊒","\\sqsupseteq",!0),Hg($g,jg,ev,"≐","\\doteq",!0),Hg($g,jg,ev,"⌢","\\frown",!0),Hg($g,jg,ev,"∋","\\ni",!0),Hg($g,jg,ev,"∝","\\propto",!0),Hg($g,jg,ev,"⊢","\\vdash",!0),Hg($g,jg,ev,"⊣","\\dashv",!0),Hg($g,jg,ev,"∋","\\owns"),Hg($g,jg,Qg,".","\\ldotp"),Hg($g,jg,Qg,"⋅","\\cdotp"),Hg($g,jg,Qg,"⋅","·"),Hg(qg,jg,nv,"⋅","·"),Hg($g,jg,nv,"#","\\#"),Hg(qg,jg,nv,"#","\\#"),Hg($g,jg,nv,"&","\\&"),Hg(qg,jg,nv,"&","\\&"),Hg($g,jg,nv,"ℵ","\\aleph",!0),Hg($g,jg,nv,"∀","\\forall",!0),Hg($g,jg,nv,"ℏ","\\hbar",!0),Hg($g,jg,nv,"∃","\\exists",!0),Hg($g,jg,nv,"∇","\\nabla",!0),Hg($g,jg,nv,"♭","\\flat",!0),Hg($g,jg,nv,"ℓ","\\ell",!0),Hg($g,jg,nv,"♮","\\natural",!0),Hg($g,jg,nv,"♣","\\clubsuit",!0),Hg($g,jg,nv,"℘","\\wp",!0),Hg($g,jg,nv,"♯","\\sharp",!0),Hg($g,jg,nv,"♢","\\diamondsuit",!0),Hg($g,jg,nv,"ℜ","\\Re",!0),Hg($g,jg,nv,"♡","\\heartsuit",!0),Hg($g,jg,nv,"ℑ","\\Im",!0),Hg($g,jg,nv,"♠","\\spadesuit",!0),Hg($g,jg,nv,"§","\\S",!0),Hg(qg,jg,nv,"§","\\S"),Hg($g,jg,nv,"¶","\\P",!0),Hg(qg,jg,nv,"¶","\\P"),Hg($g,jg,nv,"†","\\dag"),Hg(qg,jg,nv,"†","\\dag"),Hg(qg,jg,nv,"†","\\textdagger"),Hg($g,jg,nv,"‡","\\ddag"),Hg(qg,jg,nv,"‡","\\ddag"),Hg(qg,jg,nv,"‡","\\textdaggerdbl"),Hg($g,jg,Yg,"⎱","\\rmoustache",!0),Hg($g,jg,Jg,"⎰","\\lmoustache",!0),Hg($g,jg,Yg,"⟯","\\rgroup",!0),Hg($g,jg,Jg,"⟮","\\lgroup",!0),Hg($g,jg,Wg,"∓","\\mp",!0),Hg($g,jg,Wg,"⊖","\\ominus",!0),Hg($g,jg,Wg,"⊎","\\uplus",!0),Hg($g,jg,Wg,"⊓","\\sqcap",!0),Hg($g,jg,Wg,"∗","\\ast"),Hg($g,jg,Wg,"⊔","\\sqcup",!0),Hg($g,jg,Wg,"◯","\\bigcirc",!0),Hg($g,jg,Wg,"∙","\\bullet",!0),Hg($g,jg,Wg,"‡","\\ddagger"),Hg($g,jg,Wg,"≀","\\wr",!0),Hg($g,jg,Wg,"⨿","\\amalg"),Hg($g,jg,Wg,"&","\\And"),Hg($g,jg,ev,"⟵","\\longleftarrow",!0),Hg($g,jg,ev,"⇐","\\Leftarrow",!0),Hg($g,jg,ev,"⟸","\\Longleftarrow",!0),Hg($g,jg,ev,"⟶","\\longrightarrow",!0),Hg($g,jg,ev,"⇒","\\Rightarrow",!0),Hg($g,jg,ev,"⟹","\\Longrightarrow",!0),Hg($g,jg,ev,"↔","\\leftrightarrow",!0),Hg($g,jg,ev,"⟷","\\longleftrightarrow",!0),Hg($g,jg,ev,"⇔","\\Leftrightarrow",!0),Hg($g,jg,ev,"⟺","\\Longleftrightarrow",!0),Hg($g,jg,ev,"↦","\\mapsto",!0),Hg($g,jg,ev,"⟼","\\longmapsto",!0),Hg($g,jg,ev,"↗","\\nearrow",!0),Hg($g,jg,ev,"↩","\\hookleftarrow",!0),Hg($g,jg,ev,"↪","\\hookrightarrow",!0),Hg($g,jg,ev,"↘","\\searrow",!0),Hg($g,jg,ev,"↼","\\leftharpoonup",!0),Hg($g,jg,ev,"⇀","\\rightharpoonup",!0),Hg($g,jg,ev,"↙","\\swarrow",!0),Hg($g,jg,ev,"↽","\\leftharpoondown",!0),Hg($g,jg,ev,"⇁","\\rightharpoondown",!0),Hg($g,jg,ev,"↖","\\nwarrow",!0),Hg($g,jg,ev,"⇌","\\rightleftharpoons",!0),Hg($g,Ug,ev,"≮","\\nless",!0),Hg($g,Ug,ev,"","\\@nleqslant"),Hg($g,Ug,ev,"","\\@nleqq"),Hg($g,Ug,ev,"⪇","\\lneq",!0),Hg($g,Ug,ev,"≨","\\lneqq",!0),Hg($g,Ug,ev,"","\\@lvertneqq"),Hg($g,Ug,ev,"⋦","\\lnsim",!0),Hg($g,Ug,ev,"⪉","\\lnapprox",!0),Hg($g,Ug,ev,"⊀","\\nprec",!0),Hg($g,Ug,ev,"⋠","\\npreceq",!0),Hg($g,Ug,ev,"⋨","\\precnsim",!0),Hg($g,Ug,ev,"⪹","\\precnapprox",!0),Hg($g,Ug,ev,"≁","\\nsim",!0),Hg($g,Ug,ev,"","\\@nshortmid"),Hg($g,Ug,ev,"∤","\\nmid",!0),Hg($g,Ug,ev,"⊬","\\nvdash",!0),Hg($g,Ug,ev,"⊭","\\nvDash",!0),Hg($g,Ug,ev,"⋪","\\ntriangleleft"),Hg($g,Ug,ev,"⋬","\\ntrianglelefteq",!0),Hg($g,Ug,ev,"⊊","\\subsetneq",!0),Hg($g,Ug,ev,"","\\@varsubsetneq"),Hg($g,Ug,ev,"⫋","\\subsetneqq",!0),Hg($g,Ug,ev,"","\\@varsubsetneqq"),Hg($g,Ug,ev,"≯","\\ngtr",!0),Hg($g,Ug,ev,"","\\@ngeqslant"),Hg($g,Ug,ev,"","\\@ngeqq"),Hg($g,Ug,ev,"⪈","\\gneq",!0),Hg($g,Ug,ev,"≩","\\gneqq",!0),Hg($g,Ug,ev,"","\\@gvertneqq"),Hg($g,Ug,ev,"⋧","\\gnsim",!0),Hg($g,Ug,ev,"⪊","\\gnapprox",!0),Hg($g,Ug,ev,"⊁","\\nsucc",!0),Hg($g,Ug,ev,"⋡","\\nsucceq",!0),Hg($g,Ug,ev,"⋩","\\succnsim",!0),Hg($g,Ug,ev,"⪺","\\succnapprox",!0),Hg($g,Ug,ev,"≆","\\ncong",!0),Hg($g,Ug,ev,"","\\@nshortparallel"),Hg($g,Ug,ev,"∦","\\nparallel",!0),Hg($g,Ug,ev,"⊯","\\nVDash",!0),Hg($g,Ug,ev,"⋫","\\ntriangleright"),Hg($g,Ug,ev,"⋭","\\ntrianglerighteq",!0),Hg($g,Ug,ev,"","\\@nsupseteqq"),Hg($g,Ug,ev,"⊋","\\supsetneq",!0),Hg($g,Ug,ev,"","\\@varsupsetneq"),Hg($g,Ug,ev,"⫌","\\supsetneqq",!0),Hg($g,Ug,ev,"","\\@varsupsetneqq"),Hg($g,Ug,ev,"⊮","\\nVdash",!0),Hg($g,Ug,ev,"⪵","\\precneqq",!0),Hg($g,Ug,ev,"⪶","\\succneqq",!0),Hg($g,Ug,ev,"","\\@nsubseteqq"),Hg($g,Ug,Wg,"⊴","\\unlhd"),Hg($g,Ug,Wg,"⊵","\\unrhd"),Hg($g,Ug,ev,"↚","\\nleftarrow",!0),Hg($g,Ug,ev,"↛","\\nrightarrow",!0),Hg($g,Ug,ev,"⇍","\\nLeftarrow",!0),Hg($g,Ug,ev,"⇏","\\nRightarrow",!0),Hg($g,Ug,ev,"↮","\\nleftrightarrow",!0),Hg($g,Ug,ev,"⇎","\\nLeftrightarrow",!0),Hg($g,Ug,ev,"△","\\vartriangle"),Hg($g,Ug,nv,"ℏ","\\hslash"),Hg($g,Ug,nv,"▽","\\triangledown"),Hg($g,Ug,nv,"◊","\\lozenge"),Hg($g,Ug,nv,"Ⓢ","\\circledS"),Hg($g,Ug,nv,"®","\\circledR"),Hg(qg,Ug,nv,"®","\\circledR"),Hg($g,Ug,nv,"∡","\\measuredangle",!0),Hg($g,Ug,nv,"∄","\\nexists"),Hg($g,Ug,nv,"℧","\\mho"),Hg($g,Ug,nv,"Ⅎ","\\Finv",!0),Hg($g,Ug,nv,"⅁","\\Game",!0),Hg($g,Ug,nv,"‵","\\backprime"),Hg($g,Ug,nv,"▲","\\blacktriangle"),Hg($g,Ug,nv,"▼","\\blacktriangledown"),Hg($g,Ug,nv,"■","\\blacksquare"),Hg($g,Ug,nv,"⧫","\\blacklozenge"),Hg($g,Ug,nv,"★","\\bigstar"),Hg($g,Ug,nv,"∢","\\sphericalangle",!0),Hg($g,Ug,nv,"∁","\\complement",!0),Hg($g,Ug,nv,"ð","\\eth",!0),Hg(qg,jg,nv,"ð","ð"),Hg($g,Ug,nv,"╱","\\diagup"),Hg($g,Ug,nv,"╲","\\diagdown"),Hg($g,Ug,nv,"□","\\square"),Hg($g,Ug,nv,"□","\\Box"),Hg($g,Ug,nv,"◊","\\Diamond"),Hg($g,Ug,nv,"¥","\\yen",!0),Hg(qg,Ug,nv,"¥","\\yen",!0),Hg($g,Ug,nv,"✓","\\checkmark",!0),Hg(qg,Ug,nv,"✓","\\checkmark"),Hg($g,Ug,nv,"ℶ","\\beth",!0),Hg($g,Ug,nv,"ℸ","\\daleth",!0),Hg($g,Ug,nv,"ℷ","\\gimel",!0),Hg($g,Ug,nv,"ϝ","\\digamma",!0),Hg($g,Ug,nv,"ϰ","\\varkappa"),Hg($g,Ug,Jg,"┌","\\@ulcorner",!0),Hg($g,Ug,Yg,"┐","\\@urcorner",!0),Hg($g,Ug,Jg,"└","\\@llcorner",!0),Hg($g,Ug,Yg,"┘","\\@lrcorner",!0),Hg($g,Ug,ev,"≦","\\leqq",!0),Hg($g,Ug,ev,"⩽","\\leqslant",!0),Hg($g,Ug,ev,"⪕","\\eqslantless",!0),Hg($g,Ug,ev,"≲","\\lesssim",!0),Hg($g,Ug,ev,"⪅","\\lessapprox",!0),Hg($g,Ug,ev,"≊","\\approxeq",!0),Hg($g,Ug,Wg,"⋖","\\lessdot"),Hg($g,Ug,ev,"⋘","\\lll",!0),Hg($g,Ug,ev,"≶","\\lessgtr",!0),Hg($g,Ug,ev,"⋚","\\lesseqgtr",!0),Hg($g,Ug,ev,"⪋","\\lesseqqgtr",!0),Hg($g,Ug,ev,"≑","\\doteqdot"),Hg($g,Ug,ev,"≓","\\risingdotseq",!0),Hg($g,Ug,ev,"≒","\\fallingdotseq",!0),Hg($g,Ug,ev,"∽","\\backsim",!0),Hg($g,Ug,ev,"⋍","\\backsimeq",!0),Hg($g,Ug,ev,"⫅","\\subseteqq",!0),Hg($g,Ug,ev,"⋐","\\Subset",!0),Hg($g,Ug,ev,"⊏","\\sqsubset",!0),Hg($g,Ug,ev,"≼","\\preccurlyeq",!0),Hg($g,Ug,ev,"⋞","\\curlyeqprec",!0),Hg($g,Ug,ev,"≾","\\precsim",!0),Hg($g,Ug,ev,"⪷","\\precapprox",!0),Hg($g,Ug,ev,"⊲","\\vartriangleleft"),Hg($g,Ug,ev,"⊴","\\trianglelefteq"),Hg($g,Ug,ev,"⊨","\\vDash",!0),Hg($g,Ug,ev,"⊪","\\Vvdash",!0),Hg($g,Ug,ev,"⌣","\\smallsmile"),Hg($g,Ug,ev,"⌢","\\smallfrown"),Hg($g,Ug,ev,"≏","\\bumpeq",!0),Hg($g,Ug,ev,"≎","\\Bumpeq",!0),Hg($g,Ug,ev,"≧","\\geqq",!0),Hg($g,Ug,ev,"⩾","\\geqslant",!0),Hg($g,Ug,ev,"⪖","\\eqslantgtr",!0),Hg($g,Ug,ev,"≳","\\gtrsim",!0),Hg($g,Ug,ev,"⪆","\\gtrapprox",!0),Hg($g,Ug,Wg,"⋗","\\gtrdot"),Hg($g,Ug,ev,"⋙","\\ggg",!0),Hg($g,Ug,ev,"≷","\\gtrless",!0),Hg($g,Ug,ev,"⋛","\\gtreqless",!0),Hg($g,Ug,ev,"⪌","\\gtreqqless",!0),Hg($g,Ug,ev,"≖","\\eqcirc",!0),Hg($g,Ug,ev,"≗","\\circeq",!0),Hg($g,Ug,ev,"≜","\\triangleq",!0),Hg($g,Ug,ev,"∼","\\thicksim"),Hg($g,Ug,ev,"≈","\\thickapprox"),Hg($g,Ug,ev,"⫆","\\supseteqq",!0),Hg($g,Ug,ev,"⋑","\\Supset",!0),Hg($g,Ug,ev,"⊐","\\sqsupset",!0),Hg($g,Ug,ev,"≽","\\succcurlyeq",!0),Hg($g,Ug,ev,"⋟","\\curlyeqsucc",!0),Hg($g,Ug,ev,"≿","\\succsim",!0),Hg($g,Ug,ev,"⪸","\\succapprox",!0),Hg($g,Ug,ev,"⊳","\\vartriangleright"),Hg($g,Ug,ev,"⊵","\\trianglerighteq"),Hg($g,Ug,ev,"⊩","\\Vdash",!0),Hg($g,Ug,ev,"∣","\\shortmid"),Hg($g,Ug,ev,"∥","\\shortparallel"),Hg($g,Ug,ev,"≬","\\between",!0),Hg($g,Ug,ev,"⋔","\\pitchfork",!0),Hg($g,Ug,ev,"∝","\\varpropto"),Hg($g,Ug,ev,"◀","\\blacktriangleleft"),Hg($g,Ug,ev,"∴","\\therefore",!0),Hg($g,Ug,ev,"∍","\\backepsilon"),Hg($g,Ug,ev,"▶","\\blacktriangleright"),Hg($g,Ug,ev,"∵","\\because",!0),Hg($g,Ug,ev,"⋘","\\llless"),Hg($g,Ug,ev,"⋙","\\gggtr"),Hg($g,Ug,Wg,"⊲","\\lhd"),Hg($g,Ug,Wg,"⊳","\\rhd"),Hg($g,Ug,ev,"≂","\\eqsim",!0),Hg($g,jg,ev,"⋈","\\Join"),Hg($g,Ug,ev,"≑","\\Doteq",!0),Hg($g,Ug,Wg,"∔","\\dotplus",!0),Hg($g,Ug,Wg,"∖","\\smallsetminus"),Hg($g,Ug,Wg,"⋒","\\Cap",!0),Hg($g,Ug,Wg,"⋓","\\Cup",!0),Hg($g,Ug,Wg,"⩞","\\doublebarwedge",!0),Hg($g,Ug,Wg,"⊟","\\boxminus",!0),Hg($g,Ug,Wg,"⊞","\\boxplus",!0),Hg($g,Ug,Wg,"⋇","\\divideontimes",!0),Hg($g,Ug,Wg,"⋉","\\ltimes",!0),Hg($g,Ug,Wg,"⋊","\\rtimes",!0),Hg($g,Ug,Wg,"⋋","\\leftthreetimes",!0),Hg($g,Ug,Wg,"⋌","\\rightthreetimes",!0),Hg($g,Ug,Wg,"⋏","\\curlywedge",!0),Hg($g,Ug,Wg,"⋎","\\curlyvee",!0),Hg($g,Ug,Wg,"⊝","\\circleddash",!0),Hg($g,Ug,Wg,"⊛","\\circledast",!0),Hg($g,Ug,Wg,"⋅","\\centerdot"),Hg($g,Ug,Wg,"⊺","\\intercal",!0),Hg($g,Ug,Wg,"⋒","\\doublecap"),Hg($g,Ug,Wg,"⋓","\\doublecup"),Hg($g,Ug,Wg,"⊠","\\boxtimes",!0),Hg($g,Ug,ev,"⇢","\\dashrightarrow",!0),Hg($g,Ug,ev,"⇠","\\dashleftarrow",!0),Hg($g,Ug,ev,"⇇","\\leftleftarrows",!0),Hg($g,Ug,ev,"⇆","\\leftrightarrows",!0),Hg($g,Ug,ev,"⇚","\\Lleftarrow",!0),Hg($g,Ug,ev,"↞","\\twoheadleftarrow",!0),Hg($g,Ug,ev,"↢","\\leftarrowtail",!0),Hg($g,Ug,ev,"↫","\\looparrowleft",!0),Hg($g,Ug,ev,"⇋","\\leftrightharpoons",!0),Hg($g,Ug,ev,"↶","\\curvearrowleft",!0),Hg($g,Ug,ev,"↺","\\circlearrowleft",!0),Hg($g,Ug,ev,"↰","\\Lsh",!0),Hg($g,Ug,ev,"⇈","\\upuparrows",!0),Hg($g,Ug,ev,"↿","\\upharpoonleft",!0),Hg($g,Ug,ev,"⇃","\\downharpoonleft",!0),Hg($g,jg,ev,"⊶","\\origof",!0),Hg($g,jg,ev,"⊷","\\imageof",!0),Hg($g,Ug,ev,"⊸","\\multimap",!0),Hg($g,Ug,ev,"↭","\\leftrightsquigarrow",!0),Hg($g,Ug,ev,"⇉","\\rightrightarrows",!0),Hg($g,Ug,ev,"⇄","\\rightleftarrows",!0),Hg($g,Ug,ev,"↠","\\twoheadrightarrow",!0),Hg($g,Ug,ev,"↣","\\rightarrowtail",!0),Hg($g,Ug,ev,"↬","\\looparrowright",!0),Hg($g,Ug,ev,"↷","\\curvearrowright",!0),Hg($g,Ug,ev,"↻","\\circlearrowright",!0),Hg($g,Ug,ev,"↱","\\Rsh",!0),Hg($g,Ug,ev,"⇊","\\downdownarrows",!0),Hg($g,Ug,ev,"↾","\\upharpoonright",!0),Hg($g,Ug,ev,"⇂","\\downharpoonright",!0),Hg($g,Ug,ev,"⇝","\\rightsquigarrow",!0),Hg($g,Ug,ev,"⇝","\\leadsto"),Hg($g,Ug,ev,"⇛","\\Rrightarrow",!0),Hg($g,Ug,ev,"↾","\\restriction"),Hg($g,jg,nv,"‘","`"),Hg($g,jg,nv,"$","\\$"),Hg(qg,jg,nv,"$","\\$"),Hg(qg,jg,nv,"$","\\textdollar"),Hg($g,jg,nv,"%","\\%"),Hg(qg,jg,nv,"%","\\%"),Hg($g,jg,nv,"_","\\_"),Hg(qg,jg,nv,"_","\\_"),Hg(qg,jg,nv,"_","\\textunderscore"),Hg($g,jg,nv,"∠","\\angle",!0),Hg($g,jg,nv,"∞","\\infty",!0),Hg($g,jg,nv,"′","\\prime"),Hg($g,jg,nv,"△","\\triangle"),Hg($g,jg,nv,"Γ","\\Gamma",!0),Hg($g,jg,nv,"Δ","\\Delta",!0),Hg($g,jg,nv,"Θ","\\Theta",!0),Hg($g,jg,nv,"Λ","\\Lambda",!0),Hg($g,jg,nv,"Ξ","\\Xi",!0),Hg($g,jg,nv,"Π","\\Pi",!0),Hg($g,jg,nv,"Σ","\\Sigma",!0),Hg($g,jg,nv,"Υ","\\Upsilon",!0),Hg($g,jg,nv,"Φ","\\Phi",!0),Hg($g,jg,nv,"Ψ","\\Psi",!0),Hg($g,jg,nv,"Ω","\\Omega",!0),Hg($g,jg,nv,"A","Α"),Hg($g,jg,nv,"B","Β"),Hg($g,jg,nv,"E","Ε"),Hg($g,jg,nv,"Z","Ζ"),Hg($g,jg,nv,"H","Η"),Hg($g,jg,nv,"I","Ι"),Hg($g,jg,nv,"K","Κ"),Hg($g,jg,nv,"M","Μ"),Hg($g,jg,nv,"N","Ν"),Hg($g,jg,nv,"O","Ο"),Hg($g,jg,nv,"P","Ρ"),Hg($g,jg,nv,"T","Τ"),Hg($g,jg,nv,"X","Χ"),Hg($g,jg,nv,"¬","\\neg",!0),Hg($g,jg,nv,"¬","\\lnot"),Hg($g,jg,nv,"⊤","\\top"),Hg($g,jg,nv,"⊥","\\bot"),Hg($g,jg,nv,"∅","\\emptyset"),Hg($g,Ug,nv,"∅","\\varnothing"),Hg($g,jg,Xg,"α","\\alpha",!0),Hg($g,jg,Xg,"β","\\beta",!0),Hg($g,jg,Xg,"γ","\\gamma",!0),Hg($g,jg,Xg,"δ","\\delta",!0),Hg($g,jg,Xg,"ϵ","\\epsilon",!0),Hg($g,jg,Xg,"ζ","\\zeta",!0),Hg($g,jg,Xg,"η","\\eta",!0),Hg($g,jg,Xg,"θ","\\theta",!0),Hg($g,jg,Xg,"ι","\\iota",!0),Hg($g,jg,Xg,"κ","\\kappa",!0),Hg($g,jg,Xg,"λ","\\lambda",!0),Hg($g,jg,Xg,"μ","\\mu",!0),Hg($g,jg,Xg,"ν","\\nu",!0),Hg($g,jg,Xg,"ξ","\\xi",!0),Hg($g,jg,Xg,"ο","\\omicron",!0),Hg($g,jg,Xg,"π","\\pi",!0),Hg($g,jg,Xg,"ρ","\\rho",!0),Hg($g,jg,Xg,"σ","\\sigma",!0),Hg($g,jg,Xg,"τ","\\tau",!0),Hg($g,jg,Xg,"υ","\\upsilon",!0),Hg($g,jg,Xg,"ϕ","\\phi",!0),Hg($g,jg,Xg,"χ","\\chi",!0),Hg($g,jg,Xg,"ψ","\\psi",!0),Hg($g,jg,Xg,"ω","\\omega",!0),Hg($g,jg,Xg,"ε","\\varepsilon",!0),Hg($g,jg,Xg,"ϑ","\\vartheta",!0),Hg($g,jg,Xg,"ϖ","\\varpi",!0),Hg($g,jg,Xg,"ϱ","\\varrho",!0),Hg($g,jg,Xg,"ς","\\varsigma",!0),Hg($g,jg,Xg,"φ","\\varphi",!0),Hg($g,jg,Wg,"∗","*",!0),Hg($g,jg,Wg,"+","+"),Hg($g,jg,Wg,"−","-",!0),Hg($g,jg,Wg,"⋅","\\cdot",!0),Hg($g,jg,Wg,"∘","\\circ",!0),Hg($g,jg,Wg,"÷","\\div",!0),Hg($g,jg,Wg,"±","\\pm",!0),Hg($g,jg,Wg,"×","\\times",!0),Hg($g,jg,Wg,"∩","\\cap",!0),Hg($g,jg,Wg,"∪","\\cup",!0),Hg($g,jg,Wg,"∖","\\setminus",!0),Hg($g,jg,Wg,"∧","\\land"),Hg($g,jg,Wg,"∨","\\lor"),Hg($g,jg,Wg,"∧","\\wedge",!0),Hg($g,jg,Wg,"∨","\\vee",!0),Hg($g,jg,nv,"√","\\surd"),Hg($g,jg,Jg,"⟨","\\langle",!0),Hg($g,jg,Jg,"∣","\\lvert"),Hg($g,jg,Jg,"∥","\\lVert"),Hg($g,jg,Yg,"?","?"),Hg($g,jg,Yg,"!","!"),Hg($g,jg,Yg,"⟩","\\rangle",!0),Hg($g,jg,Yg,"∣","\\rvert"),Hg($g,jg,Yg,"∥","\\rVert"),Hg($g,jg,ev,"=","="),Hg($g,jg,ev,":",":"),Hg($g,jg,ev,"≈","\\approx",!0),Hg($g,jg,ev,"≅","\\cong",!0),Hg($g,jg,ev,"≥","\\ge"),Hg($g,jg,ev,"≥","\\geq",!0),Hg($g,jg,ev,"←","\\gets"),Hg($g,jg,ev,">","\\gt",!0),Hg($g,jg,ev,"∈","\\in",!0),Hg($g,jg,ev,"","\\@not"),Hg($g,jg,ev,"⊂","\\subset",!0),Hg($g,jg,ev,"⊃","\\supset",!0),Hg($g,jg,ev,"⊆","\\subseteq",!0),Hg($g,jg,ev,"⊇","\\supseteq",!0),Hg($g,Ug,ev,"⊈","\\nsubseteq",!0),Hg($g,Ug,ev,"⊉","\\nsupseteq",!0),Hg($g,jg,ev,"⊨","\\models"),Hg($g,jg,ev,"←","\\leftarrow",!0),Hg($g,jg,ev,"≤","\\le"),Hg($g,jg,ev,"≤","\\leq",!0),Hg($g,jg,ev,"<","\\lt",!0),Hg($g,jg,ev,"→","\\rightarrow",!0),Hg($g,jg,ev,"→","\\to"),Hg($g,Ug,ev,"≱","\\ngeq",!0),Hg($g,Ug,ev,"≰","\\nleq",!0),Hg($g,jg,tv," ","\\ "),Hg($g,jg,tv," ","\\space"),Hg($g,jg,tv," ","\\nobreakspace"),Hg(qg,jg,tv," ","\\ "),Hg(qg,jg,tv," "," "),Hg(qg,jg,tv," ","\\space"),Hg(qg,jg,tv," ","\\nobreakspace"),Hg($g,jg,tv,"","\\nobreak"),Hg($g,jg,tv,"","\\allowbreak"),Hg($g,jg,Qg,",",","),Hg($g,jg,Qg,";",";"),Hg($g,Ug,Wg,"⊼","\\barwedge",!0),Hg($g,Ug,Wg,"⊻","\\veebar",!0),Hg($g,jg,Wg,"⊙","\\odot",!0),Hg($g,jg,Wg,"⊕","\\oplus",!0),Hg($g,jg,Wg,"⊗","\\otimes",!0),Hg($g,jg,nv,"∂","\\partial",!0),Hg($g,jg,Wg,"⊘","\\oslash",!0),Hg($g,Ug,Wg,"⊚","\\circledcirc",!0),Hg($g,Ug,Wg,"⊡","\\boxdot",!0),Hg($g,jg,Wg,"△","\\bigtriangleup"),Hg($g,jg,Wg,"▽","\\bigtriangledown"),Hg($g,jg,Wg,"†","\\dagger"),Hg($g,jg,Wg,"⋄","\\diamond"),Hg($g,jg,Wg,"⋆","\\star"),Hg($g,jg,Wg,"◃","\\triangleleft"),Hg($g,jg,Wg,"▹","\\triangleright"),Hg($g,jg,Jg,"{","\\{"),Hg(qg,jg,nv,"{","\\{"),Hg(qg,jg,nv,"{","\\textbraceleft"),Hg($g,jg,Yg,"}","\\}"),Hg(qg,jg,nv,"}","\\}"),Hg(qg,jg,nv,"}","\\textbraceright"),Hg($g,jg,Jg,"{","\\lbrace"),Hg($g,jg,Yg,"}","\\rbrace"),Hg($g,jg,Jg,"[","\\lbrack",!0),Hg(qg,jg,nv,"[","\\lbrack",!0),Hg($g,jg,Yg,"]","\\rbrack",!0),Hg(qg,jg,nv,"]","\\rbrack",!0),Hg($g,jg,Jg,"(","\\lparen",!0),Hg($g,jg,Yg,")","\\rparen",!0),Hg(qg,jg,nv,"<","\\textless",!0),Hg(qg,jg,nv,">","\\textgreater",!0),Hg($g,jg,Jg,"⌊","\\lfloor",!0),Hg($g,jg,Yg,"⌋","\\rfloor",!0),Hg($g,jg,Jg,"⌈","\\lceil",!0),Hg($g,jg,Yg,"⌉","\\rceil",!0),Hg($g,jg,nv,"\\","\\backslash"),Hg($g,jg,nv,"∣","|"),Hg($g,jg,nv,"∣","\\vert"),Hg(qg,jg,nv,"|","\\textbar",!0),Hg($g,jg,nv,"∥","\\|"),Hg($g,jg,nv,"∥","\\Vert"),Hg(qg,jg,nv,"∥","\\textbardbl"),Hg(qg,jg,nv,"~","\\textasciitilde"),Hg(qg,jg,nv,"\\","\\textbackslash"),Hg(qg,jg,nv,"^","\\textasciicircum"),Hg($g,jg,ev,"↑","\\uparrow",!0),Hg($g,jg,ev,"⇑","\\Uparrow",!0),Hg($g,jg,ev,"↓","\\downarrow",!0),Hg($g,jg,ev,"⇓","\\Downarrow",!0),Hg($g,jg,ev,"↕","\\updownarrow",!0),Hg($g,jg,ev,"⇕","\\Updownarrow",!0),Hg($g,jg,Zg,"∐","\\coprod"),Hg($g,jg,Zg,"⋁","\\bigvee"),Hg($g,jg,Zg,"⋀","\\bigwedge"),Hg($g,jg,Zg,"⨄","\\biguplus"),Hg($g,jg,Zg,"⋂","\\bigcap"),Hg($g,jg,Zg,"⋃","\\bigcup"),Hg($g,jg,Zg,"∫","\\int"),Hg($g,jg,Zg,"∫","\\intop"),Hg($g,jg,Zg,"∬","\\iint"),Hg($g,jg,Zg,"∭","\\iiint"),Hg($g,jg,Zg,"∏","\\prod"),Hg($g,jg,Zg,"∑","\\sum"),Hg($g,jg,Zg,"⨂","\\bigotimes"),Hg($g,jg,Zg,"⨁","\\bigoplus"),Hg($g,jg,Zg,"⨀","\\bigodot"),Hg($g,jg,Zg,"∮","\\oint"),Hg($g,jg,Zg,"∯","\\oiint"),Hg($g,jg,Zg,"∰","\\oiiint"),Hg($g,jg,Zg,"⨆","\\bigsqcup"),Hg($g,jg,Zg,"∫","\\smallint"),Hg(qg,jg,Kg,"…","\\textellipsis"),Hg($g,jg,Kg,"…","\\mathellipsis"),Hg(qg,jg,Kg,"…","\\ldots",!0),Hg($g,jg,Kg,"…","\\ldots",!0),Hg($g,jg,Kg,"⋯","\\@cdots",!0),Hg($g,jg,Kg,"⋱","\\ddots",!0),Hg($g,jg,nv,"⋮","\\varvdots"),Hg(qg,jg,nv,"⋮","\\varvdots"),Hg($g,jg,Gg,"ˊ","\\acute"),Hg($g,jg,Gg,"ˋ","\\grave"),Hg($g,jg,Gg,"¨","\\ddot"),Hg($g,jg,Gg,"~","\\tilde"),Hg($g,jg,Gg,"ˉ","\\bar"),Hg($g,jg,Gg,"˘","\\breve"),Hg($g,jg,Gg,"ˇ","\\check"),Hg($g,jg,Gg,"^","\\hat"),Hg($g,jg,Gg,"⃗","\\vec"),Hg($g,jg,Gg,"˙","\\dot"),Hg($g,jg,Gg,"˚","\\mathring"),Hg($g,jg,Xg,"","\\@imath"),Hg($g,jg,Xg,"","\\@jmath"),Hg($g,jg,nv,"ı","ı"),Hg($g,jg,nv,"ȷ","ȷ"),Hg(qg,jg,nv,"ı","\\i",!0),Hg(qg,jg,nv,"ȷ","\\j",!0),Hg(qg,jg,nv,"ß","\\ss",!0),Hg(qg,jg,nv,"æ","\\ae",!0),Hg(qg,jg,nv,"œ","\\oe",!0),Hg(qg,jg,nv,"ø","\\o",!0),Hg(qg,jg,nv,"Æ","\\AE",!0),Hg(qg,jg,nv,"Œ","\\OE",!0),Hg(qg,jg,nv,"Ø","\\O",!0),Hg(qg,jg,Gg,"ˊ","\\'"),Hg(qg,jg,Gg,"ˋ","\\`"),Hg(qg,jg,Gg,"ˆ","\\^"),Hg(qg,jg,Gg,"˜","\\~"),Hg(qg,jg,Gg,"ˉ","\\="),Hg(qg,jg,Gg,"˘","\\u"),Hg(qg,jg,Gg,"˙","\\."),Hg(qg,jg,Gg,"¸","\\c"),Hg(qg,jg,Gg,"˚","\\r"),Hg(qg,jg,Gg,"ˇ","\\v"),Hg(qg,jg,Gg,"¨",'\\"'),Hg(qg,jg,Gg,"˝","\\H"),Hg(qg,jg,Gg,"◯","\\textcircled");var rv={"--":!0,"---":!0,"``":!0,"''":!0};Hg(qg,jg,nv,"–","--",!0),Hg(qg,jg,nv,"–","\\textendash"),Hg(qg,jg,nv,"—","---",!0),Hg(qg,jg,nv,"—","\\textemdash"),Hg(qg,jg,nv,"‘","`",!0),Hg(qg,jg,nv,"‘","\\textquoteleft"),Hg(qg,jg,nv,"’","'",!0),Hg(qg,jg,nv,"’","\\textquoteright"),Hg(qg,jg,nv,"“","``",!0),Hg(qg,jg,nv,"“","\\textquotedblleft"),Hg(qg,jg,nv,"”","''",!0),Hg(qg,jg,nv,"”","\\textquotedblright"),Hg($g,jg,nv,"°","\\degree",!0),Hg(qg,jg,nv,"°","\\degree"),Hg(qg,jg,nv,"°","\\textdegree",!0),Hg($g,jg,nv,"£","\\pounds"),Hg($g,jg,nv,"£","\\mathsterling",!0),Hg(qg,jg,nv,"£","\\pounds"),Hg(qg,jg,nv,"£","\\textsterling",!0),Hg($g,Ug,nv,"✠","\\maltese"),Hg(qg,Ug,nv,"✠","\\maltese");for(var av='0123456789/@."',ov=0;ov<14;ov++){var iv=av.charAt(ov);Hg($g,jg,nv,iv,iv)}for(var sv='0123456789!@*()-=+";:?/.,',lv=0;lv<25;lv++){var cv=sv.charAt(lv);Hg(qg,jg,nv,cv,cv)}for(var dv,uv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",hv=0;hv<52;hv++){var pv=uv.charAt(hv);Hg($g,jg,Xg,pv,pv),Hg(qg,jg,nv,pv,pv)}Hg($g,Ug,nv,"C","ℂ"),Hg(qg,Ug,nv,"C","ℂ"),Hg($g,Ug,nv,"H","ℍ"),Hg(qg,Ug,nv,"H","ℍ"),Hg($g,Ug,nv,"N","ℕ"),Hg(qg,Ug,nv,"N","ℕ"),Hg($g,Ug,nv,"P","ℙ"),Hg(qg,Ug,nv,"P","ℙ"),Hg($g,Ug,nv,"Q","ℚ"),Hg(qg,Ug,nv,"Q","ℚ"),Hg($g,Ug,nv,"R","ℝ"),Hg(qg,Ug,nv,"R","ℝ"),Hg($g,Ug,nv,"Z","ℤ"),Hg(qg,Ug,nv,"Z","ℤ"),Hg($g,jg,Xg,"h","ℎ"),Hg(qg,jg,Xg,"h","ℎ");for(var mv=0;mv<52;mv++){var fv=uv.charAt(mv);Hg($g,jg,Xg,fv,dv=String.fromCharCode(55349,56320+mv)),Hg(qg,jg,nv,fv,dv),Hg($g,jg,Xg,fv,dv=String.fromCharCode(55349,56372+mv)),Hg(qg,jg,nv,fv,dv),Hg($g,jg,Xg,fv,dv=String.fromCharCode(55349,56424+mv)),Hg(qg,jg,nv,fv,dv),Hg($g,jg,Xg,fv,dv=String.fromCharCode(55349,56580+mv)),Hg(qg,jg,nv,fv,dv),Hg($g,jg,Xg,fv,dv=String.fromCharCode(55349,56684+mv)),Hg(qg,jg,nv,fv,dv),Hg($g,jg,Xg,fv,dv=String.fromCharCode(55349,56736+mv)),Hg(qg,jg,nv,fv,dv),Hg($g,jg,Xg,fv,dv=String.fromCharCode(55349,56788+mv)),Hg(qg,jg,nv,fv,dv),Hg($g,jg,Xg,fv,dv=String.fromCharCode(55349,56840+mv)),Hg(qg,jg,nv,fv,dv),Hg($g,jg,Xg,fv,dv=String.fromCharCode(55349,56944+mv)),Hg(qg,jg,nv,fv,dv),mv<26&&(Hg($g,jg,Xg,fv,dv=String.fromCharCode(55349,56632+mv)),Hg(qg,jg,nv,fv,dv),Hg($g,jg,Xg,fv,dv=String.fromCharCode(55349,56476+mv)),Hg(qg,jg,nv,fv,dv))}Hg($g,jg,Xg,"k",dv=String.fromCharCode(55349,56668)),Hg(qg,jg,nv,"k",dv);for(var gv=0;gv<10;gv++){var vv=gv.toString();Hg($g,jg,Xg,vv,dv=String.fromCharCode(55349,57294+gv)),Hg(qg,jg,nv,vv,dv),Hg($g,jg,Xg,vv,dv=String.fromCharCode(55349,57314+gv)),Hg(qg,jg,nv,vv,dv),Hg($g,jg,Xg,vv,dv=String.fromCharCode(55349,57324+gv)),Hg(qg,jg,nv,vv,dv),Hg($g,jg,Xg,vv,dv=String.fromCharCode(55349,57334+gv)),Hg(qg,jg,nv,vv,dv)}for(var yv="ÐÞþ",bv=0;bv<3;bv++){var xv=yv.charAt(bv);Hg($g,jg,Xg,xv,xv),Hg(qg,jg,nv,xv,xv)}var wv={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},Sv={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},kv={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},Cv={mathClass:"",textClass:"",font:""},Nv={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},Tv={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},Av={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},Mv={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},Iv={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},Dv={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},Ev={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},Rv=[wv,wv,Sv,Sv,kv,kv,{mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},Cv,Cv,Cv,Nv,Nv,Tv,Tv,Av,Av,Mv,Mv,Iv,Iv,Dv,Dv,Cv,Cv,Ev,Ev],_v=[wv,Cv,Mv,Iv,Ev],zv=function(e,t,n){if(Vg[n][e]){var r=Vg[n][e].replace;r&&(e=r)}return{value:e,metrics:Fg(e,t,n)}},Pv=function(e,t,n,r,a){var o,i=zv(e,t,n),s=i.metrics;if(e=i.value,s){var l=s.italic;("text"===n||r&&"mathit"===r.font)&&(l=0),o=new Eg(e,s.height,s.depth,l,s.skew,s.width,a)}else o=new Eg(e,0,0,0,0,0,a);if(r){o.maxFontSize=r.sizeMultiplier,r.style.isTight()&&o.classes.push("mtight");var c=r.getColor();c&&(o.style.color=c)}return o},Ov=function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&zv(e,"Main-Bold",t).metrics?Pv(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===Vg[t][e].font?Pv(e,"Main-Regular",t,n,r):Pv(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},Lv=function(e,t){var n="mathord"===e.type?"mathord":"textord",r=e.mode,a=e.text,o=["mord"],{font:i,fontFamily:s,fontWeight:l,fontShape:c}=t,d="math"===r||"text"===r&&!!i,u=d?i:s,h="",p="";if(55349===a.charCodeAt(0)){var m=(e=>{var t=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536;if(119808<=t&&t<120484)return Rv[Math.floor((t-119808)/26)];if(120782<=t&&t<=120831)return _v[Math.floor((t-120782)/10)];if(120485===t||120486===t)return Rv[0];if(120486<t&&t<120782)return Cv;throw new Hf("Unsupported character: "+e)})(a);h=m.font,p=m[r+"Class"]}if(h)return Pv(a,h,r,t,o.concat(p));if(u){var f,g;if("boldsymbol"===u){var v=function(e,t,n){return"textord"!==n&&zv(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(a,r,n);f=v.fontName,g=[v.fontClass]}else d?(f=Kv[i].fontName,g=[i]):(f=Yv(s,l,c),g=[s,l,c]);if(zv(a,f,r).metrics)return Pv(a,f,r,t,o.concat(g));if(rv.hasOwnProperty(a)&&"Typewriter"===f.slice(0,10)){for(var y=[],b=0;b<a.length;b++)y.push(Pv(a[b],f,r,t,o.concat(g)));return jv(y)}}if("mathord"===n)return Pv(a,"Math-Italic",r,t,o.concat(["mathnormal"]));if("textord"===n){var x=Vg[r][a]&&Vg[r][a].font;if("ams"===x)return Pv(a,Yv("amsrm",l,c),r,t,o.concat("amsrm",l,c));if("main"!==x&&x){var w=Yv(x,l,c);return Pv(a,w,r,t,o.concat(w,l,c))}return Pv(a,Yv("textrm",l,c),r,t,o.concat(l,c))}throw new Error("unexpected type: "+n+" in makeOrd")},Fv=(e,t)=>{if(wg(e.classes)!==wg(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||0!==e.italic&&e.hasClass("mathnormal"))return!1;if(1===e.classes.length){var n=e.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var a of Object.keys(t.style))if(e.style[a]!==t.style[a])return!1;return!0},Bv=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof Eg&&r instanceof Eg&&Fv(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},Vv=function(e){for(var t=0,n=0,r=0,a=0;a<e.children.length;a++){var o=e.children[a];o.height>t&&(t=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>r&&(r=o.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},Hv=function(e,t,n,r){var a=new Ag(e,t,n,r);return Vv(a),a},$v=(e,t,n,r)=>new Ag(e,t,n,r),qv=function(e,t,n){var r=Hv([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=xg(r.height),r.maxFontSize=1,r},jv=function(e){var t=new fg(e);return Vv(t),t},Uv=function(e,t){return e instanceof fg?Hv([],[e],t):e},Gv=function(e,t){for(var{children:n,depth:r}=function(e){if("individualShift"===e.positionType){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,a=r,o=1;o<t.length;o++){var i=-t[o].shift-a-t[o].elem.depth,s=i-(t[o-1].elem.height+t[o-1].elem.depth);a+=i,n.push({type:"kern",size:s}),n.push(t[o])}return{children:n,depth:r}}var l;if("top"===e.positionType){for(var c=e.positionData,d=0;d<e.children.length;d++){var u=e.children[d];c-="kern"===u.type?u.size:u.elem.height+u.elem.depth}l=c}else if("bottom"===e.positionType)l=-e.positionData;else{var h=e.children[0];if("elem"!==h.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-h.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-h.elem.depth}}return{children:e.children,depth:l}}(e),a=0,o=0;o<n.length;o++){var i=n[o];if("elem"===i.type){var s=i.elem;a=Math.max(a,s.maxFontSize,s.height)}}a+=2;var l=Hv(["pstrut"],[]);l.style.height=xg(a);for(var c=[],d=r,u=r,h=r,p=0;p<n.length;p++){var m=n[p];if("kern"===m.type)h+=m.size;else{var f=m.elem,g=m.wrapperClasses||[],v=m.wrapperStyle||{},y=Hv(g,[l,f],void 0,v);y.style.top=xg(-a-h-f.depth),m.marginLeft&&(y.style.marginLeft=m.marginLeft),m.marginRight&&(y.style.marginRight=m.marginRight),c.push(y),h+=f.height+f.depth}d=Math.min(d,h),u=Math.max(u,h)}var b,x=Hv(["vlist"],c);if(x.style.height=xg(u),d<0){var w=Hv(["vlist"],[Hv([],[])]);w.style.height=xg(-d),b=[Hv(["vlist-r"],[x,Hv(["vlist-s"],[new Eg("")])]),Hv(["vlist-r"],[w])]}else b=[Hv(["vlist-r"],[x])];var S=Hv(["vlist-t"],b);return 2===b.length&&S.classes.push("vlist-t2"),S.height=u,S.depth=-d,S},Wv=(e,t)=>{var n=Hv(["mspace"],[],t),r=bg(e,t);return n.style.marginRight=xg(r),n},Yv=(e,t,n)=>{var r;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 r+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===n?"Italic":"Regular")},Kv={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"}},Xv={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Zv=function(e,t){var[n,r,a]=Xv[e],o=new _g(n),i=$v(["overlay"],[new Rg([o],{width:xg(r),height:xg(a),style:"width:"+xg(r),viewBox:"0 0 "+1e3*r+" "+1e3*a,preserveAspectRatio:"xMinYMin"})],t);return i.height=a,i.style.height=xg(a),i.style.width=xg(r),i},Jv={number:3,unit:"mu"},Qv={number:4,unit:"mu"},ey={number:5,unit:"mu"},ty={mord:{mop:Jv,mbin:Qv,mrel:ey,minner:Jv},mop:{mord:Jv,mop:Jv,mrel:ey,minner:Jv},mbin:{mord:Qv,mop:Qv,mopen:Qv,minner:Qv},mrel:{mord:ey,mop:ey,mopen:ey,minner:ey},mopen:{},mclose:{mop:Jv,mbin:Qv,mrel:ey,minner:Jv},mpunct:{mord:Jv,mop:Jv,mrel:ey,mopen:Jv,mclose:Jv,mpunct:Jv,minner:Jv},minner:{mord:Jv,mop:Jv,mbin:Qv,mrel:ey,mopen:Jv,mpunct:Jv,minner:Jv}},ny={mord:{mop:Jv},mop:{mord:Jv,mop:Jv},mbin:{},mrel:{},mopen:{},mclose:{mop:Jv},mpunct:{},minner:{mop:Jv}},ry={},ay={},oy={};function iy(e){for(var{type:t,names:n,htmlBuilder:r,mathmlBuilder:a}=e,o=0;o<n.length;++o)ry[n[o]]=e;t&&(r&&(ay[t]=r),a&&(oy[t]=a))}function sy(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;n&&(ay[t]=n),r&&(oy[t]=r)}var ly=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},cy=function(e){return"ordgroup"===e.type?e.body:[e]},dy=/* @__PURE__ */new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),uy=/* @__PURE__ */new Set(["rightmost","mrel","mclose","mpunct"]),hy={display:lg.DISPLAY,text:lg.TEXT,script:lg.SCRIPT,scriptscript:lg.SCRIPTSCRIPT},py={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},my=function(e,t,n,r){void 0===r&&(r=[null,null]);for(var a=[],o=0;o<e.length;o++){var i=xy(e[o],t);if(i instanceof fg){var s=i.children;a.push(...s)}else a.push(i)}if(Bv(a),!n)return a;var l=t;if(1===e.length){var c=e[0];"sizing"===c.type?l=t.havingSize(c.size):"styling"===c.type&&(l=t.havingStyle(hy[c.style]))}var d=Hv([r[0]||"leftmost"],[],t),u=Hv([r[1]||"rightmost"],[],t),h="root"===n;return fy(a,(e,t)=>{var n=t.classes[0],r=e.classes[0];"mbin"===n&&uy.has(r)?t.classes[0]="mord":"mbin"===r&&dy.has(n)&&(e.classes[0]="mord")},{node:d},u,h),fy(a,(e,t)=>{var n,r,a=yy(t),o=yy(e),i=a&&o?e.hasClass("mtight")?null==(n=ny[a])?void 0:n[o]:null==(r=ty[a])?void 0:r[o]:null;if(i)return Wv(i,l)},{node:d},u,h),a},fy=function(e,t,n,r,a){r&&e.push(r);for(var o=0;o<e.length;o++){var i=e[o],s=gy(i);if(s)fy(s.children,t,n,null,a);else{var l=!i.hasClass("mspace");if(l){var c=t(i,n.node);c&&(n.insertAfter?n.insertAfter(c):(e.unshift(c),o++))}l?n.node=i:a&&i.hasClass("newline")&&(n.node=Hv(["leftmost"])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),o++})(o)}}r&&e.pop()},gy=function(e){return e instanceof fg||e instanceof Mg||e instanceof Ag&&e.hasClass("enclosing")?e:null},vy=function(e,t){var n=gy(e);if(n){var r=n.children;if(r.length){if("right"===t)return vy(r[r.length-1],"right");if("left"===t)return vy(r[0],"left")}}return e},yy=function(e,t){return e?(t&&(e=vy(e,t)),py[e.classes[0]]||null):null},by=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Hv(t.concat(n))},xy=function(e,t,n){if(!e)return Hv();if(ay[e.type]){var r=ay[e.type](e,t);if(n&&t.size!==n.size){r=Hv(t.sizingClasses(n),[r],t);var a=t.sizeMultiplier/n.sizeMultiplier;r.height*=a,r.depth*=a}return r}throw new Hf("Got group of unknown type: '"+e.type+"'")};function wy(e,t){var n=Hv(["base"],e,t),r=Hv(["strut"]);return r.style.height=xg(n.height+n.depth),n.depth&&(r.style.verticalAlign=xg(-n.depth)),n.children.unshift(r),n}function Sy(e,t){var n=null;1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body);var r,a=my(e,t,"root");2===a.length&&a[1].hasClass("tag")&&(r=a.pop());for(var o,i=[],s=[],l=0;l<a.length;l++)if(s.push(a[l]),a[l].hasClass("mbin")||a[l].hasClass("mrel")||a[l].hasClass("allowbreak")){for(var c=!1;l<a.length-1&&a[l+1].hasClass("mspace")&&!a[l+1].hasClass("newline");)l++,s.push(a[l]),a[l].hasClass("nobreak")&&(c=!0);c||(i.push(wy(s,t)),s=[])}else a[l].hasClass("newline")&&(s.pop(),s.length>0&&(i.push(wy(s,t)),s=[]),i.push(a[l]));s.length>0&&i.push(wy(s,t)),n?((o=wy(my(n,t,!0),t)).classes=["tag"],i.push(o)):r&&i.push(r);var d=Hv(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),o){var u=o.children[0];u.style.height=xg(d.height+d.depth),d.depth&&(u.style.verticalAlign=xg(-d.depth))}return d}function ky(e){return new fg(e)}var Cy=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=wg(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof Ny&&this.children[n+1]instanceof Ny){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof Ny;)r+=this.children[++n].toText();e.appendChild(new Ny(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+=Gf(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Gf(wg(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map(e=>e.toText()).join("")}},Ny=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Gf(this.toText())}toText(){return this.text}},Ty=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",xg(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+xg(this.width)+'"/>'}toText(){return this.character?this.character:" "}},Ay=/* @__PURE__ */new Set(["\\imath","\\jmath"]),My=/* @__PURE__ */new Set(["mrow","mtable"]),Iy=function(e,t,n){return!Vg[t][e]||!Vg[t][e].replace||55349===e.charCodeAt(0)||rv.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(e=Vg[t][e].replace),new Ny(e)},Dy=function(e){return 1===e.length?e[0]:new Cy("mrow",e)},Ey={mathit:"italic",boldsymbol:e=>"textord"===e.type?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},Ry=(e,t)=>{if("text"===e.mode){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold"}var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode,a=Ey[n];if(a)return"function"==typeof a?a(e):a;var o=e.text;if(Ay.has(o))return null;if(Vg[r][o]){var i=Vg[r][o].replace;i&&(o=i)}return Fg(o,Kv[n].fontName,r)?Kv[n].variant:null};function _y(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof Ny&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var n=e.children[0];return n instanceof Ny&&","===n.text}return!1}var zy=function(e,t,n){if(1===e.length){var r=Oy(e[0],t);return n&&r instanceof Cy&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var a,o=[],i=0;i<e.length;i++){var s=Oy(e[i],t);if(s instanceof Cy&&a instanceof Cy){if("mtext"===s.type&&"mtext"===a.type&&s.getAttribute("mathvariant")===a.getAttribute("mathvariant")){a.children.push(...s.children);continue}if("mn"===s.type&&"mn"===a.type){a.children.push(...s.children);continue}if(_y(s)&&"mn"===a.type){a.children.push(...s.children);continue}if("mn"===s.type&&_y(a))s.children=[...a.children,...s.children],o.pop();else if(("msup"===s.type||"msub"===s.type)&&s.children.length>=1&&("mn"===a.type||_y(a))){var l=s.children[0];l instanceof Cy&&"mn"===l.type&&(l.children=[...a.children,...l.children],o.pop())}else if("mi"===a.type&&1===a.children.length){var c=a.children[0];if(c instanceof Ny&&"̸"===c.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var d=s.children[0];d instanceof Ny&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),o.pop())}}}o.push(s),a=s}return o},Py=function(e,t,n){return Dy(zy(e,t,n))},Oy=function(e,t){if(!e)return new Cy("mrow");if(oy[e.type])return oy[e.type](e,t);throw new Hf("Got group of unknown type: '"+e.type+"'")};function Ly(e,t,n,r,a){var o,i=zy(e,n);o=1===i.length&&i[0]instanceof Cy&&My.has(i[0].type)?i[0]:new Cy("mrow",i);var s=new Cy("annotation",[new Ny(t)]);s.setAttribute("encoding","application/x-tex");var l=new Cy("semantics",[o,s]),c=new Cy("math",[l]);return c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block"),Hv([a?"katex":"katex-mathml"],[c])}var Fy=[[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]],By=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Vy=function(e,t){return t.size<2?e:Fy[e-1][t.size-1]},Hy=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=By[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,phantom: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:Vy(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:By[e-1]})}havingBaseStyle(t){t=t||this.style.text();var n=Vy(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||(this._fontMetrics=function(e){var t;if(!Bg[t=e>=5?0:e>=3?1:2]){var n=Bg[t]={cssEmPerMu:Og.quad[t]/18};for(var r in Og)Og.hasOwnProperty(r)&&(n[r]=Og[r][t])}return Bg[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};Hy.BASESIZE=6;var $y=function(e){return new Hy({style:e.displayMode?lg.DISPLAY:lg.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},qy=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=Hv(n,[e])}return e},jy={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":"="},Uy=function(e){var t=new Cy("mo",[new Ny(jy[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Gy={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Wy=/* @__PURE__ */new Set(["widehat","widecheck","widetilde","utilde"]),Yy=function(e,t){var{span:n,minWidth:r,height:a}=function(){var n=4e5,r=e.label.slice(1);if(Wy.has(r)&&"base"in e){var a,o,i,s="ordgroup"===e.base.type?e.base.body.length:1;if(s>5)"widehat"===r||"widecheck"===r?(a=420,n=2364,i=.42,o=r+"4"):(a=312,n=2340,i=.34,o="tilde4");else{var l=[1,1,2,2,3,3][s];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][l],a=[0,239,300,360,420][l],i=[0,.24,.3,.3,.36,.42][l],o=r+l):(n=[0,600,1033,2339,2340][l],a=[0,260,286,306,312][l],i=[0,.26,.286,.3,.306,.34][l],o="tilde"+l)}var c=new _g(o);return{span:$v([],[new Rg([c],{width:"100%",height:xg(i),viewBox:"0 0 "+n+" "+a,preserveAspectRatio:"none"})],t),minWidth:0,height:i}}var d=[],u=Gy[r];if(!u)throw new Error('No SVG data for "'+r+'".');var h,p,[m,f,g]=u,v=g/1e3,y=m.length;if(1===y){if(4!==u.length)throw new Error('Expected 4-tuple for single-path SVG data "'+r+'".');h=["hide-tail"],p=[u[3]]}else if(2===y)h=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==y)throw new Error("Correct katexImagesData or update code here to support\n "+y+" children.");h=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var b=0;b<y;b++){var x=new _g(m[b]),w=new Rg([x],{width:"400em",height:xg(v),viewBox:"0 0 "+n+" "+g,preserveAspectRatio:p[b]+" slice"}),S=$v([h[b]],[w],t);if(1===y)return{span:S,minWidth:f,height:v};S.style.height=xg(v),d.push(S)}return{span:Hv(["stretchy"],d,t),minWidth:f,height:v}}();return n.height=a,n.style.height=xg(a),r>0&&(n.style.minWidth=xg(r)),n},Ky={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Xy={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function Zy(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Jy(e){var t=Qy(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Qy(e){return e&&("atom"===e.type||Xy.hasOwnProperty(e.type))?e:null}var eb=e=>{return e instanceof Eg?e:((t=e)instanceof Ag||t instanceof Mg||t instanceof fg)&&1===e.children.length?eb(e.children[0]):void 0;var t},tb=(e,t)=>{var n,r,a;e&&"supsub"===e.type?(n=(r=Zy(e.base,"accent")).base,e.base=n,a=function(e){if(e instanceof Ag)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(xy(e,t)),e.base=r):n=(r=Zy(e,"accent")).base;var o,i,s=xy(n,t.havingCrampedStyle()),l=0;r.isShifty&&Kf(n)&&(l=null!=(o=null==(i=eb(s))?void 0:i.skew)?o:0);var c,d="\\c"===r.label,u=d?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight);if(r.isStretchy)c=Yy(r,t),c=Gv({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+xg(2*l)+")",marginLeft:xg(2*l)}:void 0}]});else{var h,p;"\\vec"===r.label?(h=Zv("vec",t),p=Xv.vec[1]):(h=function(e){if(e instanceof Eg)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}(h=Lv({type:"textord",mode:r.mode,text:r.label},t)),h.italic=0,p=h.width,d&&(u+=h.depth)),c=Hv(["accent-body"],[h]);var m="\\textcircled"===r.label;m&&(c.classes.push("accent-full"),u=s.height);var f=l;m||(f-=p/2),c.style.left=xg(f),"\\textcircled"===r.label&&(c.style.top=".2em"),c=Gv({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-u},{type:"elem",elem:c}]})}var g=Hv(["mord","accent"],[c],t);return a?(a.children[0]=g,a.height=Math.max(g.height,a.height),a.classes[0]="mord",a):g},nb=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));iy({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"],numArgs:1,handler:(e,t)=>{var n=ly(t[0]),r=!nb.test(e.funcName),a=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:a,base:n}},htmlBuilder:tb,mathmlBuilder:(e,t)=>{var n=e.isStretchy?Uy(e.label):new Cy("mo",[Iy(e.label,e.mode)]),r=new Cy("mover",[Oy(e.base,t),n]);return r.setAttribute("accent","true"),r}}),iy({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"],handler:(e,t)=>{var n=t[0],r=e.parser.mode;return"math"===r&&(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}}}),iy({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],numArgs:1,handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:a}},htmlBuilder:(e,t)=>{var n=xy(e.base,t),r=Yy(e,t),a="\\utilde"===e.label?.12:0;return Hv(["mord","accentunder"],[Gv({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=Uy(e.label),r=new Cy("munder",[Oy(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var rb=e=>{var t=new Cy("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};iy({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"],numArgs:1,numOptionalArgs:1,handler(e,t,n){var{parser:r,funcName:a}=e;return{type:"xArrow",mode:r.mode,label:a,body:t[0],below:n[0]}},htmlBuilder(e,t){var n,r=t.style,a=t.havingStyle(r.sup()),o=Uv(xy(e.body,a,t),t),i="\\x"===e.label.slice(0,2)?"x":"cd";o.classes.push(i+"-arrow-pad"),e.below&&(a=t.havingStyle(r.sub()),(n=Uv(xy(e.below,a,t),t)).classes.push(i+"-arrow-pad"));var s,l=Yy(e,t),c=-t.fontMetrics().axisHeight+.5*l.height,d=-t.fontMetrics().axisHeight-.5*l.height-.111;if((o.depth>.25||"\\xleftequilibrium"===e.label)&&(d-=o.depth),n){var u=-t.fontMetrics().axisHeight+n.height+.5*l.height+.111;s=Gv({positionType:"individualShift",children:[{type:"elem",elem:o,shift:d},{type:"elem",elem:l,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:n,shift:u}]})}else s=Gv({positionType:"individualShift",children:[{type:"elem",elem:o,shift:d},{type:"elem",elem:l,shift:c,wrapperClasses:["svg-align"]}]});return Hv(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var n,r=Uy(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var a=rb(Oy(e.body,t));if(e.below){var o=rb(Oy(e.below,t));n=new Cy("munderover",[r,o,a])}else n=new Cy("mover",[r,a])}else if(e.below){var i=rb(Oy(e.below,t));n=new Cy("munder",[r,i])}else n=rb(),n=new Cy("mover",[r,n]);return n}}),iy({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],numArgs:1,primitive:!0,handler(e,t){var{parser:n,funcName:r}=e,a=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:cy(a),isCharacterBox:Kf(a)}},htmlBuilder:function(e,t){var n=my(e.body,t,!0);return Hv([e.mclass],n,t)},mathmlBuilder:function(e,t){var n,r=zy(e.body,t);return"minner"===e.mclass?n=new Cy("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(n=r[0]).type="mi":n=new Cy("mi",r):(e.isCharacterBox?(n=r[0]).type="mo":n=new Cy("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"!==e.mclass&&"mclose"!==e.mclass||(n.attributes.lspace="0em",n.attributes.rspace="0em")),n}});var ab=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};iy({type:"mclass",names:["\\@binrel"],numArgs:2,handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:ab(t[0]),body:cy(t[1]),isCharacterBox:Kf(t[1])}}}),iy({type:"mclass",names:["\\stackrel","\\overset","\\underset"],numArgs:2,handler(e,t){var n,{parser:r,funcName:a}=e,o=t[1],i=t[0];n="\\stackrel"!==a?ab(o):"mrel";var s={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==a,body:cy(o)},l="\\underset"===a?{type:"supsub",mode:i.mode,base:s,sub:i}:{type:"supsub",mode:i.mode,base:s,sup:i};return{type:"mclass",mode:r.mode,mclass:n,body:[l],isCharacterBox:Kf(l)}}}),iy({type:"pmb",names:["\\pmb"],numArgs:1,allowedInText:!0,handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:ab(t[0]),body:cy(t[0])}},htmlBuilder(e,t){var n=my(e.body,t,!0),r=Hv([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=zy(e.body,t),r=new Cy("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var ob={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},ib=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),sb=e=>"textord"===e.type&&"@"===e.text,lb=(e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t;function cb(e,t,n){var r=ob[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var a={type:"atom",text:r,mode:"math",family:"rel"},o={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[t[0]],[]),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"}}}iy({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],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=Uv(xy(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=xg(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Cy("mrow",[Oy(e.label,t)]);return(n=new Cy("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new Cy("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),iy({type:"cdlabelparent",names:["\\\\cdparent"],numArgs:1,handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Uv(xy(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:(e,t)=>new Cy("mrow",[Oy(e.fragment,t)])}),iy({type:"textord",names:["\\@char"],numArgs:1,allowedInText:!0,handler(e,t){for(var{parser:n}=e,r=Zy(t[0],"ordgroup").body,a="",o=0;o<r.length;o++){a+=Zy(r[o],"textord").text}var i,s=parseInt(a);if(isNaN(s))throw new Hf("\\@char has non-numeric argument "+a);if(s<0||s>=1114111)throw new Hf("\\@char with invalid code point "+a);return s<=65535?i=String.fromCharCode(s):(s-=65536,i=String.fromCharCode(55296+(s>>10),56320+(1023&s))),{type:"textord",mode:n.mode,text:i}}});iy({type:"color",names:["\\textcolor"],numArgs:2,allowedInText:!0,argTypes:["color","original"],handler(e,t){var{parser:n}=e,r=Zy(t[0],"color-token").color,a=t[1];return{type:"color",mode:n.mode,color:r,body:cy(a)}},htmlBuilder:(e,t)=>jv(my(e.body,t.withColor(e.color),!1)),mathmlBuilder:(e,t)=>{var n=zy(e.body,t.withColor(e.color)),r=new Cy("mstyle",n);return r.setAttribute("mathcolor",e.color),r}}),iy({type:"color",names:["\\color"],numArgs:1,allowedInText:!0,argTypes:["color"],handler(e,t){var{parser:n,breakOnTokenText:r}=e,a=Zy(t[0],"color-token").color;n.gullet.macros.set("\\current@color",a);var o=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:a,body:o}}}),iy({type:"cr",names:["\\\\"],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e,t,n){var{parser:r}=e,a="["===r.gullet.future().text?r.parseSizeGroup(!0):null,o=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:o,size:a&&Zy(a,"size").value}},htmlBuilder(e,t){var n=Hv(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=xg(bg(e.size,t)))),n},mathmlBuilder(e,t){var n=new Cy("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",xg(bg(e.size,t)))),n}});var db={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},ub=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Hf("Expected a control sequence",e);return t},hb=(e,t,n,r)=>{var a=e.gullet.macros.get(n.text);null==a&&(n.noexpand=!0,a={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,a,r)};iy({type:"internal",names:["\\global","\\long","\\\\globallong"],numArgs:0,allowedInText:!0,handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(db[r.text])return"\\global"!==n&&"\\\\globallong"!==n||(r.text=db[r.text]),Zy(t.parseFunction(),"internal");throw new Hf("Invalid token after macro prefix",r)}}),iy({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),a=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new Hf("Expected a control sequence",r);for(var o,i=0,s=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),s[i].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Hf('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new Hf('Argument number "'+r.text+'" out of order');i++,s.push([])}else{if("EOF"===r.text)throw new Hf("Expected a macro definition");s[i].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return o&&l.unshift(o),"\\edef"!==n&&"\\xdef"!==n||(l=t.gullet.expandTokens(l)).reverse(),t.gullet.macros.set(a,{tokens:l,numArgs:i,delimiters:s},n===db[n]),{type:"internal",mode:t.mode}}}),iy({type:"internal",names:["\\let","\\\\globallet"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=ub(t.gullet.popToken());return t.gullet.consumeSpaces(),hb(t,r,(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t),"\\\\globallet"===n),{type:"internal",mode:t.mode}}}),iy({type:"internal",names:["\\futurelet","\\\\globalfuture"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=ub(t.gullet.popToken()),a=t.gullet.popToken(),o=t.gullet.popToken();return hb(t,r,o,"\\\\globalfuture"===n),t.gullet.pushToken(o),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var pb=function(e,t,n){var r=Fg(Vg.math[e]&&Vg.math[e].replace||e,t,n);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},mb=function(e,t,n,r){var a=n.havingBaseStyle(t),o=Hv(r.concat(a.sizingClasses(n)),[e],n),i=a.sizeMultiplier/n.sizeMultiplier;return o.height*=i,o.depth*=i,o.maxFontSize=a.sizeMultiplier,o},fb=function(e,t,n){var r=t.havingBaseStyle(n),a=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=xg(a),e.height-=a,e.depth+=a},gb=function(e,t,n,r,a,o){var i=function(e,t,n,r){return Pv(e,"Size"+t+"-Regular",n,r)}(e,t,a,r),s=mb(Hv(["delimsizing","size"+t],[i],r),lg.TEXT,r,o);return n&&fb(s,r,lg.TEXT),s},vb=function(e,t,n){return{type:"elem",elem:Hv(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[Hv([],[Pv(e,t,n)])])}},yb=function(e,t,n){var r=Pg["Size4-Regular"][e.charCodeAt(0)]?Pg["Size4-Regular"][e.charCodeAt(0)][4]:Pg["Size1-Regular"][e.charCodeAt(0)][4],a=new _g("inner",function(e,t){switch(e){case"⎜":return hg("M291 0 H417 V"+t+" H291z");case"∣":return hg("M145 0 H188 V"+t+" H145z");case"∥":return hg("M145 0 H188 V"+t+" H145z")+hg("M367 0 H410 V"+t+" H367z");case"⎟":return hg("M457 0 H583 V"+t+" H457z");case"⎢":return hg("M319 0 H403 V"+t+" H319z");case"⎥":return hg("M263 0 H347 V"+t+" H263z");case"⎪":return hg("M384 0 H504 V"+t+" H384z");case"⏐":return hg("M312 0 H355 V"+t+" H312z");case"‖":return hg("M257 0 H300 V"+t+" H257z")+hg("M478 0 H521 V"+t+" H478z");default:return""}}(e,Math.round(1e3*t))),o=$v([],[new Rg([a],{width:xg(r),height:xg(t),style:"width:"+xg(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"})],n);return o.height=t,o.style.height=xg(t),o.style.width=xg(r),{type:"elem",elem:o}},bb={type:"kern",size:-.008},xb=/* @__PURE__ */new Set(["|","\\lvert","\\rvert","\\vert"]),wb=/* @__PURE__ */new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Sb=function(e,t,n,r,a,o){var i,s,l,c,d="",u=0;i=l=c=e,s=null;var h="Size1-Regular";"\\uparrow"===e?l=c="⏐":"\\Uparrow"===e?l=c="‖":"\\downarrow"===e?i=l="⏐":"\\Downarrow"===e?i=l="‖":"\\updownarrow"===e?(i="\\uparrow",l="⏐",c="\\downarrow"):"\\Updownarrow"===e?(i="\\Uparrow",l="‖",c="\\Downarrow"):xb.has(e)?(l="∣",d="vert",u=333):wb.has(e)?(l="∥",d="doublevert",u=556):"["===e||"\\lbrack"===e?(i="⎡",l="⎢",c="⎣",h="Size4-Regular",d="lbrack",u=667):"]"===e||"\\rbrack"===e?(i="⎤",l="⎥",c="⎦",h="Size4-Regular",d="rbrack",u=667):"\\lfloor"===e||"⌊"===e?(l=i="⎢",c="⎣",h="Size4-Regular",d="lfloor",u=667):"\\lceil"===e||"⌈"===e?(i="⎡",l=c="⎢",h="Size4-Regular",d="lceil",u=667):"\\rfloor"===e||"⌋"===e?(l=i="⎥",c="⎦",h="Size4-Regular",d="rfloor",u=667):"\\rceil"===e||"⌉"===e?(i="⎤",l=c="⎥",h="Size4-Regular",d="rceil",u=667):"("===e||"\\lparen"===e?(i="⎛",l="⎜",c="⎝",h="Size4-Regular",d="lparen",u=875):")"===e||"\\rparen"===e?(i="⎞",l="⎟",c="⎠",h="Size4-Regular",d="rparen",u=875):"\\{"===e||"\\lbrace"===e?(i="⎧",s="⎨",c="⎩",l="⎪",h="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(i="⎫",s="⎬",c="⎭",l="⎪",h="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(i="⎧",c="⎩",l="⎪",h="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(i="⎫",c="⎭",l="⎪",h="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(i="⎧",c="⎭",l="⎪",h="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(i="⎫",c="⎩",l="⎪",h="Size4-Regular");var p=pb(i,h,a),m=p.height+p.depth,f=pb(l,h,a),g=f.height+f.depth,v=pb(c,h,a),y=v.height+v.depth,b=0,x=1;if(null!==s){var w=pb(s,h,a);b=w.height+w.depth,x=2}var S=m+y+b,k=S+Math.max(0,Math.ceil((t-S)/(x*g)))*x*g,C=r.fontMetrics().axisHeight;n&&(C*=r.sizeMultiplier);var N=k/2-C,T=[];if(d.length>0){var A=k-m-y,M=Math.round(1e3*k),I=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 v84 h347 v-84\nH403z 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\nM347 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\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-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\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-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\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 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\nc-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,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.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\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-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,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-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\nc-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\nc0,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\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(d,Math.round(1e3*A)),D=new _g(d,I),E=xg(u/1e3),R=xg(M/1e3),_=$v([],[new Rg([D],{width:E,height:R,viewBox:"0 0 "+u+" "+M})],r);_.height=M/1e3,_.style.width=E,_.style.height=R,T.push({type:"elem",elem:_})}else{if(T.push(vb(c,h,a)),T.push(bb),null===s){var z=k-m-y+.016;T.push(yb(l,z,r))}else{var P=(k-m-y-b)/2+.016;T.push(yb(l,P,r)),T.push(bb),T.push(vb(s,h,a)),T.push(bb),T.push(yb(l,P,r))}T.push(bb),T.push(vb(i,h,a))}var O=r.havingBaseStyle(lg.TEXT);return mb(Hv(["delimsizing","mult"],[Gv({positionType:"bottom",positionData:N,children:T})],O),lg.TEXT,r,o)},kb=.08,Cb=function(e,t,n,r,a){var o=function(e,t,n){t*=1e3;var r="";switch(e){case"sqrtMain":r=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.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\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,pg);break;case"sqrtSize1":r=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,pg);break;case"sqrtSize2":r=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,pg);break;case"sqrtSize3":r=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-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\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,pg);break;case"sqrtSize4":r=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-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\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,pg);break;case"sqrtTall":r=function(e,t,n){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(n-54-t-e)+"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\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,pg,n)}return r}(e,r,n),i=new _g(e,o);return $v(["hide-tail"],[new Rg([i],{width:"400em",height:xg(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"})],a)},Nb=/* @__PURE__ */new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),Tb=/* @__PURE__ */new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),Ab=/* @__PURE__ */new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Mb=[0,1.2,1.8,2.4,3],Ib=function(e,t,n,r,a){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),Nb.has(e)||Ab.has(e))return gb(e,t,!1,n,r,a);if(Tb.has(e))return Sb(e,Mb[t],!1,n,r,a);throw new Hf("Illegal delimiter: '"+e+"'")},Db=[{type:"small",style:lg.SCRIPTSCRIPT},{type:"small",style:lg.SCRIPT},{type:"small",style:lg.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Eb=[{type:"small",style:lg.SCRIPTSCRIPT},{type:"small",style:lg.SCRIPT},{type:"small",style:lg.TEXT},{type:"stack"}],Rb=[{type:"small",style:lg.SCRIPTSCRIPT},{type:"small",style:lg.SCRIPT},{type:"small",style:lg.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],_b=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";var t=e.type;throw new Error("Add support for delim type '"+t+"' here.")},zb=function(e,t,n,r){for(var a=Math.min(2,3-r.style.size);a<n.length;a++){var o=n[a];if("stack"===o.type)break;var i=pb(e,_b(o),"math"),s=i.height+i.depth;if("small"===o.type)s*=r.havingBaseStyle(o.style).sizeMultiplier;if(s>t)return o}return n[n.length-1]},Pb=function(e,t,n,r,a,o){var i;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),i=Ab.has(e)?Db:Nb.has(e)?Rb:Eb;var s=zb(e,t,i,r);return"small"===s.type?function(e,t,n,r,a,o){var i=mb(Pv(e,"Main-Regular",a,r),t,r,o);return n&&fb(i,r,t),i}(e,s.style,n,r,a,o):"large"===s.type?gb(e,s.size,n,r,a,o):Sb(e,t,n,r,a,o)},Ob=function(e,t,n,r,a,o){var i=r.fontMetrics().axisHeight*r.sizeMultiplier,s=5/r.fontMetrics().ptPerEm,l=Math.max(t-i,n+i);return Pb(e,Math.max(l/500*901,2*l-s),!0,r,a,o)},Lb={"\\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}},Fb=/* @__PURE__ */new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function Bb(e){return"isMiddle"in e}function Vb(e,t){var n=Qy(e);if(n&&Fb.has(n.text))return n;throw new Hf(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Hb(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}iy({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],numArgs:1,argTypes:["primitive"],handler:(e,t)=>{var n=Vb(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Lb[e.funcName].size,mclass:Lb[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>"."===e.delim?Hv([e.mclass]):Ib(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(Iy(e.delim,e.mode));var n=new Cy("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=xg(Mb[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),iy({type:"leftright-right",names:["\\right"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new Hf("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Vb(t[0],e).text,color:n}}}),iy({type:"leftright",names:["\\left"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=Vb(t[0],e),r=e.parser;++r.leftrightDepth;var a=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var o=Zy(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:a,left:n.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,t)=>{Hb(e);for(var n,r,a=my(e.body,t,!0,["mopen","mclose"]),o=0,i=0,s=!1,l=0;l<a.length;l++){Bb(a[l])?s=!0:(o=Math.max(a[l].height,o),i=Math.max(a[l].depth,i))}if(o*=t.sizeMultiplier,i*=t.sizeMultiplier,n="."===e.left?by(t,["mopen"]):Ob(e.left,o,i,t,e.mode,["mopen"]),a.unshift(n),s)for(var c=1;c<a.length;c++){var d=a[c];if(Bb(d)){var u=d.isMiddle;a[c]=Ob(u.delim,o,i,u.options,e.mode,[])}}if("."===e.right)r=by(t,["mclose"]);else{var h=e.rightColor?t.withColor(e.rightColor):t;r=Ob(e.right,o,i,h,e.mode,["mclose"])}return a.push(r),Hv(["minner"],a,t)},mathmlBuilder:(e,t)=>{Hb(e);var n=zy(e.body,t);if("."!==e.left){var r=new Cy("mo",[Iy(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==e.right){var a=new Cy("mo",[Iy(e.right,e.mode)]);a.setAttribute("fence","true"),e.rightColor&&a.setAttribute("mathcolor",e.rightColor),n.push(a)}return Dy(n)}}),iy({type:"middle",names:["\\middle"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=Vb(t[0],e);if(!e.parser.leftrightDepth)throw new Hf("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return"."===e.delim?n=by(t,[]):(n=Ib(e.delim,1,t,e.mode,[])).isMiddle={delim:e.delim,options:t},n},mathmlBuilder:(e,t)=>{var n="\\vert"===e.delim||"|"===e.delim?Iy("|","text"):Iy(e.delim,e.mode),r=new Cy("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});iy({type:"enclose",names:["\\colorbox"],numArgs:2,allowedInText:!0,argTypes:["color","hbox"],handler(e,t,n){var{parser:r,funcName:a}=e,o=Zy(t[0],"color-token").color,i=t[1];return{type:"enclose",mode:r.mode,label:a,backgroundColor:o,body:i}},htmlBuilder:(e,t)=>{var n,r,a,o=Uv(xy(e.body,t),t),i=e.label.slice(1),s=t.sizeMultiplier,l=Kf(e.body);if("sout"===i)(n=Hv(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,r=-.5*t.fontMetrics().xHeight;else if("phase"===i){var c=bg({number:.6,unit:"pt"},t),d=bg({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var u=o.height+o.depth+c+d;o.style.paddingLeft=xg(u/2+c);var h=Math.floor(1e3*u*s),p=function(e){return"M400000 "+e+" H0 L"+e/2+" 0 l65 45 L145 "+(e-80)+" H400000z"}(h);(n=$v(["hide-tail"],[new Rg([new _g("phase",p)],{width:"400em",height:xg(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"})],t)).style.height=xg(u),r=o.depth+c+d}else{var m,f;/cancel/.test(i)?l||o.classes.push("cancel-pad"):"angl"===i?o.classes.push("anglpad"):o.classes.push("boxpad");var g=0;/box/.test(i)?(g=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),f=m=t.fontMetrics().fboxsep+("colorbox"===i?0:g)):"angl"===i?(m=4*(g=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),f=Math.max(0,.25-o.depth)):f=m=l?.2:0,n=function(e,t,n,r,a){var o,i=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(o=Hv(["stretchy",t],[],a),"fbox"===t){var s=a.color&&a.getColor();s&&(o.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new zg({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new zg({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),o=$v([],[new Rg(l,{width:"100%",height:xg(i)})],a)}return o.height=i,o.style.height=xg(i),o}(o,i,m,f,t),/fbox|boxed|fcolorbox/.test(i)?(n.style.borderStyle="solid",n.style.borderWidth=xg(g)):"angl"===i&&.049!==g&&(n.style.borderTopWidth=xg(g),n.style.borderRightWidth=xg(g)),r=o.depth+f,e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor,e.borderColor&&(n.style.borderColor=e.borderColor))}if(e.backgroundColor)a=Gv({positionType:"individualShift",children:[{type:"elem",elem:n,shift:r},{type:"elem",elem:o,shift:0}]});else{var v=/cancel|phase/.test(i)?["svg-align"]:[];a=Gv({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:n,shift:r,wrapperClasses:v}]})}return/cancel/.test(i)&&(a.height=o.height,a.depth=o.depth),/cancel/.test(i)&&!l?Hv(["mord","cancel-lap"],[a],t):Hv(["mord"],[a],t)},mathmlBuilder:(e,t)=>{var n,r=new Cy(e.label.includes("colorbox")?"mpadded":"menclose",[Oy(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"),"\\fcolorbox"===e.label){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+xg(a)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r}}),iy({type:"enclose",names:["\\fcolorbox"],numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"],handler(e,t,n){var{parser:r,funcName:a}=e,o=Zy(t[0],"color-token").color,i=Zy(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:r.mode,label:a,backgroundColor:i,borderColor:o,body:s}}}),iy({type:"enclose",names:["\\fbox"],numArgs:1,argTypes:["hbox"],allowedInText:!0,handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}}),iy({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e,a=t[0];return{type:"enclose",mode:n.mode,label:r,body:a}}}),iy({type:"enclose",names:["\\sout"],numArgs:1,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e;"math"===n.mode&&n.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var a=t[0];return{type:"enclose",mode:n.mode,label:r,body:a}}}),iy({type:"enclose",names:["\\angl"],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 $b={};function qb(e){for(var{type:t,names:n,props:r,handler:a,htmlBuilder:o,mathmlBuilder:i}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},l=0;l<n.length;++l)$b[n[l]]=s;o&&(ay[t]=o),i&&(oy[t]=i)}var jb={};function Ub(e,t){jb[e]=t}var Gb=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?new e(t.loc.lexer,t.loc.start,n.loc.end):null:t&&t.loc}},Wb=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,Gb.range(this,t))}};function Yb(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for("\\relax"===n&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);"\\hline"===n||"\\hdashline"===n;)e.consume(),t.push("\\hdashline"===n),e.consumeSpaces(),n=e.fetch().text;return t}var Kb=e=>{if(!e.parser.settings.displayMode)throw new Hf("{"+e.envName+"} can be used only in display mode.")},Xb=/* @__PURE__ */new Set(["gather","gather*"]);function Zb(e){if(!e.includes("ed"))return!e.includes("*")}function Jb(e,t,n){var{hskipBeforeAndAfter:r,addJot:a,cols:o,arraystretch:i,colSeparationType:s,autoTag:l,singleRow:c,emptySingleRow:d,maxNumCols:u,leqno:h}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!i){var p=e.gullet.expandMacroAsText("\\arraystretch");if(null==p)i=1;else if(!(i=parseFloat(p))||i<0)throw new Hf("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var m=[],f=[m],g=[],v=[],y=null!=l?[]:void 0;function b(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function x(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new Wb("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(Boolean(l)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(b(),v.push(Yb(e));;){var w=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var S={type:"ordgroup",mode:e.mode,body:w};n&&(S={type:"styling",mode:e.mode,style:n,resetFont:!0,body:[S]}),m.push(S);var k=e.fetch().text;if("&"===k){if(u&&m.length===u){if(c||s)throw new Hf("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===k){x(),1===m.length&&"styling"===S.type&&1===S.body.length&&"ordgroup"===S.body[0].type&&0===S.body[0].body.length&&(f.length>1||!d)&&f.pop(),v.length<f.length+1&&v.push([]);break}if("\\\\"!==k)throw new Hf("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var C=void 0;" "!==e.gullet.future().text&&(C=e.parseSizeGroup(!0)),g.push(C?C.value:null),x(),v.push(Yb(e)),m=[],f.push(m),b()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:a,arraystretch:i,body:f,cols:o,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:v,colSeparationType:s,tags:y,leqno:h}}function Qb(e){return"d"===e.slice(0,1)?"display":"text"}var ex=function(e,t){var n,r,a=e.body.length,o=e.hLinesBeforeRow,i=0,s=new Array(a),l=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),d=1/t.fontMetrics().ptPerEm,u=5*d;e.colSeparationType&&"small"===e.colSeparationType&&(u=t.havingStyle(lg.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var h="CD"===e.colSeparationType?bg({number:3,unit:"ex"},t):12*d,p=3*d,m=e.arraystretch*h,f=.7*m,g=.3*m,v=0;function y(e){for(var t=0;t<e.length;++t)t>0&&(v+=.25),l.push({pos:v,isDashed:e[t]})}for(y(o[0]),n=0;n<e.body.length;++n){var b=e.body[n],x=f,w=g;i<b.length&&(i=b.length);var S={cells:new Array(b.length),height:0,depth:0,pos:0};for(r=0;r<b.length;++r){var k=xy(b[r],t);w<k.depth&&(w=k.depth),x<k.height&&(x=k.height),S.cells[r]=k}var C=e.rowGaps[n],N=0;C&&(N=bg(C,t))>0&&(w<(N+=g)&&(w=N),N=0),e.addJot&&n<e.body.length-1&&(w+=p),S.height=x,S.depth=w,v+=x,S.pos=v,v+=w+N,s[n]=S,y(o[n+1])}var T,A,M=v/2+t.fontMetrics().axisHeight,I=e.cols||[],D=[],E=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<a;++n){var R=s[n],_=R.pos-M,z=e.tags[n],P=void 0;(P=!0===z?Hv(["eqn-num"],[],t):Hv([],!1===z?[]:my(z,t,!0),t)).depth=R.depth,P.height=R.height,E.push({type:"elem",elem:P,shift:_})}for(r=0,A=0;r<i||A<I.length;++r,++A){for(var O,L=I[A],F=!0;"separator"===(null==(B=L)?void 0:B.type);){var B;if(F||((T=Hv(["arraycolsep"],[])).style.width=xg(t.fontMetrics().doubleRuleSep),D.push(T)),"|"!==L.separator&&":"!==L.separator)throw new Hf("Invalid separator type: "+L.separator);var V="|"===L.separator?"solid":"dashed",H=Hv(["vertical-separator"],[],t);H.style.height=xg(v),H.style.borderRightWidth=xg(c),H.style.borderRightStyle=V,H.style.margin="0 "+xg(-c/2);var $=v-M;$&&(H.style.verticalAlign=xg(-$)),D.push(H),L=I[++A],F=!1}if(!(r>=i)){var q,j,U=void 0;if(r>0||e.hskipBeforeAndAfter)0!==(U=null!=(q=null==(j=L)?void 0:j.pregap)?q:u)&&((T=Hv(["arraycolsep"],[])).style.width=xg(U),D.push(T));var G=[];for(n=0;n<a;++n){var W=s[n],Y=W.cells[r];if(Y){var K=W.pos-M;Y.depth=W.depth,Y.height=W.height,G.push({type:"elem",elem:Y,shift:K})}}var X,Z,J=Gv({positionType:"individualShift",children:G}),Q=Hv(["col-align-"+((null==(O=L)?void 0:O.align)||"c")],[J]);if(D.push(Q),r<i-1||e.hskipBeforeAndAfter)0!==(U=null!=(X=null==(Z=L)?void 0:Z.postgap)?X:u)&&((T=Hv(["arraycolsep"],[])).style.width=xg(U),D.push(T))}}var ee=Hv(["mtable"],D);if(l.length>0){for(var te=qv("hline",t,c),ne=qv("hdashline",t,c),re=[{type:"elem",elem:ee,shift:0}];l.length>0;){var ae=l.pop(),oe=ae.pos-M;ae.isDashed?re.push({type:"elem",elem:ne,shift:oe}):re.push({type:"elem",elem:te,shift:oe})}ee=Gv({positionType:"individualShift",children:re})}if(0===E.length)return Hv(["mord"],[ee],t);var ie=Hv(["tag"],[Gv({positionType:"individualShift",children:E})],t);return jv([ee,ie])},tx={c:"center ",l:"left ",r:"right "},nx=function(e,t){for(var n=[],r=new Cy("mtd",[],["mtr-glue"]),a=new Cy("mtd",[],["mml-eqn-num"]),o=0;o<e.body.length;o++){for(var i=e.body[o],s=[],l=0;l<i.length;l++)s.push(new Cy("mtd",[Oy(i[l],t)]));e.tags&&e.tags[o]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(a):s.push(a)),n.push(new Cy("mtr",s))}var c=new Cy("mtable",n),d=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",xg(d));var u="",h="";if(e.cols&&e.cols.length>0){var p=e.cols,m="",f=!1,g=0,v=p.length;"separator"===p[0].type&&(u+="top ",g=1),"separator"===p[p.length-1].type&&(u+="bottom ",v-=1);for(var y=g;y<v;y++){var b=p[y];"align"===b.type?(h+=tx[b.align],f&&(m+="none "),f=!0):"separator"===b.type&&f&&(m+="|"===b.separator?"solid ":"dashed ",f=!1)}c.setAttribute("columnalign",h.trim()),/[sd]/.test(m)&&c.setAttribute("columnlines",m.trim())}if("align"===e.colSeparationType){for(var x=e.cols||[],w="",S=1;S<x.length;S++)w+=S%2?"0em ":"1em ";c.setAttribute("columnspacing",w.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var k="",C=e.hLinesBeforeRow;u+=C[0].length>0?"left ":"",u+=C[C.length-1].length>0?"right ":"";for(var N=1;N<C.length-1;N++)k+=0===C[N].length?"none ":C[N][0]?"dashed ":"solid ";return/[sd]/.test(k)&&c.setAttribute("rowlines",k.trim()),""!==u&&(c=new Cy("menclose",[c])).setAttribute("notation",u.trim()),e.arraystretch&&e.arraystretch<1&&(c=new Cy("mstyle",[c])).setAttribute("scriptlevel","1"),c},rx=function(e,t){e.envName.includes("ed")||Kb(e);var n=[],r="split"===e.envName,a=Jb(e.parser,{cols:n,addJot:!0,autoTag:r?void 0:Zb(e.envName),emptySingleRow:!0,colSeparationType:e.envName.includes("at")?"alignat":"align",maxNumCols:r?2:void 0,leqno:e.parser.settings.leqno},"display"),o=0,i=0,s={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var l="",c=0;c<t[0].body.length;c++){l+=Zy(t[0].body[c],"textord").text}o=Number(l),i=2*o}var d=!i;a.body.forEach(function(e){for(var t=1;t<e.length;t+=2)Zy(Zy(e[t],"styling").body[0],"ordgroup").body.unshift(s);if(d)i<e.length&&(i=e.length);else{var n=e.length/2;if(o<n)throw new Hf("Too many math in a row: expected "+o+", but got "+n,e[0])}});for(var u=0;u<i;++u){var h="r",p=0;u%2==1?h="l":u>0&&d&&(p=1),n[u]={type:"align",align:h,pregap:p,postgap:0}}return a.colSeparationType=d?"align":"alignat",a};qb({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=(Qy(t[0])?[t[0]]:Zy(t[0],"ordgroup").body).map(function(e){var t=Jy(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 Hf("Unknown column alignment: "+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return Jb(e.parser,r,Qb(e.envName))},htmlBuilder:ex,mathmlBuilder:nx}),qb({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 a=e.parser;if(a.consumeSpaces(),"["===a.fetch().text){if(a.consume(),a.consumeSpaces(),n=a.fetch().text,!"lcr".includes(n))throw new Hf("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),r.cols=[{type:"align",align:n}]}}var o=Jb(e.parser,r,Qb(e.envName)),i=Math.max(0,...o.body.map(e=>e.length));return o.cols=new Array(i).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:ex,mathmlBuilder:nx}),qb({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=Jb(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:ex,mathmlBuilder:nx}),qb({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=(Qy(t[0])?[t[0]]:Zy(t[0],"ordgroup").body).map(function(e){var t=Jy(e).text;if("lc".includes(t))return{type:"align",align:t};throw new Hf("Unknown column alignment: "+t,e)});if(n.length>1)throw new Hf("{subarray} can contain only one column");var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},a=Jb(e.parser,r,"script");if(a.body.length>0&&a.body[0].length>1)throw new Hf("{subarray} can contain only one column");return a},htmlBuilder:ex,mathmlBuilder:nx}),qb({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=Jb(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Qb(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ex,mathmlBuilder:nx}),qb({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:rx,htmlBuilder:ex,mathmlBuilder:nx}),qb({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Xb.has(e.envName)&&Kb(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Zb(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Jb(e.parser,t,"display")},htmlBuilder:ex,mathmlBuilder:nx}),qb({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:rx,htmlBuilder:ex,mathmlBuilder:nx}),qb({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Kb(e);var t={autoTag:Zb(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Jb(e.parser,t,"display")},htmlBuilder:ex,mathmlBuilder:nx}),qb({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(Kb(e),function(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){if("\\end"===n){0===t[t.length-1].length&&t.pop();break}throw new Hf("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var r=[],a=[r],o=0;o<t.length;o++){for(var i=t[o],s=ib(),l=0;l<i.length;l++)if(sb(i[l])){r.push(s);var c=Jy(i[l+=1]).text,d=new Array(2);if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},"=|.".includes(c));else{if(!"<>AV".includes(c))throw new Hf('Expected one of "<>AV=|." after @',i[l]);for(var u=0;u<2;u++){for(var h=!0,p=l+1;p<i.length;p++){if(lb(i[p],c)){h=!1,l=p;break}if(sb(i[p]))throw new Hf("Missing a "+c+" character to complete a CD arrow.",i[p]);d[u].body.push(i[p])}if(h)throw new Hf("Missing a "+c+" character to complete a CD arrow.",i[l])}}var m={type:"styling",body:[cb(c,d,e)],mode:"math",style:"display",resetFont:!0};r.push(m),s=ib()}else s.body.push(i[l]);o%2==0?r.push(s):r.shift(),r=[],a.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}(e.parser)),htmlBuilder:ex,mathmlBuilder:nx}),Ub("\\nonumber","\\gdef\\@eqnsw{0}"),Ub("\\notag","\\nonumber"),iy({type:"text",names:["\\hline","\\hdashline"],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new Hf(e.funcName+" valid only within array environment")}});var ax=$b;iy({type:"environment",names:["\\begin","\\end"],numArgs:1,argTypes:["text"],handler(e,t){var{parser:n,funcName:r}=e,a=t[0];if("ordgroup"!==a.type)throw new Hf("Invalid environment name",a);for(var o="",i=0;i<a.body.length;++i)o+=Zy(a.body[i],"textord").text;if("\\begin"===r){if(!ax.hasOwnProperty(o))throw new Hf("No such environment: "+o,a);var s=ax[o],{args:l,optArgs:c}=n.parseArguments("\\begin{"+o+"}",s),d={mode:n.mode,envName:o,parser:n},u=s.handler(d,l,c);n.expect("\\end",!1);var h=n.nextToken,p=Zy(n.parseFunction(),"environment");if(p.name!==o)throw new Hf("Mismatch: \\begin{"+o+"} matched by \\end{"+p.name+"}",h);return u}return{type:"environment",mode:n.mode,name:o,nameGroup:a}}});var ox={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};iy({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,a=ly(t[0]),o=r in ox?ox[r]:r;return{type:"font",mode:n.mode,font:o.slice(1),body:a}},htmlBuilder:(e,t)=>{var n=e.font,r=t.withFont(n);return xy(e.body,r)},mathmlBuilder:(e,t)=>{var n=e.font,r=t.withFont(n);return Oy(e.body,r)}}),iy({type:"mclass",names:["\\boldsymbol","\\bm"],numArgs:1,handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"mclass",mode:n.mode,mclass:ab(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:Kf(r)}}}),iy({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],numArgs:0,allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:a}=e,{mode:o}=n,i=n.parseExpression(!0,a);return{type:"font",mode:o,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:i}}}});var ix=(e,t)=>t?{type:"styling",mode:e.mode,style:t,body:[e]}:e;iy({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var n,{parser:r,funcName:a}=e,o=t[0],i=t[1],s=null,l=null;switch(a){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,s="(",l=")";break;case"\\\\bracefrac":n=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":n=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var c="\\cfrac"===a,d=null;return c||a.startsWith("\\d")?d="display":a.startsWith("\\t")&&(d="text"),ix({type:"genfrac",mode:r.mode,numer:o,denom:i,continued:c,hasBarLine:n,leftDelim:s,rightDelim:l,barSize:null},d)},htmlBuilder:(e,t)=>{var n=t.style,r=n.fracNum(),a=n.fracDen(),o=t.havingStyle(r),i=xy(e.numer,o,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;i.height=i.height<s?s:i.height,i.depth=i.depth<l?l:i.depth}o=t.havingStyle(a);var c,d,u,h,p,m,f,g,v,y,b=xy(e.denom,o,t);if(e.hasBarLine?(e.barSize?(d=bg(e.barSize,t),c=qv("frac-line",t,d)):c=qv("frac-line",t),d=c.height,u=c.height):(c=null,d=0,u=t.fontMetrics().defaultRuleThickness),n.size===lg.DISPLAY.size?(h=t.fontMetrics().num1,p=d>0?3*u:7*u,m=t.fontMetrics().denom1):(d>0?(h=t.fontMetrics().num2,p=u):(h=t.fontMetrics().num3,p=3*u),m=t.fontMetrics().denom2),c){var x=t.fontMetrics().axisHeight;h-i.depth-(x+.5*d)<p&&(h+=p-(h-i.depth-(x+.5*d))),x-.5*d-(b.height-m)<p&&(m+=p-(x-.5*d-(b.height-m))),f=Gv({positionType:"individualShift",children:[{type:"elem",elem:b,shift:m},{type:"elem",elem:c,shift:-(x-.5*d)},{type:"elem",elem:i,shift:-h}]})}else{var w=h-i.depth-(b.height-m);w<p&&(h+=.5*(p-w),m+=.5*(p-w)),f=Gv({positionType:"individualShift",children:[{type:"elem",elem:b,shift:m},{type:"elem",elem:i,shift:-h}]})}return o=t.havingStyle(n),f.height*=o.sizeMultiplier/t.sizeMultiplier,f.depth*=o.sizeMultiplier/t.sizeMultiplier,g=n.size===lg.DISPLAY.size?t.fontMetrics().delim1:n.size===lg.SCRIPTSCRIPT.size?t.havingStyle(lg.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,v=null==e.leftDelim?by(t,["mopen"]):Pb(e.leftDelim,g,!0,t.havingStyle(n),e.mode,["mopen"]),y=e.continued?Hv([]):null==e.rightDelim?by(t,["mclose"]):Pb(e.rightDelim,g,!0,t.havingStyle(n),e.mode,["mclose"]),Hv(["mord"].concat(o.sizingClasses(t)),[v,Hv(["mfrac"],[f]),y],t)},mathmlBuilder:(e,t)=>{var n=new Cy("mfrac",[Oy(e.numer,t),Oy(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=bg(e.barSize,t);n.setAttribute("linethickness",xg(r))}}else n.setAttribute("linethickness","0px");if(null!=e.leftDelim||null!=e.rightDelim){var a=[];if(null!=e.leftDelim){var o=new Cy("mo",[new Ny(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),a.push(o)}if(a.push(n),null!=e.rightDelim){var i=new Cy("mo",[new Ny(e.rightDelim.replace("\\",""))]);i.setAttribute("fence","true"),a.push(i)}return Dy(a)}return n}}),iy({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],numArgs:0,infix:!0,handler(e){var t,{parser:n,funcName:r,token:a}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:a}}});var sx=["display","text","script","scriptscript"],lx=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};iy({type:"genfrac",names:["\\genfrac"],numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"],handler(e,t){var n,{parser:r}=e,a=t[4],o=t[5],i=ly(t[0]),s="atom"===i.type&&"open"===i.family?lx(i.text):null,l=ly(t[1]),c="atom"===l.type&&"close"===l.family?lx(l.text):null,d=Zy(t[2],"size"),u=null;n=!!d.isBlank||(u=d.value).number>0;var h=null,p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var m=Zy(p.body[0],"textord");h=sx[Number(m.text)]}}else p=Zy(p,"textord"),h=sx[Number(p.text)];return ix({type:"genfrac",mode:r.mode,numer:a,denom:o,continued:!1,hasBarLine:n,barSize:u,leftDelim:s,rightDelim:c},h)}}),iy({type:"infix",names:["\\above"],numArgs:1,argTypes:["size"],infix:!0,handler(e,t){var{parser:n,funcName:r,token:a}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Zy(t[0],"size").value,token:a}}}),iy({type:"genfrac",names:["\\\\abovefrac"],numArgs:3,argTypes:["math","size","math"],handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0],o=Zy(t[1],"infix").size;if(!o)throw new Error("\\\\abovefrac expected size, but got "+String(o));var i=t[2],s=o.number>0;return{type:"genfrac",mode:n.mode,numer:a,denom:i,continued:!1,hasBarLine:s,barSize:o,leftDelim:null,rightDelim:null}}});var cx=(e,t)=>{var n,r,a=t.style;"supsub"===e.type?(n=e.sup?xy(e.sup,t.havingStyle(a.sup()),t):xy(e.sub,t.havingStyle(a.sub()),t),r=Zy(e.base,"horizBrace")):r=Zy(e,"horizBrace");var o,i=xy(r.base,t.havingBaseStyle(lg.DISPLAY)),s=Yy(r,t);if(o=r.isOver?Gv({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:s,wrapperClasses:["svg-align"]}]}):Gv({positionType:"bottom",positionData:i.depth+.1+s.height,children:[{type:"elem",elem:s,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:i}]}),n){var l=Hv(["minner",r.isOver?"mover":"munder"],[o],t);o=r.isOver?Gv({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]}):Gv({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]})}return Hv(["minner",r.isOver?"mover":"munder"],[o],t)};iy({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],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:cx,mathmlBuilder:(e,t)=>{var n=Uy(e.label);return new Cy(e.isOver?"mover":"munder",[Oy(e.base,t),n])}}),iy({type:"href",names:["\\href"],numArgs:2,argTypes:["url","original"],allowedInText:!0,handler:(e,t)=>{var{parser:n}=e,r=t[1],a=Zy(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:n.mode,href:a,body:cy(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=my(e.body,t,!1);return function(e,t,n,r){var a=new Mg(e,t,n,r);return Vv(a),a}(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Py(e.body,t);return n instanceof Cy||(n=new Cy("mrow",[n])),n.setAttribute("href",e.href),n}}),iy({type:"href",names:["\\url"],numArgs:1,argTypes:["url"],allowedInText:!0,handler:(e,t)=>{var{parser:n}=e,r=Zy(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var a=[],o=0;o<r.length;o++){var i=r[o];"~"===i&&(i="\\textasciitilde"),a.push({type:"textord",mode:"text",text:i})}var s={type:"text",mode:n.mode,font:"\\texttt",body:a};return{type:"href",mode:n.mode,href:r,body:cy(s)}}}),iy({type:"hbox",names:["\\hbox"],numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0,handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:cy(t[0])}},htmlBuilder:(e,t)=>jv(my(e.body,t.withFont(""),!1)),mathmlBuilder:(e,t)=>new Cy("mrow",zy(e.body,t.withFont("")))}),iy({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],numArgs:2,argTypes:["raw","original"],allowedInText:!0,handler:(e,t)=>{var n,{parser:r,funcName:a,token:o}=e,i=Zy(t[0],"raw").string,s=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(a){case"\\htmlClass":l.class=i,n={command:"\\htmlClass",class:i};break;case"\\htmlId":l.id=i,n={command:"\\htmlId",id:i};break;case"\\htmlStyle":l.style=i,n={command:"\\htmlStyle",style:i};break;case"\\htmlData":for(var c=i.split(","),d=0;d<c.length;d++){var u=c[d],h=u.indexOf("=");if(h<0)throw new Hf("\\htmlData key/value '"+u+"' missing equals sign");var p=u.slice(0,h),m=u.slice(h+1);l["data-"+p.trim()]=m}n={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(n)?{type:"html",mode:r.mode,attributes:l,body:cy(s)}:r.formatUnsupportedCmd(a)},htmlBuilder:(e,t)=>{var n=my(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var a=Hv(r,n,t);for(var o in e.attributes)"class"!==o&&e.attributes.hasOwnProperty(o)&&a.setAttribute(o,e.attributes[o]);return a},mathmlBuilder:(e,t)=>Py(e.body,t)}),iy({type:"htmlmathml",names:["\\html@mathml"],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:cy(t[0]),mathml:cy(t[1])}},htmlBuilder:(e,t)=>jv(my(e.html,t,!1)),mathmlBuilder:(e,t)=>Py(e.mathml,t)});var dx=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 Hf("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!yg(n))throw new Hf("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};iy({type:"includegraphics",names:["\\includegraphics"],numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1,handler:(e,t,n)=>{var{parser:r}=e,a={number:0,unit:"em"},o={number:.9,unit:"em"},i={number:0,unit:"em"},s="";if(n[0])for(var l=Zy(n[0],"raw").string.split(","),c=0;c<l.length;c++){var d=l[c].split("=");if(2===d.length){var u=d[1].trim();switch(d[0].trim()){case"alt":s=u;break;case"width":a=dx(u);break;case"height":o=dx(u);break;case"totalheight":i=dx(u);break;default:throw new Hf("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var h=Zy(t[0],"url").url;return""===s&&(s=(s=(s=h).replace(/^.*[\\/]/,"")).substring(0,s.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:h})?{type:"includegraphics",mode:r.mode,alt:s,width:a,height:o,totalheight:i,src:h}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=bg(e.height,t),r=0;e.totalheight.number>0&&(r=bg(e.totalheight,t)-n);var a=0;e.width.number>0&&(a=bg(e.width,t));var o={height:xg(n+r)};a>0&&(o.width=xg(a)),r>0&&(o.verticalAlign=xg(-r));var i=new Ig(e.src,e.alt,o);return i.height=n,i.depth=r,i},mathmlBuilder:(e,t)=>{var n=new Cy("mglyph",[]);n.setAttribute("alt",e.alt);var r=bg(e.height,t),a=0;if(e.totalheight.number>0&&(a=bg(e.totalheight,t)-r,n.setAttribute("valign",xg(-a))),n.setAttribute("height",xg(r+a)),e.width.number>0){var o=bg(e.width,t);n.setAttribute("width",xg(o))}return n.setAttribute("src",e.src),n}}),iy({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e,a=Zy(t[0],"size");if(n.settings.strict){var o="m"===r[1],i="mu"===a.value.unit;o?(i||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+a.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):i&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:a.value}},htmlBuilder:(e,t)=>Wv(e.dimension,t),mathmlBuilder(e,t){var n=bg(e.dimension,t);return new Ty(n)}}),iy({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:a}},htmlBuilder:(e,t)=>{var n;"clap"===e.alignment?(n=Hv([],[xy(e.body,t)]),n=Hv(["inner"],[n],t)):n=Hv(["inner"],[xy(e.body,t)]);var r=Hv(["fix"],[]),a=Hv([e.alignment],[n,r],t),o=Hv(["strut"]);return o.style.height=xg(a.height+a.depth),a.depth&&(o.style.verticalAlign=xg(-a.depth)),a.children.unshift(o),a=Hv(["thinbox"],[a],t),Hv(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>{var n=new Cy("mpadded",[Oy(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),iy({type:"styling",names:["\\(","$"],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var{funcName:n,parser:r}=e,a=r.mode;r.switchMode("math");var o="\\("===n?"\\)":"$",i=r.parseExpression(!1,o);return r.expect(o),r.switchMode(a),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:i}}}),iy({type:"text",names:["\\)","\\]"],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new Hf("Mismatched "+e.funcName)}});var ux=(e,t)=>{switch(t.style.size){case lg.DISPLAY.size:return e.display;case lg.TEXT.size:return e.text;case lg.SCRIPT.size:return e.script;case lg.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};iy({type:"mathchoice",names:["\\mathchoice"],numArgs:4,primitive:!0,handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:cy(t[0]),text:cy(t[1]),script:cy(t[2]),scriptscript:cy(t[3])}},htmlBuilder:(e,t)=>jv(my(ux(e,t),t,!1)),mathmlBuilder:(e,t)=>Py(ux(e,t),t)});var hx=(e,t,n,r,a,o,i)=>{e=Hv([],[e]);var s,l,c,d=n&&Kf(n);if(t){var u=xy(t,r.havingStyle(a.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var h=xy(n,r.havingStyle(a.sub()),r);s={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-h.height)}}if(l&&s)c=Gv({positionType:"bottom",positionData:r.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+i,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:xg(-o)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:xg(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]});else if(s)c=Gv({positionType:"top",positionData:e.height-i,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:xg(-o)},{type:"kern",size:s.kern},{type:"elem",elem:e}]});else{if(!l)return e;c=Gv({positionType:"bottom",positionData:e.depth+i,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:xg(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}var p=[c];if(s&&0!==o&&!d){var m=Hv(["mspace"],[],r);m.style.marginRight=xg(o),p.unshift(m)}return Hv(["mop","op-limits"],p,r)},px=/* @__PURE__ */new Set(["\\smallint"]),mx=(e,t)=>{var n,r,a,o=!1;"supsub"===e.type?(n=e.sup,r=e.sub,a=Zy(e.base,"op"),o=!0):a=Zy(e,"op");var i,s,l=t.style,c=!1;if(l.size===lg.DISPLAY.size&&a.symbol&&!px.has(a.name)&&(c=!0),a.symbol){var d=c?"Size2-Regular":"Size1-Regular",u="";if("\\oiint"!==a.name&&"\\oiiint"!==a.name||(u=a.name.slice(1),a.name="oiint"===u?"\\iint":"\\iiint"),s=(i=Pv(a.name,d,"math",t,["mop","op-symbol",c?"large-op":"small-op"])).italic,u.length>0){var h=Zv(u+"Size"+(c?"2":"1"),t);i=Gv({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:h,shift:c?.08:0}]}),a.name="\\"+u,i.classes.unshift("mop"),i.italic=s}}else if(a.body){var p=my(a.body,t,!0);1===p.length&&p[0]instanceof Eg?(i=p[0]).classes[0]="mop":i=Hv(["mop"],p,t)}else{for(var m=[],f=1;f<a.name.length;f++)m.push(Ov(a.name[f],a.mode,t));i=Hv(["mop"],m,t)}var g,v=0,y=0;(i instanceof Eg||"\\oiint"===a.name||"\\oiiint"===a.name)&&!a.suppressBaseShift&&(v=(i.height-i.depth)/2-t.fontMetrics().axisHeight,y=null!=(g=i.italic)?g:0);return o?hx(i,n,r,t,l,y,v):(v&&(i.style.position="relative",i.style.top=xg(v)),i)},fx={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};iy({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],numArgs:0,handler:(e,t)=>{var{parser:n,funcName:r}=e,a=r;return 1===a.length&&(a=fx[a]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:mx,mathmlBuilder:(e,t)=>{var n;if(e.symbol)n=new Cy("mo",[Iy(e.name,e.mode)]),px.has(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new Cy("mo",zy(e.body,t));else{n=new Cy("mi",[new Ny(e.name.slice(1))]);var r=new Cy("mo",[Iy("","text")]);n=e.parentIsSupSub?new Cy("mrow",[n,r]):ky([n,r])}return n}}),iy({type:"op",names:["\\mathop"],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:cy(r)}}});var gx={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};iy({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"],numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}}),iy({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}}),iy({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],numArgs:0,allowedInArgument:!0,handler(e){var{parser:t,funcName:n}=e,r=n;return 1===r.length&&(r=gx[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}}});var vx=(e,t)=>{var n,r,a,o,i=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,a=Zy(e.base,"operatorname"),i=!0):a=Zy(e,"operatorname"),a.body.length>0){for(var s=(my(a.body.map(e=>{var t="text"in e?e.text:void 0;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),t.withFont("mathrm"),!0)),l=0;l<s.length;l++){var c=s[l];c instanceof Eg&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=Hv(["mop"],s,t)}else o=Hv(["mop"],[],t);return i?hx(o,n,r,t,t.style,0,0):o};function yx(e,t,n){for(var r=my(e,t,!1),a=t.sizeMultiplier/n.sizeMultiplier,o=0;o<r.length;o++){var i=r[o].classes.indexOf("sizing");i<0?Array.prototype.push.apply(r[o].classes,t.sizingClasses(n)):r[o].classes[i+1]==="reset-size"+t.size&&(r[o].classes[i+1]="reset-size"+n.size),r[o].height*=a,r[o].depth*=a}return jv(r)}iy({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],numArgs:1,handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0];return{type:"operatorname",mode:n.mode,body:cy(a),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:vx,mathmlBuilder:(e,t)=>{for(var n=zy(e.body,t.withFont("mathrm")),r=!0,a=0;a<n.length;a++){var o=n[a];if(o instanceof Ty);else if(o instanceof Cy)switch(o.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":var i=o.children[0];1===o.children.length&&i instanceof Ny?i.text=i.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}if(r){var s=n.map(e=>e.toText()).join("");n=[new Ny(s)]}var l=new Cy("mi",n);l.setAttribute("mathvariant","normal");var c=new Cy("mo",[Iy("","text")]);return e.parentIsSupSub?new Cy("mrow",[l,c]):ky([l,c])}}),Ub("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),sy({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?jv(my(e.body,t,!1)):Hv(["mord"],my(e.body,t,!0),t),mathmlBuilder:(e,t)=>Py(e.body,t,!0)}),iy({type:"overline",names:["\\overline"],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=xy(e.body,t.havingCrampedStyle()),r=qv("overline-line",t),a=t.fontMetrics().defaultRuleThickness;return Hv(["mord","overline"],[Gv({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r},{type:"kern",size:a}]})],t)},mathmlBuilder(e,t){var n=new Cy("mo",[new Ny("‾")]);n.setAttribute("stretchy","true");var r=new Cy("mover",[Oy(e.body,t),n]);return r.setAttribute("accent","true"),r}}),iy({type:"phantom",names:["\\phantom"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:cy(r)}},htmlBuilder:(e,t)=>jv(my(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>{var n=zy(e.body,t);return new Cy("mphantom",n)}}),Ub("\\hphantom","\\smash{\\phantom{#1}}"),iy({type:"vphantom",names:["\\vphantom"],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)=>Hv(["mord","rlap"],[Hv(["inner"],[xy(e.body,t.withPhantom())]),Hv(["fix"],[])],t),mathmlBuilder:(e,t)=>{var n=zy(cy(e.body),t),r=new Cy("mphantom",n),a=new Cy("mpadded",[r]);return a.setAttribute("width","0px"),a}}),iy({type:"raisebox",names:["\\raisebox"],numArgs:2,argTypes:["size","hbox"],allowedInText:!0,handler(e,t){var{parser:n}=e,r=Zy(t[0],"size").value,a=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:a}},htmlBuilder(e,t){var n=xy(e.body,t);return Gv({positionType:"shift",positionData:-bg(e.dy,t),children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new Cy("mpadded",[Oy(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),iy({type:"internal",names:["\\relax"],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),iy({type:"rule",names:["\\rule"],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"],handler(e,t,n){var{parser:r}=e,a=n[0],o=Zy(t[0],"size"),i=Zy(t[1],"size");return{type:"rule",mode:r.mode,shift:a&&Zy(a,"size").value,width:o.value,height:i.value}},htmlBuilder(e,t){var n=Hv(["mord","rule"],[],t),r=bg(e.width,t),a=bg(e.height,t),o=e.shift?bg(e.shift,t):0;return n.style.borderRightWidth=xg(r),n.style.borderTopWidth=xg(a),n.style.bottom=xg(o),n.width=r,n.height=a+o,n.depth=-o,n.maxFontSize=1.125*a*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=bg(e.width,t),r=bg(e.height,t),a=e.shift?bg(e.shift,t):0,o=t.color&&t.getColor()||"black",i=new Cy("mspace");i.setAttribute("mathbackground",o),i.setAttribute("width",xg(n)),i.setAttribute("height",xg(r));var s=new Cy("mpadded",[i]);return a>=0?s.setAttribute("height",xg(a)):(s.setAttribute("height",xg(a)),s.setAttribute("depth",xg(-a))),s.setAttribute("voffset",xg(a)),s}});var bx=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];iy({type:"sizing",names:bx,numArgs:0,allowedInText:!0,handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:a}=e,o=a.parseExpression(!1,n);return{type:"sizing",mode:a.mode,size:bx.indexOf(r)+1,body:o}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return yx(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=zy(e.body,n),a=new Cy("mstyle",r);return a.setAttribute("mathsize",xg(n.sizeMultiplier)),a}}),iy({type:"smash",names:["\\smash"],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var{parser:r}=e,a=!1,o=!1,i=n[0]&&Zy(n[0],"ordgroup");if(i)for(var s,l=0;l<i.body.length;++l){if("t"===(s=Jy(i.body[l]).text))a=!0;else{if("b"!==s){a=!1,o=!1;break}o=!0}}else a=!0,o=!0;var c=t[0];return{type:"smash",mode:r.mode,body:c,smashHeight:a,smashDepth:o}},htmlBuilder:(e,t)=>{var n=Hv([],[xy(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 Hv(["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 Hv(["mord"],[Gv({positionType:"firstBaseline",children:[{type:"elem",elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new Cy("mpadded",[Oy(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),iy({type:"sqrt",names:["\\sqrt"],numArgs:1,numOptionalArgs:1,handler(e,t,n){var{parser:r}=e,a=n[0],o=t[0];return{type:"sqrt",mode:r.mode,body:o,index:a}},htmlBuilder(e,t){var n=xy(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=Uv(n,t);var r=t.fontMetrics().defaultRuleThickness,a=r;t.style.id<lg.TEXT.id&&(a=t.fontMetrics().xHeight);var o=r+a/4,{span:i,ruleWidth:s,advanceWidth:l}=function(e,t){var n,r,a,o,i,s=t.havingBaseSizing(),l=zb("\\surd",e*s.sizeMultiplier,Rb,s),c=s.sizeMultiplier,d=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);return"small"===l.type?(e<1?c=1:e<1.4&&(c=.7),a=(1+d)/c,(n=Cb("sqrtMain",r=(1+d+kb)/c,o=1e3+1e3*d+80,d,t)).style.minWidth="0.853em",i=.833/c):"large"===l.type?(o=1080*Mb[l.size],a=(Mb[l.size]+d)/c,r=(Mb[l.size]+d+kb)/c,(n=Cb("sqrtSize"+l.size,r,o,d,t)).style.minWidth="1.02em",i=1/c):(r=e+d+kb,a=e+d,o=Math.floor(1e3*e+d)+80,(n=Cb("sqrtTall",r,o,d,t)).style.minWidth="0.742em",i=1.056),n.height=a,n.style.height=xg(r),{span:n,advanceWidth:i,ruleWidth:(t.fontMetrics().sqrtRuleThickness+d)*c}}(n.height+n.depth+o+r,t),c=i.height-s;c>n.height+n.depth+o&&(o=(o+c-n.height-n.depth)/2);var d=i.height-n.height-o-s;n.style.paddingLeft=xg(l);var u=Gv({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+d)},{type:"elem",elem:i},{type:"kern",size:s}]});if(e.index){var h=t.havingStyle(lg.SCRIPTSCRIPT),p=xy(e.index,h,t);return Hv(["mord","sqrt"],[Hv(["root"],[Gv({positionType:"shift",positionData:-.6*(u.height-u.depth),children:[{type:"elem",elem:p}]})]),u],t)}return Hv(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new Cy("mroot",[Oy(n,t),Oy(r,t)]):new Cy("msqrt",[Oy(n,t)])}});var xx={display:lg.DISPLAY,text:lg.TEXT,script:lg.SCRIPT,scriptscript:lg.SCRIPTSCRIPT};iy({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var{breakOnTokenText:n,funcName:r,parser:a}=e,o=a.parseExpression(!0,n),i=r.slice(1,r.length-5);if(!function(e){return e in xx}(i))throw new Error("Unknown style: "+i);return{type:"styling",mode:a.mode,style:i,body:o}},htmlBuilder(e,t){var n=xx[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont("")),yx(e.body,r,t)},mathmlBuilder(e,t){var n=xx[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(""));var a=zy(e.body,r),o=new Cy("mstyle",a),i={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return o.setAttribute("scriptlevel",i[0]),o.setAttribute("displaystyle",i[1]),o}});sy({type:"supsub",htmlBuilder(e,t){var n=function(e,t){var n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===lg.DISPLAY.size||n.alwaysHandleSupSub)?mx:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===lg.DISPLAY.size||n.limits)?vx:null:"accent"===n.type?Kf(n.base)?tb:null:"horizBrace"===n.type&&!e.sub===n.isOver?cx:null:null}(e,t);if(n)return n(e,t);var r,a,o,{base:i,sup:s,sub:l}=e,c=xy(i,t),d=t.fontMetrics(),u=0,h=0,p=i&&Kf(i);if(s){var m=t.havingStyle(t.style.sup());r=xy(s,m,t),p||(u=c.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(l){var f=t.havingStyle(t.style.sub());a=xy(l,f,t),p||(h=c.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}o=t.style===lg.DISPLAY?d.sup1:t.style.cramped?d.sup3:d.sup2;var g,v=t.sizeMultiplier,y=xg(.5/d.ptPerEm/v),b=null;if(a){var x,w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);if(c instanceof Eg||w)b=xg(-(null!=(x=c.italic)?x:0))}if(r&&a){u=Math.max(u,o,r.depth+.25*d.xHeight),h=Math.max(h,d.sub2);var S=4*d.defaultRuleThickness;if(u-r.depth-(a.height-h)<S){h=S-(u-r.depth)+a.height;var k=.8*d.xHeight-(u-r.depth);k>0&&(u+=k,h-=k)}g=Gv({positionType:"individualShift",children:[{type:"elem",elem:a,shift:h,marginRight:y,marginLeft:b},{type:"elem",elem:r,shift:-u,marginRight:y}]})}else if(a)h=Math.max(h,d.sub1,a.height-.8*d.xHeight),g=Gv({positionType:"shift",positionData:h,children:[{type:"elem",elem:a,marginLeft:b,marginRight:y}]});else{if(!r)throw new Error("supsub must have either sup or sub.");u=Math.max(u,o,r.depth+.25*d.xHeight),g=Gv({positionType:"shift",positionData:-u,children:[{type:"elem",elem:r,marginRight:y}]})}return Hv([yy(c,"right")||"mord"],[c,Hv(["msupsub"],[g])],t)},mathmlBuilder(e,t){var n,r=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,n=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,o=[Oy(e.base,t)];if(e.sub&&o.push(Oy(e.sub,t)),e.sup&&o.push(Oy(e.sup,t)),r)a=n?"mover":"munder";else if(e.sub)if(e.sup){var i=e.base;a=i&&"op"===i.type&&i.limits&&t.style===lg.DISPLAY||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(t.style===lg.DISPLAY||i.limits)?"munderover":"msubsup"}else{var s=e.base;a=s&&"op"===s.type&&s.limits&&(t.style===lg.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===lg.DISPLAY)?"munder":"msub"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===lg.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===lg.DISPLAY)?"mover":"msup"}return new Cy(a,o)}}),sy({type:"atom",htmlBuilder:(e,t)=>Ov(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var n=new Cy("mo",[Iy(e.text,e.mode)]);if("bin"===e.family){var r=Ry(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});var wx={mi:"italic",mn:"normal",mtext:"normal"};sy({type:"mathord",htmlBuilder:(e,t)=>Lv(e,t),mathmlBuilder(e,t){var n=new Cy("mi",[Iy(e.text,e.mode,t)]),r=Ry(e,t)||"italic";return r!==wx[n.type]&&n.setAttribute("mathvariant",r),n}}),sy({type:"textord",htmlBuilder:(e,t)=>Lv(e,t),mathmlBuilder(e,t){var n,r=Iy(e.text,e.mode,t),a=Ry(e,t)||"normal";return n="text"===e.mode?new Cy("mtext",[r]):/[0-9]/.test(e.text)?new Cy("mn",[r]):"\\prime"===e.text?new Cy("mo",[r]):new Cy("mi",[r]),a!==wx[n.type]&&n.setAttribute("mathvariant",a),n}});var Sx={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},kx={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};sy({type:"spacing",htmlBuilder(e,t){if(kx.hasOwnProperty(e.text)){var n=kx[e.text].className||"";if("text"===e.mode){var r=Lv(e,t);return r.classes.push(n),r}return Hv(["mspace",n],[Ov(e.text,e.mode,t)],t)}if(Sx.hasOwnProperty(e.text))return Hv(["mspace",Sx[e.text]],[],t);throw new Hf('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!kx.hasOwnProperty(e.text)){if(Sx.hasOwnProperty(e.text))return new Cy("mspace");throw new Hf('Unknown type of space "'+e.text+'"')}return new Cy("mtext",[new Ny(" ")])}});var Cx=()=>{var e=new Cy("mtd",[]);return e.setAttribute("width","50%"),e};sy({type:"tag",mathmlBuilder(e,t){var n=new Cy("mtable",[new Cy("mtr",[Cx(),new Cy("mtd",[Py(e.body,t)]),Cx(),new Cy("mtd",[Py(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var Nx={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Tx={"\\textbf":"textbf","\\textmd":"textmd"},Ax={"\\textit":"textit","\\textup":"textup"},Mx=(e,t)=>{var n=e.font;return n?Nx[n]?t.withTextFontFamily(Nx[n]):Tx[n]?t.withTextFontWeight(Tx[n]):"\\emph"===n?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Ax[n]):t};iy({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e,a=t[0];return{type:"text",mode:n.mode,body:cy(a),font:r}},htmlBuilder(e,t){var n=Mx(e,t);return Hv(["mord","text"],my(e.body,n,!0),n)},mathmlBuilder(e,t){var n=Mx(e,t);return Py(e.body,n)}}),iy({type:"underline",names:["\\underline"],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=xy(e.body,t),r=qv("underline-line",t),a=t.fontMetrics().defaultRuleThickness;return Hv(["mord","underline"],[Gv({positionType:"top",positionData:n.height,children:[{type:"kern",size:a},{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n}]})],t)},mathmlBuilder(e,t){var n=new Cy("mo",[new Ny("‾")]);n.setAttribute("stretchy","true");var r=new Cy("munder",[Oy(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),iy({type:"vcenter",names:["\\vcenter"],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=xy(e.body,t),r=t.fontMetrics().axisHeight;return Gv({positionType:"shift",positionData:.5*(n.height-r-(n.depth+r)),children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new Cy("mpadded",[Oy(e.body,t)],["vcenter"]);return new Cy("mrow",[n])}}),iy({type:"verb",names:["\\verb"],numArgs:0,allowedInText:!0,handler(e,t,n){throw new Hf("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=Ix(e),r=[],a=t.havingStyle(t.style.text()),o=0;o<n.length;o++){var i=n[o];"~"===i&&(i="\\textasciitilde"),r.push(Pv(i,"Typewriter-Regular",e.mode,a,["mord","texttt"]))}return Hv(["mord","text"].concat(a.sizingClasses(t)),Bv(r),a)},mathmlBuilder(e,t){var n=new Ny(Ix(e)),r=new Cy("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var Ix=e=>e.body.replace(/ /g,e.star?"␣":" "),Dx=ry,Ex="[ \r\n\t]",Rx="(\\\\[a-zA-Z@]+)"+Ex+"*",_x="[̀-ͯ]",zx=new RegExp(_x+"+$"),Px="("+Ex+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-]"+_x+"*|[\ud800-\udbff][\udc00-\udfff]"+_x+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Rx+"|\\\\[^\ud800-\udfff])",Ox=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(Px,"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 Wb("EOF",new Gb(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new Hf("Unexpected character: '"+e[t]+"'",new Wb(e[t],new Gb(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[r]){var a=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===a?(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=a+1,this.lex()}return new Wb(r,new Gb(this,t,this.tokenRegex.lastIndex))}},Lx=class{constructor(e,t){void 0===e&&(e={}),void 0===t&&(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(0===this.undefStack.length)throw new Hf("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)&&(null==e[t]?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(void 0===n&&(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 a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}},Fx=jb;Ub("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),Ub("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),Ub("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),Ub("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),Ub("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),Ub("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Ub("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Bx={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};Ub("\\char",function(e){var t,n=e.popToken(),r=0;if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])r=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new Hf("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(null==(r=Bx[n.text])||r>=t)throw new Hf("Invalid base-"+t+" digit "+n.text);for(var a;null!=(a=Bx[e.future().text])&&a<t;)r*=t,r+=a,e.popToken()}return"\\@char{"+r+"}"});var Vx=(e,t,n,r)=>{var a=e.consumeArg().tokens;if(1!==a.length)throw new Hf("\\newcommand's first argument must be a macro name");var o=a[0].text,i=e.isDefined(o);if(i&&!t)throw new Hf("\\newcommand{"+o+"} attempting to redefine "+o+"; use \\renewcommand");if(!i&&!n)throw new Hf("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var s=0;if(1===(a=e.consumeArg().tokens).length&&"["===a[0].text){for(var l="",c=e.expandNextToken();"]"!==c.text&&"EOF"!==c.text;)l+=c.text,c=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Hf("Invalid number of arguments: "+l);s=parseInt(l),a=e.consumeArg().tokens}return i&&r||e.macros.set(o,{tokens:a,numArgs:s}),""};Ub("\\newcommand",e=>Vx(e,!1,!0,!1)),Ub("\\renewcommand",e=>Vx(e,!0,!1,!1)),Ub("\\providecommand",e=>Vx(e,!0,!0,!0)),Ub("\\message",e=>{e.consumeArgs(1)[0];return""}),Ub("\\errmessage",e=>{e.consumeArgs(1)[0];return""}),Ub("\\show",e=>{e.popToken().text;return""}),Ub("\\bgroup","{"),Ub("\\egroup","}"),Ub("~","\\nobreakspace"),Ub("\\lq","`"),Ub("\\rq","'"),Ub("\\aa","\\r a"),Ub("\\AA","\\r A"),Ub("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Ub("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Ub("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Ub("ℬ","\\mathscr{B}"),Ub("ℰ","\\mathscr{E}"),Ub("ℱ","\\mathscr{F}"),Ub("ℋ","\\mathscr{H}"),Ub("ℐ","\\mathscr{I}"),Ub("ℒ","\\mathscr{L}"),Ub("ℳ","\\mathscr{M}"),Ub("ℛ","\\mathscr{R}"),Ub("ℭ","\\mathfrak{C}"),Ub("ℌ","\\mathfrak{H}"),Ub("ℨ","\\mathfrak{Z}"),Ub("\\Bbbk","\\Bbb{k}"),Ub("\\llap","\\mathllap{\\textrm{#1}}"),Ub("\\rlap","\\mathrlap{\\textrm{#1}}"),Ub("\\clap","\\mathclap{\\textrm{#1}}"),Ub("\\mathstrut","\\vphantom{(}"),Ub("\\underbar","\\underline{\\text{#1}}"),Ub("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),Ub("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Ub("\\ne","\\neq"),Ub("≠","\\neq"),Ub("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Ub("∉","\\notin"),Ub("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Ub("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Ub("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Ub("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Ub("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Ub("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Ub("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Ub("⟂","\\perp"),Ub("‼","\\mathclose{!\\mkern-0.8mu!}"),Ub("∌","\\notni"),Ub("⌜","\\ulcorner"),Ub("⌝","\\urcorner"),Ub("⌞","\\llcorner"),Ub("⌟","\\lrcorner"),Ub("©","\\copyright"),Ub("®","\\textregistered"),Ub("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Ub("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Ub("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Ub("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Ub("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Ub("⋮","\\vdots"),Ub("\\varGamma","\\mathit{\\Gamma}"),Ub("\\varDelta","\\mathit{\\Delta}"),Ub("\\varTheta","\\mathit{\\Theta}"),Ub("\\varLambda","\\mathit{\\Lambda}"),Ub("\\varXi","\\mathit{\\Xi}"),Ub("\\varPi","\\mathit{\\Pi}"),Ub("\\varSigma","\\mathit{\\Sigma}"),Ub("\\varUpsilon","\\mathit{\\Upsilon}"),Ub("\\varPhi","\\mathit{\\Phi}"),Ub("\\varPsi","\\mathit{\\Psi}"),Ub("\\varOmega","\\mathit{\\Omega}"),Ub("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Ub("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Ub("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Ub("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Ub("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Ub("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Ub("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Ub("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Hx={",":"\\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"},$x=/* @__PURE__ */new Set(["bin","rel"]);Ub("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in Hx?t=Hx[n]:("\\not"===n.slice(0,4)||n in Vg.math&&$x.has(Vg.math[n].group))&&(t="\\dotsb"),t});var qx={")":!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};Ub("\\dotso",function(e){return e.future().text in qx?"\\ldots\\,":"\\ldots"}),Ub("\\dotsc",function(e){var t=e.future().text;return t in qx&&","!==t?"\\ldots\\,":"\\ldots"}),Ub("\\cdots",function(e){return e.future().text in qx?"\\@cdots\\,":"\\@cdots"}),Ub("\\dotsb","\\cdots"),Ub("\\dotsm","\\cdots"),Ub("\\dotsi","\\!\\cdots"),Ub("\\dotsx","\\ldots\\,"),Ub("\\DOTSI","\\relax"),Ub("\\DOTSB","\\relax"),Ub("\\DOTSX","\\relax"),Ub("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Ub("\\,","\\tmspace+{3mu}{.1667em}"),Ub("\\thinspace","\\,"),Ub("\\>","\\mskip{4mu}"),Ub("\\:","\\tmspace+{4mu}{.2222em}"),Ub("\\medspace","\\:"),Ub("\\;","\\tmspace+{5mu}{.2777em}"),Ub("\\thickspace","\\;"),Ub("\\!","\\tmspace-{3mu}{.1667em}"),Ub("\\negthinspace","\\!"),Ub("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Ub("\\negthickspace","\\tmspace-{5mu}{.277em}"),Ub("\\enspace","\\kern.5em "),Ub("\\enskip","\\hskip.5em\\relax"),Ub("\\quad","\\hskip1em\\relax"),Ub("\\qquad","\\hskip2em\\relax"),Ub("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Ub("\\tag@paren","\\tag@literal{({#1})}"),Ub("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Hf("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Ub("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Ub("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Ub("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Ub("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Ub("\\newline","\\\\\\relax"),Ub("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var jx=xg(Pg["Main-Regular"]["T".charCodeAt(0)][1]-.7*Pg["Main-Regular"]["A".charCodeAt(0)][1]);Ub("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+jx+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Ub("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+jx+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Ub("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Ub("\\@hspace","\\hskip #1\\relax"),Ub("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Ub("\\ordinarycolon",":"),Ub("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Ub("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Ub("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Ub("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Ub("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Ub("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Ub("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Ub("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Ub("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Ub("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Ub("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Ub("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Ub("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Ub("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Ub("∷","\\dblcolon"),Ub("∹","\\eqcolon"),Ub("≔","\\coloneqq"),Ub("≕","\\eqqcolon"),Ub("⩴","\\Coloneqq"),Ub("\\ratio","\\vcentcolon"),Ub("\\coloncolon","\\dblcolon"),Ub("\\colonequals","\\coloneqq"),Ub("\\coloncolonequals","\\Coloneqq"),Ub("\\equalscolon","\\eqqcolon"),Ub("\\equalscoloncolon","\\Eqqcolon"),Ub("\\colonminus","\\coloneq"),Ub("\\coloncolonminus","\\Coloneq"),Ub("\\minuscolon","\\eqcolon"),Ub("\\minuscoloncolon","\\Eqcolon"),Ub("\\coloncolonapprox","\\Colonapprox"),Ub("\\coloncolonsim","\\Colonsim"),Ub("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Ub("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Ub("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Ub("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Ub("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Ub("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Ub("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Ub("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Ub("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Ub("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Ub("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Ub("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Ub("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Ub("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Ub("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Ub("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Ub("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Ub("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Ub("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Ub("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Ub("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Ub("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Ub("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Ub("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Ub("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Ub("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Ub("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Ub("\\imath","\\html@mathml{\\@imath}{ı}"),Ub("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Ub("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Ub("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Ub("⟦","\\llbracket"),Ub("⟧","\\rrbracket"),Ub("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Ub("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Ub("⦃","\\lBrace"),Ub("⦄","\\rBrace"),Ub("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Ub("⦵","\\minuso"),Ub("\\darr","\\downarrow"),Ub("\\dArr","\\Downarrow"),Ub("\\Darr","\\Downarrow"),Ub("\\lang","\\langle"),Ub("\\rang","\\rangle"),Ub("\\uarr","\\uparrow"),Ub("\\uArr","\\Uparrow"),Ub("\\Uarr","\\Uparrow"),Ub("\\N","\\mathbb{N}"),Ub("\\R","\\mathbb{R}"),Ub("\\Z","\\mathbb{Z}"),Ub("\\alef","\\aleph"),Ub("\\alefsym","\\aleph"),Ub("\\Alpha","\\mathrm{A}"),Ub("\\Beta","\\mathrm{B}"),Ub("\\bull","\\bullet"),Ub("\\Chi","\\mathrm{X}"),Ub("\\clubs","\\clubsuit"),Ub("\\cnums","\\mathbb{C}"),Ub("\\Complex","\\mathbb{C}"),Ub("\\Dagger","\\ddagger"),Ub("\\diamonds","\\diamondsuit"),Ub("\\empty","\\emptyset"),Ub("\\Epsilon","\\mathrm{E}"),Ub("\\Eta","\\mathrm{H}"),Ub("\\exist","\\exists"),Ub("\\harr","\\leftrightarrow"),Ub("\\hArr","\\Leftrightarrow"),Ub("\\Harr","\\Leftrightarrow"),Ub("\\hearts","\\heartsuit"),Ub("\\image","\\Im"),Ub("\\infin","\\infty"),Ub("\\Iota","\\mathrm{I}"),Ub("\\isin","\\in"),Ub("\\Kappa","\\mathrm{K}"),Ub("\\larr","\\leftarrow"),Ub("\\lArr","\\Leftarrow"),Ub("\\Larr","\\Leftarrow"),Ub("\\lrarr","\\leftrightarrow"),Ub("\\lrArr","\\Leftrightarrow"),Ub("\\Lrarr","\\Leftrightarrow"),Ub("\\Mu","\\mathrm{M}"),Ub("\\natnums","\\mathbb{N}"),Ub("\\Nu","\\mathrm{N}"),Ub("\\Omicron","\\mathrm{O}"),Ub("\\plusmn","\\pm"),Ub("\\rarr","\\rightarrow"),Ub("\\rArr","\\Rightarrow"),Ub("\\Rarr","\\Rightarrow"),Ub("\\real","\\Re"),Ub("\\reals","\\mathbb{R}"),Ub("\\Reals","\\mathbb{R}"),Ub("\\Rho","\\mathrm{P}"),Ub("\\sdot","\\cdot"),Ub("\\sect","\\S"),Ub("\\spades","\\spadesuit"),Ub("\\sub","\\subset"),Ub("\\sube","\\subseteq"),Ub("\\supe","\\supseteq"),Ub("\\Tau","\\mathrm{T}"),Ub("\\thetasym","\\vartheta"),Ub("\\weierp","\\wp"),Ub("\\Zeta","\\mathrm{Z}"),Ub("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Ub("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Ub("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Ub("\\bra","\\mathinner{\\langle{#1}|}"),Ub("\\ket","\\mathinner{|{#1}\\rangle}"),Ub("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Ub("\\Bra","\\left\\langle#1\\right|"),Ub("\\Ket","\\left|#1\\right\\rangle");var Ux=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.consumeArg().tokens,i=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>n=>{e&&(n.macros.set("|",i),a.length&&n.macros.set("\\|",s));var o=t;return!t&&a.length&&"|"===n.future().text&&(n.popToken(),o=!0),{tokens:o?a:r,numArgs:0}};t.macros.set("|",l(!1)),a.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,d=t.expandTokens([...o,...c,...n]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};Ub("\\bra@ket",Ux(!1)),Ub("\\bra@set",Ux(!0)),Ub("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Ub("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Ub("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Ub("\\angln","{\\angl n}"),Ub("\\blue","\\textcolor{##6495ed}{#1}"),Ub("\\orange","\\textcolor{##ffa500}{#1}"),Ub("\\pink","\\textcolor{##ff00af}{#1}"),Ub("\\red","\\textcolor{##df0030}{#1}"),Ub("\\green","\\textcolor{##28ae7b}{#1}"),Ub("\\gray","\\textcolor{gray}{#1}"),Ub("\\purple","\\textcolor{##9d38bd}{#1}"),Ub("\\blueA","\\textcolor{##ccfaff}{#1}"),Ub("\\blueB","\\textcolor{##80f6ff}{#1}"),Ub("\\blueC","\\textcolor{##63d9ea}{#1}"),Ub("\\blueD","\\textcolor{##11accd}{#1}"),Ub("\\blueE","\\textcolor{##0c7f99}{#1}"),Ub("\\tealA","\\textcolor{##94fff5}{#1}"),Ub("\\tealB","\\textcolor{##26edd5}{#1}"),Ub("\\tealC","\\textcolor{##01d1c1}{#1}"),Ub("\\tealD","\\textcolor{##01a995}{#1}"),Ub("\\tealE","\\textcolor{##208170}{#1}"),Ub("\\greenA","\\textcolor{##b6ffb0}{#1}"),Ub("\\greenB","\\textcolor{##8af281}{#1}"),Ub("\\greenC","\\textcolor{##74cf70}{#1}"),Ub("\\greenD","\\textcolor{##1fab54}{#1}"),Ub("\\greenE","\\textcolor{##0d923f}{#1}"),Ub("\\goldA","\\textcolor{##ffd0a9}{#1}"),Ub("\\goldB","\\textcolor{##ffbb71}{#1}"),Ub("\\goldC","\\textcolor{##ff9c39}{#1}"),Ub("\\goldD","\\textcolor{##e07d10}{#1}"),Ub("\\goldE","\\textcolor{##a75a05}{#1}"),Ub("\\redA","\\textcolor{##fca9a9}{#1}"),Ub("\\redB","\\textcolor{##ff8482}{#1}"),Ub("\\redC","\\textcolor{##f9685d}{#1}"),Ub("\\redD","\\textcolor{##e84d39}{#1}"),Ub("\\redE","\\textcolor{##bc2612}{#1}"),Ub("\\maroonA","\\textcolor{##ffbde0}{#1}"),Ub("\\maroonB","\\textcolor{##ff92c6}{#1}"),Ub("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Ub("\\maroonD","\\textcolor{##ca337c}{#1}"),Ub("\\maroonE","\\textcolor{##9e034e}{#1}"),Ub("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Ub("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Ub("\\purpleC","\\textcolor{##aa87ff}{#1}"),Ub("\\purpleD","\\textcolor{##7854ab}{#1}"),Ub("\\purpleE","\\textcolor{##543b78}{#1}"),Ub("\\mintA","\\textcolor{##f5f9e8}{#1}"),Ub("\\mintB","\\textcolor{##edf2df}{#1}"),Ub("\\mintC","\\textcolor{##e0e5cc}{#1}"),Ub("\\grayA","\\textcolor{##f6f7f7}{#1}"),Ub("\\grayB","\\textcolor{##f0f1f2}{#1}"),Ub("\\grayC","\\textcolor{##e3e5e6}{#1}"),Ub("\\grayD","\\textcolor{##d6d8da}{#1}"),Ub("\\grayE","\\textcolor{##babec2}{#1}"),Ub("\\grayF","\\textcolor{##888d93}{#1}"),Ub("\\grayG","\\textcolor{##626569}{#1}"),Ub("\\grayH","\\textcolor{##3b3e40}{#1}"),Ub("\\grayI","\\textcolor{##21242c}{#1}"),Ub("\\kaBlue","\\textcolor{##314453}{#1}"),Ub("\\kaGreen","\\textcolor{##71B307}{#1}");var Gx={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Wx=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 Lx(Fx,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Ox(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&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 Wb("EOF",n.loc)),this.pushTokens(r),new Wb("",Gb.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,a=this.future(),o=0,i=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++o;else if("}"===r.text){if(-1===--o)throw new Hf("Extra }",r)}else if("EOF"===r.text)throw new Hf("Unexpected end of input in a macro argument, expected '"+(e&&n?e[i]:"}")+"'",r);if(e&&n)if((0===o||1===o&&"{"===e[i])&&r.text===e[i]){if(++i===e.length){t.splice(-i,i);break}}else i=0}while(0!==o||n);return"{"===a.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:a,end:r}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Hf("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;r<n.length;r++){var a=this.popToken();if(n[r]!==a.text)throw new Hf("Use of the macro doesn't match its definition",a)}}for(var o=[],i=0;i<e;i++)o.push(this.consumeArg(t&&t[i+1]).tokens);return o}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new Hf("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(null==r||e&&r.unexpandable){if(e&&null==r&&"\\"===n[0]&&!this.isDefined(n))throw new Hf("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var a=r.tokens,o=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs)for(var i=(a=a.slice()).length-1;i>=0;--i){var s=a[i];if("#"===s.text){if(0===i)throw new Hf("Incomplete placeholder at end of macro body",s);if("#"===(s=a[--i]).text)a.splice(i+1,1);else{if(!/^[1-9]$/.test(s.text))throw new Hf("Not a valid argument number",s);a.splice(i,2,...o[+s.text-1])}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Wb(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(!1===this.expandOnce(!0)){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!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(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var n=this.lexer.catcodes[e];if(null!=n&&13!==n)return}var r="function"==typeof t?t(this):t;if("string"==typeof r){var a=0;if(r.includes("#"))for(var o=r.replace(/##/g,"");o.includes("#"+(a+1));)++a;for(var i=new Ox(r,this.settings),s=[],l=i.lex();"EOF"!==l.text;)s.push(l),l=i.lex();return s.reverse(),{tokens:s,numArgs:a}}return r}isDefined(e){return this.macros.has(e)||Dx.hasOwnProperty(e)||Vg.math.hasOwnProperty(e)||Vg.text.hasOwnProperty(e)||Gx.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Dx.hasOwnProperty(e)&&!Dx[e].primitive}},Yx=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Kx=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Xx={"́":{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"}},Zx={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},Jx=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 Wx(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new Hf("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(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 Wb("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(e.endOfExpression.has(a.text))break;if(n&&a.text===n)break;if(t&&Dx[a.text]&&Dx[a.text].infix)break;var o=this.parseAtom(n);if(!o)break;"internal"!==o.type&&r.push(o)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,n=-1,r=0;r<e.length;r++){var a=e[r];if("infix"===a.type){if(-1!==n)throw new Hf("only one infix operator per group",a.token);n=r,t=a.replaceWith}}if(-1!==n&&t){var o,i,s=e.slice(0,n),l=e.slice(n+1);return o=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},i=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===t?this.callFunction(t,[o,e[n],i],[]):this.callFunction(t,[o,i],[])]}return e}handleSupSubscript(e){var t,n=this.fetch(),r=n.text;this.consume(),this.consumeSpaces();do{var a;t=this.parseGroup(e)}while("internal"===(null==(a=t)?void 0:a.type));if(!t)throw new Hf("Expected group after '"+r+"'",n);return t}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,n,r=this.parseGroup("atom",e);if("internal"===(null==r?void 0:r.type))return r;if("text"===this.mode)return r;for(;;){this.consumeSpaces();var a=this.fetch();if("\\limits"===a.text||"\\nolimits"===a.text){if(r&&"op"===r.type)r.limits="\\limits"===a.text,r.alwaysHandleSupSub=!0;else{if(!r||"operatorname"!==r.type)throw new Hf("Limit controls must follow a math operator",a);r.alwaysHandleSupSub&&(r.limits="\\limits"===a.text)}this.consume()}else if("^"===a.text){if(t)throw new Hf("Double superscript",a);t=this.handleSupSubscript("superscript")}else if("_"===a.text){if(n)throw new Hf("Double subscript",a);n=this.handleSupSubscript("subscript")}else if("'"===a.text){if(t)throw new Hf("Double superscript",a);var o={type:"textord",mode:this.mode,text:"\\prime"},i=[o];for(this.consume();"'"===this.fetch().text;)i.push(o),this.consume();"^"===this.fetch().text&&i.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:i}}else{if(!Kx[a.text])break;var s=Yx.test(a.text),l=[];for(l.push(new Wb(Kx[a.text])),this.consume();;){var c=this.fetch().text;if(!Kx[c])break;if(Yx.test(c)!==s)break;l.unshift(new Wb(Kx[c])),this.consume()}var d=this.subparse(l);s?n={type:"ordgroup",mode:"math",body:d}:t={type:"ordgroup",mode:"math",body:d}}}return t&&n?{type:"supsub",mode:this.mode,base:r,sup:t,sub:n}:t?{type:"supsub",mode:this.mode,base:r,sup:t}:n?{type:"supsub",mode:this.mode,base:r,sub:n}:r}parseFunction(e,t){var n=this.fetch(),r=n.text,a=Dx[r];if(!a)return null;if(this.consume(),t&&"atom"!==t&&!a.allowedInArgument)throw new Hf("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);if("text"===this.mode&&!a.allowedInText)throw new Hf("Can't use function '"+r+"' in text mode",n);if("math"===this.mode&&!1===a.allowedInMath)throw new Hf("Can't use function '"+r+"' in math mode",n);var{args:o,optArgs:i}=this.parseArguments(r,a);return this.callFunction(r,o,i,n,e)}callFunction(e,t,n,r,a){var o={funcName:e,parser:this,token:r,breakOnTokenText:a},i=Dx[e];if(i&&i.handler)return i.handler(o,t,n);throw new Hf("No function handler for "+e)}parseArguments(e,t){var n,r=null!=(n=t.numOptionalArgs)?n:0,a=t.numArgs+r;if(0===a)return{args:[],optArgs:[]};for(var o=[],i=[],s=0;s<a;s++){var l,c=null==(l=t.argTypes)?void 0:l[s],d=s<r;("primitive"in t&&t.primitive&&null==c||"sqrt"===t.type&&1===s&&null==i[0])&&(c="primitive");var u=this.parseGroupOfType("argument to '"+e+"'",c,d);if(d)i.push(u);else{if(null==u)throw new Hf("Null argument, please report this as a bug");o.push(u)}}return{args:o,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 null!=r?{type:"styling",mode:r.mode,body:[r],style:"text",resetFont:!0}:null;case"raw":var a=this.parseStringGroup(n);return null!=a?{type:"raw",mode:"text",string:a.text}:null;case"primitive":if(n)throw new Hf("A primitive argument cannot be optional");var o=this.parseGroup(e);if(null==o)throw new Hf("Expected group as "+e,this.fetch());return o;case"original":case void 0:return this.parseArgumentGroup(n);default:throw new Hf("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e){var t=this.gullet.scanArgument(e);if(null==t)return null;for(var n,r="";"EOF"!==(n=this.fetch()).text;)r+=n.text,this.consume();return this.consume(),t.text=r,t}parseRegexGroup(e,t){for(var n,r=this.fetch(),a=r,o="";"EOF"!==(n=this.fetch()).text&&e.test(o+n.text);)o+=(a=n).text,this.consume();if(""===o)throw new Hf("Invalid "+t+": '"+r.text+"'",r);return r.range(a,o)}parseColorGroup(e){var t=this.parseStringGroup(e);if(null==t)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 Hf("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.parseStringGroup(e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new Hf("Invalid size: '"+t.text+"'",t);var a={number:+(r[1]+r[2]),unit:r[3]};if(!yg(a))throw new Hf("Invalid unit: '"+a.unit+"'",t);return{type:"size",mode:this.mode,value:a,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup(e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)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(null==n)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:n.loc,body:a};return t&&this.switchMode(r),o}parseGroup(e,t){var n,r=this.fetch(),a=r.text;if("{"===a||"\\begingroup"===a){this.consume();var o="{"===a?"}":"\\endgroup";this.gullet.beginGroup();var i=this.parseExpression(!1,o),s=this.fetch();this.expect(o),this.gullet.endGroup(),n={type:"ordgroup",mode:this.mode,loc:Gb.range(r,s),body:i,semisimple:"\\begingroup"===a||void 0}}else if(null==(n=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===a[0]&&!Gx.hasOwnProperty(a)){if(this.settings.throwOnError)throw new Hf("Undefined control sequence: "+a,r);n=this.formatUnsupportedCmd(a),this.consume()}return n}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if("textord"===r.type){var a=r.text,o=e[n+1];if(o&&"textord"===o.type){if("-"===a&&"-"===o.text){var i=e[n+2];n+1<t&&i&&"textord"===i.type&&"-"===i.text?(e.splice(n,3,{type:"textord",mode:"text",loc:Gb.range(r,i),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:Gb.range(r,o),text:"--"}),t-=1)}"'"!==a&&"`"!==a||o.text!==a||(e.splice(n,2,{type:"textord",mode:"text",loc:Gb.range(r,o),text:a+a}),t-=1)}}}}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 Hf("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:r}}Zx.hasOwnProperty(t[0])&&!Vg[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=Zx[t[0]]+t.slice(1));var a,o=zx.exec(t);if(o&&("i"===(t=t.substring(0,o.index))?t="ı":"j"===t&&(t="ȷ")),Vg[this.mode][t]){this.settings.strict&&"math"===this.mode&&yv.includes(t)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var i,s=Vg[this.mode][t].group,l=Gb.range(e);i=function(e){return e in Ky}(s)?{type:"atom",mode:this.mode,family:s,loc:l,text:t}:{type:s,mode:this.mode,loc:l,text:t},a=i}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(ug(t.charCodeAt(0))?"math"===this.mode&&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:Gb.range(e),text:t}}if(this.consume(),o)for(var c=0;c<o[0].length;c++){var d=o[0][c];if(!Xx[d])throw new Hf("Unknown accent ' "+d+"'",e);var u=Xx[d][this.mode]||Xx[d].text;if(!u)throw new Hf("Accent "+d+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:Gb.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}};Jx.endOfExpression=/* @__PURE__ */new Set(["}","\\endgroup","\\end","\\right","&"]);var Qx=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new Jx(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 Hf("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new Wb("\\df@tag")])}]}return r},ew=function(e,t,n){t.textContent="";var r=nw(e,n).toNode();t.appendChild(r)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&(ew=function(){throw new Hf("KaTeX doesn't work in quirks mode.")});var tw=function(e,t,n){if(n.throwOnError||!(e instanceof Hf))throw e;var r=Hv(["katex-error"],[new Eg(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},nw=function(e,t){var n=new Qf(t);try{return function(e,t,n){var r,a=$y(n);return"mathml"===n.output?Ly(e,t,a,n.displayMode,!0):(r="html"===n.output?Hv(["katex"],[Sy(e,a)]):Hv(["katex"],[Ly(e,t,a,n.displayMode,!1),Sy(e,a)]),qy(r,n))}(Qx(e,n),e,n)}catch(r){return tw(r,e,n)}},rw={version:"0.17.0",render:ew,renderToString:function(e,t){return nw(e,t).toMarkup()},ParseError:Hf,SETTINGS_SCHEMA:Xf,__parse:function(e,t){return Qx(e,new Qf(t))},__renderToDomTree:nw,__renderToHTMLTree:function(e,t){var n=new Qf(t);try{return function(e,t,n){return qy(Hv(["katex"],[Sy(e,$y(n))]),n)}(Qx(e,n),0,n)}catch(r){return tw(r,e,n)}},__setFontMetrics:function(e,t){Pg[e]=t},__defineSymbol:Hg,__defineFunction:iy,__defineMacro:Ub,__domTree:{Span:Ag,Anchor:Mg,SymbolNode:Eg,SvgNode:Rg,PathNode:_g,LineNode:zg}};rw.__defineMacro("\\ce",function(e){return aw(e.consumeArgs(1)[0],"ce")}),rw.__defineMacro("\\pu",function(e){return aw(e.consumeArgs(1)[0],"pu")}),rw.__defineMacro("\\tripledash","{\\vphantom{-}\\raisebox{2.56mu}{$\\mkern2mu\\tiny\\text{-}\\mkern1mu\\text{-}\\mkern1mu\\text{-}\\mkern2mu$}}");var aw=function(e,t){for(var n="",r=e.length&&e[e.length-1].loc.start,a=e.length-1;a>=0;a--)e[a].loc.start>r&&(n+=" ",r=e[a].loc.start),n+=e[a].text,r+=e[a].text.length;return iw.go(ow.go(n,t))},ow={go:function(e,t){if(!e)return[];void 0===t&&(t="ce");var n,r="0",a={};a.parenthesisLevel=0,e=(e=(e=e.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var o=10,i=[];;){n!==e?(o=10,n=e):o--;var s=ow.stateMachines[t],l=s.transitions[r]||s.transitions["*"];e:for(var c=0;c<l.length;c++){var d=ow.patterns.match_(l[c].pattern,e);if(d){for(var u=l[c].task,h=0;h<u.action_.length;h++){var p;if(s.actions[u.action_[h].type_])p=s.actions[u.action_[h].type_](a,d.match_,u.action_[h].option);else{if(!ow.actions[u.action_[h].type_])throw["MhchemBugA","mhchem bug A. Please report. ("+u.action_[h].type_+")"];p=ow.actions[u.action_[h].type_](a,d.match_,u.action_[h].option)}ow.concatArray(i,p)}if(r=u.nextState||r,!(e.length>0))return i;if(u.revisit||(e=d.remainder),!u.toContinue)break e}}if(o<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Array.isArray(t))for(var n=0;n<t.length;n++)e.push(t[n]);else e.push(t)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return t&&t[0]?{match_:t.splice(1),remainder:e.substr(t[0].length)}:null},"(-)(9)^(-9)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return t&&t[0]?{match_:t.splice(1),remainder:e.substr(t[0].length)}:null},"state of aggregation $":function(e){var t=ow.patterns.findObserveGroups(e,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(t&&t.remainder.match(/^($|[\s,;\)\]\}])/))return t;var n=e.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return n?{match_:n[0],remainder:e.substr(n[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(e){return ow.patterns.findObserveGroups(e,"^{","","","}")},"^($...$)":function(e){return ow.patterns.findObserveGroups(e,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(e){return ow.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(e){return ow.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(e){return ow.patterns.findObserveGroups(e,"_{","","","}")},"_($...$)":function(e){return ow.patterns.findObserveGroups(e,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(e){return ow.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(e){return ow.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(e){return ow.patterns.findObserveGroups(e,"","{","}","")},"{(...)}":function(e){return ow.patterns.findObserveGroups(e,"{","","","}")},"$...$":function(e){return ow.patterns.findObserveGroups(e,"","$","$","")},"${(...)}$":function(e){return ow.patterns.findObserveGroups(e,"${","","","}$")},"$(...)$":function(e){return ow.patterns.findObserveGroups(e,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(e){return ow.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return ow.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return ow.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return ow.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(e){return ow.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return ow.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return ow.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return ow.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return ow.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return ow.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return ow.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return ow.patterns.findObserveGroups(e,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(e){var t=e.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/);if(t)return{match_:t[0],remainder:e.substr(t[0].length)};var n=ow.patterns.findObserveGroups(e,"","$","$","");return n&&(t=n.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this.amount(e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,n,r,a,o,i,s,l,c){var d=function(e,t){if("string"==typeof t)return 0!==e.indexOf(t)?null:t;var n=e.match(t);return n?n[0]:null},u=d(e,t);if(null===u)return null;if(e=e.substr(u.length),null===(u=d(e,n)))return null;var h=function(e,t,n){for(var r=0;t<e.length;){var a=e.charAt(t),o=d(e.substr(t),n);if(null!==o&&0===r)return{endMatchBegin:t,endMatchEnd:t+o.length};if("{"===a)r++;else if("}"===a){if(0===r)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];r--}t++}return null}(e,u.length,r||a);if(null===h)return null;var p=e.substring(0,r?h.endMatchEnd:h.endMatchBegin);if(o||i){var m=this.findObserveGroups(e.substr(h.endMatchEnd),o,i,s,l);if(null===m)return null;var f=[p,m.match_];return{match_:c?f.join(""):f,remainder:m.remainder}}return{match_:p,remainder:e.substr(h.endMatchEnd)}},match_:function(e,t){var n=ow.patterns.patterns[e];if(void 0===n)throw["MhchemBugP","mhchem bug P. Please report. ("+e+")"];if("function"==typeof n)return ow.patterns.patterns[e](t);var r=t.match(n);return r?{match_:r[2]?[r[1],r[2]]:r[1]?r[1]:r[0],remainder:t.substr(r[0].length)}:null}},actions:{"a=":function(e,t){e.a=(e.a||"")+t},"b=":function(e,t){e.b=(e.b||"")+t},"p=":function(e,t){e.p=(e.p||"")+t},"o=":function(e,t){e.o=(e.o||"")+t},"q=":function(e,t){e.q=(e.q||"")+t},"d=":function(e,t){e.d=(e.d||"")+t},"rm=":function(e,t){e.rm=(e.rm||"")+t},"text=":function(e,t){e.text_=(e.text_||"")+t},insert:function(e,t,n){return{type_:n}},"insert+p1":function(e,t,n){return{type_:n,p1:t}},"insert+p1+p2":function(e,t,n){return{type_:n,p1:t[0],p2:t[1]}},copy:function(e,t){return t},rm:function(e,t){return{type_:"rm",p1:t||""}},text:function(e,t){return ow.go(t,"text")},"{text}":function(e,t){var n=["{"];return ow.concatArray(n,ow.go(t,"text")),n.push("}"),n},"tex-math":function(e,t){return ow.go(t,"tex-math")},"tex-math tight":function(e,t){return ow.go(t,"tex-math tight")},bond:function(e,t,n){return{type_:"bond",kind_:n||t}},"color0-output":function(e,t){return{type_:"color0",color:t[0]}},ce:function(e,t){return ow.go(t)},"1/2":function(e,t){var n=[];t.match(/^[+\-]/)&&(n.push(t.substr(0,1)),t=t.substr(1));var r=t.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return r[1]=r[1].replace(/\$/g,""),n.push({type_:"frac",p1:r[1],p2:r[2]}),r[3]&&(r[3]=r[3].replace(/\$/g,""),n.push({type_:"tex-math",p1:r[3]})),n},"9,9":function(e,t){return ow.go(t,"9,9")}},createTransitions:function(e){var t,n,r,a,o={};for(t in e)for(n in e[t])for(r=n.split("|"),e[t][n].stateArray=r,a=0;a<r.length;a++)o[r[a]]=[];for(t in e)for(n in e[t])for(r=e[t][n].stateArray||[],a=0;a<r.length;a++){var i=e[t][n];if(i.action_){i.action_=[].concat(i.action_);for(var s=0;s<i.action_.length;s++)"string"==typeof i.action_[s]&&(i.action_[s]={type_:i.action_[s]})}else i.action_=[];for(var l=t.split("|"),c=0;c<l.length;c++)if("*"===r[a])for(var d in o)o[d].push({pattern:l[c],task:i});else o[r[a]].push({pattern:l[c],task:i})}return o},stateMachines:{}};ow.stateMachines={ce:{transitions:ow.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(e,t){var n;if((e.d||"").match(/^[0-9]+$/)){var r=e.d;e.d=void 0,n=this.output(e),e.b=r}else n=this.output(e);return ow.actions["o="](e,t),n},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e.beginsWithBond){var n=[];return ow.concatArray(n,this.output(e)),ow.concatArray(n,ow.actions.bond(e,t,"-")),n}e.d=t},"- after o/d":function(e,t,n){var r=ow.patterns.match_("orbital",e.o||""),a=ow.patterns.match_("one lowercase greek letter $",e.o||""),o=ow.patterns.match_("one lowercase latin letter $",e.o||""),i=ow.patterns.match_("$one lowercase latin letter$ $",e.o||""),s="-"===t&&(r&&""===r.remainder||a||o||i);!s||e.a||e.b||e.p||e.d||e.q||r||!o||(e.o="$"+e.o+"$");var l=[];return s?(ow.concatArray(l,this.output(e)),l.push({type_:"hyphen"})):(r=ow.patterns.match_("digits",e.d||""),n&&r&&""===r.remainder?(ow.concatArray(l,ow.actions["d="](e,t)),ow.concatArray(l,this.output(e))):(ow.concatArray(l,this.output(e)),ow.concatArray(l,ow.actions.bond(e,t,"-")))),l},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e.beginsWithBond=!0},"beginsWithBond=false":function(e){e.beginsWithBond=!1},"parenthesisLevel++":function(e){e.parenthesisLevel++},"parenthesisLevel--":function(e){e.parenthesisLevel--},"state of aggregation":function(e,t){return{type_:"state of aggregation",p1:ow.go(t,"o")}},comma:function(e,t){var n=t.replace(/\s*$/,"");return n!==t&&0===e.parenthesisLevel?{type_:"comma enumeration L",p1:n}:{type_:"comma enumeration M",p1:n}},output:function(e,t,n){var r,a,o;e.r?(a="M"===e.rdt?ow.go(e.rd,"tex-math"):"T"===e.rdt?[{type_:"text",p1:e.rd||""}]:ow.go(e.rd),o="M"===e.rqt?ow.go(e.rq,"tex-math"):"T"===e.rqt?[{type_:"text",p1:e.rq||""}]:ow.go(e.rq),r={type_:"arrow",r:e.r,rd:a,rq:o}):(r=[],(e.a||e.b||e.p||e.o||e.q||e.d||n)&&(e.sb&&r.push({type_:"entitySkip"}),e.o||e.q||e.d||e.b||e.p||2===n?e.o||e.q||e.d||!e.b&&!e.p?e.o&&"kv"===e.dType&&ow.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&"kv"===e.dType&&!e.q&&(e.dType=void 0):(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):(e.o=e.a,e.a=void 0),r.push({type_:"chemfive",a:ow.go(e.a,"a"),b:ow.go(e.b,"bd"),p:ow.go(e.p,"pq"),o:ow.go(e.o,"o"),q:ow.go(e.q,"pq"),d:ow.go(e.d,"oxidation"===e.dType?"oxidation":"bd"),dType:e.dType})));for(var i in e)"parenthesisLevel"!==i&&"beginsWithBond"!==i&&delete e[i];return r},"oxidation-output":function(e,t){var n=["{"];return ow.concatArray(n,ow.go(t,"oxidation")),n.push("}"),n},"frac-output":function(e,t){return{type_:"frac-ce",p1:ow.go(t[0]),p2:ow.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:ow.go(t[0]),p2:ow.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:ow.go(t[0]),p2:ow.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:ow.go(t[0]),p2:ow.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:ow.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,n){return{type_:"operator",kind_:n||t}}}},a:{transitions:ow.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:ow.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:ow.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var n in e)delete e[n];return t}}}},pq:{transitions:ow.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(e,t){return{type_:"state of aggregation subscript",p1:ow.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:ow.go(t[1],"pq")}}}},bd:{transitions:ow.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(e,t){return{type_:"color",color1:t[0],color2:ow.go(t[1],"bd")}}}},oxidation:{transitions:ow.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(e,t){return{type_:"roman numeral",p1:t||""}}}},"tex-math":{transitions:ow.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var n in e)delete e[n];return t}}}},"tex-math tight":{transitions:ow.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(e,t){e.o=(e.o||"")+"{"+t+"}"},output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var n in e)delete e[n];return t}}}},"9,9":{transitions:ow.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:ow.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(e,t){var n=[];return"+-"===t[0]||"+/-"===t[0]?n.push("\\pm "):t[0]&&n.push(t[0]),t[1]&&(ow.concatArray(n,ow.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?ow.concatArray(n,ow.go(t[2],"pu-9,9")):n.push(t[2])),t[3]=t[4]||t[3],t[3]&&(t[3]=t[3].trim(),"e"===t[3]||"*"===t[3].substr(0,1)?n.push({type_:"cdot"}):n.push({type_:"times"}))),t[3]&&n.push("10^{"+t[5]+"}"),n},"number^":function(e,t){var n=[];return"+-"===t[0]||"+/-"===t[0]?n.push("\\pm "):t[0]&&n.push(t[0]),ow.concatArray(n,ow.go(t[1],"pu-9,9")),n.push("^{"+t[2]+"}"),n},operator:function(e,t,n){return{type_:"operator",kind_:n||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,n=ow.patterns.match_("{(...)}",e.d||"");n&&""===n.remainder&&(e.d=n.match_);var r=ow.patterns.match_("{(...)}",e.q||"");if(r&&""===r.remainder&&(e.q=r.match_),e.d&&(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.d=e.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var a={d:ow.go(e.d,"pu"),q:ow.go(e.q,"pu")};"//"===e.o?t={type_:"pu-frac",p1:a.d,p2:a.q}:(t=a.d,a.d.length>1||a.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),ow.concatArray(t,a.q))}else t=ow.go(e.d,"pu-2");for(var o in e)delete e[o];return t}}},"pu-2":{transitions:ow.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(e,t){e.rm+="^{"+t+"}"},space:function(){return{type_:"pu-space-2"}},output:function(e){var t=[];if(e.rm){var n=ow.patterns.match_("{(...)}",e.rm||"");t=n&&""===n.remainder?ow.go(n.match_,"pu"):{type_:"rm",p1:e.rm}}for(var r in e)delete e[r];return t}}},"pu-9,9":{transitions:ow.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var n=e.text_.length%3;0===n&&(n=3);for(var r=e.text_.length-3;r>0;r-=3)t.push(e.text_.substr(r,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,n)),t.reverse()}else t.push(e.text_);for(var a in e)delete e[a];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var n=e.text_.length-3,r=0;r<n;r+=3)t.push(e.text_.substr(r,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(r))}else t.push(e.text_);for(var a in e)delete e[a];return t}}}};var iw={go:function(e,t){if(!e)return"";for(var n="",r=!1,a=0;a<e.length;a++){var o=e[a];"string"==typeof o?n+=o:(n+=iw._go2(o),"1st-level escape"===o.type_&&(r=!0))}return t||r||!n||(n="{"+n+"}"),n},_goInner:function(e){return e?iw.go(e,!0):e},_go2:function(e){var t;switch(e.type_){case"chemfive":t="";var n={a:iw._goInner(e.a),b:iw._goInner(e.b),p:iw._goInner(e.p),o:iw._goInner(e.o),q:iw._goInner(e.q),d:iw._goInner(e.d)};n.a&&(n.a.match(/^[+\-]/)&&(n.a="{"+n.a+"}"),t+=n.a+"\\,"),(n.b||n.p)&&(t+="{\\vphantom{X}}",t+="^{\\hphantom{"+(n.b||"")+"}}_{\\hphantom{"+(n.p||"")+"}}",t+="{\\vphantom{X}}",t+="^{\\smash[t]{\\vphantom{2}}\\mathllap{"+(n.b||"")+"}}",t+="_{\\vphantom{2}\\mathllap{\\smash[t]{"+(n.p||"")+"}}}"),n.o&&(n.o.match(/^[+\-]/)&&(n.o="{"+n.o+"}"),t+=n.o),"kv"===e.dType?((n.d||n.q)&&(t+="{\\vphantom{X}}"),n.d&&(t+="^{"+n.d+"}"),n.q&&(t+="_{\\smash[t]{"+n.q+"}}")):"oxidation"===e.dType?(n.d&&(t+="{\\vphantom{X}}",t+="^{"+n.d+"}"),n.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+n.q+"}}")):(n.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+n.q+"}}"),n.d&&(t+="{\\vphantom{X}}",t+="^{"+n.d+"}"));break;case"rm":case"roman numeral":t="\\mathrm{"+e.p1+"}";break;case"text":e.p1.match(/[\^_]/)?(e.p1=e.p1.replace(" ","~").replace("-","\\text{-}"),t="\\mathrm{"+e.p1+"}"):t="\\text{"+e.p1+"}";break;case"state of aggregation":t="\\mskip2mu "+iw._goInner(e.p1);break;case"state of aggregation subscript":t="\\mskip1mu "+iw._goInner(e.p1);break;case"bond":if(!(t=iw._getBond(e.kind_)))throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+e.kind_+")"];break;case"frac":var r="\\frac{"+e.p1+"}{"+e.p2+"}";t="\\mathchoice{\\textstyle"+r+"}{"+r+"}{"+r+"}{"+r+"}";break;case"pu-frac":var a="\\frac{"+iw._goInner(e.p1)+"}{"+iw._goInner(e.p2)+"}";t="\\mathchoice{\\textstyle"+a+"}{"+a+"}{"+a+"}{"+a+"}";break;case"tex-math":case"1st-level escape":t=e.p1+" ";break;case"frac-ce":t="\\frac{"+iw._goInner(e.p1)+"}{"+iw._goInner(e.p2)+"}";break;case"overset":t="\\overset{"+iw._goInner(e.p1)+"}{"+iw._goInner(e.p2)+"}";break;case"underset":t="\\underset{"+iw._goInner(e.p1)+"}{"+iw._goInner(e.p2)+"}";break;case"underbrace":t="\\underbrace{"+iw._goInner(e.p1)+"}_{"+iw._goInner(e.p2)+"}";break;case"color":t="{\\color{"+e.color1+"}{"+iw._goInner(e.color2)+"}}";break;case"color0":t="\\color{"+e.color+"}";break;case"arrow":var o={rd:iw._goInner(e.rd),rq:iw._goInner(e.rq)},i="\\x"+iw._getArrow(e.r);o.rq&&(i+="[{"+o.rq+"}]"),t=i+=o.rd?"{"+o.rd+"}":"{}";break;case"operator":t=iw._getOperator(e.kind_);break;case"space":t=" ";break;case"entitySkip":case"pu-space-1":t="~";break;case"pu-space-2":t="\\mkern3mu ";break;case"1000 separator":t="\\mkern2mu ";break;case"commaDecimal":t="{,}";break;case"comma enumeration L":t="{"+e.p1+"}\\mkern6mu ";break;case"comma enumeration M":t="{"+e.p1+"}\\mkern3mu ";break;case"comma enumeration S":t="{"+e.p1+"}\\mkern1mu ";break;case"hyphen":t="\\text{-}";break;case"addition compound":t="\\,{\\cdot}\\,";break;case"electron dot":t="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":t="{\\times}";break;case"prime":t="\\prime ";break;case"cdot":t="\\cdot ";break;case"tight cdot":t="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":t="\\times ";break;case"circa":t="{\\sim}";break;case"^":t="uparrow";break;case"v":t="downarrow";break;case"ellipsis":t="\\ldots ";break;case"/":t="/";break;case" / ":t="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return t},_getArrow:function(e){switch(e){case"->":case"→":case"⟶":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<--\x3e":return"rightleftarrows";case"<=>":case"⇌":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(e){switch(e){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(e){switch(e){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};var sw="local-user",lw="You",cw="#4F46E5";function dw(e){if(!e)return[];const t=e.getJSON(),n=[];return(t.content??[]).forEach((e,t)=>{if("heading"===e.type&&e.attrs?.level){const r=(e.content??[]).map(e=>e.text??"").join("");n.push([`${e.attrs.level}:${t}:${r}`,r,`h${e.attrs.level}`])}}),n}var uw=X(({content:e,contentKey:t,onChange:n,onHeadingsChange:r,readOnly:a},o)=>{const i=function(){const e=se({loadedContentKey:null,shouldSuppressNextLoad:!1});return{shouldLoadContent:Q(t=>{const n=e.current;return n.shouldSuppressNextLoad?(n.shouldSuppressNextLoad=!1,!1):n.loadedContentKey!==t},[]),markContentLoaded:Q(t=>{e.current.loadedContentKey=t},[]),markContentSaved:Q(()=>{e.current.shouldSuppressNextLoad=!0},[])}}(),[s,d]=le("light"),u=t??e.slice(0,40),h=function(){const[e,t]=le({}),n=se(e);n.current=e;const r=Q(e=>{t(t=>({...t,[e.id]:e}))},[]),a=Q((e,n)=>{t(t=>t[e]?{...t,[e]:{...t[e],text:n}}:t)},[]),o=Q((e,n)=>{t(t=>t[e]?{...t,[e]:{...t[e],replies:[...t[e].replies||[],n]}}:t)},[]),i=Q((e,n)=>{t(t=>t[e]?{...t,[e]:{...t[e],resolved:n}}:t)},[]),s=Q(e=>{t(t=>{if(!t[e])return t;const n={...t};return delete n[e],n})},[]),l=Q(e=>{t(t=>{const n={};for(const r of e){const e=t[r.id];n[r.id]=e?{...r,text:e.text||r.text,replies:e.replies}:r}return n})},[]),c=Q(e=>Boolean(n.current[e]),[]);return{threads:Object.values(e).sort((e,t)=>t.timestamp-e.timestamp),addThread:r,setThreadText:a,addReply:o,setResolved:i,removeThread:s,hydrate:l,has:c}}(),p=se(h);p.current=h;const[m,f]=le(!1),[g,v]=le(null),[b,w]=le(!0),S=ie(()=>[...Ef.filter(e=>"comment"!==e.name),y.configure({authorId:sw,authorName:lw,authorColor:cw,onCommentAdd:e=>p.current.addThread(e),onCommentRemove:e=>p.current.removeThread(e),onCommentResolve:(e,t)=>p.current.setResolved(e,t)})],[]),k=se(n),C=se(r),N=se(!1),T=se(null),A=se(null),M=se(0);te(()=>{k.current=n},[n]),te(()=>{C.current=r},[r]);const I=Q(e=>{if(!C.current)return;const t=dw(e),n=Date.now(),r=n-M.current;r>=300?(M.current=n,C.current(t)):(A.current&&clearTimeout(A.current),A.current=setTimeout(()=>{M.current=Date.now(),C.current?.(dw(e))},300-r))},[]),[D,E]=le(null),R=Q(({editor:e})=>{N.current=!0,T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{N.current&&(N.current=!1,i.markContentSaved(),k.current(e.getHTML()))},2e4),I(e)},[I,i]),_=Q(({editor:e})=>{w(e.state.selection.empty);const t=function(e){if(!e.isActive(Bf))return null;const t=e.getAttributes(Bf).id;return"string"==typeof t&&t?t:null}(e);t&&(v(t),f(!0))},[]);te(()=>{D&&i.shouldLoadContent(u)&&(D.commands.setContent(e||""),i.markContentLoaded(u),I(D),p.current.hydrate(function(e){const t=/* @__PURE__ */new Map;return e.state.doc.descendants(e=>{if(e.isText)for(const n of e.marks){if(n.type.name!==Bf)continue;const e=n.attrs;e.id&&!t.has(e.id)&&t.set(e.id,{id:e.id,authorId:e.authorId??"",authorName:e.authorName??"Anonymous",authorColor:e.authorColor??"#4F46E5",text:e.text??"",timestamp:"number"==typeof e.timestamp?e.timestamp:Date.now(),resolved:Boolean(e.resolved),replies:[]})}}),[...t.values()]}(D)),v(null))},[D,u,i,I]),te(()=>{D&&D.setEditable(!a)},[D,a]),te(()=>{const e=D;return()=>{T.current&&clearTimeout(T.current),A.current&&clearTimeout(A.current),e&&N.current&&(N.current=!1,i.markContentSaved(),k.current(e.getHTML()))}},[D,i]);const z=Q(e=>{if(!D)return null;const t=e.indexOf(":"),n=e.indexOf(":",t+1),r=e.slice(0,t),a=e.slice(n+1);for(const o of D.view.dom.querySelectorAll(`h${r}`))if(o.textContent?.trim()===a)return o;return null},[D]);re(o,()=>({scrollToHeading:e=>z(e)?.scrollIntoView({behavior:"smooth",block:"start"}),getElementByKey:e=>z(e)}),[z]);const P=Q(()=>{if(!D)return;const e=`comment-${Date.now()}`;D.chain().focus().setComment({id:e}).run()&&(v(e),f(!0))},[D]),O=Q(e=>{v(e),D&&function(e,t){const n=Vf(e,t);!!n&&(e.chain().setTextSelection(n).run(),e.view.dom.querySelector(`[data-comment-id="${t}"]`)?.scrollIntoView({behavior:"smooth",block:"center"}))}(D,e)},[D]),L=Q((e,t)=>{h.setResolved(e,t),D&&function(e,t,n){const r=Vf(e,t);if(!r)return!1;const{state:a,view:o}=e,i=a.schema.marks[Bf];if(!i)return!1;const s=a.tr;a.doc.nodesBetween(r.from,r.to,(e,a)=>{if(!e.isText)return;const o=e.marks.find(e=>e.type===i&&e.attrs.id===t);if(!o)return;const l=Math.max(a,r.from),c=Math.min(a+e.nodeSize,r.to);s.removeMark(l,c,i),s.addMark(l,c,i.create({...o.attrs,...n}))}),s.docChanged&&o.dispatch(s)}(D,e,{resolved:t})},[D,h]),F=Q(e=>{h.removeThread(e),D&&function(e,t){const n=Vf(e,t);if(!n)return!1;const{state:r,view:a}=e,o=r.schema.marks[Bf];if(!o)return!1;const i=r.tr.removeMark(n.from,n.to,o);i.docChanged&&a.dispatch(i)}(D,e),v(t=>t===e?null:t)},[D,h]),B=Q((e,t)=>{h.addReply(e,{id:`reply-${Date.now()}`,authorId:sw,authorName:lw,authorColor:cw,text:t,timestamp:Date.now()})},[h]),V=h.threads.filter(e=>!e.resolved).length;/* @__PURE__ */
|
|
258
|
-
return me("div",{className:"flex h-full w-full flex-col bg-editor-bg",children:[/* @__PURE__ */pe(
|
|
259
|
-
/* @__PURE__ */me("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[/* @__PURE__ */pe(t,{className:"flex-1 min-h-0 overflow-auto prose dark:prose-invert max-w-none px-4 py-3"}),!a&&m&&/* @__PURE__ */pe("div",{className:"w-80 shrink-0",children:/* @__PURE__ */pe(
|
|
260
|
+
/* @__PURE__ */pe("p",{className:"text-xs",children:"Select text in the document, then choose “Comment”."})]}):/* @__PURE__ */me(he,{children:[l.map(e=>/* @__PURE__ */pe($f,{thread:e,active:e.id===t,onSelect:n,onSubmitBody:r,onReply:a,onResolve:o,onRemove:i},e.id)),c.length>0&&/* @__PURE__ */me("div",{className:"pt-2",children:[/* @__PURE__ */me("p",{className:"mb-1 px-1 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:["Resolved (",c.length,")"]}),/* @__PURE__ */pe("div",{className:"space-y-2",children:c.map(e=>/* @__PURE__ */pe($f,{thread:e,active:e.id===t,onSelect:n,onSubmitBody:r,onReply:a,onResolve:o,onRemove:i},e.id))})]})]})})]})}var jf="comment";function Uf(e,t){let n=null,r=null;return e.state.doc.descendants((e,a)=>{e.isText&&e.marks.some(e=>e.type.name===jf&&e.attrs.id===t)&&(null===n&&(n=a),r=a+e.nodeSize)}),null===n||null===r?null:{from:n,to:r}}var Gf=class e extends Error{constructor(t,n){var r,a,o="KaTeX parse error: "+t,i=n&&n.loc;if(i&&i.start<=i.end){var s=i.lexer.input;r=i.start,a=i.end,r===s.length?o+=" at end of input: ":o+=" at position "+(r+1)+": ";var l=s.slice(r,a).replace(/[^]/g,"$&̲");o+=(r>15?"…"+s.slice(r-15,r):s.slice(0,r))+l+(a+15<s.length?s.slice(a,a+15)+"…":s.slice(a))}super(o),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=r,null!=r&&null!=a&&(this.length=a-r),this.rawMessage=t}},Wf=/([A-Z])/g,Yf=e=>e.replace(Wf,"-$1").toLowerCase(),Kf={"&":"&",">":">","<":"<",'"':""","'":"'"},Xf=/[&><"']/g,Zf=e=>String(e).replace(Xf,e=>Kf[e]),Jf=e=>"ordgroup"===e.type||"color"===e.type?1===e.body.length?Jf(e.body[0]):e:"font"===e.type?Jf(e.body):e,Qf=/* @__PURE__ */new Set(["mathord","textord","atom"]),eg=e=>Qf.has(Jf(e).type),tg={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function ng(e){return void 0!==e.default?e.default:function(e){if("string"!=typeof e)return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}(Array.isArray(e.type)?e.type[0]:e.type)}function rg(e,t,n,r){var a=n[t];e[t]=void 0!==a?r.processor?r.processor(a):a:ng(r)}var ag=class{constructor(e){for(var t of(void 0===e&&(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=e||{},Object.keys(tg))){var n=tg[t];n&&rg(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if("function"==typeof r&&(r=r(e,t,n)),r&&"ignore"!==r&&(!0===r||"error"===r))throw new Gf("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n)}useStrictBehavior(e,t,n){var r=this.strict;if("function"==typeof r)try{r=r(e,t,n)}catch(a){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r)}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=(e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"})(e.url);if(null==t)return!1;e.protocol=t}var n="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(n)}},og=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 ig[sg[this.id]]}sub(){return ig[lg[this.id]]}fracNum(){return ig[cg[this.id]]}fracDen(){return ig[dg[this.id]]}cramp(){return ig[ug[this.id]]}text(){return ig[hg[this.id]]}isTight(){return this.size>=2}},ig=[new og(0,0,!1),new og(1,0,!0),new og(2,1,!1),new og(3,1,!0),new og(4,2,!1),new og(5,2,!0),new og(6,3,!1),new og(7,3,!0)],sg=[4,5,4,5,6,7,6,7],lg=[5,5,5,5,7,7,7,7],cg=[2,3,4,5,6,7,6,7],dg=[3,3,5,5,7,7,7,7],ug=[1,1,3,3,5,5,7,7],hg=[0,1,2,3,2,3,2,3],pg={DISPLAY:ig[0],TEXT:ig[2],SCRIPT:ig[4],SCRIPTSCRIPT:ig[6]},mg=[{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]]}];var fg=[];function gg(e){for(var t=0;t<fg.length;t+=2)if(e>=fg[t]&&e<=fg[t+1])return!0;return!1}mg.forEach(e=>e.blocks.forEach(e=>fg.push(...e)));var vg=e=>e+" "+e,yg=80,bg={doubleleftarrow:"M262 157\nl10-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\n 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\n 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\nc2 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\n 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\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-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\n 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\n-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\n-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\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-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\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 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\n-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\nc-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\n 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\n 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\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 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\n 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\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 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\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-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\n-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\n-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\n 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\n-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\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 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\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 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\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-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\n-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\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:vg("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:vg("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:vg("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:vg("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.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\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:vg("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:"M200428 334\nc-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\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 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\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.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\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 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\n-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\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.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\n60.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\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 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\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.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\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 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\n-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\n 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\n 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\n-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\n-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\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-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\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.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\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-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\n 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\n 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\n-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\n-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\n 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\n-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\n 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\nm0 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\n 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\n-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\n-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\n 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\n 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\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-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\n 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\n-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\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:vg("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:vg("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:vg("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-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\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 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\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 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\nc-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\n 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\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 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\n-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\n 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\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-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\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 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\n 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\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -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\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-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\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-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\n-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\n-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\n-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,\n-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,\n-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,\n-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,\n-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\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-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\ns-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\n121.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\ns2.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\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-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\n13.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\n-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\n-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\n-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\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,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\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-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\nc-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\nM0 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\nc1.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,\n1c0,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,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 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\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-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\nc-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\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};var xg=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("toText"in e)return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}},wg={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},Sg={ex:!0,em:!0,mu:!0},kg=function(e){return"string"!=typeof e&&(e=e.unit),e in wg||e in Sg||"ex"===e},Cg=function(e,t){var n;if(e.unit in wg)n=wg[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new Gf("Invalid unit: '"+e.unit+"'");n=r.fontMetrics().quad}r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},Ng=function(e){return+e.toFixed(4)+"em"},Tg=function(e){return e.filter(e=>e).join(" ")},Ag=function(e){var t="";for(var n of Object.keys(e)){var r=e[n];void 0!==r&&(t+=Yf(n)+":"+r+";")}return t},Mg=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)}},Ig=function(e){var t=document.createElement(e);for(var n of(t.className=Tg(this.classes),Object.assign(t.style,this.style),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},Dg=/[\s"'>/=\x00-\x1f]/,Eg=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Zf(Tg(this.classes))+'"');var n=Ag(this.style);for(var r of(n&&(t+=' style="'+Zf(n)+'"'),Object.keys(this.attributes))){if(Dg.test(r))throw new Gf("Invalid attribute name '"+r+"'");t+=" "+r+'="'+Zf(this.attributes[r])+'"'}t+=">";for(var a=0;a<this.children.length;a++)t+=this.children[a].toMarkup();return t+="</"+e+">"},Rg=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,Mg.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Ig.call(this,"span")}toMarkup(){return Eg.call(this,"span")}},_g=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,Mg.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 Ig.call(this,"a")}toMarkup(){return Eg.call(this,"a")}},zg=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="'+Zf(this.src)+'" alt="'+Zf(this.alt)+'"',t=Ag(this.style);return t&&(e+=' style="'+Zf(t)+'"'),e+="'/>"}},Pg={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},Og=class{constructor(e,t,n,r,a,o,i,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=a||0,this.width=o||0,this.classes=i||[],this.style=s||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<mg.length;t++)for(var n=mg[t],r=0;r<n.blocks.length;r++){var a=n.blocks[r];if(e>=a[0]&&e<=a[1])return n.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Pg[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")).style.marginRight=Ng(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=Tg(this.classes)),Object.keys(this.style).length>0&&(t=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+=Zf(Tg(this.classes)),t+='"');var n="";this.italic>0&&(n+="margin-right:"+Ng(this.italic)+";"),(n+=Ag(this.style))&&(e=!0,t+=' style="'+Zf(n)+'"');var r=Zf(this.text);return e?(t+=">",t+=r,t+="</span>"):r}},Lg=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+'="'+Zf(this.attributes[t])+'"';e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>"}},Fg=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",bg[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+Zf(this.alternate)+'"/>':'<path d="'+Zf(bg[this.pathName])+'"/>'}},Bg=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+'="'+Zf(this.attributes[t])+'"';return e+="/>"}};var Vg={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Hg={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]},$g={"Å":"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 qg(e,t,n){if(!Vg[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),a=Vg[t][r];if(!a&&e[0]in $g&&(r=$g[e[0]].charCodeAt(0),a=Vg[t][r]),a||"text"!==n||gg(r)&&(a=Vg[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var jg={};var Ug={math:{},text:{}};function Gg(e,t,n,r,a,o){Ug[e][a]={font:t,group:n,replace:r},o&&r&&(Ug[e][r]=Ug[e][a])}var Wg="math",Yg="text",Kg="main",Xg="ams",Zg="accent-token",Jg="bin",Qg="close",ev="inner",tv="mathord",nv="op-token",rv="open",av="punct",ov="rel",iv="spacing",sv="textord";Gg(Wg,Kg,ov,"≡","\\equiv",!0),Gg(Wg,Kg,ov,"≺","\\prec",!0),Gg(Wg,Kg,ov,"≻","\\succ",!0),Gg(Wg,Kg,ov,"∼","\\sim",!0),Gg(Wg,Kg,ov,"⊥","\\perp"),Gg(Wg,Kg,ov,"⪯","\\preceq",!0),Gg(Wg,Kg,ov,"⪰","\\succeq",!0),Gg(Wg,Kg,ov,"≃","\\simeq",!0),Gg(Wg,Kg,ov,"∣","\\mid",!0),Gg(Wg,Kg,ov,"≪","\\ll",!0),Gg(Wg,Kg,ov,"≫","\\gg",!0),Gg(Wg,Kg,ov,"≍","\\asymp",!0),Gg(Wg,Kg,ov,"∥","\\parallel"),Gg(Wg,Kg,ov,"⋈","\\bowtie",!0),Gg(Wg,Kg,ov,"⌣","\\smile",!0),Gg(Wg,Kg,ov,"⊑","\\sqsubseteq",!0),Gg(Wg,Kg,ov,"⊒","\\sqsupseteq",!0),Gg(Wg,Kg,ov,"≐","\\doteq",!0),Gg(Wg,Kg,ov,"⌢","\\frown",!0),Gg(Wg,Kg,ov,"∋","\\ni",!0),Gg(Wg,Kg,ov,"∝","\\propto",!0),Gg(Wg,Kg,ov,"⊢","\\vdash",!0),Gg(Wg,Kg,ov,"⊣","\\dashv",!0),Gg(Wg,Kg,ov,"∋","\\owns"),Gg(Wg,Kg,av,".","\\ldotp"),Gg(Wg,Kg,av,"⋅","\\cdotp"),Gg(Wg,Kg,av,"⋅","·"),Gg(Yg,Kg,sv,"⋅","·"),Gg(Wg,Kg,sv,"#","\\#"),Gg(Yg,Kg,sv,"#","\\#"),Gg(Wg,Kg,sv,"&","\\&"),Gg(Yg,Kg,sv,"&","\\&"),Gg(Wg,Kg,sv,"ℵ","\\aleph",!0),Gg(Wg,Kg,sv,"∀","\\forall",!0),Gg(Wg,Kg,sv,"ℏ","\\hbar",!0),Gg(Wg,Kg,sv,"∃","\\exists",!0),Gg(Wg,Kg,sv,"∇","\\nabla",!0),Gg(Wg,Kg,sv,"♭","\\flat",!0),Gg(Wg,Kg,sv,"ℓ","\\ell",!0),Gg(Wg,Kg,sv,"♮","\\natural",!0),Gg(Wg,Kg,sv,"♣","\\clubsuit",!0),Gg(Wg,Kg,sv,"℘","\\wp",!0),Gg(Wg,Kg,sv,"♯","\\sharp",!0),Gg(Wg,Kg,sv,"♢","\\diamondsuit",!0),Gg(Wg,Kg,sv,"ℜ","\\Re",!0),Gg(Wg,Kg,sv,"♡","\\heartsuit",!0),Gg(Wg,Kg,sv,"ℑ","\\Im",!0),Gg(Wg,Kg,sv,"♠","\\spadesuit",!0),Gg(Wg,Kg,sv,"§","\\S",!0),Gg(Yg,Kg,sv,"§","\\S"),Gg(Wg,Kg,sv,"¶","\\P",!0),Gg(Yg,Kg,sv,"¶","\\P"),Gg(Wg,Kg,sv,"†","\\dag"),Gg(Yg,Kg,sv,"†","\\dag"),Gg(Yg,Kg,sv,"†","\\textdagger"),Gg(Wg,Kg,sv,"‡","\\ddag"),Gg(Yg,Kg,sv,"‡","\\ddag"),Gg(Yg,Kg,sv,"‡","\\textdaggerdbl"),Gg(Wg,Kg,Qg,"⎱","\\rmoustache",!0),Gg(Wg,Kg,rv,"⎰","\\lmoustache",!0),Gg(Wg,Kg,Qg,"⟯","\\rgroup",!0),Gg(Wg,Kg,rv,"⟮","\\lgroup",!0),Gg(Wg,Kg,Jg,"∓","\\mp",!0),Gg(Wg,Kg,Jg,"⊖","\\ominus",!0),Gg(Wg,Kg,Jg,"⊎","\\uplus",!0),Gg(Wg,Kg,Jg,"⊓","\\sqcap",!0),Gg(Wg,Kg,Jg,"∗","\\ast"),Gg(Wg,Kg,Jg,"⊔","\\sqcup",!0),Gg(Wg,Kg,Jg,"◯","\\bigcirc",!0),Gg(Wg,Kg,Jg,"∙","\\bullet",!0),Gg(Wg,Kg,Jg,"‡","\\ddagger"),Gg(Wg,Kg,Jg,"≀","\\wr",!0),Gg(Wg,Kg,Jg,"⨿","\\amalg"),Gg(Wg,Kg,Jg,"&","\\And"),Gg(Wg,Kg,ov,"⟵","\\longleftarrow",!0),Gg(Wg,Kg,ov,"⇐","\\Leftarrow",!0),Gg(Wg,Kg,ov,"⟸","\\Longleftarrow",!0),Gg(Wg,Kg,ov,"⟶","\\longrightarrow",!0),Gg(Wg,Kg,ov,"⇒","\\Rightarrow",!0),Gg(Wg,Kg,ov,"⟹","\\Longrightarrow",!0),Gg(Wg,Kg,ov,"↔","\\leftrightarrow",!0),Gg(Wg,Kg,ov,"⟷","\\longleftrightarrow",!0),Gg(Wg,Kg,ov,"⇔","\\Leftrightarrow",!0),Gg(Wg,Kg,ov,"⟺","\\Longleftrightarrow",!0),Gg(Wg,Kg,ov,"↦","\\mapsto",!0),Gg(Wg,Kg,ov,"⟼","\\longmapsto",!0),Gg(Wg,Kg,ov,"↗","\\nearrow",!0),Gg(Wg,Kg,ov,"↩","\\hookleftarrow",!0),Gg(Wg,Kg,ov,"↪","\\hookrightarrow",!0),Gg(Wg,Kg,ov,"↘","\\searrow",!0),Gg(Wg,Kg,ov,"↼","\\leftharpoonup",!0),Gg(Wg,Kg,ov,"⇀","\\rightharpoonup",!0),Gg(Wg,Kg,ov,"↙","\\swarrow",!0),Gg(Wg,Kg,ov,"↽","\\leftharpoondown",!0),Gg(Wg,Kg,ov,"⇁","\\rightharpoondown",!0),Gg(Wg,Kg,ov,"↖","\\nwarrow",!0),Gg(Wg,Kg,ov,"⇌","\\rightleftharpoons",!0),Gg(Wg,Xg,ov,"≮","\\nless",!0),Gg(Wg,Xg,ov,"","\\@nleqslant"),Gg(Wg,Xg,ov,"","\\@nleqq"),Gg(Wg,Xg,ov,"⪇","\\lneq",!0),Gg(Wg,Xg,ov,"≨","\\lneqq",!0),Gg(Wg,Xg,ov,"","\\@lvertneqq"),Gg(Wg,Xg,ov,"⋦","\\lnsim",!0),Gg(Wg,Xg,ov,"⪉","\\lnapprox",!0),Gg(Wg,Xg,ov,"⊀","\\nprec",!0),Gg(Wg,Xg,ov,"⋠","\\npreceq",!0),Gg(Wg,Xg,ov,"⋨","\\precnsim",!0),Gg(Wg,Xg,ov,"⪹","\\precnapprox",!0),Gg(Wg,Xg,ov,"≁","\\nsim",!0),Gg(Wg,Xg,ov,"","\\@nshortmid"),Gg(Wg,Xg,ov,"∤","\\nmid",!0),Gg(Wg,Xg,ov,"⊬","\\nvdash",!0),Gg(Wg,Xg,ov,"⊭","\\nvDash",!0),Gg(Wg,Xg,ov,"⋪","\\ntriangleleft"),Gg(Wg,Xg,ov,"⋬","\\ntrianglelefteq",!0),Gg(Wg,Xg,ov,"⊊","\\subsetneq",!0),Gg(Wg,Xg,ov,"","\\@varsubsetneq"),Gg(Wg,Xg,ov,"⫋","\\subsetneqq",!0),Gg(Wg,Xg,ov,"","\\@varsubsetneqq"),Gg(Wg,Xg,ov,"≯","\\ngtr",!0),Gg(Wg,Xg,ov,"","\\@ngeqslant"),Gg(Wg,Xg,ov,"","\\@ngeqq"),Gg(Wg,Xg,ov,"⪈","\\gneq",!0),Gg(Wg,Xg,ov,"≩","\\gneqq",!0),Gg(Wg,Xg,ov,"","\\@gvertneqq"),Gg(Wg,Xg,ov,"⋧","\\gnsim",!0),Gg(Wg,Xg,ov,"⪊","\\gnapprox",!0),Gg(Wg,Xg,ov,"⊁","\\nsucc",!0),Gg(Wg,Xg,ov,"⋡","\\nsucceq",!0),Gg(Wg,Xg,ov,"⋩","\\succnsim",!0),Gg(Wg,Xg,ov,"⪺","\\succnapprox",!0),Gg(Wg,Xg,ov,"≆","\\ncong",!0),Gg(Wg,Xg,ov,"","\\@nshortparallel"),Gg(Wg,Xg,ov,"∦","\\nparallel",!0),Gg(Wg,Xg,ov,"⊯","\\nVDash",!0),Gg(Wg,Xg,ov,"⋫","\\ntriangleright"),Gg(Wg,Xg,ov,"⋭","\\ntrianglerighteq",!0),Gg(Wg,Xg,ov,"","\\@nsupseteqq"),Gg(Wg,Xg,ov,"⊋","\\supsetneq",!0),Gg(Wg,Xg,ov,"","\\@varsupsetneq"),Gg(Wg,Xg,ov,"⫌","\\supsetneqq",!0),Gg(Wg,Xg,ov,"","\\@varsupsetneqq"),Gg(Wg,Xg,ov,"⊮","\\nVdash",!0),Gg(Wg,Xg,ov,"⪵","\\precneqq",!0),Gg(Wg,Xg,ov,"⪶","\\succneqq",!0),Gg(Wg,Xg,ov,"","\\@nsubseteqq"),Gg(Wg,Xg,Jg,"⊴","\\unlhd"),Gg(Wg,Xg,Jg,"⊵","\\unrhd"),Gg(Wg,Xg,ov,"↚","\\nleftarrow",!0),Gg(Wg,Xg,ov,"↛","\\nrightarrow",!0),Gg(Wg,Xg,ov,"⇍","\\nLeftarrow",!0),Gg(Wg,Xg,ov,"⇏","\\nRightarrow",!0),Gg(Wg,Xg,ov,"↮","\\nleftrightarrow",!0),Gg(Wg,Xg,ov,"⇎","\\nLeftrightarrow",!0),Gg(Wg,Xg,ov,"△","\\vartriangle"),Gg(Wg,Xg,sv,"ℏ","\\hslash"),Gg(Wg,Xg,sv,"▽","\\triangledown"),Gg(Wg,Xg,sv,"◊","\\lozenge"),Gg(Wg,Xg,sv,"Ⓢ","\\circledS"),Gg(Wg,Xg,sv,"®","\\circledR"),Gg(Yg,Xg,sv,"®","\\circledR"),Gg(Wg,Xg,sv,"∡","\\measuredangle",!0),Gg(Wg,Xg,sv,"∄","\\nexists"),Gg(Wg,Xg,sv,"℧","\\mho"),Gg(Wg,Xg,sv,"Ⅎ","\\Finv",!0),Gg(Wg,Xg,sv,"⅁","\\Game",!0),Gg(Wg,Xg,sv,"‵","\\backprime"),Gg(Wg,Xg,sv,"▲","\\blacktriangle"),Gg(Wg,Xg,sv,"▼","\\blacktriangledown"),Gg(Wg,Xg,sv,"■","\\blacksquare"),Gg(Wg,Xg,sv,"⧫","\\blacklozenge"),Gg(Wg,Xg,sv,"★","\\bigstar"),Gg(Wg,Xg,sv,"∢","\\sphericalangle",!0),Gg(Wg,Xg,sv,"∁","\\complement",!0),Gg(Wg,Xg,sv,"ð","\\eth",!0),Gg(Yg,Kg,sv,"ð","ð"),Gg(Wg,Xg,sv,"╱","\\diagup"),Gg(Wg,Xg,sv,"╲","\\diagdown"),Gg(Wg,Xg,sv,"□","\\square"),Gg(Wg,Xg,sv,"□","\\Box"),Gg(Wg,Xg,sv,"◊","\\Diamond"),Gg(Wg,Xg,sv,"¥","\\yen",!0),Gg(Yg,Xg,sv,"¥","\\yen",!0),Gg(Wg,Xg,sv,"✓","\\checkmark",!0),Gg(Yg,Xg,sv,"✓","\\checkmark"),Gg(Wg,Xg,sv,"ℶ","\\beth",!0),Gg(Wg,Xg,sv,"ℸ","\\daleth",!0),Gg(Wg,Xg,sv,"ℷ","\\gimel",!0),Gg(Wg,Xg,sv,"ϝ","\\digamma",!0),Gg(Wg,Xg,sv,"ϰ","\\varkappa"),Gg(Wg,Xg,rv,"┌","\\@ulcorner",!0),Gg(Wg,Xg,Qg,"┐","\\@urcorner",!0),Gg(Wg,Xg,rv,"└","\\@llcorner",!0),Gg(Wg,Xg,Qg,"┘","\\@lrcorner",!0),Gg(Wg,Xg,ov,"≦","\\leqq",!0),Gg(Wg,Xg,ov,"⩽","\\leqslant",!0),Gg(Wg,Xg,ov,"⪕","\\eqslantless",!0),Gg(Wg,Xg,ov,"≲","\\lesssim",!0),Gg(Wg,Xg,ov,"⪅","\\lessapprox",!0),Gg(Wg,Xg,ov,"≊","\\approxeq",!0),Gg(Wg,Xg,Jg,"⋖","\\lessdot"),Gg(Wg,Xg,ov,"⋘","\\lll",!0),Gg(Wg,Xg,ov,"≶","\\lessgtr",!0),Gg(Wg,Xg,ov,"⋚","\\lesseqgtr",!0),Gg(Wg,Xg,ov,"⪋","\\lesseqqgtr",!0),Gg(Wg,Xg,ov,"≑","\\doteqdot"),Gg(Wg,Xg,ov,"≓","\\risingdotseq",!0),Gg(Wg,Xg,ov,"≒","\\fallingdotseq",!0),Gg(Wg,Xg,ov,"∽","\\backsim",!0),Gg(Wg,Xg,ov,"⋍","\\backsimeq",!0),Gg(Wg,Xg,ov,"⫅","\\subseteqq",!0),Gg(Wg,Xg,ov,"⋐","\\Subset",!0),Gg(Wg,Xg,ov,"⊏","\\sqsubset",!0),Gg(Wg,Xg,ov,"≼","\\preccurlyeq",!0),Gg(Wg,Xg,ov,"⋞","\\curlyeqprec",!0),Gg(Wg,Xg,ov,"≾","\\precsim",!0),Gg(Wg,Xg,ov,"⪷","\\precapprox",!0),Gg(Wg,Xg,ov,"⊲","\\vartriangleleft"),Gg(Wg,Xg,ov,"⊴","\\trianglelefteq"),Gg(Wg,Xg,ov,"⊨","\\vDash",!0),Gg(Wg,Xg,ov,"⊪","\\Vvdash",!0),Gg(Wg,Xg,ov,"⌣","\\smallsmile"),Gg(Wg,Xg,ov,"⌢","\\smallfrown"),Gg(Wg,Xg,ov,"≏","\\bumpeq",!0),Gg(Wg,Xg,ov,"≎","\\Bumpeq",!0),Gg(Wg,Xg,ov,"≧","\\geqq",!0),Gg(Wg,Xg,ov,"⩾","\\geqslant",!0),Gg(Wg,Xg,ov,"⪖","\\eqslantgtr",!0),Gg(Wg,Xg,ov,"≳","\\gtrsim",!0),Gg(Wg,Xg,ov,"⪆","\\gtrapprox",!0),Gg(Wg,Xg,Jg,"⋗","\\gtrdot"),Gg(Wg,Xg,ov,"⋙","\\ggg",!0),Gg(Wg,Xg,ov,"≷","\\gtrless",!0),Gg(Wg,Xg,ov,"⋛","\\gtreqless",!0),Gg(Wg,Xg,ov,"⪌","\\gtreqqless",!0),Gg(Wg,Xg,ov,"≖","\\eqcirc",!0),Gg(Wg,Xg,ov,"≗","\\circeq",!0),Gg(Wg,Xg,ov,"≜","\\triangleq",!0),Gg(Wg,Xg,ov,"∼","\\thicksim"),Gg(Wg,Xg,ov,"≈","\\thickapprox"),Gg(Wg,Xg,ov,"⫆","\\supseteqq",!0),Gg(Wg,Xg,ov,"⋑","\\Supset",!0),Gg(Wg,Xg,ov,"⊐","\\sqsupset",!0),Gg(Wg,Xg,ov,"≽","\\succcurlyeq",!0),Gg(Wg,Xg,ov,"⋟","\\curlyeqsucc",!0),Gg(Wg,Xg,ov,"≿","\\succsim",!0),Gg(Wg,Xg,ov,"⪸","\\succapprox",!0),Gg(Wg,Xg,ov,"⊳","\\vartriangleright"),Gg(Wg,Xg,ov,"⊵","\\trianglerighteq"),Gg(Wg,Xg,ov,"⊩","\\Vdash",!0),Gg(Wg,Xg,ov,"∣","\\shortmid"),Gg(Wg,Xg,ov,"∥","\\shortparallel"),Gg(Wg,Xg,ov,"≬","\\between",!0),Gg(Wg,Xg,ov,"⋔","\\pitchfork",!0),Gg(Wg,Xg,ov,"∝","\\varpropto"),Gg(Wg,Xg,ov,"◀","\\blacktriangleleft"),Gg(Wg,Xg,ov,"∴","\\therefore",!0),Gg(Wg,Xg,ov,"∍","\\backepsilon"),Gg(Wg,Xg,ov,"▶","\\blacktriangleright"),Gg(Wg,Xg,ov,"∵","\\because",!0),Gg(Wg,Xg,ov,"⋘","\\llless"),Gg(Wg,Xg,ov,"⋙","\\gggtr"),Gg(Wg,Xg,Jg,"⊲","\\lhd"),Gg(Wg,Xg,Jg,"⊳","\\rhd"),Gg(Wg,Xg,ov,"≂","\\eqsim",!0),Gg(Wg,Kg,ov,"⋈","\\Join"),Gg(Wg,Xg,ov,"≑","\\Doteq",!0),Gg(Wg,Xg,Jg,"∔","\\dotplus",!0),Gg(Wg,Xg,Jg,"∖","\\smallsetminus"),Gg(Wg,Xg,Jg,"⋒","\\Cap",!0),Gg(Wg,Xg,Jg,"⋓","\\Cup",!0),Gg(Wg,Xg,Jg,"⩞","\\doublebarwedge",!0),Gg(Wg,Xg,Jg,"⊟","\\boxminus",!0),Gg(Wg,Xg,Jg,"⊞","\\boxplus",!0),Gg(Wg,Xg,Jg,"⋇","\\divideontimes",!0),Gg(Wg,Xg,Jg,"⋉","\\ltimes",!0),Gg(Wg,Xg,Jg,"⋊","\\rtimes",!0),Gg(Wg,Xg,Jg,"⋋","\\leftthreetimes",!0),Gg(Wg,Xg,Jg,"⋌","\\rightthreetimes",!0),Gg(Wg,Xg,Jg,"⋏","\\curlywedge",!0),Gg(Wg,Xg,Jg,"⋎","\\curlyvee",!0),Gg(Wg,Xg,Jg,"⊝","\\circleddash",!0),Gg(Wg,Xg,Jg,"⊛","\\circledast",!0),Gg(Wg,Xg,Jg,"⋅","\\centerdot"),Gg(Wg,Xg,Jg,"⊺","\\intercal",!0),Gg(Wg,Xg,Jg,"⋒","\\doublecap"),Gg(Wg,Xg,Jg,"⋓","\\doublecup"),Gg(Wg,Xg,Jg,"⊠","\\boxtimes",!0),Gg(Wg,Xg,ov,"⇢","\\dashrightarrow",!0),Gg(Wg,Xg,ov,"⇠","\\dashleftarrow",!0),Gg(Wg,Xg,ov,"⇇","\\leftleftarrows",!0),Gg(Wg,Xg,ov,"⇆","\\leftrightarrows",!0),Gg(Wg,Xg,ov,"⇚","\\Lleftarrow",!0),Gg(Wg,Xg,ov,"↞","\\twoheadleftarrow",!0),Gg(Wg,Xg,ov,"↢","\\leftarrowtail",!0),Gg(Wg,Xg,ov,"↫","\\looparrowleft",!0),Gg(Wg,Xg,ov,"⇋","\\leftrightharpoons",!0),Gg(Wg,Xg,ov,"↶","\\curvearrowleft",!0),Gg(Wg,Xg,ov,"↺","\\circlearrowleft",!0),Gg(Wg,Xg,ov,"↰","\\Lsh",!0),Gg(Wg,Xg,ov,"⇈","\\upuparrows",!0),Gg(Wg,Xg,ov,"↿","\\upharpoonleft",!0),Gg(Wg,Xg,ov,"⇃","\\downharpoonleft",!0),Gg(Wg,Kg,ov,"⊶","\\origof",!0),Gg(Wg,Kg,ov,"⊷","\\imageof",!0),Gg(Wg,Xg,ov,"⊸","\\multimap",!0),Gg(Wg,Xg,ov,"↭","\\leftrightsquigarrow",!0),Gg(Wg,Xg,ov,"⇉","\\rightrightarrows",!0),Gg(Wg,Xg,ov,"⇄","\\rightleftarrows",!0),Gg(Wg,Xg,ov,"↠","\\twoheadrightarrow",!0),Gg(Wg,Xg,ov,"↣","\\rightarrowtail",!0),Gg(Wg,Xg,ov,"↬","\\looparrowright",!0),Gg(Wg,Xg,ov,"↷","\\curvearrowright",!0),Gg(Wg,Xg,ov,"↻","\\circlearrowright",!0),Gg(Wg,Xg,ov,"↱","\\Rsh",!0),Gg(Wg,Xg,ov,"⇊","\\downdownarrows",!0),Gg(Wg,Xg,ov,"↾","\\upharpoonright",!0),Gg(Wg,Xg,ov,"⇂","\\downharpoonright",!0),Gg(Wg,Xg,ov,"⇝","\\rightsquigarrow",!0),Gg(Wg,Xg,ov,"⇝","\\leadsto"),Gg(Wg,Xg,ov,"⇛","\\Rrightarrow",!0),Gg(Wg,Xg,ov,"↾","\\restriction"),Gg(Wg,Kg,sv,"‘","`"),Gg(Wg,Kg,sv,"$","\\$"),Gg(Yg,Kg,sv,"$","\\$"),Gg(Yg,Kg,sv,"$","\\textdollar"),Gg(Wg,Kg,sv,"%","\\%"),Gg(Yg,Kg,sv,"%","\\%"),Gg(Wg,Kg,sv,"_","\\_"),Gg(Yg,Kg,sv,"_","\\_"),Gg(Yg,Kg,sv,"_","\\textunderscore"),Gg(Wg,Kg,sv,"∠","\\angle",!0),Gg(Wg,Kg,sv,"∞","\\infty",!0),Gg(Wg,Kg,sv,"′","\\prime"),Gg(Wg,Kg,sv,"△","\\triangle"),Gg(Wg,Kg,sv,"Γ","\\Gamma",!0),Gg(Wg,Kg,sv,"Δ","\\Delta",!0),Gg(Wg,Kg,sv,"Θ","\\Theta",!0),Gg(Wg,Kg,sv,"Λ","\\Lambda",!0),Gg(Wg,Kg,sv,"Ξ","\\Xi",!0),Gg(Wg,Kg,sv,"Π","\\Pi",!0),Gg(Wg,Kg,sv,"Σ","\\Sigma",!0),Gg(Wg,Kg,sv,"Υ","\\Upsilon",!0),Gg(Wg,Kg,sv,"Φ","\\Phi",!0),Gg(Wg,Kg,sv,"Ψ","\\Psi",!0),Gg(Wg,Kg,sv,"Ω","\\Omega",!0),Gg(Wg,Kg,sv,"A","Α"),Gg(Wg,Kg,sv,"B","Β"),Gg(Wg,Kg,sv,"E","Ε"),Gg(Wg,Kg,sv,"Z","Ζ"),Gg(Wg,Kg,sv,"H","Η"),Gg(Wg,Kg,sv,"I","Ι"),Gg(Wg,Kg,sv,"K","Κ"),Gg(Wg,Kg,sv,"M","Μ"),Gg(Wg,Kg,sv,"N","Ν"),Gg(Wg,Kg,sv,"O","Ο"),Gg(Wg,Kg,sv,"P","Ρ"),Gg(Wg,Kg,sv,"T","Τ"),Gg(Wg,Kg,sv,"X","Χ"),Gg(Wg,Kg,sv,"¬","\\neg",!0),Gg(Wg,Kg,sv,"¬","\\lnot"),Gg(Wg,Kg,sv,"⊤","\\top"),Gg(Wg,Kg,sv,"⊥","\\bot"),Gg(Wg,Kg,sv,"∅","\\emptyset"),Gg(Wg,Xg,sv,"∅","\\varnothing"),Gg(Wg,Kg,tv,"α","\\alpha",!0),Gg(Wg,Kg,tv,"β","\\beta",!0),Gg(Wg,Kg,tv,"γ","\\gamma",!0),Gg(Wg,Kg,tv,"δ","\\delta",!0),Gg(Wg,Kg,tv,"ϵ","\\epsilon",!0),Gg(Wg,Kg,tv,"ζ","\\zeta",!0),Gg(Wg,Kg,tv,"η","\\eta",!0),Gg(Wg,Kg,tv,"θ","\\theta",!0),Gg(Wg,Kg,tv,"ι","\\iota",!0),Gg(Wg,Kg,tv,"κ","\\kappa",!0),Gg(Wg,Kg,tv,"λ","\\lambda",!0),Gg(Wg,Kg,tv,"μ","\\mu",!0),Gg(Wg,Kg,tv,"ν","\\nu",!0),Gg(Wg,Kg,tv,"ξ","\\xi",!0),Gg(Wg,Kg,tv,"ο","\\omicron",!0),Gg(Wg,Kg,tv,"π","\\pi",!0),Gg(Wg,Kg,tv,"ρ","\\rho",!0),Gg(Wg,Kg,tv,"σ","\\sigma",!0),Gg(Wg,Kg,tv,"τ","\\tau",!0),Gg(Wg,Kg,tv,"υ","\\upsilon",!0),Gg(Wg,Kg,tv,"ϕ","\\phi",!0),Gg(Wg,Kg,tv,"χ","\\chi",!0),Gg(Wg,Kg,tv,"ψ","\\psi",!0),Gg(Wg,Kg,tv,"ω","\\omega",!0),Gg(Wg,Kg,tv,"ε","\\varepsilon",!0),Gg(Wg,Kg,tv,"ϑ","\\vartheta",!0),Gg(Wg,Kg,tv,"ϖ","\\varpi",!0),Gg(Wg,Kg,tv,"ϱ","\\varrho",!0),Gg(Wg,Kg,tv,"ς","\\varsigma",!0),Gg(Wg,Kg,tv,"φ","\\varphi",!0),Gg(Wg,Kg,Jg,"∗","*",!0),Gg(Wg,Kg,Jg,"+","+"),Gg(Wg,Kg,Jg,"−","-",!0),Gg(Wg,Kg,Jg,"⋅","\\cdot",!0),Gg(Wg,Kg,Jg,"∘","\\circ",!0),Gg(Wg,Kg,Jg,"÷","\\div",!0),Gg(Wg,Kg,Jg,"±","\\pm",!0),Gg(Wg,Kg,Jg,"×","\\times",!0),Gg(Wg,Kg,Jg,"∩","\\cap",!0),Gg(Wg,Kg,Jg,"∪","\\cup",!0),Gg(Wg,Kg,Jg,"∖","\\setminus",!0),Gg(Wg,Kg,Jg,"∧","\\land"),Gg(Wg,Kg,Jg,"∨","\\lor"),Gg(Wg,Kg,Jg,"∧","\\wedge",!0),Gg(Wg,Kg,Jg,"∨","\\vee",!0),Gg(Wg,Kg,sv,"√","\\surd"),Gg(Wg,Kg,rv,"⟨","\\langle",!0),Gg(Wg,Kg,rv,"∣","\\lvert"),Gg(Wg,Kg,rv,"∥","\\lVert"),Gg(Wg,Kg,Qg,"?","?"),Gg(Wg,Kg,Qg,"!","!"),Gg(Wg,Kg,Qg,"⟩","\\rangle",!0),Gg(Wg,Kg,Qg,"∣","\\rvert"),Gg(Wg,Kg,Qg,"∥","\\rVert"),Gg(Wg,Kg,ov,"=","="),Gg(Wg,Kg,ov,":",":"),Gg(Wg,Kg,ov,"≈","\\approx",!0),Gg(Wg,Kg,ov,"≅","\\cong",!0),Gg(Wg,Kg,ov,"≥","\\ge"),Gg(Wg,Kg,ov,"≥","\\geq",!0),Gg(Wg,Kg,ov,"←","\\gets"),Gg(Wg,Kg,ov,">","\\gt",!0),Gg(Wg,Kg,ov,"∈","\\in",!0),Gg(Wg,Kg,ov,"","\\@not"),Gg(Wg,Kg,ov,"⊂","\\subset",!0),Gg(Wg,Kg,ov,"⊃","\\supset",!0),Gg(Wg,Kg,ov,"⊆","\\subseteq",!0),Gg(Wg,Kg,ov,"⊇","\\supseteq",!0),Gg(Wg,Xg,ov,"⊈","\\nsubseteq",!0),Gg(Wg,Xg,ov,"⊉","\\nsupseteq",!0),Gg(Wg,Kg,ov,"⊨","\\models"),Gg(Wg,Kg,ov,"←","\\leftarrow",!0),Gg(Wg,Kg,ov,"≤","\\le"),Gg(Wg,Kg,ov,"≤","\\leq",!0),Gg(Wg,Kg,ov,"<","\\lt",!0),Gg(Wg,Kg,ov,"→","\\rightarrow",!0),Gg(Wg,Kg,ov,"→","\\to"),Gg(Wg,Xg,ov,"≱","\\ngeq",!0),Gg(Wg,Xg,ov,"≰","\\nleq",!0),Gg(Wg,Kg,iv," ","\\ "),Gg(Wg,Kg,iv," ","\\space"),Gg(Wg,Kg,iv," ","\\nobreakspace"),Gg(Yg,Kg,iv," ","\\ "),Gg(Yg,Kg,iv," "," "),Gg(Yg,Kg,iv," ","\\space"),Gg(Yg,Kg,iv," ","\\nobreakspace"),Gg(Wg,Kg,iv,"","\\nobreak"),Gg(Wg,Kg,iv,"","\\allowbreak"),Gg(Wg,Kg,av,",",","),Gg(Wg,Kg,av,";",";"),Gg(Wg,Xg,Jg,"⊼","\\barwedge",!0),Gg(Wg,Xg,Jg,"⊻","\\veebar",!0),Gg(Wg,Kg,Jg,"⊙","\\odot",!0),Gg(Wg,Kg,Jg,"⊕","\\oplus",!0),Gg(Wg,Kg,Jg,"⊗","\\otimes",!0),Gg(Wg,Kg,sv,"∂","\\partial",!0),Gg(Wg,Kg,Jg,"⊘","\\oslash",!0),Gg(Wg,Xg,Jg,"⊚","\\circledcirc",!0),Gg(Wg,Xg,Jg,"⊡","\\boxdot",!0),Gg(Wg,Kg,Jg,"△","\\bigtriangleup"),Gg(Wg,Kg,Jg,"▽","\\bigtriangledown"),Gg(Wg,Kg,Jg,"†","\\dagger"),Gg(Wg,Kg,Jg,"⋄","\\diamond"),Gg(Wg,Kg,Jg,"⋆","\\star"),Gg(Wg,Kg,Jg,"◃","\\triangleleft"),Gg(Wg,Kg,Jg,"▹","\\triangleright"),Gg(Wg,Kg,rv,"{","\\{"),Gg(Yg,Kg,sv,"{","\\{"),Gg(Yg,Kg,sv,"{","\\textbraceleft"),Gg(Wg,Kg,Qg,"}","\\}"),Gg(Yg,Kg,sv,"}","\\}"),Gg(Yg,Kg,sv,"}","\\textbraceright"),Gg(Wg,Kg,rv,"{","\\lbrace"),Gg(Wg,Kg,Qg,"}","\\rbrace"),Gg(Wg,Kg,rv,"[","\\lbrack",!0),Gg(Yg,Kg,sv,"[","\\lbrack",!0),Gg(Wg,Kg,Qg,"]","\\rbrack",!0),Gg(Yg,Kg,sv,"]","\\rbrack",!0),Gg(Wg,Kg,rv,"(","\\lparen",!0),Gg(Wg,Kg,Qg,")","\\rparen",!0),Gg(Yg,Kg,sv,"<","\\textless",!0),Gg(Yg,Kg,sv,">","\\textgreater",!0),Gg(Wg,Kg,rv,"⌊","\\lfloor",!0),Gg(Wg,Kg,Qg,"⌋","\\rfloor",!0),Gg(Wg,Kg,rv,"⌈","\\lceil",!0),Gg(Wg,Kg,Qg,"⌉","\\rceil",!0),Gg(Wg,Kg,sv,"\\","\\backslash"),Gg(Wg,Kg,sv,"∣","|"),Gg(Wg,Kg,sv,"∣","\\vert"),Gg(Yg,Kg,sv,"|","\\textbar",!0),Gg(Wg,Kg,sv,"∥","\\|"),Gg(Wg,Kg,sv,"∥","\\Vert"),Gg(Yg,Kg,sv,"∥","\\textbardbl"),Gg(Yg,Kg,sv,"~","\\textasciitilde"),Gg(Yg,Kg,sv,"\\","\\textbackslash"),Gg(Yg,Kg,sv,"^","\\textasciicircum"),Gg(Wg,Kg,ov,"↑","\\uparrow",!0),Gg(Wg,Kg,ov,"⇑","\\Uparrow",!0),Gg(Wg,Kg,ov,"↓","\\downarrow",!0),Gg(Wg,Kg,ov,"⇓","\\Downarrow",!0),Gg(Wg,Kg,ov,"↕","\\updownarrow",!0),Gg(Wg,Kg,ov,"⇕","\\Updownarrow",!0),Gg(Wg,Kg,nv,"∐","\\coprod"),Gg(Wg,Kg,nv,"⋁","\\bigvee"),Gg(Wg,Kg,nv,"⋀","\\bigwedge"),Gg(Wg,Kg,nv,"⨄","\\biguplus"),Gg(Wg,Kg,nv,"⋂","\\bigcap"),Gg(Wg,Kg,nv,"⋃","\\bigcup"),Gg(Wg,Kg,nv,"∫","\\int"),Gg(Wg,Kg,nv,"∫","\\intop"),Gg(Wg,Kg,nv,"∬","\\iint"),Gg(Wg,Kg,nv,"∭","\\iiint"),Gg(Wg,Kg,nv,"∏","\\prod"),Gg(Wg,Kg,nv,"∑","\\sum"),Gg(Wg,Kg,nv,"⨂","\\bigotimes"),Gg(Wg,Kg,nv,"⨁","\\bigoplus"),Gg(Wg,Kg,nv,"⨀","\\bigodot"),Gg(Wg,Kg,nv,"∮","\\oint"),Gg(Wg,Kg,nv,"∯","\\oiint"),Gg(Wg,Kg,nv,"∰","\\oiiint"),Gg(Wg,Kg,nv,"⨆","\\bigsqcup"),Gg(Wg,Kg,nv,"∫","\\smallint"),Gg(Yg,Kg,ev,"…","\\textellipsis"),Gg(Wg,Kg,ev,"…","\\mathellipsis"),Gg(Yg,Kg,ev,"…","\\ldots",!0),Gg(Wg,Kg,ev,"…","\\ldots",!0),Gg(Wg,Kg,ev,"⋯","\\@cdots",!0),Gg(Wg,Kg,ev,"⋱","\\ddots",!0),Gg(Wg,Kg,sv,"⋮","\\varvdots"),Gg(Yg,Kg,sv,"⋮","\\varvdots"),Gg(Wg,Kg,Zg,"ˊ","\\acute"),Gg(Wg,Kg,Zg,"ˋ","\\grave"),Gg(Wg,Kg,Zg,"¨","\\ddot"),Gg(Wg,Kg,Zg,"~","\\tilde"),Gg(Wg,Kg,Zg,"ˉ","\\bar"),Gg(Wg,Kg,Zg,"˘","\\breve"),Gg(Wg,Kg,Zg,"ˇ","\\check"),Gg(Wg,Kg,Zg,"^","\\hat"),Gg(Wg,Kg,Zg,"⃗","\\vec"),Gg(Wg,Kg,Zg,"˙","\\dot"),Gg(Wg,Kg,Zg,"˚","\\mathring"),Gg(Wg,Kg,tv,"","\\@imath"),Gg(Wg,Kg,tv,"","\\@jmath"),Gg(Wg,Kg,sv,"ı","ı"),Gg(Wg,Kg,sv,"ȷ","ȷ"),Gg(Yg,Kg,sv,"ı","\\i",!0),Gg(Yg,Kg,sv,"ȷ","\\j",!0),Gg(Yg,Kg,sv,"ß","\\ss",!0),Gg(Yg,Kg,sv,"æ","\\ae",!0),Gg(Yg,Kg,sv,"œ","\\oe",!0),Gg(Yg,Kg,sv,"ø","\\o",!0),Gg(Yg,Kg,sv,"Æ","\\AE",!0),Gg(Yg,Kg,sv,"Œ","\\OE",!0),Gg(Yg,Kg,sv,"Ø","\\O",!0),Gg(Yg,Kg,Zg,"ˊ","\\'"),Gg(Yg,Kg,Zg,"ˋ","\\`"),Gg(Yg,Kg,Zg,"ˆ","\\^"),Gg(Yg,Kg,Zg,"˜","\\~"),Gg(Yg,Kg,Zg,"ˉ","\\="),Gg(Yg,Kg,Zg,"˘","\\u"),Gg(Yg,Kg,Zg,"˙","\\."),Gg(Yg,Kg,Zg,"¸","\\c"),Gg(Yg,Kg,Zg,"˚","\\r"),Gg(Yg,Kg,Zg,"ˇ","\\v"),Gg(Yg,Kg,Zg,"¨",'\\"'),Gg(Yg,Kg,Zg,"˝","\\H"),Gg(Yg,Kg,Zg,"◯","\\textcircled");var lv={"--":!0,"---":!0,"``":!0,"''":!0};Gg(Yg,Kg,sv,"–","--",!0),Gg(Yg,Kg,sv,"–","\\textendash"),Gg(Yg,Kg,sv,"—","---",!0),Gg(Yg,Kg,sv,"—","\\textemdash"),Gg(Yg,Kg,sv,"‘","`",!0),Gg(Yg,Kg,sv,"‘","\\textquoteleft"),Gg(Yg,Kg,sv,"’","'",!0),Gg(Yg,Kg,sv,"’","\\textquoteright"),Gg(Yg,Kg,sv,"“","``",!0),Gg(Yg,Kg,sv,"“","\\textquotedblleft"),Gg(Yg,Kg,sv,"”","''",!0),Gg(Yg,Kg,sv,"”","\\textquotedblright"),Gg(Wg,Kg,sv,"°","\\degree",!0),Gg(Yg,Kg,sv,"°","\\degree"),Gg(Yg,Kg,sv,"°","\\textdegree",!0),Gg(Wg,Kg,sv,"£","\\pounds"),Gg(Wg,Kg,sv,"£","\\mathsterling",!0),Gg(Yg,Kg,sv,"£","\\pounds"),Gg(Yg,Kg,sv,"£","\\textsterling",!0),Gg(Wg,Xg,sv,"✠","\\maltese"),Gg(Yg,Xg,sv,"✠","\\maltese");for(var cv='0123456789/@."',dv=0;dv<14;dv++){var uv=cv.charAt(dv);Gg(Wg,Kg,sv,uv,uv)}for(var hv='0123456789!@*()-=+";:?/.,',pv=0;pv<25;pv++){var mv=hv.charAt(pv);Gg(Yg,Kg,sv,mv,mv)}for(var fv,gv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",vv=0;vv<52;vv++){var yv=gv.charAt(vv);Gg(Wg,Kg,tv,yv,yv),Gg(Yg,Kg,sv,yv,yv)}Gg(Wg,Xg,sv,"C","ℂ"),Gg(Yg,Xg,sv,"C","ℂ"),Gg(Wg,Xg,sv,"H","ℍ"),Gg(Yg,Xg,sv,"H","ℍ"),Gg(Wg,Xg,sv,"N","ℕ"),Gg(Yg,Xg,sv,"N","ℕ"),Gg(Wg,Xg,sv,"P","ℙ"),Gg(Yg,Xg,sv,"P","ℙ"),Gg(Wg,Xg,sv,"Q","ℚ"),Gg(Yg,Xg,sv,"Q","ℚ"),Gg(Wg,Xg,sv,"R","ℝ"),Gg(Yg,Xg,sv,"R","ℝ"),Gg(Wg,Xg,sv,"Z","ℤ"),Gg(Yg,Xg,sv,"Z","ℤ"),Gg(Wg,Kg,tv,"h","ℎ"),Gg(Yg,Kg,tv,"h","ℎ");for(var bv=0;bv<52;bv++){var xv=gv.charAt(bv);Gg(Wg,Kg,tv,xv,fv=String.fromCharCode(55349,56320+bv)),Gg(Yg,Kg,sv,xv,fv),Gg(Wg,Kg,tv,xv,fv=String.fromCharCode(55349,56372+bv)),Gg(Yg,Kg,sv,xv,fv),Gg(Wg,Kg,tv,xv,fv=String.fromCharCode(55349,56424+bv)),Gg(Yg,Kg,sv,xv,fv),Gg(Wg,Kg,tv,xv,fv=String.fromCharCode(55349,56580+bv)),Gg(Yg,Kg,sv,xv,fv),Gg(Wg,Kg,tv,xv,fv=String.fromCharCode(55349,56684+bv)),Gg(Yg,Kg,sv,xv,fv),Gg(Wg,Kg,tv,xv,fv=String.fromCharCode(55349,56736+bv)),Gg(Yg,Kg,sv,xv,fv),Gg(Wg,Kg,tv,xv,fv=String.fromCharCode(55349,56788+bv)),Gg(Yg,Kg,sv,xv,fv),Gg(Wg,Kg,tv,xv,fv=String.fromCharCode(55349,56840+bv)),Gg(Yg,Kg,sv,xv,fv),Gg(Wg,Kg,tv,xv,fv=String.fromCharCode(55349,56944+bv)),Gg(Yg,Kg,sv,xv,fv),bv<26&&(Gg(Wg,Kg,tv,xv,fv=String.fromCharCode(55349,56632+bv)),Gg(Yg,Kg,sv,xv,fv),Gg(Wg,Kg,tv,xv,fv=String.fromCharCode(55349,56476+bv)),Gg(Yg,Kg,sv,xv,fv))}Gg(Wg,Kg,tv,"k",fv=String.fromCharCode(55349,56668)),Gg(Yg,Kg,sv,"k",fv);for(var wv=0;wv<10;wv++){var Sv=wv.toString();Gg(Wg,Kg,tv,Sv,fv=String.fromCharCode(55349,57294+wv)),Gg(Yg,Kg,sv,Sv,fv),Gg(Wg,Kg,tv,Sv,fv=String.fromCharCode(55349,57314+wv)),Gg(Yg,Kg,sv,Sv,fv),Gg(Wg,Kg,tv,Sv,fv=String.fromCharCode(55349,57324+wv)),Gg(Yg,Kg,sv,Sv,fv),Gg(Wg,Kg,tv,Sv,fv=String.fromCharCode(55349,57334+wv)),Gg(Yg,Kg,sv,Sv,fv)}for(var kv="ÐÞþ",Cv=0;Cv<3;Cv++){var Nv=kv.charAt(Cv);Gg(Wg,Kg,tv,Nv,Nv),Gg(Yg,Kg,sv,Nv,Nv)}var Tv={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},Av={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},Mv={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},Iv={mathClass:"",textClass:"",font:""},Dv={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},Ev={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},Rv={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},_v={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},zv={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},Pv={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},Ov={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},Lv=[Tv,Tv,Av,Av,Mv,Mv,{mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},Iv,Iv,Iv,Dv,Dv,Ev,Ev,Rv,Rv,_v,_v,zv,zv,Pv,Pv,Iv,Iv,Ov,Ov],Fv=[Tv,Iv,_v,zv,Ov],Bv=function(e,t,n){if(Ug[n][e]){var r=Ug[n][e].replace;r&&(e=r)}return{value:e,metrics:qg(e,t,n)}},Vv=function(e,t,n,r,a){var o,i=Bv(e,t,n),s=i.metrics;if(e=i.value,s){var l=s.italic;("text"===n||r&&"mathit"===r.font)&&(l=0),o=new Og(e,s.height,s.depth,l,s.skew,s.width,a)}else o=new Og(e,0,0,0,0,0,a);if(r){o.maxFontSize=r.sizeMultiplier,r.style.isTight()&&o.classes.push("mtight");var c=r.getColor();c&&(o.style.color=c)}return o},Hv=function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&Bv(e,"Main-Bold",t).metrics?Vv(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===Ug[t][e].font?Vv(e,"Main-Regular",t,n,r):Vv(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},$v=function(e,t){var n="mathord"===e.type?"mathord":"textord",r=e.mode,a=e.text,o=["mord"],{font:i,fontFamily:s,fontWeight:l,fontShape:c}=t,d="math"===r||"text"===r&&!!i,u=d?i:s,h="",p="";if(55349===a.charCodeAt(0)){var m=(e=>{var t=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536;if(119808<=t&&t<120484)return Lv[Math.floor((t-119808)/26)];if(120782<=t&&t<=120831)return Fv[Math.floor((t-120782)/10)];if(120485===t||120486===t)return Lv[0];if(120486<t&&t<120782)return Iv;throw new Gf("Unsupported character: "+e)})(a);h=m.font,p=m[r+"Class"]}if(h)return Vv(a,h,r,t,o.concat(p));if(u){var f,g;if("boldsymbol"===u){var v=function(e,t,n){return"textord"!==n&&Bv(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(a,r,n);f=v.fontName,g=[v.fontClass]}else d?(f=ey[i].fontName,g=[i]):(f=Qv(s,l,c),g=[s,l,c]);if(Bv(a,f,r).metrics)return Vv(a,f,r,t,o.concat(g));if(lv.hasOwnProperty(a)&&"Typewriter"===f.slice(0,10)){for(var y=[],b=0;b<a.length;b++)y.push(Vv(a[b],f,r,t,o.concat(g)));return Kv(y)}}if("mathord"===n)return Vv(a,"Math-Italic",r,t,o.concat(["mathnormal"]));if("textord"===n){var x=Ug[r][a]&&Ug[r][a].font;if("ams"===x)return Vv(a,Qv("amsrm",l,c),r,t,o.concat("amsrm",l,c));if("main"!==x&&x){var w=Qv(x,l,c);return Vv(a,w,r,t,o.concat(w,l,c))}return Vv(a,Qv("textrm",l,c),r,t,o.concat(l,c))}throw new Error("unexpected type: "+n+" in makeOrd")},qv=(e,t)=>{if(Tg(e.classes)!==Tg(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||0!==e.italic&&e.hasClass("mathnormal"))return!1;if(1===e.classes.length){var n=e.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var a of Object.keys(t.style))if(e.style[a]!==t.style[a])return!1;return!0},jv=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof Og&&r instanceof Og&&qv(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},Uv=function(e){for(var t=0,n=0,r=0,a=0;a<e.children.length;a++){var o=e.children[a];o.height>t&&(t=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>r&&(r=o.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},Gv=function(e,t,n,r){var a=new Rg(e,t,n,r);return Uv(a),a},Wv=(e,t,n,r)=>new Rg(e,t,n,r),Yv=function(e,t,n){var r=Gv([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=Ng(r.height),r.maxFontSize=1,r},Kv=function(e){var t=new xg(e);return Uv(t),t},Xv=function(e,t){return e instanceof xg?Gv([],[e],t):e},Zv=function(e,t){for(var{children:n,depth:r}=function(e){if("individualShift"===e.positionType){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,a=r,o=1;o<t.length;o++){var i=-t[o].shift-a-t[o].elem.depth,s=i-(t[o-1].elem.height+t[o-1].elem.depth);a+=i,n.push({type:"kern",size:s}),n.push(t[o])}return{children:n,depth:r}}var l;if("top"===e.positionType){for(var c=e.positionData,d=0;d<e.children.length;d++){var u=e.children[d];c-="kern"===u.type?u.size:u.elem.height+u.elem.depth}l=c}else if("bottom"===e.positionType)l=-e.positionData;else{var h=e.children[0];if("elem"!==h.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-h.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-h.elem.depth}}return{children:e.children,depth:l}}(e),a=0,o=0;o<n.length;o++){var i=n[o];if("elem"===i.type){var s=i.elem;a=Math.max(a,s.maxFontSize,s.height)}}a+=2;var l=Gv(["pstrut"],[]);l.style.height=Ng(a);for(var c=[],d=r,u=r,h=r,p=0;p<n.length;p++){var m=n[p];if("kern"===m.type)h+=m.size;else{var f=m.elem,g=m.wrapperClasses||[],v=m.wrapperStyle||{},y=Gv(g,[l,f],void 0,v);y.style.top=Ng(-a-h-f.depth),m.marginLeft&&(y.style.marginLeft=m.marginLeft),m.marginRight&&(y.style.marginRight=m.marginRight),c.push(y),h+=f.height+f.depth}d=Math.min(d,h),u=Math.max(u,h)}var b,x=Gv(["vlist"],c);if(x.style.height=Ng(u),d<0){var w=Gv(["vlist"],[Gv([],[])]);w.style.height=Ng(-d),b=[Gv(["vlist-r"],[x,Gv(["vlist-s"],[new Og("")])]),Gv(["vlist-r"],[w])]}else b=[Gv(["vlist-r"],[x])];var S=Gv(["vlist-t"],b);return 2===b.length&&S.classes.push("vlist-t2"),S.height=u,S.depth=-d,S},Jv=(e,t)=>{var n=Gv(["mspace"],[],t),r=Cg(e,t);return n.style.marginRight=Ng(r),n},Qv=(e,t,n)=>{var r;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 r+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===n?"Italic":"Regular")},ey={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"}},ty={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ny=function(e,t){var[n,r,a]=ty[e],o=new Fg(n),i=Wv(["overlay"],[new Lg([o],{width:Ng(r),height:Ng(a),style:"width:"+Ng(r),viewBox:"0 0 "+1e3*r+" "+1e3*a,preserveAspectRatio:"xMinYMin"})],t);return i.height=a,i.style.height=Ng(a),i.style.width=Ng(r),i},ry={number:3,unit:"mu"},ay={number:4,unit:"mu"},oy={number:5,unit:"mu"},iy={mord:{mop:ry,mbin:ay,mrel:oy,minner:ry},mop:{mord:ry,mop:ry,mrel:oy,minner:ry},mbin:{mord:ay,mop:ay,mopen:ay,minner:ay},mrel:{mord:oy,mop:oy,mopen:oy,minner:oy},mopen:{},mclose:{mop:ry,mbin:ay,mrel:oy,minner:ry},mpunct:{mord:ry,mop:ry,mrel:oy,mopen:ry,mclose:ry,mpunct:ry,minner:ry},minner:{mord:ry,mop:ry,mbin:ay,mrel:oy,mopen:ry,mpunct:ry,minner:ry}},sy={mord:{mop:ry},mop:{mord:ry,mop:ry},mbin:{},mrel:{},mopen:{},mclose:{mop:ry},mpunct:{},minner:{mop:ry}},ly={},cy={},dy={};function uy(e){for(var{type:t,names:n,htmlBuilder:r,mathmlBuilder:a}=e,o=0;o<n.length;++o)ly[n[o]]=e;t&&(r&&(cy[t]=r),a&&(dy[t]=a))}function hy(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;n&&(cy[t]=n),r&&(dy[t]=r)}var py=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},my=function(e){return"ordgroup"===e.type?e.body:[e]},fy=/* @__PURE__ */new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),gy=/* @__PURE__ */new Set(["rightmost","mrel","mclose","mpunct"]),vy={display:pg.DISPLAY,text:pg.TEXT,script:pg.SCRIPT,scriptscript:pg.SCRIPTSCRIPT},yy={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},by=function(e,t,n,r){void 0===r&&(r=[null,null]);for(var a=[],o=0;o<e.length;o++){var i=Ny(e[o],t);if(i instanceof xg){var s=i.children;a.push(...s)}else a.push(i)}if(jv(a),!n)return a;var l=t;if(1===e.length){var c=e[0];"sizing"===c.type?l=t.havingSize(c.size):"styling"===c.type&&(l=t.havingStyle(vy[c.style]))}var d=Gv([r[0]||"leftmost"],[],t),u=Gv([r[1]||"rightmost"],[],t),h="root"===n;return xy(a,(e,t)=>{var n=t.classes[0],r=e.classes[0];"mbin"===n&&gy.has(r)?t.classes[0]="mord":"mbin"===r&&fy.has(n)&&(e.classes[0]="mord")},{node:d},u,h),xy(a,(e,t)=>{var n,r,a=ky(t),o=ky(e),i=a&&o?e.hasClass("mtight")?null==(n=sy[a])?void 0:n[o]:null==(r=iy[a])?void 0:r[o]:null;if(i)return Jv(i,l)},{node:d},u,h),a},xy=function(e,t,n,r,a){r&&e.push(r);for(var o=0;o<e.length;o++){var i=e[o],s=wy(i);if(s)xy(s.children,t,n,null,a);else{var l=!i.hasClass("mspace");if(l){var c=t(i,n.node);c&&(n.insertAfter?n.insertAfter(c):(e.unshift(c),o++))}l?n.node=i:a&&i.hasClass("newline")&&(n.node=Gv(["leftmost"])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),o++})(o)}}r&&e.pop()},wy=function(e){return e instanceof xg||e instanceof _g||e instanceof Rg&&e.hasClass("enclosing")?e:null},Sy=function(e,t){var n=wy(e);if(n){var r=n.children;if(r.length){if("right"===t)return Sy(r[r.length-1],"right");if("left"===t)return Sy(r[0],"left")}}return e},ky=function(e,t){return e?(t&&(e=Sy(e,t)),yy[e.classes[0]]||null):null},Cy=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Gv(t.concat(n))},Ny=function(e,t,n){if(!e)return Gv();if(cy[e.type]){var r=cy[e.type](e,t);if(n&&t.size!==n.size){r=Gv(t.sizingClasses(n),[r],t);var a=t.sizeMultiplier/n.sizeMultiplier;r.height*=a,r.depth*=a}return r}throw new Gf("Got group of unknown type: '"+e.type+"'")};function Ty(e,t){var n=Gv(["base"],e,t),r=Gv(["strut"]);return r.style.height=Ng(n.height+n.depth),n.depth&&(r.style.verticalAlign=Ng(-n.depth)),n.children.unshift(r),n}function Ay(e,t){var n=null;1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body);var r,a=by(e,t,"root");2===a.length&&a[1].hasClass("tag")&&(r=a.pop());for(var o,i=[],s=[],l=0;l<a.length;l++)if(s.push(a[l]),a[l].hasClass("mbin")||a[l].hasClass("mrel")||a[l].hasClass("allowbreak")){for(var c=!1;l<a.length-1&&a[l+1].hasClass("mspace")&&!a[l+1].hasClass("newline");)l++,s.push(a[l]),a[l].hasClass("nobreak")&&(c=!0);c||(i.push(Ty(s,t)),s=[])}else a[l].hasClass("newline")&&(s.pop(),s.length>0&&(i.push(Ty(s,t)),s=[]),i.push(a[l]));s.length>0&&i.push(Ty(s,t)),n?((o=Ty(by(n,t,!0),t)).classes=["tag"],i.push(o)):r&&i.push(r);var d=Gv(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),o){var u=o.children[0];u.style.height=Ng(d.height+d.depth),d.depth&&(u.style.verticalAlign=Ng(-d.depth))}return d}function My(e){return new xg(e)}var Iy=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=Tg(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof Dy&&this.children[n+1]instanceof Dy){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof Dy;)r+=this.children[++n].toText();e.appendChild(new Dy(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+=Zf(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Zf(Tg(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map(e=>e.toText()).join("")}},Dy=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Zf(this.toText())}toText(){return this.text}},Ey=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",Ng(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Ng(this.width)+'"/>'}toText(){return this.character?this.character:" "}},Ry=/* @__PURE__ */new Set(["\\imath","\\jmath"]),_y=/* @__PURE__ */new Set(["mrow","mtable"]),zy=function(e,t,n){return!Ug[t][e]||!Ug[t][e].replace||55349===e.charCodeAt(0)||lv.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(e=Ug[t][e].replace),new Dy(e)},Py=function(e){return 1===e.length?e[0]:new Iy("mrow",e)},Oy={mathit:"italic",boldsymbol:e=>"textord"===e.type?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},Ly=(e,t)=>{if("text"===e.mode){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold"}var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode,a=Oy[n];if(a)return"function"==typeof a?a(e):a;var o=e.text;if(Ry.has(o))return null;if(Ug[r][o]){var i=Ug[r][o].replace;i&&(o=i)}return qg(o,ey[n].fontName,r)?ey[n].variant:null};function Fy(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof Dy&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var n=e.children[0];return n instanceof Dy&&","===n.text}return!1}var By=function(e,t,n){if(1===e.length){var r=Hy(e[0],t);return n&&r instanceof Iy&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var a,o=[],i=0;i<e.length;i++){var s=Hy(e[i],t);if(s instanceof Iy&&a instanceof Iy){if("mtext"===s.type&&"mtext"===a.type&&s.getAttribute("mathvariant")===a.getAttribute("mathvariant")){a.children.push(...s.children);continue}if("mn"===s.type&&"mn"===a.type){a.children.push(...s.children);continue}if(Fy(s)&&"mn"===a.type){a.children.push(...s.children);continue}if("mn"===s.type&&Fy(a))s.children=[...a.children,...s.children],o.pop();else if(("msup"===s.type||"msub"===s.type)&&s.children.length>=1&&("mn"===a.type||Fy(a))){var l=s.children[0];l instanceof Iy&&"mn"===l.type&&(l.children=[...a.children,...l.children],o.pop())}else if("mi"===a.type&&1===a.children.length){var c=a.children[0];if(c instanceof Dy&&"̸"===c.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var d=s.children[0];d instanceof Dy&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),o.pop())}}}o.push(s),a=s}return o},Vy=function(e,t,n){return Py(By(e,t,n))},Hy=function(e,t){if(!e)return new Iy("mrow");if(dy[e.type])return dy[e.type](e,t);throw new Gf("Got group of unknown type: '"+e.type+"'")};function $y(e,t,n,r,a){var o,i=By(e,n);o=1===i.length&&i[0]instanceof Iy&&_y.has(i[0].type)?i[0]:new Iy("mrow",i);var s=new Iy("annotation",[new Dy(t)]);s.setAttribute("encoding","application/x-tex");var l=new Iy("semantics",[o,s]),c=new Iy("math",[l]);return c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block"),Gv([a?"katex":"katex-mathml"],[c])}var qy=[[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]],jy=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Uy=function(e,t){return t.size<2?e:qy[e-1][t.size-1]},Gy=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=jy[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,phantom: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:Uy(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:jy[e-1]})}havingBaseStyle(t){t=t||this.style.text();var n=Uy(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||(this._fontMetrics=function(e){var t;if(!jg[t=e>=5?0:e>=3?1:2]){var n=jg[t]={cssEmPerMu:Hg.quad[t]/18};for(var r in Hg)Hg.hasOwnProperty(r)&&(n[r]=Hg[r][t])}return jg[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};Gy.BASESIZE=6;var Wy=function(e){return new Gy({style:e.displayMode?pg.DISPLAY:pg.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Yy=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=Gv(n,[e])}return e},Ky={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":"="},Xy=function(e){var t=new Iy("mo",[new Dy(Ky[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Zy={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Jy=/* @__PURE__ */new Set(["widehat","widecheck","widetilde","utilde"]),Qy=function(e,t){var{span:n,minWidth:r,height:a}=function(){var n=4e5,r=e.label.slice(1);if(Jy.has(r)&&"base"in e){var a,o,i,s="ordgroup"===e.base.type?e.base.body.length:1;if(s>5)"widehat"===r||"widecheck"===r?(a=420,n=2364,i=.42,o=r+"4"):(a=312,n=2340,i=.34,o="tilde4");else{var l=[1,1,2,2,3,3][s];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][l],a=[0,239,300,360,420][l],i=[0,.24,.3,.3,.36,.42][l],o=r+l):(n=[0,600,1033,2339,2340][l],a=[0,260,286,306,312][l],i=[0,.26,.286,.3,.306,.34][l],o="tilde"+l)}var c=new Fg(o);return{span:Wv([],[new Lg([c],{width:"100%",height:Ng(i),viewBox:"0 0 "+n+" "+a,preserveAspectRatio:"none"})],t),minWidth:0,height:i}}var d=[],u=Zy[r];if(!u)throw new Error('No SVG data for "'+r+'".');var h,p,[m,f,g]=u,v=g/1e3,y=m.length;if(1===y){if(4!==u.length)throw new Error('Expected 4-tuple for single-path SVG data "'+r+'".');h=["hide-tail"],p=[u[3]]}else if(2===y)h=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==y)throw new Error("Correct katexImagesData or update code here to support\n "+y+" children.");h=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var b=0;b<y;b++){var x=new Fg(m[b]),w=new Lg([x],{width:"400em",height:Ng(v),viewBox:"0 0 "+n+" "+g,preserveAspectRatio:p[b]+" slice"}),S=Wv([h[b]],[w],t);if(1===y)return{span:S,minWidth:f,height:v};S.style.height=Ng(v),d.push(S)}return{span:Gv(["stretchy"],d,t),minWidth:f,height:v}}();return n.height=a,n.style.height=Ng(a),r>0&&(n.style.minWidth=Ng(r)),n},eb={bin:1,close:1,inner:1,open:1,punct:1,rel:1},tb={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function nb(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function rb(e){var t=ab(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function ab(e){return e&&("atom"===e.type||tb.hasOwnProperty(e.type))?e:null}var ob=e=>{return e instanceof Og?e:((t=e)instanceof Rg||t instanceof _g||t instanceof xg)&&1===e.children.length?ob(e.children[0]):void 0;var t},ib=(e,t)=>{var n,r,a;e&&"supsub"===e.type?(n=(r=nb(e.base,"accent")).base,e.base=n,a=function(e){if(e instanceof Rg)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(Ny(e,t)),e.base=r):n=(r=nb(e,"accent")).base;var o,i,s=Ny(n,t.havingCrampedStyle()),l=0;r.isShifty&&eg(n)&&(l=null!=(o=null==(i=ob(s))?void 0:i.skew)?o:0);var c,d="\\c"===r.label,u=d?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight);if(r.isStretchy)c=Qy(r,t),c=Zv({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+Ng(2*l)+")",marginLeft:Ng(2*l)}:void 0}]});else{var h,p;"\\vec"===r.label?(h=ny("vec",t),p=ty.vec[1]):(h=function(e){if(e instanceof Og)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}(h=$v({type:"textord",mode:r.mode,text:r.label},t)),h.italic=0,p=h.width,d&&(u+=h.depth)),c=Gv(["accent-body"],[h]);var m="\\textcircled"===r.label;m&&(c.classes.push("accent-full"),u=s.height);var f=l;m||(f-=p/2),c.style.left=Ng(f),"\\textcircled"===r.label&&(c.style.top=".2em"),c=Zv({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-u},{type:"elem",elem:c}]})}var g=Gv(["mord","accent"],[c],t);return a?(a.children[0]=g,a.height=Math.max(g.height,a.height),a.classes[0]="mord",a):g},sb=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));uy({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"],numArgs:1,handler:(e,t)=>{var n=py(t[0]),r=!sb.test(e.funcName),a=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:a,base:n}},htmlBuilder:ib,mathmlBuilder:(e,t)=>{var n=e.isStretchy?Xy(e.label):new Iy("mo",[zy(e.label,e.mode)]),r=new Iy("mover",[Hy(e.base,t),n]);return r.setAttribute("accent","true"),r}}),uy({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"],handler:(e,t)=>{var n=t[0],r=e.parser.mode;return"math"===r&&(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}}}),uy({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],numArgs:1,handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:a}},htmlBuilder:(e,t)=>{var n=Ny(e.base,t),r=Qy(e,t),a="\\utilde"===e.label?.12:0;return Gv(["mord","accentunder"],[Zv({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=Xy(e.label),r=new Iy("munder",[Hy(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var lb=e=>{var t=new Iy("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};uy({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"],numArgs:1,numOptionalArgs:1,handler(e,t,n){var{parser:r,funcName:a}=e;return{type:"xArrow",mode:r.mode,label:a,body:t[0],below:n[0]}},htmlBuilder(e,t){var n,r=t.style,a=t.havingStyle(r.sup()),o=Xv(Ny(e.body,a,t),t),i="\\x"===e.label.slice(0,2)?"x":"cd";o.classes.push(i+"-arrow-pad"),e.below&&(a=t.havingStyle(r.sub()),(n=Xv(Ny(e.below,a,t),t)).classes.push(i+"-arrow-pad"));var s,l=Qy(e,t),c=-t.fontMetrics().axisHeight+.5*l.height,d=-t.fontMetrics().axisHeight-.5*l.height-.111;if((o.depth>.25||"\\xleftequilibrium"===e.label)&&(d-=o.depth),n){var u=-t.fontMetrics().axisHeight+n.height+.5*l.height+.111;s=Zv({positionType:"individualShift",children:[{type:"elem",elem:o,shift:d},{type:"elem",elem:l,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:n,shift:u}]})}else s=Zv({positionType:"individualShift",children:[{type:"elem",elem:o,shift:d},{type:"elem",elem:l,shift:c,wrapperClasses:["svg-align"]}]});return Gv(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var n,r=Xy(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var a=lb(Hy(e.body,t));if(e.below){var o=lb(Hy(e.below,t));n=new Iy("munderover",[r,o,a])}else n=new Iy("mover",[r,a])}else if(e.below){var i=lb(Hy(e.below,t));n=new Iy("munder",[r,i])}else n=lb(),n=new Iy("mover",[r,n]);return n}}),uy({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],numArgs:1,primitive:!0,handler(e,t){var{parser:n,funcName:r}=e,a=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:my(a),isCharacterBox:eg(a)}},htmlBuilder:function(e,t){var n=by(e.body,t,!0);return Gv([e.mclass],n,t)},mathmlBuilder:function(e,t){var n,r=By(e.body,t);return"minner"===e.mclass?n=new Iy("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(n=r[0]).type="mi":n=new Iy("mi",r):(e.isCharacterBox?(n=r[0]).type="mo":n=new Iy("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"!==e.mclass&&"mclose"!==e.mclass||(n.attributes.lspace="0em",n.attributes.rspace="0em")),n}});var cb=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};uy({type:"mclass",names:["\\@binrel"],numArgs:2,handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:cb(t[0]),body:my(t[1]),isCharacterBox:eg(t[1])}}}),uy({type:"mclass",names:["\\stackrel","\\overset","\\underset"],numArgs:2,handler(e,t){var n,{parser:r,funcName:a}=e,o=t[1],i=t[0];n="\\stackrel"!==a?cb(o):"mrel";var s={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==a,body:my(o)},l="\\underset"===a?{type:"supsub",mode:i.mode,base:s,sub:i}:{type:"supsub",mode:i.mode,base:s,sup:i};return{type:"mclass",mode:r.mode,mclass:n,body:[l],isCharacterBox:eg(l)}}}),uy({type:"pmb",names:["\\pmb"],numArgs:1,allowedInText:!0,handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:cb(t[0]),body:my(t[0])}},htmlBuilder(e,t){var n=by(e.body,t,!0),r=Gv([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=By(e.body,t),r=new Iy("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var db={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},ub=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),hb=e=>"textord"===e.type&&"@"===e.text,pb=(e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t;function mb(e,t,n){var r=db[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var a={type:"atom",text:r,mode:"math",family:"rel"},o={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[t[0]],[]),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"}}}uy({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],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=Xv(Ny(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=Ng(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Iy("mrow",[Hy(e.label,t)]);return(n=new Iy("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new Iy("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),uy({type:"cdlabelparent",names:["\\\\cdparent"],numArgs:1,handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Xv(Ny(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:(e,t)=>new Iy("mrow",[Hy(e.fragment,t)])}),uy({type:"textord",names:["\\@char"],numArgs:1,allowedInText:!0,handler(e,t){for(var{parser:n}=e,r=nb(t[0],"ordgroup").body,a="",o=0;o<r.length;o++){a+=nb(r[o],"textord").text}var i,s=parseInt(a);if(isNaN(s))throw new Gf("\\@char has non-numeric argument "+a);if(s<0||s>=1114111)throw new Gf("\\@char with invalid code point "+a);return s<=65535?i=String.fromCharCode(s):(s-=65536,i=String.fromCharCode(55296+(s>>10),56320+(1023&s))),{type:"textord",mode:n.mode,text:i}}});uy({type:"color",names:["\\textcolor"],numArgs:2,allowedInText:!0,argTypes:["color","original"],handler(e,t){var{parser:n}=e,r=nb(t[0],"color-token").color,a=t[1];return{type:"color",mode:n.mode,color:r,body:my(a)}},htmlBuilder:(e,t)=>Kv(by(e.body,t.withColor(e.color),!1)),mathmlBuilder:(e,t)=>{var n=By(e.body,t.withColor(e.color)),r=new Iy("mstyle",n);return r.setAttribute("mathcolor",e.color),r}}),uy({type:"color",names:["\\color"],numArgs:1,allowedInText:!0,argTypes:["color"],handler(e,t){var{parser:n,breakOnTokenText:r}=e,a=nb(t[0],"color-token").color;n.gullet.macros.set("\\current@color",a);var o=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:a,body:o}}}),uy({type:"cr",names:["\\\\"],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e,t,n){var{parser:r}=e,a="["===r.gullet.future().text?r.parseSizeGroup(!0):null,o=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:o,size:a&&nb(a,"size").value}},htmlBuilder(e,t){var n=Gv(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=Ng(Cg(e.size,t)))),n},mathmlBuilder(e,t){var n=new Iy("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",Ng(Cg(e.size,t)))),n}});var fb={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},gb=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Gf("Expected a control sequence",e);return t},vb=(e,t,n,r)=>{var a=e.gullet.macros.get(n.text);null==a&&(n.noexpand=!0,a={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,a,r)};uy({type:"internal",names:["\\global","\\long","\\\\globallong"],numArgs:0,allowedInText:!0,handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(fb[r.text])return"\\global"!==n&&"\\\\globallong"!==n||(r.text=fb[r.text]),nb(t.parseFunction(),"internal");throw new Gf("Invalid token after macro prefix",r)}}),uy({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),a=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new Gf("Expected a control sequence",r);for(var o,i=0,s=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),s[i].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Gf('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new Gf('Argument number "'+r.text+'" out of order');i++,s.push([])}else{if("EOF"===r.text)throw new Gf("Expected a macro definition");s[i].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return o&&l.unshift(o),"\\edef"!==n&&"\\xdef"!==n||(l=t.gullet.expandTokens(l)).reverse(),t.gullet.macros.set(a,{tokens:l,numArgs:i,delimiters:s},n===fb[n]),{type:"internal",mode:t.mode}}}),uy({type:"internal",names:["\\let","\\\\globallet"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=gb(t.gullet.popToken());return t.gullet.consumeSpaces(),vb(t,r,(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t),"\\\\globallet"===n),{type:"internal",mode:t.mode}}}),uy({type:"internal",names:["\\futurelet","\\\\globalfuture"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=gb(t.gullet.popToken()),a=t.gullet.popToken(),o=t.gullet.popToken();return vb(t,r,o,"\\\\globalfuture"===n),t.gullet.pushToken(o),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var yb=function(e,t,n){var r=qg(Ug.math[e]&&Ug.math[e].replace||e,t,n);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},bb=function(e,t,n,r){var a=n.havingBaseStyle(t),o=Gv(r.concat(a.sizingClasses(n)),[e],n),i=a.sizeMultiplier/n.sizeMultiplier;return o.height*=i,o.depth*=i,o.maxFontSize=a.sizeMultiplier,o},xb=function(e,t,n){var r=t.havingBaseStyle(n),a=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=Ng(a),e.height-=a,e.depth+=a},wb=function(e,t,n,r,a,o){var i=function(e,t,n,r){return Vv(e,"Size"+t+"-Regular",n,r)}(e,t,a,r),s=bb(Gv(["delimsizing","size"+t],[i],r),pg.TEXT,r,o);return n&&xb(s,r,pg.TEXT),s},Sb=function(e,t,n){return{type:"elem",elem:Gv(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[Gv([],[Vv(e,t,n)])])}},kb=function(e,t,n){var r=Vg["Size4-Regular"][e.charCodeAt(0)]?Vg["Size4-Regular"][e.charCodeAt(0)][4]:Vg["Size1-Regular"][e.charCodeAt(0)][4],a=new Fg("inner",function(e,t){switch(e){case"⎜":return vg("M291 0 H417 V"+t+" H291z");case"∣":return vg("M145 0 H188 V"+t+" H145z");case"∥":return vg("M145 0 H188 V"+t+" H145z")+vg("M367 0 H410 V"+t+" H367z");case"⎟":return vg("M457 0 H583 V"+t+" H457z");case"⎢":return vg("M319 0 H403 V"+t+" H319z");case"⎥":return vg("M263 0 H347 V"+t+" H263z");case"⎪":return vg("M384 0 H504 V"+t+" H384z");case"⏐":return vg("M312 0 H355 V"+t+" H312z");case"‖":return vg("M257 0 H300 V"+t+" H257z")+vg("M478 0 H521 V"+t+" H478z");default:return""}}(e,Math.round(1e3*t))),o=Wv([],[new Lg([a],{width:Ng(r),height:Ng(t),style:"width:"+Ng(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"})],n);return o.height=t,o.style.height=Ng(t),o.style.width=Ng(r),{type:"elem",elem:o}},Cb={type:"kern",size:-.008},Nb=/* @__PURE__ */new Set(["|","\\lvert","\\rvert","\\vert"]),Tb=/* @__PURE__ */new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Ab=function(e,t,n,r,a,o){var i,s,l,c,d="",u=0;i=l=c=e,s=null;var h="Size1-Regular";"\\uparrow"===e?l=c="⏐":"\\Uparrow"===e?l=c="‖":"\\downarrow"===e?i=l="⏐":"\\Downarrow"===e?i=l="‖":"\\updownarrow"===e?(i="\\uparrow",l="⏐",c="\\downarrow"):"\\Updownarrow"===e?(i="\\Uparrow",l="‖",c="\\Downarrow"):Nb.has(e)?(l="∣",d="vert",u=333):Tb.has(e)?(l="∥",d="doublevert",u=556):"["===e||"\\lbrack"===e?(i="⎡",l="⎢",c="⎣",h="Size4-Regular",d="lbrack",u=667):"]"===e||"\\rbrack"===e?(i="⎤",l="⎥",c="⎦",h="Size4-Regular",d="rbrack",u=667):"\\lfloor"===e||"⌊"===e?(l=i="⎢",c="⎣",h="Size4-Regular",d="lfloor",u=667):"\\lceil"===e||"⌈"===e?(i="⎡",l=c="⎢",h="Size4-Regular",d="lceil",u=667):"\\rfloor"===e||"⌋"===e?(l=i="⎥",c="⎦",h="Size4-Regular",d="rfloor",u=667):"\\rceil"===e||"⌉"===e?(i="⎤",l=c="⎥",h="Size4-Regular",d="rceil",u=667):"("===e||"\\lparen"===e?(i="⎛",l="⎜",c="⎝",h="Size4-Regular",d="lparen",u=875):")"===e||"\\rparen"===e?(i="⎞",l="⎟",c="⎠",h="Size4-Regular",d="rparen",u=875):"\\{"===e||"\\lbrace"===e?(i="⎧",s="⎨",c="⎩",l="⎪",h="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(i="⎫",s="⎬",c="⎭",l="⎪",h="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(i="⎧",c="⎩",l="⎪",h="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(i="⎫",c="⎭",l="⎪",h="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(i="⎧",c="⎭",l="⎪",h="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(i="⎫",c="⎩",l="⎪",h="Size4-Regular");var p=yb(i,h,a),m=p.height+p.depth,f=yb(l,h,a),g=f.height+f.depth,v=yb(c,h,a),y=v.height+v.depth,b=0,x=1;if(null!==s){var w=yb(s,h,a);b=w.height+w.depth,x=2}var S=m+y+b,k=S+Math.max(0,Math.ceil((t-S)/(x*g)))*x*g,C=r.fontMetrics().axisHeight;n&&(C*=r.sizeMultiplier);var N=k/2-C,T=[];if(d.length>0){var A=k-m-y,M=Math.round(1e3*k),I=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 v84 h347 v-84\nH403z 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\nM347 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\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-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\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-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\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 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\nc-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,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.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\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-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,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-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\nc-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\nc0,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\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(d,Math.round(1e3*A)),D=new Fg(d,I),E=Ng(u/1e3),R=Ng(M/1e3),_=Wv([],[new Lg([D],{width:E,height:R,viewBox:"0 0 "+u+" "+M})],r);_.height=M/1e3,_.style.width=E,_.style.height=R,T.push({type:"elem",elem:_})}else{if(T.push(Sb(c,h,a)),T.push(Cb),null===s){var z=k-m-y+.016;T.push(kb(l,z,r))}else{var P=(k-m-y-b)/2+.016;T.push(kb(l,P,r)),T.push(Cb),T.push(Sb(s,h,a)),T.push(Cb),T.push(kb(l,P,r))}T.push(Cb),T.push(Sb(i,h,a))}var O=r.havingBaseStyle(pg.TEXT);return bb(Gv(["delimsizing","mult"],[Zv({positionType:"bottom",positionData:N,children:T})],O),pg.TEXT,r,o)},Mb=.08,Ib=function(e,t,n,r,a){var o=function(e,t,n){t*=1e3;var r="";switch(e){case"sqrtMain":r=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.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\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,yg);break;case"sqrtSize1":r=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,yg);break;case"sqrtSize2":r=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,yg);break;case"sqrtSize3":r=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-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\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,yg);break;case"sqrtSize4":r=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-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\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,yg);break;case"sqrtTall":r=function(e,t,n){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(n-54-t-e)+"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\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,yg,n)}return r}(e,r,n),i=new Fg(e,o);return Wv(["hide-tail"],[new Lg([i],{width:"400em",height:Ng(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"})],a)},Db=/* @__PURE__ */new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),Eb=/* @__PURE__ */new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),Rb=/* @__PURE__ */new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),_b=[0,1.2,1.8,2.4,3],zb=function(e,t,n,r,a){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),Db.has(e)||Rb.has(e))return wb(e,t,!1,n,r,a);if(Eb.has(e))return Ab(e,_b[t],!1,n,r,a);throw new Gf("Illegal delimiter: '"+e+"'")},Pb=[{type:"small",style:pg.SCRIPTSCRIPT},{type:"small",style:pg.SCRIPT},{type:"small",style:pg.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ob=[{type:"small",style:pg.SCRIPTSCRIPT},{type:"small",style:pg.SCRIPT},{type:"small",style:pg.TEXT},{type:"stack"}],Lb=[{type:"small",style:pg.SCRIPTSCRIPT},{type:"small",style:pg.SCRIPT},{type:"small",style:pg.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Fb=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";var t=e.type;throw new Error("Add support for delim type '"+t+"' here.")},Bb=function(e,t,n,r){for(var a=Math.min(2,3-r.style.size);a<n.length;a++){var o=n[a];if("stack"===o.type)break;var i=yb(e,Fb(o),"math"),s=i.height+i.depth;if("small"===o.type)s*=r.havingBaseStyle(o.style).sizeMultiplier;if(s>t)return o}return n[n.length-1]},Vb=function(e,t,n,r,a,o){var i;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),i=Rb.has(e)?Pb:Db.has(e)?Lb:Ob;var s=Bb(e,t,i,r);return"small"===s.type?function(e,t,n,r,a,o){var i=bb(Vv(e,"Main-Regular",a,r),t,r,o);return n&&xb(i,r,t),i}(e,s.style,n,r,a,o):"large"===s.type?wb(e,s.size,n,r,a,o):Ab(e,t,n,r,a,o)},Hb=function(e,t,n,r,a,o){var i=r.fontMetrics().axisHeight*r.sizeMultiplier,s=5/r.fontMetrics().ptPerEm,l=Math.max(t-i,n+i);return Vb(e,Math.max(l/500*901,2*l-s),!0,r,a,o)},$b={"\\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}},qb=/* @__PURE__ */new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function jb(e){return"isMiddle"in e}function Ub(e,t){var n=ab(e);if(n&&qb.has(n.text))return n;throw new Gf(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Gb(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}uy({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],numArgs:1,argTypes:["primitive"],handler:(e,t)=>{var n=Ub(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:$b[e.funcName].size,mclass:$b[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>"."===e.delim?Gv([e.mclass]):zb(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(zy(e.delim,e.mode));var n=new Iy("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=Ng(_b[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),uy({type:"leftright-right",names:["\\right"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new Gf("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Ub(t[0],e).text,color:n}}}),uy({type:"leftright",names:["\\left"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=Ub(t[0],e),r=e.parser;++r.leftrightDepth;var a=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var o=nb(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:a,left:n.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,t)=>{Gb(e);for(var n,r,a=by(e.body,t,!0,["mopen","mclose"]),o=0,i=0,s=!1,l=0;l<a.length;l++){jb(a[l])?s=!0:(o=Math.max(a[l].height,o),i=Math.max(a[l].depth,i))}if(o*=t.sizeMultiplier,i*=t.sizeMultiplier,n="."===e.left?Cy(t,["mopen"]):Hb(e.left,o,i,t,e.mode,["mopen"]),a.unshift(n),s)for(var c=1;c<a.length;c++){var d=a[c];if(jb(d)){var u=d.isMiddle;a[c]=Hb(u.delim,o,i,u.options,e.mode,[])}}if("."===e.right)r=Cy(t,["mclose"]);else{var h=e.rightColor?t.withColor(e.rightColor):t;r=Hb(e.right,o,i,h,e.mode,["mclose"])}return a.push(r),Gv(["minner"],a,t)},mathmlBuilder:(e,t)=>{Gb(e);var n=By(e.body,t);if("."!==e.left){var r=new Iy("mo",[zy(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==e.right){var a=new Iy("mo",[zy(e.right,e.mode)]);a.setAttribute("fence","true"),e.rightColor&&a.setAttribute("mathcolor",e.rightColor),n.push(a)}return Py(n)}}),uy({type:"middle",names:["\\middle"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=Ub(t[0],e);if(!e.parser.leftrightDepth)throw new Gf("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return"."===e.delim?n=Cy(t,[]):(n=zb(e.delim,1,t,e.mode,[])).isMiddle={delim:e.delim,options:t},n},mathmlBuilder:(e,t)=>{var n="\\vert"===e.delim||"|"===e.delim?zy("|","text"):zy(e.delim,e.mode),r=new Iy("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});uy({type:"enclose",names:["\\colorbox"],numArgs:2,allowedInText:!0,argTypes:["color","hbox"],handler(e,t,n){var{parser:r,funcName:a}=e,o=nb(t[0],"color-token").color,i=t[1];return{type:"enclose",mode:r.mode,label:a,backgroundColor:o,body:i}},htmlBuilder:(e,t)=>{var n,r,a,o=Xv(Ny(e.body,t),t),i=e.label.slice(1),s=t.sizeMultiplier,l=eg(e.body);if("sout"===i)(n=Gv(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,r=-.5*t.fontMetrics().xHeight;else if("phase"===i){var c=Cg({number:.6,unit:"pt"},t),d=Cg({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var u=o.height+o.depth+c+d;o.style.paddingLeft=Ng(u/2+c);var h=Math.floor(1e3*u*s),p=function(e){return"M400000 "+e+" H0 L"+e/2+" 0 l65 45 L145 "+(e-80)+" H400000z"}(h);(n=Wv(["hide-tail"],[new Lg([new Fg("phase",p)],{width:"400em",height:Ng(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"})],t)).style.height=Ng(u),r=o.depth+c+d}else{var m,f;/cancel/.test(i)?l||o.classes.push("cancel-pad"):"angl"===i?o.classes.push("anglpad"):o.classes.push("boxpad");var g=0;/box/.test(i)?(g=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),f=m=t.fontMetrics().fboxsep+("colorbox"===i?0:g)):"angl"===i?(m=4*(g=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),f=Math.max(0,.25-o.depth)):f=m=l?.2:0,n=function(e,t,n,r,a){var o,i=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(o=Gv(["stretchy",t],[],a),"fbox"===t){var s=a.color&&a.getColor();s&&(o.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new Bg({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new Bg({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),o=Wv([],[new Lg(l,{width:"100%",height:Ng(i)})],a)}return o.height=i,o.style.height=Ng(i),o}(o,i,m,f,t),/fbox|boxed|fcolorbox/.test(i)?(n.style.borderStyle="solid",n.style.borderWidth=Ng(g)):"angl"===i&&.049!==g&&(n.style.borderTopWidth=Ng(g),n.style.borderRightWidth=Ng(g)),r=o.depth+f,e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor,e.borderColor&&(n.style.borderColor=e.borderColor))}if(e.backgroundColor)a=Zv({positionType:"individualShift",children:[{type:"elem",elem:n,shift:r},{type:"elem",elem:o,shift:0}]});else{var v=/cancel|phase/.test(i)?["svg-align"]:[];a=Zv({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:n,shift:r,wrapperClasses:v}]})}return/cancel/.test(i)&&(a.height=o.height,a.depth=o.depth),/cancel/.test(i)&&!l?Gv(["mord","cancel-lap"],[a],t):Gv(["mord"],[a],t)},mathmlBuilder:(e,t)=>{var n,r=new Iy(e.label.includes("colorbox")?"mpadded":"menclose",[Hy(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"),"\\fcolorbox"===e.label){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+Ng(a)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r}}),uy({type:"enclose",names:["\\fcolorbox"],numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"],handler(e,t,n){var{parser:r,funcName:a}=e,o=nb(t[0],"color-token").color,i=nb(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:r.mode,label:a,backgroundColor:i,borderColor:o,body:s}}}),uy({type:"enclose",names:["\\fbox"],numArgs:1,argTypes:["hbox"],allowedInText:!0,handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}}),uy({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e,a=t[0];return{type:"enclose",mode:n.mode,label:r,body:a}}}),uy({type:"enclose",names:["\\sout"],numArgs:1,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e;"math"===n.mode&&n.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var a=t[0];return{type:"enclose",mode:n.mode,label:r,body:a}}}),uy({type:"enclose",names:["\\angl"],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 Wb={};function Yb(e){for(var{type:t,names:n,props:r,handler:a,htmlBuilder:o,mathmlBuilder:i}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},l=0;l<n.length;++l)Wb[n[l]]=s;o&&(cy[t]=o),i&&(dy[t]=i)}var Kb={};function Xb(e,t){Kb[e]=t}var Zb=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?new e(t.loc.lexer,t.loc.start,n.loc.end):null:t&&t.loc}},Jb=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,Zb.range(this,t))}};function Qb(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for("\\relax"===n&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);"\\hline"===n||"\\hdashline"===n;)e.consume(),t.push("\\hdashline"===n),e.consumeSpaces(),n=e.fetch().text;return t}var ex=e=>{if(!e.parser.settings.displayMode)throw new Gf("{"+e.envName+"} can be used only in display mode.")},tx=/* @__PURE__ */new Set(["gather","gather*"]);function nx(e){if(!e.includes("ed"))return!e.includes("*")}function rx(e,t,n){var{hskipBeforeAndAfter:r,addJot:a,cols:o,arraystretch:i,colSeparationType:s,autoTag:l,singleRow:c,emptySingleRow:d,maxNumCols:u,leqno:h}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!i){var p=e.gullet.expandMacroAsText("\\arraystretch");if(null==p)i=1;else if(!(i=parseFloat(p))||i<0)throw new Gf("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var m=[],f=[m],g=[],v=[],y=null!=l?[]:void 0;function b(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function x(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new Jb("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(Boolean(l)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(b(),v.push(Qb(e));;){var w=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var S={type:"ordgroup",mode:e.mode,body:w};n&&(S={type:"styling",mode:e.mode,style:n,resetFont:!0,body:[S]}),m.push(S);var k=e.fetch().text;if("&"===k){if(u&&m.length===u){if(c||s)throw new Gf("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===k){x(),1===m.length&&"styling"===S.type&&1===S.body.length&&"ordgroup"===S.body[0].type&&0===S.body[0].body.length&&(f.length>1||!d)&&f.pop(),v.length<f.length+1&&v.push([]);break}if("\\\\"!==k)throw new Gf("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var C=void 0;" "!==e.gullet.future().text&&(C=e.parseSizeGroup(!0)),g.push(C?C.value:null),x(),v.push(Qb(e)),m=[],f.push(m),b()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:a,arraystretch:i,body:f,cols:o,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:v,colSeparationType:s,tags:y,leqno:h}}function ax(e){return"d"===e.slice(0,1)?"display":"text"}var ox=function(e,t){var n,r,a=e.body.length,o=e.hLinesBeforeRow,i=0,s=new Array(a),l=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),d=1/t.fontMetrics().ptPerEm,u=5*d;e.colSeparationType&&"small"===e.colSeparationType&&(u=t.havingStyle(pg.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var h="CD"===e.colSeparationType?Cg({number:3,unit:"ex"},t):12*d,p=3*d,m=e.arraystretch*h,f=.7*m,g=.3*m,v=0;function y(e){for(var t=0;t<e.length;++t)t>0&&(v+=.25),l.push({pos:v,isDashed:e[t]})}for(y(o[0]),n=0;n<e.body.length;++n){var b=e.body[n],x=f,w=g;i<b.length&&(i=b.length);var S={cells:new Array(b.length),height:0,depth:0,pos:0};for(r=0;r<b.length;++r){var k=Ny(b[r],t);w<k.depth&&(w=k.depth),x<k.height&&(x=k.height),S.cells[r]=k}var C=e.rowGaps[n],N=0;C&&(N=Cg(C,t))>0&&(w<(N+=g)&&(w=N),N=0),e.addJot&&n<e.body.length-1&&(w+=p),S.height=x,S.depth=w,v+=x,S.pos=v,v+=w+N,s[n]=S,y(o[n+1])}var T,A,M=v/2+t.fontMetrics().axisHeight,I=e.cols||[],D=[],E=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<a;++n){var R=s[n],_=R.pos-M,z=e.tags[n],P=void 0;(P=!0===z?Gv(["eqn-num"],[],t):Gv([],!1===z?[]:by(z,t,!0),t)).depth=R.depth,P.height=R.height,E.push({type:"elem",elem:P,shift:_})}for(r=0,A=0;r<i||A<I.length;++r,++A){for(var O,L=I[A],F=!0;"separator"===(null==(B=L)?void 0:B.type);){var B;if(F||((T=Gv(["arraycolsep"],[])).style.width=Ng(t.fontMetrics().doubleRuleSep),D.push(T)),"|"!==L.separator&&":"!==L.separator)throw new Gf("Invalid separator type: "+L.separator);var V="|"===L.separator?"solid":"dashed",H=Gv(["vertical-separator"],[],t);H.style.height=Ng(v),H.style.borderRightWidth=Ng(c),H.style.borderRightStyle=V,H.style.margin="0 "+Ng(-c/2);var $=v-M;$&&(H.style.verticalAlign=Ng(-$)),D.push(H),L=I[++A],F=!1}if(!(r>=i)){var q,j,U=void 0;if(r>0||e.hskipBeforeAndAfter)0!==(U=null!=(q=null==(j=L)?void 0:j.pregap)?q:u)&&((T=Gv(["arraycolsep"],[])).style.width=Ng(U),D.push(T));var G=[];for(n=0;n<a;++n){var W=s[n],Y=W.cells[r];if(Y){var K=W.pos-M;Y.depth=W.depth,Y.height=W.height,G.push({type:"elem",elem:Y,shift:K})}}var X,Z,J=Zv({positionType:"individualShift",children:G}),Q=Gv(["col-align-"+((null==(O=L)?void 0:O.align)||"c")],[J]);if(D.push(Q),r<i-1||e.hskipBeforeAndAfter)0!==(U=null!=(X=null==(Z=L)?void 0:Z.postgap)?X:u)&&((T=Gv(["arraycolsep"],[])).style.width=Ng(U),D.push(T))}}var ee=Gv(["mtable"],D);if(l.length>0){for(var te=Yv("hline",t,c),ne=Yv("hdashline",t,c),re=[{type:"elem",elem:ee,shift:0}];l.length>0;){var ae=l.pop(),oe=ae.pos-M;ae.isDashed?re.push({type:"elem",elem:ne,shift:oe}):re.push({type:"elem",elem:te,shift:oe})}ee=Zv({positionType:"individualShift",children:re})}if(0===E.length)return Gv(["mord"],[ee],t);var ie=Gv(["tag"],[Zv({positionType:"individualShift",children:E})],t);return Kv([ee,ie])},ix={c:"center ",l:"left ",r:"right "},sx=function(e,t){for(var n=[],r=new Iy("mtd",[],["mtr-glue"]),a=new Iy("mtd",[],["mml-eqn-num"]),o=0;o<e.body.length;o++){for(var i=e.body[o],s=[],l=0;l<i.length;l++)s.push(new Iy("mtd",[Hy(i[l],t)]));e.tags&&e.tags[o]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(a):s.push(a)),n.push(new Iy("mtr",s))}var c=new Iy("mtable",n),d=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",Ng(d));var u="",h="";if(e.cols&&e.cols.length>0){var p=e.cols,m="",f=!1,g=0,v=p.length;"separator"===p[0].type&&(u+="top ",g=1),"separator"===p[p.length-1].type&&(u+="bottom ",v-=1);for(var y=g;y<v;y++){var b=p[y];"align"===b.type?(h+=ix[b.align],f&&(m+="none "),f=!0):"separator"===b.type&&f&&(m+="|"===b.separator?"solid ":"dashed ",f=!1)}c.setAttribute("columnalign",h.trim()),/[sd]/.test(m)&&c.setAttribute("columnlines",m.trim())}if("align"===e.colSeparationType){for(var x=e.cols||[],w="",S=1;S<x.length;S++)w+=S%2?"0em ":"1em ";c.setAttribute("columnspacing",w.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var k="",C=e.hLinesBeforeRow;u+=C[0].length>0?"left ":"",u+=C[C.length-1].length>0?"right ":"";for(var N=1;N<C.length-1;N++)k+=0===C[N].length?"none ":C[N][0]?"dashed ":"solid ";return/[sd]/.test(k)&&c.setAttribute("rowlines",k.trim()),""!==u&&(c=new Iy("menclose",[c])).setAttribute("notation",u.trim()),e.arraystretch&&e.arraystretch<1&&(c=new Iy("mstyle",[c])).setAttribute("scriptlevel","1"),c},lx=function(e,t){e.envName.includes("ed")||ex(e);var n=[],r="split"===e.envName,a=rx(e.parser,{cols:n,addJot:!0,autoTag:r?void 0:nx(e.envName),emptySingleRow:!0,colSeparationType:e.envName.includes("at")?"alignat":"align",maxNumCols:r?2:void 0,leqno:e.parser.settings.leqno},"display"),o=0,i=0,s={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var l="",c=0;c<t[0].body.length;c++){l+=nb(t[0].body[c],"textord").text}o=Number(l),i=2*o}var d=!i;a.body.forEach(function(e){for(var t=1;t<e.length;t+=2)nb(nb(e[t],"styling").body[0],"ordgroup").body.unshift(s);if(d)i<e.length&&(i=e.length);else{var n=e.length/2;if(o<n)throw new Gf("Too many math in a row: expected "+o+", but got "+n,e[0])}});for(var u=0;u<i;++u){var h="r",p=0;u%2==1?h="l":u>0&&d&&(p=1),n[u]={type:"align",align:h,pregap:p,postgap:0}}return a.colSeparationType=d?"align":"alignat",a};Yb({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=(ab(t[0])?[t[0]]:nb(t[0],"ordgroup").body).map(function(e){var t=rb(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 Gf("Unknown column alignment: "+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return rx(e.parser,r,ax(e.envName))},htmlBuilder:ox,mathmlBuilder:sx}),Yb({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 a=e.parser;if(a.consumeSpaces(),"["===a.fetch().text){if(a.consume(),a.consumeSpaces(),n=a.fetch().text,!"lcr".includes(n))throw new Gf("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),r.cols=[{type:"align",align:n}]}}var o=rx(e.parser,r,ax(e.envName)),i=Math.max(0,...o.body.map(e=>e.length));return o.cols=new Array(i).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:ox,mathmlBuilder:sx}),Yb({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=rx(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:ox,mathmlBuilder:sx}),Yb({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=(ab(t[0])?[t[0]]:nb(t[0],"ordgroup").body).map(function(e){var t=rb(e).text;if("lc".includes(t))return{type:"align",align:t};throw new Gf("Unknown column alignment: "+t,e)});if(n.length>1)throw new Gf("{subarray} can contain only one column");var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},a=rx(e.parser,r,"script");if(a.body.length>0&&a.body[0].length>1)throw new Gf("{subarray} can contain only one column");return a},htmlBuilder:ox,mathmlBuilder:sx}),Yb({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=rx(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},ax(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ox,mathmlBuilder:sx}),Yb({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:lx,htmlBuilder:ox,mathmlBuilder:sx}),Yb({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){tx.has(e.envName)&&ex(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:nx(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return rx(e.parser,t,"display")},htmlBuilder:ox,mathmlBuilder:sx}),Yb({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:lx,htmlBuilder:ox,mathmlBuilder:sx}),Yb({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){ex(e);var t={autoTag:nx(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return rx(e.parser,t,"display")},htmlBuilder:ox,mathmlBuilder:sx}),Yb({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(ex(e),function(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){if("\\end"===n){0===t[t.length-1].length&&t.pop();break}throw new Gf("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var r=[],a=[r],o=0;o<t.length;o++){for(var i=t[o],s=ub(),l=0;l<i.length;l++)if(hb(i[l])){r.push(s);var c=rb(i[l+=1]).text,d=new Array(2);if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},"=|.".includes(c));else{if(!"<>AV".includes(c))throw new Gf('Expected one of "<>AV=|." after @',i[l]);for(var u=0;u<2;u++){for(var h=!0,p=l+1;p<i.length;p++){if(pb(i[p],c)){h=!1,l=p;break}if(hb(i[p]))throw new Gf("Missing a "+c+" character to complete a CD arrow.",i[p]);d[u].body.push(i[p])}if(h)throw new Gf("Missing a "+c+" character to complete a CD arrow.",i[l])}}var m={type:"styling",body:[mb(c,d,e)],mode:"math",style:"display",resetFont:!0};r.push(m),s=ub()}else s.body.push(i[l]);o%2==0?r.push(s):r.shift(),r=[],a.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}(e.parser)),htmlBuilder:ox,mathmlBuilder:sx}),Xb("\\nonumber","\\gdef\\@eqnsw{0}"),Xb("\\notag","\\nonumber"),uy({type:"text",names:["\\hline","\\hdashline"],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new Gf(e.funcName+" valid only within array environment")}});var cx=Wb;uy({type:"environment",names:["\\begin","\\end"],numArgs:1,argTypes:["text"],handler(e,t){var{parser:n,funcName:r}=e,a=t[0];if("ordgroup"!==a.type)throw new Gf("Invalid environment name",a);for(var o="",i=0;i<a.body.length;++i)o+=nb(a.body[i],"textord").text;if("\\begin"===r){if(!cx.hasOwnProperty(o))throw new Gf("No such environment: "+o,a);var s=cx[o],{args:l,optArgs:c}=n.parseArguments("\\begin{"+o+"}",s),d={mode:n.mode,envName:o,parser:n},u=s.handler(d,l,c);n.expect("\\end",!1);var h=n.nextToken,p=nb(n.parseFunction(),"environment");if(p.name!==o)throw new Gf("Mismatch: \\begin{"+o+"} matched by \\end{"+p.name+"}",h);return u}return{type:"environment",mode:n.mode,name:o,nameGroup:a}}});var dx={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};uy({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,a=py(t[0]),o=r in dx?dx[r]:r;return{type:"font",mode:n.mode,font:o.slice(1),body:a}},htmlBuilder:(e,t)=>{var n=e.font,r=t.withFont(n);return Ny(e.body,r)},mathmlBuilder:(e,t)=>{var n=e.font,r=t.withFont(n);return Hy(e.body,r)}}),uy({type:"mclass",names:["\\boldsymbol","\\bm"],numArgs:1,handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"mclass",mode:n.mode,mclass:cb(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:eg(r)}}}),uy({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],numArgs:0,allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:a}=e,{mode:o}=n,i=n.parseExpression(!0,a);return{type:"font",mode:o,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:i}}}});var ux=(e,t)=>t?{type:"styling",mode:e.mode,style:t,body:[e]}:e;uy({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var n,{parser:r,funcName:a}=e,o=t[0],i=t[1],s=null,l=null;switch(a){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,s="(",l=")";break;case"\\\\bracefrac":n=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":n=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var c="\\cfrac"===a,d=null;return c||a.startsWith("\\d")?d="display":a.startsWith("\\t")&&(d="text"),ux({type:"genfrac",mode:r.mode,numer:o,denom:i,continued:c,hasBarLine:n,leftDelim:s,rightDelim:l,barSize:null},d)},htmlBuilder:(e,t)=>{var n=t.style,r=n.fracNum(),a=n.fracDen(),o=t.havingStyle(r),i=Ny(e.numer,o,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;i.height=i.height<s?s:i.height,i.depth=i.depth<l?l:i.depth}o=t.havingStyle(a);var c,d,u,h,p,m,f,g,v,y,b=Ny(e.denom,o,t);if(e.hasBarLine?(e.barSize?(d=Cg(e.barSize,t),c=Yv("frac-line",t,d)):c=Yv("frac-line",t),d=c.height,u=c.height):(c=null,d=0,u=t.fontMetrics().defaultRuleThickness),n.size===pg.DISPLAY.size?(h=t.fontMetrics().num1,p=d>0?3*u:7*u,m=t.fontMetrics().denom1):(d>0?(h=t.fontMetrics().num2,p=u):(h=t.fontMetrics().num3,p=3*u),m=t.fontMetrics().denom2),c){var x=t.fontMetrics().axisHeight;h-i.depth-(x+.5*d)<p&&(h+=p-(h-i.depth-(x+.5*d))),x-.5*d-(b.height-m)<p&&(m+=p-(x-.5*d-(b.height-m))),f=Zv({positionType:"individualShift",children:[{type:"elem",elem:b,shift:m},{type:"elem",elem:c,shift:-(x-.5*d)},{type:"elem",elem:i,shift:-h}]})}else{var w=h-i.depth-(b.height-m);w<p&&(h+=.5*(p-w),m+=.5*(p-w)),f=Zv({positionType:"individualShift",children:[{type:"elem",elem:b,shift:m},{type:"elem",elem:i,shift:-h}]})}return o=t.havingStyle(n),f.height*=o.sizeMultiplier/t.sizeMultiplier,f.depth*=o.sizeMultiplier/t.sizeMultiplier,g=n.size===pg.DISPLAY.size?t.fontMetrics().delim1:n.size===pg.SCRIPTSCRIPT.size?t.havingStyle(pg.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,v=null==e.leftDelim?Cy(t,["mopen"]):Vb(e.leftDelim,g,!0,t.havingStyle(n),e.mode,["mopen"]),y=e.continued?Gv([]):null==e.rightDelim?Cy(t,["mclose"]):Vb(e.rightDelim,g,!0,t.havingStyle(n),e.mode,["mclose"]),Gv(["mord"].concat(o.sizingClasses(t)),[v,Gv(["mfrac"],[f]),y],t)},mathmlBuilder:(e,t)=>{var n=new Iy("mfrac",[Hy(e.numer,t),Hy(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=Cg(e.barSize,t);n.setAttribute("linethickness",Ng(r))}}else n.setAttribute("linethickness","0px");if(null!=e.leftDelim||null!=e.rightDelim){var a=[];if(null!=e.leftDelim){var o=new Iy("mo",[new Dy(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),a.push(o)}if(a.push(n),null!=e.rightDelim){var i=new Iy("mo",[new Dy(e.rightDelim.replace("\\",""))]);i.setAttribute("fence","true"),a.push(i)}return Py(a)}return n}}),uy({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],numArgs:0,infix:!0,handler(e){var t,{parser:n,funcName:r,token:a}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:a}}});var hx=["display","text","script","scriptscript"],px=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};uy({type:"genfrac",names:["\\genfrac"],numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"],handler(e,t){var n,{parser:r}=e,a=t[4],o=t[5],i=py(t[0]),s="atom"===i.type&&"open"===i.family?px(i.text):null,l=py(t[1]),c="atom"===l.type&&"close"===l.family?px(l.text):null,d=nb(t[2],"size"),u=null;n=!!d.isBlank||(u=d.value).number>0;var h=null,p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var m=nb(p.body[0],"textord");h=hx[Number(m.text)]}}else p=nb(p,"textord"),h=hx[Number(p.text)];return ux({type:"genfrac",mode:r.mode,numer:a,denom:o,continued:!1,hasBarLine:n,barSize:u,leftDelim:s,rightDelim:c},h)}}),uy({type:"infix",names:["\\above"],numArgs:1,argTypes:["size"],infix:!0,handler(e,t){var{parser:n,funcName:r,token:a}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:nb(t[0],"size").value,token:a}}}),uy({type:"genfrac",names:["\\\\abovefrac"],numArgs:3,argTypes:["math","size","math"],handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0],o=nb(t[1],"infix").size;if(!o)throw new Error("\\\\abovefrac expected size, but got "+String(o));var i=t[2],s=o.number>0;return{type:"genfrac",mode:n.mode,numer:a,denom:i,continued:!1,hasBarLine:s,barSize:o,leftDelim:null,rightDelim:null}}});var mx=(e,t)=>{var n,r,a=t.style;"supsub"===e.type?(n=e.sup?Ny(e.sup,t.havingStyle(a.sup()),t):Ny(e.sub,t.havingStyle(a.sub()),t),r=nb(e.base,"horizBrace")):r=nb(e,"horizBrace");var o,i=Ny(r.base,t.havingBaseStyle(pg.DISPLAY)),s=Qy(r,t);if(o=r.isOver?Zv({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:s,wrapperClasses:["svg-align"]}]}):Zv({positionType:"bottom",positionData:i.depth+.1+s.height,children:[{type:"elem",elem:s,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:i}]}),n){var l=Gv(["minner",r.isOver?"mover":"munder"],[o],t);o=r.isOver?Zv({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]}):Zv({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]})}return Gv(["minner",r.isOver?"mover":"munder"],[o],t)};uy({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],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:mx,mathmlBuilder:(e,t)=>{var n=Xy(e.label);return new Iy(e.isOver?"mover":"munder",[Hy(e.base,t),n])}}),uy({type:"href",names:["\\href"],numArgs:2,argTypes:["url","original"],allowedInText:!0,handler:(e,t)=>{var{parser:n}=e,r=t[1],a=nb(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:n.mode,href:a,body:my(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=by(e.body,t,!1);return function(e,t,n,r){var a=new _g(e,t,n,r);return Uv(a),a}(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Vy(e.body,t);return n instanceof Iy||(n=new Iy("mrow",[n])),n.setAttribute("href",e.href),n}}),uy({type:"href",names:["\\url"],numArgs:1,argTypes:["url"],allowedInText:!0,handler:(e,t)=>{var{parser:n}=e,r=nb(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var a=[],o=0;o<r.length;o++){var i=r[o];"~"===i&&(i="\\textasciitilde"),a.push({type:"textord",mode:"text",text:i})}var s={type:"text",mode:n.mode,font:"\\texttt",body:a};return{type:"href",mode:n.mode,href:r,body:my(s)}}}),uy({type:"hbox",names:["\\hbox"],numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0,handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:my(t[0])}},htmlBuilder:(e,t)=>Kv(by(e.body,t.withFont(""),!1)),mathmlBuilder:(e,t)=>new Iy("mrow",By(e.body,t.withFont("")))}),uy({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],numArgs:2,argTypes:["raw","original"],allowedInText:!0,handler:(e,t)=>{var n,{parser:r,funcName:a,token:o}=e,i=nb(t[0],"raw").string,s=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(a){case"\\htmlClass":l.class=i,n={command:"\\htmlClass",class:i};break;case"\\htmlId":l.id=i,n={command:"\\htmlId",id:i};break;case"\\htmlStyle":l.style=i,n={command:"\\htmlStyle",style:i};break;case"\\htmlData":for(var c=i.split(","),d=0;d<c.length;d++){var u=c[d],h=u.indexOf("=");if(h<0)throw new Gf("\\htmlData key/value '"+u+"' missing equals sign");var p=u.slice(0,h),m=u.slice(h+1);l["data-"+p.trim()]=m}n={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(n)?{type:"html",mode:r.mode,attributes:l,body:my(s)}:r.formatUnsupportedCmd(a)},htmlBuilder:(e,t)=>{var n=by(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var a=Gv(r,n,t);for(var o in e.attributes)"class"!==o&&e.attributes.hasOwnProperty(o)&&a.setAttribute(o,e.attributes[o]);return a},mathmlBuilder:(e,t)=>Vy(e.body,t)}),uy({type:"htmlmathml",names:["\\html@mathml"],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:my(t[0]),mathml:my(t[1])}},htmlBuilder:(e,t)=>Kv(by(e.html,t,!1)),mathmlBuilder:(e,t)=>Vy(e.mathml,t)});var fx=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 Gf("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!kg(n))throw new Gf("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};uy({type:"includegraphics",names:["\\includegraphics"],numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1,handler:(e,t,n)=>{var{parser:r}=e,a={number:0,unit:"em"},o={number:.9,unit:"em"},i={number:0,unit:"em"},s="";if(n[0])for(var l=nb(n[0],"raw").string.split(","),c=0;c<l.length;c++){var d=l[c].split("=");if(2===d.length){var u=d[1].trim();switch(d[0].trim()){case"alt":s=u;break;case"width":a=fx(u);break;case"height":o=fx(u);break;case"totalheight":i=fx(u);break;default:throw new Gf("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var h=nb(t[0],"url").url;return""===s&&(s=(s=(s=h).replace(/^.*[\\/]/,"")).substring(0,s.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:h})?{type:"includegraphics",mode:r.mode,alt:s,width:a,height:o,totalheight:i,src:h}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=Cg(e.height,t),r=0;e.totalheight.number>0&&(r=Cg(e.totalheight,t)-n);var a=0;e.width.number>0&&(a=Cg(e.width,t));var o={height:Ng(n+r)};a>0&&(o.width=Ng(a)),r>0&&(o.verticalAlign=Ng(-r));var i=new zg(e.src,e.alt,o);return i.height=n,i.depth=r,i},mathmlBuilder:(e,t)=>{var n=new Iy("mglyph",[]);n.setAttribute("alt",e.alt);var r=Cg(e.height,t),a=0;if(e.totalheight.number>0&&(a=Cg(e.totalheight,t)-r,n.setAttribute("valign",Ng(-a))),n.setAttribute("height",Ng(r+a)),e.width.number>0){var o=Cg(e.width,t);n.setAttribute("width",Ng(o))}return n.setAttribute("src",e.src),n}}),uy({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e,a=nb(t[0],"size");if(n.settings.strict){var o="m"===r[1],i="mu"===a.value.unit;o?(i||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+a.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):i&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:a.value}},htmlBuilder:(e,t)=>Jv(e.dimension,t),mathmlBuilder(e,t){var n=Cg(e.dimension,t);return new Ey(n)}}),uy({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:a}},htmlBuilder:(e,t)=>{var n;"clap"===e.alignment?(n=Gv([],[Ny(e.body,t)]),n=Gv(["inner"],[n],t)):n=Gv(["inner"],[Ny(e.body,t)]);var r=Gv(["fix"],[]),a=Gv([e.alignment],[n,r],t),o=Gv(["strut"]);return o.style.height=Ng(a.height+a.depth),a.depth&&(o.style.verticalAlign=Ng(-a.depth)),a.children.unshift(o),a=Gv(["thinbox"],[a],t),Gv(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>{var n=new Iy("mpadded",[Hy(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),uy({type:"styling",names:["\\(","$"],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var{funcName:n,parser:r}=e,a=r.mode;r.switchMode("math");var o="\\("===n?"\\)":"$",i=r.parseExpression(!1,o);return r.expect(o),r.switchMode(a),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:i}}}),uy({type:"text",names:["\\)","\\]"],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new Gf("Mismatched "+e.funcName)}});var gx=(e,t)=>{switch(t.style.size){case pg.DISPLAY.size:return e.display;case pg.TEXT.size:return e.text;case pg.SCRIPT.size:return e.script;case pg.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};uy({type:"mathchoice",names:["\\mathchoice"],numArgs:4,primitive:!0,handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:my(t[0]),text:my(t[1]),script:my(t[2]),scriptscript:my(t[3])}},htmlBuilder:(e,t)=>Kv(by(gx(e,t),t,!1)),mathmlBuilder:(e,t)=>Vy(gx(e,t),t)});var vx=(e,t,n,r,a,o,i)=>{e=Gv([],[e]);var s,l,c,d=n&&eg(n);if(t){var u=Ny(t,r.havingStyle(a.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var h=Ny(n,r.havingStyle(a.sub()),r);s={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-h.height)}}if(l&&s)c=Zv({positionType:"bottom",positionData:r.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+i,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:Ng(-o)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:Ng(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]});else if(s)c=Zv({positionType:"top",positionData:e.height-i,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:Ng(-o)},{type:"kern",size:s.kern},{type:"elem",elem:e}]});else{if(!l)return e;c=Zv({positionType:"bottom",positionData:e.depth+i,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:Ng(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}var p=[c];if(s&&0!==o&&!d){var m=Gv(["mspace"],[],r);m.style.marginRight=Ng(o),p.unshift(m)}return Gv(["mop","op-limits"],p,r)},yx=/* @__PURE__ */new Set(["\\smallint"]),bx=(e,t)=>{var n,r,a,o=!1;"supsub"===e.type?(n=e.sup,r=e.sub,a=nb(e.base,"op"),o=!0):a=nb(e,"op");var i,s,l=t.style,c=!1;if(l.size===pg.DISPLAY.size&&a.symbol&&!yx.has(a.name)&&(c=!0),a.symbol){var d=c?"Size2-Regular":"Size1-Regular",u="";if("\\oiint"!==a.name&&"\\oiiint"!==a.name||(u=a.name.slice(1),a.name="oiint"===u?"\\iint":"\\iiint"),s=(i=Vv(a.name,d,"math",t,["mop","op-symbol",c?"large-op":"small-op"])).italic,u.length>0){var h=ny(u+"Size"+(c?"2":"1"),t);i=Zv({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:h,shift:c?.08:0}]}),a.name="\\"+u,i.classes.unshift("mop"),i.italic=s}}else if(a.body){var p=by(a.body,t,!0);1===p.length&&p[0]instanceof Og?(i=p[0]).classes[0]="mop":i=Gv(["mop"],p,t)}else{for(var m=[],f=1;f<a.name.length;f++)m.push(Hv(a.name[f],a.mode,t));i=Gv(["mop"],m,t)}var g,v=0,y=0;(i instanceof Og||"\\oiint"===a.name||"\\oiiint"===a.name)&&!a.suppressBaseShift&&(v=(i.height-i.depth)/2-t.fontMetrics().axisHeight,y=null!=(g=i.italic)?g:0);return o?vx(i,n,r,t,l,y,v):(v&&(i.style.position="relative",i.style.top=Ng(v)),i)},xx={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};uy({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],numArgs:0,handler:(e,t)=>{var{parser:n,funcName:r}=e,a=r;return 1===a.length&&(a=xx[a]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:bx,mathmlBuilder:(e,t)=>{var n;if(e.symbol)n=new Iy("mo",[zy(e.name,e.mode)]),yx.has(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new Iy("mo",By(e.body,t));else{n=new Iy("mi",[new Dy(e.name.slice(1))]);var r=new Iy("mo",[zy("","text")]);n=e.parentIsSupSub?new Iy("mrow",[n,r]):My([n,r])}return n}}),uy({type:"op",names:["\\mathop"],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:my(r)}}});var wx={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};uy({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"],numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}}),uy({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}}),uy({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],numArgs:0,allowedInArgument:!0,handler(e){var{parser:t,funcName:n}=e,r=n;return 1===r.length&&(r=wx[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}}});var Sx=(e,t)=>{var n,r,a,o,i=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,a=nb(e.base,"operatorname"),i=!0):a=nb(e,"operatorname"),a.body.length>0){for(var s=(by(a.body.map(e=>{var t="text"in e?e.text:void 0;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),t.withFont("mathrm"),!0)),l=0;l<s.length;l++){var c=s[l];c instanceof Og&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=Gv(["mop"],s,t)}else o=Gv(["mop"],[],t);return i?vx(o,n,r,t,t.style,0,0):o};function kx(e,t,n){for(var r=by(e,t,!1),a=t.sizeMultiplier/n.sizeMultiplier,o=0;o<r.length;o++){var i=r[o].classes.indexOf("sizing");i<0?Array.prototype.push.apply(r[o].classes,t.sizingClasses(n)):r[o].classes[i+1]==="reset-size"+t.size&&(r[o].classes[i+1]="reset-size"+n.size),r[o].height*=a,r[o].depth*=a}return Kv(r)}uy({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],numArgs:1,handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0];return{type:"operatorname",mode:n.mode,body:my(a),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:Sx,mathmlBuilder:(e,t)=>{for(var n=By(e.body,t.withFont("mathrm")),r=!0,a=0;a<n.length;a++){var o=n[a];if(o instanceof Ey);else if(o instanceof Iy)switch(o.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":var i=o.children[0];1===o.children.length&&i instanceof Dy?i.text=i.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}if(r){var s=n.map(e=>e.toText()).join("");n=[new Dy(s)]}var l=new Iy("mi",n);l.setAttribute("mathvariant","normal");var c=new Iy("mo",[zy("","text")]);return e.parentIsSupSub?new Iy("mrow",[l,c]):My([l,c])}}),Xb("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),hy({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?Kv(by(e.body,t,!1)):Gv(["mord"],by(e.body,t,!0),t),mathmlBuilder:(e,t)=>Vy(e.body,t,!0)}),uy({type:"overline",names:["\\overline"],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=Ny(e.body,t.havingCrampedStyle()),r=Yv("overline-line",t),a=t.fontMetrics().defaultRuleThickness;return Gv(["mord","overline"],[Zv({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r},{type:"kern",size:a}]})],t)},mathmlBuilder(e,t){var n=new Iy("mo",[new Dy("‾")]);n.setAttribute("stretchy","true");var r=new Iy("mover",[Hy(e.body,t),n]);return r.setAttribute("accent","true"),r}}),uy({type:"phantom",names:["\\phantom"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:my(r)}},htmlBuilder:(e,t)=>Kv(by(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>{var n=By(e.body,t);return new Iy("mphantom",n)}}),Xb("\\hphantom","\\smash{\\phantom{#1}}"),uy({type:"vphantom",names:["\\vphantom"],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)=>Gv(["mord","rlap"],[Gv(["inner"],[Ny(e.body,t.withPhantom())]),Gv(["fix"],[])],t),mathmlBuilder:(e,t)=>{var n=By(my(e.body),t),r=new Iy("mphantom",n),a=new Iy("mpadded",[r]);return a.setAttribute("width","0px"),a}}),uy({type:"raisebox",names:["\\raisebox"],numArgs:2,argTypes:["size","hbox"],allowedInText:!0,handler(e,t){var{parser:n}=e,r=nb(t[0],"size").value,a=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:a}},htmlBuilder(e,t){var n=Ny(e.body,t);return Zv({positionType:"shift",positionData:-Cg(e.dy,t),children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new Iy("mpadded",[Hy(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),uy({type:"internal",names:["\\relax"],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),uy({type:"rule",names:["\\rule"],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"],handler(e,t,n){var{parser:r}=e,a=n[0],o=nb(t[0],"size"),i=nb(t[1],"size");return{type:"rule",mode:r.mode,shift:a&&nb(a,"size").value,width:o.value,height:i.value}},htmlBuilder(e,t){var n=Gv(["mord","rule"],[],t),r=Cg(e.width,t),a=Cg(e.height,t),o=e.shift?Cg(e.shift,t):0;return n.style.borderRightWidth=Ng(r),n.style.borderTopWidth=Ng(a),n.style.bottom=Ng(o),n.width=r,n.height=a+o,n.depth=-o,n.maxFontSize=1.125*a*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Cg(e.width,t),r=Cg(e.height,t),a=e.shift?Cg(e.shift,t):0,o=t.color&&t.getColor()||"black",i=new Iy("mspace");i.setAttribute("mathbackground",o),i.setAttribute("width",Ng(n)),i.setAttribute("height",Ng(r));var s=new Iy("mpadded",[i]);return a>=0?s.setAttribute("height",Ng(a)):(s.setAttribute("height",Ng(a)),s.setAttribute("depth",Ng(-a))),s.setAttribute("voffset",Ng(a)),s}});var Cx=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];uy({type:"sizing",names:Cx,numArgs:0,allowedInText:!0,handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:a}=e,o=a.parseExpression(!1,n);return{type:"sizing",mode:a.mode,size:Cx.indexOf(r)+1,body:o}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return kx(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=By(e.body,n),a=new Iy("mstyle",r);return a.setAttribute("mathsize",Ng(n.sizeMultiplier)),a}}),uy({type:"smash",names:["\\smash"],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var{parser:r}=e,a=!1,o=!1,i=n[0]&&nb(n[0],"ordgroup");if(i)for(var s,l=0;l<i.body.length;++l){if("t"===(s=rb(i.body[l]).text))a=!0;else{if("b"!==s){a=!1,o=!1;break}o=!0}}else a=!0,o=!0;var c=t[0];return{type:"smash",mode:r.mode,body:c,smashHeight:a,smashDepth:o}},htmlBuilder:(e,t)=>{var n=Gv([],[Ny(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 Gv(["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 Gv(["mord"],[Zv({positionType:"firstBaseline",children:[{type:"elem",elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new Iy("mpadded",[Hy(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),uy({type:"sqrt",names:["\\sqrt"],numArgs:1,numOptionalArgs:1,handler(e,t,n){var{parser:r}=e,a=n[0],o=t[0];return{type:"sqrt",mode:r.mode,body:o,index:a}},htmlBuilder(e,t){var n=Ny(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=Xv(n,t);var r=t.fontMetrics().defaultRuleThickness,a=r;t.style.id<pg.TEXT.id&&(a=t.fontMetrics().xHeight);var o=r+a/4,{span:i,ruleWidth:s,advanceWidth:l}=function(e,t){var n,r,a,o,i,s=t.havingBaseSizing(),l=Bb("\\surd",e*s.sizeMultiplier,Lb,s),c=s.sizeMultiplier,d=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);return"small"===l.type?(e<1?c=1:e<1.4&&(c=.7),a=(1+d)/c,(n=Ib("sqrtMain",r=(1+d+Mb)/c,o=1e3+1e3*d+80,d,t)).style.minWidth="0.853em",i=.833/c):"large"===l.type?(o=1080*_b[l.size],a=(_b[l.size]+d)/c,r=(_b[l.size]+d+Mb)/c,(n=Ib("sqrtSize"+l.size,r,o,d,t)).style.minWidth="1.02em",i=1/c):(r=e+d+Mb,a=e+d,o=Math.floor(1e3*e+d)+80,(n=Ib("sqrtTall",r,o,d,t)).style.minWidth="0.742em",i=1.056),n.height=a,n.style.height=Ng(r),{span:n,advanceWidth:i,ruleWidth:(t.fontMetrics().sqrtRuleThickness+d)*c}}(n.height+n.depth+o+r,t),c=i.height-s;c>n.height+n.depth+o&&(o=(o+c-n.height-n.depth)/2);var d=i.height-n.height-o-s;n.style.paddingLeft=Ng(l);var u=Zv({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+d)},{type:"elem",elem:i},{type:"kern",size:s}]});if(e.index){var h=t.havingStyle(pg.SCRIPTSCRIPT),p=Ny(e.index,h,t);return Gv(["mord","sqrt"],[Gv(["root"],[Zv({positionType:"shift",positionData:-.6*(u.height-u.depth),children:[{type:"elem",elem:p}]})]),u],t)}return Gv(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new Iy("mroot",[Hy(n,t),Hy(r,t)]):new Iy("msqrt",[Hy(n,t)])}});var Nx={display:pg.DISPLAY,text:pg.TEXT,script:pg.SCRIPT,scriptscript:pg.SCRIPTSCRIPT};uy({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var{breakOnTokenText:n,funcName:r,parser:a}=e,o=a.parseExpression(!0,n),i=r.slice(1,r.length-5);if(!function(e){return e in Nx}(i))throw new Error("Unknown style: "+i);return{type:"styling",mode:a.mode,style:i,body:o}},htmlBuilder(e,t){var n=Nx[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont("")),kx(e.body,r,t)},mathmlBuilder(e,t){var n=Nx[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(""));var a=By(e.body,r),o=new Iy("mstyle",a),i={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return o.setAttribute("scriptlevel",i[0]),o.setAttribute("displaystyle",i[1]),o}});hy({type:"supsub",htmlBuilder(e,t){var n=function(e,t){var n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===pg.DISPLAY.size||n.alwaysHandleSupSub)?bx:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===pg.DISPLAY.size||n.limits)?Sx:null:"accent"===n.type?eg(n.base)?ib:null:"horizBrace"===n.type&&!e.sub===n.isOver?mx:null:null}(e,t);if(n)return n(e,t);var r,a,o,{base:i,sup:s,sub:l}=e,c=Ny(i,t),d=t.fontMetrics(),u=0,h=0,p=i&&eg(i);if(s){var m=t.havingStyle(t.style.sup());r=Ny(s,m,t),p||(u=c.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(l){var f=t.havingStyle(t.style.sub());a=Ny(l,f,t),p||(h=c.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}o=t.style===pg.DISPLAY?d.sup1:t.style.cramped?d.sup3:d.sup2;var g,v=t.sizeMultiplier,y=Ng(.5/d.ptPerEm/v),b=null;if(a){var x,w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);if(c instanceof Og||w)b=Ng(-(null!=(x=c.italic)?x:0))}if(r&&a){u=Math.max(u,o,r.depth+.25*d.xHeight),h=Math.max(h,d.sub2);var S=4*d.defaultRuleThickness;if(u-r.depth-(a.height-h)<S){h=S-(u-r.depth)+a.height;var k=.8*d.xHeight-(u-r.depth);k>0&&(u+=k,h-=k)}g=Zv({positionType:"individualShift",children:[{type:"elem",elem:a,shift:h,marginRight:y,marginLeft:b},{type:"elem",elem:r,shift:-u,marginRight:y}]})}else if(a)h=Math.max(h,d.sub1,a.height-.8*d.xHeight),g=Zv({positionType:"shift",positionData:h,children:[{type:"elem",elem:a,marginLeft:b,marginRight:y}]});else{if(!r)throw new Error("supsub must have either sup or sub.");u=Math.max(u,o,r.depth+.25*d.xHeight),g=Zv({positionType:"shift",positionData:-u,children:[{type:"elem",elem:r,marginRight:y}]})}return Gv([ky(c,"right")||"mord"],[c,Gv(["msupsub"],[g])],t)},mathmlBuilder(e,t){var n,r=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,n=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,o=[Hy(e.base,t)];if(e.sub&&o.push(Hy(e.sub,t)),e.sup&&o.push(Hy(e.sup,t)),r)a=n?"mover":"munder";else if(e.sub)if(e.sup){var i=e.base;a=i&&"op"===i.type&&i.limits&&t.style===pg.DISPLAY||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(t.style===pg.DISPLAY||i.limits)?"munderover":"msubsup"}else{var s=e.base;a=s&&"op"===s.type&&s.limits&&(t.style===pg.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===pg.DISPLAY)?"munder":"msub"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===pg.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===pg.DISPLAY)?"mover":"msup"}return new Iy(a,o)}}),hy({type:"atom",htmlBuilder:(e,t)=>Hv(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var n=new Iy("mo",[zy(e.text,e.mode)]);if("bin"===e.family){var r=Ly(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});var Tx={mi:"italic",mn:"normal",mtext:"normal"};hy({type:"mathord",htmlBuilder:(e,t)=>$v(e,t),mathmlBuilder(e,t){var n=new Iy("mi",[zy(e.text,e.mode,t)]),r=Ly(e,t)||"italic";return r!==Tx[n.type]&&n.setAttribute("mathvariant",r),n}}),hy({type:"textord",htmlBuilder:(e,t)=>$v(e,t),mathmlBuilder(e,t){var n,r=zy(e.text,e.mode,t),a=Ly(e,t)||"normal";return n="text"===e.mode?new Iy("mtext",[r]):/[0-9]/.test(e.text)?new Iy("mn",[r]):"\\prime"===e.text?new Iy("mo",[r]):new Iy("mi",[r]),a!==Tx[n.type]&&n.setAttribute("mathvariant",a),n}});var Ax={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Mx={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};hy({type:"spacing",htmlBuilder(e,t){if(Mx.hasOwnProperty(e.text)){var n=Mx[e.text].className||"";if("text"===e.mode){var r=$v(e,t);return r.classes.push(n),r}return Gv(["mspace",n],[Hv(e.text,e.mode,t)],t)}if(Ax.hasOwnProperty(e.text))return Gv(["mspace",Ax[e.text]],[],t);throw new Gf('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!Mx.hasOwnProperty(e.text)){if(Ax.hasOwnProperty(e.text))return new Iy("mspace");throw new Gf('Unknown type of space "'+e.text+'"')}return new Iy("mtext",[new Dy(" ")])}});var Ix=()=>{var e=new Iy("mtd",[]);return e.setAttribute("width","50%"),e};hy({type:"tag",mathmlBuilder(e,t){var n=new Iy("mtable",[new Iy("mtr",[Ix(),new Iy("mtd",[Vy(e.body,t)]),Ix(),new Iy("mtd",[Vy(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var Dx={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ex={"\\textbf":"textbf","\\textmd":"textmd"},Rx={"\\textit":"textit","\\textup":"textup"},_x=(e,t)=>{var n=e.font;return n?Dx[n]?t.withTextFontFamily(Dx[n]):Ex[n]?t.withTextFontWeight(Ex[n]):"\\emph"===n?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Rx[n]):t};uy({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e,a=t[0];return{type:"text",mode:n.mode,body:my(a),font:r}},htmlBuilder(e,t){var n=_x(e,t);return Gv(["mord","text"],by(e.body,n,!0),n)},mathmlBuilder(e,t){var n=_x(e,t);return Vy(e.body,n)}}),uy({type:"underline",names:["\\underline"],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=Ny(e.body,t),r=Yv("underline-line",t),a=t.fontMetrics().defaultRuleThickness;return Gv(["mord","underline"],[Zv({positionType:"top",positionData:n.height,children:[{type:"kern",size:a},{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n}]})],t)},mathmlBuilder(e,t){var n=new Iy("mo",[new Dy("‾")]);n.setAttribute("stretchy","true");var r=new Iy("munder",[Hy(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),uy({type:"vcenter",names:["\\vcenter"],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=Ny(e.body,t),r=t.fontMetrics().axisHeight;return Zv({positionType:"shift",positionData:.5*(n.height-r-(n.depth+r)),children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new Iy("mpadded",[Hy(e.body,t)],["vcenter"]);return new Iy("mrow",[n])}}),uy({type:"verb",names:["\\verb"],numArgs:0,allowedInText:!0,handler(e,t,n){throw new Gf("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=zx(e),r=[],a=t.havingStyle(t.style.text()),o=0;o<n.length;o++){var i=n[o];"~"===i&&(i="\\textasciitilde"),r.push(Vv(i,"Typewriter-Regular",e.mode,a,["mord","texttt"]))}return Gv(["mord","text"].concat(a.sizingClasses(t)),jv(r),a)},mathmlBuilder(e,t){var n=new Dy(zx(e)),r=new Iy("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var zx=e=>e.body.replace(/ /g,e.star?"␣":" "),Px=ly,Ox="[ \r\n\t]",Lx="(\\\\[a-zA-Z@]+)"+Ox+"*",Fx="[̀-ͯ]",Bx=new RegExp(Fx+"+$"),Vx="("+Ox+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-]"+Fx+"*|[\ud800-\udbff][\udc00-\udfff]"+Fx+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Lx+"|\\\\[^\ud800-\udfff])",Hx=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(Vx,"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 Jb("EOF",new Zb(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new Gf("Unexpected character: '"+e[t]+"'",new Jb(e[t],new Zb(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[r]){var a=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===a?(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=a+1,this.lex()}return new Jb(r,new Zb(this,t,this.tokenRegex.lastIndex))}},$x=class{constructor(e,t){void 0===e&&(e={}),void 0===t&&(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(0===this.undefStack.length)throw new Gf("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)&&(null==e[t]?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(void 0===n&&(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 a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}},qx=Kb;Xb("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),Xb("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),Xb("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),Xb("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),Xb("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),Xb("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Xb("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var jx={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};Xb("\\char",function(e){var t,n=e.popToken(),r=0;if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])r=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new Gf("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(null==(r=jx[n.text])||r>=t)throw new Gf("Invalid base-"+t+" digit "+n.text);for(var a;null!=(a=jx[e.future().text])&&a<t;)r*=t,r+=a,e.popToken()}return"\\@char{"+r+"}"});var Ux=(e,t,n,r)=>{var a=e.consumeArg().tokens;if(1!==a.length)throw new Gf("\\newcommand's first argument must be a macro name");var o=a[0].text,i=e.isDefined(o);if(i&&!t)throw new Gf("\\newcommand{"+o+"} attempting to redefine "+o+"; use \\renewcommand");if(!i&&!n)throw new Gf("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var s=0;if(1===(a=e.consumeArg().tokens).length&&"["===a[0].text){for(var l="",c=e.expandNextToken();"]"!==c.text&&"EOF"!==c.text;)l+=c.text,c=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Gf("Invalid number of arguments: "+l);s=parseInt(l),a=e.consumeArg().tokens}return i&&r||e.macros.set(o,{tokens:a,numArgs:s}),""};Xb("\\newcommand",e=>Ux(e,!1,!0,!1)),Xb("\\renewcommand",e=>Ux(e,!0,!1,!1)),Xb("\\providecommand",e=>Ux(e,!0,!0,!0)),Xb("\\message",e=>{e.consumeArgs(1)[0];return""}),Xb("\\errmessage",e=>{e.consumeArgs(1)[0];return""}),Xb("\\show",e=>{e.popToken().text;return""}),Xb("\\bgroup","{"),Xb("\\egroup","}"),Xb("~","\\nobreakspace"),Xb("\\lq","`"),Xb("\\rq","'"),Xb("\\aa","\\r a"),Xb("\\AA","\\r A"),Xb("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Xb("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Xb("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Xb("ℬ","\\mathscr{B}"),Xb("ℰ","\\mathscr{E}"),Xb("ℱ","\\mathscr{F}"),Xb("ℋ","\\mathscr{H}"),Xb("ℐ","\\mathscr{I}"),Xb("ℒ","\\mathscr{L}"),Xb("ℳ","\\mathscr{M}"),Xb("ℛ","\\mathscr{R}"),Xb("ℭ","\\mathfrak{C}"),Xb("ℌ","\\mathfrak{H}"),Xb("ℨ","\\mathfrak{Z}"),Xb("\\Bbbk","\\Bbb{k}"),Xb("\\llap","\\mathllap{\\textrm{#1}}"),Xb("\\rlap","\\mathrlap{\\textrm{#1}}"),Xb("\\clap","\\mathclap{\\textrm{#1}}"),Xb("\\mathstrut","\\vphantom{(}"),Xb("\\underbar","\\underline{\\text{#1}}"),Xb("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),Xb("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Xb("\\ne","\\neq"),Xb("≠","\\neq"),Xb("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Xb("∉","\\notin"),Xb("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Xb("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Xb("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Xb("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Xb("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Xb("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Xb("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Xb("⟂","\\perp"),Xb("‼","\\mathclose{!\\mkern-0.8mu!}"),Xb("∌","\\notni"),Xb("⌜","\\ulcorner"),Xb("⌝","\\urcorner"),Xb("⌞","\\llcorner"),Xb("⌟","\\lrcorner"),Xb("©","\\copyright"),Xb("®","\\textregistered"),Xb("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Xb("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Xb("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Xb("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Xb("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Xb("⋮","\\vdots"),Xb("\\varGamma","\\mathit{\\Gamma}"),Xb("\\varDelta","\\mathit{\\Delta}"),Xb("\\varTheta","\\mathit{\\Theta}"),Xb("\\varLambda","\\mathit{\\Lambda}"),Xb("\\varXi","\\mathit{\\Xi}"),Xb("\\varPi","\\mathit{\\Pi}"),Xb("\\varSigma","\\mathit{\\Sigma}"),Xb("\\varUpsilon","\\mathit{\\Upsilon}"),Xb("\\varPhi","\\mathit{\\Phi}"),Xb("\\varPsi","\\mathit{\\Psi}"),Xb("\\varOmega","\\mathit{\\Omega}"),Xb("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Xb("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Xb("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Xb("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Xb("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Xb("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Xb("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Xb("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Gx={",":"\\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"},Wx=/* @__PURE__ */new Set(["bin","rel"]);Xb("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in Gx?t=Gx[n]:("\\not"===n.slice(0,4)||n in Ug.math&&Wx.has(Ug.math[n].group))&&(t="\\dotsb"),t});var Yx={")":!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};Xb("\\dotso",function(e){return e.future().text in Yx?"\\ldots\\,":"\\ldots"}),Xb("\\dotsc",function(e){var t=e.future().text;return t in Yx&&","!==t?"\\ldots\\,":"\\ldots"}),Xb("\\cdots",function(e){return e.future().text in Yx?"\\@cdots\\,":"\\@cdots"}),Xb("\\dotsb","\\cdots"),Xb("\\dotsm","\\cdots"),Xb("\\dotsi","\\!\\cdots"),Xb("\\dotsx","\\ldots\\,"),Xb("\\DOTSI","\\relax"),Xb("\\DOTSB","\\relax"),Xb("\\DOTSX","\\relax"),Xb("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Xb("\\,","\\tmspace+{3mu}{.1667em}"),Xb("\\thinspace","\\,"),Xb("\\>","\\mskip{4mu}"),Xb("\\:","\\tmspace+{4mu}{.2222em}"),Xb("\\medspace","\\:"),Xb("\\;","\\tmspace+{5mu}{.2777em}"),Xb("\\thickspace","\\;"),Xb("\\!","\\tmspace-{3mu}{.1667em}"),Xb("\\negthinspace","\\!"),Xb("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Xb("\\negthickspace","\\tmspace-{5mu}{.277em}"),Xb("\\enspace","\\kern.5em "),Xb("\\enskip","\\hskip.5em\\relax"),Xb("\\quad","\\hskip1em\\relax"),Xb("\\qquad","\\hskip2em\\relax"),Xb("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Xb("\\tag@paren","\\tag@literal{({#1})}"),Xb("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Gf("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Xb("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Xb("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Xb("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Xb("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Xb("\\newline","\\\\\\relax"),Xb("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Kx=Ng(Vg["Main-Regular"]["T".charCodeAt(0)][1]-.7*Vg["Main-Regular"]["A".charCodeAt(0)][1]);Xb("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Kx+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Xb("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Kx+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Xb("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Xb("\\@hspace","\\hskip #1\\relax"),Xb("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Xb("\\ordinarycolon",":"),Xb("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Xb("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Xb("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Xb("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Xb("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Xb("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Xb("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Xb("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Xb("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Xb("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Xb("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Xb("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Xb("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Xb("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Xb("∷","\\dblcolon"),Xb("∹","\\eqcolon"),Xb("≔","\\coloneqq"),Xb("≕","\\eqqcolon"),Xb("⩴","\\Coloneqq"),Xb("\\ratio","\\vcentcolon"),Xb("\\coloncolon","\\dblcolon"),Xb("\\colonequals","\\coloneqq"),Xb("\\coloncolonequals","\\Coloneqq"),Xb("\\equalscolon","\\eqqcolon"),Xb("\\equalscoloncolon","\\Eqqcolon"),Xb("\\colonminus","\\coloneq"),Xb("\\coloncolonminus","\\Coloneq"),Xb("\\minuscolon","\\eqcolon"),Xb("\\minuscoloncolon","\\Eqcolon"),Xb("\\coloncolonapprox","\\Colonapprox"),Xb("\\coloncolonsim","\\Colonsim"),Xb("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Xb("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Xb("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Xb("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Xb("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Xb("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Xb("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Xb("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Xb("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Xb("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Xb("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Xb("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Xb("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Xb("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Xb("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Xb("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Xb("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Xb("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Xb("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Xb("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Xb("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Xb("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Xb("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Xb("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Xb("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Xb("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Xb("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Xb("\\imath","\\html@mathml{\\@imath}{ı}"),Xb("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Xb("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Xb("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Xb("⟦","\\llbracket"),Xb("⟧","\\rrbracket"),Xb("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Xb("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Xb("⦃","\\lBrace"),Xb("⦄","\\rBrace"),Xb("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Xb("⦵","\\minuso"),Xb("\\darr","\\downarrow"),Xb("\\dArr","\\Downarrow"),Xb("\\Darr","\\Downarrow"),Xb("\\lang","\\langle"),Xb("\\rang","\\rangle"),Xb("\\uarr","\\uparrow"),Xb("\\uArr","\\Uparrow"),Xb("\\Uarr","\\Uparrow"),Xb("\\N","\\mathbb{N}"),Xb("\\R","\\mathbb{R}"),Xb("\\Z","\\mathbb{Z}"),Xb("\\alef","\\aleph"),Xb("\\alefsym","\\aleph"),Xb("\\Alpha","\\mathrm{A}"),Xb("\\Beta","\\mathrm{B}"),Xb("\\bull","\\bullet"),Xb("\\Chi","\\mathrm{X}"),Xb("\\clubs","\\clubsuit"),Xb("\\cnums","\\mathbb{C}"),Xb("\\Complex","\\mathbb{C}"),Xb("\\Dagger","\\ddagger"),Xb("\\diamonds","\\diamondsuit"),Xb("\\empty","\\emptyset"),Xb("\\Epsilon","\\mathrm{E}"),Xb("\\Eta","\\mathrm{H}"),Xb("\\exist","\\exists"),Xb("\\harr","\\leftrightarrow"),Xb("\\hArr","\\Leftrightarrow"),Xb("\\Harr","\\Leftrightarrow"),Xb("\\hearts","\\heartsuit"),Xb("\\image","\\Im"),Xb("\\infin","\\infty"),Xb("\\Iota","\\mathrm{I}"),Xb("\\isin","\\in"),Xb("\\Kappa","\\mathrm{K}"),Xb("\\larr","\\leftarrow"),Xb("\\lArr","\\Leftarrow"),Xb("\\Larr","\\Leftarrow"),Xb("\\lrarr","\\leftrightarrow"),Xb("\\lrArr","\\Leftrightarrow"),Xb("\\Lrarr","\\Leftrightarrow"),Xb("\\Mu","\\mathrm{M}"),Xb("\\natnums","\\mathbb{N}"),Xb("\\Nu","\\mathrm{N}"),Xb("\\Omicron","\\mathrm{O}"),Xb("\\plusmn","\\pm"),Xb("\\rarr","\\rightarrow"),Xb("\\rArr","\\Rightarrow"),Xb("\\Rarr","\\Rightarrow"),Xb("\\real","\\Re"),Xb("\\reals","\\mathbb{R}"),Xb("\\Reals","\\mathbb{R}"),Xb("\\Rho","\\mathrm{P}"),Xb("\\sdot","\\cdot"),Xb("\\sect","\\S"),Xb("\\spades","\\spadesuit"),Xb("\\sub","\\subset"),Xb("\\sube","\\subseteq"),Xb("\\supe","\\supseteq"),Xb("\\Tau","\\mathrm{T}"),Xb("\\thetasym","\\vartheta"),Xb("\\weierp","\\wp"),Xb("\\Zeta","\\mathrm{Z}"),Xb("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Xb("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Xb("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Xb("\\bra","\\mathinner{\\langle{#1}|}"),Xb("\\ket","\\mathinner{|{#1}\\rangle}"),Xb("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Xb("\\Bra","\\left\\langle#1\\right|"),Xb("\\Ket","\\left|#1\\right\\rangle");var Xx=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.consumeArg().tokens,i=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>n=>{e&&(n.macros.set("|",i),a.length&&n.macros.set("\\|",s));var o=t;return!t&&a.length&&"|"===n.future().text&&(n.popToken(),o=!0),{tokens:o?a:r,numArgs:0}};t.macros.set("|",l(!1)),a.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,d=t.expandTokens([...o,...c,...n]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};Xb("\\bra@ket",Xx(!1)),Xb("\\bra@set",Xx(!0)),Xb("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Xb("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Xb("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Xb("\\angln","{\\angl n}"),Xb("\\blue","\\textcolor{##6495ed}{#1}"),Xb("\\orange","\\textcolor{##ffa500}{#1}"),Xb("\\pink","\\textcolor{##ff00af}{#1}"),Xb("\\red","\\textcolor{##df0030}{#1}"),Xb("\\green","\\textcolor{##28ae7b}{#1}"),Xb("\\gray","\\textcolor{gray}{#1}"),Xb("\\purple","\\textcolor{##9d38bd}{#1}"),Xb("\\blueA","\\textcolor{##ccfaff}{#1}"),Xb("\\blueB","\\textcolor{##80f6ff}{#1}"),Xb("\\blueC","\\textcolor{##63d9ea}{#1}"),Xb("\\blueD","\\textcolor{##11accd}{#1}"),Xb("\\blueE","\\textcolor{##0c7f99}{#1}"),Xb("\\tealA","\\textcolor{##94fff5}{#1}"),Xb("\\tealB","\\textcolor{##26edd5}{#1}"),Xb("\\tealC","\\textcolor{##01d1c1}{#1}"),Xb("\\tealD","\\textcolor{##01a995}{#1}"),Xb("\\tealE","\\textcolor{##208170}{#1}"),Xb("\\greenA","\\textcolor{##b6ffb0}{#1}"),Xb("\\greenB","\\textcolor{##8af281}{#1}"),Xb("\\greenC","\\textcolor{##74cf70}{#1}"),Xb("\\greenD","\\textcolor{##1fab54}{#1}"),Xb("\\greenE","\\textcolor{##0d923f}{#1}"),Xb("\\goldA","\\textcolor{##ffd0a9}{#1}"),Xb("\\goldB","\\textcolor{##ffbb71}{#1}"),Xb("\\goldC","\\textcolor{##ff9c39}{#1}"),Xb("\\goldD","\\textcolor{##e07d10}{#1}"),Xb("\\goldE","\\textcolor{##a75a05}{#1}"),Xb("\\redA","\\textcolor{##fca9a9}{#1}"),Xb("\\redB","\\textcolor{##ff8482}{#1}"),Xb("\\redC","\\textcolor{##f9685d}{#1}"),Xb("\\redD","\\textcolor{##e84d39}{#1}"),Xb("\\redE","\\textcolor{##bc2612}{#1}"),Xb("\\maroonA","\\textcolor{##ffbde0}{#1}"),Xb("\\maroonB","\\textcolor{##ff92c6}{#1}"),Xb("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Xb("\\maroonD","\\textcolor{##ca337c}{#1}"),Xb("\\maroonE","\\textcolor{##9e034e}{#1}"),Xb("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Xb("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Xb("\\purpleC","\\textcolor{##aa87ff}{#1}"),Xb("\\purpleD","\\textcolor{##7854ab}{#1}"),Xb("\\purpleE","\\textcolor{##543b78}{#1}"),Xb("\\mintA","\\textcolor{##f5f9e8}{#1}"),Xb("\\mintB","\\textcolor{##edf2df}{#1}"),Xb("\\mintC","\\textcolor{##e0e5cc}{#1}"),Xb("\\grayA","\\textcolor{##f6f7f7}{#1}"),Xb("\\grayB","\\textcolor{##f0f1f2}{#1}"),Xb("\\grayC","\\textcolor{##e3e5e6}{#1}"),Xb("\\grayD","\\textcolor{##d6d8da}{#1}"),Xb("\\grayE","\\textcolor{##babec2}{#1}"),Xb("\\grayF","\\textcolor{##888d93}{#1}"),Xb("\\grayG","\\textcolor{##626569}{#1}"),Xb("\\grayH","\\textcolor{##3b3e40}{#1}"),Xb("\\grayI","\\textcolor{##21242c}{#1}"),Xb("\\kaBlue","\\textcolor{##314453}{#1}"),Xb("\\kaGreen","\\textcolor{##71B307}{#1}");var Zx={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Jx=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 $x(qx,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Hx(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&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 Jb("EOF",n.loc)),this.pushTokens(r),new Jb("",Zb.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,a=this.future(),o=0,i=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++o;else if("}"===r.text){if(-1===--o)throw new Gf("Extra }",r)}else if("EOF"===r.text)throw new Gf("Unexpected end of input in a macro argument, expected '"+(e&&n?e[i]:"}")+"'",r);if(e&&n)if((0===o||1===o&&"{"===e[i])&&r.text===e[i]){if(++i===e.length){t.splice(-i,i);break}}else i=0}while(0!==o||n);return"{"===a.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:a,end:r}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Gf("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;r<n.length;r++){var a=this.popToken();if(n[r]!==a.text)throw new Gf("Use of the macro doesn't match its definition",a)}}for(var o=[],i=0;i<e;i++)o.push(this.consumeArg(t&&t[i+1]).tokens);return o}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new Gf("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(null==r||e&&r.unexpandable){if(e&&null==r&&"\\"===n[0]&&!this.isDefined(n))throw new Gf("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var a=r.tokens,o=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs)for(var i=(a=a.slice()).length-1;i>=0;--i){var s=a[i];if("#"===s.text){if(0===i)throw new Gf("Incomplete placeholder at end of macro body",s);if("#"===(s=a[--i]).text)a.splice(i+1,1);else{if(!/^[1-9]$/.test(s.text))throw new Gf("Not a valid argument number",s);a.splice(i,2,...o[+s.text-1])}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Jb(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(!1===this.expandOnce(!0)){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!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(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var n=this.lexer.catcodes[e];if(null!=n&&13!==n)return}var r="function"==typeof t?t(this):t;if("string"==typeof r){var a=0;if(r.includes("#"))for(var o=r.replace(/##/g,"");o.includes("#"+(a+1));)++a;for(var i=new Hx(r,this.settings),s=[],l=i.lex();"EOF"!==l.text;)s.push(l),l=i.lex();return s.reverse(),{tokens:s,numArgs:a}}return r}isDefined(e){return this.macros.has(e)||Px.hasOwnProperty(e)||Ug.math.hasOwnProperty(e)||Ug.text.hasOwnProperty(e)||Zx.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Px.hasOwnProperty(e)&&!Px[e].primitive}},Qx=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ew=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),tw={"́":{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"}},nw={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},rw=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 Jx(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new Gf("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(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 Jb("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(e.endOfExpression.has(a.text))break;if(n&&a.text===n)break;if(t&&Px[a.text]&&Px[a.text].infix)break;var o=this.parseAtom(n);if(!o)break;"internal"!==o.type&&r.push(o)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,n=-1,r=0;r<e.length;r++){var a=e[r];if("infix"===a.type){if(-1!==n)throw new Gf("only one infix operator per group",a.token);n=r,t=a.replaceWith}}if(-1!==n&&t){var o,i,s=e.slice(0,n),l=e.slice(n+1);return o=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},i=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===t?this.callFunction(t,[o,e[n],i],[]):this.callFunction(t,[o,i],[])]}return e}handleSupSubscript(e){var t,n=this.fetch(),r=n.text;this.consume(),this.consumeSpaces();do{var a;t=this.parseGroup(e)}while("internal"===(null==(a=t)?void 0:a.type));if(!t)throw new Gf("Expected group after '"+r+"'",n);return t}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,n,r=this.parseGroup("atom",e);if("internal"===(null==r?void 0:r.type))return r;if("text"===this.mode)return r;for(;;){this.consumeSpaces();var a=this.fetch();if("\\limits"===a.text||"\\nolimits"===a.text){if(r&&"op"===r.type)r.limits="\\limits"===a.text,r.alwaysHandleSupSub=!0;else{if(!r||"operatorname"!==r.type)throw new Gf("Limit controls must follow a math operator",a);r.alwaysHandleSupSub&&(r.limits="\\limits"===a.text)}this.consume()}else if("^"===a.text){if(t)throw new Gf("Double superscript",a);t=this.handleSupSubscript("superscript")}else if("_"===a.text){if(n)throw new Gf("Double subscript",a);n=this.handleSupSubscript("subscript")}else if("'"===a.text){if(t)throw new Gf("Double superscript",a);var o={type:"textord",mode:this.mode,text:"\\prime"},i=[o];for(this.consume();"'"===this.fetch().text;)i.push(o),this.consume();"^"===this.fetch().text&&i.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:i}}else{if(!ew[a.text])break;var s=Qx.test(a.text),l=[];for(l.push(new Jb(ew[a.text])),this.consume();;){var c=this.fetch().text;if(!ew[c])break;if(Qx.test(c)!==s)break;l.unshift(new Jb(ew[c])),this.consume()}var d=this.subparse(l);s?n={type:"ordgroup",mode:"math",body:d}:t={type:"ordgroup",mode:"math",body:d}}}return t&&n?{type:"supsub",mode:this.mode,base:r,sup:t,sub:n}:t?{type:"supsub",mode:this.mode,base:r,sup:t}:n?{type:"supsub",mode:this.mode,base:r,sub:n}:r}parseFunction(e,t){var n=this.fetch(),r=n.text,a=Px[r];if(!a)return null;if(this.consume(),t&&"atom"!==t&&!a.allowedInArgument)throw new Gf("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);if("text"===this.mode&&!a.allowedInText)throw new Gf("Can't use function '"+r+"' in text mode",n);if("math"===this.mode&&!1===a.allowedInMath)throw new Gf("Can't use function '"+r+"' in math mode",n);var{args:o,optArgs:i}=this.parseArguments(r,a);return this.callFunction(r,o,i,n,e)}callFunction(e,t,n,r,a){var o={funcName:e,parser:this,token:r,breakOnTokenText:a},i=Px[e];if(i&&i.handler)return i.handler(o,t,n);throw new Gf("No function handler for "+e)}parseArguments(e,t){var n,r=null!=(n=t.numOptionalArgs)?n:0,a=t.numArgs+r;if(0===a)return{args:[],optArgs:[]};for(var o=[],i=[],s=0;s<a;s++){var l,c=null==(l=t.argTypes)?void 0:l[s],d=s<r;("primitive"in t&&t.primitive&&null==c||"sqrt"===t.type&&1===s&&null==i[0])&&(c="primitive");var u=this.parseGroupOfType("argument to '"+e+"'",c,d);if(d)i.push(u);else{if(null==u)throw new Gf("Null argument, please report this as a bug");o.push(u)}}return{args:o,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 null!=r?{type:"styling",mode:r.mode,body:[r],style:"text",resetFont:!0}:null;case"raw":var a=this.parseStringGroup(n);return null!=a?{type:"raw",mode:"text",string:a.text}:null;case"primitive":if(n)throw new Gf("A primitive argument cannot be optional");var o=this.parseGroup(e);if(null==o)throw new Gf("Expected group as "+e,this.fetch());return o;case"original":case void 0:return this.parseArgumentGroup(n);default:throw new Gf("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e){var t=this.gullet.scanArgument(e);if(null==t)return null;for(var n,r="";"EOF"!==(n=this.fetch()).text;)r+=n.text,this.consume();return this.consume(),t.text=r,t}parseRegexGroup(e,t){for(var n,r=this.fetch(),a=r,o="";"EOF"!==(n=this.fetch()).text&&e.test(o+n.text);)o+=(a=n).text,this.consume();if(""===o)throw new Gf("Invalid "+t+": '"+r.text+"'",r);return r.range(a,o)}parseColorGroup(e){var t=this.parseStringGroup(e);if(null==t)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 Gf("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.parseStringGroup(e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new Gf("Invalid size: '"+t.text+"'",t);var a={number:+(r[1]+r[2]),unit:r[3]};if(!kg(a))throw new Gf("Invalid unit: '"+a.unit+"'",t);return{type:"size",mode:this.mode,value:a,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup(e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)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(null==n)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:n.loc,body:a};return t&&this.switchMode(r),o}parseGroup(e,t){var n,r=this.fetch(),a=r.text;if("{"===a||"\\begingroup"===a){this.consume();var o="{"===a?"}":"\\endgroup";this.gullet.beginGroup();var i=this.parseExpression(!1,o),s=this.fetch();this.expect(o),this.gullet.endGroup(),n={type:"ordgroup",mode:this.mode,loc:Zb.range(r,s),body:i,semisimple:"\\begingroup"===a||void 0}}else if(null==(n=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===a[0]&&!Zx.hasOwnProperty(a)){if(this.settings.throwOnError)throw new Gf("Undefined control sequence: "+a,r);n=this.formatUnsupportedCmd(a),this.consume()}return n}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if("textord"===r.type){var a=r.text,o=e[n+1];if(o&&"textord"===o.type){if("-"===a&&"-"===o.text){var i=e[n+2];n+1<t&&i&&"textord"===i.type&&"-"===i.text?(e.splice(n,3,{type:"textord",mode:"text",loc:Zb.range(r,i),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:Zb.range(r,o),text:"--"}),t-=1)}"'"!==a&&"`"!==a||o.text!==a||(e.splice(n,2,{type:"textord",mode:"text",loc:Zb.range(r,o),text:a+a}),t-=1)}}}}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 Gf("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:r}}nw.hasOwnProperty(t[0])&&!Ug[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=nw[t[0]]+t.slice(1));var a,o=Bx.exec(t);if(o&&("i"===(t=t.substring(0,o.index))?t="ı":"j"===t&&(t="ȷ")),Ug[this.mode][t]){this.settings.strict&&"math"===this.mode&&kv.includes(t)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var i,s=Ug[this.mode][t].group,l=Zb.range(e);i=function(e){return e in eb}(s)?{type:"atom",mode:this.mode,family:s,loc:l,text:t}:{type:s,mode:this.mode,loc:l,text:t},a=i}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(gg(t.charCodeAt(0))?"math"===this.mode&&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:Zb.range(e),text:t}}if(this.consume(),o)for(var c=0;c<o[0].length;c++){var d=o[0][c];if(!tw[d])throw new Gf("Unknown accent ' "+d+"'",e);var u=tw[d][this.mode]||tw[d].text;if(!u)throw new Gf("Accent "+d+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:Zb.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}};rw.endOfExpression=/* @__PURE__ */new Set(["}","\\endgroup","\\end","\\right","&"]);var aw=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new rw(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 Gf("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new Jb("\\df@tag")])}]}return r},ow=function(e,t,n){t.textContent="";var r=sw(e,n).toNode();t.appendChild(r)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&(ow=function(){throw new Gf("KaTeX doesn't work in quirks mode.")});var iw=function(e,t,n){if(n.throwOnError||!(e instanceof Gf))throw e;var r=Gv(["katex-error"],[new Og(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},sw=function(e,t){var n=new ag(t);try{return function(e,t,n){var r,a=Wy(n);return"mathml"===n.output?$y(e,t,a,n.displayMode,!0):(r="html"===n.output?Gv(["katex"],[Ay(e,a)]):Gv(["katex"],[$y(e,t,a,n.displayMode,!1),Ay(e,a)]),Yy(r,n))}(aw(e,n),e,n)}catch(r){return iw(r,e,n)}},lw={version:"0.17.0",render:ow,renderToString:function(e,t){return sw(e,t).toMarkup()},ParseError:Gf,SETTINGS_SCHEMA:tg,__parse:function(e,t){return aw(e,new ag(t))},__renderToDomTree:sw,__renderToHTMLTree:function(e,t){var n=new ag(t);try{return function(e,t,n){return Yy(Gv(["katex"],[Ay(e,Wy(n))]),n)}(aw(e,n),0,n)}catch(r){return iw(r,e,n)}},__setFontMetrics:function(e,t){Vg[e]=t},__defineSymbol:Gg,__defineFunction:uy,__defineMacro:Xb,__domTree:{Span:Rg,Anchor:_g,SymbolNode:Og,SvgNode:Lg,PathNode:Fg,LineNode:Bg}};lw.__defineMacro("\\ce",function(e){return cw(e.consumeArgs(1)[0],"ce")}),lw.__defineMacro("\\pu",function(e){return cw(e.consumeArgs(1)[0],"pu")}),lw.__defineMacro("\\tripledash","{\\vphantom{-}\\raisebox{2.56mu}{$\\mkern2mu\\tiny\\text{-}\\mkern1mu\\text{-}\\mkern1mu\\text{-}\\mkern2mu$}}");var cw=function(e,t){for(var n="",r=e.length&&e[e.length-1].loc.start,a=e.length-1;a>=0;a--)e[a].loc.start>r&&(n+=" ",r=e[a].loc.start),n+=e[a].text,r+=e[a].text.length;return uw.go(dw.go(n,t))},dw={go:function(e,t){if(!e)return[];void 0===t&&(t="ce");var n,r="0",a={};a.parenthesisLevel=0,e=(e=(e=e.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var o=10,i=[];;){n!==e?(o=10,n=e):o--;var s=dw.stateMachines[t],l=s.transitions[r]||s.transitions["*"];e:for(var c=0;c<l.length;c++){var d=dw.patterns.match_(l[c].pattern,e);if(d){for(var u=l[c].task,h=0;h<u.action_.length;h++){var p;if(s.actions[u.action_[h].type_])p=s.actions[u.action_[h].type_](a,d.match_,u.action_[h].option);else{if(!dw.actions[u.action_[h].type_])throw["MhchemBugA","mhchem bug A. Please report. ("+u.action_[h].type_+")"];p=dw.actions[u.action_[h].type_](a,d.match_,u.action_[h].option)}dw.concatArray(i,p)}if(r=u.nextState||r,!(e.length>0))return i;if(u.revisit||(e=d.remainder),!u.toContinue)break e}}if(o<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Array.isArray(t))for(var n=0;n<t.length;n++)e.push(t[n]);else e.push(t)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return t&&t[0]?{match_:t.splice(1),remainder:e.substr(t[0].length)}:null},"(-)(9)^(-9)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return t&&t[0]?{match_:t.splice(1),remainder:e.substr(t[0].length)}:null},"state of aggregation $":function(e){var t=dw.patterns.findObserveGroups(e,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(t&&t.remainder.match(/^($|[\s,;\)\]\}])/))return t;var n=e.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return n?{match_:n[0],remainder:e.substr(n[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(e){return dw.patterns.findObserveGroups(e,"^{","","","}")},"^($...$)":function(e){return dw.patterns.findObserveGroups(e,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(e){return dw.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(e){return dw.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(e){return dw.patterns.findObserveGroups(e,"_{","","","}")},"_($...$)":function(e){return dw.patterns.findObserveGroups(e,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(e){return dw.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(e){return dw.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(e){return dw.patterns.findObserveGroups(e,"","{","}","")},"{(...)}":function(e){return dw.patterns.findObserveGroups(e,"{","","","}")},"$...$":function(e){return dw.patterns.findObserveGroups(e,"","$","$","")},"${(...)}$":function(e){return dw.patterns.findObserveGroups(e,"${","","","}$")},"$(...)$":function(e){return dw.patterns.findObserveGroups(e,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(e){return dw.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return dw.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return dw.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return dw.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(e){return dw.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return dw.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return dw.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return dw.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return dw.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return dw.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return dw.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return dw.patterns.findObserveGroups(e,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(e){var t=e.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/);if(t)return{match_:t[0],remainder:e.substr(t[0].length)};var n=dw.patterns.findObserveGroups(e,"","$","$","");return n&&(t=n.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this.amount(e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,n,r,a,o,i,s,l,c){var d=function(e,t){if("string"==typeof t)return 0!==e.indexOf(t)?null:t;var n=e.match(t);return n?n[0]:null},u=d(e,t);if(null===u)return null;if(e=e.substr(u.length),null===(u=d(e,n)))return null;var h=function(e,t,n){for(var r=0;t<e.length;){var a=e.charAt(t),o=d(e.substr(t),n);if(null!==o&&0===r)return{endMatchBegin:t,endMatchEnd:t+o.length};if("{"===a)r++;else if("}"===a){if(0===r)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];r--}t++}return null}(e,u.length,r||a);if(null===h)return null;var p=e.substring(0,r?h.endMatchEnd:h.endMatchBegin);if(o||i){var m=this.findObserveGroups(e.substr(h.endMatchEnd),o,i,s,l);if(null===m)return null;var f=[p,m.match_];return{match_:c?f.join(""):f,remainder:m.remainder}}return{match_:p,remainder:e.substr(h.endMatchEnd)}},match_:function(e,t){var n=dw.patterns.patterns[e];if(void 0===n)throw["MhchemBugP","mhchem bug P. Please report. ("+e+")"];if("function"==typeof n)return dw.patterns.patterns[e](t);var r=t.match(n);return r?{match_:r[2]?[r[1],r[2]]:r[1]?r[1]:r[0],remainder:t.substr(r[0].length)}:null}},actions:{"a=":function(e,t){e.a=(e.a||"")+t},"b=":function(e,t){e.b=(e.b||"")+t},"p=":function(e,t){e.p=(e.p||"")+t},"o=":function(e,t){e.o=(e.o||"")+t},"q=":function(e,t){e.q=(e.q||"")+t},"d=":function(e,t){e.d=(e.d||"")+t},"rm=":function(e,t){e.rm=(e.rm||"")+t},"text=":function(e,t){e.text_=(e.text_||"")+t},insert:function(e,t,n){return{type_:n}},"insert+p1":function(e,t,n){return{type_:n,p1:t}},"insert+p1+p2":function(e,t,n){return{type_:n,p1:t[0],p2:t[1]}},copy:function(e,t){return t},rm:function(e,t){return{type_:"rm",p1:t||""}},text:function(e,t){return dw.go(t,"text")},"{text}":function(e,t){var n=["{"];return dw.concatArray(n,dw.go(t,"text")),n.push("}"),n},"tex-math":function(e,t){return dw.go(t,"tex-math")},"tex-math tight":function(e,t){return dw.go(t,"tex-math tight")},bond:function(e,t,n){return{type_:"bond",kind_:n||t}},"color0-output":function(e,t){return{type_:"color0",color:t[0]}},ce:function(e,t){return dw.go(t)},"1/2":function(e,t){var n=[];t.match(/^[+\-]/)&&(n.push(t.substr(0,1)),t=t.substr(1));var r=t.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return r[1]=r[1].replace(/\$/g,""),n.push({type_:"frac",p1:r[1],p2:r[2]}),r[3]&&(r[3]=r[3].replace(/\$/g,""),n.push({type_:"tex-math",p1:r[3]})),n},"9,9":function(e,t){return dw.go(t,"9,9")}},createTransitions:function(e){var t,n,r,a,o={};for(t in e)for(n in e[t])for(r=n.split("|"),e[t][n].stateArray=r,a=0;a<r.length;a++)o[r[a]]=[];for(t in e)for(n in e[t])for(r=e[t][n].stateArray||[],a=0;a<r.length;a++){var i=e[t][n];if(i.action_){i.action_=[].concat(i.action_);for(var s=0;s<i.action_.length;s++)"string"==typeof i.action_[s]&&(i.action_[s]={type_:i.action_[s]})}else i.action_=[];for(var l=t.split("|"),c=0;c<l.length;c++)if("*"===r[a])for(var d in o)o[d].push({pattern:l[c],task:i});else o[r[a]].push({pattern:l[c],task:i})}return o},stateMachines:{}};dw.stateMachines={ce:{transitions:dw.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(e,t){var n;if((e.d||"").match(/^[0-9]+$/)){var r=e.d;e.d=void 0,n=this.output(e),e.b=r}else n=this.output(e);return dw.actions["o="](e,t),n},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e.beginsWithBond){var n=[];return dw.concatArray(n,this.output(e)),dw.concatArray(n,dw.actions.bond(e,t,"-")),n}e.d=t},"- after o/d":function(e,t,n){var r=dw.patterns.match_("orbital",e.o||""),a=dw.patterns.match_("one lowercase greek letter $",e.o||""),o=dw.patterns.match_("one lowercase latin letter $",e.o||""),i=dw.patterns.match_("$one lowercase latin letter$ $",e.o||""),s="-"===t&&(r&&""===r.remainder||a||o||i);!s||e.a||e.b||e.p||e.d||e.q||r||!o||(e.o="$"+e.o+"$");var l=[];return s?(dw.concatArray(l,this.output(e)),l.push({type_:"hyphen"})):(r=dw.patterns.match_("digits",e.d||""),n&&r&&""===r.remainder?(dw.concatArray(l,dw.actions["d="](e,t)),dw.concatArray(l,this.output(e))):(dw.concatArray(l,this.output(e)),dw.concatArray(l,dw.actions.bond(e,t,"-")))),l},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e.beginsWithBond=!0},"beginsWithBond=false":function(e){e.beginsWithBond=!1},"parenthesisLevel++":function(e){e.parenthesisLevel++},"parenthesisLevel--":function(e){e.parenthesisLevel--},"state of aggregation":function(e,t){return{type_:"state of aggregation",p1:dw.go(t,"o")}},comma:function(e,t){var n=t.replace(/\s*$/,"");return n!==t&&0===e.parenthesisLevel?{type_:"comma enumeration L",p1:n}:{type_:"comma enumeration M",p1:n}},output:function(e,t,n){var r,a,o;e.r?(a="M"===e.rdt?dw.go(e.rd,"tex-math"):"T"===e.rdt?[{type_:"text",p1:e.rd||""}]:dw.go(e.rd),o="M"===e.rqt?dw.go(e.rq,"tex-math"):"T"===e.rqt?[{type_:"text",p1:e.rq||""}]:dw.go(e.rq),r={type_:"arrow",r:e.r,rd:a,rq:o}):(r=[],(e.a||e.b||e.p||e.o||e.q||e.d||n)&&(e.sb&&r.push({type_:"entitySkip"}),e.o||e.q||e.d||e.b||e.p||2===n?e.o||e.q||e.d||!e.b&&!e.p?e.o&&"kv"===e.dType&&dw.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&"kv"===e.dType&&!e.q&&(e.dType=void 0):(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):(e.o=e.a,e.a=void 0),r.push({type_:"chemfive",a:dw.go(e.a,"a"),b:dw.go(e.b,"bd"),p:dw.go(e.p,"pq"),o:dw.go(e.o,"o"),q:dw.go(e.q,"pq"),d:dw.go(e.d,"oxidation"===e.dType?"oxidation":"bd"),dType:e.dType})));for(var i in e)"parenthesisLevel"!==i&&"beginsWithBond"!==i&&delete e[i];return r},"oxidation-output":function(e,t){var n=["{"];return dw.concatArray(n,dw.go(t,"oxidation")),n.push("}"),n},"frac-output":function(e,t){return{type_:"frac-ce",p1:dw.go(t[0]),p2:dw.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:dw.go(t[0]),p2:dw.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:dw.go(t[0]),p2:dw.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:dw.go(t[0]),p2:dw.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:dw.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,n){return{type_:"operator",kind_:n||t}}}},a:{transitions:dw.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:dw.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:dw.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var n in e)delete e[n];return t}}}},pq:{transitions:dw.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(e,t){return{type_:"state of aggregation subscript",p1:dw.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:dw.go(t[1],"pq")}}}},bd:{transitions:dw.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(e,t){return{type_:"color",color1:t[0],color2:dw.go(t[1],"bd")}}}},oxidation:{transitions:dw.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(e,t){return{type_:"roman numeral",p1:t||""}}}},"tex-math":{transitions:dw.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var n in e)delete e[n];return t}}}},"tex-math tight":{transitions:dw.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(e,t){e.o=(e.o||"")+"{"+t+"}"},output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var n in e)delete e[n];return t}}}},"9,9":{transitions:dw.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:dw.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(e,t){var n=[];return"+-"===t[0]||"+/-"===t[0]?n.push("\\pm "):t[0]&&n.push(t[0]),t[1]&&(dw.concatArray(n,dw.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?dw.concatArray(n,dw.go(t[2],"pu-9,9")):n.push(t[2])),t[3]=t[4]||t[3],t[3]&&(t[3]=t[3].trim(),"e"===t[3]||"*"===t[3].substr(0,1)?n.push({type_:"cdot"}):n.push({type_:"times"}))),t[3]&&n.push("10^{"+t[5]+"}"),n},"number^":function(e,t){var n=[];return"+-"===t[0]||"+/-"===t[0]?n.push("\\pm "):t[0]&&n.push(t[0]),dw.concatArray(n,dw.go(t[1],"pu-9,9")),n.push("^{"+t[2]+"}"),n},operator:function(e,t,n){return{type_:"operator",kind_:n||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,n=dw.patterns.match_("{(...)}",e.d||"");n&&""===n.remainder&&(e.d=n.match_);var r=dw.patterns.match_("{(...)}",e.q||"");if(r&&""===r.remainder&&(e.q=r.match_),e.d&&(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.d=e.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var a={d:dw.go(e.d,"pu"),q:dw.go(e.q,"pu")};"//"===e.o?t={type_:"pu-frac",p1:a.d,p2:a.q}:(t=a.d,a.d.length>1||a.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),dw.concatArray(t,a.q))}else t=dw.go(e.d,"pu-2");for(var o in e)delete e[o];return t}}},"pu-2":{transitions:dw.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(e,t){e.rm+="^{"+t+"}"},space:function(){return{type_:"pu-space-2"}},output:function(e){var t=[];if(e.rm){var n=dw.patterns.match_("{(...)}",e.rm||"");t=n&&""===n.remainder?dw.go(n.match_,"pu"):{type_:"rm",p1:e.rm}}for(var r in e)delete e[r];return t}}},"pu-9,9":{transitions:dw.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var n=e.text_.length%3;0===n&&(n=3);for(var r=e.text_.length-3;r>0;r-=3)t.push(e.text_.substr(r,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,n)),t.reverse()}else t.push(e.text_);for(var a in e)delete e[a];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var n=e.text_.length-3,r=0;r<n;r+=3)t.push(e.text_.substr(r,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(r))}else t.push(e.text_);for(var a in e)delete e[a];return t}}}};var uw={go:function(e,t){if(!e)return"";for(var n="",r=!1,a=0;a<e.length;a++){var o=e[a];"string"==typeof o?n+=o:(n+=uw._go2(o),"1st-level escape"===o.type_&&(r=!0))}return t||r||!n||(n="{"+n+"}"),n},_goInner:function(e){return e?uw.go(e,!0):e},_go2:function(e){var t;switch(e.type_){case"chemfive":t="";var n={a:uw._goInner(e.a),b:uw._goInner(e.b),p:uw._goInner(e.p),o:uw._goInner(e.o),q:uw._goInner(e.q),d:uw._goInner(e.d)};n.a&&(n.a.match(/^[+\-]/)&&(n.a="{"+n.a+"}"),t+=n.a+"\\,"),(n.b||n.p)&&(t+="{\\vphantom{X}}",t+="^{\\hphantom{"+(n.b||"")+"}}_{\\hphantom{"+(n.p||"")+"}}",t+="{\\vphantom{X}}",t+="^{\\smash[t]{\\vphantom{2}}\\mathllap{"+(n.b||"")+"}}",t+="_{\\vphantom{2}\\mathllap{\\smash[t]{"+(n.p||"")+"}}}"),n.o&&(n.o.match(/^[+\-]/)&&(n.o="{"+n.o+"}"),t+=n.o),"kv"===e.dType?((n.d||n.q)&&(t+="{\\vphantom{X}}"),n.d&&(t+="^{"+n.d+"}"),n.q&&(t+="_{\\smash[t]{"+n.q+"}}")):"oxidation"===e.dType?(n.d&&(t+="{\\vphantom{X}}",t+="^{"+n.d+"}"),n.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+n.q+"}}")):(n.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+n.q+"}}"),n.d&&(t+="{\\vphantom{X}}",t+="^{"+n.d+"}"));break;case"rm":case"roman numeral":t="\\mathrm{"+e.p1+"}";break;case"text":e.p1.match(/[\^_]/)?(e.p1=e.p1.replace(" ","~").replace("-","\\text{-}"),t="\\mathrm{"+e.p1+"}"):t="\\text{"+e.p1+"}";break;case"state of aggregation":t="\\mskip2mu "+uw._goInner(e.p1);break;case"state of aggregation subscript":t="\\mskip1mu "+uw._goInner(e.p1);break;case"bond":if(!(t=uw._getBond(e.kind_)))throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+e.kind_+")"];break;case"frac":var r="\\frac{"+e.p1+"}{"+e.p2+"}";t="\\mathchoice{\\textstyle"+r+"}{"+r+"}{"+r+"}{"+r+"}";break;case"pu-frac":var a="\\frac{"+uw._goInner(e.p1)+"}{"+uw._goInner(e.p2)+"}";t="\\mathchoice{\\textstyle"+a+"}{"+a+"}{"+a+"}{"+a+"}";break;case"tex-math":case"1st-level escape":t=e.p1+" ";break;case"frac-ce":t="\\frac{"+uw._goInner(e.p1)+"}{"+uw._goInner(e.p2)+"}";break;case"overset":t="\\overset{"+uw._goInner(e.p1)+"}{"+uw._goInner(e.p2)+"}";break;case"underset":t="\\underset{"+uw._goInner(e.p1)+"}{"+uw._goInner(e.p2)+"}";break;case"underbrace":t="\\underbrace{"+uw._goInner(e.p1)+"}_{"+uw._goInner(e.p2)+"}";break;case"color":t="{\\color{"+e.color1+"}{"+uw._goInner(e.color2)+"}}";break;case"color0":t="\\color{"+e.color+"}";break;case"arrow":var o={rd:uw._goInner(e.rd),rq:uw._goInner(e.rq)},i="\\x"+uw._getArrow(e.r);o.rq&&(i+="[{"+o.rq+"}]"),t=i+=o.rd?"{"+o.rd+"}":"{}";break;case"operator":t=uw._getOperator(e.kind_);break;case"space":t=" ";break;case"entitySkip":case"pu-space-1":t="~";break;case"pu-space-2":t="\\mkern3mu ";break;case"1000 separator":t="\\mkern2mu ";break;case"commaDecimal":t="{,}";break;case"comma enumeration L":t="{"+e.p1+"}\\mkern6mu ";break;case"comma enumeration M":t="{"+e.p1+"}\\mkern3mu ";break;case"comma enumeration S":t="{"+e.p1+"}\\mkern1mu ";break;case"hyphen":t="\\text{-}";break;case"addition compound":t="\\,{\\cdot}\\,";break;case"electron dot":t="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":t="{\\times}";break;case"prime":t="\\prime ";break;case"cdot":t="\\cdot ";break;case"tight cdot":t="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":t="\\times ";break;case"circa":t="{\\sim}";break;case"^":t="uparrow";break;case"v":t="downarrow";break;case"ellipsis":t="\\ldots ";break;case"/":t="/";break;case" / ":t="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return t},_getArrow:function(e){switch(e){case"->":case"→":case"⟶":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<--\x3e":return"rightleftarrows";case"<=>":case"⇌":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(e){switch(e){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(e){switch(e){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};var hw="local-user",pw="You",mw="#4F46E5";function fw(e){if(!e)return[];const t=e.getJSON(),n=[];return(t.content??[]).forEach((e,t)=>{if("heading"===e.type&&e.attrs?.level){const r=(e.content??[]).map(e=>e.text??"").join("");n.push([`${e.attrs.level}:${t}:${r}`,r,`h${e.attrs.level}`])}}),n}var gw=X(({content:e,contentKey:t,onChange:n,onHeadingsChange:r,readOnly:a},o)=>{const i=function(){const e=se({loadedContentKey:null,shouldSuppressNextLoad:!1});return{shouldLoadContent:Q(t=>{const n=e.current;return n.shouldSuppressNextLoad?(n.shouldSuppressNextLoad=!1,!1):n.loadedContentKey!==t},[]),markContentLoaded:Q(t=>{e.current.loadedContentKey=t},[]),markContentSaved:Q(()=>{e.current.shouldSuppressNextLoad=!0},[])}}(),[s,d]=le("light"),u=t??e.slice(0,40),h=function(){const[e,t]=le({}),n=se(e);n.current=e;const r=Q(e=>{t(t=>({...t,[e.id]:e}))},[]),a=Q((e,n)=>{t(t=>t[e]?{...t,[e]:{...t[e],text:n}}:t)},[]),o=Q((e,n)=>{t(t=>t[e]?{...t,[e]:{...t[e],replies:[...t[e].replies||[],n]}}:t)},[]),i=Q((e,n)=>{t(t=>t[e]?{...t,[e]:{...t[e],resolved:n}}:t)},[]),s=Q(e=>{t(t=>{if(!t[e])return t;const n={...t};return delete n[e],n})},[]),l=Q(e=>{t(t=>{const n={};for(const r of e){const e=t[r.id];n[r.id]=e?{...r,text:e.text||r.text,replies:e.replies}:r}return n})},[]),c=Q(e=>Boolean(n.current[e]),[]);return{threads:Object.values(e).sort((e,t)=>t.timestamp-e.timestamp),addThread:r,setThreadText:a,addReply:o,setResolved:i,removeThread:s,hydrate:l,has:c}}(),p=se(h);p.current=h;const[m,f]=le(!1),[g,v]=le(null),[b,w]=le(!0),S=ie(()=>[...Of.filter(e=>"comment"!==e.name),y.configure({authorId:hw,authorName:pw,authorColor:mw,onCommentAdd:e=>p.current.addThread(e),onCommentRemove:e=>p.current.removeThread(e),onCommentResolve:(e,t)=>p.current.setResolved(e,t)})],[]),k=se(n),C=se(r),N=se(!1),T=se(null),A=se(null),M=se(0);te(()=>{k.current=n},[n]),te(()=>{C.current=r},[r]);const I=Q(e=>{if(!C.current)return;const t=fw(e),n=Date.now(),r=n-M.current;r>=300?(M.current=n,C.current(t)):(A.current&&clearTimeout(A.current),A.current=setTimeout(()=>{M.current=Date.now(),C.current?.(fw(e))},300-r))},[]),[D,E]=le(null),R=Q(({editor:e})=>{N.current=!0,T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{N.current&&(N.current=!1,i.markContentSaved(),k.current(e.getHTML()))},2e4),I(e)},[I,i]),_=Q(({editor:e})=>{w(e.state.selection.empty);const t=function(e){if(!e.isActive(jf))return null;const t=e.getAttributes(jf).id;return"string"==typeof t&&t?t:null}(e);t&&(v(t),f(!0))},[]);te(()=>{D&&i.shouldLoadContent(u)&&(D.commands.setContent(e||""),i.markContentLoaded(u),I(D),p.current.hydrate(function(e){const t=/* @__PURE__ */new Map;return e.state.doc.descendants(e=>{if(e.isText)for(const n of e.marks){if(n.type.name!==jf)continue;const e=n.attrs;e.id&&!t.has(e.id)&&t.set(e.id,{id:e.id,authorId:e.authorId??"",authorName:e.authorName??"Anonymous",authorColor:e.authorColor??"#4F46E5",text:e.text??"",timestamp:"number"==typeof e.timestamp?e.timestamp:Date.now(),resolved:Boolean(e.resolved),replies:[]})}}),[...t.values()]}(D)),v(null))},[D,u,i,I]),te(()=>{D&&D.setEditable(!a)},[D,a]),te(()=>{const e=D;return()=>{T.current&&clearTimeout(T.current),A.current&&clearTimeout(A.current),e&&N.current&&(N.current=!1,i.markContentSaved(),k.current(e.getHTML()))}},[D,i]);const z=Q(e=>{if(!D)return null;const t=e.indexOf(":"),n=e.indexOf(":",t+1),r=e.slice(0,t),a=e.slice(n+1);for(const o of D.view.dom.querySelectorAll(`h${r}`))if(o.textContent?.trim()===a)return o;return null},[D]);re(o,()=>({scrollToHeading:e=>z(e)?.scrollIntoView({behavior:"smooth",block:"start"}),getElementByKey:e=>z(e)}),[z]);const P=Q(()=>{if(!D)return;const e=`comment-${Date.now()}`;D.chain().focus().setComment({id:e}).run()&&(v(e),f(!0))},[D]),O=Q(e=>{v(e),D&&function(e,t){const n=Uf(e,t);!!n&&(e.chain().setTextSelection(n).run(),e.view.dom.querySelector(`[data-comment-id="${t}"]`)?.scrollIntoView({behavior:"smooth",block:"center"}))}(D,e)},[D]),L=Q((e,t)=>{h.setResolved(e,t),D&&function(e,t,n){const r=Uf(e,t);if(!r)return!1;const{state:a,view:o}=e,i=a.schema.marks[jf];if(!i)return!1;const s=a.tr;a.doc.nodesBetween(r.from,r.to,(e,a)=>{if(!e.isText)return;const o=e.marks.find(e=>e.type===i&&e.attrs.id===t);if(!o)return;const l=Math.max(a,r.from),c=Math.min(a+e.nodeSize,r.to);s.removeMark(l,c,i),s.addMark(l,c,i.create({...o.attrs,...n}))}),s.docChanged&&o.dispatch(s)}(D,e,{resolved:t})},[D,h]),F=Q(e=>{h.removeThread(e),D&&function(e,t){const n=Uf(e,t);if(!n)return!1;const{state:r,view:a}=e,o=r.schema.marks[jf];if(!o)return!1;const i=r.tr.removeMark(n.from,n.to,o);i.docChanged&&a.dispatch(i)}(D,e),v(t=>t===e?null:t)},[D,h]),B=Q((e,t)=>{h.addReply(e,{id:`reply-${Date.now()}`,authorId:hw,authorName:pw,authorColor:mw,text:t,timestamp:Date.now()})},[h]),V=h.threads.filter(e=>!e.resolved).length;/* @__PURE__ */
|
|
261
|
+
return me("div",{className:"flex h-full w-full flex-col bg-editor-bg",children:[/* @__PURE__ */pe(Pf,{editor:D,theme:s,setTheme:d}),/* @__PURE__ */pe(x,{className:"flex flex-1 min-h-0 flex-col",extensions:S,initialContent:e,editable:!a,onEditor:E,onUpdate:R,onSelectionUpdate:_,children:({editor:e,EditorSurface:t})=>/* @__PURE__ */me("div",{className:"flex-1 flex flex-col overflow-hidden",children:[!a&&e&&/* @__PURE__ */pe(l,{theme:s,setTheme:d,onAddComment:P,commentDisabled:b,showComments:m,onToggleComments:()=>f(e=>!e),commentCount:V}),
|
|
262
|
+
/* @__PURE__ */me("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[/* @__PURE__ */pe(t,{className:"flex-1 min-h-0 overflow-auto prose dark:prose-invert max-w-none px-4 py-3"}),!a&&m&&/* @__PURE__ */pe("div",{className:"w-80 shrink-0",children:/* @__PURE__ */pe(qf,{threads:h.threads,activeId:g,onSelect:O,onSubmitBody:h.setThreadText,onReply:B,onResolve:L,onRemove:F,onClose:()=>f(!1)})})]}),!a&&e&&/* @__PURE__ */pe(c,{})]})})]})});function vw({activeDocument:e,documents:t,splitViewDocId:n,activeDocId:r,isMobile:a,editorRef:o,onUpdateDocument:i,onHeadingsChange:s,onCloseSplitView:l,aiSuggestion:c,isAiLoading:d,onAiRewrite:u,onAiApprove:h,onAiReject:p,onAiRegenerate:m,onInviteClick:f,onShareClick:g}){if(!e)/* @__PURE__ */return pe("div",{className:"flex h-full items-center justify-center bg-editor-bg",children:/* @__PURE__ */me("div",{className:"text-center",children:[
|
|
260
263
|
/* @__PURE__ */pe(Ve,{className:"mx-auto h-16 w-16 text-muted-foreground mb-4"}),
|
|
261
264
|
/* @__PURE__ */pe("h2",{className:"text-2xl font-serif font-semibold text-foreground mb-2",children:"No Note Selected"}),
|
|
262
265
|
/* @__PURE__ */pe("p",{className:"text-muted-foreground",children:a?"Tap the menu to select a note":"Select a note from the sidebar or create a new one"})]})});if(n&&n!==r){const r=t.find(e=>e.id===n);/* @__PURE__ */
|
|
263
|
-
return pe("div",{className:"flex-1 h-full",children:/* @__PURE__ */me(
|
|
264
|
-
return pe("div",{className:"h-full flex flex-col",children:/* @__PURE__ */pe(
|
|
266
|
+
return pe("div",{className:"flex-1 h-full",children:/* @__PURE__ */me(If,{direction:"horizontal",children:[/* @__PURE__ */pe(yf,{minSize:"300px",children:/* @__PURE__ */pe("div",{className:"flex flex-col h-full border-r border-border",children:/* @__PURE__ */pe("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */pe(gw,{ref:o,contentKey:e.id,content:e.content,onChange:t=>i(e.id,{content:t}),title:e.title,onTitleChange:t=>i(e.id,{title:t}),scrollToHeading:()=>{},onHeadingsChange:s,aiSuggestion:c,isAiLoading:d,onAiRewrite:u,onAiApprove:h,onAiReject:p,onAiRegenerate:m,onInviteClick:f,onShareClick:g,documentId:e.id})})})}),/* @__PURE__ */pe(yf,{minSize:"300px",children:/* @__PURE__ */pe("div",{className:"flex flex-col h-full",children:r?/* @__PURE__ */me(he,{children:[/* @__PURE__ */me("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border bg-muted/30",children:[/* @__PURE__ */pe("span",{className:"text-sm font-medium",children:r.title}),/* @__PURE__ */pe(tp,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:l,title:"Close split view",children:/* @__PURE__ */pe(Nt,{className:"h-3 w-3"})})]}),/* @__PURE__ */pe("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */pe(gw,{content:r.content,onChange:e=>i(r.id,{content:e}),title:r.title,onTitleChange:e=>i(r.id,{title:e}),scrollToHeading:()=>{},onInviteClick:f,onShareClick:g,documentId:r.id})})]}):null})})]})})}/* @__PURE__ */
|
|
267
|
+
return pe("div",{className:"h-full flex flex-col",children:/* @__PURE__ */pe(gw,{ref:o,contentKey:e.id,content:e.content,onChange:t=>i(e.id,{content:t}),title:e.title,onTitleChange:t=>i(e.id,{title:t}),scrollToHeading:()=>{},onHeadingsChange:s,aiSuggestion:c,isAiLoading:d,onAiRewrite:u,onAiApprove:h,onAiReject:p,onAiRegenerate:m,onInviteClick:f,onShareClick:g,documentId:e.id})})}gw.displayName="TiptapEditorWrapper";var yw="bg-white/10 dark:bg-black/20 backdrop-blur-md border-white/15 dark:border-white/10",bw={top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},xw=Object.fromEntries(fp.map(({type:e,label:t})=>[e,t]));function ww({panels:e,split:t,documents:n,activeId:r,activeDocument:a,onSelect:o,onAdd:i,onDelete:s,onDuplicate:l,onMove:c,onManageTags:d,onRename:u,headings:h,onNavigate:p,openTabs:m,activeTab:f,onTabChange:g,onTabClose:v,onTabRename:y,onSplitRight:b,onReopenLastClosed:x,canReopenLastClosed:w,outlineRef:S,editorRef:k,tabItems:C,onNewChat:N,aiProps:T,onClose:A,isMobile:M,isOpen:I,onOpenChange:D}){const[E,R]=le(320),_=1===e.length?xw[e[0]]:"Right Panel",z=/* @__PURE__ */me("div",{className:"h-full overflow-hidden flex flex-col",children:[/* @__PURE__ */me("div",{className:"px-3 py-2 border-b border-sidebar-border/60 flex items-center justify-between select-none shrink-0",children:[/* @__PURE__ */pe("h3",{className:"text-sm font-semibold text-sidebar-foreground",children:_}),/* @__PURE__ */pe(tp,{variant:"ghost",size:"sm",className:"h-7 px-2",onClick:A,children:/* @__PURE__ */pe(Nt,{className:"h-4 w-4"})})]}),/* @__PURE__ */pe("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */pe(Rf,{panels:e,split:t,persistenceKey:"right",activeDocuments:n,activeId:r,activeDocument:a,headings:h,onSelect:o,onAdd:i,onDelete:s,onDuplicate:l,onMove:c,onManageTags:d,onRename:u,outlineRef:S,editorRef:k,openTabs:m,activeTab:f,onTabChange:g,onTabClose:v,onTabRename:y,onSplitRight:b,onReopenLastClosed:x,canReopenLastClosed:w,onNavigate:p,tabItems:C,onNewChat:N,aiProps:T})})]});return M?/* @__PURE__ */pe(Dl,{open:I,onOpenChange:D,children:/* @__PURE__ */pe(_l,{side:"right",className:Il("w-80 p-0",yw),children:/* @__PURE__ */pe("aside",{className:"h-full flex flex-col",children:z})})}):/* @__PURE__ */pe(Vt,{size:{width:E,height:"100%"},onResizeStop:(e,t,n)=>R(n.offsetWidth),minWidth:260,maxWidth:640,enable:bw,className:Il("h-full flex flex-col border-l shrink-0",yw),children:z})}function Sw({className:e,children:t,...n}){/* @__PURE__ */
|
|
265
268
|
return me(Tl,{"data-slot":"scroll-area",className:Il("relative",e),...n,children:[
|
|
266
269
|
/* @__PURE__ */pe(Al,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&>div]:!block",children:t}),
|
|
267
|
-
/* @__PURE__ */pe(
|
|
268
|
-
/* @__PURE__ */pe(
|
|
269
|
-
/* @__PURE__ */pe(Ml,{})]})}function
|
|
270
|
-
return pe(el,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Il("flex touch-none p-px transition-colors select-none","vertical"===t&&"h-full w-2.5 border-l border-l-transparent","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:/* @__PURE__ */pe(ul,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var
|
|
270
|
+
/* @__PURE__ */pe(kw,{}),
|
|
271
|
+
/* @__PURE__ */pe(kw,{orientation:"horizontal"}),
|
|
272
|
+
/* @__PURE__ */pe(Ml,{})]})}function kw({className:e,orientation:t="vertical",...n}){/* @__PURE__ */
|
|
273
|
+
return pe(el,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Il("flex touch-none p-px transition-colors select-none","vertical"===t&&"h-full w-2.5 border-l border-l-transparent","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:/* @__PURE__ */pe(ul,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var Cw=q.forwardRef(({className:e,...t},n)=>/* @__PURE__ */pe("span",{ref:n,className:Il("absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0",e),style:{clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)"},...t}));Cw.displayName="VisuallyHidden";var Nw=({open:e,onOpenChange:t,documents:n,onSelectDocument:r,onOpenSettings:a,onOpenTeams:o,onToggleTheme:i,currentTheme:s="light"})=>{const[l,c]=le(""),d=se(null),u=ie(()=>{const e=[];return a&&e.push({id:"settings",label:"Open Settings",icon:/* @__PURE__ */pe(mt,{className:"h-4 w-4"}),action:()=>{a(),t(!1)},keywords:["settings","preferences","config"]}),o&&e.push({id:"teams",label:"Manage Teams",icon:/* @__PURE__ */pe(St,{className:"h-4 w-4"}),action:()=>{o(),t(!1)},keywords:["teams","organization","members","collaborate"]}),i&&e.push({id:"theme",label:"dark"===s?"Switch to Light Mode":"Switch to Dark Mode",icon:/* @__PURE__ */pe("dark"===s?yt:ot,{className:"h-4 w-4"}),action:()=>{i()},keywords:["theme","dark","light","mode","appearance"]}),e},[a,o,i,s,t]),h=ie(()=>function(e,t){const n=t.trim();if(!n)return[];const r=n.toLowerCase(),a=[];for(const o of e){const e=af(o.content),t=e.toLowerCase(),i=of(t,r);if(o.title.toLowerCase().includes(r))a.push({document:o,matchType:"title",matchCount:i,preview:e?e.slice(0,120)+(e.length>120?"...":""):void 0});else if(i>0){const s=t.indexOf(r),l=Math.max(0,s-40),c=Math.min(e.length,s+n.length+40);a.push({document:o,matchType:"content",matchCount:i,preview:(l>0?"...":"")+e.slice(l,c)+(c<e.length?"...":"")})}}return a}(n,l),[l,n]),p=ie(()=>{if(!l.trim())return u;const e=l.toLowerCase();return u.filter(t=>{const n=t.label.toLowerCase().includes(e),r=t.keywords?.some(t=>t.toLowerCase().includes(e));return n||r})},[l,u]);te(()=>{e?setTimeout(()=>d.current?.focus(),100):c("")},[e]),te(()=>{const n=n=>{e&&"Escape"===n.key&&t(!1)};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,t]);const m=p.length>0,f=h.length>0,g=""!==l.trim()&&!m&&!f;/* @__PURE__ */
|
|
271
274
|
return pe(qh,{open:e,onOpenChange:t,children:/* @__PURE__ */me(Gh,{className:"max-w-2xl w-[95vw] sm:w-full p-0 gap-0 max-h-[90vh] sm:max-h-[85vh]",children:[
|
|
272
|
-
/* @__PURE__ */pe(
|
|
275
|
+
/* @__PURE__ */pe(Cw,{children:/* @__PURE__ */pe(Yh,{children:"Search notes and commands"})}),
|
|
273
276
|
/* @__PURE__ */pe(Wh,{className:"px-4 py-4 border-b border-border",children:/* @__PURE__ */me("div",{className:"relative",children:[
|
|
274
277
|
/* @__PURE__ */pe(Ee,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),
|
|
275
|
-
/* @__PURE__ */pe(
|
|
276
|
-
/* @__PURE__ */pe(
|
|
278
|
+
/* @__PURE__ */pe(gf,{ref:d,type:"text",placeholder:"Search notes or type a command...",value:l,onChange:e=>c(e.target.value),className:"pl-9 pr-9 border-none shadow-none focus-visible:ring-0 text-sm sm:text-base"}),l&&/* @__PURE__ */pe("button",{onClick:()=>c(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:/* @__PURE__ */pe(Nt,{className:"h-4 w-4"})})]})}),
|
|
279
|
+
/* @__PURE__ */pe(Sw,{className:"max-h-[50vh] sm:max-h-[60vh]",children:""===l.trim()?/* @__PURE__ */me("div",{className:"py-2",children:[u.length>0&&/* @__PURE__ */me(he,{children:[/* @__PURE__ */pe("div",{className:"px-4 py-2",children:/* @__PURE__ */pe("h3",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Quick Actions"})}),u.map(e=>/* @__PURE__ */pe("button",{onClick:e.action,className:"w-full px-4 py-3 text-left hover:bg-muted/50 transition-colors border-b border-border last:border-0",children:/* @__PURE__ */me("div",{className:"flex items-center gap-3",children:[/* @__PURE__ */pe("div",{className:"flex-shrink-0 text-muted-foreground",children:e.icon}),/* @__PURE__ */pe("span",{className:"text-sm font-medium",children:e.label})]})},e.id))]}),/* @__PURE__ */me("div",{className:"flex flex-col items-center justify-center py-12 px-4 text-center",children:[/* @__PURE__ */pe(ht,{className:"h-12 w-12 text-muted-foreground mb-4 opacity-50"}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"Type to search across all your notes"})]})]}):/* @__PURE__ */me("div",g?{className:"flex flex-col items-center justify-center py-12 px-4 text-center",children:[/* @__PURE__ */pe(Ve,{className:"h-12 w-12 text-muted-foreground mb-4 opacity-50"}),/* @__PURE__ */me("p",{className:"text-sm text-muted-foreground",children:['No results found for "',l,'"']})]}:{className:"py-2",children:[m&&/* @__PURE__ */me(he,{children:[/* @__PURE__ */pe("div",{className:"px-4 py-2",children:/* @__PURE__ */pe("h3",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Commands"})}),p.map(e=>/* @__PURE__ */pe("button",{onClick:e.action,className:"w-full px-4 py-3 text-left hover:bg-muted/50 transition-colors border-b border-border",children:/* @__PURE__ */me("div",{className:"flex items-center gap-3",children:[/* @__PURE__ */pe("div",{className:"flex-shrink-0 text-muted-foreground",children:e.icon}),/* @__PURE__ */pe("span",{className:"text-sm font-medium",children:e.label})]})},e.id))]}),f&&/* @__PURE__ */me(he,{children:[m&&/* @__PURE__ */pe("div",{className:"px-4 py-2 mt-2",children:/* @__PURE__ */pe("h3",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Notes"})}),h.map(e=>/* @__PURE__ */pe("button",{onClick:()=>(e=>{r(e),t(!1),c("")})(e.document.id),className:"w-full px-4 py-3 text-left hover:bg-muted/50 transition-colors border-b border-border last:border-0",children:/* @__PURE__ */me("div",{className:"flex items-start gap-3",children:[/* @__PURE__ */pe(Ve,{className:"h-4 w-4 mt-1 flex-shrink-0 text-muted-foreground"}),/* @__PURE__ */me("div",{className:"flex-1 min-w-0",children:[/* @__PURE__ */me("div",{className:"flex items-center gap-2 mb-1",children:[/* @__PURE__ */pe("h3",{className:"font-medium text-sm truncate",children:e.document.title||"Untitled"}),"content"===e.matchType&&e.matchCount>1&&/* @__PURE__ */me("span",{className:"flex-shrink-0 text-xs text-muted-foreground tabular-nums",children:[e.matchCount," matches"]})]}),e.preview&&/* @__PURE__ */pe("p",{className:"text-xs text-muted-foreground line-clamp-2",children:e.preview})]})]})},e.document.id))]})]})}),
|
|
277
280
|
/* @__PURE__ */me("div",{className:"px-4 py-3 border-t border-border bg-muted/30",children:[/* @__PURE__ */me("p",{className:"text-xs text-muted-foreground text-center hidden sm:block",children:["Press ",
|
|
278
281
|
/* @__PURE__ */pe("kbd",{className:"px-1.5 py-0.5 rounded bg-background border border-border",children:"⌘K"})," or ",
|
|
279
282
|
/* @__PURE__ */pe("kbd",{className:"px-1.5 py-0.5 rounded bg-background border border-border",children:"Ctrl+K"})," to open • ",
|
|
280
283
|
/* @__PURE__ */pe("kbd",{className:"px-1.5 py-0.5 rounded bg-background border border-border",children:"ESC"})," to close"]}),/* @__PURE__ */me("p",{className:"text-xs text-muted-foreground text-center sm:hidden",children:["Tap ",
|
|
281
|
-
/* @__PURE__ */pe("kbd",{className:"px-1.5 py-0.5 rounded bg-background border border-border",children:"ESC"})," to close"]})]})]})})};function
|
|
282
|
-
return pe("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function
|
|
283
|
-
return pe("ol",{"data-slot":"breadcrumb-list",className:Il("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...t})}function
|
|
284
|
-
return pe("li",{"data-slot":"breadcrumb-item",className:Il("inline-flex items-center gap-1.5",e),...t})}function
|
|
285
|
-
return pe(e?ce:"a",{"data-slot":"breadcrumb-link",className:Il("hover:text-foreground transition-colors",t),...n})}function
|
|
286
|
-
return pe("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Il("text-foreground font-normal",e),...t})}function
|
|
287
|
-
return pe("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Il("[&>svg]:size-3.5",t),...n,children:e??/* @__PURE__ */pe(we,{})})}function
|
|
288
|
-
return pe(Pt.Root,{"data-slot":"separator",decorative:n,orientation:t,className:Il("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}var
|
|
289
|
-
return pe(
|
|
290
|
-
return pe("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:Il("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function
|
|
291
|
-
return pe("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:Il("relative flex w-full min-w-0 flex-col p-2",e),...t})}function
|
|
292
|
-
return pe("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:Il("w-full text-sm",e),...t})}function
|
|
293
|
-
return pe("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:Il("flex w-full min-w-0 flex-col gap-1",e),...t})}function
|
|
294
|
-
return pe("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Il("group/menu-item relative",e),...t})}var
|
|
295
|
-
return pe(_t.Root,{"data-slot":"label",className:Il("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function
|
|
296
|
-
return pe(zs,{"data-slot":"radio-group",className:Il("grid gap-3",e),...t})}function
|
|
297
|
-
return pe(Ls,{"data-slot":"radio-group-item",className:Il("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:/* @__PURE__ */pe(Bs,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:/* @__PURE__ */pe(Te,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}var
|
|
284
|
+
/* @__PURE__ */pe("kbd",{className:"px-1.5 py-0.5 rounded bg-background border border-border",children:"ESC"})," to close"]})]})]})})};function Tw({...e}){/* @__PURE__ */
|
|
285
|
+
return pe("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function Aw({className:e,...t}){/* @__PURE__ */
|
|
286
|
+
return pe("ol",{"data-slot":"breadcrumb-list",className:Il("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...t})}function Mw({className:e,...t}){/* @__PURE__ */
|
|
287
|
+
return pe("li",{"data-slot":"breadcrumb-item",className:Il("inline-flex items-center gap-1.5",e),...t})}function Iw({asChild:e,className:t,...n}){/* @__PURE__ */
|
|
288
|
+
return pe(e?ce:"a",{"data-slot":"breadcrumb-link",className:Il("hover:text-foreground transition-colors",t),...n})}function Dw({className:e,...t}){/* @__PURE__ */
|
|
289
|
+
return pe("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Il("text-foreground font-normal",e),...t})}function Ew({children:e,className:t,...n}){/* @__PURE__ */
|
|
290
|
+
return pe("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Il("[&>svg]:size-3.5",t),...n,children:e??/* @__PURE__ */pe(we,{})})}function Rw(){const[e,t]=q.useState(void 0);return q.useEffect(()=>{const e=window.matchMedia("(max-width: 1023px)"),n=()=>{t(window.innerWidth<1024)};return e.addEventListener("change",n),t(window.innerWidth<1024),()=>e.removeEventListener("change",n)},[]),!!e}function _w({className:e,orientation:t="horizontal",decorative:n=!0,...r}){/* @__PURE__ */
|
|
291
|
+
return pe(Pt.Root,{"data-slot":"separator",decorative:n,orientation:t,className:Il("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}var zw=q.createContext(null);function Pw(){const e=q.useContext(zw);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Ow({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...i}){const s=Rw(),[l,c]=q.useState(!1),[d,u]=q.useState(e),h=t??d,p=q.useCallback(e=>{const t="function"==typeof e?e(h):e;n?n(t):u(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,h]),m=q.useCallback(()=>s?c(e=>!e):p(e=>!e),[s,p,c]);q.useEffect(()=>{const e=e=>{const t=document.activeElement;if(t){const e=t.tagName.toLowerCase();if("input"===e||"textarea"===e||"true"===t.getAttribute("contenteditable")||t.closest(".cm-editor")||t.closest(".ProseMirror"))return}"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[m,null]);const f=h?"expanded":"collapsed",g=q.useMemo(()=>({state:f,open:h,setOpen:p,isMobile:s,openMobile:l,setOpenMobile:c,toggleSidebar:m}),[f,h,p,s,l,c,m]);/* @__PURE__ */
|
|
292
|
+
return pe(zw.Provider,{value:g,children:/* @__PURE__ */pe(np,{delayDuration:0,children:/* @__PURE__ */pe("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":"420px","--sidebar-width-icon":"5.2875rem",...a},className:Il("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),...i,children:o})})})}function Lw({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:a,...o}){const{isMobile:i,state:s,openMobile:l,setOpenMobile:c}=Pw();return"none"===n?/* @__PURE__ */pe("div",{"data-slot":"sidebar",className:Il("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...o,children:a}):i?/* @__PURE__ */pe(Dl,{open:l,onOpenChange:c,...o,children:/* @__PURE__ */me(_l,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":"16.2rem"},side:e,children:[/* @__PURE__ */me(zl,{className:"sr-only",children:[/* @__PURE__ */pe(Pl,{children:"Sidebar"}),/* @__PURE__ */pe(Ol,{children:"Displays the mobile sidebar."})]}),/* @__PURE__ */pe("div",{className:"flex h-full w-full flex-col",children:a})]})}):/* @__PURE__ */me("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":s,"data-collapsible":"collapsed"===s?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[/* @__PURE__ */pe("div",{"data-slot":"sidebar-gap",className:Il("relative w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===t||"inset"===t?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+var(--spacing-4))]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]")}),/* @__PURE__ */pe("div",{"data-slot":"sidebar-container",className:Il("fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex","left"===e?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===t||"inset"===t?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+var(--spacing-4)+2px)]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...o,children:/* @__PURE__ */pe("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:a})})]})}function Fw({className:e,...t}){/* @__PURE__ */
|
|
293
|
+
return pe("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:Il("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function Bw({className:e,...t}){/* @__PURE__ */
|
|
294
|
+
return pe("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:Il("relative flex w-full min-w-0 flex-col p-2",e),...t})}function Vw({className:e,...t}){/* @__PURE__ */
|
|
295
|
+
return pe("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:Il("w-full text-sm",e),...t})}function Hw({className:e,...t}){/* @__PURE__ */
|
|
296
|
+
return pe("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:Il("flex w-full min-w-0 flex-col gap-1",e),...t})}function $w({className:e,...t}){/* @__PURE__ */
|
|
297
|
+
return pe("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Il("group/menu-item relative",e),...t})}var qw=i("cursor-pointer peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-2xl p-2 text-left text-sm outline-hidden 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_1.5px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1.5px_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"}});function jw({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:a,className:o,...i}){const s=e?ce:"button",{isMobile:l,state:c}=Pw(),d=/* @__PURE__ */pe(s,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:Il(qw({variant:n,size:r}),o),...i});return a?("string"==typeof a&&(a={children:a}),/* @__PURE__ */me(rp,{children:[/* @__PURE__ */pe(ap,{asChild:!0,children:d}),/* @__PURE__ */pe(op,{side:"right",align:"center",hidden:"collapsed"!==c||l,...a})]})):d}var Uw=(e,t,n,r,a,o,i,s)=>{let l=document.documentElement,c=["light","dark"];function d(t){(Array.isArray(e)?e:[e]).forEach(e=>{let n="class"===e,r=n&&o?a.map(e=>o[e]||e):a;n?(l.classList.remove(...r),l.classList.add(o&&o[t]?o[t]:t)):l.setAttribute(e,t)}),function(e){s&&c.includes(e)&&(l.style.colorScheme=e)}(t)}if(r)d(r);else try{let e=localStorage.getItem(t)||n;d(i&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e)}catch(_i){}},Gw=q.createContext(void 0),Ww={setTheme:e=>{},themes:[]},Yw=()=>{var e;return null!=(e=q.useContext(Gw))?e:Ww};q.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:o,value:i,themes:s,nonce:l,scriptProps:c})=>{let d=JSON.stringify([n,t,o,e,s,i,r,a]).slice(1,-1);return q.createElement("script",{...c,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?l:"",dangerouslySetInnerHTML:{__html:`(${Uw.toString()})(${d})`}})});function Kw({className:e,...t}){/* @__PURE__ */
|
|
298
|
+
return pe(_t.Root,{"data-slot":"label",className:Il("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function Xw({className:e,...t}){/* @__PURE__ */
|
|
299
|
+
return pe(zs,{"data-slot":"radio-group",className:Il("grid gap-3",e),...t})}function Zw({className:e,...t}){/* @__PURE__ */
|
|
300
|
+
return pe(Ls,{"data-slot":"radio-group-item",className:Il("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:/* @__PURE__ */pe(Bs,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:/* @__PURE__ */pe(Te,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}var Jw=["modern-minimal","elegant-luxury","cyberpunk","twitter","mocha-mousse","amethyst-haze","notebook","doom-64","catppuccin","graphite","perpetuity","kodama-grove","cosmic-night","tangerine","nature","bold-tech","amber-minimal","supabase","neo-brutalism","quantum-rose","solar-dusk","bubblegum","pink-lemonade","claymorphism","pastel-dreams"],Qw={"modern-minimal":{primary:"#3b82f6",secondary:"#f3f4f6"},"elegant-luxury":{primary:"#9b2c2c",secondary:"#fdf2d6"},cyberpunk:{primary:"#ff00c8",secondary:"#f0f0ff"},twitter:{primary:"#1e9df1",secondary:"#0f1419"},"mocha-mousse":{primary:"#A37764",secondary:"#BAAB92"},bubblegum:{primary:"#d04f99",secondary:"#8acfd1"},"amethyst-haze":{primary:"#8a79ab",secondary:"#dfd9ec"},"pink-lemonade":{primary:"#a84370",secondary:"#f1c4e6"},notebook:{primary:"#606060",secondary:"#dedede"},"doom-64":{primary:"#b71c1c",secondary:"#556b2f"},catppuccin:{primary:"#8839ef",secondary:"#ccd0da"},graphite:{primary:"#606060",secondary:"#e0e0e0"},perpetuity:{primary:"#06858e",secondary:"#d9eaea"},"kodama-grove":{primary:"#8d9d4f",secondary:"#decea0"},"cosmic-night":{primary:"#6e56cf",secondary:"#e4dfff"},tangerine:{primary:"#e05d38",secondary:"#f3f4f6"},"quantum-rose":{primary:"#e6067a",secondary:"#ffd6ff"},nature:{primary:"#2e7d32",secondary:"#e8f5e9"},"bold-tech":{primary:"#8b5cf6",secondary:"#f3f0ff"},"amber-minimal":{primary:"#f59e0b",secondary:"#f3f4f6"},supabase:{primary:"#72e3ad",secondary:"#fdfdfd"},"neo-brutalism":{primary:"#ff3333",secondary:"#ffff00"},"solar-dusk":{primary:"#B45309",secondary:"#E4C090"},claymorphism:{primary:"#6366f1",secondary:"#d6d3d1"},"pastel-dreams":{primary:"#a78bfa",secondary:"#e9d8fd"}};function eS(){const{theme:e,setTheme:t}=Yw(),[n,r]=le("modern-minimal"),[a,o]=le(!1),[i,s]=le(null);te(()=>{o(!0);const e=localStorage.getItem("color-theme");e&&Jw.includes(e)&&r(e)},[]);const l=()=>{i&&(Jw.forEach(e=>document.documentElement.classList.remove(`theme-${e}`)),document.documentElement.classList.add(`theme-${n}`),s(null))};return a?/* @__PURE__ */me(ip,{onOpenChange:e=>!e&&l(),children:[/* @__PURE__ */pe(sp,{asChild:!0,children:/* @__PURE__ */pe(tp,{variant:"ghost",size:"icon",className:"relative",children:/* @__PURE__ */pe(d,{name:"icon-themes",className:"h-5 w-5"})})}),/* @__PURE__ */me(lp,{align:"end",className:"w-56 max-h-[400px] overflow-y-auto",children:[
|
|
298
301
|
/* @__PURE__ */me(up,{className:"flex items-center justify-between",children:[/* @__PURE__ */pe("span",{children:"Theme"}),/* @__PURE__ */pe(tp,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:n=>{n.stopPropagation(),t("dark"===e?"light":"dark")},children:/* @__PURE__ */pe("dark"===e?ot:yt,{className:"h-4 w-4"})})]}),
|
|
299
|
-
/* @__PURE__ */pe(hp,{}),
|
|
300
|
-
return pe(cp,{onClick:()=>{return r(t=e),localStorage.setItem("color-theme",t),document.cookie=`color-theme=${t}; path=/; max-age=31536000`,
|
|
302
|
+
/* @__PURE__ */pe(hp,{}),Jw.map(e=>{const t=Qw[e];/* @__PURE__ */
|
|
303
|
+
return pe(cp,{onClick:()=>{return r(t=e),localStorage.setItem("color-theme",t),document.cookie=`color-theme=${t}; path=/; max-age=31536000`,Jw.forEach(e=>document.documentElement.classList.remove(`theme-${e}`)),document.documentElement.classList.add(`theme-${t}`),void s(null);var t},onMouseEnter:()=>(e=>{s(e),Jw.forEach(e=>document.documentElement.classList.remove(`theme-${e}`)),document.documentElement.classList.add(`theme-${e}`)})(e),onMouseLeave:l,className:"cursor-pointer "+(n===e?"bg-accent":""),children:/* @__PURE__ */me("div",{className:"flex items-center justify-between w-full",children:[/* @__PURE__ */me("div",{className:"flex items-center gap-2",children:[t&&/* @__PURE__ */me("div",{className:"flex items-center gap-1",children:[/* @__PURE__ */pe("div",{className:"w-3 h-3 rounded-full border border-border",style:{backgroundColor:t.primary}}),/* @__PURE__ */pe("div",{className:"w-3 h-3 rounded-full border border-border",style:{backgroundColor:t.secondary}})]}),/* @__PURE__ */pe("span",{children:(a=e,a.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "))})]}),n===e&&/* @__PURE__ */pe("span",{className:"text-xs",children:"✓"})]})},e);var a})]})]}):null}var tS=[{value:"light",label:"Light",icon:/* @__PURE__ */pe(yt,{className:"h-4 w-4"}),description:"Clean and bright interface"},{value:"dark",label:"Dark",icon:/* @__PURE__ */pe(ot,{className:"h-4 w-4"}),description:"Easy on the eyes in low light"},{value:"system",label:"System",icon:/* @__PURE__ */pe(at,{className:"h-4 w-4"}),description:"Sync with your system preferences"}],nS=({defaultSidebarView:e,onDefaultSidebarViewChange:t})=>{const{theme:n,setTheme:r}=Yw();/* @__PURE__ */
|
|
301
304
|
return me("div",{className:"space-y-6",children:[
|
|
302
305
|
/* @__PURE__ */me("div",{children:[/* @__PURE__ */pe("h2",{className:"text-xl font-semibold mb-2",children:"Appearance"}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"Choose how REASON looks to you"})]}),
|
|
303
|
-
/* @__PURE__ */pe(
|
|
304
|
-
/* @__PURE__ */me("div",{className:"space-y-4",children:[/* @__PURE__ */pe(
|
|
306
|
+
/* @__PURE__ */pe(_w,{}),
|
|
307
|
+
/* @__PURE__ */me("div",{className:"space-y-4",children:[/* @__PURE__ */pe(Kw,{className:"text-base",children:"Theme"}),/* @__PURE__ */pe(Xw,{value:n,onValueChange:r,className:"space-y-3",children:tS.map(e=>/* @__PURE__ */me("div",{className:"flex items-start space-x-3",children:[/* @__PURE__ */pe(Zw,{value:e.value,id:e.value,className:"mt-1"}),/* @__PURE__ */me("label",{htmlFor:e.value,className:"flex-1 cursor-pointer",children:[/* @__PURE__ */me("div",{className:"flex items-center gap-2 mb-1",children:[/* @__PURE__ */pe("div",{className:"text-muted-foreground",children:e.icon}),/* @__PURE__ */pe("span",{className:"font-medium",children:e.label})]}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:e.description})]})]},e.value))})]}),
|
|
305
308
|
/* @__PURE__ */me("div",{className:"space-y-4",children:[
|
|
306
|
-
/* @__PURE__ */pe(
|
|
309
|
+
/* @__PURE__ */pe(Kw,{className:"text-base",children:"Color Theme"}),
|
|
307
310
|
/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground mb-2",children:"Choose from various color themes to customize your interface"}),
|
|
308
|
-
/* @__PURE__ */pe("div",{className:"flex items-center",children:/* @__PURE__ */pe(
|
|
309
|
-
/* @__PURE__ */pe(
|
|
311
|
+
/* @__PURE__ */pe("div",{className:"flex items-center",children:/* @__PURE__ */pe(eS,{})})]}),
|
|
312
|
+
/* @__PURE__ */pe(_w,{}),
|
|
310
313
|
/* @__PURE__ */me("div",{className:"space-y-4",children:[
|
|
311
|
-
/* @__PURE__ */pe(
|
|
314
|
+
/* @__PURE__ */pe(Kw,{className:"text-base",children:"Default Sidebar View"}),
|
|
312
315
|
/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground mb-2",children:"Choose the default view when opening the application"}),
|
|
313
|
-
/* @__PURE__ */pe(
|
|
316
|
+
/* @__PURE__ */pe(Xw,{value:e,onValueChange:e=>t?.(e),className:"space-y-3",children:[{value:"tree",label:"Documents Tree",desc:"Show only the document tree"},{value:"outline",label:"Outline Only",desc:"Show only the headings outline"},{value:"split",label:"Split View",desc:"Show both tree and outline side by side"},{value:"last-used",label:"Remember Last Used",desc:"Use the view you had open last time"}].map(e=>/* @__PURE__ */me("div",{className:"flex items-start space-x-3",children:[/* @__PURE__ */pe(Zw,{value:e.value,id:e.value,className:"mt-1"}),/* @__PURE__ */me("label",{htmlFor:e.value,className:"flex-1 cursor-pointer",children:[/* @__PURE__ */pe("div",{className:"flex items-center gap-2 mb-1",children:/* @__PURE__ */pe("span",{className:"font-medium",children:e.label})}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:e.desc})]})]},e.value))})]})]})},rS=({enableDatabaseSync:e=!1,onEnableDatabaseSyncChange:t})=>/* @__PURE__ */me("div",{className:"space-y-6",children:[
|
|
314
317
|
/* @__PURE__ */me("div",{children:[/* @__PURE__ */pe("h2",{className:"text-xl font-semibold mb-2",children:"Storage"}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"Manage how your documents are stored"})]}),
|
|
315
|
-
/* @__PURE__ */pe(
|
|
316
|
-
/* @__PURE__ */me("div",{className:"space-y-4",children:[/* @__PURE__ */me("div",{className:"flex items-start justify-between",children:[/* @__PURE__ */me("div",{className:"space-y-1",children:[/* @__PURE__ */me(Ww,{className:"text-base flex items-center gap-2",children:[/* @__PURE__ */pe(ze,{className:"h-4 w-4"}),"Database Sync"]}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"Save documents to SQL database for persistent storage"})]}),/* @__PURE__ */pe("input",{type:"checkbox",id:"database-sync",checked:e,onChange:e=>t?.(e.target.checked),className:"h-4 w-4 rounded border-gray-300"})]}),/* @__PURE__ */pe("div",e?{className:"rounded-md bg-muted p-3 space-y-2",children:/* @__PURE__ */me("div",{className:"flex items-start gap-2",children:[/* @__PURE__ */pe(Ye,{className:"h-4 w-4 text-muted-foreground mt-0.5"}),/* @__PURE__ */me("div",{className:"space-y-1",children:[/* @__PURE__ */pe("p",{className:"text-sm font-medium",children:"Database Sync Enabled"}),/* @__PURE__ */pe("p",{className:"text-xs text-muted-foreground",children:"Your documents will be automatically saved to the database. Changes are synced every 2 seconds after editing."})]})]})}:{className:"rounded-md bg-muted p-3 space-y-2",children:/* @__PURE__ */me("div",{className:"flex items-start gap-2",children:[/* @__PURE__ */pe(Ge,{className:"h-4 w-4 text-muted-foreground mt-0.5"}),/* @__PURE__ */me("div",{className:"space-y-1",children:[/* @__PURE__ */pe("p",{className:"text-sm font-medium",children:"Local Storage Only"}),/* @__PURE__ */pe("p",{className:"text-xs text-muted-foreground",children:"Your documents are stored in your browser's local storage. They won't be accessible from other devices."})]})]})})]})]});Array(12).fill(0);var nS=1,rS=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n,...r}=e,a="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:nS++,o=this.toasts.find(e=>e.id===a),i=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),o?this.toasts=this.toasts.map(t=>t.id===a?(this.publish({...t,...e,id:a,title:n}),{...t,...e,id:a,dismissible:i,title:n}):t):this.addToast({title:n,...r,dismissible:i,id:a}),a},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let a,o=void 0!==n;const i=r.then(async e=>{if(a=["resolve",e],j.isValidElement(e))o=!1,this.create({id:n,type:"default",message:e});else if(aS(e)&&!e.ok){o=!1;const r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,a="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,i="object"!=typeof r||j.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:a,...i})}else if(e instanceof Error){o=!1;const r="function"==typeof t.error?await t.error(e):t.error,a="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof r||j.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:a,...i})}else if(void 0!==t.success){o=!1;const r="function"==typeof t.success?await t.success(e):t.success,a="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof r||j.isValidElement(r)?{message:r}:r;this.create({id:n,type:"success",description:a,...i})}}).catch(async e=>{if(a=["reject",e],void 0!==t.error){o=!1;const r="function"==typeof t.error?await t.error(e):t.error,a="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof r||j.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:a,...i})}}).finally(()=>{o&&(this.dismiss(n),n=void 0),null==t.finally||t.finally.call(t)}),s=()=>new Promise((e,t)=>i.then(()=>"reject"===a[0]?t(a[1]):e(a[1])).catch(t));return"string"!=typeof n&&"number"!=typeof n?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||nS++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=/* @__PURE__ */new Set}},aS=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,oS=(e,t)=>{const n=(null==t?void 0:t.id)||nS++;return rS.addToast({title:e,...t,id:n}),n},iS=Object.assign(oS,{success:rS.success,info:rS.info,warning:rS.warning,error:rS.error,custom:rS.custom,message:rS.message,promise:rS.promise,dismiss:rS.dismiss,loading:rS.loading},{getHistory:()=>rS.toasts,getToasts:()=>rS.getActiveToasts()});!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");var sS={name:"",type:"local",credentials:{}},lS=({open:e})=>{const[t,n]=le([]),[r,a]=le(null),[o,i]=le(sS);te(()=>{e&&n(Vl())},[e]);const s=()=>{o.name.trim()?(r&&"new"!==r?(!function(e,t){Hl(Vl().map(n=>n.id===e?{...n,...t,updatedAt:/* @__PURE__ */(new Date).toISOString()}:n))}(r,{name:o.name,credentials:"local"!==o.type?o.credentials:void 0}),iS.success("Source updated")):(!function(e){const t={...e,id:`${e.type}-${Date.now()}`,createdAt:/* @__PURE__ */(new Date).toISOString(),updatedAt:/* @__PURE__ */(new Date).toISOString()};Hl([...Vl(),t])}({name:o.name,type:o.type,credentials:"local"!==o.type?o.credentials:void 0}),iS.success("Source added")),n(Vl()),a(null),i(sS)):iS.error("Please enter a source name")},l=e=>{!function(e){"local-default"!==e&&(Hl(Vl().filter(t=>t.id!==e)),$l()===e&&ql("local-default"))}(e),n(Vl()),iS.success("Source deleted")},c=()=>{a(null),i(sS)},d=e=>o.credentials[e],u=e=>i(t=>({...t,credentials:{...t.credentials,...e}})),h=({type:e})=>"local"===e?/* @__PURE__ */pe(Ge,{className:"h-4 w-4"}):"ssh"===e?/* @__PURE__ */pe(pt,{className:"h-4 w-4"}):"s3"===e||"b2"===e?/* @__PURE__ */pe(Ie,{className:"h-4 w-4"}):"r2"===e?/* @__PURE__ */pe(ze,{className:"h-4 w-4"}):"gdocs"===e?/* @__PURE__ */pe(Ve,{className:"h-4 w-4"}):"turso"===e?/* @__PURE__ */pe(Ct,{className:"h-4 w-4"}):null,p=e=>"ssh"===e?/* @__PURE__ */me(he,{children:[
|
|
317
|
-
/* @__PURE__ */pe(
|
|
318
|
-
/* @__PURE__ */me("div",{className:"grid grid-cols-2 gap-2",children:[/* @__PURE__ */pe(
|
|
319
|
-
/* @__PURE__ */pe(
|
|
320
|
-
/* @__PURE__ */pe(
|
|
321
|
-
/* @__PURE__ */pe(
|
|
322
|
-
/* @__PURE__ */pe(
|
|
323
|
-
/* @__PURE__ */me("div",{className:"grid grid-cols-2 gap-2",children:[/* @__PURE__ */pe(
|
|
324
|
-
/* @__PURE__ */pe(
|
|
325
|
-
/* @__PURE__ */pe(
|
|
326
|
-
/* @__PURE__ */pe(
|
|
327
|
-
/* @__PURE__ */pe(
|
|
328
|
-
/* @__PURE__ */pe(
|
|
329
|
-
/* @__PURE__ */pe(
|
|
330
|
-
/* @__PURE__ */pe(
|
|
331
|
-
/* @__PURE__ */pe(
|
|
332
|
-
/* @__PURE__ */pe(
|
|
333
|
-
/* @__PURE__ */me(
|
|
318
|
+
/* @__PURE__ */pe(_w,{}),
|
|
319
|
+
/* @__PURE__ */me("div",{className:"space-y-4",children:[/* @__PURE__ */me("div",{className:"flex items-start justify-between",children:[/* @__PURE__ */me("div",{className:"space-y-1",children:[/* @__PURE__ */me(Kw,{className:"text-base flex items-center gap-2",children:[/* @__PURE__ */pe(ze,{className:"h-4 w-4"}),"Database Sync"]}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"Save documents to SQL database for persistent storage"})]}),/* @__PURE__ */pe("input",{type:"checkbox",id:"database-sync",checked:e,onChange:e=>t?.(e.target.checked),className:"h-4 w-4 rounded border-gray-300"})]}),/* @__PURE__ */pe("div",e?{className:"rounded-md bg-muted p-3 space-y-2",children:/* @__PURE__ */me("div",{className:"flex items-start gap-2",children:[/* @__PURE__ */pe(Ye,{className:"h-4 w-4 text-muted-foreground mt-0.5"}),/* @__PURE__ */me("div",{className:"space-y-1",children:[/* @__PURE__ */pe("p",{className:"text-sm font-medium",children:"Database Sync Enabled"}),/* @__PURE__ */pe("p",{className:"text-xs text-muted-foreground",children:"Your documents will be automatically saved to the database. Changes are synced every 2 seconds after editing."})]})]})}:{className:"rounded-md bg-muted p-3 space-y-2",children:/* @__PURE__ */me("div",{className:"flex items-start gap-2",children:[/* @__PURE__ */pe(Ge,{className:"h-4 w-4 text-muted-foreground mt-0.5"}),/* @__PURE__ */me("div",{className:"space-y-1",children:[/* @__PURE__ */pe("p",{className:"text-sm font-medium",children:"Local Storage Only"}),/* @__PURE__ */pe("p",{className:"text-xs text-muted-foreground",children:"Your documents are stored in your browser's local storage. They won't be accessible from other devices."})]})]})})]})]});Array(12).fill(0);var aS=1,oS=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n,...r}=e,a="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:aS++,o=this.toasts.find(e=>e.id===a),i=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),o?this.toasts=this.toasts.map(t=>t.id===a?(this.publish({...t,...e,id:a,title:n}),{...t,...e,id:a,dismissible:i,title:n}):t):this.addToast({title:n,...r,dismissible:i,id:a}),a},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let a,o=void 0!==n;const i=r.then(async e=>{if(a=["resolve",e],j.isValidElement(e))o=!1,this.create({id:n,type:"default",message:e});else if(iS(e)&&!e.ok){o=!1;const r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,a="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,i="object"!=typeof r||j.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:a,...i})}else if(e instanceof Error){o=!1;const r="function"==typeof t.error?await t.error(e):t.error,a="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof r||j.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:a,...i})}else if(void 0!==t.success){o=!1;const r="function"==typeof t.success?await t.success(e):t.success,a="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof r||j.isValidElement(r)?{message:r}:r;this.create({id:n,type:"success",description:a,...i})}}).catch(async e=>{if(a=["reject",e],void 0!==t.error){o=!1;const r="function"==typeof t.error?await t.error(e):t.error,a="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof r||j.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:a,...i})}}).finally(()=>{o&&(this.dismiss(n),n=void 0),null==t.finally||t.finally.call(t)}),s=()=>new Promise((e,t)=>i.then(()=>"reject"===a[0]?t(a[1]):e(a[1])).catch(t));return"string"!=typeof n&&"number"!=typeof n?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||aS++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=/* @__PURE__ */new Set}},iS=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,sS=(e,t)=>{const n=(null==t?void 0:t.id)||aS++;return oS.addToast({title:e,...t,id:n}),n},lS=Object.assign(sS,{success:oS.success,info:oS.info,warning:oS.warning,error:oS.error,custom:oS.custom,message:oS.message,promise:oS.promise,dismiss:oS.dismiss,loading:oS.loading},{getHistory:()=>oS.toasts,getToasts:()=>oS.getActiveToasts()});!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");var cS={name:"",type:"local",credentials:{}},dS=({open:e})=>{const[t,n]=le([]),[r,a]=le(null),[o,i]=le(cS);te(()=>{e&&n(Vl())},[e]);const s=()=>{o.name.trim()?(r&&"new"!==r?(!function(e,t){Hl(Vl().map(n=>n.id===e?{...n,...t,updatedAt:/* @__PURE__ */(new Date).toISOString()}:n))}(r,{name:o.name,credentials:"local"!==o.type?o.credentials:void 0}),lS.success("Source updated")):(!function(e){const t={...e,id:`${e.type}-${Date.now()}`,createdAt:/* @__PURE__ */(new Date).toISOString(),updatedAt:/* @__PURE__ */(new Date).toISOString()};Hl([...Vl(),t])}({name:o.name,type:o.type,credentials:"local"!==o.type?o.credentials:void 0}),lS.success("Source added")),n(Vl()),a(null),i(cS)):lS.error("Please enter a source name")},l=e=>{!function(e){"local-default"!==e&&(Hl(Vl().filter(t=>t.id!==e)),$l()===e&&ql("local-default"))}(e),n(Vl()),lS.success("Source deleted")},c=()=>{a(null),i(cS)},d=e=>o.credentials[e],u=e=>i(t=>({...t,credentials:{...t.credentials,...e}})),h=({type:e})=>"local"===e?/* @__PURE__ */pe(Ge,{className:"h-4 w-4"}):"ssh"===e?/* @__PURE__ */pe(pt,{className:"h-4 w-4"}):"s3"===e||"b2"===e?/* @__PURE__ */pe(Ie,{className:"h-4 w-4"}):"r2"===e?/* @__PURE__ */pe(ze,{className:"h-4 w-4"}):"gdocs"===e?/* @__PURE__ */pe(Ve,{className:"h-4 w-4"}):"turso"===e?/* @__PURE__ */pe(Ct,{className:"h-4 w-4"}):null,p=e=>"ssh"===e?/* @__PURE__ */me(he,{children:[
|
|
320
|
+
/* @__PURE__ */pe(uS,{label:"Host",children:/* @__PURE__ */pe(gf,{value:d("host")||"",onChange:e=>u({host:e.target.value}),placeholder:"example.com"})}),
|
|
321
|
+
/* @__PURE__ */me("div",{className:"grid grid-cols-2 gap-2",children:[/* @__PURE__ */pe(uS,{label:"Port",children:/* @__PURE__ */pe(gf,{type:"number",value:d("port")||22,onChange:e=>u({port:parseInt(e.target.value)}),placeholder:"22"})}),/* @__PURE__ */pe(uS,{label:"Username",children:/* @__PURE__ */pe(gf,{value:d("username")||"",onChange:e=>u({username:e.target.value}),placeholder:"user"})})]}),
|
|
322
|
+
/* @__PURE__ */pe(uS,{label:"Password (Optional)",children:/* @__PURE__ */pe(gf,{type:"password",value:d("password")||"",onChange:e=>u({password:e.target.value}),placeholder:"••••••••"})}),
|
|
323
|
+
/* @__PURE__ */pe(uS,{label:"Base Path (Optional)",children:/* @__PURE__ */pe(gf,{value:d("basePath")||"",onChange:e=>u({basePath:e.target.value}),placeholder:"/home/user/documents"})})]}):"s3"===e?/* @__PURE__ */me(he,{children:[
|
|
324
|
+
/* @__PURE__ */pe(uS,{label:"Access Key ID",children:/* @__PURE__ */pe(gf,{value:d("accessKeyId")||"",onChange:e=>u({accessKeyId:e.target.value}),placeholder:"AKIAIOSFODNN7EXAMPLE"})}),
|
|
325
|
+
/* @__PURE__ */pe(uS,{label:"Secret Access Key",children:/* @__PURE__ */pe(gf,{type:"password",value:d("secretAccessKey")||"",onChange:e=>u({secretAccessKey:e.target.value}),placeholder:"••••••••"})}),
|
|
326
|
+
/* @__PURE__ */me("div",{className:"grid grid-cols-2 gap-2",children:[/* @__PURE__ */pe(uS,{label:"Region",children:/* @__PURE__ */pe(gf,{value:d("region")||"",onChange:e=>u({region:e.target.value}),placeholder:"us-east-1"})}),/* @__PURE__ */pe(uS,{label:"Bucket",children:/* @__PURE__ */pe(gf,{value:d("bucket")||"",onChange:e=>u({bucket:e.target.value}),placeholder:"my-bucket"})})]})]}):"r2"===e?/* @__PURE__ */me(he,{children:[
|
|
327
|
+
/* @__PURE__ */pe(uS,{label:"Account ID",children:/* @__PURE__ */pe(gf,{value:d("accountId")||"",onChange:e=>u({accountId:e.target.value}),placeholder:"your-account-id"})}),
|
|
328
|
+
/* @__PURE__ */pe(uS,{label:"Access Key ID",children:/* @__PURE__ */pe(gf,{value:d("accessKeyId")||"",onChange:e=>u({accessKeyId:e.target.value}),placeholder:"your-access-key-id"})}),
|
|
329
|
+
/* @__PURE__ */pe(uS,{label:"Secret Access Key",children:/* @__PURE__ */pe(gf,{type:"password",value:d("secretAccessKey")||"",onChange:e=>u({secretAccessKey:e.target.value}),placeholder:"••••••••"})}),
|
|
330
|
+
/* @__PURE__ */pe(uS,{label:"Bucket",children:/* @__PURE__ */pe(gf,{value:d("bucket")||"",onChange:e=>u({bucket:e.target.value}),placeholder:"my-bucket"})})]}):"b2"===e?/* @__PURE__ */me(he,{children:[
|
|
331
|
+
/* @__PURE__ */pe(uS,{label:"Access Key ID",children:/* @__PURE__ */pe(gf,{value:d("accessKeyId")||"",onChange:e=>u({accessKeyId:e.target.value}),placeholder:"your-key-id"})}),
|
|
332
|
+
/* @__PURE__ */pe(uS,{label:"Secret Access Key",children:/* @__PURE__ */pe(gf,{type:"password",value:d("secretAccessKey")||"",onChange:e=>u({secretAccessKey:e.target.value}),placeholder:"••••••••"})}),
|
|
333
|
+
/* @__PURE__ */pe(uS,{label:"Bucket",children:/* @__PURE__ */pe(gf,{value:d("bucket")||"",onChange:e=>u({bucket:e.target.value}),placeholder:"my-bucket"})}),
|
|
334
|
+
/* @__PURE__ */pe(uS,{label:"Endpoint (Optional)",children:/* @__PURE__ */pe(gf,{value:d("endpoint")||"",onChange:e=>u({endpoint:e.target.value}),placeholder:"https://s3.us-west-004.backblazeb2.com"})})]}):"gdocs"===e?/* @__PURE__ */me(he,{children:[
|
|
335
|
+
/* @__PURE__ */pe(uS,{label:"Email",children:/* @__PURE__ */pe(gf,{value:d("email")||"",onChange:e=>u({email:e.target.value}),placeholder:"user@gmail.com",disabled:!0})}),
|
|
336
|
+
/* @__PURE__ */me(uS,{label:"Folder IDs (comma-separated)",children:[/* @__PURE__ */pe(Vf,{value:d("folderIds")?.join(", ")||"",onChange:e=>u({folderIds:e.target.value.split(",").map(e=>e.trim()).filter(Boolean)}),placeholder:"folder-id-1, folder-id-2",rows:3}),/* @__PURE__ */pe("p",{className:"text-xs text-muted-foreground",children:"Enter Google Drive folder IDs to sync (one per line or comma-separated)"})]}),
|
|
334
337
|
/* @__PURE__ */me("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md",children:[/* @__PURE__ */pe("div",{className:"flex-1",children:/* @__PURE__ */pe("p",{className:"text-sm font-medium",children:d("isAuthenticated")?"Connected to Google":"Not authenticated"})}),/* @__PURE__ */me(tp,{size:"sm",variant:"outline",children:[/* @__PURE__ */pe(Qe,{className:"h-4 w-4 mr-2"}),d("isAuthenticated")?"Reconnect":"Authenticate"]})]})]}):"turso"===e?/* @__PURE__ */me(he,{children:[
|
|
335
|
-
/* @__PURE__ */pe(
|
|
336
|
-
/* @__PURE__ */pe(
|
|
337
|
-
/* @__PURE__ */pe(
|
|
338
|
-
/* @__PURE__ */me("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */pe("input",{type:"checkbox",id:"gdocs-sync",checked:d("enableGoogleDocsSync")||!1,onChange:e=>u({enableGoogleDocsSync:e.target.checked}),className:"h-4 w-4"}),/* @__PURE__ */pe(
|
|
338
|
+
/* @__PURE__ */pe(uS,{label:"Database Endpoint",children:/* @__PURE__ */pe(gf,{value:d("endpoint")||"",onChange:e=>u({endpoint:e.target.value}),placeholder:"https://your-db.turso.io"})}),
|
|
339
|
+
/* @__PURE__ */pe(uS,{label:"Auth Token (Optional)",children:/* @__PURE__ */pe(gf,{type:"password",value:d("authToken")||"",onChange:e=>u({authToken:e.target.value}),placeholder:"••••••••"})}),
|
|
340
|
+
/* @__PURE__ */pe(uS,{label:"Database Name (Optional)",children:/* @__PURE__ */pe(gf,{value:d("database")||"",onChange:e=>u({database:e.target.value}),placeholder:"my-database"})}),
|
|
341
|
+
/* @__PURE__ */me("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */pe("input",{type:"checkbox",id:"gdocs-sync",checked:d("enableGoogleDocsSync")||!1,onChange:e=>u({enableGoogleDocsSync:e.target.checked}),className:"h-4 w-4"}),/* @__PURE__ */pe(Kw,{htmlFor:"gdocs-sync",className:"cursor-pointer",children:"Enable Google Docs Sync"})]}),d("enableGoogleDocsSync")&&/* @__PURE__ */me("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md",children:[/* @__PURE__ */pe("div",{className:"flex-1",children:/* @__PURE__ */pe("p",{className:"text-sm",children:"Authenticate with Google to sync documents"})}),/* @__PURE__ */me(tp,{size:"sm",variant:"outline",children:[/* @__PURE__ */pe(Qe,{className:"h-4 w-4 mr-2"}),"Login with Google"]})]})]}):null;/* @__PURE__ */
|
|
339
342
|
return me("div",{className:"space-y-6",children:[
|
|
340
343
|
/* @__PURE__ */me("div",{children:[/* @__PURE__ */pe("h2",{className:"text-xl font-semibold mb-2",children:"File Sources"}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"Manage storage sources (SSH, S3, R2, B2, Google Docs, Turso DB)"})]}),
|
|
341
|
-
/* @__PURE__ */pe(
|
|
344
|
+
/* @__PURE__ */pe(_w,{}),
|
|
342
345
|
/* @__PURE__ */me("div",{className:"space-y-3",children:[t.map(e=>{/* @__PURE__ */return pe("div",{className:"border rounded-lg p-3 space-y-2",children:r===e.id?/* @__PURE__ */me("div",{className:"space-y-3",children:[
|
|
343
|
-
/* @__PURE__ */pe(
|
|
344
|
-
/* @__PURE__ */pe(
|
|
346
|
+
/* @__PURE__ */pe(uS,{label:"Source Name",children:/* @__PURE__ */pe(gf,{value:o.name,onChange:e=>i(t=>({...t,name:e.target.value})),placeholder:"My Remote Files"})}),p(e.type),
|
|
347
|
+
/* @__PURE__ */pe(hS,{onSave:s,onCancel:c,label:"Save"})]}):/* @__PURE__ */me("div",{className:"space-y-2",children:[/* @__PURE__ */me("div",{className:"flex items-center justify-between",children:[/* @__PURE__ */me("div",{className:"flex items-center gap-2",children:[
|
|
345
348
|
/* @__PURE__ */pe(h,{type:e.type}),
|
|
346
349
|
/* @__PURE__ */pe("span",{className:"font-medium",children:e.name}),
|
|
347
|
-
/* @__PURE__ */pe(
|
|
348
|
-
/* @__PURE__ */pe(
|
|
349
|
-
/* @__PURE__ */pe(
|
|
350
|
+
/* @__PURE__ */pe(df,{variant:"outline",className:"text-xs",children:(t=e.type,"gdocs"===t?"Google Docs":"turso"===t?"Turso DB":"b2"===t?"Backblaze B2":t.toUpperCase())})]}),"local-default"!==e.id&&/* @__PURE__ */me("div",{className:"flex gap-1",children:[/* @__PURE__ */pe(tp,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>(e=>{a(e.id),i({name:e.name,type:e.type,credentials:e.credentials||{}})})(e),children:/* @__PURE__ */pe(Pe,{className:"h-3 w-3"})}),/* @__PURE__ */pe(tp,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 text-destructive",onClick:()=>l(e.id),children:/* @__PURE__ */pe(xt,{className:"h-3 w-3"})})]})]}),/* @__PURE__ */pe(pS,{source:e})]})},e.id);var t}),"new"===r&&/* @__PURE__ */me("div",{className:"border rounded-lg p-3 space-y-3",children:[
|
|
351
|
+
/* @__PURE__ */pe(uS,{label:"Source Name",children:/* @__PURE__ */pe(gf,{value:o.name,onChange:e=>i(t=>({...t,name:e.target.value})),placeholder:"My Remote Files"})}),
|
|
352
|
+
/* @__PURE__ */pe(uS,{label:"Source Type",children:/* @__PURE__ */me("select",{value:o.type,onChange:e=>{const t=e.target.value;i({name:o.name,type:t,credentials:"gdocs"===t?{isAuthenticated:!1}:{}})},className:"w-full border rounded-md px-3 py-2 text-sm",children:[
|
|
350
353
|
/* @__PURE__ */pe("option",{value:"ssh",children:"SSH"}),
|
|
351
354
|
/* @__PURE__ */pe("option",{value:"s3",children:"Amazon S3"}),
|
|
352
355
|
/* @__PURE__ */pe("option",{value:"r2",children:"Cloudflare R2"}),
|
|
353
356
|
/* @__PURE__ */pe("option",{value:"b2",children:"Backblaze B2"}),
|
|
354
357
|
/* @__PURE__ */pe("option",{value:"gdocs",children:"Google Docs"}),
|
|
355
358
|
/* @__PURE__ */pe("option",{value:"turso",children:"Turso DB"})]})}),p(o.type),
|
|
356
|
-
/* @__PURE__ */pe(
|
|
359
|
+
/* @__PURE__ */pe(hS,{onSave:s,onCancel:c,label:"Add Source"})]})]}),"new"!==r&&/* @__PURE__ */me(tp,{variant:"outline",size:"sm",onClick:()=>{a("new"),i({name:"",type:"ssh",credentials:{port:22}})},className:"w-full gap-2",children:[/* @__PURE__ */pe(dt,{className:"h-4 w-4"}),"Add New File Source"]})]})},uS=({label:e,children:t})=>/* @__PURE__ */me("div",{className:"space-y-2",children:[/* @__PURE__ */pe(Kw,{children:e}),t]}),hS=({onSave:e,onCancel:t,label:n})=>/* @__PURE__ */me("div",{className:"flex gap-2",children:[/* @__PURE__ */pe(tp,{size:"sm",onClick:e,children:n}),/* @__PURE__ */pe(tp,{size:"sm",variant:"outline",onClick:t,children:"Cancel"})]}),pS=({source:e})=>{if("ssh"===e.type&&e.credentials){const t=e.credentials;/* @__PURE__ */
|
|
357
360
|
return me("p",{className:"text-xs text-muted-foreground",children:[t.username,"@",t.host,":",t.port||22]})}if("s3"===e.type&&e.credentials){const t=e.credentials;/* @__PURE__ */
|
|
358
361
|
return me("p",{className:"text-xs text-muted-foreground",children:[t.bucket," (",t.region,")"]})}if("r2"===e.type&&e.credentials){const t=e.credentials;/* @__PURE__ */
|
|
359
362
|
return pe("p",{className:"text-xs text-muted-foreground",children:t.bucket})}if("b2"===e.type&&e.credentials){const t=e.credentials;/* @__PURE__ */
|
|
360
363
|
return me("p",{className:"text-xs text-muted-foreground",children:[t.bucket," (",t.endpoint||"default endpoint",")"]})}if("gdocs"===e.type&&e.credentials){const t=e.credentials;/* @__PURE__ */
|
|
361
364
|
return pe("p",{className:"text-xs text-muted-foreground",children:t.isAuthenticated?`${t.email||"Authenticated"} - ${t.folderIds?.length||0} folder(s)`:"Not authenticated"})}if("turso"===e.type&&e.credentials){const t=e.credentials;/* @__PURE__ */
|
|
362
|
-
return me("p",{className:"text-xs text-muted-foreground",children:[t.endpoint,t.enableGoogleDocsSync&&" (Google Docs sync enabled)"]})}return null},
|
|
363
|
-
/* @__PURE__ */me("div",{className:"space-y-2",children:[/* @__PURE__ */pe(
|
|
364
|
-
/* @__PURE__ */me("div",{className:"space-y-2",children:[/* @__PURE__ */pe(
|
|
365
|
-
/* @__PURE__ */me("div",{className:"space-y-2",children:[/* @__PURE__ */pe(
|
|
365
|
+
return me("p",{className:"text-xs text-muted-foreground",children:[t.endpoint,t.enableGoogleDocsSync&&" (Google Docs sync enabled)"]})}return null},mS=["blue","purple","green","orange","pink"],fS=({open:e})=>{const[t,n]=le([]),[r,a]=le(null),[o,i]=le({});te(()=>{e&&n(pf())},[e]);const s=({modeId:e,onSave:t,onCancel:n})=>/* @__PURE__ */me("div",{className:"space-y-3",children:[
|
|
366
|
+
/* @__PURE__ */me("div",{className:"space-y-2",children:[/* @__PURE__ */pe(Kw,{htmlFor:`name-${e}`,children:"Mode Name"}),/* @__PURE__ */pe(gf,{id:`name-${e}`,value:o.name||"",onChange:e=>i(t=>({...t,name:e.target.value})),placeholder:"Mode name"})]}),
|
|
367
|
+
/* @__PURE__ */me("div",{className:"space-y-2",children:[/* @__PURE__ */pe(Kw,{htmlFor:`prompt-${e}`,children:"Prompt"}),/* @__PURE__ */pe(Vf,{id:`prompt-${e}`,value:o.prompt||"",onChange:e=>i(t=>({...t,prompt:e.target.value})),placeholder:"Rewrite prompt...",rows:4})]}),
|
|
368
|
+
/* @__PURE__ */me("div",{className:"space-y-2",children:[/* @__PURE__ */pe(Kw,{htmlFor:`color-${e}`,children:"Color"}),/* @__PURE__ */pe("select",{id:`color-${e}`,value:o.color||"blue",onChange:e=>i(t=>({...t,color:e.target.value})),className:"w-full border rounded-md px-3 py-2 text-sm",children:mS.map(e=>/* @__PURE__ */pe("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),
|
|
366
369
|
/* @__PURE__ */me("div",{className:"flex gap-2",children:[/* @__PURE__ */pe(tp,{size:"sm",onClick:t,children:"Save"}),/* @__PURE__ */pe(tp,{size:"sm",variant:"outline",onClick:n,children:"Cancel"})]})]});/* @__PURE__ */
|
|
367
370
|
return me("div",{className:"space-y-6",children:[
|
|
368
|
-
/* @__PURE__ */me("div",{className:"flex items-center justify-between",children:[/* @__PURE__ */me("div",{children:[/* @__PURE__ */pe("h2",{className:"text-xl font-semibold mb-2",children:"AI Rewrite Modes"}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"Customize AI rewrite prompts and add your own modes"})]}),/* @__PURE__ */me(tp,{variant:"outline",size:"sm",onClick:()=>{
|
|
369
|
-
/* @__PURE__ */pe(
|
|
370
|
-
/* @__PURE__ */me("div",{className:"space-y-3",children:[t.map(e=>/* @__PURE__ */pe("div",{className:"border rounded-lg p-3 space-y-2",children:r===e.id?/* @__PURE__ */pe(s,{modeId:e.id,onSave:()=>(e=>{const r=t.map(t=>t.id===e.id?e:t);n(r),
|
|
371
|
+
/* @__PURE__ */me("div",{className:"flex items-center justify-between",children:[/* @__PURE__ */me("div",{children:[/* @__PURE__ */pe("h2",{className:"text-xl font-semibold mb-2",children:"AI Rewrite Modes"}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"Customize AI rewrite prompts and add your own modes"})]}),/* @__PURE__ */me(tp,{variant:"outline",size:"sm",onClick:()=>{mf(uf),n(pf()),lS.success("Modes reset to defaults")},className:"gap-2",children:[/* @__PURE__ */pe(ut,{className:"h-4 w-4"}),"Reset"]})]}),
|
|
372
|
+
/* @__PURE__ */pe(_w,{}),
|
|
373
|
+
/* @__PURE__ */me("div",{className:"space-y-3",children:[t.map(e=>/* @__PURE__ */pe("div",{className:"border rounded-lg p-3 space-y-2",children:r===e.id?/* @__PURE__ */pe(s,{modeId:e.id,onSave:()=>(e=>{const r=t.map(t=>t.id===e.id?e:t);n(r),mf(r),a(null),i({}),lS.success("Mode updated")})(o),onCancel:()=>{a(null),i({})}}):/* @__PURE__ */me("div",{className:"space-y-2",children:[/* @__PURE__ */me("div",{className:"flex items-center justify-between",children:[/* @__PURE__ */pe(df,{variant:"outline",className:"text-sm",children:e.name}),/* @__PURE__ */me("div",{className:"flex gap-1",children:[/* @__PURE__ */pe(tp,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>{a(e.id),i(e)},children:/* @__PURE__ */pe(Pe,{className:"h-3 w-3"})}),/* @__PURE__ */pe(tp,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 text-destructive",onClick:()=>(e=>{const r=t.filter(t=>t.id!==e);n(r),mf(r),lS.success("Mode deleted")})(e.id),children:/* @__PURE__ */pe(xt,{className:"h-3 w-3"})})]})]}),/* @__PURE__ */pe("p",{className:"text-xs text-muted-foreground line-clamp-2",children:e.prompt})]})},e.id)),"new"===r&&/* @__PURE__ */pe("div",{className:"border rounded-lg p-3",children:/* @__PURE__ */pe(s,{modeId:"new",onSave:()=>{const e={id:`custom-${Date.now()}`,name:o.name||"New Mode",prompt:o.prompt||"Rewrite this text:",color:o.color||"blue"},r=[...t,e];n(r),mf(r),a(null),i({}),lS.success("Mode added")},onCancel:()=>{a(null),i({})}})})]}),"new"!==r&&/* @__PURE__ */me(tp,{variant:"outline",size:"sm",onClick:()=>{a("new"),i({name:"",prompt:"",color:"blue"})},className:"w-full gap-2",children:[/* @__PURE__ */pe(dt,{className:"h-4 w-4"}),"Add New Mode"]})]})},gS=()=>/* @__PURE__ */me("div",{className:"space-y-6",children:[
|
|
371
374
|
/* @__PURE__ */me("div",{children:[/* @__PURE__ */pe("h2",{className:"text-xl font-semibold mb-2",children:"About"}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"Application information"})]}),
|
|
372
|
-
/* @__PURE__ */pe(
|
|
373
|
-
/* @__PURE__ */me("div",{className:"text-sm space-y-3",children:[/* @__PURE__ */me("div",{className:"space-y-1",children:[/* @__PURE__ */pe("p",{className:"font-medium",children:"REASON"}),/* @__PURE__ */pe("p",{className:"text-muted-foreground",children:"A powerful note-taking application"})]}),/* @__PURE__ */me("div",{className:"space-y-1",children:[/* @__PURE__ */pe("p",{className:"font-medium",children:"Version"}),/* @__PURE__ */pe("p",{className:"text-muted-foreground",children:"1.0.0"})]})]})]}),
|
|
375
|
+
/* @__PURE__ */pe(_w,{}),
|
|
376
|
+
/* @__PURE__ */me("div",{className:"text-sm space-y-3",children:[/* @__PURE__ */me("div",{className:"space-y-1",children:[/* @__PURE__ */pe("p",{className:"font-medium",children:"REASON"}),/* @__PURE__ */pe("p",{className:"text-muted-foreground",children:"A powerful note-taking application"})]}),/* @__PURE__ */me("div",{className:"space-y-1",children:[/* @__PURE__ */pe("p",{className:"font-medium",children:"Version"}),/* @__PURE__ */pe("p",{className:"text-muted-foreground",children:"1.0.0"})]})]})]}),vS=[{name:"Appearance",icon:st},{name:"Storage",icon:ze},{name:"File Sources",icon:Ge},{name:"AI Rewrite Modes",icon:kt},{name:"About",icon:Ye}],yS=({open:e,onOpenChange:t,initialSection:n,defaultSidebarView:r="last-used",onDefaultSidebarViewChange:a,enableDatabaseSync:o=!1,onEnableDatabaseSyncChange:i})=>{const[s,l]=le(n||"Appearance");te(()=>{e&&l(n||"Appearance")},[e,n]);/* @__PURE__ */
|
|
374
377
|
return pe(qh,{open:e,onOpenChange:t,children:/* @__PURE__ */me(Gh,{className:"overflow-hidden p-0 md:max-h-[500px] md:max-w-[700px] lg:max-w-[800px]",children:[
|
|
375
378
|
/* @__PURE__ */pe(Yh,{className:"sr-only",children:"Settings"}),
|
|
376
379
|
/* @__PURE__ */pe(Kh,{className:"sr-only",children:"Customize your settings here."}),
|
|
377
|
-
/* @__PURE__ */me(
|
|
378
|
-
/* @__PURE__ */pe(
|
|
379
|
-
/* @__PURE__ */pe(
|
|
380
|
-
/* @__PURE__ */pe(
|
|
381
|
-
return pe(Ft.Root,{"data-slot":"tabs",className:Il("flex flex-col gap-2",e),...t})}function
|
|
382
|
-
return pe(Ft.List,{"data-slot":"tabs-list",className:Il("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-2xl p-[3px]",e),...t})}function
|
|
383
|
-
return pe(Ft.Trigger,{"data-slot":"tabs-trigger",className:Il("cursor-pointer data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-2xl border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function
|
|
384
|
-
return pe(Ft.Content,{"data-slot":"tabs-content",className:Il("flex-1 outline-none",e),...t})}var
|
|
385
|
-
/* @__PURE__ */pe(
|
|
380
|
+
/* @__PURE__ */me(Ow,{className:"items-start",children:[/* @__PURE__ */pe(Lw,{collapsible:"none",className:"hidden md:flex",children:/* @__PURE__ */pe(Fw,{children:/* @__PURE__ */pe(Bw,{children:/* @__PURE__ */pe(Vw,{children:/* @__PURE__ */pe(Hw,{children:vS.map(e=>/* @__PURE__ */pe($w,{children:/* @__PURE__ */pe(jw,{asChild:!0,isActive:e.name===s,onClick:()=>l(e.name),children:/* @__PURE__ */me("a",{href:"#",children:[/* @__PURE__ */pe(e.icon,{}),/* @__PURE__ */pe("span",{children:e.name})]})})},e.name))})})})})}),/* @__PURE__ */me("main",{className:"flex h-[480px] flex-1 flex-col overflow-hidden",children:[/* @__PURE__ */pe("header",{className:"flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12",children:/* @__PURE__ */pe("div",{className:"flex items-center gap-2 px-4",children:/* @__PURE__ */pe(Tw,{children:/* @__PURE__ */me(Aw,{children:[
|
|
381
|
+
/* @__PURE__ */pe(Mw,{className:"hidden md:block",children:/* @__PURE__ */me(Iw,{href:"#",children:[/* @__PURE__ */pe(mt,{className:"h-4 w-4 inline mr-1"}),"Settings"]})}),
|
|
382
|
+
/* @__PURE__ */pe(Ew,{className:"hidden md:block"}),
|
|
383
|
+
/* @__PURE__ */pe(Mw,{children:/* @__PURE__ */pe(Dw,{children:s})})]})})})}),/* @__PURE__ */pe("div",{className:"flex flex-1 flex-col gap-4 overflow-y-auto p-4 pt-0",children:(()=>{switch(s){case"Appearance":/* @__PURE__ */return pe(nS,{defaultSidebarView:r,onDefaultSidebarViewChange:a});case"Storage":/* @__PURE__ */return pe(rS,{enableDatabaseSync:o,onEnableDatabaseSyncChange:i});case"File Sources":/* @__PURE__ */return pe(dS,{open:e});case"AI Rewrite Modes":/* @__PURE__ */return pe(fS,{open:e});case"About":/* @__PURE__ */return pe(gS,{});default:return null}})()})]})]})]})})};function bS({className:e,...t}){/* @__PURE__ */
|
|
384
|
+
return pe(Ft.Root,{"data-slot":"tabs",className:Il("flex flex-col gap-2",e),...t})}function xS({className:e,...t}){/* @__PURE__ */
|
|
385
|
+
return pe(Ft.List,{"data-slot":"tabs-list",className:Il("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-2xl p-[3px]",e),...t})}function wS({className:e,...t}){/* @__PURE__ */
|
|
386
|
+
return pe(Ft.Trigger,{"data-slot":"tabs-trigger",className:Il("cursor-pointer data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-2xl border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function SS({className:e,...t}){/* @__PURE__ */
|
|
387
|
+
return pe(Ft.Content,{"data-slot":"tabs-content",className:Il("flex-1 outline-none",e),...t})}var kS=zt.Root,CS=zt.Value,NS=q.forwardRef(({className:e,children:t,...n},r)=>/* @__PURE__ */me(zt.Trigger,{ref:r,className:Il("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 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,/* @__PURE__ */pe(zt.Icon,{asChild:!0,children:/* @__PURE__ */pe(be,{className:"h-4 w-4 opacity-50"})})]}));NS.displayName=zt.Trigger.displayName;var TS=q.forwardRef(({className:e,...t},n)=>/* @__PURE__ */pe(zt.ScrollUpButton,{ref:n,className:Il("flex cursor-default items-center justify-center py-1",e),...t,children:/* @__PURE__ */pe(ke,{className:"h-4 w-4"})}));TS.displayName=zt.ScrollUpButton.displayName;var AS=q.forwardRef(({className:e,...t},n)=>/* @__PURE__ */pe(zt.ScrollDownButton,{ref:n,className:Il("flex cursor-default items-center justify-center py-1",e),...t,children:/* @__PURE__ */pe(be,{className:"h-4 w-4"})}));AS.displayName=zt.ScrollDownButton.displayName;var MS=q.forwardRef(({className:e,children:t,position:n="popper",...r},a)=>/* @__PURE__ */pe(zt.Portal,{children:/* @__PURE__ */me(zt.Content,{ref:a,className:Il("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===n&&"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:[
|
|
388
|
+
/* @__PURE__ */pe(TS,{}),
|
|
386
389
|
/* @__PURE__ */pe(zt.Viewport,{className:Il("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),
|
|
387
|
-
/* @__PURE__ */pe(
|
|
390
|
+
/* @__PURE__ */pe(AS,{})]})}));MS.displayName=zt.Content.displayName,q.forwardRef(({className:e,...t},n)=>/* @__PURE__ */pe(zt.Label,{ref:n,className:Il("px-2 py-1.5 text-sm font-semibold",e),...t})).displayName=zt.Label.displayName;var IS=q.forwardRef(({className:e,children:t,...n},r)=>/* @__PURE__ */me(zt.Item,{ref:r,className:Il("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:[/* @__PURE__ */pe("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:/* @__PURE__ */pe(zt.ItemIndicator,{children:/* @__PURE__ */pe(ve,{className:"h-4 w-4"})})}),/* @__PURE__ */pe(zt.ItemText,{children:t})]}));function DS(e,t){const[n,r]=le(()=>{try{const n=window.localStorage.getItem(e);if(!n)return t;const r=JSON.parse(n);return Array.isArray(r)&&0===r.length&&Array.isArray(t)&&t.length>0?t:r}catch(n){return t}});return[n,t=>{try{const a=t instanceof Function?t(n):t;r(a),window.localStorage.setItem(e,JSON.stringify(a))}catch(a){}}]}IS.displayName=zt.Item.displayName,q.forwardRef(({className:e,...t},n)=>/* @__PURE__ */pe(zt.Separator,{ref:n,className:Il("-mx-1 my-1 h-px bg-muted",e),...t})).displayName=zt.Separator.displayName;var ES={owner:/* @__PURE__ */pe(_e,{className:"h-3 w-3"}),admin:/* @__PURE__ */pe(ft,{className:"h-3 w-3"}),member:/* @__PURE__ */pe(St,{className:"h-3 w-3"}),viewer:/* @__PURE__ */pe(Le,{className:"h-3 w-3"})},RS={owner:"bg-yellow-500/10 text-yellow-700 dark:text-yellow-400",admin:"bg-purple-500/10 text-purple-700 dark:text-purple-400",member:"bg-blue-500/10 text-blue-700 dark:text-blue-400",viewer:"bg-gray-500/10 text-gray-700 dark:text-gray-400"},_S=({open:e,onOpenChange:t})=>{const[n,r]=DS("REASON-organizations",[{id:"1",name:"My Organization",slug:"my-org",description:"Your personal workspace",teams:[{id:"1",name:"General",description:"Default team for collaboration",members:[{id:"1",name:"You",email:"you@example.com",role:"owner",joinedAt:/* @__PURE__ */new Date}],createdAt:/* @__PURE__ */new Date,updatedAt:/* @__PURE__ */new Date}],createdAt:/* @__PURE__ */new Date,updatedAt:/* @__PURE__ */new Date}]),[a,o]=le(n[0]?.id||null),[i,s]=le(null),[l,c]=le(!1),[d,u]=le(null),[h,p]=le(""),[m,f]=le("member"),g=n.find(e=>e.id===a),v=g?.teams.find(e=>e.id===i);/* @__PURE__ */
|
|
388
391
|
return me(he,{children:[
|
|
389
|
-
/* @__PURE__ */pe(qh,{open:e,onOpenChange:t,children:/* @__PURE__ */me(Gh,{className:"max-w-4xl max-h-[85vh]",children:[/* @__PURE__ */me(Wh,{children:[/* @__PURE__ */me("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */pe(ge,{className:"h-5 w-5"}),/* @__PURE__ */pe(Yh,{children:"Teams & Organizations"})]}),/* @__PURE__ */pe(Kh,{children:"Manage your teams and collaborate with others"})]}),/* @__PURE__ */me(
|
|
390
|
-
/* @__PURE__ */me(
|
|
391
|
-
/* @__PURE__ */me(
|
|
392
|
-
/* @__PURE__ */me("div",{className:"flex items-center justify-between",children:[/* @__PURE__ */me("div",{className:"space-y-1",children:[/* @__PURE__ */pe("h3",{className:"font-semibold",children:"Your Teams"}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"Collaborate with team members"})]}),/* @__PURE__ */me(tp,{onClick:()=>{if(!a)return;const e={id:Date.now().toString(),name:"New Team",members:[],createdAt:/* @__PURE__ */new Date,updatedAt:/* @__PURE__ */new Date};r(t=>t.map(t=>t.id===a?{...t,teams:[...t.teams,e],updatedAt:/* @__PURE__ */new Date}:t)),s(e.id),
|
|
393
|
-
/* @__PURE__ */pe(
|
|
394
|
-
/* @__PURE__ */pe(
|
|
392
|
+
/* @__PURE__ */pe(qh,{open:e,onOpenChange:t,children:/* @__PURE__ */me(Gh,{className:"max-w-4xl max-h-[85vh]",children:[/* @__PURE__ */me(Wh,{children:[/* @__PURE__ */me("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */pe(ge,{className:"h-5 w-5"}),/* @__PURE__ */pe(Yh,{children:"Teams & Organizations"})]}),/* @__PURE__ */pe(Kh,{children:"Manage your teams and collaborate with others"})]}),/* @__PURE__ */me(bS,{defaultValue:"teams",className:"flex-1",children:[
|
|
393
|
+
/* @__PURE__ */me(xS,{className:"grid w-full grid-cols-2",children:[/* @__PURE__ */pe(wS,{value:"teams",children:"Teams"}),/* @__PURE__ */pe(wS,{value:"organizations",children:"Organizations"})]}),
|
|
394
|
+
/* @__PURE__ */me(SS,{value:"teams",className:"space-y-4 mt-4",children:[
|
|
395
|
+
/* @__PURE__ */me("div",{className:"flex items-center justify-between",children:[/* @__PURE__ */me("div",{className:"space-y-1",children:[/* @__PURE__ */pe("h3",{className:"font-semibold",children:"Your Teams"}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"Collaborate with team members"})]}),/* @__PURE__ */me(tp,{onClick:()=>{if(!a)return;const e={id:Date.now().toString(),name:"New Team",members:[],createdAt:/* @__PURE__ */new Date,updatedAt:/* @__PURE__ */new Date};r(t=>t.map(t=>t.id===a?{...t,teams:[...t.teams,e],updatedAt:/* @__PURE__ */new Date}:t)),s(e.id),lS.success("Team created")},size:"sm",children:[/* @__PURE__ */pe(dt,{className:"h-4 w-4 mr-2"}),"New Team"]})]}),
|
|
396
|
+
/* @__PURE__ */pe(_w,{}),
|
|
397
|
+
/* @__PURE__ */pe(Sw,{className:"h-[50vh]",children:g&&g.teams.length>0?/* @__PURE__ */pe("div",{className:"space-y-4",children:g.teams.map(e=>/* @__PURE__ */me("div",{className:"border rounded-lg p-4 space-y-4",children:[/* @__PURE__ */me("div",{className:"flex items-start justify-between",children:[/* @__PURE__ */me("div",{className:"space-y-1",children:[
|
|
395
398
|
/* @__PURE__ */me("h4",{className:"font-semibold flex items-center gap-2",children:[/* @__PURE__ */pe(St,{className:"h-4 w-4"}),e.name]}),e.description&&/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:e.description}),
|
|
396
|
-
/* @__PURE__ */me("p",{className:"text-xs text-muted-foreground",children:[e.members.length," member",1!==e.members.length?"s":""]})]}),/* @__PURE__ */me(tp,{variant:"outline",size:"sm",onClick:()=>{s(e.id),c(!0)},children:[/* @__PURE__ */pe(wt,{className:"h-4 w-4 mr-2"}),"Invite"]})]}),/* @__PURE__ */pe("div",{className:"space-y-2",children:e.members.map(e=>/* @__PURE__ */me("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[/* @__PURE__ */me("div",{className:"flex items-center gap-3",children:[/* @__PURE__ */me(
|
|
397
|
-
/* @__PURE__ */pe(
|
|
398
|
-
/* @__PURE__ */pe(
|
|
399
|
-
/* @__PURE__ */pe(
|
|
400
|
-
/* @__PURE__ */me(
|
|
399
|
+
/* @__PURE__ */me("p",{className:"text-xs text-muted-foreground",children:[e.members.length," member",1!==e.members.length?"s":""]})]}),/* @__PURE__ */me(tp,{variant:"outline",size:"sm",onClick:()=>{s(e.id),c(!0)},children:[/* @__PURE__ */pe(wt,{className:"h-4 w-4 mr-2"}),"Invite"]})]}),/* @__PURE__ */pe("div",{className:"space-y-2",children:e.members.map(e=>/* @__PURE__ */me("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[/* @__PURE__ */me("div",{className:"flex items-center gap-3",children:[/* @__PURE__ */me(Lf,{className:"h-8 w-8",children:[/* @__PURE__ */pe(Ff,{src:e.avatarUrl}),/* @__PURE__ */pe(Bf,{children:e.name.substring(0,2).toUpperCase()})]}),/* @__PURE__ */me("div",{children:[/* @__PURE__ */pe("p",{className:"text-sm font-medium",children:e.name}),/* @__PURE__ */pe("p",{className:"text-xs text-muted-foreground",children:e.email})]})]}),/* @__PURE__ */me("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */me(df,{variant:"secondary",className:RS[e.role],children:[/* @__PURE__ */pe("span",{className:"mr-1",children:ES[e.role]}),e.role]}),"owner"!==e.role&&/* @__PURE__ */me(he,{children:[/* @__PURE__ */me(kS,{value:e.role,onValueChange:t=>{return n=e.id,o=t,void(a&&i&&(r(e=>e.map(e=>e.id===a?{...e,teams:e.teams.map(e=>e.id===i?{...e,members:e.members.map(e=>e.id===n?{...e,role:o}:e),updatedAt:/* @__PURE__ */new Date}:e)}:e)),lS.success("Role updated")));var n,o},children:[/* @__PURE__ */pe(NS,{className:"h-8 w-28",children:/* @__PURE__ */pe(CS,{})}),/* @__PURE__ */me(MS,{children:[
|
|
400
|
+
/* @__PURE__ */pe(IS,{value:"admin",children:"Admin"}),
|
|
401
|
+
/* @__PURE__ */pe(IS,{value:"member",children:"Member"}),
|
|
402
|
+
/* @__PURE__ */pe(IS,{value:"viewer",children:"Viewer"})]})]}),/* @__PURE__ */pe(tp,{variant:"ghost",size:"sm",onClick:()=>u(e),children:/* @__PURE__ */pe(xt,{className:"h-4 w-4 text-destructive"})})]})]})]},e.id))})]},e.id))}):/* @__PURE__ */me("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[/* @__PURE__ */pe(St,{className:"h-12 w-12 text-muted-foreground mb-4 opacity-50"}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"No teams yet. Create your first team to get started."})]})})]}),
|
|
403
|
+
/* @__PURE__ */me(SS,{value:"organizations",className:"space-y-4 mt-4",children:[
|
|
401
404
|
/* @__PURE__ */me("div",{className:"space-y-1",children:[/* @__PURE__ */pe("h3",{className:"font-semibold",children:"Your Organizations"}),/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"Manage organization settings and details"})]}),
|
|
402
|
-
/* @__PURE__ */pe(
|
|
403
|
-
/* @__PURE__ */pe(
|
|
405
|
+
/* @__PURE__ */pe(_w,{}),
|
|
406
|
+
/* @__PURE__ */pe(Sw,{className:"h-[50vh]",children:n.map(e=>/* @__PURE__ */pe("div",{className:"border rounded-lg p-4 space-y-4 mb-4",children:/* @__PURE__ */me("div",{className:"flex items-start gap-4",children:[/* @__PURE__ */me(Lf,{className:"h-16 w-16",children:[/* @__PURE__ */pe(Ff,{src:e.logoUrl}),/* @__PURE__ */pe(Bf,{className:"text-lg",children:e.name.substring(0,2).toUpperCase()})]}),/* @__PURE__ */me("div",{className:"flex-1 space-y-1",children:[
|
|
404
407
|
/* @__PURE__ */pe("h4",{className:"font-semibold text-lg",children:e.name}),
|
|
405
408
|
/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:e.slug}),e.description&&/* @__PURE__ */pe("p",{className:"text-sm",children:e.description}),
|
|
406
409
|
/* @__PURE__ */me("div",{className:"flex gap-4 text-xs text-muted-foreground pt-2",children:[/* @__PURE__ */me("span",{children:[e.teams.length," teams"]}),/* @__PURE__ */me("span",{children:[e.teams.reduce((e,t)=>e+t.members.length,0)," ","members"]})]})]})]})},e.id))})]})]})]})}),
|
|
407
410
|
/* @__PURE__ */pe(qh,{open:l,onOpenChange:c,children:/* @__PURE__ */me(Gh,{children:[
|
|
408
411
|
/* @__PURE__ */me(Wh,{children:[/* @__PURE__ */pe(Yh,{children:"Invite Team Member"}),/* @__PURE__ */me(Kh,{children:["Send an invitation to join ",v?.name]})]}),
|
|
409
|
-
/* @__PURE__ */me("div",{className:"space-y-4 py-4",children:[/* @__PURE__ */me("div",{className:"space-y-2",children:[/* @__PURE__ */pe(
|
|
410
|
-
/* @__PURE__ */pe(
|
|
411
|
-
/* @__PURE__ */pe(
|
|
412
|
-
/* @__PURE__ */pe(
|
|
413
|
-
/* @__PURE__ */me("div",{className:"flex justify-end gap-2",children:[/* @__PURE__ */pe(tp,{variant:"outline",onClick:()=>c(!1),children:"Cancel"}),/* @__PURE__ */pe(tp,{onClick:()=>{if(!h.trim()||!a||!i)return;const e={id:Date.now().toString(),name:h.split("@")[0],email:h,role:m,joinedAt:/* @__PURE__ */new Date};r(t=>t.map(t=>t.id===a?{...t,teams:t.teams.map(t=>t.id===i?{...t,members:[...t.members,e],updatedAt:/* @__PURE__ */new Date}:t)}:t)),p(""),f("member"),c(!1),
|
|
414
|
-
/* @__PURE__ */pe(Rm,{open:!!d,onOpenChange:()=>u(null),children:/* @__PURE__ */me(Pm,{children:[/* @__PURE__ */me(Om,{children:[/* @__PURE__ */pe(Fm,{children:"Remove Team Member"}),/* @__PURE__ */me(Bm,{children:["Are you sure you want to remove ",d?.name," from the team? They will lose access to all team resources."]})]}),/* @__PURE__ */me(Lm,{children:[/* @__PURE__ */pe(Hm,{children:"Cancel"}),/* @__PURE__ */pe(Vm,{onClick:()=>{return d&&(e=d.id,void(a&&i&&(r(t=>t.map(t=>t.id===a?{...t,teams:t.teams.map(t=>t.id===i?{...t,members:t.members.filter(t=>t.id!==e),updatedAt:/* @__PURE__ */new Date}:t)}:t)),u(null),
|
|
415
|
-
return pe(Lt.Root,{"data-slot":"switch",className:Il("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:/* @__PURE__ */pe(Lt.Thumb,{"data-slot":"switch-thumb",className:Il("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}var
|
|
412
|
+
/* @__PURE__ */me("div",{className:"space-y-4 py-4",children:[/* @__PURE__ */me("div",{className:"space-y-2",children:[/* @__PURE__ */pe(Kw,{htmlFor:"email",children:"Email Address"}),/* @__PURE__ */me("div",{className:"relative",children:[/* @__PURE__ */pe(et,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),/* @__PURE__ */pe(gf,{id:"email",type:"email",placeholder:"colleague@example.com",value:h,onChange:e=>p(e.target.value),className:"pl-9"})]})]}),/* @__PURE__ */me("div",{className:"space-y-2",children:[/* @__PURE__ */pe(Kw,{htmlFor:"role",children:"Role"}),/* @__PURE__ */me(kS,{value:m,onValueChange:e=>f(e),children:[/* @__PURE__ */pe(NS,{children:/* @__PURE__ */pe(CS,{})}),/* @__PURE__ */me(MS,{children:[
|
|
413
|
+
/* @__PURE__ */pe(IS,{value:"admin",children:"Admin"}),
|
|
414
|
+
/* @__PURE__ */pe(IS,{value:"member",children:"Member"}),
|
|
415
|
+
/* @__PURE__ */pe(IS,{value:"viewer",children:"Viewer"})]})]})]})]}),
|
|
416
|
+
/* @__PURE__ */me("div",{className:"flex justify-end gap-2",children:[/* @__PURE__ */pe(tp,{variant:"outline",onClick:()=>c(!1),children:"Cancel"}),/* @__PURE__ */pe(tp,{onClick:()=>{if(!h.trim()||!a||!i)return;const e={id:Date.now().toString(),name:h.split("@")[0],email:h,role:m,joinedAt:/* @__PURE__ */new Date};r(t=>t.map(t=>t.id===a?{...t,teams:t.teams.map(t=>t.id===i?{...t,members:[...t.members,e],updatedAt:/* @__PURE__ */new Date}:t)}:t)),p(""),f("member"),c(!1),lS.success("Member invited")},children:"Send Invitation"})]})]})}),
|
|
417
|
+
/* @__PURE__ */pe(Rm,{open:!!d,onOpenChange:()=>u(null),children:/* @__PURE__ */me(Pm,{children:[/* @__PURE__ */me(Om,{children:[/* @__PURE__ */pe(Fm,{children:"Remove Team Member"}),/* @__PURE__ */me(Bm,{children:["Are you sure you want to remove ",d?.name," from the team? They will lose access to all team resources."]})]}),/* @__PURE__ */me(Lm,{children:[/* @__PURE__ */pe(Hm,{children:"Cancel"}),/* @__PURE__ */pe(Vm,{onClick:()=>{return d&&(e=d.id,void(a&&i&&(r(t=>t.map(t=>t.id===a?{...t,teams:t.teams.map(t=>t.id===i?{...t,members:t.members.filter(t=>t.id!==e),updatedAt:/* @__PURE__ */new Date}:t)}:t)),u(null),lS.success("Member removed"))));var e},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]})})]})};function zS({className:e,...t}){/* @__PURE__ */
|
|
418
|
+
return pe(Lt.Root,{"data-slot":"switch",className:Il("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:/* @__PURE__ */pe(Lt.Thumb,{"data-slot":"switch-thumb",className:Il("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}var PS=({open:e,onOpenChange:t,documentTitle:n,documentId:r,sharingInfo:a,teams:o=[],onUpdateSharing:i})=>{const[s,l]=le(""),[c,d]=le("editor"),[u,h]=le(a?.isPublic||!1),[p,m]=le(a?.sharedWith||[]),[f,g]=le(a?.shareLink||null),[v,y]=le(!1),b=()=>{if(!s.trim())return;if(p.find(e=>e.email===s))return void lS.error("Already shared with this user");const e={email:s,role:c,sharedAt:/* @__PURE__ */(new Date).toISOString()},t=[...p,e];m(t),i&&i({...a,isPublic:u,sharedWith:t}),l(""),lS.success(`Invited ${s}`)},x=async()=>{if(!v){y(!0);try{const e=await Bt("doc/share",{method:"POST",headers:{"Content-Type":"application/json"},body:{documentId:r}});return e.success?(g(e.data.shareUrl),i&&i({...a,isPublic:u,sharedWith:p,shareLink:e.data.shareUrl}),e.data.shareUrl):(lS.error(e.error||"Failed to generate share link"),null)}catch(e){return lS.error(e.message||"Failed to generate share link"),null}finally{y(!1)}}};/* @__PURE__ */
|
|
416
419
|
return pe(qh,{open:e,onOpenChange:t,children:/* @__PURE__ */me(Gh,{className:"max-w-2xl max-h-[85vh]",children:[/* @__PURE__ */me(Wh,{children:[/* @__PURE__ */me("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */pe(wt,{className:"h-5 w-5"}),/* @__PURE__ */me(Yh,{children:['Share "',n,'"']})]}),/* @__PURE__ */pe(Kh,{children:"Invite people or share with teams"})]}),/* @__PURE__ */me("div",{className:"space-y-6",children:[
|
|
417
|
-
/* @__PURE__ */me("div",{className:"flex items-center justify-between p-4 rounded-lg border bg-muted/30",children:[/* @__PURE__ */me("div",{className:"flex items-center gap-3",children:[u?/* @__PURE__ */pe(Ue,{className:"h-5 w-5 text-primary"}):/* @__PURE__ */pe(Je,{className:"h-5 w-5 text-muted-foreground"}),/* @__PURE__ */me("div",{children:[/* @__PURE__ */pe("p",{className:"font-medium text-sm",children:u?"Public Access":"Private"}),/* @__PURE__ */pe("p",{className:"text-xs text-muted-foreground",children:u?"Anyone with the link can view":"Only invited people can access"})]})]}),/* @__PURE__ */me("div",{className:"flex items-center gap-2",children:[u&&/* @__PURE__ */pe(tp,{variant:"ghost",size:"sm",onClick:async()=>{let e=f;(e||(e=await x(),e))&&(navigator.clipboard.writeText(e),
|
|
418
|
-
/* @__PURE__ */me("div",{className:"space-y-3",children:[/* @__PURE__ */pe(
|
|
419
|
-
/* @__PURE__ */me("div",{className:"relative flex-1",children:[/* @__PURE__ */pe(et,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),/* @__PURE__ */pe(
|
|
420
|
-
/* @__PURE__ */me(
|
|
421
|
-
/* @__PURE__ */pe(
|
|
422
|
-
/* @__PURE__ */pe(
|
|
423
|
-
/* @__PURE__ */pe(
|
|
420
|
+
/* @__PURE__ */me("div",{className:"flex items-center justify-between p-4 rounded-lg border bg-muted/30",children:[/* @__PURE__ */me("div",{className:"flex items-center gap-3",children:[u?/* @__PURE__ */pe(Ue,{className:"h-5 w-5 text-primary"}):/* @__PURE__ */pe(Je,{className:"h-5 w-5 text-muted-foreground"}),/* @__PURE__ */me("div",{children:[/* @__PURE__ */pe("p",{className:"font-medium text-sm",children:u?"Public Access":"Private"}),/* @__PURE__ */pe("p",{className:"text-xs text-muted-foreground",children:u?"Anyone with the link can view":"Only invited people can access"})]})]}),/* @__PURE__ */me("div",{className:"flex items-center gap-2",children:[u&&/* @__PURE__ */pe(tp,{variant:"ghost",size:"sm",onClick:async()=>{let e=f;(e||(e=await x(),e))&&(navigator.clipboard.writeText(e),lS.success("Link copied to clipboard"))},className:"h-8",children:/* @__PURE__ */pe(Xe,{className:"h-4 w-4"})}),/* @__PURE__ */pe(zS,{checked:u,onCheckedChange:async e=>{h(e),e&&!f&&await x(),i&&i({...a,isPublic:e,sharedWith:p,shareLink:f}),lS.success(e?"Document is now public":"Document is now private")}})]})]}),
|
|
421
|
+
/* @__PURE__ */me("div",{className:"space-y-3",children:[/* @__PURE__ */pe(Kw,{children:"Invite by email"}),/* @__PURE__ */me("div",{className:"flex gap-2",children:[
|
|
422
|
+
/* @__PURE__ */me("div",{className:"relative flex-1",children:[/* @__PURE__ */pe(et,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),/* @__PURE__ */pe(gf,{type:"email",placeholder:"colleague@example.com",value:s,onChange:e=>l(e.target.value),onKeyPress:e=>"Enter"===e.key&&b(),className:"pl-9"})]}),
|
|
423
|
+
/* @__PURE__ */me(kS,{value:c,onValueChange:e=>d(e),children:[/* @__PURE__ */pe(NS,{className:"w-36",children:/* @__PURE__ */pe(CS,{})}),/* @__PURE__ */me(MS,{children:[
|
|
424
|
+
/* @__PURE__ */pe(IS,{value:"editor",children:/* @__PURE__ */me("span",{className:"flex items-center gap-2",children:[/* @__PURE__ */pe(Oe,{className:"h-3 w-3"}),"Editor"]})}),
|
|
425
|
+
/* @__PURE__ */pe(IS,{value:"commentor",children:/* @__PURE__ */me("span",{className:"flex items-center gap-2",children:[/* @__PURE__ */pe(nt,{className:"h-3 w-3"}),"Commentor"]})}),
|
|
426
|
+
/* @__PURE__ */pe(IS,{value:"viewer",children:/* @__PURE__ */me("span",{className:"flex items-center gap-2",children:[/* @__PURE__ */pe(Le,{className:"h-3 w-3"}),"Viewer"]})})]})]}),
|
|
424
427
|
/* @__PURE__ */pe(tp,{onClick:b,children:"Invite"})]})]}),
|
|
425
|
-
/* @__PURE__ */pe(
|
|
426
|
-
/* @__PURE__ */me("div",{className:"space-y-3",children:[/* @__PURE__ */pe("h4",{className:"text-sm font-semibold",children:"People with access"}),/* @__PURE__ */pe(
|
|
427
|
-
/* @__PURE__ */pe(
|
|
428
|
-
/* @__PURE__ */pe(
|
|
429
|
-
/* @__PURE__ */pe(
|
|
428
|
+
/* @__PURE__ */pe(_w,{}),o.length>0&&/* @__PURE__ */me(he,{children:[/* @__PURE__ */me("div",{className:"space-y-3",children:[/* @__PURE__ */me("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */pe(St,{className:"h-4 w-4 text-muted-foreground"}),/* @__PURE__ */pe("h4",{className:"text-sm font-semibold",children:"Teams with access"})]}),/* @__PURE__ */pe("div",{className:"space-y-2",children:o.map(e=>/* @__PURE__ */me("div",{className:"flex items-center justify-between p-3 rounded-lg border bg-card hover:bg-muted/50 transition-colors",children:[/* @__PURE__ */me("div",{className:"flex items-center gap-3",children:[/* @__PURE__ */pe(Lf,{className:"h-8 w-8",children:/* @__PURE__ */pe(Bf,{className:"bg-primary/10 text-primary",children:/* @__PURE__ */pe(St,{className:"h-4 w-4"})})}),/* @__PURE__ */me("div",{children:[/* @__PURE__ */pe("p",{className:"text-sm font-medium",children:e.name}),/* @__PURE__ */me("p",{className:"text-xs text-muted-foreground",children:[e.members.length," member",1!==e.members.length?"s":""]})]})]}),/* @__PURE__ */me(df,{variant:"secondary",className:"bg-blue-500/10 text-blue-700 dark:text-blue-400",children:[/* @__PURE__ */pe(Oe,{className:"h-3 w-3 mr-1"}),"Team"]})]},e.id))})]}),/* @__PURE__ */pe(_w,{})]}),
|
|
429
|
+
/* @__PURE__ */me("div",{className:"space-y-3",children:[/* @__PURE__ */pe("h4",{className:"text-sm font-semibold",children:"People with access"}),/* @__PURE__ */pe(Sw,{className:"max-h-[300px]",children:p.length>0?/* @__PURE__ */pe("div",{className:"space-y-2 pr-4",children:p.map(e=>{/* @__PURE__ */return me("div",{className:"flex items-center justify-between p-3 rounded-lg border bg-card hover:bg-muted/50 transition-colors",children:[/* @__PURE__ */me("div",{className:"flex items-center gap-3",children:[/* @__PURE__ */pe(Lf,{className:"h-8 w-8",children:/* @__PURE__ */pe(Bf,{className:"bg-gradient-to-br from-primary/20 to-primary/10",children:(t=e.email,t.substring(0,2).toUpperCase())})}),/* @__PURE__ */me("div",{children:[/* @__PURE__ */pe("p",{className:"text-sm font-medium",children:e.email}),/* @__PURE__ */me("p",{className:"text-xs text-muted-foreground",children:["Added ",new Date(e.sharedAt).toLocaleDateString()]})]})]}),/* @__PURE__ */me("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */me(kS,{value:e.role||"viewer",onValueChange:t=>((e,t)=>{const n=p.map(n=>n.email===e?{...n,role:t}:n);m(n),i&&i({...a,isPublic:u,sharedWith:n}),lS.success("Role updated")})(e.email,t),children:[/* @__PURE__ */pe(NS,{className:"h-8 w-32",children:/* @__PURE__ */pe(CS,{})}),/* @__PURE__ */me(MS,{children:[
|
|
430
|
+
/* @__PURE__ */pe(IS,{value:"editor",children:/* @__PURE__ */me("span",{className:"flex items-center gap-2",children:[/* @__PURE__ */pe(Oe,{className:"h-3 w-3"}),"Editor"]})}),
|
|
431
|
+
/* @__PURE__ */pe(IS,{value:"commentor",children:/* @__PURE__ */me("span",{className:"flex items-center gap-2",children:[/* @__PURE__ */pe(nt,{className:"h-3 w-3"}),"Commentor"]})}),
|
|
432
|
+
/* @__PURE__ */pe(IS,{value:"viewer",children:/* @__PURE__ */me("span",{className:"flex items-center gap-2",children:[/* @__PURE__ */pe(Le,{className:"h-3 w-3"}),"Viewer"]})})]})]}),/* @__PURE__ */pe(tp,{variant:"ghost",size:"sm",onClick:()=>(e=>{const t=p.filter(t=>t.email!==e);m(t),i&&i({...a,isPublic:u,sharedWith:t}),lS.success("Access removed")})(e.email),className:"h-8 w-8 p-0",children:/* @__PURE__ */pe(Nt,{className:"h-4 w-4 text-muted-foreground hover:text-destructive"})})]})]},e.email);var t})}):/* @__PURE__ */me("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[
|
|
430
433
|
/* @__PURE__ */pe(wt,{className:"h-12 w-12 text-muted-foreground mb-3 opacity-50"}),
|
|
431
434
|
/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"No one else has access yet"}),
|
|
432
|
-
/* @__PURE__ */pe("p",{className:"text-xs text-muted-foreground mt-1",children:"Invite people to collaborate"})]})})]})]})]})})},
|
|
435
|
+
/* @__PURE__ */pe("p",{className:"text-xs text-muted-foreground mt-1",children:"Invite people to collaborate"})]})})]})]})]})})},OS=({open:e,onOpenChange:t,currentTags:n,onUpdateTags:r})=>{const[a,o]=le(""),[i,s]=le(n),l=()=>{if(a.trim()&&!i.includes(a.trim())){const e=[...i,a.trim()];s(e),o("")}};/* @__PURE__ */
|
|
433
436
|
return pe(qh,{open:e,onOpenChange:t,children:/* @__PURE__ */me(Gh,{className:"sm:max-w-md",children:[/* @__PURE__ */pe(Wh,{children:/* @__PURE__ */pe(Yh,{children:"Manage Tags"})}),/* @__PURE__ */me("div",{className:"space-y-4",children:[
|
|
434
|
-
/* @__PURE__ */me("div",{className:"flex gap-2",children:[/* @__PURE__ */pe(
|
|
435
|
-
/* @__PURE__ */pe("div",{className:"flex flex-wrap gap-2 min-h-[60px] p-3 border border-border rounded-md bg-muted/20",children:0===i.length?/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"No tags added yet"}):i.map(e=>/* @__PURE__ */me(
|
|
436
|
-
/* @__PURE__ */me("div",{className:"flex justify-end gap-2",children:[/* @__PURE__ */pe(tp,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),/* @__PURE__ */pe(tp,{onClick:()=>{r(i),t(!1)},children:"Save Tags"})]})]})]})})};function
|
|
437
|
+
/* @__PURE__ */me("div",{className:"flex gap-2",children:[/* @__PURE__ */pe(gf,{value:a,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),l())},placeholder:"Enter tag name...",className:"flex-1"}),/* @__PURE__ */me(tp,{onClick:l,size:"sm",children:[/* @__PURE__ */pe(dt,{className:"h-4 w-4 mr-1"}),"Add"]})]}),
|
|
438
|
+
/* @__PURE__ */pe("div",{className:"flex flex-wrap gap-2 min-h-[60px] p-3 border border-border rounded-md bg-muted/20",children:0===i.length?/* @__PURE__ */pe("p",{className:"text-sm text-muted-foreground",children:"No tags added yet"}):i.map(e=>/* @__PURE__ */me(df,{variant:"secondary",className:"gap-1 pl-2 pr-1",children:[e,/* @__PURE__ */pe("button",{onClick:()=>(e=>{const t=i.filter(t=>t!==e);s(t)})(e),className:"ml-1 hover:bg-background/80 rounded-sm p-0.5",children:/* @__PURE__ */pe(Nt,{className:"h-3 w-3"})})]},e))}),
|
|
439
|
+
/* @__PURE__ */me("div",{className:"flex justify-end gap-2",children:[/* @__PURE__ */pe(tp,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),/* @__PURE__ */pe(tp,{onClick:()=>{r(i),t(!1)},children:"Save Tags"})]})]})]})})};function LS({isSearchModalOpen:e,setIsSearchModalOpen:t,isSettingsOpen:n,setIsSettingsOpen:r,settingsInitialSection:a,isTeamsOpen:o,setIsTeamsOpen:i,isInviteModalOpen:s,setIsInviteModalOpen:l,isTagDialogOpen:c,setIsTagDialogOpen:d,documents:u,activeDocument:h,tagManagementDocId:p,defaultSidebarView:m,setDefaultSidebarView:f,enableDatabaseSync:g,setEnableDatabaseSync:v,setDocuments:y,onSelectDocument:b,onToggleTheme:x,currentTheme:w,onUpdateTags:S}){/* @__PURE__ */
|
|
437
440
|
return me(he,{children:[
|
|
438
|
-
/* @__PURE__ */pe(
|
|
439
|
-
/* @__PURE__ */pe(
|
|
440
|
-
/* @__PURE__ */pe(
|
|
441
|
-
/* @__PURE__ */pe(
|
|
442
|
-
/* @__PURE__ */pe(zS,{open:c,onOpenChange:d,currentTags:p&&u.find(e=>e.id===p)?.tags||[],onUpdateTags:S})]})}function OS(e){const t=Dw(),[n,r]=le(!1),[a,o]=le(!1),[i,s]=le(!1),[l,c]=le(!1),[d,u]=le(!1),[h,p]=le(!1),[m,f]=le(!1),[g,v]=le(null),[y,b]=MS("REASON-default-sidebar-view","last-used"),[x,w]=MS("REASON-left-panels",["files","openTabs"]),[S,k]=MS("REASON-left-split",!0),[C,N]=MS("REASON-right-panels",[]),[T,A]=MS("REASON-right-split",!1),[M,I]=MS("REASON-show-dynamic-island",!1),[D,E]=MS("REASON-sidebar-width",25),[R,_]=le(null),[z,P]=le(!1),O=se(null),[L,F]=le([]),[B,V]=MS("REASON-documents",Jh),[H,$]=MS("REASON-active-doc",B.length>0?B[0].id:null),[q,j]=MS("REASON-open-tabs",B.length>0?[B[0].id]:[]),[U,G]=le([]),[W,Y]=le(null),[K,X]=le(""),[Z,J]=le(null),[ee,ne]=le($l()),[re,ae]=MS("REASON-enable-db-sync",!1),{isSyncing:oe,lastSyncTime:ce,saveDocument:de,deleteDocument:ue,queueDocumentForSync:he}=function(e,t,n={}){const{enableSync:r=!1,syncInterval:a=5e3}=n,[o,i]=le(!1),[s,l]=le(null),c=se(/* @__PURE__ */new Map),d=se(void 0),u=Q(async()=>{if(r)try{const e=(await Bt("doc/documents")).map(e=>({id:e.id.toString(),title:e.title||e.name||"Untitled",content:e.content||"",parentId:e.parentId?e.parentId.toString():null,children:[],isExpanded:1===e.isExpanded,isFolder:1===e.isFolder,tags:e.metadata&&JSON.parse(e.metadata).tags||[],metadata:e.metadata?JSON.parse(e.metadata):void 0}));return t(e),l(/* @__PURE__ */new Date),e}catch(e){return iS.error("Failed to load documents from database"),null}},[r,t]),h=Q(async e=>{if(r)try{const n={name:e.title||"Untitled",title:e.title||"Untitled",content:e.content||"",parentId:e.parentId?parseInt(e.parentId):null,isFolder:e.isFolder||!1,metadata:{tags:e.tags||[],isExpanded:e.isExpanded||!1,...e.metadata}};if(isNaN(parseInt(e.id))){const r=await Bt("doc/documents",{method:"POST",headers:{"Content-Type":"application/json"},body:n});return t(t=>t.map(t=>t.id===e.id?{...t,id:r.id.toString()}:t)),r}return await Bt(`doc/documents/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:n})}catch(n){return iS.error("Failed to save document to database"),null}},[r,t]),p=Q(async()=>{if(r&&0!==c.current.size){i(!0);try{const e=Array.from(c.current.values());await Promise.all(e.map(e=>h(e))),c.current.clear(),l(/* @__PURE__ */new Date)}catch(e){}finally{i(!1)}}},[r,h]),m=Q(e=>{r&&(c.current.set(e.id,e),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{p()},2e3))},[r,p]),f=Q(async e=>{if(r)try{return await Bt(`doc/documents/${e}`,{method:"DELETE"}),!0}catch(t){return iS.error("Failed to delete document from database"),!1}},[r]);return te(()=>{if(!r||a<=0)return;const e=setInterval(()=>{c.current.size>0&&p()},a);return()=>clearInterval(e)},[r,a,p]),te(()=>()=>{d.current&&clearTimeout(d.current)},[]),{isSyncing:o,lastSyncTime:s,loadFromDatabase:u,saveDocument:h,deleteDocument:f,queueDocumentForSync:m,syncPendingChanges:p}}(0,V,{enableSync:re,syncInterval:5e3}),pe=e=>{const t=/* @__PURE__ */new Map,n=[];return e.forEach(e=>{t.set(e.id,{...e,children:[]})}),e.forEach(e=>{const r=t.get(e.id);e.parentId&&t.has(e.parentId)?t.get(e.parentId).children.push(r):n.push(r)}),n},me=ie(()=>pe(B),[B]),fe=B.find(e=>e.id===H);te(()=>{document.title=fe?.title?`${fe.title} - Reason Docs`:"Reason - Powerful Note-Taking App"},[fe?.title]),te(()=>{F([])},[H]);const ge=ie(()=>{const e=B.filter(e=>!e.isDeleted);if(!K.trim())return e;const t=K.toLowerCase();return e.filter(e=>e.title.toLowerCase().includes(t)||e.content.toLowerCase().includes(t))},[B,K]),ve=ie(()=>K.trim()?pe(ge):me,[ge,K]),ye=async(e,t=!1)=>{let n=null;if(e){const t=B.find(t=>t.id===e);t&&(n=t.isFolder?e:t.parentId)}const r={id:Date.now().toString(),title:t?"New Folder":"",content:"",parentId:n,children:[],isExpanded:t,isFolder:t,tags:[]};V([...B,r]),re&&await de(r),t||($(r.id),j([...q,r.id])),J(r.id),setTimeout(()=>J(null),500),n&&V(e=>e.map(e=>e.id===n?{...e,isExpanded:!0}:e)),iS.success(t?"Folder created":"Note created")},be=async e=>{const t=e=>[e,...B.filter(t=>t.parentId===e).flatMap(e=>t(e.id))],n=t(e),r=B.filter(e=>!n.includes(e.id));if(V(r),re)for(const o of n)await ue(o);const a=q.filter(e=>!n.includes(e));j(a),H&&n.includes(H)&&$(a.length>0?a[0]:r.length>0?r[0].id:null),iS.success("Note deleted")},xe=e=>{V(t=>t.map(t=>t.id===e?{...t,isExpanded:!t.isExpanded}:t))};te(()=>{const e=e=>{(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),s(!0))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),te(()=>{e&&(w(["files"]),r(!0))},[e]),te(()=>{"tree"===y?(w(["files"]),k(!1)):"outline"===y?(w(["outline"]),k(!1)):"split"===y&&(w(["files","openTabs","outline"]),k(!0))},[]);const we=e=>{G([e,...U.slice(0,9)]);const t=q.filter(t=>t!==e);if(j(t),H===e){const n=q.indexOf(e),r=Math.max(0,n-1);$(t[r]||null)}},Se=()=>{if(0===U.length)return;const[e,...t]=U;B.find(t=>t.id===e)?(q.includes(e)||j([...q,e]),$(e),G(t),iS.success("Tab reopened")):(G(t),t.length>0&&Se())},ke=()=>{N(e=>e.filter(e=>"ai"!==e)),w(e=>e.length>1?e.filter(e=>"ai"!==e):e)};return te(()=>{H&&!B.find(e=>e.id===H)&&$(B.length>0?B[0].id:null)},[B,H,$]),{isMobile:t,isSidebarOpen:n,setIsSidebarOpen:r,isRightSidebarOpen:a,setIsRightSidebarOpen:o,isSearchModalOpen:i,setIsSearchModalOpen:s,isSettingsOpen:l,setIsSettingsOpen:c,isTeamsOpen:d,setIsTeamsOpen:u,isInviteModalOpen:h,setIsInviteModalOpen:p,isTagDialogOpen:m,setIsTagDialogOpen:f,tagManagementDocId:g,defaultSidebarView:y,setDefaultSidebarView:b,leftPanels:x,setLeftPanels:w,leftSplit:S,setLeftSplit:k,rightPanels:C,setRightPanels:N,rightSplit:T,setRightSplit:A,showDynamicIsland:M,setShowDynamicIsland:I,sidebarWidth:D,setSidebarWidth:E,aiSuggestion:R,setAiSuggestion:_,isAiLoading:z,setIsAiLoading:P,editorRef:O,headings:L,setHeadings:F,documents:B,setDocuments:V,activeDocId:H,setActiveDocId:$,openTabs:q,setOpenTabs:j,closedTabsHistory:U,splitViewDocId:W,setSplitViewDocId:Y,searchQuery:K,setSearchQuery:X,newDocumentId:Z,activeFileSourceId:ee,enableDatabaseSync:re,setEnableDatabaseSync:ae,isSyncing:oe,lastSyncTime:ce,documentTree:me,activeDocument:fe,filteredDocuments:ge,filteredTree:ve,handleAddDocument:ye,handleDeleteDocument:be,handleDuplicateDocument:e=>{const t=B.find(t=>t.id===e);if(!t)return;const n={...t,id:Date.now().toString(),title:t.title+" (Copy)",children:[]};V([...B,n]),$(n.id),j([...q,n.id]),iS.success("Note duplicated")},handleUpdateDocument:(e,t)=>{V(n=>n.map(n=>{if(n.id===e){const e={...n,...t};return re&&he(e),e}return n}))},handleToggleExpand:xe,handleMoveDocument:(e,t,n)=>{const r=B.find(t=>t.id===e),a=B.find(e=>e.id===t);if(!r||e===t)return;const o=(e,t)=>B.filter(t=>t.parentId===e).some(e=>e.id===t||o(e.id,t));if(t&&o(e,t))return void iS.error("Cannot move a note into its own child");let i;i="child"===n?t:a?.parentId||null,V(a=>{const o=a.filter(t=>t.id!==e),s={...r,parentId:i};let l;if("child"===n){const e=o.findIndex(e=>e.id===t),n=o.findIndex((n,r)=>r>e&&n.parentId===t);l=-1!==n?n:e+1}else if("before"===n)l=o.findIndex(e=>e.id===t);else{const e=o.findIndex(e=>e.id===t);let n=e;const r=(e,t)=>{let n=t;for(let a=t+1;a<o.length;a++)if(o[a].parentId===e){n=a;const e=r(o[a].id,a);e>n&&(n=e,a=e)}return n};n=r(t,e),l=n+1}return[...o.slice(0,l),s,...o.slice(l)]}),iS.success("Note moved")},handleAddTag:(e,t)=>{V(n=>n.map(n=>n.id===e?{...n,tags:[...n.tags||[],t]}:n))},handleRemoveTag:(e,t)=>{V(n=>n.map(n=>n.id===e?{...n,tags:(n.tags||[]).filter(e=>e!==t)}:n))},handleManageTags:e=>{v(e),f(!0)},handleFileSourceChange:async e=>{ne(e),ql(e);const t=function(){const e=Vl(),t=$l();return e.find(e=>e.id===t)||Bl}();try{"local"!==t.type?iS.info(`Source switching for ${t.type} not yet implemented in standalone mode`):iS.success("Switched to local storage")}catch(n){iS.error("Failed to load documents from source")}},handleUpdateTags:e=>{g&&(V(t=>t.map(t=>t.id===g?{...t,tags:e}:t)),iS.success("Tags updated"))},handleRestoreDocument:e=>{V(t=>t.map(t=>t.id===e?{...t,isDeleted:!1}:t)),iS.success("Note restored")},handlePermanentDelete:e=>{const t=e=>[e,...B.filter(t=>t.parentId===e).flatMap(e=>t(e.id))],n=t(e),r=B.filter(e=>!n.includes(e.id));V(r);const a=q.filter(e=>!n.includes(e));j(a),H&&n.includes(H)&&$(a.length>0?a[0]:r.length>0?r[0].id:null),iS.success("Note permanently deleted")},handleTabChange:e=>{$(e)},handleTabClose:we,handleTabAdd:()=>{ye(null)},handleTabDelete:e=>{we(e),be(e)},handleReopenLastClosed:Se,handleSplitRight:e=>{Y(e),iS.success("Split view enabled")},handleSelectDocument:e=>{B.find(t=>t.id===e)?.isFolder?xe(e):(q.includes(e)||j([...q,e]),$(e))},handleAIRewrite:async(e,t)=>{iS.info("AI rewrite is not yet available for this editor")},handleAIApprove:()=>{_(null),ke()},handleAIReject:()=>{_(null),ke()},handleAIRegenerate:async e=>{iS.info("AI rewrite is not yet available for this editor")}}}var LS=Y({});function FS(e){const t=se(null);return null===t.current&&(t.current=e()),t.current}var BS="undefined"!=typeof window?oe:te,VS=/* @__PURE__ */Y(null);function HS(e,t){-1===e.indexOf(t)&&e.push(t)}function $S(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}var qS=(e,t,n)=>n>t?t:n<e?e:n;var jS=()=>{},US=()=>{};"undefined"!=typeof process&&"production"!==process.env.NODE_ENV&&(jS=(e,t,n)=>{},US=(e,t,n)=>{if(!e)throw new Error(function(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}(t,n))});var GS={},WS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),YS=e=>"object"==typeof e&&null!==e,KS=e=>/^0[^.\s]+$/u.test(e);function XS(e){let t;return()=>(void 0===t&&(t=e()),t)}var ZS=e=>e,JS=(...e)=>e.reduce((e,t)=>n=>t(e(n))),QS=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1},ek=class{constructor(){this.subscriptions=[]}add(e){return HS(this.subscriptions,e),()=>$S(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let a=0;a<r;a++){const r=this.subscriptions[a];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},tk=e=>1e3*e,nk=e=>e/1e3,rk=(e,t)=>t?e*(1e3/t):0,ak=/* @__PURE__ */new Set;function ok(e,t,n){e||ak.has(t)||ak.add(t)}var ik=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function sk(e,t,n,r){if(e===t&&n===r)return ZS;const a=t=>function(e,t,n,r,a){let o,i,s=0;do{i=t+(n-t)/2,o=ik(i,r,a)-e,o>0?n=i:t=i}while(Math.abs(o)>1e-7&&++s<12);return i}(t,0,1,e,n);return e=>0===e||1===e?e:ik(a(e),t,r)}var lk=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ck=e=>t=>1-e(1-t),dk=/*@__PURE__*/sk(.33,1.53,.69,.99),uk=/*@__PURE__*/ck(dk),hk=/*@__PURE__*/lk(uk),pk=e=>e>=1?1:(e*=2)<1?.5*uk(e):.5*(2-Math.pow(2,-10*(e-1))),mk=e=>1-Math.sin(Math.acos(e)),fk=ck(mk),gk=lk(mk),vk=/*@__PURE__*/sk(.42,0,1,1),yk=/*@__PURE__*/sk(0,0,.58,1),bk=/*@__PURE__*/sk(.42,0,.58,1),xk=e=>Array.isArray(e)&&"number"==typeof e[0],wk={linear:ZS,easeIn:vk,easeInOut:bk,easeOut:yk,circIn:mk,circInOut:gk,circOut:fk,backIn:uk,backInOut:hk,backOut:dk,anticipate:pk},Sk=e=>{if(xk(e)){US(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,a]=e;return sk(t,n,r,a)}return"string"==typeof e?(US(void 0!==wk[e],`Invalid easing type '${e}'`,"invalid-easing-type"),wk[e]):e},kk=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ck(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=kk.reduce((e,t)=>(e[t]=function(e){let t=/* @__PURE__ */new Set,n=/* @__PURE__ */new Set,r=!1,a=!1;const o=/* @__PURE__ */new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function s(t){o.has(t)&&(l.schedule(t),e()),t(i)}const l={schedule:(e,a=!1,i=!1)=>{const s=i&&r?t:n;return a&&o.add(e),s.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(i=e,r)return void(a=!0);r=!0;const o=t;t=n,n=o,t.forEach(s),t.clear(),r=!1,a&&(a=!1,l.process(e))}};return l}(o),e),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:p,postRender:m}=i,f=()=>{const o=GS.useManualTiming,i=o?a.timestamp:performance.now();n=!1,o||(a.delta=r?1e3/60:Math.max(Math.min(i-a.timestamp,40),1)),a.timestamp=i,a.isProcessing=!0,s.process(a),l.process(a),c.process(a),d.process(a),u.process(a),h.process(a),p.process(a),m.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(f))};return{schedule:kk.reduce((t,o)=>{const s=i[o];return t[o]=(t,o=!1,i=!1)=>(n||(n=!0,r=!0,a.isProcessing||e(f)),s.schedule(t,o,i)),t},{}),cancel:e=>{for(let t=0;t<kk.length;t++)i[kk[t]].cancel(e)},state:a,steps:i}}var Nk,{schedule:Tk,cancel:Ak,state:Mk,steps:Ik}=/* @__PURE__ */Ck("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:ZS,!0);function Dk(){Nk=void 0}var Ek={now:()=>(void 0===Nk&&Ek.set(Mk.isProcessing||GS.useManualTiming?Mk.timestamp:performance.now()),Nk),set:e=>{Nk=e,queueMicrotask(Dk)}},Rk=e=>t=>"string"==typeof t&&t.startsWith(e),_k=/*@__PURE__*/Rk("--"),zk=/*@__PURE__*/Rk("var(--"),Pk=e=>!!zk(e)&&Ok.test(e.split("/*")[0].trim()),Ok=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Lk(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}var Fk={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Bk={...Fk,transform:e=>qS(0,1,e)},Vk={...Fk,default:1},Hk=e=>Math.round(1e5*e)/1e5,$k=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;var qk=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,jk=(e,t)=>n=>Boolean("string"==typeof n&&qk.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Uk=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[a,o,i,s]=r.match($k);return{[e]:parseFloat(a),[t]:parseFloat(o),[n]:parseFloat(i),alpha:void 0!==s?parseFloat(s):1}},Gk={...Fk,transform:e=>Math.round((e=>qS(0,255,e))(e))},Wk={test:/*@__PURE__*/jk("rgb","red"),parse:/*@__PURE__*/Uk("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Gk.transform(e)+", "+Gk.transform(t)+", "+Gk.transform(n)+", "+Hk(Bk.transform(r))+")"};var Yk={test:/*@__PURE__*/jk("#"),parse:function(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}},transform:Wk.transform},Kk=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Xk=/*@__PURE__*/Kk("deg"),Zk=/*@__PURE__*/Kk("%"),Jk=/*@__PURE__*/Kk("px"),Qk=/*@__PURE__*/Kk("vh"),eC=/*@__PURE__*/Kk("vw"),tC=/*@__PURE__*/(()=>({...Zk,parse:e=>Zk.parse(e)/100,transform:e=>Zk.transform(100*e)}))(),nC={test:/*@__PURE__*/jk("hsl","hue"),parse:/*@__PURE__*/Uk("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Zk.transform(Hk(t))+", "+Zk.transform(Hk(n))+", "+Hk(Bk.transform(r))+")"},rC={test:e=>Wk.test(e)||Yk.test(e)||nC.test(e),parse:e=>Wk.test(e)?Wk.parse(e):nC.test(e)?nC.parse(e):Yk.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Wk.transform(e):nC.transform(e),getAnimatableNone:e=>{const t=rC.parse(e);return t.alpha=0,rC.transform(t)}},aC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;var oC="number",iC="color",sC=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function lC(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let o=0;return{values:n,split:t.replace(sC,e=>(rC.test(e)?(r.color.push(o),a.push(iC),n.push(rC.parse(e))):e.startsWith("var(")?(r.var.push(o),a.push("var"),n.push(e)):(r.number.push(o),a.push(oC),n.push(parseFloat(e))),++o,"${}")).split("${}"),indexes:r,types:a}}function cC({split:e,types:t}){const n=e.length;return r=>{let a="";for(let o=0;o<n;o++)if(a+=e[o],void 0!==r[o]){const e=t[o];a+=e===oC?Hk(r[o]):e===iC?rC.transform(r[o]):r[o]}return a}}var dC=(e,t)=>"number"==typeof e?t?.trim().endsWith("/")?e:0:(e=>"number"==typeof e?0:rC.test(e)?rC.getAnimatableNone(e):e)(e);var uC={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match($k)?.length||0)+(e.match(aC)?.length||0)>0},parse:function(e){return lC(e).values},createTransformer:function(e){return cC(lC(e))},getAnimatableNone:function(e){const t=lC(e);return cC(t)(t.values.map((e,n)=>dC(e,t.split[n])))}};function hC(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pC(e,t){return n=>n>0?t:e}var mC=(e,t,n)=>e+(t-e)*n,fC=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},gC=[Yk,Wk,nC];function vC(e){const t=(e=>gC.find(t=>t.test(e)))(e);if(jS(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(t))return!1;let n=t.parse(e);return t===nC&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let a=0,o=0,i=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;a=hC(s,r,e+1/3),o=hC(s,r,e),i=hC(s,r,e-1/3)}else a=o=i=n;return{red:Math.round(255*a),green:Math.round(255*o),blue:Math.round(255*i),alpha:r}}(n)),n}var yC=(e,t)=>{const n=vC(e),r=vC(t);if(!n||!r)return pC(e,t);const a={...n};return e=>(a.red=fC(n.red,r.red,e),a.green=fC(n.green,r.green,e),a.blue=fC(n.blue,r.blue,e),a.alpha=mC(n.alpha,r.alpha,e),Wk.transform(a))},bC=/* @__PURE__ */new Set(["none","hidden"]);function xC(e,t){return n=>mC(e,t,n)}function wC(e){return"number"==typeof e?xC:"string"==typeof e?Pk(e)?pC:rC.test(e)?yC:CC:Array.isArray(e)?SC:"object"==typeof e?rC.test(e)?yC:kC:pC}function SC(e,t){const n=[...e],r=n.length,a=e.map((e,n)=>wC(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=a[t](e);return n}}function kC(e,t){const n={...e,...t},r={};for(const a in n)void 0!==e[a]&&void 0!==t[a]&&(r[a]=wC(e[a])(e[a],t[a]));return e=>{for(const t in r)n[t]=r[t](e);return n}}var CC=(e,t)=>{const n=uC.createTransformer(t),r=lC(e),a=lC(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?bC.has(e)&&!a.values.length||bC.has(t)&&!r.values.length?function(e,t){return bC.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):JS(SC(function(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],i=e.indexes[o][r[o]],s=e.values[i]??0;n[a]=s,r[o]++}return n}(r,a),a.values),n):(jS(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),pC(e,t))};function NC(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?mC(e,t,n):wC(e)(e,t)}var TC=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>Tk.update(t,e),stop:()=>Ak(t),now:()=>Mk.isProcessing?Mk.timestamp:Ek.now()}},AC=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let o=0;o<a;o++)r+=Math.round(1e4*e(o/(a-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`};function MC(e){let t=0;let n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}var IC=100,DC=10,EC=1,RC=0,_C=800,zC=.3,PC=.3,OC={granular:.01,default:2},LC={granular:.005,default:.5},FC=.01,BC=10,VC=.05,HC=1;function $C(e,t){return e*Math.sqrt(1-t*t)}var qC=["duration","bounce"],jC=["stiffness","damping","mass"];function UC(e,t){return t.some(t=>void 0!==e[t])}function GC(e){let t={velocity:RC,stiffness:IC,damping:DC,mass:EC,isResolvedFromDuration:!1,...e};if(!UC(e,jC)&&UC(e,qC))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),a=r*r,o=2*qS(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:EC,stiffness:a,damping:o}}else{const n=function({duration:e=_C,bounce:t=zC,velocity:n=RC,mass:r=EC}){let a,o;jS(e<=tk(BC),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=qS(VC,HC,i),e=qS(FC,BC,nk(e)),i<1?(a=t=>{const r=t*i,a=r*e;return.001-(r-n)/$C(t,i)*Math.exp(-a)},o=t=>{const r=t*i*e,o=r*n+n,s=Math.pow(i,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=$C(Math.pow(t,2),i);return(.001-a(t)>0?-1:1)*((o-s)*l)/c}):(a=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let a=1;a<12;a++)r-=e(r)/t(r);return r}(a,o,5/e);if(e=tk(e),isNaN(s))return{stiffness:IC,damping:DC,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*i*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});t={...t,...n,mass:EC},t.isResolvedFromDuration=!0}return t}function WC(e=PC,t=zC){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=GC({...n,velocity:-nk(n.velocity||0)}),m=h||0,f=c/(2*Math.sqrt(l*d)),g=i-o,v=nk(Math.sqrt(l/d)),y=Math.abs(g)<5;let b,x,w,S,k,C;if(r||(r=y?OC.granular:OC.default),a||(a=y?LC.granular:LC.default),f<1)w=$C(v,f),S=(m+f*v*g)/w,b=e=>{const t=Math.exp(-f*v*e);return i-t*(S*Math.sin(w*e)+g*Math.cos(w*e))},k=f*v*S+g*w,C=f*v*g-S*w,x=e=>Math.exp(-f*v*e)*(k*Math.sin(w*e)+C*Math.cos(w*e));else if(1===f){b=e=>i-Math.exp(-v*e)*(g+(m+v*g)*e);const e=m+v*g;x=t=>Math.exp(-v*t)*(v*e*t-m)}else{const e=v*Math.sqrt(f*f-1);b=t=>{const n=Math.exp(-f*v*t),r=Math.min(e*t,300);return i-n*((m+f*v*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};const t=(m+f*v*g)/e,n=f*v*t-g*e,r=f*v*g-t*e;x=t=>{const a=Math.exp(-f*v*t),o=Math.min(e*t,300);return a*(n*Math.sinh(o)+r*Math.cosh(o))}}const N={calculatedDuration:p&&u||null,velocity:e=>tk(x(e)),next:e=>{if(!p&&f<1){const t=Math.exp(-f*v*e),n=Math.sin(w*e),o=Math.cos(w*e),l=i-t*(S*n+g*o),c=tk(t*(k*n+C*o));return s.done=Math.abs(c)<=r&&Math.abs(i-l)<=a,s.value=s.done?i:l,s}const t=b(e);if(p)s.done=e>=u;else{const n=tk(x(e));s.done=Math.abs(n)<=r&&Math.abs(i-t)<=a}return s.value=s.done?i:t,s},toString:()=>{const e=Math.min(MC(N),2e4),t=AC(t=>N.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return N}WC.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(MC(r),2e4);return{type:"keyframes",ease:e=>r.next(a*e).value/t,duration:nk(a)}}(e,100,WC);return e.ease=t.ease,e.duration=tk(t.duration),e.type="keyframes",e};function YC(e,t,n){const r=Math.max(t-5,0);return rk(n-e(r),t-r)}function KC({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:o=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:d}){const u=e[0],h={done:!1,value:u},p=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let m=n*t;const f=u+m,g=void 0===i?f:i(f);g!==f&&(m=g-u);const v=e=>-m*Math.exp(-e/r),y=e=>g+v(e),b=e=>{const t=v(e),n=y(e);h.done=Math.abs(t)<=c,h.value=h.done?g:n};let x,w;const S=e=>{(e=>void 0!==s&&e<s||void 0!==l&&e>l)(h.value)&&(x=e,w=WC({keyframes:[h.value,p(h.value)],velocity:YC(y,e,h.value),damping:a,stiffness:o,restDelta:c,restSpeed:d}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),S(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),h)}}}function XC(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const o=e.length;if(US(o===t.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],a=n||GS.mix||NC,o=e.length-1;for(let i=0;i<o;i++){let n=a(e[i],e[i+1]);if(t){const e=Array.isArray(t)?t[i]||ZS:t;n=JS(e,n)}r.push(n)}return r}(t,r,a),l=s.length,c=n=>{if(i&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const a=QS(e[r],e[r+1],n);return s[r](a)};return n?t=>c(qS(e[0],e[o-1],t)):c}function ZC(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=QS(0,t,r);e.push(mC(n,1,a))}}(t,e.length-1),t}function JC({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Sk):Sk(r),o={done:!1,value:t[0]},i=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:ZC(t),e),s=XC(i,t,{ease:Array.isArray(a)?a:(l=t,c=a,l.map(()=>c||bk).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}var QC=e=>null!==e;function eN(e,{repeat:t,repeatType:n="loop"},r,a=1){const o=e.filter(QC),i=a<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}var tN={decay:KC,inertia:KC,tween:JC,keyframes:JC,spring:WC};function nN(e){"string"==typeof e.type&&(e.type=tN[e.type])}var rN=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},aN=e=>e/100,oN=class extends rN{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==Ek.now()&&this.tick(Ek.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;nN(e);const{type:t=JC,repeat:n=0,repeatDelay:r=0,repeatType:a,velocity:o=0}=e;let{keyframes:i}=e;const s=t||JC;"production"!==process.env.NODE_ENV&&s!==JC&&US(i.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${i}`,"spring-two-frames"),s!==JC&&"number"!=typeof i[0]&&(this.mixKeyframes=JS(aN,NC(i[0],i[1])),i=[0,100]);const l=s({...e,keyframes:i});"mirror"===a&&(this.mirroredGenerator=s({...e,keyframes:[...i].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=MC(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:d,repeatType:u,repeatDelay:h,type:p,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let y,b=this.currentTime,x=n;if(d){const e=Math.min(this.currentTime,r)/i;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,d+1),Boolean(t%2)&&("reverse"===u?(n=1-n,h&&(n-=h/i)):"mirror"===u&&(x=o)),b=qS(0,1,n)*i}v?(this.delayState.value=c[0],y=this.delayState):y=x.next(b),a&&!v&&(y.value=a(y.value));let{done:w}=y;v||null===s||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return S&&p!==KC&&(y.value=eN(c,this.options,f,this.speed)),m&&m(y.value),S&&this.finish(),y}then(e,t){return this.finished.then(e,t)}get duration(){return nk(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+nk(e)}get time(){return nk(this.currentTime)}set time(e){e=tk(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);return YC(e=>this.generator.next(e).value,e,this.generator.next(e).value)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Ek.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=nk(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=TC,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ek.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}};var iN=e=>180*e/Math.PI,sN=e=>{const t=iN(Math.atan2(e[1],e[0]));return cN(t)},lN={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:sN,rotateZ:sN,skewX:e=>iN(Math.atan(e[1])),skewY:e=>iN(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},cN=e=>((e%=360)<0&&(e+=360),e),dN=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),uN=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),hN={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:dN,scaleY:uN,scale:e=>(dN(e)+uN(e))/2,rotateX:e=>cN(iN(Math.atan2(e[6],e[5]))),rotateY:e=>cN(iN(Math.atan2(-e[2],e[0]))),rotateZ:sN,rotate:sN,skewX:e=>iN(Math.atan(e[4])),skewY:e=>iN(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function pN(e){return e.includes("scale")?1:0}function mN(e,t){if(!e||"none"===e)return pN(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=hN,a=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=lN,a=t}if(!a)return pN(t);const o=r[t],i=a[1].split(",").map(fN);return"function"==typeof o?o(i):i[o]}function fN(e){return parseFloat(e.trim())}var gN=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vN=/*@__PURE__*/(()=>/* @__PURE__ */new Set([...gN,"pathRotation"]))(),yN=e=>e===Fk||e===Jk,bN=/* @__PURE__ */new Set(["x","y","z"]),xN=gN.filter(e=>!bN.has(e));var wN={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const a=e.max-e.min;return"border-box"===r?a:a-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const a=e.max-e.min;return"border-box"===r?a:a-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>mN(t,"x"),y:(e,{transform:t})=>mN(t,"y")};wN.translateX=wN.x,wN.translateY=wN.y;var SN=/* @__PURE__ */new Set,kN=!1,CN=!1,NN=!1;function TN(){if(CN){const e=Array.from(SN).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=/* @__PURE__ */new Map;t.forEach(e=>{const t=function(e){const t=[];return xN.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}CN=!1,kN=!1,SN.forEach(e=>e.complete(NN)),SN.clear()}function AN(){SN.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(CN=!0)})}var MN=class{constructor(e,t,n,r,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(SN.add(this),kN||(kN=!0,Tk.read(AN),Tk.resolveKeyframes(TN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const a=r?.get(),o=e[e.length-1];if(void 0!==a)e[0]=a;else if(n&&t){const r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===a&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),SN.delete(this)}cancel(){"scheduled"===this.state&&(SN.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}};function IN(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}var DN={};function EN(e,t){const n=XS(e);return()=>DN[t]??n()}var RN=/* @__PURE__ */EN(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),_N=/*@__PURE__*/EN(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(zi){return!1}return!0},"linearEasing"),zN=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,PN={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:/*@__PURE__*/zN([0,.65,.55,1]),circOut:/*@__PURE__*/zN([.55,0,1,.45]),backIn:/*@__PURE__*/zN([.31,.01,.66,-.59]),backOut:/*@__PURE__*/zN([.33,1.53,.69,.99])};function ON(e,t){return e?"function"==typeof e?_N()?AC(e,t):"ease-out":xk(e)?zN(e):Array.isArray(e)?e.map(e=>ON(e,t)||PN.easeOut):PN[e]:void 0}function LN(e,t,n,{delay:r=0,duration:a=300,repeat:o=0,repeatType:i="loop",ease:s="easeOut",times:l}={},c=void 0){const d={[t]:n};l&&(d.offset=l);const u=ON(s,a);Array.isArray(u)&&(d.easing=u);const h={delay:r,duration:a,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===i?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(d,h)}function FN(e){return"function"==typeof e&&"applyToOptions"in e}var BN=class extends rN{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:i,onComplete:s}=e;this.isPseudoElement=Boolean(a),this.allowFlatten=o,this.options=e,US("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:e,...t}){return FN(e)&&_N()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=LN(t,n,r,l,a),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const e=eN(r,this.options,i,this.speed);this.updateMotionValue&&this.updateMotionValue(e),IN(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(zi){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return nk(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+nk(e)}get time(){return nk(Number(this.animation.currentTime)||0)}set time(e){const t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=tk(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&RN()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),ZS):r(this)}},VN={anticipate:pk,backInOut:hk,circInOut:gk};function HN(e){"string"==typeof e.ease&&e.ease in VN&&(e.ease=VN[e.ease])}var $N=class extends BN{constructor(e){HN(e),nN(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:a,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const i=new oN({...o,autoplay:!1}),s=Math.max(10,Ek.now()-this.startTime),l=qS(0,10,s-10),c=i.sample(s).value,{name:d}=this.options;a&&d&&IN(a,d,c),t.setWithVelocity(i.sample(Math.max(0,s-l)).value,c,l),i.stop()}},qN=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!uC.test(e)&&"0"!==e||e.startsWith("url(")));function jN(e){e.duration=0,e.type="keyframes"}var UN=/* @__PURE__ */new Set(["opacity","clipPath","filter","transform","backgroundColor"]),GN=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;var WN=/* @__PURE__ */new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),YN=/*@__PURE__*/XS(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function KN(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:o,type:i,keyframes:s}=e,l=t?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return YN()&&n&&(UN.has(n)||WN.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&GN.test(e[t]))return!0;return!1}(s))&&("transform"!==n||!d)&&!c&&!r&&"mirror"!==a&&0!==o&&"inertia"!==i}var XN=class extends rN{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:o="loop",keyframes:i,name:s,motionValue:l,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ek.now();const u={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:a,repeatType:o,name:s,motionValue:l,element:c,...d},h=c?.KeyframeResolver||MN;this.keyframeResolver=new h(i,(e,t,n)=>this.onKeyframesResolved(e,t,u,!n),s,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:a,type:o,velocity:i,delay:s,isHandoff:l,onUpdate:c}=n;this.resolvedAt=Ek.now();let d=!0;(function(e,t,n,r){const a=e[0];if(null===a)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],i=qN(a,t),s=qN(o,t);return jS(i===s,`You are trying to animate ${t} from "${a}" to "${o}". "${i?o:a}" is not an animatable value.`,"value-not-animatable"),!(!i||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||FN(n))&&r)})(e,a,o,i)||(d=!1,!GS.instantAnimations&&s||c?.(eN(e,n,t)),e[0]=e[e.length-1],jN(n),n.repeat=0);const u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},h=d&&!l&&KN(u),p=u.motionValue?.owner?.current;let m;if(h)try{m=new $N({...u,element:p})}catch{m=new oN(u)}else m=new oN(u);m.finished.then(()=>{this.notifyFinished()}).catch(ZS),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),NN=!0,AN(),TN(),NN=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function ZN(e,t,n,r=0,a=1){const o=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),i=e.size,s=(i-1)*r;return"function"==typeof n?n(o,i):1===a?o*r:s-o*r}var JN={current:void 0},QN=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=Ek.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Ek.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(e=>!isNaN(parseFloat(e)))(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return"production"!==process.env.NODE_ENV&&ok(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new ek);const n=this.events[e].add(t);return"change"===e?()=>{n(),Tk.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=/* @__PURE__ */new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return JN.current&&JN.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Ek.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return rk(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function eT(e,t){return new QN(e,t)}function tT(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function nT(e,t){const n=e?.[t]??e?.default??e;return n!==e?tT(n,e):n}var rT={type:"spring",stiffness:500,damping:25,restSpeed:10},aT={type:"keyframes",duration:.8},oT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},iT=(e,{keyframes:t})=>t.length>2?aT:vN.has(e)?e.startsWith("scale")?(e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}))(t[1]):rT:oT,sT=/* @__PURE__ */new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);var lT=(e,t,n,r={},a,o)=>i=>{const s=nT(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=tk(l);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:a};(function(e){for(const t in e)if(!sT.has(t))return!0;return!1})(s)||Object.assign(d,iT(e,d)),d.duration&&(d.duration=tk(d.duration)),d.repeatDelay&&(d.repeatDelay=tk(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let u=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(jN(d),0===d.delay&&(u=!0)),(GS.instantAnimations||GS.skipAnimations||a?.shouldSkipAnimations||s.skipAnimations)&&(u=!0,jN(d),d.delay=0),d.allowFlatten=!s.type&&!s.ease,u&&!o&&void 0!==t.get()){const e=eN(d.keyframes,s);if(void 0!==e)return void Tk.update(()=>{d.onUpdate(e),d.onComplete()})}return s.isSync?new oN(d):new XN(d)},cT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function dT(e,t,n=1){US(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,a]=function(e){const t=cT.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const e=o.trim();return WS(e)?parseFloat(e):e}return Pk(a)?dT(a,t,n+1):a}function uT(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function hT(e,t,n,r){if("function"==typeof t){const[a,o]=uT(r);t=t(void 0!==n?n:e.custom,a,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[a,o]=uT(r);t=t(void 0!==n?n:e.custom,a,o)}return t}function pT(e,t,n){const r=e.getProps();return hT(r,t,void 0!==n?n:r.custom,e)}var mT=/* @__PURE__ */new Set(["width","height","top","left","right","bottom",...gN]),fT=e=>Array.isArray(e);function gT(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,eT(n))}function vT(e){return fT(e)?e[e.length-1]||0:e}var yT=e=>Boolean(e&&e.getVelocity);function bT(e,t){const n=e.getValue("willChange");if(function(e){return Boolean(yT(e)&&e.add)}(n))return n.add(t);if(!n&&GS.WillChange){const n=new GS.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function xT(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var wT="data-"+xT("framerAppearId");function ST(e){return e.props[wT]}function kT({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function CT(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:o,transitionEnd:i,...s}=t;const l=e.getDefaultTransition();o=o?tT(o,l):l;const c=o?.reduceMotion,d=o?.skipAnimations;r&&(o=r);const u=[],h=a&&e.animationState&&e.animationState.getState()[a],p=o?.path;p&&p.animateVisualElement(e,s,o,n,u);for(const m in s){const t=e.getValue(m,e.latestValues[m]??null),r=s[m];if(void 0===r||h&&kT(h,m))continue;const a={delay:n,...nT(o||{},m)};d&&(a.skipAnimations=!0);const i=t.get();if(void 0!==i&&!t.isAnimating()&&!Array.isArray(r)&&r===i&&!a.velocity){Tk.update(()=>t.set(r));continue}let l=!1;if(window.MotionHandoffAnimation){const t=ST(e);if(t){const e=window.MotionHandoffAnimation(t,m,Tk);null!==e&&(a.startTime=e,l=!0)}}bT(e,m);const p=c??e.shouldReduceMotion;t.start(lT(m,t,r,p&&mT.has(m)?{type:!1}:a,e,l));const f=t.animation;f&&u.push(f)}if(i){const t=()=>Tk.update(()=>{i&&function(e,t){let{transitionEnd:n={},transition:r={},...a}=pT(e,t)||{};a={...a,...n};for(const o in a)gT(e,o,vT(a[o]))}(e,i)});u.length?Promise.all(u).then(t):t()}return u}function NT(e,t,n={}){const r=pT(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const o=r?()=>Promise.all(CT(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:s}=a;return function(e,t,n=0,r=0,a=0,o=1,i){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(NT(l,t,{...i,delay:n+("function"==typeof r?0:r)+ZN(e.variantChildren,l,r,a,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,o,i,s,n)}:()=>Promise.resolve(),{when:s}=a;if(s){const[e,t]="beforeChildren"===s?[o,i]:[i,o];return e().then(()=>t())}return Promise.all([o(),i(n.delay)])}var TT=e=>t=>t.test(e),AT=[Fk,Jk,Zk,Xk,eC,Qk,{test:e=>"auto"===e,parse:e=>e}],MT=e=>AT.find(TT(e));function IT(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||KS(e))}var DT=/* @__PURE__ */new Set(["brightness","contrast","saturate","opacity"]);function ET(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match($k)||[];if(!r)return e;const a=n.replace(r,"");let o=DT.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+a+")"}var RT=/\b([a-z-]*)\(.*?\)/gu,_T={...uC,getAnimatableNone:e=>{const t=e.match(RT);return t?t.map(ET).join(" "):e}},zT={...uC,getAnimatableNone:e=>{const t=uC.parse(e);return uC.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},PT={...Fk,transform:Math.round},OT={borderWidth:Jk,borderTopWidth:Jk,borderRightWidth:Jk,borderBottomWidth:Jk,borderLeftWidth:Jk,borderRadius:Jk,borderTopLeftRadius:Jk,borderTopRightRadius:Jk,borderBottomRightRadius:Jk,borderBottomLeftRadius:Jk,width:Jk,maxWidth:Jk,height:Jk,maxHeight:Jk,top:Jk,right:Jk,bottom:Jk,left:Jk,inset:Jk,insetBlock:Jk,insetBlockStart:Jk,insetBlockEnd:Jk,insetInline:Jk,insetInlineStart:Jk,insetInlineEnd:Jk,padding:Jk,paddingTop:Jk,paddingRight:Jk,paddingBottom:Jk,paddingLeft:Jk,paddingBlock:Jk,paddingBlockStart:Jk,paddingBlockEnd:Jk,paddingInline:Jk,paddingInlineStart:Jk,paddingInlineEnd:Jk,margin:Jk,marginTop:Jk,marginRight:Jk,marginBottom:Jk,marginLeft:Jk,marginBlock:Jk,marginBlockStart:Jk,marginBlockEnd:Jk,marginInline:Jk,marginInlineStart:Jk,marginInlineEnd:Jk,fontSize:Jk,backgroundPositionX:Jk,backgroundPositionY:Jk,...{rotate:Xk,pathRotation:Xk,rotateX:Xk,rotateY:Xk,rotateZ:Xk,scale:Vk,scaleX:Vk,scaleY:Vk,scaleZ:Vk,skew:Xk,skewX:Xk,skewY:Xk,distance:Jk,translateX:Jk,translateY:Jk,translateZ:Jk,x:Jk,y:Jk,z:Jk,perspective:Jk,transformPerspective:Jk,opacity:Bk,originX:tC,originY:tC,originZ:Jk},zIndex:PT,fillOpacity:Bk,strokeOpacity:Bk,numOctaves:PT},LT={...OT,color:rC,backgroundColor:rC,outlineColor:rC,fill:rC,stroke:rC,borderColor:rC,borderTopColor:rC,borderRightColor:rC,borderBottomColor:rC,borderLeftColor:rC,filter:_T,WebkitFilter:_T,mask:zT,WebkitMask:zT},FT=e=>LT[e],BT=/*@__PURE__*/new Set([_T,zT]);function VT(e,t){let n=FT(e);return BT.has(n)||(n=uC),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var HT=/* @__PURE__ */new Set(["auto","none","0"]);var $T=class extends MN{constructor(e,t,n,r,a){super(e,t,n,r,a,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let n=e[s];if("string"==typeof n&&(n=n.trim(),Pk(n))){const r=dT(n,t.current);void 0!==r&&(e[s]=r),s===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!mT.has(n)||2!==e.length)return;const[r,a]=e,o=MT(r),i=MT(a);if(Lk(r)!==Lk(a)&&wN[n])this.needsMeasurement=!0;else if(o!==i)if(yN(o)&&yN(i))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else wN[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||IT(e[r]))&&n.push(r);n.length&&function(e,t,n){let r,a=0;for(;a<e.length&&!r;){const t=e[a];"string"==typeof t&&!HT.has(t)&&lC(t).values.length&&(r=e[a]),a++}if(r&&n)for(const o of t)e[o]=VT(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=wN[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const a=n.length-1,o=n[a];n[a]=wN[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},qT=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function jT(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let r=document;t&&(r=t.current);const a=n?.[e]??r.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e).filter(e=>null!=e)}var UT=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function GT(e){return YS(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}var{schedule:WT,cancel:YT}=/* @__PURE__ */Ck(queueMicrotask,!1),KT={x:!1,y:!1};function XT(){return KT.x||KT.y}function ZT(e,t){const n=jT(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function JT(e,t,n={}){const[r,a,o]=ZT(e,n);return r.forEach(e=>{let n,r=!1,o=!1;const i=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},s=e=>{r=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),o&&(o=!1,i(e))},l=e=>{"touch"!==e.pointerType&&(r?o=!0:i(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||XT())return;o=!1;const i=t(e,r);"function"==typeof i&&(n=i,e.addEventListener("pointerleave",l,a))},a),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,a),window.addEventListener("pointercancel",s,a)},a)}),o}var QT=(e,t)=>!!t&&(e===t||QT(e,t.parentElement)),eA=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,tA=/* @__PURE__ */new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);var nA=/* @__PURE__ */new Set(["INPUT","SELECT","TEXTAREA"]);var rA=/* @__PURE__ */new WeakSet;function aA(e){return t=>{"Enter"===t.key&&e(t)}}function oA(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function iA(e){return eA(e)&&!XT()}var sA=/* @__PURE__ */new WeakSet;function lA(e,t,n={}){const[r,a,o]=ZT(e,n),i=e=>{const r=e.currentTarget;if(!iA(e))return;if(sA.has(e))return;rA.add(r),n.stopPropagation&&sA.add(e);const o=t(r,e),i={...a,capture:!0},s=(e,t)=>{window.removeEventListener("pointerup",l,i),window.removeEventListener("pointercancel",c,i),rA.has(r)&&rA.delete(r),iA(e)&&"function"==typeof o&&o(e,{success:t})},l=e=>{s(e,r===window||r===document||n.useGlobalTarget||QT(r,e.target))},c=e=>{s(e,!1)};window.addEventListener("pointerup",l,i),window.addEventListener("pointercancel",c,i)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",i,a),GT(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=aA(()=>{if(rA.has(n))return;oA(n,"down");const e=aA(()=>{oA(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>oA(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,a)),t=e,tA.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}function cA(e){return YS(e)&&"ownerSVGElement"in e}var dA,uA=/* @__PURE__ */new WeakMap,hA=(e,t,n)=>(r,a)=>a&&a[0]?a[0][e+"Size"]:cA(r)&&"getBBox"in r?r.getBBox()[t]:r[n],pA=/*@__PURE__*/hA("inline","width","offsetWidth"),mA=/*@__PURE__*/hA("block","height","offsetHeight");function fA({target:e,borderBoxSize:t}){uA.get(e)?.forEach(n=>{n(e,{get width(){return pA(e,t)},get height(){return mA(e,t)}})})}function gA(e){e.forEach(fA)}function vA(e,t){dA||"undefined"!=typeof ResizeObserver&&(dA=new ResizeObserver(gA));const n=jT(e);return n.forEach(e=>{let n=uA.get(e);n||(n=/* @__PURE__ */new Set,uA.set(e,n)),n.add(t),dA?.observe(e)}),()=>{n.forEach(e=>{const n=uA.get(e);n?.delete(t),n?.size||dA?.unobserve(e)})}}var yA,bA=/* @__PURE__ */new Set;function xA(e){return bA.add(e),yA||(yA=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};bA.forEach(t=>t(e))},window.addEventListener("resize",yA)),()=>{bA.delete(e),bA.size||"function"!=typeof yA||(window.removeEventListener("resize",yA),yA=void 0)}}function wA(e,t){return"function"==typeof e?xA(e):vA(e,t)}var SA={value:null,addProjectionMetrics:null};var kA=[...AT,rC,uC],CA=()=>({x:{min:0,max:0},y:{min:0,max:0}}),NA=/* @__PURE__ */new WeakMap;function TA(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function AA(e){return"string"==typeof e||Array.isArray(e)}var MA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],IA=["initial",...MA];function DA(e){return TA(e.animate)||IA.some(t=>AA(e[t]))}function EA(e){return Boolean(DA(e)||e.variants)}var RA={current:null},_A={current:!1},zA="undefined"!=typeof window;var PA=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],OA={};function LA(e){OA=e}var FA=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:a,blockInitialAnimation:o,visualState:i},s={}){this.current=null,this.children=/* @__PURE__ */new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=/* @__PURE__ */new Map,this.KeyframeResolver=MN,this.features={},this.valueSubscriptions=/* @__PURE__ */new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=Ek.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Tk.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=a,this.options=s,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=DA(t),this.isVariantNode=EA(t),this.isVariantNode&&(this.variantChildren=/* @__PURE__ */new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:d,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const h in u){const e=u[h];void 0!==l[h]&&yT(e)&&e.set(l[h])}}mount(e){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=e,NA.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(_A.current||function(){if(_A.current=!0,zA)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>RA.current=e.matches;e.addEventListener("change",t),t()}else RA.current=!1}(),this.shouldReduceMotion=RA.current),"production"!==process.env.NODE_ENV&&ok(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Ak(this.notifyUpdate),Ak(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=/* @__PURE__ */new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&UN.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:a,ease:o,duration:i}=t.accelerate,s=new BN({element:this.current,name:e,keyframes:r,times:a,ease:o,duration:tk(i)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=vN.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&Tk.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),a&&a()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in OA){const t=OA[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<PA.length;n++){const t=PA[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const a=t[r],o=n[r];if(yT(a))e.addValue(r,a);else if(yT(o))e.addValue(r,eT(a,{owner:e}));else if(o!==a)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(a):t.hasAnimated||t.set(a)}else{const t=e.getStaticValue(r);e.addValue(r,eT(void 0!==t?t:a,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=eT(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=n&&("string"==typeof n&&(WS(n)||KS(n))?n=parseFloat(n):!(e=>kA.find(TT(e)))(n)&&uC.test(t)&&(n=VT(e,t)),this.setBaseTarget(e,yT(n)?n.get():n)),yT(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const r=hT(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&void 0!==n)return n;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||yT(r)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new ek),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){WT.render(this.render)}},BA=class extends FA{constructor(){super(...arguments),this.KeyframeResolver=$T}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;yT(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}},VA=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function HA({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function $A(e){return void 0===e||1===e}function qA({scale:e,scaleX:t,scaleY:n}){return!$A(e)||!$A(t)||!$A(n)}function jA(e){return qA(e)||UA(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function UA(e){return GA(e.x)||GA(e.y)}function GA(e){return e&&"0%"!==e}function WA(e,t,n){return n+t*(e-n)}function YA(e,t,n,r,a){return void 0!==a&&(e=WA(e,a,r)),WA(e,n,r)+t}function KA(e,t=0,n=1,r,a){e.min=YA(e.min,t,n,r,a),e.max=YA(e.max,t,n,r,a)}function XA(e,{x:t,y:n}){KA(e.x,t.translate,t.scale,t.originPoint),KA(e.y,n.translate,n.scale,n.originPoint)}var ZA=.999999999999,JA=1.0000000000001;function QA(e,t){e.min+=t,e.max+=t}function eM(e,t,n,r,a=.5){KA(e,t,n,mC(e.min,e.max,a),r)}function tM(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function nM(e,t,n){const r=n??e;eM(e.x,tM(t.x,r.x),t.scaleX,t.scale,t.originX),eM(e.y,tM(t.y,r.y),t.scaleY,t.scale,t.originY)}function rM(e,t){return HA(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}var aM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},oM=gN.length;function iM(e,t,n){const{style:r,vars:a,transformOrigin:o}=e;let i=!1,s=!1;for(const l in t){const e=t[l];if(vN.has(l))i=!0;else if(_k(l))a[l]=e;else{const t=UT(e,OT[l]);l.startsWith("origin")?(s=!0,o[l]=t):r[l]=t}}if(t.transform||(i||n?r.transform=function(e,t,n){let r="",a=!0;for(let i=0;i<oM;i++){const o=gN[i],s=e[o];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===(o.startsWith("scale")?1:0);else{const e=parseFloat(s);l=o.startsWith("scale")?1===e:0===e}if(!l||n){const e=UT(s,OT[o]);l||(a=!1,r+=`${aM[o]||o}(${e}) `),n&&(t[o]=e)}}const o=e.pathRotation;return o&&(a=!1,r+=`rotate(${UT(o,OT.pathRotation)}) `),r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}function sM(e,{style:t,vars:n},r,a){const o=e.style;let i;for(i in t)o[i]=t[i];for(i in a?.applyProjectionStyles(o,r),n)o.setProperty(i,n[i])}function lM(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var cM={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Jk.test(e))return e;e=parseFloat(e)}return`${lM(e,t.target.x)}% ${lM(e,t.target.y)}%`}},dM={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=uC.parse(e);if(a.length>5)return r;const o=uC.createTransformer(e),i="number"!=typeof a[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;a[0+i]/=s,a[1+i]/=l;const c=mC(s,l,.5);return"number"==typeof a[2+i]&&(a[2+i]/=c),"number"==typeof a[3+i]&&(a[3+i]/=c),o(a)}},uM={borderRadius:{...cM,applyTo:[...qT]},borderTopLeftRadius:cM,borderTopRightRadius:cM,borderBottomLeftRadius:cM,borderBottomRightRadius:cM,boxShadow:dM};function hM(e,{layout:t,layoutId:n}){return vN.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!uM[e]||"opacity"===e)}function pM(e,t,n){const r=e.style,a=t?.style,o={};if(!r)return o;for(const i in r)(yT(r[i])||a&&yT(a[i])||hM(i,e)||void 0!==n?.getValue(i)?.liveStyle)&&(o[i]=r[i]);return o}var mM=class extends BA{constructor(){super(...arguments),this.type="html",this.renderInstance=sM}mount(e){US(Boolean(e.style),"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(e)}readValueFromInstance(e,t){if(vN.has(t))return this.projection?.isProjecting?pN(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return mN(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),a=(_k(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof a?a.trim():a}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return rM(e,t)}build(e,t,n){iM(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return pM(e,t,n)}},fM={offset:"stroke-dashoffset",array:"stroke-dasharray"},gM={offset:"strokeDashoffset",array:"strokeDasharray"};var vM=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function yM(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:o=1,pathOffset:i=0,...s},l,c,d){if(iM(e,s,c),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:u,style:h}=e;u.transform&&(h.transform=u.transform,delete u.transform),(h.transform||u.transformOrigin)&&(h.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),h.transform&&(h.transformBox=d?.transformBox??"fill-box",delete u.transformBox);for(const p of vM)void 0!==u[p]&&(h[p]=u[p],delete u[p]);void 0!==t&&(u.x=t),void 0!==n&&(u.y=n),void 0!==r&&(u.scale=r),void 0!==a&&function(e,t,n=1,r=0,a=!0){e.pathLength=1;const o=a?fM:gM;e[o.offset]=""+-r,e[o.array]=`${t} ${n}`}(u,a,o,i,!1)}var bM=/* @__PURE__ */new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),xM=e=>"string"==typeof e&&"svg"===e.toLowerCase();function wM(e,t,n){const r=pM(e,t,n);for(const a in e)if(yT(e[a])||yT(t[a])){r[-1!==gN.indexOf(a)?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a]=e[a]}return r}var SM=class extends BA{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=CA}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(vN.has(t)){const e=FT(t);return e&&e.default||0}return t=bM.has(t)?t:xT(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return wM(e,t,n)}build(e,t,n){yM(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){sM(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(bM.has(a)?a:xT(a),t.attrs[a])}(e,t,0,r)}mount(e){this.isSVGTag=xM(e.tagName),super.mount(e)}},kM=IA.length;function CM(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&CM(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<kM;n++){const r=IA[n],a=e.props[r];(AA(a)||!1===a)&&(t[r]=a)}return t}function NM(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var TM=[...MA].reverse(),AM=MA.length;function MM(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const a=t.map(t=>NT(e,t,n));r=Promise.all(a)}else if("string"==typeof t)r=NT(e,t,n);else{const a="function"==typeof t?pT(e,t,n.custom):t;r=Promise.all(CT(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function IM(e){let t=MM(e),n=RM(),r=!0,a=!1;const o=t=>(n,r)=>{const a=pT(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(a){const{transition:e,transitionEnd:t,...r}=a;n={...n,...r,...t}}return n};function i(i){const{props:s}=e,l=CM(e.parent)||{},c=[],d=/* @__PURE__ */new Set;let u={},h=1/0;for(let t=0;t<AM;t++){const p=TM[t],m=n[p],f=void 0!==s[p]?s[p]:l[p],g=AA(f),v=p===i?m.isActive:null;!1===v&&(h=t);let y=f===l[p]&&f!==s[p]&&g;if(y&&(r||a)&&e.manuallyAnimateOnMount&&(y=!1),m.protectedKeys={...u},!m.isActive&&null===v||!f&&!m.prevProp||TA(f)||"boolean"==typeof f)continue;if("exit"===p&&m.isActive&&!0!==v){m.prevResolvedValues&&(u={...u,...m.prevResolvedValues});continue}const b=DM(m.prevProp,f);let x=b||p===i&&m.isActive&&!y&&g||t>h&&g,w=!1;const S=Array.isArray(f)?f:[f];let k=S.reduce(o(p),{});!1===v&&(k={});const{prevResolvedValues:C={}}=m,N={...C,...k},T=t=>{x=!0,d.has(t)&&(w=!0,d.delete(t)),m.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in N){const t=k[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=fT(t)&&fT(n)?!NM(t,n)||b:t!==n,r?null!=t?T(e):d.add(e):void 0!==t&&d.has(e)?T(e):m.protectedKeys[e]=!0}m.prevProp=f,m.prevResolvedValues=k,m.isActive&&(u={...u,...k}),(r||a)&&e.blockInitialAnimation&&(x=!1);const A=y&&b;!x||A&&!w||c.push(...S.map(t=>{const n={type:p};if("string"==typeof t&&(r||a)&&!A&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,a=pT(r,t);if(r.enteringChildren&&a){const{delayChildren:t}=a.transition||{};n.delay=ZN(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(d.size){const t={};if("boolean"!=typeof s.initial){const n=pT(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}d.forEach(n=>{const r=e.getBaseTarget(n),a=e.getValue(n);a&&(a.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let p=Boolean(c.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,a=!1,p?t(c):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=RM(),a=!0}}}function DM(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!NM(t,e)}function EM(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function RM(){return{animate:EM(!0),whileInView:EM(),whileHover:EM(),whileTap:EM(),whileDrag:EM(),whileFocus:EM(),exit:EM()}}function _M(e,t){e.min=t.min,e.max=t.max}function zM(e,t){_M(e.x,t.x),_M(e.y,t.y)}function PM(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function OM(e){return e.max-e.min}function LM(e,t,n,r=.5){e.origin=r,e.originPoint=mC(t.min,t.max,e.origin),e.scale=OM(n)/OM(t),e.translate=mC(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function FM(e,t,n,r){LM(e.x,t.x,n.x,r?r.originX:void 0),LM(e.y,t.y,n.y,r?r.originY:void 0)}function BM(e,t,n,r=0){e.min=(r?mC(n.min,n.max,r):n.min)+t.min,e.max=e.min+OM(t)}function VM(e,t,n,r=0){const a=r?mC(n.min,n.max,r):n.min;e.min=t.min-a,e.max=e.min+OM(t)}function HM(e,t,n,r){VM(e.x,t.x,n.x,r?.x),VM(e.y,t.y,n.y,r?.y)}function $M(e,t,n,r,a){return e=WA(e-=t,1/n,r),void 0!==a&&(e=WA(e,1/a,r)),e}function qM(e,t,[n,r,a],o,i){!function(e,t=0,n=1,r=.5,a,o=e,i=e){if(Zk.test(t)&&(t=parseFloat(t),t=mC(i.min,i.max,t/100)-i.min),"number"!=typeof t)return;let s=mC(o.min,o.max,r);e===o&&(s-=t),e.min=$M(e.min,t,n,s,a),e.max=$M(e.max,t,n,s,a)}(e,t[n],t[r],t[a],t.scale,o,i)}var jM=["x","scaleX","originX"],UM=["y","scaleY","originY"];function GM(e,t,n,r){qM(e.x,t,jM,n?n.x:void 0,r?r.x:void 0),qM(e.y,t,UM,n?n.y:void 0,r?r.y:void 0)}function WM(e){return 0===e.translate&&1===e.scale}function YM(e){return WM(e.x)&&WM(e.y)}function KM(e,t){return e.min===t.min&&e.max===t.max}function XM(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ZM(e,t){return XM(e.x,t.x)&&XM(e.y,t.y)}function JM(e){return OM(e.x)/OM(e.y)}function QM(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function eI(e){return[e("x"),e("y")]}var tI=qT.length,nI=e=>"string"==typeof e?parseFloat(e):e,rI=e=>"number"==typeof e||Jk.test(e);function aI(e,t){return void 0!==e[t]?e[t]:e.borderRadius}var oI=/*@__PURE__*/sI(0,.5,fk),iI=/*@__PURE__*/sI(.5,.95,ZS);function sI(e,t,n){return r=>r<e?0:r>t?1:n(QS(e,t,r))}function lI(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var cI=(e,t)=>e.depth-t.depth,dI=class{constructor(){this.children=[],this.isDirty=!1}add(e){HS(this.children,e),this.isDirty=!0}remove(e){$S(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(cI),this.isDirty=!1,this.children.forEach(e)}};function uI(e){return yT(e)?e.get():e}var hI=class{constructor(){this.members=[]}add(e){HS(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1!==r.isConnected||n.snapshot||($S(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if($S(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent&&!1!==e.instance?.isConnected)return this.promote(e),!0}return!1}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=n.options,{layoutDependency:a}=e.options;void 0!==r&&r===a||(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},pI={hasAnimatedSinceResize:!0,hasEverUpdated:!1},mI={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},fI=["","X","Y","Z"],gI=0;function vI(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function yI(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ST(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Tk,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&yI(r)}function bI({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(e={},n=t?.()){this.id=gI++,this.animationId=0,this.animationCommitId=0,this.children=/* @__PURE__ */new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=/* @__PURE__ */new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,SA.value&&(mI.nodes=mI.calculatedTargetDeltas=mI.calculatedProjections=0),this.nodes.forEach(SI),this.nodes.forEach(EI),this.nodes.forEach(RI),this.nodes.forEach(kI),SA.addProjectionMetrics&&SA.addProjectionMetrics(mI)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=/* @__PURE__ */new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new dI)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ek),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=cA(t)&&!(cA(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:a,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(a||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const a=()=>this.root.updateBlockedByResize=!1;Tk.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Ek.now(),r=({timestamp:a})=>{const o=a-n;o>=t&&(Ak(r),e(o-t))};return Tk.setup(r,!0),()=>Ak(r)}(a,250),pI.hasAnimatedSinceResize&&(pI.hasAnimatedSinceResize=!1,this.nodes.forEach(DI)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&o&&(r||a)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const a=this.options.transition||o.getDefaultTransition()||FI,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=o.getProps(),l=!this.targetLayout||!ZM(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...nT(a,"layout"),onPlay:i,onComplete:s};(o.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c,t.path)}else t||DI(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ak(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(_I),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&yI(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let a=0;a<this.path.length;a++){const e=this.path[a];e.shouldResetTransform=!0,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const e=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(TI),void this.nodes.forEach(NI)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(AI);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(MI),this.nodes.forEach(II),this.nodes.forEach(xI),this.nodes.forEach(wI)):this.nodes.forEach(AI),this.clearAllSnapshots();const e=Ek.now();Mk.delta=qS(0,1e3/60,e-Mk.timestamp),Mk.timestamp=e,Mk.isProcessing=!0,Ik.update.process(Mk),Ik.preRender.process(Mk),Ik.render.process(Mk),Mk.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,WT.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(CI),this.sharedNodes.forEach(zI)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Tk.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Tk.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||OM(this.snapshot.measuredBox.x)||OM(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++)this.path[n].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!a)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!YM(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||jA(this.latestValues)||o)&&(a(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),HI((r=n).x),HI(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!this.scroll?.wasRoot&&!this.path.some(qI)){const{scroll:e}=this.root;e&&(QA(t.x,e.offset.x),QA(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(zM(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:a,options:o}=r;r!==this.root&&a&&o.layoutScroll&&(a.wasRoot&&zM(t,e),QA(t.x,a.offset.x),QA(t.y,a.offset.y))}return t}applyTransform(e,t=!1,n){const r=n||{x:{min:0,max:0},y:{min:0,max:0}};zM(r,e);for(let a=0;a<this.path.length;a++){const e=this.path[a];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&(QA(r.x,-e.scroll.offset.x),QA(r.y,-e.scroll.offset.y)),jA(e.latestValues)&&nM(r,e.latestValues,e.layout?.layoutBox)}return jA(this.latestValues)&&nM(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};zM(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!jA(e.latestValues))continue;let r;e.instance&&(qA(e.latestValues)&&e.updateSnapshot(),r=CA(),zM(r,e.measurePageBox())),GM(t,e.latestValues,e.snapshot?.layoutBox,r)}return jA(this.latestValues)&&GM(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Mk.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:a}=this.options;if(!this.layout||!r&&!a)return;this.resolvedRelativeTargetAt=Mk.timestamp;const o=this.getClosestProjectingParent();o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),function(e,t,n,r){BM(e.x,t.x,n.x,r?.x),BM(e.y,t.y,n.y,r?.y)}(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):zM(this.target,this.layout.layoutBox),XA(this.target,this.targetDelta)):zM(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),SA.value&&mI.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!qA(this.parent.latestValues)&&!UA(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},HM(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),zM(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Mk.timestamp&&(n=!1),n)return;const{layout:r,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!a)return;zM(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,i=this.treeScale.y;!function(e,t,n,r=!1){const a=n.length;if(!a)return;let o,i;t.x=t.y=1;for(let s=0;s<a;s++){o=n[s],i=o.projectionDelta;const{visualElement:a}=o.options;a&&a.props.style&&"contents"===a.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(QA(e.x,-o.scroll.offset.x),QA(e.y,-o.scroll.offset.y)),i&&(t.x*=i.x.scale,t.y*=i.y.scale,XA(e,i)),r&&jA(o.latestValues)&&nM(e,o.latestValues,o.layout?.layoutBox))}t.x<JA&&t.x>ZA&&(t.x=1),t.y<JA&&t.y>ZA&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:s}=e;s?(this.projectionDelta&&this.prevProjectionDelta?(PM(this.prevProjectionDelta.x,this.projectionDelta.x),PM(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),FM(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===o&&this.treeScale.y===i&&QM(this.projectionDelta.x,this.prevProjectionDelta.x)&&QM(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s)),SA.value&&mI.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1,n){const r=this.snapshot,a=r?r.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},l=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),d=!c||c.members.length<=1,u=Boolean(l&&!d&&!0===this.options.crossfade&&!this.path.some(LI));let h;this.animationProgress=0;const p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{const n=t/1e3,r=p?.(n);r?(i.x.translate=r.x,i.x.scale=mC(e.x.scale,1,n),i.x.origin=e.x.origin,i.x.originPoint=e.x.originPoint,i.y.translate=r.y,i.y.scale=mC(e.y.scale,1,n),i.y.origin=e.y.origin,i.y.originPoint=e.y.originPoint):(PI(i.x,e.x,n),PI(i.y,e.y,n)),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(HM(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),function(e,t,n,r){OI(e.x,t.x,n.x,r),OI(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,s,n),h&&function(e,t){return KM(e.x,t.x)&&KM(e.y,t.y)}(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),zM(h,this.relativeTarget)),l&&(this.animationValues=o,function(e,t,n,r,a,o){a?(e.opacity=mC(0,n.opacity??1,oI(r)),e.opacityExit=mC(t.opacity??1,0,iI(r))):o&&(e.opacity=mC(t.opacity??1,n.opacity??1,r));for(let i=0;i<tI;i++){const a=qT[i];let o=aI(t,a),s=aI(n,a);void 0===o&&void 0===s||(o||(o=0),s||(s=0),0===o||0===s||rI(o)===rI(s)?(e[a]=Math.max(mC(nI(o),nI(s),r),0),(Zk.test(s)||Zk.test(o))&&(e[a]+="%")):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=mC(t.rotate||0,n.rotate||0,r))}(o,a,this.latestValues,n,u,d)),r&&void 0!==r.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ak(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Tk.update(()=>{pI.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=eT(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){const r=yT(e)?e:eT(e);return r.start(lT("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:a}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&$I(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=OM(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=OM(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}zM(t,n),nM(t,a),FM(this.projectionDeltaWithTransform,this.layoutCorrected,t,a)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new hI),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&vI("z",e,r,this.animationValues);for(let a=0;a<fI.length;a++)vI(`rotate${fI[a]}`,e,r,this.animationValues),vI(`skew${fI[a]}`,e,r,this.animationValues);e.render();for(const a in r)e.setStaticValue(a,r[a]),this.animationValues&&(this.animationValues[a]=r[a]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=uI(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=uI(t?.pointerEvents)||""),void(this.hasProjected&&!jA(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const a=r.animationValues||r.latestValues;this.applyTransformsToTarget();let o=function(e,t,n){let r="";const a=e.x.translate/t.x,o=e.y.translate/t.y,i=n?.z||0;if((a||o||i)&&(r=`translate3d(${a}px, ${o}px, ${i}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,pathRotation:a,rotateX:o,rotateY:i,skewX:s,skewY:l}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),a&&(r+=`rotate(${a}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),s&&(r+=`skewX(${s}deg) `),l&&(r+=`skewY(${l}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a);n&&(o=n(a,o)),e.transform=o;const{x:i,y:s}=this.projectionDelta;e.transformOrigin=`${100*i.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:e.opacity=r===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const l in uM){if(void 0===a[l])continue;const{correct:t,applyTo:n,isCSSVariable:i}=uM[l],s="none"===o?a[l]:t(a[l],r);if(n){const t=n.length;for(let r=0;r<t;r++)e[n[r]]=s}else i?this.options.visualElement.renderState.vars[l]=s:e[l]=s}this.options.layoutId&&(e.pointerEvents=r===this?uI(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(NI),this.root.sharedNodes.clear()}}}function xI(e){e.updateLayout()}function wI(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;if("size"===a)eI(e=>{const r=o?t.measuredBox[e]:t.layoutBox[e],a=OM(r);r.min=n[e].min,r.max=r.min+a});else if("x"===a||"y"===a){const e="x"===a?"y":"x";_M(o?t.measuredBox[e]:t.layoutBox[e],n[e])}else $I(a,t.layoutBox,n)&&eI(r=>{const a=o?t.measuredBox[r]:t.layoutBox[r],i=OM(n[r]);a.max=a.min+i,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+i)});const i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};FM(i,n,t.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?FM(s,e.applyTransform(r,!0),t.measuredBox):FM(s,n,t.layoutBox);const l=!YM(i);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:a,layout:o}=r;if(a&&o){const i=e.options.layoutAnchor||void 0,s={x:{min:0,max:0},y:{min:0,max:0}};HM(s,t.layoutBox,a.layoutBox,i);const l={x:{min:0,max:0},y:{min:0,max:0}};HM(l,n,o.layoutBox,i),ZM(s,l)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function SI(e){SA.value&&mI.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function kI(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function CI(e){e.clearSnapshot()}function NI(e){e.clearMeasurements()}function TI(e){e.isLayoutDirty=!0,e.updateLayout()}function AI(e){e.isLayoutDirty=!1}function MI(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function II(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function DI(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function EI(e){e.resolveTargetDelta()}function RI(e){e.calcProjection()}function _I(e){e.resetSkewAndRotation()}function zI(e){e.removeLeadSnapshot()}function PI(e,t,n){e.translate=mC(t.translate,0,n),e.scale=mC(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function OI(e,t,n,r){e.min=mC(t.min,n.min,r),e.max=mC(t.max,n.max,r)}function LI(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}var FI={duration:.45,ease:[.4,0,.1,1]},BI=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),VI=BI("applewebkit/")&&!BI("chrome/")?Math.round:ZS;function HI(e){e.min=VI(e.min),e.max=VI(e.max)}function $I(e,t,n){return"position"===e||"preserve-aspect"===e&&!function(e,t,n){return Math.abs(e-t)<=n}(JM(t),JM(n),.2)}function qI(e){return e!==e.root&&e.scroll?.wasRoot}var jI=bI({attachResizeListener:(e,t)=>lI(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),UI={current:void 0},GI=bI({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!UI.current){const e=new jI({});e.mount(window),e.setOptions({layoutScroll:!0}),UI.current=e}return UI.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),WI=Y({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function YI(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function KI(...e){return q.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=YI(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():YI(e[t],null)}}}}(...e),e)}var XI=class extends q.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(GT(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=GT(e)&&e.offsetWidth||0,r=GT(e)&&e.offsetHeight||0,a=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(a.height),o.width=parseFloat(a.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=n-o.width-o.left,o.bottom=r-o.height-o.top,o.direction=a.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function ZI({children:e,isPresent:t,anchorX:n,anchorY:r,root:a,pop:o}){const i=ne(),s=se(null),l=se({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:c}=ee(WI),d=!1!==o?e.props?.ref??e?.ref:void 0,u=KI(s,d);return ae(()=>{const{width:e,height:d,top:u,left:h,right:p,bottom:m,direction:f}=l.current;if(t||!1===o||!s.current||!e||!d)return;const g="rtl"===f,v="left"===n?g?`right: ${p}`:`left: ${h}`:g?`left: ${h}`:`right: ${p}`,y="bottom"===r?`bottom: ${m}`:`top: ${u}`;s.current.dataset.motionPopId=i;const b=document.createElement("style");c&&(b.nonce=c);const x=a??document.head;return x.appendChild(b),b.sheet&&b.sheet.insertRule(`\n [data-motion-pop-id="${i}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${d}px !important;\n ${v}px !important;\n ${y}px !important;\n }\n `),()=>{s.current?.removeAttribute("data-motion-pop-id"),x.contains(b)&&x.removeChild(b)}},[t]),pe(XI,{isPresent:t,childRef:s,sizeRef:l,pop:o,children:!1===o?e:q.cloneElement(e,{ref:u})})}var JI=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:o,mode:i,anchorX:s,anchorY:l,root:c})=>{const d=FS(QI),u=ne(),h=se(n),p=se(r);BS(()=>{h.current=n,p.current=r});let m=!0,f=ie(()=>(m=!1,{id:u,initial:t,isPresent:n,custom:a,onExitComplete:e=>{d.set(e,!0);for(const t of d.values())if(!t)return;r&&r()},register:e=>(d.set(e,!1),()=>{d.delete(e),!h.current&&!d.size&&p.current?.()})}),[n,d,r]);return o&&m&&(f={...f}),ie(()=>{d.forEach((e,t)=>d.set(t,!1))},[n]),q.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=pe(ZI,{pop:"popLayout"===i,isPresent:n,anchorX:s,anchorY:l,root:c,children:e}),pe(VS.Provider,{value:f,children:e})};function QI(){/* @__PURE__ */
|
|
443
|
-
return new Map}function eD(e=!0){const t=ee(VS);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,o=ne();te(()=>{if(e)return a(o)},[e]);const i=Q(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}var tD=e=>e.key||"";function nD(e){const t=[];return U.forEach(e,e=>{Z(e)&&t.push(e)}),t}var rD=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:o="sync",propagate:i=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[d,u]=eD(i),h=ie(()=>nD(e),[e]),p=i&&!d?[]:h.map(tD),m=se(!0),f=se(h),g=FS(()=>/* @__PURE__ */new Map),v=se(/* @__PURE__ */new Set),[y,b]=le(h),[x,w]=le(h);BS(()=>{m.current=!1,f.current=h;for(let e=0;e<x.length;e++){const t=tD(x[e]);p.includes(t)?(g.delete(t),v.current.delete(t)):!0!==g.get(t)&&g.set(t,!1)}},[x,p.length,p.join("-")]);const S=[];if(h!==y){let e=[...h];for(let t=0;t<x.length;t++){const n=x[t],r=tD(n);p.includes(r)||(e.splice(t,0,n),S.push(n))}return"wait"===o&&S.length&&(e=S),w(nD(e)),b(h),null}"production"!==process.env.NODE_ENV&&"wait"===o&&x.length;const{forceRender:k}=ee(LS);return pe(he,{children:x.map(e=>{const y=tD(e),b=!(i&&!d)&&(h===x||p.includes(y));return pe(JI,{isPresent:b,initial:!(m.current&&!n)&&void 0,custom:t,presenceAffectsLayout:a,mode:o,root:c,onExitComplete:b?void 0:()=>{if(v.current.has(y))return;if(!g.has(y))return;v.current.add(y),g.set(y,!0);let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(k?.(),w(f.current),i&&u?.(),r&&r())},anchorX:s,anchorY:l,children:e},y)})})},aD=Y({strict:!1}),oD={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},iD=!1;function sD(){return function(){if(iD)return;const e={};for(const t in oD)e[t]={isEnabled:e=>oD[t].some(t=>!!e[t])};LA(e),iD=!0}(),OA}var lD=/* @__PURE__ */new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function cD(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||lD.has(e)}var dD,uD,hD=/* @__PURE__ */r({default:()=>dD}),pD=t(()=>{throw dD={},new Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?')}),mD=e=>!cD(e);try{"function"==typeof(uD=(pD(),e(hD)).default)&&(mD=e=>e.startsWith("on")?!cD(e):uD(e))}catch{}var fD=/* @__PURE__ */Y({});function gD(e){const{initial:t,animate:n}=function(e,t){if(DA(e)){const{initial:t,animate:n}=e;return{initial:!1===t||AA(t)?t:void 0,animate:AA(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,ee(fD));return ie(()=>({initial:t,animate:n}),[vD(t),vD(n)])}function vD(e){return Array.isArray(e)?e.join(" "):e}var yD=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bD(e,t,n){for(const r in t)yT(t[r])||hM(r,n)||(e[r]=t[r])}function xD(e,t){const n={};return bD(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return ie(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return iM(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function wD(e,t){const n={},r=xD(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var SD=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function kD(e,t,n,r){const a=ie(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return yM(n,t,xM(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};bD(t,e.style,e),a.style={...t,...a.style}}return a}var CD=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ND(e){return"string"==typeof e&&!e.includes("-")&&!!(CD.indexOf(e)>-1||/[A-Z]/u.test(e))}function TD(e,t,n,{latestValues:r},a,o=!1,i){const s=(i??ND(e)?kD:wD)(t,r,a,e),l=function(e,t,n){const r={};for(const a in e)"values"===a&&"object"==typeof e.values||yT(e[a])||(mD(a)||!0===n&&cD(a)||!t&&!cD(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}(t,"string"==typeof e,o),c=e!==W?{...l,...s,ref:n}:{},{children:d}=t,u=ie(()=>yT(d)?d.get():d,[d]);return K(e,{...c,children:u})}function AD(e,t,n,r){const a={},o=r(e,{});for(const h in o)a[h]=uI(o[h]);let{initial:i,animate:s}=e;const l=DA(e),c=EA(e);t&&c&&!l&&!1!==e.inherit&&(void 0===i&&(i=t.initial),void 0===s&&(s=t.animate));let d=!!n&&!1===n.initial;d=d||!1===i;const u=d?s:i;if(u&&"boolean"!=typeof u&&!TA(u)){const t=Array.isArray(u)?u:[u];for(let n=0;n<t.length;n++){const r=hT(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[d?e.length-1:0]}null!==e&&(a[r]=e)}for(const r in e)a[r]=e[r]}}}return a}var MD=e=>(t,n)=>{const r=ee(fD),a=ee(VS),o=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:AD(n,r,a,e),renderState:t()}}(e,t,r,a);return n?o():FS(o)},ID=/*@__PURE__*/MD({scrapeMotionValuesFromProps:pM,createRenderState:yD}),DD=/*@__PURE__*/MD({scrapeMotionValuesFromProps:wM,createRenderState:SD}),ED=Symbol.for("motionComponentSymbol");function RD(e,t,n){const r=se(n);ae(()=>{r.current=n});const a=se(null);return Q(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());const o=r.current;if("function"==typeof o)if(n){const e=o(n);"function"==typeof e&&(a.current=e)}else a.current?(a.current(),a.current=null):o(n);else o&&(o.current=n)},[t])}var _D=Y({});function zD(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function PD(e,t,n,r,a,o){const{visualElement:i}=ee(fD),s=ee(aD),l=ee(VS),c=ee(WI),d=c.reducedMotion,u=c.skipAnimations,h=se(null),p=se(!1);r=r||s.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:d,skipAnimations:u,isSVG:o}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,f=ee(_D);!m||m.projection||!a||"html"!==m.type&&"svg"!==m.type||function(e,t,n,r){const{layoutId:a,layout:o,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutAnchor:d,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:OD(e.parent)),e.projection.setOptions({layoutId:a,layout:o,alwaysMeasureLayout:Boolean(i)||s&&zD(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c,layoutAnchor:d})}(h.current,n,a,f);const g=se(!1);ae(()=>{m&&g.current&&m.update(n,l)});const v=n[wT],y=se(Boolean(v)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return BS(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),y.current&&m.animationState&&m.animationState.animateChanges())}),te(()=>{m&&(!y.current&&m.animationState&&m.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),y.current=!1),m.enteringChildren=void 0)}),m}function OD(e){if(e)return!1!==e.options.allowProjection?e.projection:OD(e.parent)}function LD(e,{forwardMotionProps:t=!1,type:n}={},r,a){r&&function(e){const t=sD();for(const n in e)t[n]={...t[n],...e[n]};LA(t)}(r);const o=n?"svg"===n:ND(e),i=o?DD:ID;function s(n,s){let l;const c={...ee(WI),...n,layoutId:FD(n)},{isStatic:d}=c,u=gD(n),h=i(n,d);if(!d&&"undefined"!=typeof window){!function(e,t){const n=ee(aD).strict;if("production"!==process.env.NODE_ENV&&t&&n){const t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?jS(!1,t,"lazy-strict-mode"):US(!1,t,"lazy-strict-mode")}}(c,r);const t=function(e){const{drag:t,layout:n}=sD();if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(c);l=t.MeasureLayout,u.visualElement=PD(e,h,c,a,t.ProjectionNode,o)}return me(fD.Provider,{value:u,children:[l&&u.visualElement?pe(l,{visualElement:u.visualElement,...c}):null,TD(e,n,RD(h,u.visualElement,s),h,d,t,o)]})}s.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const l=X(s);return l[ED]=e,l}function FD({layoutId:e}){const t=ee(LS).id;return t&&void 0!==e?t+"-"+e:e}function BD(e,t){if("undefined"==typeof Proxy)return LD;const n=/* @__PURE__ */new Map,r=(n,r)=>LD(n,r,e,t);return new Proxy((e,t)=>("production"!==process.env.NODE_ENV&&ok(!1,"motion() is deprecated. Use motion.create() instead."),r(e,t)),{get:(a,o)=>"create"===o?r:(n.has(o)||n.set(o,LD(o,void 0,e,t)),n.get(o))})}var VD=(e,t)=>t.isSVG??ND(e)?new SM(t):new mM(t,{allowProjection:e!==W}),HD=0,$D={animation:{Feature:class extends VA{constructor(e){super(e),e.animationState||(e.animationState=IM(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();TA(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends VA{constructor(){super(...arguments),this.id=HD++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){const{initial:e,custom:t}=this.node.getProps();if("string"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)){const n=pT(this.node,e,t);if(n){const{transition:e,transitionEnd:t,...r}=n;for(const n in r)this.node.getValue(n)?.jump(r[n])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function qD(e){return{point:{x:e.pageX,y:e.pageY}}}function jD(e,t,n,r){return lI(e,t,(e=>t=>eA(t)&&e(t,qD(t)))(n),r)}var UD=({current:e})=>e?e.ownerDocument.defaultView:null,GD=(e,t)=>Math.abs(e-t);var WD=/*#__PURE__*/new Set(["auto","scroll"]),YD=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3,element:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=/* @__PURE__ */new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=KD(this.lastRawMoveEventInfo,this.transformPagePoint));const e=ZD(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=GD(e.x,t.x),r=GD(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:a}=Mk;this.history.push({...r,timestamp:a});const{onStart:o,onMove:i}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),i&&i(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=KD(t,this.transformPagePoint),Tk.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:a}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||a&&a(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=ZD("pointercancel"===e.type?this.lastMoveEventInfo:KD(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!eA(e))return;this.dragSnapToOrigin=a,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const s=KD(qD(e),this.transformPagePoint),{point:l}=s,{timestamp:c}=Mk;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=t;d&&d(e,ZD(s,this.history));const u={passive:!0,capture:!0};this.removeListeners=JS(jD(this.contextWindow,"pointermove",this.handlePointerMove,u),jD(this.contextWindow,"pointerup",this.handlePointerUp,u),jD(this.contextWindow,"pointercancel",this.handlePointerUp,u)),i&&this.startScrollTracking(i)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(WD.has(e.overflowX)||WD.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},a=r.x-t.x,o=r.y-t.y;0===a&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=a,this.history[0].y-=o),this.scrollPositions.set(e,r),Tk.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ak(this.updatePoint)}};function KD(e,t){return t?{point:t(e.point)}:e}function XD(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ZD({point:e},t){return{point:e,delta:XD(e,QD(t)),offset:XD(e,JD(t)),velocity:eE(t,.1)}}function JD(e){return e[0]}function QD(e){return e[e.length-1]}function eE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=QD(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>tk(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&a.timestamp-r.timestamp>2*tk(t)&&(r=e[1]);const o=nk(a.timestamp-r.timestamp);if(0===o)return{x:0,y:0};const i={x:(a.x-r.x)/o,y:(a.y-r.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function tE(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function nE(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}var rE=.35;function aE(e,t,n){return{min:oE(e,t),max:oE(e,n)}}function oE(e,t){return"number"==typeof e?e:e[t]||0}var iE=/* @__PURE__ */new WeakMap,sE=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:a}=this.getProps();this.panSession=new YD(e,{onSessionStart:e=>{t&&this.snapToCursor(qD(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:a}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?KT[o]?null:(KT[o]=!0,()=>{KT[o]=!1}):KT.x||KT.y?null:(KT.x=KT.y=!0,()=>{KT.x=KT.y=!1}),!this.openDragLock))return;var o;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eI(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Zk.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=OM(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),a&&Tk.update(()=>a(e,t),!1,!0),bT(this.visualElement,"transform");const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:a,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:i}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(i),void(null!==this.currentDirection&&a&&a(this.currentDirection));this.updateAxis("x",t.point,i),this.updateAxis("y",t.point,i),this.visualElement.render(),o&&Tk.update(()=>o(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:n,contextWindow:UD(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!r||!n)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&Tk.postRender(()=>i(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!cE(e,r,this.currentDirection))return;const a=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?mC(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?mC(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),a.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&zD(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:a}){return{x:tE(e.x,n,a),y:tE(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=rE){return!1===e?e=0:!0===e&&(e=rE),{x:aE(e,"left","right"),y:aE(e,"top","bottom")}}(t),r!==this.constraints&&!zD(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&eI(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!zD(e))return!1;const n=e.current;US(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());const a=function(e,t,n){const r=rM(e,n),{scroll:a}=t;return a&&(QA(r.x,a.offset.x),QA(r.y,a.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:nE(e.x,t.x),y:nE(e.y,t.y)}}(r.layout.layoutBox,a);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=HA(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:i}=this.getProps(),s=this.constraints||{},l=eI(i=>{if(!cE(i,t,this.currentDirection))return;let l=s&&s[i]||{};!0!==o&&o!==i||(l={min:0,max:0});const c=r?200:1e6,d=r?40:1e7,u={type:"inertia",velocity:n?e[i]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(i,u)});return Promise.all(l).then(i)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return bT(this.visualElement,e),n.start(lT(e,n,0,t,this.visualElement,!1))}stopAnimation(){eI(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps()[t];return n||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){eI(t=>{const{drag:n}=this.getProps();if(!cE(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,a=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[t],i=a.get()||0;a.set(e[t]-mC(n,o,.5)+i)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!zD(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};eI(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=OM(e),a=OM(t);return a>r?n=QS(t.min,t.max-r,e.min):r>a&&(n=QS(e.min,e.max-a,t.min)),qS(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),eI(t=>{if(!cE(t,e,null))return;const n=this.getAxisMotionValue(t),{min:a,max:o}=this.constraints[t];n.set(mC(a,o,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;iE.set(this.visualElement,this);const e=this.visualElement.current,t=jD(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),a=t.target,o=a!==e&&function(e){return nA.has(e.tagName)||!0===e.isContentEditable}(a);n&&r&&!o&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();zD(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=wA(e,lE(n)),a=wA(t,lE(n));return()=>{r(),a()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,o=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Tk.read(r);const i=lI(window,"resize",()=>this.scalePositionWithinConstraints()),s=a.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(eI(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),t(),o(),s&&s(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:a=!1,dragElastic:o=rE,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:a,dragElastic:o,dragMomentum:i}}};function lE(e){let t=!0;return()=>{t?t=!1:e()}}function cE(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}var dE=e=>(t,n)=>{e&&Tk.update(()=>e(t,n),!1,!0)},uE=!1,hE=class extends G{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:a}=e;a&&(t.group&&t.group.add(a),n&&n.register&&r&&n.register(a),uE&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),pI.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:a}=this.props,{projection:o}=n;return o?(o.isPresent=a,e.layoutDependency!==t&&o.setOptions({...o.options,layoutDependency:t}),uE=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||Tk.postRender(()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),WT.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;uE=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}};function pE(e){const[t,n]=eD(),r=ee(LS);return pe(hE,{...e,layoutGroup:r,switchLayoutGroup:ee(_D),isPresent:t,safeToRemove:n})}var mE={pan:{Feature:class extends VA{constructor(){super(...arguments),this.removePointerDownListener=ZS}onPointerDown(e){this.session=new YD(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:UD(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:dE(e),onStart:dE(t),onMove:dE(n),onEnd:(e,t)=>{delete this.session,r&&Tk.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=jD(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends VA{constructor(e){super(e),this.removeGroupControls=ZS,this.removeListeners=ZS,this.controls=new sE(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ZS}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:GI,MeasureLayout:pE}};function fE(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const a=r["onHover"+n];a&&Tk.postRender(()=>a(t,qD(t)))}function gE(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const a=r["onTap"+("End"===n?"":n)];a&&Tk.postRender(()=>a(t,qD(t)))}var vE=/* @__PURE__ */new WeakMap,yE=/* @__PURE__ */new WeakMap,bE=e=>{const t=vE.get(e.target);t&&t(e)},xE=e=>{e.forEach(bE)};function wE(e,t,n){const r=function({root:e,...t}){const n=e||document;yE.has(n)||yE.set(n,{});const r=yE.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(xE,{root:e,...t})),r[a]}(t);return vE.set(e,n),r.observe(e),()=>{vE.delete(e),r.unobserve(e)}}var SE={some:0,all:1};var kE={inView:{Feature:class extends VA{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:a}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:SE[r]};this.stopObserver=wE(this.node.current,o,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,a&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends VA{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=lA(e,(e,t)=>(gE(this.node,t,"Start"),(e,{success:t})=>gE(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends VA{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(zi){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=JS(lI(this.node.current,"focus",()=>this.onFocus()),lI(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends VA{mount(){const{current:e}=this.node;e&&(this.unmount=JT(e,(e,t)=>(fE(this.node,t,"Start"),e=>fE(this.node,e,"End"))))}unmount(){}}}},CE=/*@__PURE__*/BD({...$D,...kE,...mE,...{layout:{ProjectionNode:GI,MeasureLayout:pE}}},VD),NE={type:"tween",ease:[.22,1,.36,1],duration:.5};function TE({percentage:e}){const t=24,n=10.75,r=2*Math.PI*n,a=r-e/100*r;/* @__PURE__ */
|
|
444
|
-
return me("svg",{width:t,height:t,className:"-rotate-90 shrink-0",children:[/* @__PURE__ */pe("circle",{cx:12,cy:12,r:n,fill:"none",stroke:"var(--muted)",strokeWidth:2.5}),/* @__PURE__ */pe(
|
|
445
|
-
return me(he,{children:[/* @__PURE__ */pe(
|
|
441
|
+
/* @__PURE__ */pe(Nw,{open:e,onOpenChange:t,documents:u,onSelectDocument:b,onOpenSettings:()=>r(!0),onOpenTeams:()=>i(!0),onToggleTheme:x,currentTheme:w}),
|
|
442
|
+
/* @__PURE__ */pe(yS,{open:n,onOpenChange:r,initialSection:a,defaultSidebarView:m,onDefaultSidebarViewChange:f,enableDatabaseSync:g,onEnableDatabaseSyncChange:v}),
|
|
443
|
+
/* @__PURE__ */pe(_S,{open:o,onOpenChange:i}),
|
|
444
|
+
/* @__PURE__ */pe(PS,{open:s,onOpenChange:l,documentTitle:h?.title||"Untitled",documentId:h?.id||"",sharingInfo:h?.sharing,onUpdateSharing:e=>{h&&y(t=>t.map(t=>t.id===h.id?{...t,sharing:e}:t))}}),
|
|
445
|
+
/* @__PURE__ */pe(OS,{open:c,onOpenChange:d,currentTags:p&&u.find(e=>e.id===p)?.tags||[],onUpdateTags:S})]})}function FS(e){const t=Rw(),[n,r]=le(!1),[a,o]=le(!1),[i,s]=le(!1),[l,c]=le(!1),[d,u]=le(!1),[h,p]=le(!1),[m,f]=le(!1),[g,v]=le(null),[y,b]=DS("REASON-default-sidebar-view","last-used"),[x,w]=DS("REASON-left-panels",["files","openTabs"]),[S,k]=DS("REASON-left-split",!0),[C,N]=DS("REASON-right-panels",[]),[T,A]=DS("REASON-right-split",!1),[M,I]=DS("REASON-show-dynamic-island",!1),[D,E]=DS("REASON-sidebar-width",25),[R,_]=le(null),[z,P]=le(!1),O=se(null),[L,F]=le([]),[B,V]=DS("REASON-documents",Jh),[H,$]=DS("REASON-active-doc",B.length>0?B[0].id:null),[q,j]=DS("REASON-open-tabs",B.length>0?[B[0].id]:[]),[U,G]=le([]),[W,Y]=le(null),[K,X]=le(""),[Z,J]=le(null),[ee,ne]=le($l()),[re,ae]=DS("REASON-enable-db-sync",!1),{isSyncing:oe,lastSyncTime:ce,saveDocument:de,deleteDocument:ue,queueDocumentForSync:he}=function(e,t,n={}){const{enableSync:r=!1,syncInterval:a=5e3}=n,[o,i]=le(!1),[s,l]=le(null),c=se(/* @__PURE__ */new Map),d=se(void 0),u=Q(async()=>{if(r)try{const e=(await Bt("doc/documents")).map(e=>({id:e.id.toString(),title:e.title||e.name||"Untitled",content:e.content||"",parentId:e.parentId?e.parentId.toString():null,children:[],isExpanded:1===e.isExpanded,isFolder:1===e.isFolder,tags:e.metadata&&JSON.parse(e.metadata).tags||[],metadata:e.metadata?JSON.parse(e.metadata):void 0}));return t(e),l(/* @__PURE__ */new Date),e}catch(e){return lS.error("Failed to load documents from database"),null}},[r,t]),h=Q(async e=>{if(r)try{const n={name:e.title||"Untitled",title:e.title||"Untitled",content:e.content||"",parentId:e.parentId?parseInt(e.parentId):null,isFolder:e.isFolder||!1,metadata:{tags:e.tags||[],isExpanded:e.isExpanded||!1,...e.metadata}};if(isNaN(parseInt(e.id))){const r=await Bt("doc/documents",{method:"POST",headers:{"Content-Type":"application/json"},body:n});return t(t=>t.map(t=>t.id===e.id?{...t,id:r.id.toString()}:t)),r}return await Bt(`doc/documents/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:n})}catch(n){return lS.error("Failed to save document to database"),null}},[r,t]),p=Q(async()=>{if(r&&0!==c.current.size){i(!0);try{const e=Array.from(c.current.values());await Promise.all(e.map(e=>h(e))),c.current.clear(),l(/* @__PURE__ */new Date)}catch(e){}finally{i(!1)}}},[r,h]),m=Q(e=>{r&&(c.current.set(e.id,e),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{p()},2e3))},[r,p]),f=Q(async e=>{if(r)try{return await Bt(`doc/documents/${e}`,{method:"DELETE"}),!0}catch(t){return lS.error("Failed to delete document from database"),!1}},[r]);return te(()=>{if(!r||a<=0)return;const e=setInterval(()=>{c.current.size>0&&p()},a);return()=>clearInterval(e)},[r,a,p]),te(()=>()=>{d.current&&clearTimeout(d.current)},[]),{isSyncing:o,lastSyncTime:s,loadFromDatabase:u,saveDocument:h,deleteDocument:f,queueDocumentForSync:m,syncPendingChanges:p}}(0,V,{enableSync:re,syncInterval:5e3}),pe=e=>{const t=/* @__PURE__ */new Map,n=[];return e.forEach(e=>{t.set(e.id,{...e,children:[]})}),e.forEach(e=>{const r=t.get(e.id);e.parentId&&t.has(e.parentId)?t.get(e.parentId).children.push(r):n.push(r)}),n},me=ie(()=>pe(B),[B]),fe=B.find(e=>e.id===H);te(()=>{document.title=fe?.title?`${fe.title} - Reason Docs`:"Reason - Powerful Note-Taking App"},[fe?.title]),te(()=>{F([])},[H]);const ge=ie(()=>{const e=B.filter(e=>!e.isDeleted);if(!K.trim())return e;const t=K.toLowerCase();return e.filter(e=>e.title.toLowerCase().includes(t)||e.content.toLowerCase().includes(t))},[B,K]),ve=ie(()=>K.trim()?pe(ge):me,[ge,K]),ye=async(e,t=!1)=>{let n=null;if(e){const t=B.find(t=>t.id===e);t&&(n=t.isFolder?e:t.parentId)}const r={id:Date.now().toString(),title:t?"New Folder":"",content:"",parentId:n,children:[],isExpanded:t,isFolder:t,tags:[]};V([...B,r]),re&&await de(r),t||($(r.id),j([...q,r.id])),J(r.id),setTimeout(()=>J(null),500),n&&V(e=>e.map(e=>e.id===n?{...e,isExpanded:!0}:e)),lS.success(t?"Folder created":"Note created")},be=async e=>{const t=e=>[e,...B.filter(t=>t.parentId===e).flatMap(e=>t(e.id))],n=t(e),r=B.filter(e=>!n.includes(e.id));if(V(r),re)for(const o of n)await ue(o);const a=q.filter(e=>!n.includes(e));j(a),H&&n.includes(H)&&$(a.length>0?a[0]:r.length>0?r[0].id:null),lS.success("Note deleted")},xe=e=>{V(t=>t.map(t=>t.id===e?{...t,isExpanded:!t.isExpanded}:t))};te(()=>{const e=e=>{(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),s(!0))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),te(()=>{e&&(w(["files"]),r(!0))},[e]),te(()=>{"tree"===y?(w(["files"]),k(!1)):"outline"===y?(w(["outline"]),k(!1)):"split"===y&&(w(["files","openTabs","outline"]),k(!0))},[]);const we=e=>{G([e,...U.slice(0,9)]);const t=q.filter(t=>t!==e);if(j(t),H===e){const n=q.indexOf(e),r=Math.max(0,n-1);$(t[r]||null)}},Se=()=>{if(0===U.length)return;const[e,...t]=U;B.find(t=>t.id===e)?(q.includes(e)||j([...q,e]),$(e),G(t),lS.success("Tab reopened")):(G(t),t.length>0&&Se())},ke=()=>{N(e=>e.filter(e=>"ai"!==e)),w(e=>e.length>1?e.filter(e=>"ai"!==e):e)};return te(()=>{H&&!B.find(e=>e.id===H)&&$(B.length>0?B[0].id:null)},[B,H,$]),{isMobile:t,isSidebarOpen:n,setIsSidebarOpen:r,isRightSidebarOpen:a,setIsRightSidebarOpen:o,isSearchModalOpen:i,setIsSearchModalOpen:s,isSettingsOpen:l,setIsSettingsOpen:c,isTeamsOpen:d,setIsTeamsOpen:u,isInviteModalOpen:h,setIsInviteModalOpen:p,isTagDialogOpen:m,setIsTagDialogOpen:f,tagManagementDocId:g,defaultSidebarView:y,setDefaultSidebarView:b,leftPanels:x,setLeftPanels:w,leftSplit:S,setLeftSplit:k,rightPanels:C,setRightPanels:N,rightSplit:T,setRightSplit:A,showDynamicIsland:M,setShowDynamicIsland:I,sidebarWidth:D,setSidebarWidth:E,aiSuggestion:R,setAiSuggestion:_,isAiLoading:z,setIsAiLoading:P,editorRef:O,headings:L,setHeadings:F,documents:B,setDocuments:V,activeDocId:H,setActiveDocId:$,openTabs:q,setOpenTabs:j,closedTabsHistory:U,splitViewDocId:W,setSplitViewDocId:Y,searchQuery:K,setSearchQuery:X,newDocumentId:Z,activeFileSourceId:ee,enableDatabaseSync:re,setEnableDatabaseSync:ae,isSyncing:oe,lastSyncTime:ce,documentTree:me,activeDocument:fe,filteredDocuments:ge,filteredTree:ve,handleAddDocument:ye,handleDeleteDocument:be,handleDuplicateDocument:e=>{const t=B.find(t=>t.id===e);if(!t)return;const n={...t,id:Date.now().toString(),title:t.title+" (Copy)",children:[]};V([...B,n]),$(n.id),j([...q,n.id]),lS.success("Note duplicated")},handleUpdateDocument:(e,t)=>{V(n=>n.map(n=>{if(n.id===e){const e={...n,...t};return re&&he(e),e}return n}))},handleToggleExpand:xe,handleMoveDocument:(e,t,n)=>{const r=B.find(t=>t.id===e),a=B.find(e=>e.id===t);if(!r||e===t)return;const o=(e,t)=>B.filter(t=>t.parentId===e).some(e=>e.id===t||o(e.id,t));if(t&&o(e,t))return void lS.error("Cannot move a note into its own child");let i;i="child"===n?t:a?.parentId||null,V(a=>{const o=a.filter(t=>t.id!==e),s={...r,parentId:i};let l;if("child"===n){const e=o.findIndex(e=>e.id===t),n=o.findIndex((n,r)=>r>e&&n.parentId===t);l=-1!==n?n:e+1}else if("before"===n)l=o.findIndex(e=>e.id===t);else{const e=o.findIndex(e=>e.id===t);let n=e;const r=(e,t)=>{let n=t;for(let a=t+1;a<o.length;a++)if(o[a].parentId===e){n=a;const e=r(o[a].id,a);e>n&&(n=e,a=e)}return n};n=r(t,e),l=n+1}return[...o.slice(0,l),s,...o.slice(l)]}),lS.success("Note moved")},handleAddTag:(e,t)=>{V(n=>n.map(n=>n.id===e?{...n,tags:[...n.tags||[],t]}:n))},handleRemoveTag:(e,t)=>{V(n=>n.map(n=>n.id===e?{...n,tags:(n.tags||[]).filter(e=>e!==t)}:n))},handleManageTags:e=>{v(e),f(!0)},handleFileSourceChange:async e=>{ne(e),ql(e);const t=function(){const e=Vl(),t=$l();return e.find(e=>e.id===t)||Bl}();try{"local"!==t.type?lS.info(`Source switching for ${t.type} not yet implemented in standalone mode`):lS.success("Switched to local storage")}catch(n){lS.error("Failed to load documents from source")}},handleUpdateTags:e=>{g&&(V(t=>t.map(t=>t.id===g?{...t,tags:e}:t)),lS.success("Tags updated"))},handleRestoreDocument:e=>{V(t=>t.map(t=>t.id===e?{...t,isDeleted:!1}:t)),lS.success("Note restored")},handlePermanentDelete:e=>{const t=e=>[e,...B.filter(t=>t.parentId===e).flatMap(e=>t(e.id))],n=t(e),r=B.filter(e=>!n.includes(e.id));V(r);const a=q.filter(e=>!n.includes(e));j(a),H&&n.includes(H)&&$(a.length>0?a[0]:r.length>0?r[0].id:null),lS.success("Note permanently deleted")},handleTabChange:e=>{$(e)},handleTabClose:we,handleTabAdd:()=>{ye(null)},handleTabDelete:e=>{we(e),be(e)},handleReopenLastClosed:Se,handleSplitRight:e=>{Y(e),lS.success("Split view enabled")},handleSelectDocument:e=>{B.find(t=>t.id===e)?.isFolder?xe(e):(q.includes(e)||j([...q,e]),$(e))},handleAIRewrite:async(e,t)=>{lS.info("AI rewrite is not yet available for this editor")},handleAIApprove:()=>{_(null),ke()},handleAIReject:()=>{_(null),ke()},handleAIRegenerate:async e=>{lS.info("AI rewrite is not yet available for this editor")}}}var BS=Y({});function VS(e){const t=se(null);return null===t.current&&(t.current=e()),t.current}var HS="undefined"!=typeof window?oe:te,$S=/* @__PURE__ */Y(null);function qS(e,t){-1===e.indexOf(t)&&e.push(t)}function jS(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}var US=(e,t,n)=>n>t?t:n<e?e:n;var GS=()=>{},WS=()=>{};"undefined"!=typeof process&&"production"!==process.env.NODE_ENV&&(GS=(e,t,n)=>{},WS=(e,t,n)=>{if(!e)throw new Error(function(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}(t,n))});var YS={},KS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),XS=e=>"object"==typeof e&&null!==e,ZS=e=>/^0[^.\s]+$/u.test(e);function JS(e){let t;return()=>(void 0===t&&(t=e()),t)}var QS=e=>e,ek=(...e)=>e.reduce((e,t)=>n=>t(e(n))),tk=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1},nk=class{constructor(){this.subscriptions=[]}add(e){return qS(this.subscriptions,e),()=>jS(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let a=0;a<r;a++){const r=this.subscriptions[a];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},rk=e=>1e3*e,ak=e=>e/1e3,ok=(e,t)=>t?e*(1e3/t):0,ik=/* @__PURE__ */new Set;function sk(e,t,n){e||ik.has(t)||ik.add(t)}var lk=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function ck(e,t,n,r){if(e===t&&n===r)return QS;const a=t=>function(e,t,n,r,a){let o,i,s=0;do{i=t+(n-t)/2,o=lk(i,r,a)-e,o>0?n=i:t=i}while(Math.abs(o)>1e-7&&++s<12);return i}(t,0,1,e,n);return e=>0===e||1===e?e:lk(a(e),t,r)}var dk=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,uk=e=>t=>1-e(1-t),hk=/*@__PURE__*/ck(.33,1.53,.69,.99),pk=/*@__PURE__*/uk(hk),mk=/*@__PURE__*/dk(pk),fk=e=>e>=1?1:(e*=2)<1?.5*pk(e):.5*(2-Math.pow(2,-10*(e-1))),gk=e=>1-Math.sin(Math.acos(e)),vk=uk(gk),yk=dk(gk),bk=/*@__PURE__*/ck(.42,0,1,1),xk=/*@__PURE__*/ck(0,0,.58,1),wk=/*@__PURE__*/ck(.42,0,.58,1),Sk=e=>Array.isArray(e)&&"number"==typeof e[0],kk={linear:QS,easeIn:bk,easeInOut:wk,easeOut:xk,circIn:gk,circInOut:yk,circOut:vk,backIn:pk,backInOut:mk,backOut:hk,anticipate:fk},Ck=e=>{if(Sk(e)){WS(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,a]=e;return ck(t,n,r,a)}return"string"==typeof e?(WS(void 0!==kk[e],`Invalid easing type '${e}'`,"invalid-easing-type"),kk[e]):e},Nk=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Tk(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=Nk.reduce((e,t)=>(e[t]=function(e){let t=/* @__PURE__ */new Set,n=/* @__PURE__ */new Set,r=!1,a=!1;const o=/* @__PURE__ */new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function s(t){o.has(t)&&(l.schedule(t),e()),t(i)}const l={schedule:(e,a=!1,i=!1)=>{const s=i&&r?t:n;return a&&o.add(e),s.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(i=e,r)return void(a=!0);r=!0;const o=t;t=n,n=o,t.forEach(s),t.clear(),r=!1,a&&(a=!1,l.process(e))}};return l}(o),e),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:p,postRender:m}=i,f=()=>{const o=YS.useManualTiming,i=o?a.timestamp:performance.now();n=!1,o||(a.delta=r?1e3/60:Math.max(Math.min(i-a.timestamp,40),1)),a.timestamp=i,a.isProcessing=!0,s.process(a),l.process(a),c.process(a),d.process(a),u.process(a),h.process(a),p.process(a),m.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(f))};return{schedule:Nk.reduce((t,o)=>{const s=i[o];return t[o]=(t,o=!1,i=!1)=>(n||(n=!0,r=!0,a.isProcessing||e(f)),s.schedule(t,o,i)),t},{}),cancel:e=>{for(let t=0;t<Nk.length;t++)i[Nk[t]].cancel(e)},state:a,steps:i}}var Ak,{schedule:Mk,cancel:Ik,state:Dk,steps:Ek}=/* @__PURE__ */Tk("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:QS,!0);function Rk(){Ak=void 0}var _k={now:()=>(void 0===Ak&&_k.set(Dk.isProcessing||YS.useManualTiming?Dk.timestamp:performance.now()),Ak),set:e=>{Ak=e,queueMicrotask(Rk)}},zk=e=>t=>"string"==typeof t&&t.startsWith(e),Pk=/*@__PURE__*/zk("--"),Ok=/*@__PURE__*/zk("var(--"),Lk=e=>!!Ok(e)&&Fk.test(e.split("/*")[0].trim()),Fk=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Bk(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}var Vk={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Hk={...Vk,transform:e=>US(0,1,e)},$k={...Vk,default:1},qk=e=>Math.round(1e5*e)/1e5,jk=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;var Uk=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Gk=(e,t)=>n=>Boolean("string"==typeof n&&Uk.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Wk=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[a,o,i,s]=r.match(jk);return{[e]:parseFloat(a),[t]:parseFloat(o),[n]:parseFloat(i),alpha:void 0!==s?parseFloat(s):1}},Yk={...Vk,transform:e=>Math.round((e=>US(0,255,e))(e))},Kk={test:/*@__PURE__*/Gk("rgb","red"),parse:/*@__PURE__*/Wk("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Yk.transform(e)+", "+Yk.transform(t)+", "+Yk.transform(n)+", "+qk(Hk.transform(r))+")"};var Xk={test:/*@__PURE__*/Gk("#"),parse:function(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}},transform:Kk.transform},Zk=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Jk=/*@__PURE__*/Zk("deg"),Qk=/*@__PURE__*/Zk("%"),eC=/*@__PURE__*/Zk("px"),tC=/*@__PURE__*/Zk("vh"),nC=/*@__PURE__*/Zk("vw"),rC=/*@__PURE__*/(()=>({...Qk,parse:e=>Qk.parse(e)/100,transform:e=>Qk.transform(100*e)}))(),aC={test:/*@__PURE__*/Gk("hsl","hue"),parse:/*@__PURE__*/Wk("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Qk.transform(qk(t))+", "+Qk.transform(qk(n))+", "+qk(Hk.transform(r))+")"},oC={test:e=>Kk.test(e)||Xk.test(e)||aC.test(e),parse:e=>Kk.test(e)?Kk.parse(e):aC.test(e)?aC.parse(e):Xk.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Kk.transform(e):aC.transform(e),getAnimatableNone:e=>{const t=oC.parse(e);return t.alpha=0,oC.transform(t)}},iC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;var sC="number",lC="color",cC=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function dC(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let o=0;return{values:n,split:t.replace(cC,e=>(oC.test(e)?(r.color.push(o),a.push(lC),n.push(oC.parse(e))):e.startsWith("var(")?(r.var.push(o),a.push("var"),n.push(e)):(r.number.push(o),a.push(sC),n.push(parseFloat(e))),++o,"${}")).split("${}"),indexes:r,types:a}}function uC({split:e,types:t}){const n=e.length;return r=>{let a="";for(let o=0;o<n;o++)if(a+=e[o],void 0!==r[o]){const e=t[o];a+=e===sC?qk(r[o]):e===lC?oC.transform(r[o]):r[o]}return a}}var hC=(e,t)=>"number"==typeof e?t?.trim().endsWith("/")?e:0:(e=>"number"==typeof e?0:oC.test(e)?oC.getAnimatableNone(e):e)(e);var pC={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(jk)?.length||0)+(e.match(iC)?.length||0)>0},parse:function(e){return dC(e).values},createTransformer:function(e){return uC(dC(e))},getAnimatableNone:function(e){const t=dC(e);return uC(t)(t.values.map((e,n)=>hC(e,t.split[n])))}};function mC(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function fC(e,t){return n=>n>0?t:e}var gC=(e,t,n)=>e+(t-e)*n,vC=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},yC=[Xk,Kk,aC];function bC(e){const t=(e=>yC.find(t=>t.test(e)))(e);if(GS(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(t))return!1;let n=t.parse(e);return t===aC&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let a=0,o=0,i=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;a=mC(s,r,e+1/3),o=mC(s,r,e),i=mC(s,r,e-1/3)}else a=o=i=n;return{red:Math.round(255*a),green:Math.round(255*o),blue:Math.round(255*i),alpha:r}}(n)),n}var xC=(e,t)=>{const n=bC(e),r=bC(t);if(!n||!r)return fC(e,t);const a={...n};return e=>(a.red=vC(n.red,r.red,e),a.green=vC(n.green,r.green,e),a.blue=vC(n.blue,r.blue,e),a.alpha=gC(n.alpha,r.alpha,e),Kk.transform(a))},wC=/* @__PURE__ */new Set(["none","hidden"]);function SC(e,t){return n=>gC(e,t,n)}function kC(e){return"number"==typeof e?SC:"string"==typeof e?Lk(e)?fC:oC.test(e)?xC:TC:Array.isArray(e)?CC:"object"==typeof e?oC.test(e)?xC:NC:fC}function CC(e,t){const n=[...e],r=n.length,a=e.map((e,n)=>kC(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=a[t](e);return n}}function NC(e,t){const n={...e,...t},r={};for(const a in n)void 0!==e[a]&&void 0!==t[a]&&(r[a]=kC(e[a])(e[a],t[a]));return e=>{for(const t in r)n[t]=r[t](e);return n}}var TC=(e,t)=>{const n=pC.createTransformer(t),r=dC(e),a=dC(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?wC.has(e)&&!a.values.length||wC.has(t)&&!r.values.length?function(e,t){return wC.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):ek(CC(function(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],i=e.indexes[o][r[o]],s=e.values[i]??0;n[a]=s,r[o]++}return n}(r,a),a.values),n):(GS(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),fC(e,t))};function AC(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?gC(e,t,n):kC(e)(e,t)}var MC=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>Mk.update(t,e),stop:()=>Ik(t),now:()=>Dk.isProcessing?Dk.timestamp:_k.now()}},IC=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let o=0;o<a;o++)r+=Math.round(1e4*e(o/(a-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`};function DC(e){let t=0;let n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}var EC=100,RC=10,_C=1,zC=0,PC=800,OC=.3,LC=.3,FC={granular:.01,default:2},BC={granular:.005,default:.5},VC=.01,HC=10,$C=.05,qC=1;function jC(e,t){return e*Math.sqrt(1-t*t)}var UC=["duration","bounce"],GC=["stiffness","damping","mass"];function WC(e,t){return t.some(t=>void 0!==e[t])}function YC(e){let t={velocity:zC,stiffness:EC,damping:RC,mass:_C,isResolvedFromDuration:!1,...e};if(!WC(e,GC)&&WC(e,UC))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),a=r*r,o=2*US(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:_C,stiffness:a,damping:o}}else{const n=function({duration:e=PC,bounce:t=OC,velocity:n=zC,mass:r=_C}){let a,o;GS(e<=rk(HC),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=US($C,qC,i),e=US(VC,HC,ak(e)),i<1?(a=t=>{const r=t*i,a=r*e;return.001-(r-n)/jC(t,i)*Math.exp(-a)},o=t=>{const r=t*i*e,o=r*n+n,s=Math.pow(i,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=jC(Math.pow(t,2),i);return(.001-a(t)>0?-1:1)*((o-s)*l)/c}):(a=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let a=1;a<12;a++)r-=e(r)/t(r);return r}(a,o,5/e);if(e=rk(e),isNaN(s))return{stiffness:EC,damping:RC,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*i*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});t={...t,...n,mass:_C},t.isResolvedFromDuration=!0}return t}function KC(e=LC,t=OC){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=YC({...n,velocity:-ak(n.velocity||0)}),m=h||0,f=c/(2*Math.sqrt(l*d)),g=i-o,v=ak(Math.sqrt(l/d)),y=Math.abs(g)<5;let b,x,w,S,k,C;if(r||(r=y?FC.granular:FC.default),a||(a=y?BC.granular:BC.default),f<1)w=jC(v,f),S=(m+f*v*g)/w,b=e=>{const t=Math.exp(-f*v*e);return i-t*(S*Math.sin(w*e)+g*Math.cos(w*e))},k=f*v*S+g*w,C=f*v*g-S*w,x=e=>Math.exp(-f*v*e)*(k*Math.sin(w*e)+C*Math.cos(w*e));else if(1===f){b=e=>i-Math.exp(-v*e)*(g+(m+v*g)*e);const e=m+v*g;x=t=>Math.exp(-v*t)*(v*e*t-m)}else{const e=v*Math.sqrt(f*f-1);b=t=>{const n=Math.exp(-f*v*t),r=Math.min(e*t,300);return i-n*((m+f*v*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};const t=(m+f*v*g)/e,n=f*v*t-g*e,r=f*v*g-t*e;x=t=>{const a=Math.exp(-f*v*t),o=Math.min(e*t,300);return a*(n*Math.sinh(o)+r*Math.cosh(o))}}const N={calculatedDuration:p&&u||null,velocity:e=>rk(x(e)),next:e=>{if(!p&&f<1){const t=Math.exp(-f*v*e),n=Math.sin(w*e),o=Math.cos(w*e),l=i-t*(S*n+g*o),c=rk(t*(k*n+C*o));return s.done=Math.abs(c)<=r&&Math.abs(i-l)<=a,s.value=s.done?i:l,s}const t=b(e);if(p)s.done=e>=u;else{const n=rk(x(e));s.done=Math.abs(n)<=r&&Math.abs(i-t)<=a}return s.value=s.done?i:t,s},toString:()=>{const e=Math.min(DC(N),2e4),t=IC(t=>N.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return N}KC.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(DC(r),2e4);return{type:"keyframes",ease:e=>r.next(a*e).value/t,duration:ak(a)}}(e,100,KC);return e.ease=t.ease,e.duration=rk(t.duration),e.type="keyframes",e};function XC(e,t,n){const r=Math.max(t-5,0);return ok(n-e(r),t-r)}function ZC({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:o=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:d}){const u=e[0],h={done:!1,value:u},p=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let m=n*t;const f=u+m,g=void 0===i?f:i(f);g!==f&&(m=g-u);const v=e=>-m*Math.exp(-e/r),y=e=>g+v(e),b=e=>{const t=v(e),n=y(e);h.done=Math.abs(t)<=c,h.value=h.done?g:n};let x,w;const S=e=>{(e=>void 0!==s&&e<s||void 0!==l&&e>l)(h.value)&&(x=e,w=KC({keyframes:[h.value,p(h.value)],velocity:XC(y,e,h.value),damping:a,stiffness:o,restDelta:c,restSpeed:d}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),S(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),h)}}}function JC(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const o=e.length;if(WS(o===t.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],a=n||YS.mix||AC,o=e.length-1;for(let i=0;i<o;i++){let n=a(e[i],e[i+1]);if(t){const e=Array.isArray(t)?t[i]||QS:t;n=ek(e,n)}r.push(n)}return r}(t,r,a),l=s.length,c=n=>{if(i&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const a=tk(e[r],e[r+1],n);return s[r](a)};return n?t=>c(US(e[0],e[o-1],t)):c}function QC(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=tk(0,t,r);e.push(gC(n,1,a))}}(t,e.length-1),t}function eN({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Ck):Ck(r),o={done:!1,value:t[0]},i=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:QC(t),e),s=JC(i,t,{ease:Array.isArray(a)?a:(l=t,c=a,l.map(()=>c||wk).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}var tN=e=>null!==e;function nN(e,{repeat:t,repeatType:n="loop"},r,a=1){const o=e.filter(tN),i=a<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}var rN={decay:ZC,inertia:ZC,tween:eN,keyframes:eN,spring:KC};function aN(e){"string"==typeof e.type&&(e.type=rN[e.type])}var oN=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},iN=e=>e/100,sN=class extends oN{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==_k.now()&&this.tick(_k.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;aN(e);const{type:t=eN,repeat:n=0,repeatDelay:r=0,repeatType:a,velocity:o=0}=e;let{keyframes:i}=e;const s=t||eN;"production"!==process.env.NODE_ENV&&s!==eN&&WS(i.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${i}`,"spring-two-frames"),s!==eN&&"number"!=typeof i[0]&&(this.mixKeyframes=ek(iN,AC(i[0],i[1])),i=[0,100]);const l=s({...e,keyframes:i});"mirror"===a&&(this.mirroredGenerator=s({...e,keyframes:[...i].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=DC(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:d,repeatType:u,repeatDelay:h,type:p,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let y,b=this.currentTime,x=n;if(d){const e=Math.min(this.currentTime,r)/i;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,d+1),Boolean(t%2)&&("reverse"===u?(n=1-n,h&&(n-=h/i)):"mirror"===u&&(x=o)),b=US(0,1,n)*i}v?(this.delayState.value=c[0],y=this.delayState):y=x.next(b),a&&!v&&(y.value=a(y.value));let{done:w}=y;v||null===s||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return S&&p!==ZC&&(y.value=nN(c,this.options,f,this.speed)),m&&m(y.value),S&&this.finish(),y}then(e,t){return this.finished.then(e,t)}get duration(){return ak(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ak(e)}get time(){return ak(this.currentTime)}set time(e){e=rk(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);return XC(e=>this.generator.next(e).value,e,this.generator.next(e).value)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(_k.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=ak(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=MC,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(_k.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}};var lN=e=>180*e/Math.PI,cN=e=>{const t=lN(Math.atan2(e[1],e[0]));return uN(t)},dN={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:cN,rotateZ:cN,skewX:e=>lN(Math.atan(e[1])),skewY:e=>lN(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},uN=e=>((e%=360)<0&&(e+=360),e),hN=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),pN=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),mN={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hN,scaleY:pN,scale:e=>(hN(e)+pN(e))/2,rotateX:e=>uN(lN(Math.atan2(e[6],e[5]))),rotateY:e=>uN(lN(Math.atan2(-e[2],e[0]))),rotateZ:cN,rotate:cN,skewX:e=>lN(Math.atan(e[4])),skewY:e=>lN(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function fN(e){return e.includes("scale")?1:0}function gN(e,t){if(!e||"none"===e)return fN(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=mN,a=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=dN,a=t}if(!a)return fN(t);const o=r[t],i=a[1].split(",").map(vN);return"function"==typeof o?o(i):i[o]}function vN(e){return parseFloat(e.trim())}var yN=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],bN=/*@__PURE__*/(()=>/* @__PURE__ */new Set([...yN,"pathRotation"]))(),xN=e=>e===Vk||e===eC,wN=/* @__PURE__ */new Set(["x","y","z"]),SN=yN.filter(e=>!wN.has(e));var kN={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const a=e.max-e.min;return"border-box"===r?a:a-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const a=e.max-e.min;return"border-box"===r?a:a-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>gN(t,"x"),y:(e,{transform:t})=>gN(t,"y")};kN.translateX=kN.x,kN.translateY=kN.y;var CN=/* @__PURE__ */new Set,NN=!1,TN=!1,AN=!1;function MN(){if(TN){const e=Array.from(CN).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=/* @__PURE__ */new Map;t.forEach(e=>{const t=function(e){const t=[];return SN.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}TN=!1,NN=!1,CN.forEach(e=>e.complete(AN)),CN.clear()}function IN(){CN.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(TN=!0)})}var DN=class{constructor(e,t,n,r,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(CN.add(this),NN||(NN=!0,Mk.read(IN),Mk.resolveKeyframes(MN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const a=r?.get(),o=e[e.length-1];if(void 0!==a)e[0]=a;else if(n&&t){const r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===a&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),CN.delete(this)}cancel(){"scheduled"===this.state&&(CN.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}};function EN(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}var RN={};function _N(e,t){const n=JS(e);return()=>RN[t]??n()}var zN=/* @__PURE__ */_N(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),PN=/*@__PURE__*/_N(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(zi){return!1}return!0},"linearEasing"),ON=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,LN={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:/*@__PURE__*/ON([0,.65,.55,1]),circOut:/*@__PURE__*/ON([.55,0,1,.45]),backIn:/*@__PURE__*/ON([.31,.01,.66,-.59]),backOut:/*@__PURE__*/ON([.33,1.53,.69,.99])};function FN(e,t){return e?"function"==typeof e?PN()?IC(e,t):"ease-out":Sk(e)?ON(e):Array.isArray(e)?e.map(e=>FN(e,t)||LN.easeOut):LN[e]:void 0}function BN(e,t,n,{delay:r=0,duration:a=300,repeat:o=0,repeatType:i="loop",ease:s="easeOut",times:l}={},c=void 0){const d={[t]:n};l&&(d.offset=l);const u=FN(s,a);Array.isArray(u)&&(d.easing=u);const h={delay:r,duration:a,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===i?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(d,h)}function VN(e){return"function"==typeof e&&"applyToOptions"in e}var HN=class extends oN{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:i,onComplete:s}=e;this.isPseudoElement=Boolean(a),this.allowFlatten=o,this.options=e,WS("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:e,...t}){return VN(e)&&PN()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=BN(t,n,r,l,a),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const e=nN(r,this.options,i,this.speed);this.updateMotionValue&&this.updateMotionValue(e),EN(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(zi){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return ak(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ak(e)}get time(){return ak(Number(this.animation.currentTime)||0)}set time(e){const t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=rk(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&zN()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),QS):r(this)}},$N={anticipate:fk,backInOut:mk,circInOut:yk};function qN(e){"string"==typeof e.ease&&e.ease in $N&&(e.ease=$N[e.ease])}var jN=class extends HN{constructor(e){qN(e),aN(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:a,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const i=new sN({...o,autoplay:!1}),s=Math.max(10,_k.now()-this.startTime),l=US(0,10,s-10),c=i.sample(s).value,{name:d}=this.options;a&&d&&EN(a,d,c),t.setWithVelocity(i.sample(Math.max(0,s-l)).value,c,l),i.stop()}},UN=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!pC.test(e)&&"0"!==e||e.startsWith("url(")));function GN(e){e.duration=0,e.type="keyframes"}var WN=/* @__PURE__ */new Set(["opacity","clipPath","filter","transform","backgroundColor"]),YN=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;var KN=/* @__PURE__ */new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),XN=/*@__PURE__*/JS(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ZN(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:o,type:i,keyframes:s}=e,l=t?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return XN()&&n&&(WN.has(n)||KN.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&YN.test(e[t]))return!0;return!1}(s))&&("transform"!==n||!d)&&!c&&!r&&"mirror"!==a&&0!==o&&"inertia"!==i}var JN=class extends oN{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:o="loop",keyframes:i,name:s,motionValue:l,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=_k.now();const u={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:a,repeatType:o,name:s,motionValue:l,element:c,...d},h=c?.KeyframeResolver||DN;this.keyframeResolver=new h(i,(e,t,n)=>this.onKeyframesResolved(e,t,u,!n),s,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:a,type:o,velocity:i,delay:s,isHandoff:l,onUpdate:c}=n;this.resolvedAt=_k.now();let d=!0;(function(e,t,n,r){const a=e[0];if(null===a)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],i=UN(a,t),s=UN(o,t);return GS(i===s,`You are trying to animate ${t} from "${a}" to "${o}". "${i?o:a}" is not an animatable value.`,"value-not-animatable"),!(!i||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||VN(n))&&r)})(e,a,o,i)||(d=!1,!YS.instantAnimations&&s||c?.(nN(e,n,t)),e[0]=e[e.length-1],GN(n),n.repeat=0);const u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},h=d&&!l&&ZN(u),p=u.motionValue?.owner?.current;let m;if(h)try{m=new jN({...u,element:p})}catch{m=new sN(u)}else m=new sN(u);m.finished.then(()=>{this.notifyFinished()}).catch(QS),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),AN=!0,IN(),MN(),AN=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function QN(e,t,n,r=0,a=1){const o=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),i=e.size,s=(i-1)*r;return"function"==typeof n?n(o,i):1===a?o*r:s-o*r}var eT={current:void 0},tT=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=_k.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=_k.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(e=>!isNaN(parseFloat(e)))(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return"production"!==process.env.NODE_ENV&&sk(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new nk);const n=this.events[e].add(t);return"change"===e?()=>{n(),Mk.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=/* @__PURE__ */new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return eT.current&&eT.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=_k.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return ok(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function nT(e,t){return new tT(e,t)}function rT(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function aT(e,t){const n=e?.[t]??e?.default??e;return n!==e?rT(n,e):n}var oT={type:"spring",stiffness:500,damping:25,restSpeed:10},iT={type:"keyframes",duration:.8},sT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},lT=(e,{keyframes:t})=>t.length>2?iT:bN.has(e)?e.startsWith("scale")?(e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}))(t[1]):oT:sT,cT=/* @__PURE__ */new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);var dT=(e,t,n,r={},a,o)=>i=>{const s=aT(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=rk(l);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:a};(function(e){for(const t in e)if(!cT.has(t))return!0;return!1})(s)||Object.assign(d,lT(e,d)),d.duration&&(d.duration=rk(d.duration)),d.repeatDelay&&(d.repeatDelay=rk(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let u=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(GN(d),0===d.delay&&(u=!0)),(YS.instantAnimations||YS.skipAnimations||a?.shouldSkipAnimations||s.skipAnimations)&&(u=!0,GN(d),d.delay=0),d.allowFlatten=!s.type&&!s.ease,u&&!o&&void 0!==t.get()){const e=nN(d.keyframes,s);if(void 0!==e)return void Mk.update(()=>{d.onUpdate(e),d.onComplete()})}return s.isSync?new sN(d):new JN(d)},uT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function hT(e,t,n=1){WS(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,a]=function(e){const t=uT.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const e=o.trim();return KS(e)?parseFloat(e):e}return Lk(a)?hT(a,t,n+1):a}function pT(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function mT(e,t,n,r){if("function"==typeof t){const[a,o]=pT(r);t=t(void 0!==n?n:e.custom,a,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[a,o]=pT(r);t=t(void 0!==n?n:e.custom,a,o)}return t}function fT(e,t,n){const r=e.getProps();return mT(r,t,void 0!==n?n:r.custom,e)}var gT=/* @__PURE__ */new Set(["width","height","top","left","right","bottom",...yN]),vT=e=>Array.isArray(e);function yT(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,nT(n))}function bT(e){return vT(e)?e[e.length-1]||0:e}var xT=e=>Boolean(e&&e.getVelocity);function wT(e,t){const n=e.getValue("willChange");if(function(e){return Boolean(xT(e)&&e.add)}(n))return n.add(t);if(!n&&YS.WillChange){const n=new YS.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function ST(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var kT="data-"+ST("framerAppearId");function CT(e){return e.props[kT]}function NT({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function TT(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:o,transitionEnd:i,...s}=t;const l=e.getDefaultTransition();o=o?rT(o,l):l;const c=o?.reduceMotion,d=o?.skipAnimations;r&&(o=r);const u=[],h=a&&e.animationState&&e.animationState.getState()[a],p=o?.path;p&&p.animateVisualElement(e,s,o,n,u);for(const m in s){const t=e.getValue(m,e.latestValues[m]??null),r=s[m];if(void 0===r||h&&NT(h,m))continue;const a={delay:n,...aT(o||{},m)};d&&(a.skipAnimations=!0);const i=t.get();if(void 0!==i&&!t.isAnimating()&&!Array.isArray(r)&&r===i&&!a.velocity){Mk.update(()=>t.set(r));continue}let l=!1;if(window.MotionHandoffAnimation){const t=CT(e);if(t){const e=window.MotionHandoffAnimation(t,m,Mk);null!==e&&(a.startTime=e,l=!0)}}wT(e,m);const p=c??e.shouldReduceMotion;t.start(dT(m,t,r,p&&gT.has(m)?{type:!1}:a,e,l));const f=t.animation;f&&u.push(f)}if(i){const t=()=>Mk.update(()=>{i&&function(e,t){let{transitionEnd:n={},transition:r={},...a}=fT(e,t)||{};a={...a,...n};for(const o in a)yT(e,o,bT(a[o]))}(e,i)});u.length?Promise.all(u).then(t):t()}return u}function AT(e,t,n={}){const r=fT(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const o=r?()=>Promise.all(TT(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:s}=a;return function(e,t,n=0,r=0,a=0,o=1,i){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(AT(l,t,{...i,delay:n+("function"==typeof r?0:r)+QN(e.variantChildren,l,r,a,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,o,i,s,n)}:()=>Promise.resolve(),{when:s}=a;if(s){const[e,t]="beforeChildren"===s?[o,i]:[i,o];return e().then(()=>t())}return Promise.all([o(),i(n.delay)])}var MT=e=>t=>t.test(e),IT=[Vk,eC,Qk,Jk,nC,tC,{test:e=>"auto"===e,parse:e=>e}],DT=e=>IT.find(MT(e));function ET(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||ZS(e))}var RT=/* @__PURE__ */new Set(["brightness","contrast","saturate","opacity"]);function _T(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(jk)||[];if(!r)return e;const a=n.replace(r,"");let o=RT.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+a+")"}var zT=/\b([a-z-]*)\(.*?\)/gu,PT={...pC,getAnimatableNone:e=>{const t=e.match(zT);return t?t.map(_T).join(" "):e}},OT={...pC,getAnimatableNone:e=>{const t=pC.parse(e);return pC.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},LT={...Vk,transform:Math.round},FT={borderWidth:eC,borderTopWidth:eC,borderRightWidth:eC,borderBottomWidth:eC,borderLeftWidth:eC,borderRadius:eC,borderTopLeftRadius:eC,borderTopRightRadius:eC,borderBottomRightRadius:eC,borderBottomLeftRadius:eC,width:eC,maxWidth:eC,height:eC,maxHeight:eC,top:eC,right:eC,bottom:eC,left:eC,inset:eC,insetBlock:eC,insetBlockStart:eC,insetBlockEnd:eC,insetInline:eC,insetInlineStart:eC,insetInlineEnd:eC,padding:eC,paddingTop:eC,paddingRight:eC,paddingBottom:eC,paddingLeft:eC,paddingBlock:eC,paddingBlockStart:eC,paddingBlockEnd:eC,paddingInline:eC,paddingInlineStart:eC,paddingInlineEnd:eC,margin:eC,marginTop:eC,marginRight:eC,marginBottom:eC,marginLeft:eC,marginBlock:eC,marginBlockStart:eC,marginBlockEnd:eC,marginInline:eC,marginInlineStart:eC,marginInlineEnd:eC,fontSize:eC,backgroundPositionX:eC,backgroundPositionY:eC,...{rotate:Jk,pathRotation:Jk,rotateX:Jk,rotateY:Jk,rotateZ:Jk,scale:$k,scaleX:$k,scaleY:$k,scaleZ:$k,skew:Jk,skewX:Jk,skewY:Jk,distance:eC,translateX:eC,translateY:eC,translateZ:eC,x:eC,y:eC,z:eC,perspective:eC,transformPerspective:eC,opacity:Hk,originX:rC,originY:rC,originZ:eC},zIndex:LT,fillOpacity:Hk,strokeOpacity:Hk,numOctaves:LT},BT={...FT,color:oC,backgroundColor:oC,outlineColor:oC,fill:oC,stroke:oC,borderColor:oC,borderTopColor:oC,borderRightColor:oC,borderBottomColor:oC,borderLeftColor:oC,filter:PT,WebkitFilter:PT,mask:OT,WebkitMask:OT},VT=e=>BT[e],HT=/*@__PURE__*/new Set([PT,OT]);function $T(e,t){let n=VT(e);return HT.has(n)||(n=pC),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var qT=/* @__PURE__ */new Set(["auto","none","0"]);var jT=class extends DN{constructor(e,t,n,r,a){super(e,t,n,r,a,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let n=e[s];if("string"==typeof n&&(n=n.trim(),Lk(n))){const r=hT(n,t.current);void 0!==r&&(e[s]=r),s===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!gT.has(n)||2!==e.length)return;const[r,a]=e,o=DT(r),i=DT(a);if(Bk(r)!==Bk(a)&&kN[n])this.needsMeasurement=!0;else if(o!==i)if(xN(o)&&xN(i))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else kN[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||ET(e[r]))&&n.push(r);n.length&&function(e,t,n){let r,a=0;for(;a<e.length&&!r;){const t=e[a];"string"==typeof t&&!qT.has(t)&&dC(t).values.length&&(r=e[a]),a++}if(r&&n)for(const o of t)e[o]=$T(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=kN[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const a=n.length-1,o=n[a];n[a]=kN[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},UT=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function GT(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let r=document;t&&(r=t.current);const a=n?.[e]??r.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e).filter(e=>null!=e)}var WT=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function YT(e){return XS(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}var{schedule:KT,cancel:XT}=/* @__PURE__ */Tk(queueMicrotask,!1),ZT={x:!1,y:!1};function JT(){return ZT.x||ZT.y}function QT(e,t){const n=GT(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function eA(e,t,n={}){const[r,a,o]=QT(e,n);return r.forEach(e=>{let n,r=!1,o=!1;const i=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},s=e=>{r=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),o&&(o=!1,i(e))},l=e=>{"touch"!==e.pointerType&&(r?o=!0:i(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||JT())return;o=!1;const i=t(e,r);"function"==typeof i&&(n=i,e.addEventListener("pointerleave",l,a))},a),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,a),window.addEventListener("pointercancel",s,a)},a)}),o}var tA=(e,t)=>!!t&&(e===t||tA(e,t.parentElement)),nA=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,rA=/* @__PURE__ */new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);var aA=/* @__PURE__ */new Set(["INPUT","SELECT","TEXTAREA"]);var oA=/* @__PURE__ */new WeakSet;function iA(e){return t=>{"Enter"===t.key&&e(t)}}function sA(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function lA(e){return nA(e)&&!JT()}var cA=/* @__PURE__ */new WeakSet;function dA(e,t,n={}){const[r,a,o]=QT(e,n),i=e=>{const r=e.currentTarget;if(!lA(e))return;if(cA.has(e))return;oA.add(r),n.stopPropagation&&cA.add(e);const o=t(r,e),i={...a,capture:!0},s=(e,t)=>{window.removeEventListener("pointerup",l,i),window.removeEventListener("pointercancel",c,i),oA.has(r)&&oA.delete(r),lA(e)&&"function"==typeof o&&o(e,{success:t})},l=e=>{s(e,r===window||r===document||n.useGlobalTarget||tA(r,e.target))},c=e=>{s(e,!1)};window.addEventListener("pointerup",l,i),window.addEventListener("pointercancel",c,i)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",i,a),YT(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=iA(()=>{if(oA.has(n))return;sA(n,"down");const e=iA(()=>{sA(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>sA(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,a)),t=e,rA.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}function uA(e){return XS(e)&&"ownerSVGElement"in e}var hA,pA=/* @__PURE__ */new WeakMap,mA=(e,t,n)=>(r,a)=>a&&a[0]?a[0][e+"Size"]:uA(r)&&"getBBox"in r?r.getBBox()[t]:r[n],fA=/*@__PURE__*/mA("inline","width","offsetWidth"),gA=/*@__PURE__*/mA("block","height","offsetHeight");function vA({target:e,borderBoxSize:t}){pA.get(e)?.forEach(n=>{n(e,{get width(){return fA(e,t)},get height(){return gA(e,t)}})})}function yA(e){e.forEach(vA)}function bA(e,t){hA||"undefined"!=typeof ResizeObserver&&(hA=new ResizeObserver(yA));const n=GT(e);return n.forEach(e=>{let n=pA.get(e);n||(n=/* @__PURE__ */new Set,pA.set(e,n)),n.add(t),hA?.observe(e)}),()=>{n.forEach(e=>{const n=pA.get(e);n?.delete(t),n?.size||hA?.unobserve(e)})}}var xA,wA=/* @__PURE__ */new Set;function SA(e){return wA.add(e),xA||(xA=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};wA.forEach(t=>t(e))},window.addEventListener("resize",xA)),()=>{wA.delete(e),wA.size||"function"!=typeof xA||(window.removeEventListener("resize",xA),xA=void 0)}}function kA(e,t){return"function"==typeof e?SA(e):bA(e,t)}var CA={value:null,addProjectionMetrics:null};var NA=[...IT,oC,pC],TA=()=>({x:{min:0,max:0},y:{min:0,max:0}}),AA=/* @__PURE__ */new WeakMap;function MA(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function IA(e){return"string"==typeof e||Array.isArray(e)}var DA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],EA=["initial",...DA];function RA(e){return MA(e.animate)||EA.some(t=>IA(e[t]))}function _A(e){return Boolean(RA(e)||e.variants)}var zA={current:null},PA={current:!1},OA="undefined"!=typeof window;var LA=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],FA={};function BA(e){FA=e}var VA=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:a,blockInitialAnimation:o,visualState:i},s={}){this.current=null,this.children=/* @__PURE__ */new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=/* @__PURE__ */new Map,this.KeyframeResolver=DN,this.features={},this.valueSubscriptions=/* @__PURE__ */new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=_k.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Mk.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=a,this.options=s,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=RA(t),this.isVariantNode=_A(t),this.isVariantNode&&(this.variantChildren=/* @__PURE__ */new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:d,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const h in u){const e=u[h];void 0!==l[h]&&xT(e)&&e.set(l[h])}}mount(e){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=e,AA.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(PA.current||function(){if(PA.current=!0,OA)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>zA.current=e.matches;e.addEventListener("change",t),t()}else zA.current=!1}(),this.shouldReduceMotion=zA.current),"production"!==process.env.NODE_ENV&&sk(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Ik(this.notifyUpdate),Ik(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=/* @__PURE__ */new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&WN.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:a,ease:o,duration:i}=t.accelerate,s=new HN({element:this.current,name:e,keyframes:r,times:a,ease:o,duration:rk(i)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=bN.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&Mk.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),a&&a()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in FA){const t=FA[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<LA.length;n++){const t=LA[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const a=t[r],o=n[r];if(xT(a))e.addValue(r,a);else if(xT(o))e.addValue(r,nT(a,{owner:e}));else if(o!==a)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(a):t.hasAnimated||t.set(a)}else{const t=e.getStaticValue(r);e.addValue(r,nT(void 0!==t?t:a,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=nT(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=n&&("string"==typeof n&&(KS(n)||ZS(n))?n=parseFloat(n):!(e=>NA.find(MT(e)))(n)&&pC.test(t)&&(n=$T(e,t)),this.setBaseTarget(e,xT(n)?n.get():n)),xT(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const r=mT(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&void 0!==n)return n;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||xT(r)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new nk),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){KT.render(this.render)}},HA=class extends VA{constructor(){super(...arguments),this.KeyframeResolver=jT}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;xT(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}},$A=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function qA({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function jA(e){return void 0===e||1===e}function UA({scale:e,scaleX:t,scaleY:n}){return!jA(e)||!jA(t)||!jA(n)}function GA(e){return UA(e)||WA(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function WA(e){return YA(e.x)||YA(e.y)}function YA(e){return e&&"0%"!==e}function KA(e,t,n){return n+t*(e-n)}function XA(e,t,n,r,a){return void 0!==a&&(e=KA(e,a,r)),KA(e,n,r)+t}function ZA(e,t=0,n=1,r,a){e.min=XA(e.min,t,n,r,a),e.max=XA(e.max,t,n,r,a)}function JA(e,{x:t,y:n}){ZA(e.x,t.translate,t.scale,t.originPoint),ZA(e.y,n.translate,n.scale,n.originPoint)}var QA=.999999999999,eM=1.0000000000001;function tM(e,t){e.min+=t,e.max+=t}function nM(e,t,n,r,a=.5){ZA(e,t,n,gC(e.min,e.max,a),r)}function rM(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function aM(e,t,n){const r=n??e;nM(e.x,rM(t.x,r.x),t.scaleX,t.scale,t.originX),nM(e.y,rM(t.y,r.y),t.scaleY,t.scale,t.originY)}function oM(e,t){return qA(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}var iM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},sM=yN.length;function lM(e,t,n){const{style:r,vars:a,transformOrigin:o}=e;let i=!1,s=!1;for(const l in t){const e=t[l];if(bN.has(l))i=!0;else if(Pk(l))a[l]=e;else{const t=WT(e,FT[l]);l.startsWith("origin")?(s=!0,o[l]=t):r[l]=t}}if(t.transform||(i||n?r.transform=function(e,t,n){let r="",a=!0;for(let i=0;i<sM;i++){const o=yN[i],s=e[o];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===(o.startsWith("scale")?1:0);else{const e=parseFloat(s);l=o.startsWith("scale")?1===e:0===e}if(!l||n){const e=WT(s,FT[o]);l||(a=!1,r+=`${iM[o]||o}(${e}) `),n&&(t[o]=e)}}const o=e.pathRotation;return o&&(a=!1,r+=`rotate(${WT(o,FT.pathRotation)}) `),r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}function cM(e,{style:t,vars:n},r,a){const o=e.style;let i;for(i in t)o[i]=t[i];for(i in a?.applyProjectionStyles(o,r),n)o.setProperty(i,n[i])}function dM(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var uM={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!eC.test(e))return e;e=parseFloat(e)}return`${dM(e,t.target.x)}% ${dM(e,t.target.y)}%`}},hM={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=pC.parse(e);if(a.length>5)return r;const o=pC.createTransformer(e),i="number"!=typeof a[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;a[0+i]/=s,a[1+i]/=l;const c=gC(s,l,.5);return"number"==typeof a[2+i]&&(a[2+i]/=c),"number"==typeof a[3+i]&&(a[3+i]/=c),o(a)}},pM={borderRadius:{...uM,applyTo:[...UT]},borderTopLeftRadius:uM,borderTopRightRadius:uM,borderBottomLeftRadius:uM,borderBottomRightRadius:uM,boxShadow:hM};function mM(e,{layout:t,layoutId:n}){return bN.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!pM[e]||"opacity"===e)}function fM(e,t,n){const r=e.style,a=t?.style,o={};if(!r)return o;for(const i in r)(xT(r[i])||a&&xT(a[i])||mM(i,e)||void 0!==n?.getValue(i)?.liveStyle)&&(o[i]=r[i]);return o}var gM=class extends HA{constructor(){super(...arguments),this.type="html",this.renderInstance=cM}mount(e){WS(Boolean(e.style),"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(e)}readValueFromInstance(e,t){if(bN.has(t))return this.projection?.isProjecting?fN(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return gN(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),a=(Pk(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof a?a.trim():a}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return oM(e,t)}build(e,t,n){lM(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return fM(e,t,n)}},vM={offset:"stroke-dashoffset",array:"stroke-dasharray"},yM={offset:"strokeDashoffset",array:"strokeDasharray"};var bM=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function xM(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:o=1,pathOffset:i=0,...s},l,c,d){if(lM(e,s,c),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:u,style:h}=e;u.transform&&(h.transform=u.transform,delete u.transform),(h.transform||u.transformOrigin)&&(h.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),h.transform&&(h.transformBox=d?.transformBox??"fill-box",delete u.transformBox);for(const p of bM)void 0!==u[p]&&(h[p]=u[p],delete u[p]);void 0!==t&&(u.x=t),void 0!==n&&(u.y=n),void 0!==r&&(u.scale=r),void 0!==a&&function(e,t,n=1,r=0,a=!0){e.pathLength=1;const o=a?vM:yM;e[o.offset]=""+-r,e[o.array]=`${t} ${n}`}(u,a,o,i,!1)}var wM=/* @__PURE__ */new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),SM=e=>"string"==typeof e&&"svg"===e.toLowerCase();function kM(e,t,n){const r=fM(e,t,n);for(const a in e)if(xT(e[a])||xT(t[a])){r[-1!==yN.indexOf(a)?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a]=e[a]}return r}var CM=class extends HA{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=TA}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(bN.has(t)){const e=VT(t);return e&&e.default||0}return t=wM.has(t)?t:ST(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return kM(e,t,n)}build(e,t,n){xM(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){cM(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(wM.has(a)?a:ST(a),t.attrs[a])}(e,t,0,r)}mount(e){this.isSVGTag=SM(e.tagName),super.mount(e)}},NM=EA.length;function TM(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&TM(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<NM;n++){const r=EA[n],a=e.props[r];(IA(a)||!1===a)&&(t[r]=a)}return t}function AM(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var MM=[...DA].reverse(),IM=DA.length;function DM(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const a=t.map(t=>AT(e,t,n));r=Promise.all(a)}else if("string"==typeof t)r=AT(e,t,n);else{const a="function"==typeof t?fT(e,t,n.custom):t;r=Promise.all(TT(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function EM(e){let t=DM(e),n=zM(),r=!0,a=!1;const o=t=>(n,r)=>{const a=fT(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(a){const{transition:e,transitionEnd:t,...r}=a;n={...n,...r,...t}}return n};function i(i){const{props:s}=e,l=TM(e.parent)||{},c=[],d=/* @__PURE__ */new Set;let u={},h=1/0;for(let t=0;t<IM;t++){const p=MM[t],m=n[p],f=void 0!==s[p]?s[p]:l[p],g=IA(f),v=p===i?m.isActive:null;!1===v&&(h=t);let y=f===l[p]&&f!==s[p]&&g;if(y&&(r||a)&&e.manuallyAnimateOnMount&&(y=!1),m.protectedKeys={...u},!m.isActive&&null===v||!f&&!m.prevProp||MA(f)||"boolean"==typeof f)continue;if("exit"===p&&m.isActive&&!0!==v){m.prevResolvedValues&&(u={...u,...m.prevResolvedValues});continue}const b=RM(m.prevProp,f);let x=b||p===i&&m.isActive&&!y&&g||t>h&&g,w=!1;const S=Array.isArray(f)?f:[f];let k=S.reduce(o(p),{});!1===v&&(k={});const{prevResolvedValues:C={}}=m,N={...C,...k},T=t=>{x=!0,d.has(t)&&(w=!0,d.delete(t)),m.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in N){const t=k[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=vT(t)&&vT(n)?!AM(t,n)||b:t!==n,r?null!=t?T(e):d.add(e):void 0!==t&&d.has(e)?T(e):m.protectedKeys[e]=!0}m.prevProp=f,m.prevResolvedValues=k,m.isActive&&(u={...u,...k}),(r||a)&&e.blockInitialAnimation&&(x=!1);const A=y&&b;!x||A&&!w||c.push(...S.map(t=>{const n={type:p};if("string"==typeof t&&(r||a)&&!A&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,a=fT(r,t);if(r.enteringChildren&&a){const{delayChildren:t}=a.transition||{};n.delay=QN(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(d.size){const t={};if("boolean"!=typeof s.initial){const n=fT(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}d.forEach(n=>{const r=e.getBaseTarget(n),a=e.getValue(n);a&&(a.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let p=Boolean(c.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,a=!1,p?t(c):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=zM(),a=!0}}}function RM(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!AM(t,e)}function _M(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zM(){return{animate:_M(!0),whileInView:_M(),whileHover:_M(),whileTap:_M(),whileDrag:_M(),whileFocus:_M(),exit:_M()}}function PM(e,t){e.min=t.min,e.max=t.max}function OM(e,t){PM(e.x,t.x),PM(e.y,t.y)}function LM(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function FM(e){return e.max-e.min}function BM(e,t,n,r=.5){e.origin=r,e.originPoint=gC(t.min,t.max,e.origin),e.scale=FM(n)/FM(t),e.translate=gC(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function VM(e,t,n,r){BM(e.x,t.x,n.x,r?r.originX:void 0),BM(e.y,t.y,n.y,r?r.originY:void 0)}function HM(e,t,n,r=0){e.min=(r?gC(n.min,n.max,r):n.min)+t.min,e.max=e.min+FM(t)}function $M(e,t,n,r=0){const a=r?gC(n.min,n.max,r):n.min;e.min=t.min-a,e.max=e.min+FM(t)}function qM(e,t,n,r){$M(e.x,t.x,n.x,r?.x),$M(e.y,t.y,n.y,r?.y)}function jM(e,t,n,r,a){return e=KA(e-=t,1/n,r),void 0!==a&&(e=KA(e,1/a,r)),e}function UM(e,t,[n,r,a],o,i){!function(e,t=0,n=1,r=.5,a,o=e,i=e){if(Qk.test(t)&&(t=parseFloat(t),t=gC(i.min,i.max,t/100)-i.min),"number"!=typeof t)return;let s=gC(o.min,o.max,r);e===o&&(s-=t),e.min=jM(e.min,t,n,s,a),e.max=jM(e.max,t,n,s,a)}(e,t[n],t[r],t[a],t.scale,o,i)}var GM=["x","scaleX","originX"],WM=["y","scaleY","originY"];function YM(e,t,n,r){UM(e.x,t,GM,n?n.x:void 0,r?r.x:void 0),UM(e.y,t,WM,n?n.y:void 0,r?r.y:void 0)}function KM(e){return 0===e.translate&&1===e.scale}function XM(e){return KM(e.x)&&KM(e.y)}function ZM(e,t){return e.min===t.min&&e.max===t.max}function JM(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function QM(e,t){return JM(e.x,t.x)&&JM(e.y,t.y)}function eI(e){return FM(e.x)/FM(e.y)}function tI(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function nI(e){return[e("x"),e("y")]}var rI=UT.length,aI=e=>"string"==typeof e?parseFloat(e):e,oI=e=>"number"==typeof e||eC.test(e);function iI(e,t){return void 0!==e[t]?e[t]:e.borderRadius}var sI=/*@__PURE__*/cI(0,.5,vk),lI=/*@__PURE__*/cI(.5,.95,QS);function cI(e,t,n){return r=>r<e?0:r>t?1:n(tk(e,t,r))}function dI(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var uI=(e,t)=>e.depth-t.depth,hI=class{constructor(){this.children=[],this.isDirty=!1}add(e){qS(this.children,e),this.isDirty=!0}remove(e){jS(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(uI),this.isDirty=!1,this.children.forEach(e)}};function pI(e){return xT(e)?e.get():e}var mI=class{constructor(){this.members=[]}add(e){qS(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1!==r.isConnected||n.snapshot||(jS(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(jS(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent&&!1!==e.instance?.isConnected)return this.promote(e),!0}return!1}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=n.options,{layoutDependency:a}=e.options;void 0!==r&&r===a||(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},fI={hasAnimatedSinceResize:!0,hasEverUpdated:!1},gI={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},vI=["","X","Y","Z"],yI=0;function bI(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function xI(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=CT(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Mk,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&xI(r)}function wI({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(e={},n=t?.()){this.id=yI++,this.animationId=0,this.animationCommitId=0,this.children=/* @__PURE__ */new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=/* @__PURE__ */new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,CA.value&&(gI.nodes=gI.calculatedTargetDeltas=gI.calculatedProjections=0),this.nodes.forEach(CI),this.nodes.forEach(_I),this.nodes.forEach(zI),this.nodes.forEach(NI),CA.addProjectionMetrics&&CA.addProjectionMetrics(gI)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=/* @__PURE__ */new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new hI)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new nk),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=uA(t)&&!(uA(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:a,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(a||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const a=()=>this.root.updateBlockedByResize=!1;Mk.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=_k.now(),r=({timestamp:a})=>{const o=a-n;o>=t&&(Ik(r),e(o-t))};return Mk.setup(r,!0),()=>Ik(r)}(a,250),fI.hasAnimatedSinceResize&&(fI.hasAnimatedSinceResize=!1,this.nodes.forEach(RI)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&o&&(r||a)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const a=this.options.transition||o.getDefaultTransition()||VI,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=o.getProps(),l=!this.targetLayout||!QM(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...aT(a,"layout"),onPlay:i,onComplete:s};(o.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c,t.path)}else t||RI(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ik(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(PI),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&xI(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let a=0;a<this.path.length;a++){const e=this.path[a];e.shouldResetTransform=!0,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const e=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(MI),void this.nodes.forEach(AI)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(II);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(DI),this.nodes.forEach(EI),this.nodes.forEach(SI),this.nodes.forEach(kI)):this.nodes.forEach(II),this.clearAllSnapshots();const e=_k.now();Dk.delta=US(0,1e3/60,e-Dk.timestamp),Dk.timestamp=e,Dk.isProcessing=!0,Ek.update.process(Dk),Ek.preRender.process(Dk),Ek.render.process(Dk),Dk.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,KT.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(TI),this.sharedNodes.forEach(OI)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Mk.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Mk.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||FM(this.snapshot.measuredBox.x)||FM(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++)this.path[n].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!a)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!XM(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||GA(this.latestValues)||o)&&(a(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),qI((r=n).x),qI(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!this.scroll?.wasRoot&&!this.path.some(UI)){const{scroll:e}=this.root;e&&(tM(t.x,e.offset.x),tM(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(OM(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:a,options:o}=r;r!==this.root&&a&&o.layoutScroll&&(a.wasRoot&&OM(t,e),tM(t.x,a.offset.x),tM(t.y,a.offset.y))}return t}applyTransform(e,t=!1,n){const r=n||{x:{min:0,max:0},y:{min:0,max:0}};OM(r,e);for(let a=0;a<this.path.length;a++){const e=this.path[a];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&(tM(r.x,-e.scroll.offset.x),tM(r.y,-e.scroll.offset.y)),GA(e.latestValues)&&aM(r,e.latestValues,e.layout?.layoutBox)}return GA(this.latestValues)&&aM(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};OM(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!GA(e.latestValues))continue;let r;e.instance&&(UA(e.latestValues)&&e.updateSnapshot(),r=TA(),OM(r,e.measurePageBox())),YM(t,e.latestValues,e.snapshot?.layoutBox,r)}return GA(this.latestValues)&&YM(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Dk.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:a}=this.options;if(!this.layout||!r&&!a)return;this.resolvedRelativeTargetAt=Dk.timestamp;const o=this.getClosestProjectingParent();o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),function(e,t,n,r){HM(e.x,t.x,n.x,r?.x),HM(e.y,t.y,n.y,r?.y)}(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):OM(this.target,this.layout.layoutBox),JA(this.target,this.targetDelta)):OM(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),CA.value&&gI.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!UA(this.parent.latestValues)&&!WA(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},qM(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),OM(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Dk.timestamp&&(n=!1),n)return;const{layout:r,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!a)return;OM(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,i=this.treeScale.y;!function(e,t,n,r=!1){const a=n.length;if(!a)return;let o,i;t.x=t.y=1;for(let s=0;s<a;s++){o=n[s],i=o.projectionDelta;const{visualElement:a}=o.options;a&&a.props.style&&"contents"===a.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(tM(e.x,-o.scroll.offset.x),tM(e.y,-o.scroll.offset.y)),i&&(t.x*=i.x.scale,t.y*=i.y.scale,JA(e,i)),r&&GA(o.latestValues)&&aM(e,o.latestValues,o.layout?.layoutBox))}t.x<eM&&t.x>QA&&(t.x=1),t.y<eM&&t.y>QA&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:s}=e;s?(this.projectionDelta&&this.prevProjectionDelta?(LM(this.prevProjectionDelta.x,this.projectionDelta.x),LM(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),VM(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===o&&this.treeScale.y===i&&tI(this.projectionDelta.x,this.prevProjectionDelta.x)&&tI(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s)),CA.value&&gI.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1,n){const r=this.snapshot,a=r?r.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},l=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),d=!c||c.members.length<=1,u=Boolean(l&&!d&&!0===this.options.crossfade&&!this.path.some(BI));let h;this.animationProgress=0;const p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{const n=t/1e3,r=p?.(n);r?(i.x.translate=r.x,i.x.scale=gC(e.x.scale,1,n),i.x.origin=e.x.origin,i.x.originPoint=e.x.originPoint,i.y.translate=r.y,i.y.scale=gC(e.y.scale,1,n),i.y.origin=e.y.origin,i.y.originPoint=e.y.originPoint):(LI(i.x,e.x,n),LI(i.y,e.y,n)),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qM(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),function(e,t,n,r){FI(e.x,t.x,n.x,r),FI(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,s,n),h&&function(e,t){return ZM(e.x,t.x)&&ZM(e.y,t.y)}(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),OM(h,this.relativeTarget)),l&&(this.animationValues=o,function(e,t,n,r,a,o){a?(e.opacity=gC(0,n.opacity??1,sI(r)),e.opacityExit=gC(t.opacity??1,0,lI(r))):o&&(e.opacity=gC(t.opacity??1,n.opacity??1,r));for(let i=0;i<rI;i++){const a=UT[i];let o=iI(t,a),s=iI(n,a);void 0===o&&void 0===s||(o||(o=0),s||(s=0),0===o||0===s||oI(o)===oI(s)?(e[a]=Math.max(gC(aI(o),aI(s),r),0),(Qk.test(s)||Qk.test(o))&&(e[a]+="%")):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=gC(t.rotate||0,n.rotate||0,r))}(o,a,this.latestValues,n,u,d)),r&&void 0!==r.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ik(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Mk.update(()=>{fI.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=nT(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){const r=xT(e)?e:nT(e);return r.start(dT("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:a}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&jI(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=FM(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=FM(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}OM(t,n),aM(t,a),VM(this.projectionDeltaWithTransform,this.layoutCorrected,t,a)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new mI),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&bI("z",e,r,this.animationValues);for(let a=0;a<vI.length;a++)bI(`rotate${vI[a]}`,e,r,this.animationValues),bI(`skew${vI[a]}`,e,r,this.animationValues);e.render();for(const a in r)e.setStaticValue(a,r[a]),this.animationValues&&(this.animationValues[a]=r[a]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=pI(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=pI(t?.pointerEvents)||""),void(this.hasProjected&&!GA(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const a=r.animationValues||r.latestValues;this.applyTransformsToTarget();let o=function(e,t,n){let r="";const a=e.x.translate/t.x,o=e.y.translate/t.y,i=n?.z||0;if((a||o||i)&&(r=`translate3d(${a}px, ${o}px, ${i}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,pathRotation:a,rotateX:o,rotateY:i,skewX:s,skewY:l}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),a&&(r+=`rotate(${a}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),s&&(r+=`skewX(${s}deg) `),l&&(r+=`skewY(${l}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a);n&&(o=n(a,o)),e.transform=o;const{x:i,y:s}=this.projectionDelta;e.transformOrigin=`${100*i.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:e.opacity=r===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const l in pM){if(void 0===a[l])continue;const{correct:t,applyTo:n,isCSSVariable:i}=pM[l],s="none"===o?a[l]:t(a[l],r);if(n){const t=n.length;for(let r=0;r<t;r++)e[n[r]]=s}else i?this.options.visualElement.renderState.vars[l]=s:e[l]=s}this.options.layoutId&&(e.pointerEvents=r===this?pI(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(AI),this.root.sharedNodes.clear()}}}function SI(e){e.updateLayout()}function kI(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;if("size"===a)nI(e=>{const r=o?t.measuredBox[e]:t.layoutBox[e],a=FM(r);r.min=n[e].min,r.max=r.min+a});else if("x"===a||"y"===a){const e="x"===a?"y":"x";PM(o?t.measuredBox[e]:t.layoutBox[e],n[e])}else jI(a,t.layoutBox,n)&&nI(r=>{const a=o?t.measuredBox[r]:t.layoutBox[r],i=FM(n[r]);a.max=a.min+i,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+i)});const i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};VM(i,n,t.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?VM(s,e.applyTransform(r,!0),t.measuredBox):VM(s,n,t.layoutBox);const l=!XM(i);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:a,layout:o}=r;if(a&&o){const i=e.options.layoutAnchor||void 0,s={x:{min:0,max:0},y:{min:0,max:0}};qM(s,t.layoutBox,a.layoutBox,i);const l={x:{min:0,max:0},y:{min:0,max:0}};qM(l,n,o.layoutBox,i),QM(s,l)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function CI(e){CA.value&&gI.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function NI(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function TI(e){e.clearSnapshot()}function AI(e){e.clearMeasurements()}function MI(e){e.isLayoutDirty=!0,e.updateLayout()}function II(e){e.isLayoutDirty=!1}function DI(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function EI(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function RI(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function _I(e){e.resolveTargetDelta()}function zI(e){e.calcProjection()}function PI(e){e.resetSkewAndRotation()}function OI(e){e.removeLeadSnapshot()}function LI(e,t,n){e.translate=gC(t.translate,0,n),e.scale=gC(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function FI(e,t,n,r){e.min=gC(t.min,n.min,r),e.max=gC(t.max,n.max,r)}function BI(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}var VI={duration:.45,ease:[.4,0,.1,1]},HI=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),$I=HI("applewebkit/")&&!HI("chrome/")?Math.round:QS;function qI(e){e.min=$I(e.min),e.max=$I(e.max)}function jI(e,t,n){return"position"===e||"preserve-aspect"===e&&!function(e,t,n){return Math.abs(e-t)<=n}(eI(t),eI(n),.2)}function UI(e){return e!==e.root&&e.scroll?.wasRoot}var GI=wI({attachResizeListener:(e,t)=>dI(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),WI={current:void 0},YI=wI({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!WI.current){const e=new GI({});e.mount(window),e.setOptions({layoutScroll:!0}),WI.current=e}return WI.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),KI=Y({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function XI(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function ZI(...e){return q.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=XI(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():XI(e[t],null)}}}}(...e),e)}var JI=class extends q.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(YT(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=YT(e)&&e.offsetWidth||0,r=YT(e)&&e.offsetHeight||0,a=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(a.height),o.width=parseFloat(a.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=n-o.width-o.left,o.bottom=r-o.height-o.top,o.direction=a.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function QI({children:e,isPresent:t,anchorX:n,anchorY:r,root:a,pop:o}){const i=ne(),s=se(null),l=se({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:c}=ee(KI),d=!1!==o?e.props?.ref??e?.ref:void 0,u=ZI(s,d);return ae(()=>{const{width:e,height:d,top:u,left:h,right:p,bottom:m,direction:f}=l.current;if(t||!1===o||!s.current||!e||!d)return;const g="rtl"===f,v="left"===n?g?`right: ${p}`:`left: ${h}`:g?`left: ${h}`:`right: ${p}`,y="bottom"===r?`bottom: ${m}`:`top: ${u}`;s.current.dataset.motionPopId=i;const b=document.createElement("style");c&&(b.nonce=c);const x=a??document.head;return x.appendChild(b),b.sheet&&b.sheet.insertRule(`\n [data-motion-pop-id="${i}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${d}px !important;\n ${v}px !important;\n ${y}px !important;\n }\n `),()=>{s.current?.removeAttribute("data-motion-pop-id"),x.contains(b)&&x.removeChild(b)}},[t]),pe(JI,{isPresent:t,childRef:s,sizeRef:l,pop:o,children:!1===o?e:q.cloneElement(e,{ref:u})})}var eD=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:o,mode:i,anchorX:s,anchorY:l,root:c})=>{const d=VS(tD),u=ne(),h=se(n),p=se(r);HS(()=>{h.current=n,p.current=r});let m=!0,f=ie(()=>(m=!1,{id:u,initial:t,isPresent:n,custom:a,onExitComplete:e=>{d.set(e,!0);for(const t of d.values())if(!t)return;r&&r()},register:e=>(d.set(e,!1),()=>{d.delete(e),!h.current&&!d.size&&p.current?.()})}),[n,d,r]);return o&&m&&(f={...f}),ie(()=>{d.forEach((e,t)=>d.set(t,!1))},[n]),q.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=pe(QI,{pop:"popLayout"===i,isPresent:n,anchorX:s,anchorY:l,root:c,children:e}),pe($S.Provider,{value:f,children:e})};function tD(){/* @__PURE__ */
|
|
446
|
+
return new Map}function nD(e=!0){const t=ee($S);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,o=ne();te(()=>{if(e)return a(o)},[e]);const i=Q(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}var rD=e=>e.key||"";function aD(e){const t=[];return U.forEach(e,e=>{Z(e)&&t.push(e)}),t}var oD=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:o="sync",propagate:i=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[d,u]=nD(i),h=ie(()=>aD(e),[e]),p=i&&!d?[]:h.map(rD),m=se(!0),f=se(h),g=VS(()=>/* @__PURE__ */new Map),v=se(/* @__PURE__ */new Set),[y,b]=le(h),[x,w]=le(h);HS(()=>{m.current=!1,f.current=h;for(let e=0;e<x.length;e++){const t=rD(x[e]);p.includes(t)?(g.delete(t),v.current.delete(t)):!0!==g.get(t)&&g.set(t,!1)}},[x,p.length,p.join("-")]);const S=[];if(h!==y){let e=[...h];for(let t=0;t<x.length;t++){const n=x[t],r=rD(n);p.includes(r)||(e.splice(t,0,n),S.push(n))}return"wait"===o&&S.length&&(e=S),w(aD(e)),b(h),null}"production"!==process.env.NODE_ENV&&"wait"===o&&x.length;const{forceRender:k}=ee(BS);return pe(he,{children:x.map(e=>{const y=rD(e),b=!(i&&!d)&&(h===x||p.includes(y));return pe(eD,{isPresent:b,initial:!(m.current&&!n)&&void 0,custom:t,presenceAffectsLayout:a,mode:o,root:c,onExitComplete:b?void 0:()=>{if(v.current.has(y))return;if(!g.has(y))return;v.current.add(y),g.set(y,!0);let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(k?.(),w(f.current),i&&u?.(),r&&r())},anchorX:s,anchorY:l,children:e},y)})})},iD=Y({strict:!1}),sD={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},lD=!1;function cD(){return function(){if(lD)return;const e={};for(const t in sD)e[t]={isEnabled:e=>sD[t].some(t=>!!e[t])};BA(e),lD=!0}(),FA}var dD=/* @__PURE__ */new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function uD(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||dD.has(e)}var hD,pD,mD=/* @__PURE__ */r({default:()=>hD}),fD=t(()=>{throw hD={},new Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?')}),gD=e=>!uD(e);try{"function"==typeof(pD=(fD(),e(mD)).default)&&(gD=e=>e.startsWith("on")?!uD(e):pD(e))}catch{}var vD=/* @__PURE__ */Y({});function yD(e){const{initial:t,animate:n}=function(e,t){if(RA(e)){const{initial:t,animate:n}=e;return{initial:!1===t||IA(t)?t:void 0,animate:IA(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,ee(vD));return ie(()=>({initial:t,animate:n}),[bD(t),bD(n)])}function bD(e){return Array.isArray(e)?e.join(" "):e}var xD=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function wD(e,t,n){for(const r in t)xT(t[r])||mM(r,n)||(e[r]=t[r])}function SD(e,t){const n={};return wD(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return ie(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return lM(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function kD(e,t){const n={},r=SD(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var CD=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function ND(e,t,n,r){const a=ie(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return xM(n,t,SM(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};wD(t,e.style,e),a.style={...t,...a.style}}return a}var TD=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function AD(e){return"string"==typeof e&&!e.includes("-")&&!!(TD.indexOf(e)>-1||/[A-Z]/u.test(e))}function MD(e,t,n,{latestValues:r},a,o=!1,i){const s=(i??AD(e)?ND:kD)(t,r,a,e),l=function(e,t,n){const r={};for(const a in e)"values"===a&&"object"==typeof e.values||xT(e[a])||(gD(a)||!0===n&&uD(a)||!t&&!uD(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}(t,"string"==typeof e,o),c=e!==W?{...l,...s,ref:n}:{},{children:d}=t,u=ie(()=>xT(d)?d.get():d,[d]);return K(e,{...c,children:u})}function ID(e,t,n,r){const a={},o=r(e,{});for(const h in o)a[h]=pI(o[h]);let{initial:i,animate:s}=e;const l=RA(e),c=_A(e);t&&c&&!l&&!1!==e.inherit&&(void 0===i&&(i=t.initial),void 0===s&&(s=t.animate));let d=!!n&&!1===n.initial;d=d||!1===i;const u=d?s:i;if(u&&"boolean"!=typeof u&&!MA(u)){const t=Array.isArray(u)?u:[u];for(let n=0;n<t.length;n++){const r=mT(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[d?e.length-1:0]}null!==e&&(a[r]=e)}for(const r in e)a[r]=e[r]}}}return a}var DD=e=>(t,n)=>{const r=ee(vD),a=ee($S),o=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:ID(n,r,a,e),renderState:t()}}(e,t,r,a);return n?o():VS(o)},ED=/*@__PURE__*/DD({scrapeMotionValuesFromProps:fM,createRenderState:xD}),RD=/*@__PURE__*/DD({scrapeMotionValuesFromProps:kM,createRenderState:CD}),_D=Symbol.for("motionComponentSymbol");function zD(e,t,n){const r=se(n);ae(()=>{r.current=n});const a=se(null);return Q(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());const o=r.current;if("function"==typeof o)if(n){const e=o(n);"function"==typeof e&&(a.current=e)}else a.current?(a.current(),a.current=null):o(n);else o&&(o.current=n)},[t])}var PD=Y({});function OD(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function LD(e,t,n,r,a,o){const{visualElement:i}=ee(vD),s=ee(iD),l=ee($S),c=ee(KI),d=c.reducedMotion,u=c.skipAnimations,h=se(null),p=se(!1);r=r||s.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:d,skipAnimations:u,isSVG:o}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,f=ee(PD);!m||m.projection||!a||"html"!==m.type&&"svg"!==m.type||function(e,t,n,r){const{layoutId:a,layout:o,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutAnchor:d,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:FD(e.parent)),e.projection.setOptions({layoutId:a,layout:o,alwaysMeasureLayout:Boolean(i)||s&&OD(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c,layoutAnchor:d})}(h.current,n,a,f);const g=se(!1);ae(()=>{m&&g.current&&m.update(n,l)});const v=n[kT],y=se(Boolean(v)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return HS(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),y.current&&m.animationState&&m.animationState.animateChanges())}),te(()=>{m&&(!y.current&&m.animationState&&m.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),y.current=!1),m.enteringChildren=void 0)}),m}function FD(e){if(e)return!1!==e.options.allowProjection?e.projection:FD(e.parent)}function BD(e,{forwardMotionProps:t=!1,type:n}={},r,a){r&&function(e){const t=cD();for(const n in e)t[n]={...t[n],...e[n]};BA(t)}(r);const o=n?"svg"===n:AD(e),i=o?RD:ED;function s(n,s){let l;const c={...ee(KI),...n,layoutId:VD(n)},{isStatic:d}=c,u=yD(n),h=i(n,d);if(!d&&"undefined"!=typeof window){!function(e,t){const n=ee(iD).strict;if("production"!==process.env.NODE_ENV&&t&&n){const t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?GS(!1,t,"lazy-strict-mode"):WS(!1,t,"lazy-strict-mode")}}(c,r);const t=function(e){const{drag:t,layout:n}=cD();if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(c);l=t.MeasureLayout,u.visualElement=LD(e,h,c,a,t.ProjectionNode,o)}return me(vD.Provider,{value:u,children:[l&&u.visualElement?pe(l,{visualElement:u.visualElement,...c}):null,MD(e,n,zD(h,u.visualElement,s),h,d,t,o)]})}s.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const l=X(s);return l[_D]=e,l}function VD({layoutId:e}){const t=ee(BS).id;return t&&void 0!==e?t+"-"+e:e}function HD(e,t){if("undefined"==typeof Proxy)return BD;const n=/* @__PURE__ */new Map,r=(n,r)=>BD(n,r,e,t);return new Proxy((e,t)=>("production"!==process.env.NODE_ENV&&sk(!1,"motion() is deprecated. Use motion.create() instead."),r(e,t)),{get:(a,o)=>"create"===o?r:(n.has(o)||n.set(o,BD(o,void 0,e,t)),n.get(o))})}var $D=(e,t)=>t.isSVG??AD(e)?new CM(t):new gM(t,{allowProjection:e!==W}),qD=0,jD={animation:{Feature:class extends $A{constructor(e){super(e),e.animationState||(e.animationState=EM(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();MA(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends $A{constructor(){super(...arguments),this.id=qD++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){const{initial:e,custom:t}=this.node.getProps();if("string"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)){const n=fT(this.node,e,t);if(n){const{transition:e,transitionEnd:t,...r}=n;for(const n in r)this.node.getValue(n)?.jump(r[n])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function UD(e){return{point:{x:e.pageX,y:e.pageY}}}function GD(e,t,n,r){return dI(e,t,(e=>t=>nA(t)&&e(t,UD(t)))(n),r)}var WD=({current:e})=>e?e.ownerDocument.defaultView:null,YD=(e,t)=>Math.abs(e-t);var KD=/*#__PURE__*/new Set(["auto","scroll"]),XD=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3,element:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=/* @__PURE__ */new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ZD(this.lastRawMoveEventInfo,this.transformPagePoint));const e=QD(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=YD(e.x,t.x),r=YD(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:a}=Dk;this.history.push({...r,timestamp:a});const{onStart:o,onMove:i}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),i&&i(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=ZD(t,this.transformPagePoint),Mk.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:a}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||a&&a(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=QD("pointercancel"===e.type?this.lastMoveEventInfo:ZD(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!nA(e))return;this.dragSnapToOrigin=a,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const s=ZD(UD(e),this.transformPagePoint),{point:l}=s,{timestamp:c}=Dk;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=t;d&&d(e,QD(s,this.history));const u={passive:!0,capture:!0};this.removeListeners=ek(GD(this.contextWindow,"pointermove",this.handlePointerMove,u),GD(this.contextWindow,"pointerup",this.handlePointerUp,u),GD(this.contextWindow,"pointercancel",this.handlePointerUp,u)),i&&this.startScrollTracking(i)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(KD.has(e.overflowX)||KD.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},a=r.x-t.x,o=r.y-t.y;0===a&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=a,this.history[0].y-=o),this.scrollPositions.set(e,r),Mk.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ik(this.updatePoint)}};function ZD(e,t){return t?{point:t(e.point)}:e}function JD(e,t){return{x:e.x-t.x,y:e.y-t.y}}function QD({point:e},t){return{point:e,delta:JD(e,tE(t)),offset:JD(e,eE(t)),velocity:nE(t,.1)}}function eE(e){return e[0]}function tE(e){return e[e.length-1]}function nE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=tE(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>rk(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&a.timestamp-r.timestamp>2*rk(t)&&(r=e[1]);const o=ak(a.timestamp-r.timestamp);if(0===o)return{x:0,y:0};const i={x:(a.x-r.x)/o,y:(a.y-r.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function rE(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function aE(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}var oE=.35;function iE(e,t,n){return{min:sE(e,t),max:sE(e,n)}}function sE(e,t){return"number"==typeof e?e:e[t]||0}var lE=/* @__PURE__ */new WeakMap,cE=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:a}=this.getProps();this.panSession=new XD(e,{onSessionStart:e=>{t&&this.snapToCursor(UD(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:a}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?ZT[o]?null:(ZT[o]=!0,()=>{ZT[o]=!1}):ZT.x||ZT.y?null:(ZT.x=ZT.y=!0,()=>{ZT.x=ZT.y=!1}),!this.openDragLock))return;var o;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nI(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Qk.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=FM(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),a&&Mk.update(()=>a(e,t),!1,!0),wT(this.visualElement,"transform");const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:a,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:i}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(i),void(null!==this.currentDirection&&a&&a(this.currentDirection));this.updateAxis("x",t.point,i),this.updateAxis("y",t.point,i),this.visualElement.render(),o&&Mk.update(()=>o(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:n,contextWindow:WD(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!r||!n)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&Mk.postRender(()=>i(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!uE(e,r,this.currentDirection))return;const a=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?gC(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?gC(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),a.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&OD(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:a}){return{x:rE(e.x,n,a),y:rE(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=oE){return!1===e?e=0:!0===e&&(e=oE),{x:iE(e,"left","right"),y:iE(e,"top","bottom")}}(t),r!==this.constraints&&!OD(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&nI(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!OD(e))return!1;const n=e.current;WS(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());const a=function(e,t,n){const r=oM(e,n),{scroll:a}=t;return a&&(tM(r.x,a.offset.x),tM(r.y,a.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:aE(e.x,t.x),y:aE(e.y,t.y)}}(r.layout.layoutBox,a);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=qA(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:i}=this.getProps(),s=this.constraints||{},l=nI(i=>{if(!uE(i,t,this.currentDirection))return;let l=s&&s[i]||{};!0!==o&&o!==i||(l={min:0,max:0});const c=r?200:1e6,d=r?40:1e7,u={type:"inertia",velocity:n?e[i]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(i,u)});return Promise.all(l).then(i)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return wT(this.visualElement,e),n.start(dT(e,n,0,t,this.visualElement,!1))}stopAnimation(){nI(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps()[t];return n||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){nI(t=>{const{drag:n}=this.getProps();if(!uE(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,a=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[t],i=a.get()||0;a.set(e[t]-gC(n,o,.5)+i)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!OD(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};nI(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=FM(e),a=FM(t);return a>r?n=tk(t.min,t.max-r,e.min):r>a&&(n=tk(e.min,e.max-a,t.min)),US(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),nI(t=>{if(!uE(t,e,null))return;const n=this.getAxisMotionValue(t),{min:a,max:o}=this.constraints[t];n.set(gC(a,o,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;lE.set(this.visualElement,this);const e=this.visualElement.current,t=GD(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),a=t.target,o=a!==e&&function(e){return aA.has(e.tagName)||!0===e.isContentEditable}(a);n&&r&&!o&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();OD(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=kA(e,dE(n)),a=kA(t,dE(n));return()=>{r(),a()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,o=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Mk.read(r);const i=dI(window,"resize",()=>this.scalePositionWithinConstraints()),s=a.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(nI(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),t(),o(),s&&s(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:a=!1,dragElastic:o=oE,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:a,dragElastic:o,dragMomentum:i}}};function dE(e){let t=!0;return()=>{t?t=!1:e()}}function uE(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}var hE=e=>(t,n)=>{e&&Mk.update(()=>e(t,n),!1,!0)},pE=!1,mE=class extends G{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:a}=e;a&&(t.group&&t.group.add(a),n&&n.register&&r&&n.register(a),pE&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),fI.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:a}=this.props,{projection:o}=n;return o?(o.isPresent=a,e.layoutDependency!==t&&o.setOptions({...o.options,layoutDependency:t}),pE=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||Mk.postRender(()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),KT.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;pE=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}};function fE(e){const[t,n]=nD(),r=ee(BS);return pe(mE,{...e,layoutGroup:r,switchLayoutGroup:ee(PD),isPresent:t,safeToRemove:n})}var gE={pan:{Feature:class extends $A{constructor(){super(...arguments),this.removePointerDownListener=QS}onPointerDown(e){this.session=new XD(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:WD(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:hE(e),onStart:hE(t),onMove:hE(n),onEnd:(e,t)=>{delete this.session,r&&Mk.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=GD(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends $A{constructor(e){super(e),this.removeGroupControls=QS,this.removeListeners=QS,this.controls=new cE(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||QS}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:YI,MeasureLayout:fE}};function vE(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const a=r["onHover"+n];a&&Mk.postRender(()=>a(t,UD(t)))}function yE(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const a=r["onTap"+("End"===n?"":n)];a&&Mk.postRender(()=>a(t,UD(t)))}var bE=/* @__PURE__ */new WeakMap,xE=/* @__PURE__ */new WeakMap,wE=e=>{const t=bE.get(e.target);t&&t(e)},SE=e=>{e.forEach(wE)};function kE(e,t,n){const r=function({root:e,...t}){const n=e||document;xE.has(n)||xE.set(n,{});const r=xE.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(SE,{root:e,...t})),r[a]}(t);return bE.set(e,n),r.observe(e),()=>{bE.delete(e),r.unobserve(e)}}var CE={some:0,all:1};var NE={inView:{Feature:class extends $A{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:a}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:CE[r]};this.stopObserver=kE(this.node.current,o,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,a&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends $A{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=dA(e,(e,t)=>(yE(this.node,t,"Start"),(e,{success:t})=>yE(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends $A{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(zi){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ek(dI(this.node.current,"focus",()=>this.onFocus()),dI(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends $A{mount(){const{current:e}=this.node;e&&(this.unmount=eA(e,(e,t)=>(vE(this.node,t,"Start"),e=>vE(this.node,e,"End"))))}unmount(){}}}},TE=/*@__PURE__*/HD({...jD,...NE,...gE,...{layout:{ProjectionNode:YI,MeasureLayout:fE}}},$D),AE={type:"tween",ease:[.22,1,.36,1],duration:.5};function ME({percentage:e}){const t=24,n=10.75,r=2*Math.PI*n,a=r-e/100*r;/* @__PURE__ */
|
|
447
|
+
return me("svg",{width:t,height:t,className:"-rotate-90 shrink-0",children:[/* @__PURE__ */pe("circle",{cx:12,cy:12,r:n,fill:"none",stroke:"var(--muted)",strokeWidth:2.5}),/* @__PURE__ */pe(TE.circle,{cx:12,cy:12,r:n,fill:"none",stroke:"var(--foreground)",strokeWidth:2.5,strokeDasharray:r,initial:{strokeDashoffset:r},animate:{strokeDashoffset:a},transition:{duration:.15,ease:"easeOut"},strokeLinecap:"round"})]})}function IE({headings:e,onNavigate:t,editorRef:n}){const[r,a]=le(null),[o,i]=le(null),[s,l]=le(!1),[c,d]=le(0),[u,h]=le(44),p=se(null);te(()=>{const e=()=>{const e=document.querySelector(".toolbar");e&&h(e.getBoundingClientRect().bottom+6)};e();const t=document.querySelector(".toolbar");if(!t)return;const n=new ResizeObserver(e);return n.observe(t),()=>n.disconnect()},[]);const m=ie(()=>0===e.length?1:Math.min(...e.map(([,,e])=>parseInt(e[1],10))),[e]);if(te(()=>{(()=>{if(!n?.current)return;const t=e[0]?.[0];if(!t)return;const r=n.current.getElementByKey(t);if(!r)return;let a=r.parentElement;for(;a;){const e=window.getComputedStyle(a);if("auto"===e.overflowY||"scroll"===e.overflowY)return void(p.current=a);a=a.parentElement}p.current=null})()},[e,n]),te(()=>{if(0===e.length)return;const t=e=>n?.current?.getElementByKey(e)??null,r=()=>{const n=p.current,r=n?n.scrollTop:window.scrollY,o=n?n.clientHeight:window.innerHeight,i=(n?n.scrollHeight:document.documentElement.scrollHeight)-o;d(i>0?Math.min(100,Math.max(0,r/i*100)):0);const s=.3*o;let l=null;for(const[a]of e){const e=t(a);if(!e)continue;const r=e.getBoundingClientRect(),o=n?n.getBoundingClientRect().top:0;if(!(r.top-o<=s))break;l=a}!l&&e.length>0&&(l=e[0][0]),a(l)},o=p.current??window;return o.addEventListener("scroll",r,{passive:!0}),r(),()=>o.removeEventListener("scroll",r)},[e,n]),0===e.length)return null;const f=e.find(([e])=>e===r)?.[1]??"Contents";/* @__PURE__ */
|
|
448
|
+
return me(he,{children:[/* @__PURE__ */pe(oD,{children:s&&/* @__PURE__ */pe(TE.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:AE,className:"fixed inset-0 z-[9998] bg-black/20 backdrop-blur-[4px]",onClick:()=>l(!1)})}),/* @__PURE__ */pe(TE.div,{initial:{y:-50,opacity:0},animate:{y:0,opacity:1},transition:{type:"spring",stiffness:300,damping:25},style:{top:u},className:"fixed left-1/2 z-[9999] flex -translate-x-1/2 flex-col items-center",children:/* @__PURE__ */me(TE.div,{onClick:()=>{s||l(!0)},initial:!1,animate:{width:s?340:280,height:s?400:52,borderRadius:s?24:26},transition:AE,style:{cursor:s?"default":"pointer"},className:"relative overflow-hidden border border-foreground/10 bg-background text-foreground shadow-2xl",children:[/* @__PURE__ */me(TE.div,{initial:!1,animate:{opacity:s?0:1,scale:s?.95:1,filter:s?"blur(4px)":"blur(0px)"},transition:{...AE,delay:s?0:.1},className:Il("absolute inset-0 flex items-center gap-4 px-4 sm:px-5",s&&"pointer-events-none"),children:[
|
|
446
449
|
/* @__PURE__ */pe("div",{className:"h-2 w-2 shrink-0 rounded-full bg-foreground"}),
|
|
447
|
-
/* @__PURE__ */pe("div",{className:"relative flex h-full flex-1 items-center overflow-hidden text-left",children:/* @__PURE__ */pe(
|
|
448
|
-
/* @__PURE__ */pe(
|
|
449
|
-
return me("button",{onMouseEnter:()=>i(e),onMouseLeave:()=>i(null),onClick:n=>{n.stopPropagation(),t(e),l(!1)},style:{paddingLeft:`${u}px`},className:Il("group flex w-full shrink-0 cursor-pointer items-center rounded-lg border-none py-2 pr-3 text-left text-sm transition-all duration-300 ease-out",c&&"bg-foreground/10 font-medium text-foreground",!c&&d&&"bg-foreground/5 text-foreground/85",!c&&!d&&"bg-transparent text-foreground/45"),children:[/* @__PURE__ */pe("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap transition-transform duration-300 group-hover:translate-x-1",children:n}),/* @__PURE__ */pe(
|
|
450
|
+
/* @__PURE__ */pe("div",{className:"relative flex h-full flex-1 items-center overflow-hidden text-left",children:/* @__PURE__ */pe(oD,{mode:"popLayout",initial:!1,children:/* @__PURE__ */pe(TE.span,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.35,ease:[.16,1,.3,1]},className:"block w-full overflow-hidden text-ellipsis whitespace-nowrap text-sm font-medium text-foreground",children:f},r??"empty")})}),
|
|
451
|
+
/* @__PURE__ */pe(ME,{percentage:c})]}),/* @__PURE__ */me(TE.div,{initial:!1,animate:{opacity:s?1:0,scale:s?1:1.05},transition:{...AE,delay:s?.1:0},className:Il("absolute inset-0 flex flex-col",!s&&"pointer-events-none"),children:[/* @__PURE__ */me("div",{className:"flex shrink-0 items-center justify-between px-6 pb-3 pt-5",children:[/* @__PURE__ */pe("span",{className:"text-[11px] font-semibold tracking-[0.08em] text-muted-foreground",children:"TABLE OF CONTENTS"}),/* @__PURE__ */pe("button",{onClick:e=>{e.stopPropagation(),l(!1)},className:"text-muted-foreground transition-colors hover:text-foreground",children:/* @__PURE__ */pe(Nt,{className:"h-5 w-5"})})]}),/* @__PURE__ */pe("div",{className:"flex-1 overflow-y-auto px-3 pb-4",children:/* @__PURE__ */pe("div",{className:"flex flex-col gap-0.5",children:e.map(([e,n,a])=>{const s=parseInt(a[1],10),c=r===e,d=o===e,u=14*Math.max(0,s-m)+12;/* @__PURE__ */
|
|
452
|
+
return me("button",{onMouseEnter:()=>i(e),onMouseLeave:()=>i(null),onClick:n=>{n.stopPropagation(),t(e),l(!1)},style:{paddingLeft:`${u}px`},className:Il("group flex w-full shrink-0 cursor-pointer items-center rounded-lg border-none py-2 pr-3 text-left text-sm transition-all duration-300 ease-out",c&&"bg-foreground/10 font-medium text-foreground",!c&&d&&"bg-foreground/5 text-foreground/85",!c&&!d&&"bg-transparent text-foreground/45"),children:[/* @__PURE__ */pe("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap transition-transform duration-300 group-hover:translate-x-1",children:n}),/* @__PURE__ */pe(TE.div,{initial:!1,animate:{scale:c?1:0,opacity:c?1:0},transition:{duration:.3,ease:"easeOut"},className:"ml-3 h-1.5 w-1.5 shrink-0 rounded-full bg-foreground"})]},e)})})})]})]})})]})}var DE=({mainContent:e,belowMainContent:t,openFilesSidebarSignal:n,extraTabs:r,activeExtraTabId:a,onExtraTabSelect:o,onExtraTabClose:i,onExtraTabAdd:s,onFileTabSelect:l,initialDocId:c,onActiveDocumentChange:d})=>{const{theme:u,setTheme:h}=Yw(),p=FS(n),[m,f]=le(void 0),g=se(!1);te(()=>{!g.current&&c&&p.documents.some(e=>e.id===c)&&(g.current=!0,c!==p.activeDocId&&p.handleSelectDocument(c))},[c,p.documents,p.activeDocId,p.handleSelectDocument]),te(()=>{d?.(p.activeDocId)},[p.activeDocId,d]);const[v,y]=Df({key:"reason-docs-sidebar",storage:Ef}),b=ie(()=>{const e=p.openTabs.map(e=>({id:e,title:p.documents.find(t=>t.id===e)?.title||"Untitled",kind:"file"})),t=(r??[]).map(e=>({id:e.id,title:e.title,kind:e.kind}));return[...e,...t]},[p.openTabs,p.documents,r]),x=a??p.activeDocId,w=e=>{r?.some(t=>t.id===e)?o?.(e):(p.handleTabChange(e),l?.())},S=e=>{r?.some(t=>t.id===e)?i?.(e):p.handleTabClose(e)},k=(e,t)=>{p.handleAddDocument(e,t),t||l?.()},C=e=>{p.handleSelectDocument(e),l?.()},N={documents:p.documents,activeId:p.activeDocId,activeDocument:p.activeDocument,onSelect:C,onAdd:k,onDelete:p.handleDeleteDocument,onDuplicate:p.handleDuplicateDocument,onToggleExpand:p.handleToggleExpand,onMove:p.handleMoveDocument,onManageTags:p.handleManageTags,onRename:(e,t)=>p.handleUpdateDocument(e,{title:t}),searchQuery:p.searchQuery,onSearchChange:p.setSearchQuery,onSearchClear:()=>p.setSearchQuery(""),onSearchFocus:()=>p.setIsSearchModalOpen(!0),isOpen:p.isSidebarOpen,onOpenChange:p.setIsSidebarOpen,isMobile:p.isMobile,leftPanels:p.leftPanels,onLeftPanelsChange:p.setLeftPanels,leftSplit:p.leftSplit,onLeftSplitChange:p.setLeftSplit,rightPanels:p.rightPanels,onRightPanelsChange:p.setRightPanels,rightSplit:p.rightSplit,onRightSplitChange:p.setRightSplit,onSettingsClick:e=>{f(e),p.setIsSettingsOpen(!0)},onInviteClick:()=>p.setIsInviteModalOpen(!0),onRestore:p.handleRestoreDocument,onPermanentDelete:p.handlePermanentDelete,newDocumentId:p.newDocumentId,showDynamicIsland:p.showDynamicIsland,onToggleDynamicIsland:()=>p.setShowDynamicIsland(!p.showDynamicIsland),activeFileSourceId:p.activeFileSourceId,onFileSourceChange:p.handleFileSourceChange,onNavigate:e=>p.editorRef.current?.scrollToHeading(e),editorRef:p.editorRef,openTabs:p.openTabs,activeTab:x,onTabChange:w,onTabClose:S,onTabRename:(e,t)=>p.handleUpdateDocument(e,{title:t}),onSplitRight:p.handleSplitRight,onReopenLastClosed:p.handleReopenLastClosed,canReopenLastClosed:p.closedTabsHistory.length>0,tabItems:b,onNewChat:s,aiProps:{isAiLoading:p.isAiLoading,aiSuggestion:p.aiSuggestion,onAiApprove:p.handleAIApprove,onAiReject:p.handleAIReject,onAiRegenerate:p.handleAIRegenerate}},T={activeDocument:p.activeDocument,documents:p.documents,splitViewDocId:p.splitViewDocId,activeDocId:p.activeDocId,isMobile:p.isMobile,editorRef:p.editorRef,onUpdateDocument:p.handleUpdateDocument,onHeadingsChange:p.setHeadings,onCloseSplitView:()=>p.setSplitViewDocId(null),aiSuggestion:p.aiSuggestion,isAiLoading:p.isAiLoading,onAiRewrite:p.handleAIRewrite,onAiApprove:p.handleAIApprove,onAiReject:p.handleAIReject,onAiRegenerate:p.handleAIRegenerate,onInviteClick:()=>p.setIsInviteModalOpen(!0),onShareClick:()=>p.setIsInviteModalOpen(!0)},A=p.rightPanels.length>0&&/* @__PURE__ */pe(ww,{panels:p.rightPanels,split:p.rightSplit,documents:p.documents,activeId:p.activeDocId,activeDocument:p.activeDocument,onSelect:C,onAdd:k,onDelete:p.handleDeleteDocument,onDuplicate:p.handleDuplicateDocument,onMove:p.handleMoveDocument,onManageTags:p.handleManageTags,onRename:(e,t)=>p.handleUpdateDocument(e,{title:t}),headings:p.headings,onNavigate:e=>p.editorRef.current?.scrollToHeading(e),editorRef:p.editorRef,openTabs:p.openTabs,activeTab:x,onTabChange:w,onTabClose:S,onTabRename:(e,t)=>p.handleUpdateDocument(e,{title:t}),onSplitRight:p.handleSplitRight,onReopenLastClosed:p.handleReopenLastClosed,canReopenLastClosed:p.closedTabsHistory.length>0,tabItems:b,onNewChat:s,aiProps:{isAiLoading:p.isAiLoading,aiSuggestion:p.aiSuggestion,onAiApprove:p.handleAIApprove,onAiReject:p.handleAIReject,onAiRegenerate:p.handleAIRegenerate},onClose:()=>p.setRightPanels([]),isMobile:p.isMobile,isOpen:p.isRightSidebarOpen,onOpenChange:p.setIsRightSidebarOpen});/* @__PURE__ */
|
|
450
453
|
return me("div",{className:"h-screen w-screen flex flex-col overflow-hidden",children:[p.isMobile?/* @__PURE__ */me("div",{className:"flex-1 flex flex-col overflow-hidden",children:[/* @__PURE__ */me("div",{className:"flex items-center justify-between h-10 px-1 border-b border-sidebar-border/60 shrink-0",children:[/* @__PURE__ */pe(tp,{variant:"ghost",size:"sm",className:"size-8 p-0",onClick:()=>p.setIsSidebarOpen(!0),"aria-label":"Open sidebar",children:/* @__PURE__ */pe(tt,{className:"h-5 w-5"})}),p.rightPanels.length>0&&/* @__PURE__ */pe(tp,{variant:"ghost",size:"sm",className:"size-8 p-0",onClick:()=>p.setIsRightSidebarOpen(!0),"aria-label":"Open right panel",children:/* @__PURE__ */pe(lt,{className:"h-5 w-5"})})]}),/* @__PURE__ */me("div",{className:"flex-1 flex overflow-hidden",children:[
|
|
451
|
-
/* @__PURE__ */pe(
|
|
452
|
-
/* @__PURE__ */me("main",{className:"flex-1 overflow-hidden flex flex-col",children:[/* @__PURE__ */pe("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col",children:e??/* @__PURE__ */pe(
|
|
453
|
-
/* @__PURE__ */pe(
|
|
454
|
+
/* @__PURE__ */pe(zf,{...N,headings:p.headings}),
|
|
455
|
+
/* @__PURE__ */me("main",{className:"flex-1 overflow-hidden flex flex-col",children:[/* @__PURE__ */pe("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col",children:e??/* @__PURE__ */pe(vw,{...T})}),t&&/* @__PURE__ */pe("div",{className:"shrink-0 px-2 pt-1 pb-[60px] sm:pb-2 sm:pr-56",children:t})]}),A]})]}):/* @__PURE__ */pe("div",{className:"flex-1 overflow-hidden",children:/* @__PURE__ */me(If,{direction:"horizontal",onResize:y,children:[/* @__PURE__ */pe(yf,{size:v?.[0]||"250px",minSize:"0px",maxSize:"600px",children:/* @__PURE__ */pe("div",{className:"overflow-y-auto overflow-x-hidden bg-background",children:/* @__PURE__ */pe(zf,{...N,headings:p.headings})})}),/* @__PURE__ */pe(yf,{children:/* @__PURE__ */me("div",{className:"h-screen flex flex-col bg-background",children:[/* @__PURE__ */me("div",{className:"flex-1 flex min-h-0",children:[/* @__PURE__ */pe("div",{className:"flex-1 min-h-0 overflow-auto",children:e??/* @__PURE__ */pe(vw,{...T})}),A]}),t&&/* @__PURE__ */pe("div",{className:"shrink-0 px-2 pb-2",children:t})]})})]})}),p.headings.length>0&&0===p.rightPanels.length&&p.showDynamicIsland&&/* @__PURE__ */pe(IE,{headings:p.headings,onNavigate:e=>p.editorRef.current?.scrollToHeading(e),editorRef:p.editorRef}),
|
|
456
|
+
/* @__PURE__ */pe(LS,{isSearchModalOpen:p.isSearchModalOpen,setIsSearchModalOpen:p.setIsSearchModalOpen,isSettingsOpen:p.isSettingsOpen,setIsSettingsOpen:p.setIsSettingsOpen,settingsInitialSection:m,isTeamsOpen:p.isTeamsOpen,setIsTeamsOpen:p.setIsTeamsOpen,isInviteModalOpen:p.isInviteModalOpen,setIsInviteModalOpen:p.setIsInviteModalOpen,isTagDialogOpen:p.isTagDialogOpen,setIsTagDialogOpen:p.setIsTagDialogOpen,documents:p.documents,activeDocument:p.activeDocument,tagManagementDocId:p.tagManagementDocId,defaultSidebarView:p.defaultSidebarView,setDefaultSidebarView:p.setDefaultSidebarView,enableDatabaseSync:p.enableDatabaseSync,setEnableDatabaseSync:p.setEnableDatabaseSync,setDocuments:p.setDocuments,onSelectDocument:C,onToggleTheme:()=>{h("dark"===u?"light":"dark")},currentTheme:u,onUpdateTags:p.handleUpdateTags})]})};export{DE as t};
|