diff --git a/assets/IconRssLine-BzGIEfvJ.js b/assets/IconRssLine-CfLRRZ3P.js similarity index 95% rename from assets/IconRssLine-BzGIEfvJ.js rename to assets/IconRssLine-CfLRRZ3P.js index 1ac4944..0a6e841 100644 --- a/assets/IconRssLine-BzGIEfvJ.js +++ b/assets/IconRssLine-CfLRRZ3P.js @@ -1 +1 @@ -import{r as e,R as s,S as n}from"./index-CrryxQyl.js";var t;class r extends e.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const s=this.props.elementRef;this.ref=e,"function"==typeof s&&s(e)}}render(){return s.createElement(n,Object.assign({},this.props,{name:"IconRss",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),t||(t=s.createElement("path",{d:"M1616.875 1813.333c-27.627-820.266-689.92-1482.56-1510.187-1510.186V107.52c928.213 27.733 1678.08 777.6 1705.813 1705.813h-195.626ZM53.355 0H.02v408.853h53.334c803.733 0 1457.706 653.974 1457.706 1457.814V1920h408.96v-53.333C1920.021 837.44 1082.581 0 53.355 0Zm933.984 1813.333c-26.667-473.493-407.147-853.973-880.64-880.746V736.853c581.226 27.094 1049.28 495.254 1076.373 1076.48H987.339ZM53.365 628.907H.032v408.853h53.333c456.96 0 828.8 371.947 828.8 828.907V1920h408.854v-53.333c0-682.454-555.2-1237.76-1237.654-1237.76ZM267.19 1812.288c-88 0-159.573-71.573-159.573-159.467 0-87.893 71.573-159.466 159.573-159.466 87.894 0 159.467 71.573 159.467 159.466 0 87.894-71.573 159.467-159.467 159.467m0-425.6c-146.773 0-266.24 119.36-266.24 266.133 0 146.774 119.467 266.134 266.24 266.134 146.774 0 266.134-119.36 266.134-266.134 0-146.773-119.36-266.133-266.134-266.133",fillRule:"evenodd"})))}}r.glyphName="rss",r.variant="Line",r.displayName="IconRssLine",r.propTypes={...n.propTypes},r.allowedProps=[...n.allowedProps];export{r as I}; +import{r as e,R as s,S as n}from"./index-DxmLT0bY.js";var t;class r extends e.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const s=this.props.elementRef;this.ref=e,"function"==typeof s&&s(e)}}render(){return s.createElement(n,Object.assign({},this.props,{name:"IconRss",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),t||(t=s.createElement("path",{d:"M1616.875 1813.333c-27.627-820.266-689.92-1482.56-1510.187-1510.186V107.52c928.213 27.733 1678.08 777.6 1705.813 1705.813h-195.626ZM53.355 0H.02v408.853h53.334c803.733 0 1457.706 653.974 1457.706 1457.814V1920h408.96v-53.333C1920.021 837.44 1082.581 0 53.355 0Zm933.984 1813.333c-26.667-473.493-407.147-853.973-880.64-880.746V736.853c581.226 27.094 1049.28 495.254 1076.373 1076.48H987.339ZM53.365 628.907H.032v408.853h53.333c456.96 0 828.8 371.947 828.8 828.907V1920h408.854v-53.333c0-682.454-555.2-1237.76-1237.654-1237.76ZM267.19 1812.288c-88 0-159.573-71.573-159.573-159.467 0-87.893 71.573-159.466 159.573-159.466 87.894 0 159.467 71.573 159.467 159.466 0 87.894-71.573 159.467-159.467 159.467m0-425.6c-146.773 0-266.24 119.36-266.24 266.133 0 146.774 119.467 266.134 266.24 266.134 146.774 0 266.134-119.36 266.134-266.134 0-146.773-119.36-266.133-266.134-266.133",fillRule:"evenodd"})))}}r.glyphName="rss",r.variant="Line",r.displayName="IconRssLine",r.propTypes={...n.propTypes},r.allowedProps=[...n.allowedProps];export{r as I}; diff --git a/assets/Mdtoui-g9rlRwfF.js b/assets/Mdtoui-DwpTTe70.js similarity index 99% rename from assets/Mdtoui-g9rlRwfF.js rename to assets/Mdtoui-DwpTTe70.js index 5da8fd4..2935fe7 100644 --- a/assets/Mdtoui-g9rlRwfF.js +++ b/assets/Mdtoui-DwpTTe70.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Bv50oJ9E.js","assets/index-C6-OLeBB.js","assets/index-CrryxQyl.js","assets/index-CqQFZXZA.css","assets/RenderTopNavBar-BTvx9fvK.js","assets/index-Cw9o-rUL.js","assets/index-BaJp6lgV.js","assets/index-B8c3q9fI.js","assets/index-DVeZ9h9n.js","assets/index-DM7MZwnz.js","assets/IconRssLine-BzGIEfvJ.js"])))=>i.map(i=>d[i]); -import{h as e,i as t,T as n,w as r,t as i,r as a,k as s,l as o,p as c,V as l,m as u,j as h,_ as p,R as d}from"./index-CrryxQyl.js";import{C as m,s as f}from"./RenderTopNavBar-BTvx9fvK.js";import{a as _}from"./index-C6-OLeBB.js";const E={children:t.oneOfType([t.node,t.func]).isRequired,delimiter:t.oneOf(["none","dashed","solid"]),size:t.oneOf(["small","medium","large"]),margin:n.spacing,padding:n.spacing,spacing:t.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:t.func},T=["delimiter","spacing","size","margin","padding","elementRef","children","styles"];var g,A;let k=r(((t,n)=>{const r=n.size,i=n.delimiter,a=n.spacing,s="none"!==i,o="none"!==a;e(!(s&&o),"[List] `itemSpacing` has no effect inside Lists with the `delimiter` prop set to anything other than `none`.");const c={small:{fontSize:t.fontSizeSmall},medium:{fontSize:t.fontSizeMedium},large:{fontSize:t.fontSizeLarge}},l={"xxx-small":{marginTop:t.spacingXXXSmall,marginBottom:t.spacingXXXSmall},"xx-small":{marginTop:t.spacingXXSmall,marginBottom:t.spacingXXSmall},"x-small":{marginTop:t.spacingXSmall,marginBottom:t.spacingXSmall},small:{marginTop:t.spacingSmall,marginBottom:t.spacingSmall},medium:{marginTop:t.spacingMedium,marginBottom:t.spacingMedium},large:{marginTop:t.spacingLarge,marginBottom:t.spacingLarge},"x-large":{marginTop:t.spacingXLarge,marginBottom:t.spacingXLarge},"xx-large":{marginTop:t.spacingXXLarge,marginBottom:t.spacingXXLarge},none:{}},u={dashed:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:t.delimiterDashedBorder}},solid:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:t.delimiterSolidBorder}},none:{}};return{listItem:{label:"listItem",fontWeight:t.fontWeight,fontFamily:t.fontFamily,lineHeight:t.lineHeight,color:t.color,padding:0,...c[r],...o&&!s&&l[a],...s&&u[i],"&:first-of-type":{marginTop:"0"},"&:last-of-type":{marginBottom:"0"}}}}),(e=>{var t,n,r;const i=e.borders,a=e.colors,s=e.spacing,o=e.typography,c=e.key,l={canvas:{color:e["ic-brand-font-color-dark"]}};return{...{fontFamily:null==o?void 0:o.fontFamily,fontWeight:null==o?void 0:o.fontWeightNormal,lineHeight:null==o?void 0:o.lineHeight,fontSizeSmall:null==o?void 0:o.fontSizeSmall,fontSizeMedium:null==o?void 0:o.fontSizeMedium,fontSizeLarge:null==o?void 0:o.fontSizeLarge,color:null==a||null===(t=a.contrasts)||void 0===t?void 0:t.grey125125,spacingXXXSmall:null==s?void 0:s.xxxSmall,spacingXXSmall:null==s?void 0:s.xxSmall,spacingXSmall:null==s?void 0:s.xSmall,spacingSmall:null==s?void 0:s.small,spacingMedium:null==s?void 0:s.medium,spacingLarge:null==s?void 0:s.large,spacingXLarge:null==s?void 0:s.xLarge,spacingXXLarge:null==s?void 0:s.xxLarge,delimiterDashedBorder:`${null==i?void 0:i.widthSmall} dashed ${null==a||null===(n=a.contrasts)||void 0===n?void 0:n.grey1214}`,delimiterSolidBorder:`${null==i?void 0:i.widthSmall} solid ${null==a||null===(r=a.contrasts)||void 0===r?void 0:r.grey1214}`},...l[c]}}))(g=i()(((A=class extends a.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const t=this.props.elementRef;this.ref=e,"function"==typeof t&&t(e)}}componentDidMount(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t)}componentDidUpdate(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t)}render(){const e=this.props;e.delimiter,e.spacing,e.size;const t=e.margin,n=e.padding;e.elementRef;const r=e.children,i=e.styles,a=s(e,T);return o(l,Object.assign({},c(a),{css:null==i?void 0:i.listItem,as:"li",margin:t,padding:n,maxWidth:"100%",elementRef:this.handleRef}),r)}}).displayName="ListItem",A.componentId="List.Item",A.propTypes=E,A.allowedProps=["children","delimiter","size","margin","padding","spacing","elementRef"],A.defaultProps={padding:"none",spacing:"none",delimiter:"none",size:"medium"},g=A))||g)||g;const b={children:m.oneOf([k]),as:t.oneOf(["ul","ol"]),delimiter:t.oneOf(["none","dashed","solid"]),isUnstyled:t.bool,margin:n.spacing,size:t.oneOf(["small","medium","large"]),itemSpacing:t.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:t.func},I=["as","margin","isUnstyled","elementRef","styles"];var S,N;let C=r(((e,t)=>{const n=t.isUnstyled,r="ol"===t.as;return{list:{label:"list",paddingInlineStart:e.listPadding,paddingInlineEnd:0,...r&&{listStyleType:"none",paddingInlineStart:`calc(${e.listPadding} / 2)`,paddingInlineEnd:0,counterReset:"ol-counter","&>li::before":{fontWeight:e.orderedNumberFontWeight,counterIncrement:"ol-counter",content:'counters(ol-counter, ".") "."',marginInlineEnd:e.orderedNumberMargin,marginInlineStart:0}},...n&&{listStyleType:"none",paddingInlineStart:0}}}}),(e=>{const t=e.spacing,n=e.typography;return{...{listPadding:null==t?void 0:t.large,orderedNumberFontWeight:null==n?void 0:n.fontWeightBold,orderedNumberMargin:null==t?void 0:t.xSmall}}}))(S=i()(((N=class extends a.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const t=this.props.elementRef;this.ref=e,"function"==typeof t&&t(e)}}componentDidMount(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t)}componentDidUpdate(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t)}renderChildren(){return a.Children.map(this.props.children,(e=>{if(e)return f(e,{isUnstyled:this.props.isUnstyled,delimiter:this.props.delimiter,size:this.props.size,spacing:this.props.itemSpacing})}))}render(){const e=this.props,t=e.as,n=e.margin;e.isUnstyled,e.elementRef;const r=e.styles,i=s(e,I);return o(l,Object.assign({},c(i),{css:null==r?void 0:r.list,as:t,margin:n,elementRef:this.handleRef,display:"block"}),this.renderChildren())}}).displayName="List",N.componentId="List",N.propTypes=b,N.allowedProps=["children","as","delimiter","isUnstyled","margin","size","itemSpacing","elementRef"],N.defaultProps={as:"ul",delimiter:"none",isUnstyled:!1,size:"medium",itemSpacing:"none"},N.Item=k,S=N))||S)||S;function y(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){-1===r&&(r=n.length,a=!0);const e=n.slice(i,r).trim();!e&&a||t.push(e),i=r+1,r=n.indexOf(",",i)}return t}function D(e,t){const n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}const O=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,R=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,L={};function w(e,t){return(L.jsx?R:O).test(e)}const P=/[ \t\n\f\r]/g;function x(e){return""===e.replace(P,"")}class M{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function v(e,t){const n={},r={};let i=-1;for(;++i"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),te=Z({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function ne(e,t){return t in e?e[t]:t}function re(e,t){return ne(e,t.toLowerCase())}const ie=Z({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:re,properties:{xmlns:null,xmlnsXLink:null}}),ae=Z({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:G,ariaAutoComplete:null,ariaBusy:G,ariaChecked:G,ariaColCount:Y,ariaColIndex:Y,ariaColSpan:Y,ariaControls:j,ariaCurrent:null,ariaDescribedBy:j,ariaDetails:null,ariaDisabled:G,ariaDropEffect:j,ariaErrorMessage:null,ariaExpanded:G,ariaFlowTo:j,ariaGrabbed:G,ariaHasPopup:null,ariaHidden:G,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:j,ariaLevel:Y,ariaLive:null,ariaModal:G,ariaMultiLine:G,ariaMultiSelectable:G,ariaOrientation:null,ariaOwns:j,ariaPlaceholder:null,ariaPosInSet:Y,ariaPressed:G,ariaReadOnly:G,ariaRelevant:null,ariaRequired:G,ariaRoleDescription:j,ariaRowCount:Y,ariaRowIndex:Y,ariaRowSpan:Y,ariaSelected:G,ariaSetSize:Y,ariaSort:null,ariaValueMax:Y,ariaValueMin:Y,ariaValueNow:Y,ariaValueText:null,role:null}}),se=Z({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:re,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:q,acceptCharset:j,accessKey:j,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:j,autoFocus:U,autoPlay:U,blocking:j,capture:null,charSet:null,checked:U,cite:null,className:j,cols:Y,colSpan:null,content:null,contentEditable:G,controls:U,controlsList:j,coords:Y|q,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:z,draggable:G,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:j,height:Y,hidden:U,high:Y,href:null,hrefLang:null,htmlFor:j,httpEquiv:j,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:j,itemRef:j,itemScope:U,itemType:j,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:U,optimum:Y,pattern:null,ping:j,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:j,required:U,reversed:U,rows:Y,rowSpan:Y,sandbox:j,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:G,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:G,width:Y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:j,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:G,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:U,disableRemotePlayback:U,prefix:null,property:null,results:Y,security:null,unselectable:null}}),oe=Z({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:ne,properties:{about:V,accentHeight:Y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Y,amplitude:Y,arabicForm:null,ascent:Y,attributeName:null,attributeType:null,azimuth:Y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Y,by:null,calcMode:null,capHeight:Y,className:j,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Y,diffuseConstant:Y,direction:null,display:null,dur:null,divisor:Y,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:Y,enableBackground:null,end:null,event:null,exponent:Y,externalResourcesRequired:null,fill:null,fillOpacity:Y,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:q,g2:q,glyphName:q,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Y,horizOriginX:Y,horizOriginY:Y,id:null,ideographic:Y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Y,k:Y,k1:Y,k2:Y,k3:Y,k4:Y,kernelMatrix:V,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Y,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Y,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Y,overlineThickness:Y,paintOrder:null,panose1:null,path:null,pathLength:Y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:j,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Y,pointsAtY:Y,pointsAtZ:Y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:V,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:V,rev:V,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:V,requiredFeatures:V,requiredFonts:V,requiredFormats:V,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Y,specularExponent:Y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Y,strikethroughThickness:Y,string:null,stroke:null,strokeDashArray:V,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Y,strokeOpacity:Y,strokeWidth:null,style:null,surfaceScale:Y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:V,tabIndex:Y,tableValues:null,target:null,targetX:Y,targetY:Y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:V,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Y,underlineThickness:Y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Y,values:null,vAlphabetic:Y,vMathematical:Y,vectorEffect:null,vHanging:Y,vIdeographic:Y,version:null,vertAdvY:Y,vertOriginX:Y,vertOriginY:Y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),ce=/^data[-\w.:]+$/i,le=/-[a-z]/g,ue=/[A-Z]/g;function he(e,t){const n=B(t);let r=t,i=F;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&ce.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(le,de);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!le.test(e)){let n=e.replace(ue,pe);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=K}return new i(r,t)}function pe(e){return"-"+e.toLowerCase()}function de(e){return e.charAt(1).toUpperCase()}const me={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},fe=v([te,ee,ie,ae,se],"html"),_e=v([te,ee,ie,ae,oe],"svg");function Ee(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Te(e){return e.join(" ").trim()}var ge,Ae,ke,be={};var Ie=function(){if(ke)return be;ke=1;var e=be&&be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(be,"__esModule",{value:!0}),be.default=function(e,n){var r=null;if(!e||"string"!=typeof e)return r;var i=(0,t.default)(e),a="function"==typeof n;return i.forEach((function(e){if("declaration"===e.type){var t=e.property,i=e.value;a?n(t,i,e):i&&((r=r||{})[t]=i)}})),r};var t=e(function(){if(Ae)return ge;Ae=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,c="";function l(e){return e?e.replace(o,c):c}return ge=function(o,u){if("string"!=typeof o)throw new TypeError("First argument must be a string");if(!o)return[];u=u||{};var h=1,p=1;function d(e){var n=e.match(t);n&&(h+=n.length);var r=e.lastIndexOf("\n");p=~r?e.length-r:p+e.length}function m(){var e={line:h,column:p};return function(t){return t.position=new f(e),T(),t}}function f(e){this.start=e,this.end={line:h,column:p},this.source=u.source}function _(e){var t=new Error(u.source+":"+h+":"+p+": "+e);if(t.reason=e,t.filename=u.source,t.line=h,t.column=p,t.source=o,!u.silent)throw t}function E(e){var t=e.exec(o);if(t){var n=t[0];return d(n),o=o.slice(n.length),t}}function T(){E(n)}function g(e){var t;for(e=e||[];t=A();)!1!==t&&e.push(t);return e}function A(){var e=m();if("/"==o.charAt(0)&&"*"==o.charAt(1)){for(var t=2;c!=o.charAt(t)&&("*"!=o.charAt(t)||"/"!=o.charAt(t+1));)++t;if(t+=2,c===o.charAt(t-1))return _("End of comment missing");var n=o.slice(2,t-2);return p+=2,d(n),o=o.slice(t),p+=2,e({type:"comment",comment:n})}}function k(){var t=m(),n=E(r);if(n){if(A(),!E(i))return _("property missing ':'");var o=E(a),u=t({type:"declaration",property:l(n[0].replace(e,c)),value:o?l(o[0].replace(e,c)):c});return E(s),u}}return f.prototype.content=o,T(),function(){var e,t=[];for(g(t);e=k();)!1!==e&&(t.push(e),g(t));return t}()},ge}());return be}();const Se=u(Ie),Ne=Se.default||Se,Ce=De("end"),ye=De("start");function De(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Oe(e){return e&&"object"==typeof e?"position"in e||"type"in e?Le(e.position):"start"in e||"end"in e?Le(e):"line"in e||"column"in e?Re(e):"":""}function Re(e){return we(e&&e.line)+":"+we(e&&e.column)}function Le(e){return Re(e&&e.start)+"-"+Re(e&&e.end)}function we(e){return e&&"number"==typeof e?e:1}class Pe extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},a=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=s?s.line:void 0,this.name=Oe(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}Pe.prototype.file="",Pe.prototype.name="",Pe.prototype.reason="",Pe.prototype.message="",Pe.prototype.stack="",Pe.prototype.column=void 0,Pe.prototype.line=void 0,Pe.prototype.ancestors=void 0,Pe.prototype.cause=void 0,Pe.prototype.fatal=void 0,Pe.prototype.place=void 0,Pe.prototype.ruleId=void 0,Pe.prototype.source=void 0;const xe={}.hasOwnProperty,Me=new Map,ve=/[A-Z]/g,Be=/-([a-z])/g,Fe=new Set(["table","tbody","thead","tfoot","tr"]),He=new Set(["td","th"]),Ue="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ge(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,i,a){const s=Array.isArray(i.children),o=ye(n);return t(r,i,a,s,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,i,a){const s=Array.isArray(i.children)?n:t;return a?s(r,i,a):s(r,i)}}(0,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?_e:fe,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},a=ze(i,e,void 0);return a&&"string"!=typeof a?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ze(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(i=_e,e.schema=i);e.ancestors.push(t);const a=We(e,t.tagName,!1),s=function(e,t){const n={};let r,i;for(i in t.properties)if("children"!==i&&xe.call(t.properties,i)){const a=Ve(e,i,t.properties[i]);if(a){const[i,s]=a;e.tableCellAlignToStyle&&"align"===i&&"string"==typeof s&&He.has(t.tagName)?r=s:n[i]=s}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let o=qe(e,t);Fe.has(t.tagName)&&(o=o.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&x(t.value):x(t));var t})));return Ye(e,s,a,t),je(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Qe(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.name&&"html"===r.space&&(i=_e,e.schema=i);e.ancestors.push(t);const a=null===t.name?e.Fragment:We(e,t.name,!0),s=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const i=t.expression;i.type;const a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Qe(e,t.position);else{const i=r.name;let a;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Qe(e,t.position);else a=null===r.value||r.value;n[i]=a}return n}(e,t),o=qe(e,t);return Ye(e,s,a,t),je(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Qe(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return je(r,qe(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Ye(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function je(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function qe(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Me;for(;++ri?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s0?(at(e,e.length,0,t),e):t}const ot={}.hasOwnProperty;function ct(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function pt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const dt=Nt(/[A-Za-z]/),mt=Nt(/[\dA-Za-z]/),ft=Nt(/[#-'*+\--9=?A-Z^-~]/);function _t(e){return null!==e&&(e<32||127===e)}const Et=Nt(/\d/),Tt=Nt(/[\dA-Fa-f]/),gt=Nt(/[!-/:-@[-`{-~]/);function At(e){return null!==e&&e<-2}function kt(e){return null!==e&&(e<0||32===e)}function bt(e){return-2===e||-1===e||32===e}const It=Nt(/\p{P}|\p{S}/u),St=Nt(/\s/);function Nt(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Ct(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&a<57344){const t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(s=String.fromCharCode(a,t),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function yt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return function(r){if(bt(r))return e.enter(n),s(r);return t(r)};function s(r){return bt(r)&&a++a))return;const n=t.events.length;let i,o,c=n;for(;c--;)if("exit"===t.events[c][0]&&"chunkFlow"===t.events[c][1].type){if(i){o=t.events[c][1].end;break}i=!0}for(E(s),e=n;er;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function T(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Rt={tokenize:function(e,t,n){return yt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Lt(e){return null===e||kt(e)||St(e)?1:It(e)?2:void 0}function wt(e,t,n){const r=[];let i=-1;for(;++i1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const h=Object.assign({},e[n][1].end),p=Object.assign({},e[u][1].start);xt(h,-o),xt(p,o),a={type:o>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[n][1].end)},s={type:o>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:p},i={type:o>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[u][1].start)},r={type:o>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},a.start),e[u][1].start=Object.assign({},s.end),c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=st(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=st(c,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=st(c,wt(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),c=st(c,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(l=2,c=st(c,[["enter",e[u][1],t],["exit",e[u][1],t]])):l=0,at(e,n-1,u-n+3,c),u=n+c.length-l-2;break}u=-1;for(;++u=o?(e.exit("codeFencedFenceSequence"),bt(t)?yt(e,h,"whitespace")(t):h(t)):n(t)}function h(r){return null===r||At(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0};let a,s=0,o=0;return function(t){return function(t){const n=r.events[r.events.length-1];return s=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,a=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(t)}(t)};function c(t){return t===a?(o++,e.consume(t),c):o<3?n(t):(e.exit("codeFencedFenceSequence"),bt(t)?yt(e,l,"whitespace")(t):l(t))}function l(n){return null===n||At(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Ut,d,T)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||At(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(t)):bt(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),yt(e,h,"whitespace")(t)):96===t&&t===a?n(t):(e.consume(t),u)}function h(t){return null===t||At(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||At(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(t)):96===t&&t===a?n(t):(e.consume(t),p)}function d(t){return e.attempt(i,T,m)(t)}function m(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f}function f(t){return s>0&&bt(t)?yt(e,_,"linePrefix",s+1)(t):_(t)}function _(t){return null===t||At(t)?e.check(Ut,d,T)(t):(e.enter("codeFlowValue"),E(t))}function E(t){return null===t||At(t)?(e.exit("codeFlowValue"),_(t)):(e.consume(t),E)}function T(n){return e.exit("codeFenced"),t(n)}},concrete:!0};const zt={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),yt(e,i,"linePrefix",5)(t)};function i(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):n(e)}function a(t){return null===t?o(t):At(t)?e.attempt(Yt,a,o)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||At(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),s)}function o(n){return e.exit("codeIndented"),t(n)}}},Yt={tokenize:function(e,t,n){const r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):At(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):yt(e,a,"linePrefix",5)(t)}function a(e){const a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):At(e)?i(e):n(e)}},partial:!0};const jt={name:"codeText",tokenize:function(e,t,n){let r,i,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),a++,s):(e.exit("codeTextSequence"),o(t))}function o(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),o):96===t?(i=e.enter("codeTextSequence"),r=0,l(t)):At(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||At(t)?(e.exit("codeTextData"),o(t)):(e.consume(t),c)}function l(n){return 96===n?(e.consume(n),r++,l):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",c(n))}},resolve:function(e){let t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Vt(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Vt(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Vt(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}},partial:!0};function Jt(e,t,n,r,i,a,s,o,c){const l=c||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),h;if(null===t||32===t||41===t||_t(t))return n(t);return e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),m(t)};function h(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(o),h(t)):null===t||60===t||At(t)?n(t):(e.consume(t),92===t?d:p)}function d(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function m(i){return u||null!==i&&41!==i&&!kt(i)?u999||null===h||91===h||93===h&&!o||94===h&&!c&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):93===h?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):At(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(t){return null===t||91===t||93===t||At(t)||c++>999?(e.exit("chunkString"),l(t)):(e.consume(t),o||(o=!bt(t)),92===t?h:u)}function h(t){return 91===t||92===t||93===t?(e.consume(t),c++,u):u(t)}}function Zt(e,t,n,r,i,a){let s;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(i),e.consume(t),e.exit(i),s=40===t?41:t,o;return n(t)};function o(n){return n===s?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),c(n))}function c(t){return t===s?(e.exit(a),o(s)):null===t?n(t):At(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),yt(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(t))}function l(t){return t===s||null===t||At(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?u:l)}function u(t){return t===s||92===t?(e.consume(t),l):l(t)}}function en(e,t){let n;return function r(i){if(At(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r;if(bt(i))return yt(e,r,n?"linePrefix":"lineSuffix")(i);return t(i)}}const tn={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return $t.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return i=pt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):n(t)}function s(t){return kt(t)?en(e,o)(t):o(t)}function o(t){return Jt(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function c(t){return e.attempt(nn,l,l)(t)}function l(t){return bt(t)?yt(e,u,"whitespace")(t):u(t)}function u(a){return null===a||At(a)?(e.exit("definition"),r.parser.defined.push(i),t(a)):n(a)}}},nn={tokenize:function(e,t,n){return function(t){return kt(t)?en(e,r)(t):n(t)};function r(t){return Zt(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return bt(t)?yt(e,a,"whitespace")(t):a(t)}function a(e){return null===e||At(e)?t(e):n(e)}},partial:!0};const rn={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return At(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const an={name:"headingAtx",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||kt(t)?(e.exit("atxHeadingSequence"),a(t)):n(t)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),s(n)):null===n||At(n)?(e.exit("atxHeading"),t(n)):bt(n)?yt(e,a,"whitespace")(n):(e.enter("atxHeadingText"),o(n))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),a(t))}function o(t){return null===t||35===t||kt(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),o)}},resolve:function(e,t){let n,r,i=e.length-2,a=3;"whitespace"===e[a][1].type&&(a+=2);i-2>a&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(a===i-1||i-4>a&&"whitespace"===e[i-2][1].type)&&(i-=a+1===i?2:4);i>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},r={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},at(e,a,i-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e}};const sn=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],on=["pre","script","style","textarea"],cn={name:"htmlFlow",tokenize:function(e,t,n){const r=this;let i,a,s,o,c;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),l}(t)};function l(o){return 33===o?(e.consume(o),u):47===o?(e.consume(o),a=!0,d):63===o?(e.consume(o),i=3,r.interrupt?t:x):dt(o)?(e.consume(o),s=String.fromCharCode(o),m):n(o)}function u(a){return 45===a?(e.consume(a),i=2,h):91===a?(e.consume(a),i=5,o=0,p):dt(a)?(e.consume(a),i=4,r.interrupt?t:x):n(a)}function h(i){return 45===i?(e.consume(i),r.interrupt?t:x):n(i)}function p(i){const a="CDATA[";return i===a.charCodeAt(o++)?(e.consume(i),6===o?r.interrupt?t:C:p):n(i)}function d(t){return dt(t)?(e.consume(t),s=String.fromCharCode(t),m):n(t)}function m(o){if(null===o||47===o||62===o||kt(o)){const c=47===o,l=s.toLowerCase();return c||a||!on.includes(l)?sn.includes(s.toLowerCase())?(i=6,c?(e.consume(o),f):r.interrupt?t(o):C(o)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(o):a?_(o):E(o)):(i=1,r.interrupt?t(o):C(o))}return 45===o||mt(o)?(e.consume(o),s+=String.fromCharCode(o),m):n(o)}function f(i){return 62===i?(e.consume(i),r.interrupt?t:C):n(i)}function _(t){return bt(t)?(e.consume(t),_):S(t)}function E(t){return 47===t?(e.consume(t),S):58===t||95===t||dt(t)?(e.consume(t),T):bt(t)?(e.consume(t),E):S(t)}function T(t){return 45===t||46===t||58===t||95===t||mt(t)?(e.consume(t),T):g(t)}function g(t){return 61===t?(e.consume(t),A):bt(t)?(e.consume(t),g):E(t)}function A(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),c=t,k):bt(t)?(e.consume(t),A):b(t)}function k(t){return t===c?(e.consume(t),c=null,I):null===t||At(t)?n(t):(e.consume(t),k)}function b(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||kt(t)?g(t):(e.consume(t),b)}function I(e){return 47===e||62===e||bt(e)?E(e):n(e)}function S(t){return 62===t?(e.consume(t),N):n(t)}function N(t){return null===t||At(t)?C(t):bt(t)?(e.consume(t),N):n(t)}function C(t){return 45===t&&2===i?(e.consume(t),R):60===t&&1===i?(e.consume(t),L):62===t&&4===i?(e.consume(t),M):63===t&&3===i?(e.consume(t),x):93===t&&5===i?(e.consume(t),P):!At(t)||6!==i&&7!==i?null===t||At(t)?(e.exit("htmlFlowData"),y(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(ln,v,y)(t))}function y(t){return e.check(un,D,v)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),O}function O(t){return null===t||At(t)?y(t):(e.enter("htmlFlowData"),C(t))}function R(t){return 45===t?(e.consume(t),x):C(t)}function L(t){return 47===t?(e.consume(t),s="",w):C(t)}function w(t){if(62===t){const n=s.toLowerCase();return on.includes(n)?(e.consume(t),M):C(t)}return dt(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),w):C(t)}function P(t){return 93===t?(e.consume(t),x):C(t)}function x(t){return 62===t?(e.consume(t),M):45===t&&2===i?(e.consume(t),x):C(t)}function M(t){return null===t||At(t)?(e.exit("htmlFlowData"),v(t)):(e.consume(t),M)}function v(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},ln={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(vt,t,n)}},partial:!0},un={tokenize:function(e,t,n){const r=this;return function(t){if(At(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i;return n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0};const hn={name:"htmlText",tokenize:function(e,t,n){const r=this;let i,a,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),o};function o(t){return 33===t?(e.consume(t),c):47===t?(e.consume(t),A):63===t?(e.consume(t),T):dt(t)?(e.consume(t),I):n(t)}function c(t){return 45===t?(e.consume(t),l):91===t?(e.consume(t),a=0,d):dt(t)?(e.consume(t),E):n(t)}function l(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),h):At(t)?(s=u,w(t)):(e.consume(t),u)}function h(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?L(e):45===e?h(e):u(e)}function d(t){const r="CDATA[";return t===r.charCodeAt(a++)?(e.consume(t),6===a?m:d):n(t)}function m(t){return null===t?n(t):93===t?(e.consume(t),f):At(t)?(s=m,w(t)):(e.consume(t),m)}function f(t){return 93===t?(e.consume(t),_):m(t)}function _(t){return 62===t?L(t):93===t?(e.consume(t),_):m(t)}function E(t){return null===t||62===t?L(t):At(t)?(s=E,w(t)):(e.consume(t),E)}function T(t){return null===t?n(t):63===t?(e.consume(t),g):At(t)?(s=T,w(t)):(e.consume(t),T)}function g(e){return 62===e?L(e):T(e)}function A(t){return dt(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||mt(t)?(e.consume(t),k):b(t)}function b(t){return At(t)?(s=b,w(t)):bt(t)?(e.consume(t),b):L(t)}function I(t){return 45===t||mt(t)?(e.consume(t),I):47===t||62===t||kt(t)?S(t):n(t)}function S(t){return 47===t?(e.consume(t),L):58===t||95===t||dt(t)?(e.consume(t),N):At(t)?(s=S,w(t)):bt(t)?(e.consume(t),S):L(t)}function N(t){return 45===t||46===t||58===t||95===t||mt(t)?(e.consume(t),N):C(t)}function C(t){return 61===t?(e.consume(t),y):At(t)?(s=C,w(t)):bt(t)?(e.consume(t),C):S(t)}function y(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),i=t,D):At(t)?(s=y,w(t)):bt(t)?(e.consume(t),y):(e.consume(t),O)}function D(t){return t===i?(e.consume(t),i=void 0,R):null===t?n(t):At(t)?(s=D,w(t)):(e.consume(t),D)}function O(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||kt(t)?S(t):(e.consume(t),O)}function R(e){return 47===e||62===e||kt(e)?S(e):n(e)}function L(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function w(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return bt(t)?yt(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):x(t)}function x(t){return e.enter("htmlTextData"),s(t)}}};const pn={name:"labelEnd",tokenize:function(e,t,n){const r=this;let i,a,s=r.events.length;for(;s--;)if(("labelImage"===r.events[s][1].type||"labelLink"===r.events[s][1].type)&&!r.events[s][1]._balanced){i=r.events[s][1];break}return function(t){if(!i)return n(t);if(i._inactive)return u(t);return a=r.parser.defined.includes(pt(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),o};function o(t){return 40===t?e.attempt(dn,l,a?l:u)(t):91===t?e.attempt(mn,l,a?c:u)(t):a?l(t):u(t)}function c(t){return e.attempt(fn,l,u)(t)}function l(e){return t(e)}function u(e){return i._balanced=!0,n(e)}},resolveTo:function(e,t){let n,r,i,a,s=e.length,o=0;for(;s--;)if(n=e[s][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=s,"labelLink"!==n.type)){o=2;break}}else"labelEnd"===n.type&&(i=s);const c={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[i][1].end)},u={type:"labelText",start:Object.assign({},e[r+o+2][1].end),end:Object.assign({},e[i-2][1].start)};return a=[["enter",c,t],["enter",l,t]],a=st(a,e.slice(r+1,r+o+3)),a=st(a,[["enter",u,t]]),a=st(a,wt(t.parser.constructs.insideSpan.null,e.slice(r+o+4,i-3),t)),a=st(a,[["exit",u,t],e[i-2],e[i-1],["exit",l,t]]),a=st(a,e.slice(i+1)),a=st(a,[["exit",c,t]]),at(e,r,e.length,a),e},resolveAll:function(e){let t=-1;for(;++t=3&&(null===a||At(a))?(e.exit("thematicBreak"),t(a)):n(a)}function s(t){return t===r?(e.consume(t),i++,s):(e.exit("thematicBreakSequence"),bt(t)?yt(e,a,"whitespace")(t):a(t))}}};const An={name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,s=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:Et(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(gn,n,c)(t):c(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(t)}return n(t)};function o(t){return Et(t)&&++s<10?(e.consume(t),o):(!r.interrupt||s<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),c(t)):n(t)}function c(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(vt,r.interrupt?n:l,e.attempt(kn,h,u))}function l(e){return r.containerState.initialBlankLine=!0,a++,h(e)}function u(t){return bt(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),h):n(t)}function h(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(vt,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,yt(e,t,"listItemIndent",r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!bt(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(bn,t,s)(n))}function s(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,yt(e,e.attempt(An,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},kn={tokenize:function(e,t,n){const r=this;return yt(e,(function(e){const i=r.events[r.events.length-1];return!bt(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},bn={tokenize:function(e,t,n){const r=this;return yt(e,(function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0};const In={name:"setextUnderline",tokenize:function(e,t,n){const r=this;let i;return function(t){let s,o=r.events.length;for(;o--;)if("lineEnding"!==r.events[o][1].type&&"linePrefix"!==r.events[o][1].type&&"content"!==r.events[o][1].type){s="paragraph"===r.events[o][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||s))return e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),a(t)}(t);return n(t)};function a(t){return t===i?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),bt(t)?yt(e,s,"lineSuffix")(t):s(t))}function s(r){return null===r||At(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,i,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),i||"definition"!==e[a][1].type||(i=a);const s={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",s,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[i][1].end)):e[n][1]=s;return e.push(["exit",s,t]),e}};const Sn={tokenize:function(e){const t=this,n=e.attempt(vt,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,yt(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Xt,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Nn={resolveAll:On()},Cn=Dn("string"),yn=Dn("text");function Dn(e){return{tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,a,s);return a;function a(e){return c(e)?i(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),o;t.consume(e)}function o(e){return c(e)?(t.exit("data"),i(e)):(t.consume(e),o)}function c(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i-1){const e=s[0];"string"==typeof e?s[0]=e.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}(s,e)}function p(){const{line:e,column:t,offset:n,_index:i,_bufferIndex:a}=r;return{line:e,column:t,offset:n,_index:i,_bufferIndex:a}}function d(){let e;for(;r._index0){const e=a.tokenStack[a.tokenStack.length-1];(e[1]||Qn).call(a,void 0,e[0])}for(r.position={start:qn(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:qn(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},h=-1;++h1:t}function $n(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Zn(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Zn(t.slice(i),i>0,!1)),a.join("")}function Zn(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}const er={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ct(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);void 0===o?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(r,o);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const l={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Kn(e,t);const i={src:Ct(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){const n={src:Ct(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Kn(e,t);const i={href:Ct(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){const n={href:Ct(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=ye(t.children[1]),s=Ce(t.children[t.children.length-1]);a&&s&&(r.position={start:a,end:s}),i.push(r)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,s=a?a.length:t.children.length;let o=-1;const c=[];for(;++o((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case 0:case-1:return n(s,i);case 1:{const e=n([],i);for(const t of s)e.push(r(t));return e}case 2:{const e=n({},i);for(const[t,n]of s)e[r(t)]=r(n);return e}case 3:return n(new Date(s),i);case 4:{const{source:e,flags:t}=s;return n(new RegExp(e,t),i)}case 5:{const e=n(new Map,i);for(const[t,n]of s)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,i);for(const t of s)e.add(r(t));return e}case 7:{const{name:e,message:t}=s;return n(new nr[e](t),i)}case 8:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new nr[a](s),i)};return r})(new Map,e)(0),ir="",{toString:ar}={},{keys:sr}=Object,or=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=ar.call(e).slice(8,-1);switch(n){case"Array":return[1,ir];case"Object":return[2,ir];case"Date":return[3,ir];case"RegExp":return[4,ir];case"Map":return[5,ir];case"Set":return[6,ir]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},cr=([e,t])=>0===e&&("function"===t||"symbol"===t),lr=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const i=(e,t)=>{const i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[s,o]=or(r);switch(s){case 0:{let t=r;switch(o){case"bigint":s=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);t=null;break;case"undefined":return i([-1],r)}return i([s,t],r)}case 1:{if(o)return i([o,[...r]],r);const e=[],t=i([s,e],r);for(const n of r)e.push(a(n));return t}case 2:{if(o)switch(o){case"BigInt":return i([o,r.toString()],r);case"Boolean":case"Number":case"String":return i([o,r.valueOf()],r)}if(t&&"toJSON"in r)return a(r.toJSON());const n=[],c=i([s,n],r);for(const t of sr(r))!e&&cr(or(r[t]))||n.push([a(t),a(r[t])]);return c}case 3:return i([s,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return i([s,{source:e,flags:t}],r)}case 5:{const t=[],n=i([s,t],r);for(const[i,s]of r)(e||!cr(or(i))&&!cr(or(s)))&&t.push([a(i),a(s)]);return n}case 6:{const t=[],n=i([s,t],r);for(const i of r)!e&&cr(or(i))||t.push(a(i));return n}}const{message:c}=r;return i([s,{name:o,message:c}],r)};return a})(!(t||n),!!t,new Map,r)(e),r},ur="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?rr(lr(e,t)):structuredClone(e):(e,t)=>rr(lr(e,t));function hr(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function pr(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const dr=function(e){if(null==e)return fr;if("function"==typeof e)return mr(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n":"")+")"})}return u;function u(){let l,u,h,p=_r;if((!t||a(i,o,c[c.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Er,e];return null==e?_r:[e]}(n(i,c)),p[0]===Tr))return p;if("children"in i&&i.children){const t=i;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+s,h=c.concat(t);u>-1&&u0&&n.push({type:"text",value:"\n"}),n}function yr(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Dr(e,t){const n=function(e,t){const n=t||br,r=new Map,i=new Map,a=new Map,s={...er,...n.handlers},o={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r0&&h.push({type:"text",value:" "});let e="string"==typeof n?n:n(c,u);"string"==typeof e&&(e={type:"text",value:e}),h.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+l+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(c,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const d=a[a.length-1];if(d&&"element"===d.type&&"p"===d.tagName){const e=d.children[d.children.length-1];e&&"text"===e.type?e.value+=" ":d.children.push({type:"text",value:" "}),d.children.push(...h)}else a.push(...h);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+l},children:e.wrap(a,!0)};e.patch(i,m),o.push(m)}if(0!==o.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...ur(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:"\n"}]}}(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:"\n"},i),a}function Or(e,t){return e&&"run"in e?async function(n,r){const i=Dr(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Dr(n,{file:r,...e||t})}}function Rr(e){if(e)throw e}var Lr,wr;var Pr=function(){if(wr)return Lr;wr=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},a=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),a=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!a)return!1;for(r in n);return void 0===r||e.call(n,r)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},o=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return Lr=function e(){var t,n,r,c,l,u,h=arguments[0],p=1,d=arguments.length,m=!1;for("boolean"==typeof h&&(m=h,h=arguments[1]||{},p=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});pt.length;let o;r&&t.push(i);try{o=e.apply(this,t)}catch(a){if(r&&n)throw a;return i(a)}r||(o&&o.then&&"function"==typeof o.then?o.then(s,i):o instanceof Error?i(o):s(o))}function i(e,...r){n||(n=!0,t(e,...r))}function s(e){i(null,e)}}(o,i)(...s):r(null,...s)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Br={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Fr(e);let n,r=0,i=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let s=-1,o=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else s<0&&(n=!0,s=a+1),o>-1&&(e.codePointAt(a)===t.codePointAt(o--)?o<0&&(i=a):(o=-1,i=s));r===i?i=s:i<0&&(i=e.length);return e.slice(r,i)},dirname:function(e){if(Fr(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Fr(e);let t,n=e.length,r=-1,i=0,a=-1,s=0;for(;n--;){const o=e.codePointAt(n);if(47!==o)r<0&&(t=!0,r=n+1),46===o?a<0?a=n:1!==s&&(s=1):a>-1&&(s=-1);else if(t){i=n+1;break}}if(a<0||r<0||0===s||1===s&&a===r-1&&a===i+1)return"";return e.slice(a,r)},join:function(...e){let t,n=-1;for(;++n2){if(r=i.lastIndexOf("/"),r!==i.length-1){r<0?(i="",a=0):(i=i.slice(0,r),a=i.length-1-i.lastIndexOf("/")),s=c,o=0;continue}}else if(i.length>0){i="",a=0,s=c,o=0;continue}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(s+1,c):i=e.slice(s+1,c),a=c-s-1;s=c,o=0}else 46===n&&o>-1?o++:o=-1}return i}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function Fr(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Hr={cwd:function(){return"/"}};function Ur(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Gr(e){if("string"==typeof e)e=new URL(e);else if(!Ur(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n0){let[r,...a]=t;const s=n[i][1];Mr(s)&&Mr(r)&&(r=xr(!0,s,r)),n[i]=[e,r,...a]}}}}const Kr=(new Xr).freeze();function Jr(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function $r(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Zr(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ei(e){if(!Mr(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function ti(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ni(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Yr(e)}const ri=[],ii={allowDangerousHtml:!0},ai=/^(https?|ircs?|mailto|xmpp)$/i,si=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function oi(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,s=e.disallowedElements,o=e.rehypePlugins||ri,c=e.remarkPlugins||ri,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ii}:ii,u=e.skipHtml,p=e.unwrapDisallowed,d=e.urlTransform||ci,m=Kr().use(Xn).use(c).use(Or,l).use(o),f=new Yr;"string"==typeof r&&(f.value=r);for(const h of si)Object.hasOwn(e,h.from)&&(h.from,h.to&&h.to,h.id);const _=m.parse(f);let E=m.runSync(_,f);return i&&(E={type:"element",tagName:"div",properties:{className:i},children:"root"===E.type?E.children:[E]}),Ar(E,(function(e,r,i){if("raw"===e.type&&i&&"number"==typeof r)return u?i.children.splice(r,1):i.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in $e)if(Object.hasOwn($e,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=$e[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=d(String(n||""),t,e))}}if("element"===e.type){let a=t?!t.includes(e.tagName):!!s&&s.includes(e.tagName);if(!a&&n&&"number"==typeof r&&(a=!n(e,r,i)),a&&i&&"number"==typeof r)return p&&e.children?i.children.splice(r,1,...e.children):i.children.splice(r,1),r}})),Ge(E,{Fragment:h.Fragment,components:a,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0})}function ci(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||ai.test(e.slice(0,t))?e:""}const li=/[#.]/g;const ui=new Set(["button","menu","reset","submit"]),hi={}.hasOwnProperty;function pi(e,t,n){const r=n&&function(e){const t={};let n=-1;for(;++n1?n[e.line-2]:0)+e.column-1;if(r-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(void 0===i){const e=Ti(t,n[r-1]);i=-1===e?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}}}(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case"#documentType":return n={type:"doctype"},Si(e,t,n),n;case"#text":{const r=t;return n={type:"text",value:r.value},Si(e,r,n),n}default:return n=function(e,t){const n=e.schema;e.schema=t.namespaceURI===gi.svg?_e:fe;let r=-1;const i={};for(;++r=55296&&e<=57343}function Wi(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function Qi(e){return e>=64976&&e<=65007||Bi.has(e)}var Xi;!function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"}(Xi||(Xi={}));class Ki{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){const{line:n,col:r,offset:i}=this,a=r+t,s=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:s,endOffset:s}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(function(e){return e>=56320&&e<=57343}(t))return this.pos++,this._addGap(),1024*(e-55296)+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Hi.EOF;return this._err(Xi.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let n=0;n=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Hi.EOF;const n=this.html.charCodeAt(t);return n===Hi.CARRIAGE_RETURN?Hi.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Hi.EOF;let e=this.html.charCodeAt(this.pos);if(e===Hi.CARRIAGE_RETURN)return this.isEol=!0,this.skipNextNewLine=!0,Hi.LINE_FEED;if(e===Hi.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine))return this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance();this.skipNextNewLine=!1,Vi(e)&&(e=this._processSurrogate(e));return null===this.handler.onParseError||e>31&&e<127||e===Hi.LINE_FEED||e===Hi.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){Wi(e)?this._err(Xi.controlCharacterInInputStream):Qi(e)&&this._err(Xi.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}!function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"}(Ji||(Ji={}));const Zi=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((e=>e.charCodeAt(0)))),ea=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e=>e.charCodeAt(0))));var ta;const na=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),ra=null!==(ta=String.fromCodePoint)&&void 0!==ta?ta:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};var ia;!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(ia||(ia={}));var aa,sa,oa,ca,la,ua,ha,pa;function da(e){return e>=ia.ZERO&&e<=ia.NINE}function ma(e){return e>=ia.UPPER_A&&e<=ia.UPPER_F||e>=ia.LOWER_A&&e<=ia.LOWER_F}function fa(e){return e===ia.EQUALS||function(e){return e>=ia.UPPER_A&&e<=ia.UPPER_Z||e>=ia.LOWER_A&&e<=ia.LOWER_Z||da(e)}(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(aa||(aa={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(sa||(sa={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(oa||(oa={}));class _a{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=sa.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=oa.Strict}startEntity(e){this.decodeMode=e,this.state=sa.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case sa.EntityStart:return e.charCodeAt(t)===ia.NUM?(this.state=sa.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=sa.NamedEntity,this.stateNamedEntity(e,t));case sa.NumericStart:return this.stateNumericStart(e,t);case sa.NumericDecimal:return this.stateNumericDecimal(e,t);case sa.NumericHex:return this.stateNumericHex(e,t);case sa.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===ia.LOWER_X?(this.state=sa.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=sa.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const i=n-t;this.result=this.result*Math.pow(r,i)+parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){const n=t;for(;t=55296&&e<=57343||e>1114111?65533:null!==(t=na.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==ia.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],i=(r&aa.VALUE_LENGTH)>>14;for(;t>14,0!==i){if(a===ia.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==oa.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&aa.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~aa.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case sa.NamedEntity:return 0===this.result||this.decodeMode===oa.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case sa.NumericDecimal:return this.emitNumericEntity(0,2);case sa.NumericHex:return this.emitNumericEntity(0,3);case sa.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case sa.EntityStart:return 0}}}function Ea(e){let t="";const n=new _a(e,(e=>t+=ra(e)));return function(e,r){let i=0,a=0;for(;(a=e.indexOf("&",a))>=0;){t+=e.slice(i,a),n.startEntity(r);const s=n.write(e,a+1);if(s<0){i=a+n.end();break}i=a+s,a=0===s?i+1:i}const s=t+e.slice(i);return t="",s}}function Ta(e,t,n,r){const i=(t&aa.BRANCH_LENGTH)>>7,a=t&aa.JUMP_TABLE;if(0===i)return 0!==a&&r===a?n:-1;if(a){const t=r-a;return t<0||t>=i?-1:e[n+t]-1}let s=n,o=s+i-1;for(;s<=o;){const t=s+o>>>1,n=e[t];if(nr))return e[t+i];o=t-1}}return-1}Ea(Zi),Ea(ea),function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"}(ca||(ca={})),function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"}(la||(la={})),function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"}(ua||(ua={})),function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"}(ha||(ha={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"}(pa||(pa={}));const ga=new Map([[ha.A,pa.A],[ha.ADDRESS,pa.ADDRESS],[ha.ANNOTATION_XML,pa.ANNOTATION_XML],[ha.APPLET,pa.APPLET],[ha.AREA,pa.AREA],[ha.ARTICLE,pa.ARTICLE],[ha.ASIDE,pa.ASIDE],[ha.B,pa.B],[ha.BASE,pa.BASE],[ha.BASEFONT,pa.BASEFONT],[ha.BGSOUND,pa.BGSOUND],[ha.BIG,pa.BIG],[ha.BLOCKQUOTE,pa.BLOCKQUOTE],[ha.BODY,pa.BODY],[ha.BR,pa.BR],[ha.BUTTON,pa.BUTTON],[ha.CAPTION,pa.CAPTION],[ha.CENTER,pa.CENTER],[ha.CODE,pa.CODE],[ha.COL,pa.COL],[ha.COLGROUP,pa.COLGROUP],[ha.DD,pa.DD],[ha.DESC,pa.DESC],[ha.DETAILS,pa.DETAILS],[ha.DIALOG,pa.DIALOG],[ha.DIR,pa.DIR],[ha.DIV,pa.DIV],[ha.DL,pa.DL],[ha.DT,pa.DT],[ha.EM,pa.EM],[ha.EMBED,pa.EMBED],[ha.FIELDSET,pa.FIELDSET],[ha.FIGCAPTION,pa.FIGCAPTION],[ha.FIGURE,pa.FIGURE],[ha.FONT,pa.FONT],[ha.FOOTER,pa.FOOTER],[ha.FOREIGN_OBJECT,pa.FOREIGN_OBJECT],[ha.FORM,pa.FORM],[ha.FRAME,pa.FRAME],[ha.FRAMESET,pa.FRAMESET],[ha.H1,pa.H1],[ha.H2,pa.H2],[ha.H3,pa.H3],[ha.H4,pa.H4],[ha.H5,pa.H5],[ha.H6,pa.H6],[ha.HEAD,pa.HEAD],[ha.HEADER,pa.HEADER],[ha.HGROUP,pa.HGROUP],[ha.HR,pa.HR],[ha.HTML,pa.HTML],[ha.I,pa.I],[ha.IMG,pa.IMG],[ha.IMAGE,pa.IMAGE],[ha.INPUT,pa.INPUT],[ha.IFRAME,pa.IFRAME],[ha.KEYGEN,pa.KEYGEN],[ha.LABEL,pa.LABEL],[ha.LI,pa.LI],[ha.LINK,pa.LINK],[ha.LISTING,pa.LISTING],[ha.MAIN,pa.MAIN],[ha.MALIGNMARK,pa.MALIGNMARK],[ha.MARQUEE,pa.MARQUEE],[ha.MATH,pa.MATH],[ha.MENU,pa.MENU],[ha.META,pa.META],[ha.MGLYPH,pa.MGLYPH],[ha.MI,pa.MI],[ha.MO,pa.MO],[ha.MN,pa.MN],[ha.MS,pa.MS],[ha.MTEXT,pa.MTEXT],[ha.NAV,pa.NAV],[ha.NOBR,pa.NOBR],[ha.NOFRAMES,pa.NOFRAMES],[ha.NOEMBED,pa.NOEMBED],[ha.NOSCRIPT,pa.NOSCRIPT],[ha.OBJECT,pa.OBJECT],[ha.OL,pa.OL],[ha.OPTGROUP,pa.OPTGROUP],[ha.OPTION,pa.OPTION],[ha.P,pa.P],[ha.PARAM,pa.PARAM],[ha.PLAINTEXT,pa.PLAINTEXT],[ha.PRE,pa.PRE],[ha.RB,pa.RB],[ha.RP,pa.RP],[ha.RT,pa.RT],[ha.RTC,pa.RTC],[ha.RUBY,pa.RUBY],[ha.S,pa.S],[ha.SCRIPT,pa.SCRIPT],[ha.SEARCH,pa.SEARCH],[ha.SECTION,pa.SECTION],[ha.SELECT,pa.SELECT],[ha.SOURCE,pa.SOURCE],[ha.SMALL,pa.SMALL],[ha.SPAN,pa.SPAN],[ha.STRIKE,pa.STRIKE],[ha.STRONG,pa.STRONG],[ha.STYLE,pa.STYLE],[ha.SUB,pa.SUB],[ha.SUMMARY,pa.SUMMARY],[ha.SUP,pa.SUP],[ha.TABLE,pa.TABLE],[ha.TBODY,pa.TBODY],[ha.TEMPLATE,pa.TEMPLATE],[ha.TEXTAREA,pa.TEXTAREA],[ha.TFOOT,pa.TFOOT],[ha.TD,pa.TD],[ha.TH,pa.TH],[ha.THEAD,pa.THEAD],[ha.TITLE,pa.TITLE],[ha.TR,pa.TR],[ha.TRACK,pa.TRACK],[ha.TT,pa.TT],[ha.U,pa.U],[ha.UL,pa.UL],[ha.SVG,pa.SVG],[ha.VAR,pa.VAR],[ha.WBR,pa.WBR],[ha.XMP,pa.XMP]]);function Aa(e){var t;return null!==(t=ga.get(e))&&void 0!==t?t:pa.UNKNOWN}const ka=pa,ba={[ca.HTML]:new Set([ka.ADDRESS,ka.APPLET,ka.AREA,ka.ARTICLE,ka.ASIDE,ka.BASE,ka.BASEFONT,ka.BGSOUND,ka.BLOCKQUOTE,ka.BODY,ka.BR,ka.BUTTON,ka.CAPTION,ka.CENTER,ka.COL,ka.COLGROUP,ka.DD,ka.DETAILS,ka.DIR,ka.DIV,ka.DL,ka.DT,ka.EMBED,ka.FIELDSET,ka.FIGCAPTION,ka.FIGURE,ka.FOOTER,ka.FORM,ka.FRAME,ka.FRAMESET,ka.H1,ka.H2,ka.H3,ka.H4,ka.H5,ka.H6,ka.HEAD,ka.HEADER,ka.HGROUP,ka.HR,ka.HTML,ka.IFRAME,ka.IMG,ka.INPUT,ka.LI,ka.LINK,ka.LISTING,ka.MAIN,ka.MARQUEE,ka.MENU,ka.META,ka.NAV,ka.NOEMBED,ka.NOFRAMES,ka.NOSCRIPT,ka.OBJECT,ka.OL,ka.P,ka.PARAM,ka.PLAINTEXT,ka.PRE,ka.SCRIPT,ka.SECTION,ka.SELECT,ka.SOURCE,ka.STYLE,ka.SUMMARY,ka.TABLE,ka.TBODY,ka.TD,ka.TEMPLATE,ka.TEXTAREA,ka.TFOOT,ka.TH,ka.THEAD,ka.TITLE,ka.TR,ka.TRACK,ka.UL,ka.WBR,ka.XMP]),[ca.MATHML]:new Set([ka.MI,ka.MO,ka.MN,ka.MS,ka.MTEXT,ka.ANNOTATION_XML]),[ca.SVG]:new Set([ka.TITLE,ka.FOREIGN_OBJECT,ka.DESC]),[ca.XLINK]:new Set,[ca.XML]:new Set,[ca.XMLNS]:new Set},Ia=new Set([ka.H1,ka.H2,ka.H3,ka.H4,ka.H5,ka.H6]);var Sa;new Set([ha.STYLE,ha.SCRIPT,ha.XMP,ha.IFRAME,ha.NOEMBED,ha.NOFRAMES,ha.PLAINTEXT]),function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"}(Sa||(Sa={}));const Na={DATA:Sa.DATA,RCDATA:Sa.RCDATA,RAWTEXT:Sa.RAWTEXT,SCRIPT_DATA:Sa.SCRIPT_DATA,PLAINTEXT:Sa.PLAINTEXT,CDATA_SECTION:Sa.CDATA_SECTION};function Ca(e){return e>=Hi.LATIN_CAPITAL_A&&e<=Hi.LATIN_CAPITAL_Z}function ya(e){return function(e){return e>=Hi.LATIN_SMALL_A&&e<=Hi.LATIN_SMALL_Z}(e)||Ca(e)}function Da(e){return ya(e)||function(e){return e>=Hi.DIGIT_0&&e<=Hi.DIGIT_9}(e)}function Oa(e){return e+32}function Ra(e){return e===Hi.SPACE||e===Hi.LINE_FEED||e===Hi.TABULATION||e===Hi.FORM_FEED}function La(e){return Ra(e)||e===Hi.SOLIDUS||e===Hi.GREATER_THAN_SIGN}class wa{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=Sa.DATA,this.returnState=Sa.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Ki(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new _a(Zi,((e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)}),t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Xi.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(Xi.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{const t=function(e){return e===Hi.NULL?Xi.nullCharacterReference:e>1114111?Xi.characterReferenceOutsideUnicodeRange:Vi(e)?Xi.surrogateCharacterReference:Qi(e)?Xi.noncharacterCharacterReference:Wi(e)||e===Hi.CARRIAGE_RETURN?Xi.controlCharacterReference:null}(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;null===(r=(n=this.handler).onParseError)||void 0===r||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t0&&this._err(Xi.endTagWithAttributes),e.selfClosing&&this._err(Xi.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case Ji.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case Ji.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case Ji.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:Ji.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){const t=Ra(e)?Ji.WHITESPACE_CHARACTER:e===Hi.NULL?Ji.NULL_CHARACTER:Ji.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Ji.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Sa.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?oa.Attribute:oa.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Sa.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Sa.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Sa.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Sa.DATA:this._stateData(e);break;case Sa.RCDATA:this._stateRcdata(e);break;case Sa.RAWTEXT:this._stateRawtext(e);break;case Sa.SCRIPT_DATA:this._stateScriptData(e);break;case Sa.PLAINTEXT:this._statePlaintext(e);break;case Sa.TAG_OPEN:this._stateTagOpen(e);break;case Sa.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Sa.TAG_NAME:this._stateTagName(e);break;case Sa.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Sa.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Sa.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Sa.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Sa.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Sa.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Sa.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Sa.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Sa.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Sa.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Sa.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Sa.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Sa.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Sa.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Sa.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Sa.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Sa.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Sa.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Sa.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Sa.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Sa.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Sa.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Sa.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Sa.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Sa.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Sa.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Sa.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Sa.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Sa.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Sa.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Sa.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Sa.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Sa.BOGUS_COMMENT:this._stateBogusComment(e);break;case Sa.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Sa.COMMENT_START:this._stateCommentStart(e);break;case Sa.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Sa.COMMENT:this._stateComment(e);break;case Sa.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Sa.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Sa.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Sa.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Sa.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Sa.COMMENT_END:this._stateCommentEnd(e);break;case Sa.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Sa.DOCTYPE:this._stateDoctype(e);break;case Sa.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Sa.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Sa.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Sa.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Sa.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Sa.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Sa.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Sa.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Sa.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Sa.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Sa.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Sa.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Sa.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Sa.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Sa.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Sa.CDATA_SECTION:this._stateCdataSection(e);break;case Sa.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Sa.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Sa.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Sa.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case Hi.LESS_THAN_SIGN:this.state=Sa.TAG_OPEN;break;case Hi.AMPERSAND:this._startCharacterReference();break;case Hi.NULL:this._err(Xi.unexpectedNullCharacter),this._emitCodePoint(e);break;case Hi.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Hi.AMPERSAND:this._startCharacterReference();break;case Hi.LESS_THAN_SIGN:this.state=Sa.RCDATA_LESS_THAN_SIGN;break;case Hi.NULL:this._err(Xi.unexpectedNullCharacter),this._emitChars(Fi);break;case Hi.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Hi.LESS_THAN_SIGN:this.state=Sa.RAWTEXT_LESS_THAN_SIGN;break;case Hi.NULL:this._err(Xi.unexpectedNullCharacter),this._emitChars(Fi);break;case Hi.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Hi.LESS_THAN_SIGN:this.state=Sa.SCRIPT_DATA_LESS_THAN_SIGN;break;case Hi.NULL:this._err(Xi.unexpectedNullCharacter),this._emitChars(Fi);break;case Hi.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Hi.NULL:this._err(Xi.unexpectedNullCharacter),this._emitChars(Fi);break;case Hi.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(ya(e))this._createStartTagToken(),this.state=Sa.TAG_NAME,this._stateTagName(e);else switch(e){case Hi.EXCLAMATION_MARK:this.state=Sa.MARKUP_DECLARATION_OPEN;break;case Hi.SOLIDUS:this.state=Sa.END_TAG_OPEN;break;case Hi.QUESTION_MARK:this._err(Xi.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Sa.BOGUS_COMMENT,this._stateBogusComment(e);break;case Hi.EOF:this._err(Xi.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(Xi.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=Sa.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(ya(e))this._createEndTagToken(),this.state=Sa.TAG_NAME,this._stateTagName(e);else switch(e){case Hi.GREATER_THAN_SIGN:this._err(Xi.missingEndTagName),this.state=Sa.DATA;break;case Hi.EOF:this._err(Xi.eofBeforeTagName),this._emitChars("");break;case Hi.NULL:this._err(Xi.unexpectedNullCharacter),this.state=Sa.SCRIPT_DATA_ESCAPED,this._emitChars(Fi);break;case Hi.EOF:this._err(Xi.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Sa.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Hi.SOLIDUS?this.state=Sa.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ya(e)?(this._emitChars("<"),this.state=Sa.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=Sa.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){ya(e)?(this.state=Sa.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break;case Hi.NULL:this._err(Xi.unexpectedNullCharacter),this.state=Sa.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Fi);break;case Hi.EOF:this._err(Xi.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Sa.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Hi.SOLIDUS?(this.state=Sa.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=Sa.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Yi,!1)&&La(this.preprocessor.peek(Yi.length))){this._emitCodePoint(e);for(let e=0;e0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==ca.HTML);this.shortenToLength(t<0?0:t)}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(za,ca.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Ga,ca.HTML)}clearBackToTableRowContext(){this.clearBackTo(Ua,ca.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===pa.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===pa.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case ca.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case ca.SVG:if(Ha.has(r))return!1;break;case ca.MATHML:if(Fa.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Ma)}hasInListItemScope(e){return this.hasInDynamicScope(e,va)}hasInButtonScope(e){return this.hasInDynamicScope(e,Ba)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case ca.HTML:if(Ia.has(t))return!0;if(Ma.has(t))return!1;break;case ca.SVG:if(Ha.has(t))return!1;break;case ca.MATHML:if(Fa.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ca.HTML)switch(this.tagIDs[t]){case e:return!0;case pa.TABLE:case pa.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===ca.HTML)switch(this.tagIDs[e]){case pa.TBODY:case pa.THEAD:case pa.TFOOT:return!0;case pa.TABLE:case pa.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ca.HTML)switch(this.tagIDs[t]){case e:return!0;case pa.OPTION:case pa.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;Pa.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;xa.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&xa.has(this.currentTagId);)this.pop()}}var qa;!function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"}(qa||(qa={}));const Va={type:qa.Marker};class Wa{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let s=0;s[e.name,e.value])));let i=0;for(let a=0;ar.get(e.name)===e.value))&&(i+=1,i>=3&&this.entries.splice(e.idx,1))}}insertMarker(){this.entries.unshift(Va)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:qa.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:qa.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);t>=0&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(Va);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){const t=this.entries.find((t=>t.type===qa.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===qa.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===qa.Element&&t.element===e))}}const Qa={createDocument:()=>({nodeName:"#document",mode:ua.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),createTextNode:e=>({nodeName:"#text",value:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(e,t,n,r){const i=e.childNodes.find((e=>"#documentType"===e.nodeName));if(i)i.name=t,i.publicId=n,i.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Qa.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Qa.isTextNode(n))return void(n.value+=t)}Qa.appendChild(e,Qa.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Qa.isTextNode(r)?r.value+=t:Qa.insertBefore(e,Qa.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map((e=>e.name)));for(let r=0;re.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Xa="html",Ka=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Ja=[...Ka,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],$a=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Za=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],es=[...Za,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ts(e,t){return t.some((t=>e.startsWith(t)))}const ns="text/html",rs="application/xhtml+xml",is=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((e=>[e.toLowerCase(),e]))),as=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ca.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ca.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ca.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ca.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ca.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ca.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ca.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ca.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ca.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ca.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ca.XMLNS}]]),ss=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((e=>[e.toLowerCase(),e]))),os=new Set([pa.B,pa.BIG,pa.BLOCKQUOTE,pa.BODY,pa.BR,pa.CENTER,pa.CODE,pa.DD,pa.DIV,pa.DL,pa.DT,pa.EM,pa.EMBED,pa.H1,pa.H2,pa.H3,pa.H4,pa.H5,pa.H6,pa.HEAD,pa.HR,pa.I,pa.IMG,pa.LI,pa.LISTING,pa.MENU,pa.META,pa.NOBR,pa.OL,pa.P,pa.PRE,pa.RUBY,pa.S,pa.SMALL,pa.SPAN,pa.STRONG,pa.STRIKE,pa.SUB,pa.SUP,pa.TABLE,pa.TT,pa.U,pa.UL,pa.VAR]);function cs(e){for(let t=0;t0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(r=(n=this.treeAdapter).onItemPop)||void 0===r||r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}_setContextModes(e,t){const n=e===this.document||this.treeAdapter.getNamespaceURI(e)===ca.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,ca.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=ps.TEXT}switchToPlaintextParsing(){this.insertionMode=ps.TEXT,this.originalInsertionMode=ps.IN_BODY,this.tokenizer.state=Na.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===ha.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===ca.HTML)switch(this.fragmentContextID){case pa.TITLE:case pa.TEXTAREA:this.tokenizer.state=Na.RCDATA;break;case pa.STYLE:case pa.XMP:case pa.IFRAME:case pa.NOEMBED:case pa.NOFRAMES:case pa.NOSCRIPT:this.tokenizer.state=Na.RAWTEXT;break;case pa.SCRIPT:this.tokenizer.state=Na.SCRIPT_DATA;break;case pa.PLAINTEXT:this.tokenizer.state=Na.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,ca.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,ca.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(ha.HTML,ca.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,pa.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:n}=this._findFosterParentingLocation()),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),i=n?r.lastIndexOf(n):r.length,a=r[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===Ji.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):({current:t,currentTagId:n}=this.openElements),(e.tagID!==pa.SVG||this.treeAdapter.getTagName(t)!==ha.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==ca.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===pa.MGLYPH||e.tagID===pa.MALIGNMARK)&&!this._isIntegrationPoint(n,t,ca.HTML))}_processToken(e){switch(e.type){case Ji.CHARACTER:this.onCharacter(e);break;case Ji.NULL_CHARACTER:this.onNullCharacter(e);break;case Ji.COMMENT:this.onComment(e);break;case Ji.DOCTYPE:this.onDoctype(e);break;case Ji.START_TAG:this._processStartTag(e);break;case Ji.END_TAG:this.onEndTag(e);break;case Ji.EOF:this.onEof(e);break;case Ji.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return hs(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex((e=>e.type===qa.Marker||this.openElements.contains(e.element)));for(let n=t<0?e-1:t-1;n>=0;n--){const e=this.activeFormattingElements.entries[n];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=ps.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(pa.P),this.openElements.popUntilTagNamePopped(pa.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case pa.TR:return void(this.insertionMode=ps.IN_ROW);case pa.TBODY:case pa.THEAD:case pa.TFOOT:return void(this.insertionMode=ps.IN_TABLE_BODY);case pa.CAPTION:return void(this.insertionMode=ps.IN_CAPTION);case pa.COLGROUP:return void(this.insertionMode=ps.IN_COLUMN_GROUP);case pa.TABLE:return void(this.insertionMode=ps.IN_TABLE);case pa.BODY:return void(this.insertionMode=ps.IN_BODY);case pa.FRAMESET:return void(this.insertionMode=ps.IN_FRAMESET);case pa.SELECT:return void this._resetInsertionModeForSelect(e);case pa.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case pa.HTML:return void(this.insertionMode=this.headElement?ps.AFTER_HEAD:ps.BEFORE_HEAD);case pa.TD:case pa.TH:if(e>0)return void(this.insertionMode=ps.IN_CELL);break;case pa.HEAD:if(e>0)return void(this.insertionMode=ps.IN_HEAD)}this.insertionMode=ps.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===pa.TEMPLATE)break;if(e===pa.TABLE)return void(this.insertionMode=ps.IN_SELECT_IN_TABLE)}this.insertionMode=ps.IN_SELECT}_isElementCausesFosterParenting(e){return ms.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case pa.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===ca.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case pa.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return ba[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e);else switch(this.insertionMode){case ps.INITIAL:Cs(this,e);break;case ps.BEFORE_HTML:ys(this,e);break;case ps.BEFORE_HEAD:Ds(this,e);break;case ps.IN_HEAD:Ls(this,e);break;case ps.IN_HEAD_NO_SCRIPT:ws(this,e);break;case ps.AFTER_HEAD:Ps(this,e);break;case ps.IN_BODY:case ps.IN_CAPTION:case ps.IN_CELL:case ps.IN_TEMPLATE:vs(this,e);break;case ps.TEXT:case ps.IN_SELECT:case ps.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case ps.IN_TABLE:case ps.IN_TABLE_BODY:case ps.IN_ROW:qs(this,e);break;case ps.IN_TABLE_TEXT:Ks(this,e);break;case ps.IN_COLUMN_GROUP:eo(this,e);break;case ps.AFTER_BODY:lo(this,e);break;case ps.AFTER_AFTER_BODY:uo(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=Fi,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case ps.INITIAL:Cs(this,e);break;case ps.BEFORE_HTML:ys(this,e);break;case ps.BEFORE_HEAD:Ds(this,e);break;case ps.IN_HEAD:Ls(this,e);break;case ps.IN_HEAD_NO_SCRIPT:ws(this,e);break;case ps.AFTER_HEAD:Ps(this,e);break;case ps.TEXT:this._insertCharacters(e);break;case ps.IN_TABLE:case ps.IN_TABLE_BODY:case ps.IN_ROW:qs(this,e);break;case ps.IN_COLUMN_GROUP:eo(this,e);break;case ps.AFTER_BODY:lo(this,e);break;case ps.AFTER_AFTER_BODY:uo(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)Ss(this,e);else switch(this.insertionMode){case ps.INITIAL:case ps.BEFORE_HTML:case ps.BEFORE_HEAD:case ps.IN_HEAD:case ps.IN_HEAD_NO_SCRIPT:case ps.AFTER_HEAD:case ps.IN_BODY:case ps.IN_TABLE:case ps.IN_CAPTION:case ps.IN_COLUMN_GROUP:case ps.IN_TABLE_BODY:case ps.IN_ROW:case ps.IN_CELL:case ps.IN_SELECT:case ps.IN_SELECT_IN_TABLE:case ps.IN_TEMPLATE:case ps.IN_FRAMESET:case ps.AFTER_FRAMESET:Ss(this,e);break;case ps.IN_TABLE_TEXT:Js(this,e);break;case ps.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case ps.AFTER_AFTER_BODY:case ps.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case ps.INITIAL:!function(e,t){e._setDocumentType(t);const n=t.forceQuirks?ua.QUIRKS:function(e){if(e.name!==Xa)return ua.QUIRKS;const{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return ua.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),$a.has(n))return ua.QUIRKS;let e=null===t?Ja:Ka;if(ts(n,e))return ua.QUIRKS;if(e=null===t?Za:es,ts(n,e))return ua.LIMITED_QUIRKS}return ua.NO_QUIRKS}(t);(function(e){return e.name===Xa&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)})(t)||e._err(t,Xi.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=ps.BEFORE_HTML}(this,e);break;case ps.BEFORE_HEAD:case ps.IN_HEAD:case ps.IN_HEAD_NO_SCRIPT:case ps.AFTER_HEAD:this._err(e,Xi.misplacedDoctype);break;case ps.IN_TABLE_TEXT:Js(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,Xi.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(function(e){const t=e.tagID,n=t===pa.FONT&&e.attrs.some((({name:e})=>e===la.COLOR||e===la.SIZE||e===la.FACE));return n||os.has(t)}(t))ho(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ca.MATHML?cs(t):r===ca.SVG&&(!function(e){const t=ss.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=Aa(e.tagName))}(t),ls(t)),us(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case ps.INITIAL:Cs(this,e);break;case ps.BEFORE_HTML:!function(e,t){t.tagID===pa.HTML?(e._insertElement(t,ca.HTML),e.insertionMode=ps.BEFORE_HEAD):ys(e,t)}(this,e);break;case ps.BEFORE_HEAD:!function(e,t){switch(t.tagID){case pa.HTML:Gs(e,t);break;case pa.HEAD:e._insertElement(t,ca.HTML),e.headElement=e.openElements.current,e.insertionMode=ps.IN_HEAD;break;default:Ds(e,t)}}(this,e);break;case ps.IN_HEAD:Os(this,e);break;case ps.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case pa.HTML:Gs(e,t);break;case pa.BASEFONT:case pa.BGSOUND:case pa.HEAD:case pa.LINK:case pa.META:case pa.NOFRAMES:case pa.STYLE:Os(e,t);break;case pa.NOSCRIPT:e._err(t,Xi.nestedNoscriptInHead);break;default:ws(e,t)}}(this,e);break;case ps.AFTER_HEAD:!function(e,t){switch(t.tagID){case pa.HTML:Gs(e,t);break;case pa.BODY:e._insertElement(t,ca.HTML),e.framesetOk=!1,e.insertionMode=ps.IN_BODY;break;case pa.FRAMESET:e._insertElement(t,ca.HTML),e.insertionMode=ps.IN_FRAMESET;break;case pa.BASE:case pa.BASEFONT:case pa.BGSOUND:case pa.LINK:case pa.META:case pa.NOFRAMES:case pa.SCRIPT:case pa.STYLE:case pa.TEMPLATE:case pa.TITLE:e._err(t,Xi.abandonedHeadElementChild),e.openElements.push(e.headElement,pa.HEAD),Os(e,t),e.openElements.remove(e.headElement);break;case pa.HEAD:e._err(t,Xi.misplacedStartTagForHeadElement);break;default:Ps(e,t)}}(this,e);break;case ps.IN_BODY:Gs(this,e);break;case ps.IN_TABLE:Vs(this,e);break;case ps.IN_TABLE_TEXT:Js(this,e);break;case ps.IN_CAPTION:!function(e,t){const n=t.tagID;$s.has(n)?e.openElements.hasInTableScope(pa.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(pa.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=ps.IN_TABLE,Vs(e,t)):Gs(e,t)}(this,e);break;case ps.IN_COLUMN_GROUP:Zs(this,e);break;case ps.IN_TABLE_BODY:to(this,e);break;case ps.IN_ROW:ro(this,e);break;case ps.IN_CELL:!function(e,t){const n=t.tagID;$s.has(n)?(e.openElements.hasInTableScope(pa.TD)||e.openElements.hasInTableScope(pa.TH))&&(e._closeTableCell(),ro(e,t)):Gs(e,t)}(this,e);break;case ps.IN_SELECT:ao(this,e);break;case ps.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===pa.CAPTION||n===pa.TABLE||n===pa.TBODY||n===pa.TFOOT||n===pa.THEAD||n===pa.TR||n===pa.TD||n===pa.TH?(e.openElements.popUntilTagNamePopped(pa.SELECT),e._resetInsertionMode(),e._processStartTag(t)):ao(e,t)}(this,e);break;case ps.IN_TEMPLATE:!function(e,t){switch(t.tagID){case pa.BASE:case pa.BASEFONT:case pa.BGSOUND:case pa.LINK:case pa.META:case pa.NOFRAMES:case pa.SCRIPT:case pa.STYLE:case pa.TEMPLATE:case pa.TITLE:Os(e,t);break;case pa.CAPTION:case pa.COLGROUP:case pa.TBODY:case pa.TFOOT:case pa.THEAD:e.tmplInsertionModeStack[0]=ps.IN_TABLE,e.insertionMode=ps.IN_TABLE,Vs(e,t);break;case pa.COL:e.tmplInsertionModeStack[0]=ps.IN_COLUMN_GROUP,e.insertionMode=ps.IN_COLUMN_GROUP,Zs(e,t);break;case pa.TR:e.tmplInsertionModeStack[0]=ps.IN_TABLE_BODY,e.insertionMode=ps.IN_TABLE_BODY,to(e,t);break;case pa.TD:case pa.TH:e.tmplInsertionModeStack[0]=ps.IN_ROW,e.insertionMode=ps.IN_ROW,ro(e,t);break;default:e.tmplInsertionModeStack[0]=ps.IN_BODY,e.insertionMode=ps.IN_BODY,Gs(e,t)}}(this,e);break;case ps.AFTER_BODY:!function(e,t){t.tagID===pa.HTML?Gs(e,t):lo(e,t)}(this,e);break;case ps.IN_FRAMESET:!function(e,t){switch(t.tagID){case pa.HTML:Gs(e,t);break;case pa.FRAMESET:e._insertElement(t,ca.HTML);break;case pa.FRAME:e._appendElement(t,ca.HTML),t.ackSelfClosing=!0;break;case pa.NOFRAMES:Os(e,t)}}(this,e);break;case ps.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case pa.HTML:Gs(e,t);break;case pa.NOFRAMES:Os(e,t)}}(this,e);break;case ps.AFTER_AFTER_BODY:!function(e,t){t.tagID===pa.HTML?Gs(e,t):uo(e,t)}(this,e);break;case ps.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case pa.HTML:Gs(e,t);break;case pa.NOFRAMES:Os(e,t)}}(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===pa.P||t.tagID===pa.BR)return ho(e),void e._endTagOutsideForeignContent(t);for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===ca.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case ps.INITIAL:Cs(this,e);break;case ps.BEFORE_HTML:!function(e,t){const n=t.tagID;n!==pa.HTML&&n!==pa.HEAD&&n!==pa.BODY&&n!==pa.BR||ys(e,t)}(this,e);break;case ps.BEFORE_HEAD:!function(e,t){const n=t.tagID;n===pa.HEAD||n===pa.BODY||n===pa.HTML||n===pa.BR?Ds(e,t):e._err(t,Xi.endTagWithoutMatchingOpenElement)}(this,e);break;case ps.IN_HEAD:!function(e,t){switch(t.tagID){case pa.HEAD:e.openElements.pop(),e.insertionMode=ps.AFTER_HEAD;break;case pa.BODY:case pa.BR:case pa.HTML:Ls(e,t);break;case pa.TEMPLATE:Rs(e,t);break;default:e._err(t,Xi.endTagWithoutMatchingOpenElement)}}(this,e);break;case ps.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case pa.NOSCRIPT:e.openElements.pop(),e.insertionMode=ps.IN_HEAD;break;case pa.BR:ws(e,t);break;default:e._err(t,Xi.endTagWithoutMatchingOpenElement)}}(this,e);break;case ps.AFTER_HEAD:!function(e,t){switch(t.tagID){case pa.BODY:case pa.HTML:case pa.BR:Ps(e,t);break;case pa.TEMPLATE:Rs(e,t);break;default:e._err(t,Xi.endTagWithoutMatchingOpenElement)}}(this,e);break;case ps.IN_BODY:Ys(this,e);break;case ps.TEXT:!function(e,t){var n;t.tagID===pa.SCRIPT&&(null===(n=e.scriptHandler)||void 0===n||n.call(e,e.openElements.current));e.openElements.pop(),e.insertionMode=e.originalInsertionMode}(this,e);break;case ps.IN_TABLE:Ws(this,e);break;case ps.IN_TABLE_TEXT:Js(this,e);break;case ps.IN_CAPTION:!function(e,t){const n=t.tagID;switch(n){case pa.CAPTION:case pa.TABLE:e.openElements.hasInTableScope(pa.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(pa.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=ps.IN_TABLE,n===pa.TABLE&&Ws(e,t));break;case pa.BODY:case pa.COL:case pa.COLGROUP:case pa.HTML:case pa.TBODY:case pa.TD:case pa.TFOOT:case pa.TH:case pa.THEAD:case pa.TR:break;default:Ys(e,t)}}(this,e);break;case ps.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case pa.COLGROUP:e.openElements.currentTagId===pa.COLGROUP&&(e.openElements.pop(),e.insertionMode=ps.IN_TABLE);break;case pa.TEMPLATE:Rs(e,t);break;case pa.COL:break;default:eo(e,t)}}(this,e);break;case ps.IN_TABLE_BODY:no(this,e);break;case ps.IN_ROW:io(this,e);break;case ps.IN_CELL:!function(e,t){const n=t.tagID;switch(n){case pa.TD:case pa.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=ps.IN_ROW);break;case pa.TABLE:case pa.TBODY:case pa.TFOOT:case pa.THEAD:case pa.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),io(e,t));break;case pa.BODY:case pa.CAPTION:case pa.COL:case pa.COLGROUP:case pa.HTML:break;default:Ys(e,t)}}(this,e);break;case ps.IN_SELECT:so(this,e);break;case ps.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===pa.CAPTION||n===pa.TABLE||n===pa.TBODY||n===pa.TFOOT||n===pa.THEAD||n===pa.TR||n===pa.TD||n===pa.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(pa.SELECT),e._resetInsertionMode(),e.onEndTag(t)):so(e,t)}(this,e);break;case ps.IN_TEMPLATE:!function(e,t){t.tagID===pa.TEMPLATE&&Rs(e,t)}(this,e);break;case ps.AFTER_BODY:co(this,e);break;case ps.IN_FRAMESET:!function(e,t){t.tagID!==pa.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===pa.FRAMESET||(e.insertionMode=ps.AFTER_FRAMESET))}(this,e);break;case ps.AFTER_FRAMESET:!function(e,t){t.tagID===pa.HTML&&(e.insertionMode=ps.AFTER_AFTER_FRAMESET)}(this,e);break;case ps.AFTER_AFTER_BODY:uo(this,e)}}onEof(e){switch(this.insertionMode){case ps.INITIAL:Cs(this,e);break;case ps.BEFORE_HTML:ys(this,e);break;case ps.BEFORE_HEAD:Ds(this,e);break;case ps.IN_HEAD:Ls(this,e);break;case ps.IN_HEAD_NO_SCRIPT:ws(this,e);break;case ps.AFTER_HEAD:Ps(this,e);break;case ps.IN_BODY:case ps.IN_TABLE:case ps.IN_CAPTION:case ps.IN_COLUMN_GROUP:case ps.IN_TABLE_BODY:case ps.IN_ROW:case ps.IN_CELL:case ps.IN_SELECT:case ps.IN_SELECT_IN_TABLE:js(this,e);break;case ps.TEXT:!function(e,t){e._err(t,Xi.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case ps.IN_TABLE_TEXT:Js(this,e);break;case ps.IN_TEMPLATE:oo(this,e);break;case ps.AFTER_BODY:case ps.IN_FRAMESET:case ps.AFTER_FRAMESET:case ps.AFTER_AFTER_BODY:case ps.AFTER_AFTER_FRAMESET:Ns(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===Hi.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case ps.IN_HEAD:case ps.IN_HEAD_NO_SCRIPT:case ps.AFTER_HEAD:case ps.TEXT:case ps.IN_COLUMN_GROUP:case ps.IN_SELECT:case ps.IN_SELECT_IN_TABLE:case ps.IN_FRAMESET:case ps.AFTER_FRAMESET:this._insertCharacters(e);break;case ps.IN_BODY:case ps.IN_CAPTION:case ps.IN_CELL:case ps.IN_TEMPLATE:case ps.AFTER_BODY:case ps.AFTER_AFTER_BODY:case ps.AFTER_AFTER_FRAMESET:Ms(this,e);break;case ps.IN_TABLE:case ps.IN_TABLE_BODY:case ps.IN_ROW:qs(this,e);break;case ps.IN_TABLE_TEXT:Xs(this,e)}}}function Es(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):zs(e,t),n}function Ts(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function gs(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const n=e.activeFormattingElements.getElementEntry(s),o=n&&a>=3;!n||o?(o&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(s)):(s=As(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function As(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function ks(e,t,n){const r=Aa(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);r===pa.TEMPLATE&&i===ca.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function bs(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Is(e,t){for(let n=0;n<8;n++){const n=Es(e,t);if(!n)break;const r=Ts(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;const i=gs(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&ks(e,a,i),bs(e,r,n)}}function Ss(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Ns(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Cs(e,t){e._err(t,Xi.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ua.QUIRKS),e.insertionMode=ps.BEFORE_HTML,e._processToken(t)}function ys(e,t){e._insertFakeRootElement(),e.insertionMode=ps.BEFORE_HEAD,e._processToken(t)}function Ds(e,t){e._insertFakeElement(ha.HEAD,pa.HEAD),e.headElement=e.openElements.current,e.insertionMode=ps.IN_HEAD,e._processToken(t)}function Os(e,t){switch(t.tagID){case pa.HTML:Gs(e,t);break;case pa.BASE:case pa.BASEFONT:case pa.BGSOUND:case pa.LINK:case pa.META:e._appendElement(t,ca.HTML),t.ackSelfClosing=!0;break;case pa.TITLE:e._switchToTextParsing(t,Na.RCDATA);break;case pa.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Na.RAWTEXT):(e._insertElement(t,ca.HTML),e.insertionMode=ps.IN_HEAD_NO_SCRIPT);break;case pa.NOFRAMES:case pa.STYLE:e._switchToTextParsing(t,Na.RAWTEXT);break;case pa.SCRIPT:e._switchToTextParsing(t,Na.SCRIPT_DATA);break;case pa.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=ps.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(ps.IN_TEMPLATE);break;case pa.HEAD:e._err(t,Xi.misplacedStartTagForHeadElement);break;default:Ls(e,t)}}function Rs(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==pa.TEMPLATE&&e._err(t,Xi.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(pa.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Xi.endTagWithoutMatchingOpenElement)}function Ls(e,t){e.openElements.pop(),e.insertionMode=ps.AFTER_HEAD,e._processToken(t)}function ws(e,t){const n=t.type===Ji.EOF?Xi.openElementsLeftAfterEof:Xi.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=ps.IN_HEAD,e._processToken(t)}function Ps(e,t){e._insertFakeElement(ha.BODY,pa.BODY),e.insertionMode=ps.IN_BODY,xs(e,t)}function xs(e,t){switch(t.type){case Ji.CHARACTER:vs(e,t);break;case Ji.WHITESPACE_CHARACTER:Ms(e,t);break;case Ji.COMMENT:Ss(e,t);break;case Ji.START_TAG:Gs(e,t);break;case Ji.END_TAG:Ys(e,t);break;case Ji.EOF:js(e,t)}}function Ms(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function vs(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Bs(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ca.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Fs(e){const t=$i(e,la.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function Hs(e,t){e._switchToTextParsing(t,Na.RAWTEXT)}function Us(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ca.HTML)}function Gs(e,t){switch(t.tagID){case pa.I:case pa.S:case pa.B:case pa.U:case pa.EM:case pa.TT:case pa.BIG:case pa.CODE:case pa.FONT:case pa.SMALL:case pa.STRIKE:case pa.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ca.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case pa.A:!function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(ha.A);n&&(Is(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ca.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case pa.H1:case pa.H2:case pa.H3:case pa.H4:case pa.H5:case pa.H6:!function(e,t){e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),Ia.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ca.HTML)}(e,t);break;case pa.P:case pa.DL:case pa.OL:case pa.UL:case pa.DIV:case pa.DIR:case pa.NAV:case pa.MAIN:case pa.MENU:case pa.ASIDE:case pa.CENTER:case pa.FIGURE:case pa.FOOTER:case pa.HEADER:case pa.HGROUP:case pa.DIALOG:case pa.DETAILS:case pa.ADDRESS:case pa.ARTICLE:case pa.SEARCH:case pa.SECTION:case pa.SUMMARY:case pa.FIELDSET:case pa.BLOCKQUOTE:case pa.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._insertElement(t,ca.HTML)}(e,t);break;case pa.LI:case pa.DD:case pa.DT:!function(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const t=e.openElements.tagIDs[r];if(n===pa.LI&&t===pa.LI||(n===pa.DD||n===pa.DT)&&(t===pa.DD||t===pa.DT)){e.openElements.generateImpliedEndTagsWithExclusion(t),e.openElements.popUntilTagNamePopped(t);break}if(t!==pa.ADDRESS&&t!==pa.DIV&&t!==pa.P&&e._isSpecialElement(e.openElements.items[r],t))break}e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._insertElement(t,ca.HTML)}(e,t);break;case pa.BR:case pa.IMG:case pa.WBR:case pa.AREA:case pa.EMBED:case pa.KEYGEN:Bs(e,t);break;case pa.HR:!function(e,t){e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._appendElement(t,ca.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case pa.RB:case pa.RTC:!function(e,t){e.openElements.hasInScope(pa.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ca.HTML)}(e,t);break;case pa.RT:case pa.RP:!function(e,t){e.openElements.hasInScope(pa.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(pa.RTC),e._insertElement(t,ca.HTML)}(e,t);break;case pa.PRE:case pa.LISTING:!function(e,t){e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._insertElement(t,ca.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case pa.XMP:!function(e,t){e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Na.RAWTEXT)}(e,t);break;case pa.SVG:!function(e,t){e._reconstructActiveFormattingElements(),ls(t),us(t),t.selfClosing?e._appendElement(t,ca.SVG):e._insertElement(t,ca.SVG),t.ackSelfClosing=!0}(e,t);break;case pa.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case pa.BASE:case pa.LINK:case pa.META:case pa.STYLE:case pa.TITLE:case pa.SCRIPT:case pa.BGSOUND:case pa.BASEFONT:case pa.TEMPLATE:Os(e,t);break;case pa.BODY:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t);break;case pa.FORM:!function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._insertElement(t,ca.HTML),n||(e.formElement=e.openElements.current))}(e,t);break;case pa.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(pa.NOBR)&&(Is(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ca.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case pa.MATH:!function(e,t){e._reconstructActiveFormattingElements(),cs(t),us(t),t.selfClosing?e._appendElement(t,ca.MATHML):e._insertElement(t,ca.MATHML),t.ackSelfClosing=!0}(e,t);break;case pa.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==ua.QUIRKS&&e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._insertElement(t,ca.HTML),e.framesetOk=!1,e.insertionMode=ps.IN_TABLE}(e,t);break;case pa.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ca.HTML),Fs(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case pa.PARAM:case pa.TRACK:case pa.SOURCE:!function(e,t){e._appendElement(t,ca.HTML),t.ackSelfClosing=!0}(e,t);break;case pa.IMAGE:!function(e,t){t.tagName=ha.IMG,t.tagID=pa.IMG,Bs(e,t)}(e,t);break;case pa.BUTTON:!function(e,t){e.openElements.hasInScope(pa.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(pa.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ca.HTML),e.framesetOk=!1}(e,t);break;case pa.APPLET:case pa.OBJECT:case pa.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ca.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case pa.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Na.RAWTEXT)}(e,t);break;case pa.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ca.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===ps.IN_TABLE||e.insertionMode===ps.IN_CAPTION||e.insertionMode===ps.IN_TABLE_BODY||e.insertionMode===ps.IN_ROW||e.insertionMode===ps.IN_CELL?ps.IN_SELECT_IN_TABLE:ps.IN_SELECT}(e,t);break;case pa.OPTION:case pa.OPTGROUP:!function(e,t){e.openElements.currentTagId===pa.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ca.HTML)}(e,t);break;case pa.NOEMBED:case pa.NOFRAMES:Hs(e,t);break;case pa.FRAMESET:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ca.HTML),e.insertionMode=ps.IN_FRAMESET)}(e,t);break;case pa.TEXTAREA:!function(e,t){e._insertElement(t,ca.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Na.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=ps.TEXT}(e,t);break;case pa.NOSCRIPT:e.options.scriptingEnabled?Hs(e,t):Us(e,t);break;case pa.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._insertElement(t,ca.HTML),e.tokenizer.state=Na.PLAINTEXT}(e,t);break;case pa.COL:case pa.TH:case pa.TD:case pa.TR:case pa.HEAD:case pa.FRAME:case pa.TBODY:case pa.TFOOT:case pa.THEAD:case pa.CAPTION:case pa.COLGROUP:break;default:Us(e,t)}}function zs(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const t=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==pa.UNKNOWN||e.treeAdapter.getTagName(t)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(t,a))break}}function Ys(e,t){switch(t.tagID){case pa.A:case pa.B:case pa.I:case pa.S:case pa.U:case pa.EM:case pa.TT:case pa.BIG:case pa.CODE:case pa.FONT:case pa.NOBR:case pa.SMALL:case pa.STRIKE:case pa.STRONG:Is(e,t);break;case pa.P:!function(e){e.openElements.hasInButtonScope(pa.P)||e._insertFakeElement(ha.P,pa.P),e._closePElement()}(e);break;case pa.DL:case pa.UL:case pa.OL:case pa.DIR:case pa.DIV:case pa.NAV:case pa.PRE:case pa.MAIN:case pa.MENU:case pa.ASIDE:case pa.BUTTON:case pa.CENTER:case pa.FIGURE:case pa.FOOTER:case pa.HEADER:case pa.HGROUP:case pa.DIALOG:case pa.ADDRESS:case pa.ARTICLE:case pa.DETAILS:case pa.SEARCH:case pa.SECTION:case pa.SUMMARY:case pa.LISTING:case pa.FIELDSET:case pa.BLOCKQUOTE:case pa.FIGCAPTION:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case pa.LI:!function(e){e.openElements.hasInListItemScope(pa.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(pa.LI),e.openElements.popUntilTagNamePopped(pa.LI))}(e);break;case pa.DD:case pa.DT:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case pa.H1:case pa.H2:case pa.H3:case pa.H4:case pa.H5:case pa.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case pa.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(ha.BR,pa.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case pa.BODY:!function(e,t){if(e.openElements.hasInScope(pa.BODY)&&(e.insertionMode=ps.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}(e,t);break;case pa.HTML:!function(e,t){e.openElements.hasInScope(pa.BODY)&&(e.insertionMode=ps.AFTER_BODY,co(e,t))}(e,t);break;case pa.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(pa.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(pa.FORM):n&&e.openElements.remove(n))}(e);break;case pa.APPLET:case pa.OBJECT:case pa.MARQUEE:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}(e,t);break;case pa.TEMPLATE:Rs(e,t);break;default:zs(e,t)}}function js(e,t){e.tmplInsertionModeStack.length>0?oo(e,t):Ns(e,t)}function qs(e,t){if(ms.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=ps.IN_TABLE_TEXT,t.type){case Ji.CHARACTER:Ks(e,t);break;case Ji.WHITESPACE_CHARACTER:Xs(e,t)}else Qs(e,t)}function Vs(e,t){switch(t.tagID){case pa.TD:case pa.TH:case pa.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ha.TBODY,pa.TBODY),e.insertionMode=ps.IN_TABLE_BODY,to(e,t)}(e,t);break;case pa.STYLE:case pa.SCRIPT:case pa.TEMPLATE:Os(e,t);break;case pa.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ha.COLGROUP,pa.COLGROUP),e.insertionMode=ps.IN_COLUMN_GROUP,Zs(e,t)}(e,t);break;case pa.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,ca.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case pa.TABLE:!function(e,t){e.openElements.hasInTableScope(pa.TABLE)&&(e.openElements.popUntilTagNamePopped(pa.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case pa.TBODY:case pa.TFOOT:case pa.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ca.HTML),e.insertionMode=ps.IN_TABLE_BODY}(e,t);break;case pa.INPUT:!function(e,t){Fs(t)?e._appendElement(t,ca.HTML):Qs(e,t),t.ackSelfClosing=!0}(e,t);break;case pa.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ca.HTML),e.insertionMode=ps.IN_CAPTION}(e,t);break;case pa.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ca.HTML),e.insertionMode=ps.IN_COLUMN_GROUP}(e,t);break;default:Qs(e,t)}}function Ws(e,t){switch(t.tagID){case pa.TABLE:e.openElements.hasInTableScope(pa.TABLE)&&(e.openElements.popUntilTagNamePopped(pa.TABLE),e._resetInsertionMode());break;case pa.TEMPLATE:Rs(e,t);break;case pa.BODY:case pa.CAPTION:case pa.COL:case pa.COLGROUP:case pa.HTML:case pa.TBODY:case pa.TD:case pa.TFOOT:case pa.TH:case pa.THEAD:case pa.TR:break;default:Qs(e,t)}}function Qs(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,xs(e,t),e.fosterParentingEnabled=n}function Xs(e,t){e.pendingCharacterTokens.push(t)}function Ks(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Js(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0&&e.openElements.currentTagId===pa.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===pa.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===pa.OPTGROUP&&e.openElements.pop();break;case pa.OPTION:e.openElements.currentTagId===pa.OPTION&&e.openElements.pop();break;case pa.SELECT:e.openElements.hasInSelectScope(pa.SELECT)&&(e.openElements.popUntilTagNamePopped(pa.SELECT),e._resetInsertionMode());break;case pa.TEMPLATE:Rs(e,t)}}function oo(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(pa.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ns(e,t)}function co(e,t){var n;if(t.tagID===pa.HTML){if(e.fragmentContext||(e.insertionMode=ps.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===pa.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(null===(n=e.treeAdapter.getNodeSourceCodeLocation(r))||void 0===n?void 0:n.endTag)&&e._setEndLocation(r,t)}}else lo(e,t)}function lo(e,t){e.insertionMode=ps.IN_BODY,xs(e,t)}function uo(e,t){e.insertionMode=ps.IN_BODY,xs(e,t)}function ho(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ca.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}new Set([ha.AREA,ha.BASE,ha.BASEFONT,ha.BGSOUND,ha.BR,ha.COL,ha.EMBED,ha.FRAME,ha.HR,ha.IMG,ha.INPUT,ha.KEYGEN,ha.LINK,ha.META,ha.PARAM,ha.SOURCE,ha.TRACK,ha.WBR]);const po=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),mo={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function fo(e,t){const n=function(e){const t="root"===e.type?e.children[0]:e;return Boolean(t&&("doctype"===t.type||"element"===t.type&&"html"===t.tagName.toLowerCase()))}(e),r=Oi("type",{handlers:{root:Eo,element:To,text:go,comment:bo,doctype:Ao,raw:Io},unknown:So}),i={parser:n?new _s(mo):_s.getFragmentParser(void 0,mo),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),No(i,ye());const a=function(e,t){const n=t||{};return bi({file:n.file||void 0,location:!1,schema:"svg"===n.space?_e:fe,verbose:n.verbose||!1},e)}(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&Ar(a,"comment",(function(e,t,n){const r=e;if(r.value.stitch&&n&&void 0!==t){return n.children[t]=r.value.stitch,t}})),"root"===a.type&&1===a.children.length&&a.children[0].type===e.type?a.children[0]:a}function _o(e,t){let n=-1;if(e)for(;++n4&&(t.parser.tokenizer.state=0);const n={type:Ji.CHARACTER,chars:e.value,location:yo(e)};No(t,ye(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ao(e,t){const n={type:Ji.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:yo(e)};No(t,ye(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ko(e,t){t.stitches=!0;const n=function(e){return ur("children"in e?{...e,children:[]}:e)}(e);if("children"in e&&"children"in n){const r=fo({type:"root",children:e.children},t.options);n.children=r.children}bo({type:"comment",value:{stitch:n}},t)}function bo(e,t){const n=e.value,r={type:Ji.COMMENT,data:n,location:yo(e)};No(t,ye(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Io(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Co(t,ye(e)),t.parser.tokenizer.write(e.value,!1),t.parser.tokenizer._runParsingLoop(),72===t.parser.tokenizer.state||78===t.parser.tokenizer.state){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function So(e,t){const n=e;if(!t.options.passThrough||!t.options.passThrough.includes(n.type)){let e="";throw po.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+e)}ko(n,t)}function No(e,t){Co(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Na.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Co(e,t){if(t&&void 0!==t.offset){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=1-t.column,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function yo(e){const t=ye(e)||{line:void 0,column:void 0,offset:void 0},n=Ce(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Do(e){return function(t,n){return fo(t,{...e,file:n})}}const Oo={100:"💯",1234:"🔢",grinning:"😀",smiley:"😃",smile:"😄",grin:"😁",laughing:"😆",satisfied:"😆",sweat_smile:"😅",rofl:"🤣",joy:"😂",slightly_smiling_face:"🙂",upside_down_face:"🙃",melting_face:"🫠",wink:"😉",blush:"😊",innocent:"😇",smiling_face_with_three_hearts:"🥰",heart_eyes:"😍",star_struck:"🤩",kissing_heart:"😘",kissing:"😗",relaxed:"☺️",kissing_closed_eyes:"😚",kissing_smiling_eyes:"😙",smiling_face_with_tear:"🥲",yum:"😋",stuck_out_tongue:"😛",stuck_out_tongue_winking_eye:"😜",zany_face:"🤪",stuck_out_tongue_closed_eyes:"😝",money_mouth_face:"🤑",hugs:"🤗",hand_over_mouth:"🤭",face_with_open_eyes_and_hand_over_mouth:"🫢",face_with_peeking_eye:"🫣",shushing_face:"🤫",thinking:"🤔",saluting_face:"🫡",zipper_mouth_face:"🤐",raised_eyebrow:"🤨",neutral_face:"😐",expressionless:"😑",no_mouth:"😶",dotted_line_face:"🫥",face_in_clouds:"😶‍🌫️",smirk:"😏",unamused:"😒",roll_eyes:"🙄",grimacing:"😬",face_exhaling:"😮‍💨",lying_face:"🤥",shaking_face:"🫨",relieved:"😌",pensive:"😔",sleepy:"😪",drooling_face:"🤤",sleeping:"😴",mask:"😷",face_with_thermometer:"🤒",face_with_head_bandage:"🤕",nauseated_face:"🤢",vomiting_face:"🤮",sneezing_face:"🤧",hot_face:"🥵",cold_face:"🥶",woozy_face:"🥴",dizzy_face:"😵",face_with_spiral_eyes:"😵‍💫",exploding_head:"🤯",cowboy_hat_face:"🤠",partying_face:"🥳",disguised_face:"🥸",sunglasses:"😎",nerd_face:"🤓",monocle_face:"🧐",confused:"😕",face_with_diagonal_mouth:"🫤",worried:"😟",slightly_frowning_face:"🙁",frowning_face:"☹️",open_mouth:"😮",hushed:"😯",astonished:"😲",flushed:"😳",pleading_face:"🥺",face_holding_back_tears:"🥹",frowning:"😦",anguished:"😧",fearful:"😨",cold_sweat:"😰",disappointed_relieved:"😥",cry:"😢",sob:"😭",scream:"😱",confounded:"😖",persevere:"😣",disappointed:"😞",sweat:"😓",weary:"😩",tired_face:"😫",yawning_face:"🥱",triumph:"😤",rage:"😡",pout:"😡",angry:"😠",cursing_face:"🤬",smiling_imp:"😈",imp:"👿",skull:"💀",skull_and_crossbones:"☠️",hankey:"💩",poop:"💩",shit:"💩",clown_face:"🤡",japanese_ogre:"👹",japanese_goblin:"👺",ghost:"👻",alien:"👽",space_invader:"👾",robot:"🤖",smiley_cat:"😺",smile_cat:"😸",joy_cat:"😹",heart_eyes_cat:"😻",smirk_cat:"😼",kissing_cat:"😽",scream_cat:"🙀",crying_cat_face:"😿",pouting_cat:"😾",see_no_evil:"🙈",hear_no_evil:"🙉",speak_no_evil:"🙊",love_letter:"💌",cupid:"💘",gift_heart:"💝",sparkling_heart:"💖",heartpulse:"💗",heartbeat:"💓",revolving_hearts:"💞",two_hearts:"💕",heart_decoration:"💟",heavy_heart_exclamation:"❣️",broken_heart:"💔",heart_on_fire:"❤️‍🔥",mending_heart:"❤️‍🩹",heart:"❤️",pink_heart:"🩷",orange_heart:"🧡",yellow_heart:"💛",green_heart:"💚",blue_heart:"💙",light_blue_heart:"🩵",purple_heart:"💜",brown_heart:"🤎",black_heart:"🖤",grey_heart:"🩶",white_heart:"🤍",kiss:"💋",anger:"💢",boom:"💥",collision:"💥",dizzy:"💫",sweat_drops:"💦",dash:"💨",hole:"🕳️",speech_balloon:"💬",eye_speech_bubble:"👁️‍🗨️",left_speech_bubble:"🗨️",right_anger_bubble:"🗯️",thought_balloon:"💭",zzz:"💤",wave:"👋",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐️",hand:"✋",raised_hand:"✋",vulcan_salute:"🖖",rightwards_hand:"🫱",leftwards_hand:"🫲",palm_down_hand:"🫳",palm_up_hand:"🫴",leftwards_pushing_hand:"🫷",rightwards_pushing_hand:"🫸",ok_hand:"👌",pinched_fingers:"🤌",pinching_hand:"🤏",v:"✌️",crossed_fingers:"🤞",hand_with_index_finger_and_thumb_crossed:"🫰",love_you_gesture:"🤟",metal:"🤘",call_me_hand:"🤙",point_left:"👈",point_right:"👉",point_up_2:"👆",middle_finger:"🖕",fu:"🖕",point_down:"👇",point_up:"☝️",index_pointing_at_the_viewer:"🫵","+1":"👍",thumbsup:"👍","-1":"👎",thumbsdown:"👎",fist_raised:"✊",fist:"✊",fist_oncoming:"👊",facepunch:"👊",punch:"👊",fist_left:"🤛",fist_right:"🤜",clap:"👏",raised_hands:"🙌",heart_hands:"🫶",open_hands:"👐",palms_up_together:"🤲",handshake:"🤝",pray:"🙏",writing_hand:"✍️",nail_care:"💅",selfie:"🤳",muscle:"💪",mechanical_arm:"🦾",mechanical_leg:"🦿",leg:"🦵",foot:"🦶",ear:"👂",ear_with_hearing_aid:"🦻",nose:"👃",brain:"🧠",anatomical_heart:"🫀",lungs:"🫁",tooth:"🦷",bone:"🦴",eyes:"👀",eye:"👁️",tongue:"👅",lips:"👄",biting_lip:"🫦",baby:"👶",child:"🧒",boy:"👦",girl:"👧",adult:"🧑",blond_haired_person:"👱",man:"👨",bearded_person:"🧔",man_beard:"🧔‍♂️",woman_beard:"🧔‍♀️",red_haired_man:"👨‍🦰",curly_haired_man:"👨‍🦱",white_haired_man:"👨‍🦳",bald_man:"👨‍🦲",woman:"👩",red_haired_woman:"👩‍🦰",person_red_hair:"🧑‍🦰",curly_haired_woman:"👩‍🦱",person_curly_hair:"🧑‍🦱",white_haired_woman:"👩‍🦳",person_white_hair:"🧑‍🦳",bald_woman:"👩‍🦲",person_bald:"🧑‍🦲",blond_haired_woman:"👱‍♀️",blonde_woman:"👱‍♀️",blond_haired_man:"👱‍♂️",older_adult:"🧓",older_man:"👴",older_woman:"👵",frowning_person:"🙍",frowning_man:"🙍‍♂️",frowning_woman:"🙍‍♀️",pouting_face:"🙎",pouting_man:"🙎‍♂️",pouting_woman:"🙎‍♀️",no_good:"🙅",no_good_man:"🙅‍♂️",ng_man:"🙅‍♂️",no_good_woman:"🙅‍♀️",ng_woman:"🙅‍♀️",ok_person:"🙆",ok_man:"🙆‍♂️",ok_woman:"🙆‍♀️",tipping_hand_person:"💁",information_desk_person:"💁",tipping_hand_man:"💁‍♂️",sassy_man:"💁‍♂️",tipping_hand_woman:"💁‍♀️",sassy_woman:"💁‍♀️",raising_hand:"🙋",raising_hand_man:"🙋‍♂️",raising_hand_woman:"🙋‍♀️",deaf_person:"🧏",deaf_man:"🧏‍♂️",deaf_woman:"🧏‍♀️",bow:"🙇",bowing_man:"🙇‍♂️",bowing_woman:"🙇‍♀️",facepalm:"🤦",man_facepalming:"🤦‍♂️",woman_facepalming:"🤦‍♀️",shrug:"🤷",man_shrugging:"🤷‍♂️",woman_shrugging:"🤷‍♀️",health_worker:"🧑‍⚕️",man_health_worker:"👨‍⚕️",woman_health_worker:"👩‍⚕️",student:"🧑‍🎓",man_student:"👨‍🎓",woman_student:"👩‍🎓",teacher:"🧑‍🏫",man_teacher:"👨‍🏫",woman_teacher:"👩‍🏫",judge:"🧑‍⚖️",man_judge:"👨‍⚖️",woman_judge:"👩‍⚖️",farmer:"🧑‍🌾",man_farmer:"👨‍🌾",woman_farmer:"👩‍🌾",cook:"🧑‍🍳",man_cook:"👨‍🍳",woman_cook:"👩‍🍳",mechanic:"🧑‍🔧",man_mechanic:"👨‍🔧",woman_mechanic:"👩‍🔧",factory_worker:"🧑‍🏭",man_factory_worker:"👨‍🏭",woman_factory_worker:"👩‍🏭",office_worker:"🧑‍💼",man_office_worker:"👨‍💼",woman_office_worker:"👩‍💼",scientist:"🧑‍🔬",man_scientist:"👨‍🔬",woman_scientist:"👩‍🔬",technologist:"🧑‍💻",man_technologist:"👨‍💻",woman_technologist:"👩‍💻",singer:"🧑‍🎤",man_singer:"👨‍🎤",woman_singer:"👩‍🎤",artist:"🧑‍🎨",man_artist:"👨‍🎨",woman_artist:"👩‍🎨",pilot:"🧑‍✈️",man_pilot:"👨‍✈️",woman_pilot:"👩‍✈️",astronaut:"🧑‍🚀",man_astronaut:"👨‍🚀",woman_astronaut:"👩‍🚀",firefighter:"🧑‍🚒",man_firefighter:"👨‍🚒",woman_firefighter:"👩‍🚒",police_officer:"👮",cop:"👮",policeman:"👮‍♂️",policewoman:"👮‍♀️",detective:"🕵️",male_detective:"🕵️‍♂️",female_detective:"🕵️‍♀️",guard:"💂",guardsman:"💂‍♂️",guardswoman:"💂‍♀️",ninja:"🥷",construction_worker:"👷",construction_worker_man:"👷‍♂️",construction_worker_woman:"👷‍♀️",person_with_crown:"🫅",prince:"🤴",princess:"👸",person_with_turban:"👳",man_with_turban:"👳‍♂️",woman_with_turban:"👳‍♀️",man_with_gua_pi_mao:"👲",woman_with_headscarf:"🧕",person_in_tuxedo:"🤵",man_in_tuxedo:"🤵‍♂️",woman_in_tuxedo:"🤵‍♀️",person_with_veil:"👰",man_with_veil:"👰‍♂️",woman_with_veil:"👰‍♀️",bride_with_veil:"👰‍♀️",pregnant_woman:"🤰",pregnant_man:"🫃",pregnant_person:"🫄",breast_feeding:"🤱",woman_feeding_baby:"👩‍🍼",man_feeding_baby:"👨‍🍼",person_feeding_baby:"🧑‍🍼",angel:"👼",santa:"🎅",mrs_claus:"🤶",mx_claus:"🧑‍🎄",superhero:"🦸",superhero_man:"🦸‍♂️",superhero_woman:"🦸‍♀️",supervillain:"🦹",supervillain_man:"🦹‍♂️",supervillain_woman:"🦹‍♀️",mage:"🧙",mage_man:"🧙‍♂️",mage_woman:"🧙‍♀️",fairy:"🧚",fairy_man:"🧚‍♂️",fairy_woman:"🧚‍♀️",vampire:"🧛",vampire_man:"🧛‍♂️",vampire_woman:"🧛‍♀️",merperson:"🧜",merman:"🧜‍♂️",mermaid:"🧜‍♀️",elf:"🧝",elf_man:"🧝‍♂️",elf_woman:"🧝‍♀️",genie:"🧞",genie_man:"🧞‍♂️",genie_woman:"🧞‍♀️",zombie:"🧟",zombie_man:"🧟‍♂️",zombie_woman:"🧟‍♀️",troll:"🧌",massage:"💆",massage_man:"💆‍♂️",massage_woman:"💆‍♀️",haircut:"💇",haircut_man:"💇‍♂️",haircut_woman:"💇‍♀️",walking:"🚶",walking_man:"🚶‍♂️",walking_woman:"🚶‍♀️",standing_person:"🧍",standing_man:"🧍‍♂️",standing_woman:"🧍‍♀️",kneeling_person:"🧎",kneeling_man:"🧎‍♂️",kneeling_woman:"🧎‍♀️",person_with_probing_cane:"🧑‍🦯",man_with_probing_cane:"👨‍🦯",woman_with_probing_cane:"👩‍🦯",person_in_motorized_wheelchair:"🧑‍🦼",man_in_motorized_wheelchair:"👨‍🦼",woman_in_motorized_wheelchair:"👩‍🦼",person_in_manual_wheelchair:"🧑‍🦽",man_in_manual_wheelchair:"👨‍🦽",woman_in_manual_wheelchair:"👩‍🦽",runner:"🏃",running:"🏃",running_man:"🏃‍♂️",running_woman:"🏃‍♀️",woman_dancing:"💃",dancer:"💃",man_dancing:"🕺",business_suit_levitating:"🕴️",dancers:"👯",dancing_men:"👯‍♂️",dancing_women:"👯‍♀️",sauna_person:"🧖",sauna_man:"🧖‍♂️",sauna_woman:"🧖‍♀️",climbing:"🧗",climbing_man:"🧗‍♂️",climbing_woman:"🧗‍♀️",person_fencing:"🤺",horse_racing:"🏇",skier:"⛷️",snowboarder:"🏂",golfing:"🏌️",golfing_man:"🏌️‍♂️",golfing_woman:"🏌️‍♀️",surfer:"🏄",surfing_man:"🏄‍♂️",surfing_woman:"🏄‍♀️",rowboat:"🚣",rowing_man:"🚣‍♂️",rowing_woman:"🚣‍♀️",swimmer:"🏊",swimming_man:"🏊‍♂️",swimming_woman:"🏊‍♀️",bouncing_ball_person:"⛹️",bouncing_ball_man:"⛹️‍♂️",basketball_man:"⛹️‍♂️",bouncing_ball_woman:"⛹️‍♀️",basketball_woman:"⛹️‍♀️",weight_lifting:"🏋️",weight_lifting_man:"🏋️‍♂️",weight_lifting_woman:"🏋️‍♀️",bicyclist:"🚴",biking_man:"🚴‍♂️",biking_woman:"🚴‍♀️",mountain_bicyclist:"🚵",mountain_biking_man:"🚵‍♂️",mountain_biking_woman:"🚵‍♀️",cartwheeling:"🤸",man_cartwheeling:"🤸‍♂️",woman_cartwheeling:"🤸‍♀️",wrestling:"🤼",men_wrestling:"🤼‍♂️",women_wrestling:"🤼‍♀️",water_polo:"🤽",man_playing_water_polo:"🤽‍♂️",woman_playing_water_polo:"🤽‍♀️",handball_person:"🤾",man_playing_handball:"🤾‍♂️",woman_playing_handball:"🤾‍♀️",juggling_person:"🤹",man_juggling:"🤹‍♂️",woman_juggling:"🤹‍♀️",lotus_position:"🧘",lotus_position_man:"🧘‍♂️",lotus_position_woman:"🧘‍♀️",bath:"🛀",sleeping_bed:"🛌",people_holding_hands:"🧑‍🤝‍🧑",two_women_holding_hands:"👭",couple:"👫",two_men_holding_hands:"👬",couplekiss:"💏",couplekiss_man_woman:"👩‍❤️‍💋‍👨",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",couple_with_heart:"💑",couple_with_heart_woman_man:"👩‍❤️‍👨",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",family:"👪",family_man_woman_boy:"👨‍👩‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",speaking_head:"🗣️",bust_in_silhouette:"👤",busts_in_silhouette:"👥",people_hugging:"🫂",footprints:"👣",monkey_face:"🐵",monkey:"🐒",gorilla:"🦍",orangutan:"🦧",dog:"🐶",dog2:"🐕",guide_dog:"🦮",service_dog:"🐕‍🦺",poodle:"🐩",wolf:"🐺",fox_face:"🦊",raccoon:"🦝",cat:"🐱",cat2:"🐈",black_cat:"🐈‍⬛",lion:"🦁",tiger:"🐯",tiger2:"🐅",leopard:"🐆",horse:"🐴",moose:"🫎",donkey:"🫏",racehorse:"🐎",unicorn:"🦄",zebra:"🦓",deer:"🦌",bison:"🦬",cow:"🐮",ox:"🐂",water_buffalo:"🐃",cow2:"🐄",pig:"🐷",pig2:"🐖",boar:"🐗",pig_nose:"🐽",ram:"🐏",sheep:"🐑",goat:"🐐",dromedary_camel:"🐪",camel:"🐫",llama:"🦙",giraffe:"🦒",elephant:"🐘",mammoth:"🦣",rhinoceros:"🦏",hippopotamus:"🦛",mouse:"🐭",mouse2:"🐁",rat:"🐀",hamster:"🐹",rabbit:"🐰",rabbit2:"🐇",chipmunk:"🐿️",beaver:"🦫",hedgehog:"🦔",bat:"🦇",bear:"🐻",polar_bear:"🐻‍❄️",koala:"🐨",panda_face:"🐼",sloth:"🦥",otter:"🦦",skunk:"🦨",kangaroo:"🦘",badger:"🦡",feet:"🐾",paw_prints:"🐾",turkey:"🦃",chicken:"🐔",rooster:"🐓",hatching_chick:"🐣",baby_chick:"🐤",hatched_chick:"🐥",bird:"🐦",penguin:"🐧",dove:"🕊️",eagle:"🦅",duck:"🦆",swan:"🦢",owl:"🦉",dodo:"🦤",feather:"🪶",flamingo:"🦩",peacock:"🦚",parrot:"🦜",wing:"🪽",black_bird:"🐦‍⬛",goose:"🪿",frog:"🐸",crocodile:"🐊",turtle:"🐢",lizard:"🦎",snake:"🐍",dragon_face:"🐲",dragon:"🐉",sauropod:"🦕","t-rex":"🦖",whale:"🐳",whale2:"🐋",dolphin:"🐬",flipper:"🐬",seal:"🦭",fish:"🐟",tropical_fish:"🐠",blowfish:"🐡",shark:"🦈",octopus:"🐙",shell:"🐚",coral:"🪸",jellyfish:"🪼",snail:"🐌",butterfly:"🦋",bug:"🐛",ant:"🐜",bee:"🐝",honeybee:"🐝",beetle:"🪲",lady_beetle:"🐞",cricket:"🦗",cockroach:"🪳",spider:"🕷️",spider_web:"🕸️",scorpion:"🦂",mosquito:"🦟",fly:"🪰",worm:"🪱",microbe:"🦠",bouquet:"💐",cherry_blossom:"🌸",white_flower:"💮",lotus:"🪷",rosette:"🏵️",rose:"🌹",wilted_flower:"🥀",hibiscus:"🌺",sunflower:"🌻",blossom:"🌼",tulip:"🌷",hyacinth:"🪻",seedling:"🌱",potted_plant:"🪴",evergreen_tree:"🌲",deciduous_tree:"🌳",palm_tree:"🌴",cactus:"🌵",ear_of_rice:"🌾",herb:"🌿",shamrock:"☘️",four_leaf_clover:"🍀",maple_leaf:"🍁",fallen_leaf:"🍂",leaves:"🍃",empty_nest:"🪹",nest_with_eggs:"🪺",mushroom:"🍄",grapes:"🍇",melon:"🍈",watermelon:"🍉",tangerine:"🍊",orange:"🍊",mandarin:"🍊",lemon:"🍋",banana:"🍌",pineapple:"🍍",mango:"🥭",apple:"🍎",green_apple:"🍏",pear:"🍐",peach:"🍑",cherries:"🍒",strawberry:"🍓",blueberries:"🫐",kiwi_fruit:"🥝",tomato:"🍅",olive:"🫒",coconut:"🥥",avocado:"🥑",eggplant:"🍆",potato:"🥔",carrot:"🥕",corn:"🌽",hot_pepper:"🌶️",bell_pepper:"🫑",cucumber:"🥒",leafy_green:"🥬",broccoli:"🥦",garlic:"🧄",onion:"🧅",peanuts:"🥜",beans:"🫘",chestnut:"🌰",ginger_root:"🫚",pea_pod:"🫛",bread:"🍞",croissant:"🥐",baguette_bread:"🥖",flatbread:"🫓",pretzel:"🥨",bagel:"🥯",pancakes:"🥞",waffle:"🧇",cheese:"🧀",meat_on_bone:"🍖",poultry_leg:"🍗",cut_of_meat:"🥩",bacon:"🥓",hamburger:"🍔",fries:"🍟",pizza:"🍕",hotdog:"🌭",sandwich:"🥪",taco:"🌮",burrito:"🌯",tamale:"🫔",stuffed_flatbread:"🥙",falafel:"🧆",egg:"🥚",fried_egg:"🍳",shallow_pan_of_food:"🥘",stew:"🍲",fondue:"🫕",bowl_with_spoon:"🥣",green_salad:"🥗",popcorn:"🍿",butter:"🧈",salt:"🧂",canned_food:"🥫",bento:"🍱",rice_cracker:"🍘",rice_ball:"🍙",rice:"🍚",curry:"🍛",ramen:"🍜",spaghetti:"🍝",sweet_potato:"🍠",oden:"🍢",sushi:"🍣",fried_shrimp:"🍤",fish_cake:"🍥",moon_cake:"🥮",dango:"🍡",dumpling:"🥟",fortune_cookie:"🥠",takeout_box:"🥡",crab:"🦀",lobster:"🦞",shrimp:"🦐",squid:"🦑",oyster:"🦪",icecream:"🍦",shaved_ice:"🍧",ice_cream:"🍨",doughnut:"🍩",cookie:"🍪",birthday:"🎂",cake:"🍰",cupcake:"🧁",pie:"🥧",chocolate_bar:"🍫",candy:"🍬",lollipop:"🍭",custard:"🍮",honey_pot:"🍯",baby_bottle:"🍼",milk_glass:"🥛",coffee:"☕",teapot:"🫖",tea:"🍵",sake:"🍶",champagne:"🍾",wine_glass:"🍷",cocktail:"🍸",tropical_drink:"🍹",beer:"🍺",beers:"🍻",clinking_glasses:"🥂",tumbler_glass:"🥃",pouring_liquid:"🫗",cup_with_straw:"🥤",bubble_tea:"🧋",beverage_box:"🧃",mate:"🧉",ice_cube:"🧊",chopsticks:"🥢",plate_with_cutlery:"🍽️",fork_and_knife:"🍴",spoon:"🥄",hocho:"🔪",knife:"🔪",jar:"🫙",amphora:"🏺",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",globe_with_meridians:"🌐",world_map:"🗺️",japan:"🗾",compass:"🧭",mountain_snow:"🏔️",mountain:"⛰️",volcano:"🌋",mount_fuji:"🗻",camping:"🏕️",beach_umbrella:"🏖️",desert:"🏜️",desert_island:"🏝️",national_park:"🏞️",stadium:"🏟️",classical_building:"🏛️",building_construction:"🏗️",bricks:"🧱",rock:"🪨",wood:"🪵",hut:"🛖",houses:"🏘️",derelict_house:"🏚️",house:"🏠",house_with_garden:"🏡",office:"🏢",post_office:"🏣",european_post_office:"🏤",hospital:"🏥",bank:"🏦",hotel:"🏨",love_hotel:"🏩",convenience_store:"🏪",school:"🏫",department_store:"🏬",factory:"🏭",japanese_castle:"🏯",european_castle:"🏰",wedding:"💒",tokyo_tower:"🗼",statue_of_liberty:"🗽",church:"⛪",mosque:"🕌",hindu_temple:"🛕",synagogue:"🕍",shinto_shrine:"⛩️",kaaba:"🕋",fountain:"⛲",tent:"⛺",foggy:"🌁",night_with_stars:"🌃",cityscape:"🏙️",sunrise_over_mountains:"🌄",sunrise:"🌅",city_sunset:"🌆",city_sunrise:"🌇",bridge_at_night:"🌉",hotsprings:"♨️",carousel_horse:"🎠",playground_slide:"🛝",ferris_wheel:"🎡",roller_coaster:"🎢",barber:"💈",circus_tent:"🎪",steam_locomotive:"🚂",railway_car:"🚃",bullettrain_side:"🚄",bullettrain_front:"🚅",train2:"🚆",metro:"🚇",light_rail:"🚈",station:"🚉",tram:"🚊",monorail:"🚝",mountain_railway:"🚞",train:"🚋",bus:"🚌",oncoming_bus:"🚍",trolleybus:"🚎",minibus:"🚐",ambulance:"🚑",fire_engine:"🚒",police_car:"🚓",oncoming_police_car:"🚔",taxi:"🚕",oncoming_taxi:"🚖",car:"🚗",red_car:"🚗",oncoming_automobile:"🚘",blue_car:"🚙",pickup_truck:"🛻",truck:"🚚",articulated_lorry:"🚛",tractor:"🚜",racing_car:"🏎️",motorcycle:"🏍️",motor_scooter:"🛵",manual_wheelchair:"🦽",motorized_wheelchair:"🦼",auto_rickshaw:"🛺",bike:"🚲",kick_scooter:"🛴",skateboard:"🛹",roller_skate:"🛼",busstop:"🚏",motorway:"🛣️",railway_track:"🛤️",oil_drum:"🛢️",fuelpump:"⛽",wheel:"🛞",rotating_light:"🚨",traffic_light:"🚥",vertical_traffic_light:"🚦",stop_sign:"🛑",construction:"🚧",anchor:"⚓",ring_buoy:"🛟",boat:"⛵",sailboat:"⛵",canoe:"🛶",speedboat:"🚤",passenger_ship:"🛳️",ferry:"⛴️",motor_boat:"🛥️",ship:"🚢",airplane:"✈️",small_airplane:"🛩️",flight_departure:"🛫",flight_arrival:"🛬",parachute:"🪂",seat:"💺",helicopter:"🚁",suspension_railway:"🚟",mountain_cableway:"🚠",aerial_tramway:"🚡",artificial_satellite:"🛰️",rocket:"🚀",flying_saucer:"🛸",bellhop_bell:"🛎️",luggage:"🧳",hourglass:"⌛",hourglass_flowing_sand:"⏳",watch:"⌚",alarm_clock:"⏰",stopwatch:"⏱️",timer_clock:"⏲️",mantelpiece_clock:"🕰️",clock12:"🕛",clock1230:"🕧",clock1:"🕐",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",new_moon:"🌑",waxing_crescent_moon:"🌒",first_quarter_moon:"🌓",moon:"🌔",waxing_gibbous_moon:"🌔",full_moon:"🌕",waning_gibbous_moon:"🌖",last_quarter_moon:"🌗",waning_crescent_moon:"🌘",crescent_moon:"🌙",new_moon_with_face:"🌚",first_quarter_moon_with_face:"🌛",last_quarter_moon_with_face:"🌜",thermometer:"🌡️",sunny:"☀️",full_moon_with_face:"🌝",sun_with_face:"🌞",ringed_planet:"🪐",star:"⭐",star2:"🌟",stars:"🌠",milky_way:"🌌",cloud:"☁️",partly_sunny:"⛅",cloud_with_lightning_and_rain:"⛈️",sun_behind_small_cloud:"🌤️",sun_behind_large_cloud:"🌥️",sun_behind_rain_cloud:"🌦️",cloud_with_rain:"🌧️",cloud_with_snow:"🌨️",cloud_with_lightning:"🌩️",tornado:"🌪️",fog:"🌫️",wind_face:"🌬️",cyclone:"🌀",rainbow:"🌈",closed_umbrella:"🌂",open_umbrella:"☂️",umbrella:"☔",parasol_on_ground:"⛱️",zap:"⚡",snowflake:"❄️",snowman_with_snow:"☃️",snowman:"⛄",comet:"☄️",fire:"🔥",droplet:"💧",ocean:"🌊",jack_o_lantern:"🎃",christmas_tree:"🎄",fireworks:"🎆",sparkler:"🎇",firecracker:"🧨",sparkles:"✨",balloon:"🎈",tada:"🎉",confetti_ball:"🎊",tanabata_tree:"🎋",bamboo:"🎍",dolls:"🎎",flags:"🎏",wind_chime:"🎐",rice_scene:"🎑",red_envelope:"🧧",ribbon:"🎀",gift:"🎁",reminder_ribbon:"🎗️",tickets:"🎟️",ticket:"🎫",medal_military:"🎖️",trophy:"🏆",medal_sports:"🏅","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉",soccer:"⚽",baseball:"⚾",softball:"🥎",basketball:"🏀",volleyball:"🏐",football:"🏈",rugby_football:"🏉",tennis:"🎾",flying_disc:"🥏",bowling:"🎳",cricket_game:"🏏",field_hockey:"🏑",ice_hockey:"🏒",lacrosse:"🥍",ping_pong:"🏓",badminton:"🏸",boxing_glove:"🥊",martial_arts_uniform:"🥋",goal_net:"🥅",golf:"⛳",ice_skate:"⛸️",fishing_pole_and_fish:"🎣",diving_mask:"🤿",running_shirt_with_sash:"🎽",ski:"🎿",sled:"🛷",curling_stone:"🥌",dart:"🎯",yo_yo:"🪀",kite:"🪁",gun:"🔫","8ball":"🎱",crystal_ball:"🔮",magic_wand:"🪄",video_game:"🎮",joystick:"🕹️",slot_machine:"🎰",game_die:"🎲",jigsaw:"🧩",teddy_bear:"🧸",pinata:"🪅",mirror_ball:"🪩",nesting_dolls:"🪆",spades:"♠️",hearts:"♥️",diamonds:"♦️",clubs:"♣️",chess_pawn:"♟️",black_joker:"🃏",mahjong:"🀄",flower_playing_cards:"🎴",performing_arts:"🎭",framed_picture:"🖼️",art:"🎨",thread:"🧵",sewing_needle:"🪡",yarn:"🧶",knot:"🪢",eyeglasses:"👓",dark_sunglasses:"🕶️",goggles:"🥽",lab_coat:"🥼",safety_vest:"🦺",necktie:"👔",shirt:"👕",tshirt:"👕",jeans:"👖",scarf:"🧣",gloves:"🧤",coat:"🧥",socks:"🧦",dress:"👗",kimono:"👘",sari:"🥻",one_piece_swimsuit:"🩱",swim_brief:"🩲",shorts:"🩳",bikini:"👙",womans_clothes:"👚",folding_hand_fan:"🪭",purse:"👛",handbag:"👜",pouch:"👝",shopping:"🛍️",school_satchel:"🎒",thong_sandal:"🩴",mans_shoe:"👞",shoe:"👞",athletic_shoe:"👟",hiking_boot:"🥾",flat_shoe:"🥿",high_heel:"👠",sandal:"👡",ballet_shoes:"🩰",boot:"👢",hair_pick:"🪮",crown:"👑",womans_hat:"👒",tophat:"🎩",mortar_board:"🎓",billed_cap:"🧢",military_helmet:"🪖",rescue_worker_helmet:"⛑️",prayer_beads:"📿",lipstick:"💄",ring:"💍",gem:"💎",mute:"🔇",speaker:"🔈",sound:"🔉",loud_sound:"🔊",loudspeaker:"📢",mega:"📣",postal_horn:"📯",bell:"🔔",no_bell:"🔕",musical_score:"🎼",musical_note:"🎵",notes:"🎶",studio_microphone:"🎙️",level_slider:"🎚️",control_knobs:"🎛️",microphone:"🎤",headphones:"🎧",radio:"📻",saxophone:"🎷",accordion:"🪗",guitar:"🎸",musical_keyboard:"🎹",trumpet:"🎺",violin:"🎻",banjo:"🪕",drum:"🥁",long_drum:"🪘",maracas:"🪇",flute:"🪈",iphone:"📱",calling:"📲",phone:"☎️",telephone:"☎️",telephone_receiver:"📞",pager:"📟",fax:"📠",battery:"🔋",low_battery:"🪫",electric_plug:"🔌",computer:"💻",desktop_computer:"🖥️",printer:"🖨️",keyboard:"⌨️",computer_mouse:"🖱️",trackball:"🖲️",minidisc:"💽",floppy_disk:"💾",cd:"💿",dvd:"📀",abacus:"🧮",movie_camera:"🎥",film_strip:"🎞️",film_projector:"📽️",clapper:"🎬",tv:"📺",camera:"📷",camera_flash:"📸",video_camera:"📹",vhs:"📼",mag:"🔍",mag_right:"🔎",candle:"🕯️",bulb:"💡",flashlight:"🔦",izakaya_lantern:"🏮",lantern:"🏮",diya_lamp:"🪔",notebook_with_decorative_cover:"📔",closed_book:"📕",book:"📖",open_book:"📖",green_book:"📗",blue_book:"📘",orange_book:"📙",books:"📚",notebook:"📓",ledger:"📒",page_with_curl:"📃",scroll:"📜",page_facing_up:"📄",newspaper:"📰",newspaper_roll:"🗞️",bookmark_tabs:"📑",bookmark:"🔖",label:"🏷️",moneybag:"💰",coin:"🪙",yen:"💴",dollar:"💵",euro:"💶",pound:"💷",money_with_wings:"💸",credit_card:"💳",receipt:"🧾",chart:"💹",envelope:"✉️",email:"📧","e-mail":"📧",incoming_envelope:"📨",envelope_with_arrow:"📩",outbox_tray:"📤",inbox_tray:"📥",package:"📦",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",postbox:"📮",ballot_box:"🗳️",pencil2:"✏️",black_nib:"✒️",fountain_pen:"🖋️",pen:"🖊️",paintbrush:"🖌️",crayon:"🖍️",memo:"📝",pencil:"📝",briefcase:"💼",file_folder:"📁",open_file_folder:"📂",card_index_dividers:"🗂️",date:"📅",calendar:"📆",spiral_notepad:"🗒️",spiral_calendar:"🗓️",card_index:"📇",chart_with_upwards_trend:"📈",chart_with_downwards_trend:"📉",bar_chart:"📊",clipboard:"📋",pushpin:"📌",round_pushpin:"📍",paperclip:"📎",paperclips:"🖇️",straight_ruler:"📏",triangular_ruler:"📐",scissors:"✂️",card_file_box:"🗃️",file_cabinet:"🗄️",wastebasket:"🗑️",lock:"🔒",unlock:"🔓",lock_with_ink_pen:"🔏",closed_lock_with_key:"🔐",key:"🔑",old_key:"🗝️",hammer:"🔨",axe:"🪓",pick:"⛏️",hammer_and_pick:"⚒️",hammer_and_wrench:"🛠️",dagger:"🗡️",crossed_swords:"⚔️",bomb:"💣",boomerang:"🪃",bow_and_arrow:"🏹",shield:"🛡️",carpentry_saw:"🪚",wrench:"🔧",screwdriver:"🪛",nut_and_bolt:"🔩",gear:"⚙️",clamp:"🗜️",balance_scale:"⚖️",probing_cane:"🦯",link:"🔗",chains:"⛓️",hook:"🪝",toolbox:"🧰",magnet:"🧲",ladder:"🪜",alembic:"⚗️",test_tube:"🧪",petri_dish:"🧫",dna:"🧬",microscope:"🔬",telescope:"🔭",satellite:"📡",syringe:"💉",drop_of_blood:"🩸",pill:"💊",adhesive_bandage:"🩹",crutch:"🩼",stethoscope:"🩺",x_ray:"🩻",door:"🚪",elevator:"🛗",mirror:"🪞",window:"🪟",bed:"🛏️",couch_and_lamp:"🛋️",chair:"🪑",toilet:"🚽",plunger:"🪠",shower:"🚿",bathtub:"🛁",mouse_trap:"🪤",razor:"🪒",lotion_bottle:"🧴",safety_pin:"🧷",broom:"🧹",basket:"🧺",roll_of_paper:"🧻",bucket:"🪣",soap:"🧼",bubbles:"🫧",toothbrush:"🪥",sponge:"🧽",fire_extinguisher:"🧯",shopping_cart:"🛒",smoking:"🚬",coffin:"⚰️",headstone:"🪦",funeral_urn:"⚱️",nazar_amulet:"🧿",hamsa:"🪬",moyai:"🗿",placard:"🪧",identification_card:"🪪",atm:"🏧",put_litter_in_its_place:"🚮",potable_water:"🚰",wheelchair:"♿",mens:"🚹",womens:"🚺",restroom:"🚻",baby_symbol:"🚼",wc:"🚾",passport_control:"🛂",customs:"🛃",baggage_claim:"🛄",left_luggage:"🛅",warning:"⚠️",children_crossing:"🚸",no_entry:"⛔",no_entry_sign:"🚫",no_bicycles:"🚳",no_smoking:"🚭",do_not_litter:"🚯","non-potable_water":"🚱",no_pedestrians:"🚷",no_mobile_phones:"📵",underage:"🔞",radioactive:"☢️",biohazard:"☣️",arrow_up:"⬆️",arrow_upper_right:"↗️",arrow_right:"➡️",arrow_lower_right:"↘️",arrow_down:"⬇️",arrow_lower_left:"↙️",arrow_left:"⬅️",arrow_upper_left:"↖️",arrow_up_down:"↕️",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",arrow_right_hook:"↪️",arrow_heading_up:"⤴️",arrow_heading_down:"⤵️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",back:"🔙",end:"🔚",on:"🔛",soon:"🔜",top:"🔝",place_of_worship:"🛐",atom_symbol:"⚛️",om:"🕉️",star_of_david:"✡️",wheel_of_dharma:"☸️",yin_yang:"☯️",latin_cross:"✝️",orthodox_cross:"☦️",star_and_crescent:"☪️",peace_symbol:"☮️",menorah:"🕎",six_pointed_star:"🔯",khanda:"🪯",aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpius:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓",ophiuchus:"⛎",twisted_rightwards_arrows:"🔀",repeat:"🔁",repeat_one:"🔂",arrow_forward:"▶️",fast_forward:"⏩",next_track_button:"⏭️",play_or_pause_button:"⏯️",arrow_backward:"◀️",rewind:"⏪",previous_track_button:"⏮️",arrow_up_small:"🔼",arrow_double_up:"⏫",arrow_down_small:"🔽",arrow_double_down:"⏬",pause_button:"⏸️",stop_button:"⏹️",record_button:"⏺️",eject_button:"⏏️",cinema:"🎦",low_brightness:"🔅",high_brightness:"🔆",signal_strength:"📶",wireless:"🛜",vibration_mode:"📳",mobile_phone_off:"📴",female_sign:"♀️",male_sign:"♂️",transgender_symbol:"⚧️",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",heavy_minus_sign:"➖",heavy_division_sign:"➗",heavy_equals_sign:"🟰",infinity:"♾️",bangbang:"‼️",interrobang:"⁉️",question:"❓",grey_question:"❔",grey_exclamation:"❕",exclamation:"❗",heavy_exclamation_mark:"❗",wavy_dash:"〰️",currency_exchange:"💱",heavy_dollar_sign:"💲",medical_symbol:"⚕️",recycle:"♻️",fleur_de_lis:"⚜️",trident:"🔱",name_badge:"📛",beginner:"🔰",o:"⭕",white_check_mark:"✅",ballot_box_with_check:"☑️",heavy_check_mark:"✔️",x:"❌",negative_squared_cross_mark:"❎",curly_loop:"➰",loop:"➿",part_alternation_mark:"〽️",eight_spoked_asterisk:"✳️",eight_pointed_black_star:"✴️",sparkle:"❇️",copyright:"©️",registered:"®️",tm:"™️",hash:"#️⃣",asterisk:"*️⃣",zero:"0️⃣",one:"1️⃣",two:"2️⃣",three:"3️⃣",four:"4️⃣",five:"5️⃣",six:"6️⃣",seven:"7️⃣",eight:"8️⃣",nine:"9️⃣",keycap_ten:"🔟",capital_abcd:"🔠",abcd:"🔡",symbols:"🔣",abc:"🔤",a:"🅰️",ab:"🆎",b:"🅱️",cl:"🆑",cool:"🆒",free:"🆓",information_source:"ℹ️",id:"🆔",m:"Ⓜ️",new:"🆕",ng:"🆖",o2:"🅾️",ok:"🆗",parking:"🅿️",sos:"🆘",up:"🆙",vs:"🆚",koko:"🈁",sa:"🈂️",u6708:"🈷️",u6709:"🈶",u6307:"🈯",ideograph_advantage:"🉐",u5272:"🈹",u7121:"🈚",u7981:"🈲",accept:"🉑",u7533:"🈸",u5408:"🈴",u7a7a:"🈳",congratulations:"㊗️",secret:"㊙️",u55b6:"🈺",u6e80:"🈵",red_circle:"🔴",orange_circle:"🟠",yellow_circle:"🟡",green_circle:"🟢",large_blue_circle:"🔵",purple_circle:"🟣",brown_circle:"🟤",black_circle:"⚫",white_circle:"⚪",red_square:"🟥",orange_square:"🟧",yellow_square:"🟨",green_square:"🟩",blue_square:"🟦",purple_square:"🟪",brown_square:"🟫",black_large_square:"⬛",white_large_square:"⬜",black_medium_square:"◼️",white_medium_square:"◻️",black_medium_small_square:"◾",white_medium_small_square:"◽",black_small_square:"▪️",white_small_square:"▫️",large_orange_diamond:"🔶",large_blue_diamond:"🔷",small_orange_diamond:"🔸",small_blue_diamond:"🔹",small_red_triangle:"🔺",small_red_triangle_down:"🔻",diamond_shape_with_a_dot_inside:"💠",radio_button:"🔘",white_square_button:"🔳",black_square_button:"🔲",checkered_flag:"🏁",triangular_flag_on_post:"🚩",crossed_flags:"🎌",black_flag:"🏴",white_flag:"🏳️",rainbow_flag:"🏳️‍🌈",transgender_flag:"🏳️‍⚧️",pirate_flag:"🏴‍☠️",ascension_island:"🇦🇨",andorra:"🇦🇩",united_arab_emirates:"🇦🇪",afghanistan:"🇦🇫",antigua_barbuda:"🇦🇬",anguilla:"🇦🇮",albania:"🇦🇱",armenia:"🇦🇲",angola:"🇦🇴",antarctica:"🇦🇶",argentina:"🇦🇷",american_samoa:"🇦🇸",austria:"🇦🇹",australia:"🇦🇺",aruba:"🇦🇼",aland_islands:"🇦🇽",azerbaijan:"🇦🇿",bosnia_herzegovina:"🇧🇦",barbados:"🇧🇧",bangladesh:"🇧🇩",belgium:"🇧🇪",burkina_faso:"🇧🇫",bulgaria:"🇧🇬",bahrain:"🇧🇭",burundi:"🇧🇮",benin:"🇧🇯",st_barthelemy:"🇧🇱",bermuda:"🇧🇲",brunei:"🇧🇳",bolivia:"🇧🇴",caribbean_netherlands:"🇧🇶",brazil:"🇧🇷",bahamas:"🇧🇸",bhutan:"🇧🇹",bouvet_island:"🇧🇻",botswana:"🇧🇼",belarus:"🇧🇾",belize:"🇧🇿",canada:"🇨🇦",cocos_islands:"🇨🇨",congo_kinshasa:"🇨🇩",central_african_republic:"🇨🇫",congo_brazzaville:"🇨🇬",switzerland:"🇨🇭",cote_divoire:"🇨🇮",cook_islands:"🇨🇰",chile:"🇨🇱",cameroon:"🇨🇲",cn:"🇨🇳",colombia:"🇨🇴",clipperton_island:"🇨🇵",costa_rica:"🇨🇷",cuba:"🇨🇺",cape_verde:"🇨🇻",curacao:"🇨🇼",christmas_island:"🇨🇽",cyprus:"🇨🇾",czech_republic:"🇨🇿",de:"🇩🇪",diego_garcia:"🇩🇬",djibouti:"🇩🇯",denmark:"🇩🇰",dominica:"🇩🇲",dominican_republic:"🇩🇴",algeria:"🇩🇿",ceuta_melilla:"🇪🇦",ecuador:"🇪🇨",estonia:"🇪🇪",egypt:"🇪🇬",western_sahara:"🇪🇭",eritrea:"🇪🇷",es:"🇪🇸",ethiopia:"🇪🇹",eu:"🇪🇺",european_union:"🇪🇺",finland:"🇫🇮",fiji:"🇫🇯",falkland_islands:"🇫🇰",micronesia:"🇫🇲",faroe_islands:"🇫🇴",fr:"🇫🇷",gabon:"🇬🇦",gb:"🇬🇧",uk:"🇬🇧",grenada:"🇬🇩",georgia:"🇬🇪",french_guiana:"🇬🇫",guernsey:"🇬🇬",ghana:"🇬🇭",gibraltar:"🇬🇮",greenland:"🇬🇱",gambia:"🇬🇲",guinea:"🇬🇳",guadeloupe:"🇬🇵",equatorial_guinea:"🇬🇶",greece:"🇬🇷",south_georgia_south_sandwich_islands:"🇬🇸",guatemala:"🇬🇹",guam:"🇬🇺",guinea_bissau:"🇬🇼",guyana:"🇬🇾",hong_kong:"🇭🇰",heard_mcdonald_islands:"🇭🇲",honduras:"🇭🇳",croatia:"🇭🇷",haiti:"🇭🇹",hungary:"🇭🇺",canary_islands:"🇮🇨",indonesia:"🇮🇩",ireland:"🇮🇪",israel:"🇮🇱",isle_of_man:"🇮🇲",india:"🇮🇳",british_indian_ocean_territory:"🇮🇴",iraq:"🇮🇶",iran:"🇮🇷",iceland:"🇮🇸",it:"🇮🇹",jersey:"🇯🇪",jamaica:"🇯🇲",jordan:"🇯🇴",jp:"🇯🇵",kenya:"🇰🇪",kyrgyzstan:"🇰🇬",cambodia:"🇰🇭",kiribati:"🇰🇮",comoros:"🇰🇲",st_kitts_nevis:"🇰🇳",north_korea:"🇰🇵",kr:"🇰🇷",kuwait:"🇰🇼",cayman_islands:"🇰🇾",kazakhstan:"🇰🇿",laos:"🇱🇦",lebanon:"🇱🇧",st_lucia:"🇱🇨",liechtenstein:"🇱🇮",sri_lanka:"🇱🇰",liberia:"🇱🇷",lesotho:"🇱🇸",lithuania:"🇱🇹",luxembourg:"🇱🇺",latvia:"🇱🇻",libya:"🇱🇾",morocco:"🇲🇦",monaco:"🇲🇨",moldova:"🇲🇩",montenegro:"🇲🇪",st_martin:"🇲🇫",madagascar:"🇲🇬",marshall_islands:"🇲🇭",macedonia:"🇲🇰",mali:"🇲🇱",myanmar:"🇲🇲",mongolia:"🇲🇳",macau:"🇲🇴",northern_mariana_islands:"🇲🇵",martinique:"🇲🇶",mauritania:"🇲🇷",montserrat:"🇲🇸",malta:"🇲🇹",mauritius:"🇲🇺",maldives:"🇲🇻",malawi:"🇲🇼",mexico:"🇲🇽",malaysia:"🇲🇾",mozambique:"🇲🇿",namibia:"🇳🇦",new_caledonia:"🇳🇨",niger:"🇳🇪",norfolk_island:"🇳🇫",nigeria:"🇳🇬",nicaragua:"🇳🇮",netherlands:"🇳🇱",norway:"🇳🇴",nepal:"🇳🇵",nauru:"🇳🇷",niue:"🇳🇺",new_zealand:"🇳🇿",oman:"🇴🇲",panama:"🇵🇦",peru:"🇵🇪",french_polynesia:"🇵🇫",papua_new_guinea:"🇵🇬",philippines:"🇵🇭",pakistan:"🇵🇰",poland:"🇵🇱",st_pierre_miquelon:"🇵🇲",pitcairn_islands:"🇵🇳",puerto_rico:"🇵🇷",palestinian_territories:"🇵🇸",portugal:"🇵🇹",palau:"🇵🇼",paraguay:"🇵🇾",qatar:"🇶🇦",reunion:"🇷🇪",romania:"🇷🇴",serbia:"🇷🇸",ru:"🇷🇺",rwanda:"🇷🇼",saudi_arabia:"🇸🇦",solomon_islands:"🇸🇧",seychelles:"🇸🇨",sudan:"🇸🇩",sweden:"🇸🇪",singapore:"🇸🇬",st_helena:"🇸🇭",slovenia:"🇸🇮",svalbard_jan_mayen:"🇸🇯",slovakia:"🇸🇰",sierra_leone:"🇸🇱",san_marino:"🇸🇲",senegal:"🇸🇳",somalia:"🇸🇴",suriname:"🇸🇷",south_sudan:"🇸🇸",sao_tome_principe:"🇸🇹",el_salvador:"🇸🇻",sint_maarten:"🇸🇽",syria:"🇸🇾",swaziland:"🇸🇿",tristan_da_cunha:"🇹🇦",turks_caicos_islands:"🇹🇨",chad:"🇹🇩",french_southern_territories:"🇹🇫",togo:"🇹🇬",thailand:"🇹🇭",tajikistan:"🇹🇯",tokelau:"🇹🇰",timor_leste:"🇹🇱",turkmenistan:"🇹🇲",tunisia:"🇹🇳",tonga:"🇹🇴",tr:"🇹🇷",trinidad_tobago:"🇹🇹",tuvalu:"🇹🇻",taiwan:"🇹🇼",tanzania:"🇹🇿",ukraine:"🇺🇦",uganda:"🇺🇬",us_outlying_islands:"🇺🇲",united_nations:"🇺🇳",us:"🇺🇸",uruguay:"🇺🇾",uzbekistan:"🇺🇿",vatican_city:"🇻🇦",st_vincent_grenadines:"🇻🇨",venezuela:"🇻🇪",british_virgin_islands:"🇻🇬",us_virgin_islands:"🇻🇮",vietnam:"🇻🇳",vanuatu:"🇻🇺",wallis_futuna:"🇼🇫",samoa:"🇼🇸",kosovo:"🇽🇰",yemen:"🇾🇪",mayotte:"🇾🇹",south_africa:"🇿🇦",zambia:"🇿🇲",zimbabwe:"🇿🇼",england:"🏴󠁧󠁢󠁥󠁮󠁧󠁿",scotland:"🏴󠁧󠁢󠁳󠁣󠁴󠁿",wales:"🏴󠁧󠁢󠁷󠁬󠁳󠁿"};function Ro(e,t,n){const r=dr((n||{}).ignore||[]),i=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r0?{type:"text",value:a}:void 0),!1===a?r.lastIndex=n+1:(o!==n&&u.push({type:"text",value:e.value.slice(o,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),o=n+h[0].length,l=!0),!r.global)break;h=r.exec(e.value)}l?(o?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=xo(e,"(");let a=xo(e,")");for(;-1!==r&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function qo(e,t,n,r){return!(!Vo(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Vo(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||St(n)||It(n))&&(!t||47!==n)}function Wo(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Qo(){this.buffer()}function Xo(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=pt(this.sliceSerialize(e)).toLowerCase()}function Ko(e){this.exit(e)}function Jo(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function $o(){this.buffer()}function Zo(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=pt(this.sliceSerialize(e)).toLowerCase()}function ec(e){this.exit(e)}function tc(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),o(),s(),a+=i.move("]"),a}function nc(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteDefinition"),o=n.enter("label");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),o(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(n.indentLines(n.containerFlow(e,i.current()),rc)),s(),a}function rc(e,t,n){return 0===t?e:(n?"":" ")+e}tc.peek=function(){return"["};const ic=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function ac(e){this.enter({type:"delete",children:[]},e)}function sc(e){this.exit(e)}function oc(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function cc(e){return e.length}function lc(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function uc(e,t,n){return">"+(n?"":" ")+e}function hc(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r",...c.current()})),l+=c.move(">")):(o=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=c.move(" "+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),o()),l+=c.move(")"),s(),l}function Ac(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let c=o.move("![");const l=n.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(l+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return s(),n.stack=u,a(),"full"!==i&&l&&l===h?"shortcut"===i?c=c.slice(0,-1):c+=o.move("]"):c+=o.move(h+"]"),c}function kc(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a\u007F]/.test(e.url))}function Ic(e,t,n,r){const i=mc(n),a='"'===i?"Quote":"Apostrophe",s=n.createTracker(r);let o,c;if(bc(e,n)){const t=n.stack;n.stack=[],o=n.enter("autolink");let r=s.move("<");return r+=s.move(n.containerPhrasing(e,{before:r,after:">",...s.current()})),r+=s.move(">"),o(),n.stack=t,r}o=n.enter("link"),c=n.enter("label");let l=s.move("[");return l+=s.move(n.containerPhrasing(e,{before:l,after:"](",...s.current()})),l+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(n.safe(e.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(c=n.enter("destinationRaw"),l+=s.move(n.safe(e.url,{before:l,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=s.move(" "+i),l+=s.move(n.safe(e.title,{before:l,after:i,...s.current()})),l+=s.move(i),c()),l+=s.move(")"),o(),l}function Sc(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let c=o.move("[");const l=n.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(l+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return s(),n.stack=u,a(),"full"!==i&&l&&l===h?"shortcut"===i?c=c.slice(0,-1):c+=o.move("]"):c+=o.move(h+"]"),c}function Nc(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Cc(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}oc.peek=function(){return"~"},Ec.peek=function(e,t,n){return n.options.emphasis||"*"},Tc.peek=function(){return"<"},gc.peek=function(){return"!"},Ac.peek=function(){return"!"},kc.peek=function(){return"`"},Ic.peek=function(e,t,n){return bc(e,n)?"<":"["},Sc.peek=function(){return"["};const yc=dr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Dc(e,t,n,r){const i=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),a=n.enter("strong"),s=n.createTracker(r),o=s.move(i+i);let c=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const l=c.charCodeAt(0),u=_c(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=fc(l)+c.slice(1));const h=c.charCodeAt(c.length-1),p=_c(r.after.charCodeAt(0),h,i);p.inside&&(c=c.slice(0,-1)+fc(h));const d=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},o+c+d}Dc.peek=function(e,t,n){return n.options.strong||"*"};const Oc={blockquote:function(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),uc);return i(),s},break:pc,code:function(e,t,n,r){const i=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),a=e.value||"",s="`"===i?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(a,dc);return e(),t}const o=n.createTracker(r),c=i.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}(a,i)+1,3)),l=n.enter("codeFenced");let u=o.move(c);if(e.lang){const t=n.enter(`codeFencedLang${s}`);u+=o.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${s}`);u+=o.move(" "),u+=o.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...o.current()})),t()}return u+=o.move("\n"),a&&(u+=o.move(a+"\n")),u+=o.move(c),l(),u},definition:function(e,t,n,r){const i=mc(n),a='"'===i?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const c=n.createTracker(r);let l=c.move("[");return l+=c.move(n.safe(n.associationId(e),{before:l,after:"]",...c.current()})),l+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(o=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":"\n",...c.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=c.move(" "+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),o()),s(),l},emphasis:Ec,hardBreak:pc,heading:function(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(function(e,t){let n=!1;return Ar(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,Tr})),Boolean((!e.depth||e.depth<3)&&et(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),s=n.containerPhrasing(e,{...a.current(),before:"\n",after:"\n"});return r(),t(),s+"\n"+(1===i?"=":"-").repeat(s.length-(Math.max(s.lastIndexOf("\r"),s.lastIndexOf("\n"))+1))}const s="#".repeat(i),o=n.enter("headingAtx"),c=n.enter("phrasing");a.move(s+" ");let l=n.containerPhrasing(e,{before:"# ",after:"\n",...a.current()});return/^[\t ]/.test(l)&&(l=fc(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),c(),o(),l},html:Tc,image:gc,imageReference:Ac,inlineCode:kc,link:Ic,linkReference:Sc,list:function(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Nc(n);const o=e.ordered?"."===s?")":".":function(e){const t=Nc(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let c=!(!t||!n.bulletLastUsed)&&s===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==s&&"-"!==s||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(c=!0),Cc(n)===s&&t){let t=-1;for(;++t-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+a);let s=a.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const c=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,o.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(s))+e;return(n?a:a+" ".repeat(s-a.length))+e}));return c(),l},paragraph:function(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s},root:function(e,t,n,r){return(e.children.some((function(e){return yc(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Dc,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Cc(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Rc(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function Lc(e){this.exit(e),this.data.inTable=void 0}function wc(e){this.enter({type:"tableRow",children:[]},e)}function Pc(e){this.exit(e)}function xc(e){this.enter({type:"tableCell",children:[]},e)}function Mc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,vc));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function vc(e,t){return"|"===t?t:e}function Bc(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Oc.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return o(function(e,t,n){const r=e.children;let i=-1;const a=[],s=t.enter("table");for(;++il&&(l=e[u].length);++ac[a])&&(c[a]=e)}t.push(s)}s[u]=t,o[u]=r}var h;let p=-1;if("object"==typeof r&&"length"in r)for(;++pc[p]&&(c[p]=i),m[p]=i),d[p]=s}s.splice(1,0,d),o.splice(1,0,m),u=-1;const f=[];for(;++u0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Xc[43]=Qc,Xc[45]=Qc,Xc[46]=Qc,Xc[95]=Qc,Xc[72]=[Qc,Wc],Xc[104]=[Qc,Wc],Xc[87]=[Qc,Vc],Xc[119]=[Qc,Vc];const nl={tokenize:function(e,t,n){const r=this;return yt(e,(function(e){const i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function rl(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const e=r.events[i][1];if("labelImage"===e.type){s=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!s||!s._balanced)return n(i);const o=pt(r.sliceSerialize({start:s.end,end:r.now()}));if(94!==o.codePointAt(0)||!a.includes(o.slice(1)))return n(i);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)}}function il(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function al(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),o};function o(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(o){if(s>999||93===o&&!a||null===o||91===o||kt(o))return n(o);if(93===o){e.exit("chunkString");const a=e.exit("gfmFootnoteCallString");return i.includes(pt(r.sliceSerialize(a)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(o)}return kt(o)||(a=!0),s++,e.consume(o),92===o?l:c}function l(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function sl(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s,o=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),c};function c(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",l):n(t)}function l(t){if(o>999||93===t&&!s||null===t||91===t||kt(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return a=pt(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return kt(t)||(s=!0),o++,e.consume(t),92===t?u:l}function u(t){return 91===t||92===t||93===t?(e.consume(t),o++,l):l(t)}function h(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(a)||i.push(a),yt(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function ol(e,t,n){return e.check(vt,t,e.attempt(nl,t,n))}function cl(e){e.exit("gfmFootnoteDefinition")}function ll(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const i=this.previous,a=this.events;let s=0;return function(t){if(126===i&&"characterEscape"!==a[a.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),o(t)};function o(a){const c=Lt(i);if(126===a)return s>1?r(a):(e.consume(a),s++,o);if(s<2&&!t)return r(a);const l=e.exit("strikethroughSequenceTemporary"),u=Lt(a);return l._open=!u||2===u&&Boolean(c),l._close=!c||2===c&&Boolean(u),n(a)}},resolveAll:function(e,t){let n=-1;for(;++n0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push([...e]),e.length=0;let r=n.pop();for(;r;)e.push(...r),r=n.pop();this.map.length=0}}function hl(e,t){let n=!1;const r=[];for(;t-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const i=t>-1?r.events[t][1].type:null,a="tableHead"===i||"tableRow"===i?A:o;if(a===A&&r.parser.lazy[r.now().line])return n(e);return a(e)};function o(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return c(e);return i=!0,s+=1,c(e)}(t)}function c(t){return null===t?n(t):At(t)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h):n(t):bt(t)?yt(e,c,"whitespace")(t):(s+=1,i&&(i=!1,a+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),i=!0,c):(e.enter("data"),l(t)))}function l(t){return null===t||124===t||kt(t)?(e.exit("data"),c(t)):(e.consume(t),92===t?u:l)}function u(t){return 92===t||124===t?(e.consume(t),l):l(t)}function h(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),i=!1,bt(t)?yt(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?m(t):124===t?(i=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),d):g(t)}function d(t){return bt(t)?yt(e,m,"whitespace")(t):m(t)}function m(t){return 58===t?(s+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),f):45===t?(s+=1,f(t)):null===t||At(t)?T(t):g(t)}function f(t){return 45===t?(e.enter("tableDelimiterFiller"),_(t)):g(t)}function _(t){return 45===t?(e.consume(t),_):58===t?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(t))}function E(t){return bt(t)?yt(e,T,"whitespace")(t):T(t)}function T(n){return 124===n?p(n):(null===n||At(n))&&i&&a===s?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):g(n)}function g(e){return n(e)}function A(t){return e.enter("tableRow"),k(t)}function k(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),k):null===n||At(n)?(e.exit("tableRow"),t(n)):bt(n)?yt(e,k,"whitespace")(n):(e.enter("data"),b(n))}function b(t){return null===t||124===t||kt(t)?(e.exit("data"),k(t)):(e.consume(t),92===t?I:b)}function I(t){return 92===t||124===t?(e.consume(t),b):b(t)}}function dl(e,t){let n,r,i,a=-1,s=!0,o=0,c=[0,0,0,0],l=[0,0,0,0],u=!1,h=0;const p=new ul;for(;++an[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",s,t]])}return void 0!==i&&(a.end=Object.assign({},_l(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function fl(e,t,n,r,i){const a=[],s=_l(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function _l(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const El={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i};function i(t){return kt(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(t)}function s(r){return At(r)?t(r):bt(r)?e.check({tokenize:Tl},t,n)(r):n(r)}}};function Tl(e,t,n){return yt(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const gl={};function Al(e){const t=e||gl,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return ct([{text:Xc},{document:{91:{name:"gfmFootnoteDefinition",tokenize:sl,continuation:{tokenize:ol},exit:cl}},text:{91:{name:"gfmFootnoteCall",tokenize:al},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:rl,resolveTo:il}}},ll(e),{flow:{null:{name:"table",tokenize:pl,resolveAll:dl}}},{text:{91:El}}])}(t)),i.push([{transforms:[Yo],enter:{literalAutolink:Bo,literalAutolinkEmail:Fo,literalAutolinkHttp:Fo,literalAutolinkWww:Fo},exit:{literalAutolink:zo,literalAutolinkEmail:Go,literalAutolinkHttp:Ho,literalAutolinkWww:Uo}},{enter:{gfmFootnoteDefinition:Wo,gfmFootnoteDefinitionLabelString:Qo,gfmFootnoteCall:Jo,gfmFootnoteCallString:$o},exit:{gfmFootnoteDefinition:Ko,gfmFootnoteDefinitionLabelString:Xo,gfmFootnoteCall:ec,gfmFootnoteCallString:Zo}},{canContainEols:["delete"],enter:{strikethrough:ac},exit:{strikethrough:sc}},{enter:{table:Rc,tableData:xc,tableHeader:xc,tableRow:wc},exit:{codeText:Mc,table:Lc,tableData:Pc,tableHeader:Pc,tableRow:Pc}},{exit:{taskListCheckValueChecked:Fc,taskListCheckValueUnchecked:Fc,paragraph:Hc}}]),a.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Mo,notInConstruct:vo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Mo,notInConstruct:vo},{character:":",before:"[ps]",after:"\\/",inConstruct:Mo,notInConstruct:vo}]},{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:nc,footnoteReference:tc}},{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ic}],handlers:{delete:oc}},Bc(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Uc}}]}}(t))}const kl=["strong","summary","blockquote","details","table","tbody","thead","h1","h2","h3","h4","h5","h6","input","div","pre","ul","ol","li","br","em","hr","td","th","tr","a","img","p","del","span","code","button","mark"],bl=a.lazy((()=>p((()=>import("./index-Bv50oJ9E.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Alert}))))),Il=a.lazy((()=>p((()=>import("./index-Bv50oJ9E.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Avatar}))))),Sl=a.lazy((()=>p((()=>import("./index-Bv50oJ9E.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Button}))))),Nl=a.lazy((()=>p((()=>import("./index-Bv50oJ9E.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Byline}))))),Cl=a.lazy((()=>p((()=>import("./index-Bv50oJ9E.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Checkbox}))))),yl=a.lazy((()=>p((()=>import("./index-Bv50oJ9E.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Heading}))))),Dl=a.lazy((()=>p((()=>import("./index-Bv50oJ9E.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Img}))))),Ol=a.lazy((()=>p((()=>import("./index-Bv50oJ9E.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Link}))))),Rl=a.lazy((()=>p((()=>import("./index-Bv50oJ9E.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.SourceCodeEditor}))))),Ll=a.lazy((()=>p((()=>import("./index-Bv50oJ9E.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Text}))))),wl=a.lazy((()=>p((()=>import("./index-Bv50oJ9E.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.ToggleDetails}))))),Pl=a.lazy((()=>p((()=>import("./index-Bv50oJ9E.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.View}))))),xl=e=>a.Children.map(e.children,(e=>"string"!=typeof e?e:null)),Ml=e=>e?.style?.textAlign?.replace(/\b(left|right)\b/,(e=>"left"===e?"start":"end"))??"start",vl={hr:({node:e,...t})=>h.jsx(Pl,{as:e?.tagName,shadow:"topmost",borderWidth:"small",margin:"small none",padding:"none",borderColor:"primary",...t}),a:({node:e,...t})=>h.jsx(Ol,{to:e.href,...t}),button:({node:e,...t})=>h.jsx(Sl,{withBackground:!1,...t}),p:({node:e,...t})=>h.jsx(Ll,{as:e.tagName,...t}),em:({node:e,...t})=>h.jsx(Ll,{fontStyle:"italic",...t}),strong:({node:e,...t})=>h.jsx(Ll,{weight:"bold",...t}),span:({node:e,...t})=>h.jsx(Ll,{as:e.tagName,...t}),code:({node:e,...t})=>h.jsx(Ll,{as:e.tagName,...t}),del:({node:e,...t})=>h.jsx(Ll,{as:e.tagName,...t}),blockquote:({node:e,...t})=>{t={...t,children:xl(t)};const n={NOTE:"info",TIP:"success",IMPORTANT:"info",WARNING:"warning",CAUTION:"error"},r=a.Children.toArray(t.children)[0];let i,s;d.isValidElement(r)?[i,s]=r.props.children.split("--",2):[i,s]=r.toString().split("--",2);const o=i.match(/\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/);return o?h.jsx(bl,{variant:n[o[1]],children:i.replace(`${o[0]}`,"")}):h.jsx(Nl,{description:i,title:s,margin:"medium 0",...t,children:s?h.jsx(Il,{name:s}):h.jsx(h.Fragment,{})})},h1:({node:e,...t})=>h.jsx(yl,{margin:"none none medium",level:e.tagName,...t}),h2:({node:e,...t})=>h.jsx(yl,{margin:"small none",level:e.tagName,...t}),h3:({node:e,...t})=>h.jsx(yl,{margin:"small none",level:e.tagName,...t}),h4:({node:e,...t})=>h.jsx(yl,{level:e.tagName,...t}),h5:({node:e,...t})=>h.jsx(yl,{level:e.tagName,...t}),h6:({node:e,...t})=>h.jsx(yl,{as:"h6",...t}),img:({node:e,...t})=>h.jsx(Dl,{src:e.src,...t}),div:({node:e,...t})=>h.jsx(Pl,{as:e.tagName,...t}),pre:({node:e,...t})=>{if(1===e.children.length&&"code"===e.children[0].tagName){let t=e.children[0].children[0].value;return t.endsWith("\n")&&(t=t.slice(0,-1)),h.jsx(Rl,{label:"Code",lineNumbers:!0,foldGutter:!0,editable:!0,readOnly:!0,defaultValue:t})}return h.jsx(Pl,{as:e.tagName,...t})},ul:({node:e,...t})=>{t={...t,children:xl(t)};const{children:n,...r}=t,i="contains-task-list"===r?.className||!1;return h.jsx(C,{isUnstyled:i,...r,children:a.Children.map(n,(e=>{const{children:t,...n}=e.props;if(i&&t){let r=!1;return h.jsx(C.Item,{margin:"0 0 small small",...n,children:a.Children.map(t,(e=>{if("checkbox"===e?.props?.type&&(r=e?.props?.checked??!1),"checkbox"!==e?.props?.type&&" "!==e&&"[ ]"!==e&&"[X]"!==e)return h.jsx(Cl,{label:e,disabled:!0,defaultChecked:r})}))},e.key)}return h.jsx(C.Item,{...e.props},e.key)}))})},ol:({node:e,...t})=>{t={...t,children:xl(t)};const{children:n,...r}=t;return h.jsx(C,{as:e.tagName,...r,children:a.Children.map(n,(e=>h.jsx(C.Item,{...e.props},e.key)))})},input:({node:e,...t})=>h.jsx(e.tagName,{...t}),details:({node:e,...t})=>{const n=(t={...t,children:xl(t)}).children.shift();return h.jsx(wl,{summary:n,children:h.jsx(Pl,{display:"block",padding:"small",...t})})},table:({node:e,...t})=>{const{children:n,...r}=t;return h.jsx(_,{margin:"medium none",hover:!0,caption:"",...r,children:a.Children.map(n,(e=>{const{children:t,...n}=e.props;return"thead"===e.type?h.jsx(_.Head,{...n,children:a.Children.map(t,(e=>{const{children:t,...n}=e.props;return h.jsx(_.Row,{...n,children:a.Children.map(t,(e=>h.jsx(_.ColHeader,{id:e.key,textAlign:Ml(e.props),...e.props},e.key)))})}))}):h.jsx(_.Body,{...n,children:a.Children.map(t,(e=>{const{children:t,...n}=e.props;return h.jsx(_.Row,{...n,children:a.Children.map(t,(e=>h.jsx(_.Cell,{textAlign:Ml(e.props),...e.props})))})}))})}))})}};export{C as L,oi as M,Po as a,Do as b,kl as c,vl as d,k as e,Al as r}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Aym4CANT.js","assets/index-CmNFgSR4.js","assets/index-DxmLT0bY.js","assets/index-CqQFZXZA.css","assets/RenderTopNavBar-BObK9Y19.js","assets/index-CFaT5J52.js","assets/index-DsnmBOMj.js","assets/index-CaYtQ08a.js","assets/index-VWJm_On8.js","assets/index-C-ITlPCi.js","assets/IconRssLine-CfLRRZ3P.js"])))=>i.map(i=>d[i]); +import{h as e,i as t,T as n,w as r,t as i,r as a,k as s,l as o,p as c,V as l,m as u,j as h,_ as p,R as d}from"./index-DxmLT0bY.js";import{C as m,s as f}from"./RenderTopNavBar-BObK9Y19.js";import{a as _}from"./index-CmNFgSR4.js";const E={children:t.oneOfType([t.node,t.func]).isRequired,delimiter:t.oneOf(["none","dashed","solid"]),size:t.oneOf(["small","medium","large"]),margin:n.spacing,padding:n.spacing,spacing:t.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:t.func},T=["delimiter","spacing","size","margin","padding","elementRef","children","styles"];var g,A;let k=r(((t,n)=>{const r=n.size,i=n.delimiter,a=n.spacing,s="none"!==i,o="none"!==a;e(!(s&&o),"[List] `itemSpacing` has no effect inside Lists with the `delimiter` prop set to anything other than `none`.");const c={small:{fontSize:t.fontSizeSmall},medium:{fontSize:t.fontSizeMedium},large:{fontSize:t.fontSizeLarge}},l={"xxx-small":{marginTop:t.spacingXXXSmall,marginBottom:t.spacingXXXSmall},"xx-small":{marginTop:t.spacingXXSmall,marginBottom:t.spacingXXSmall},"x-small":{marginTop:t.spacingXSmall,marginBottom:t.spacingXSmall},small:{marginTop:t.spacingSmall,marginBottom:t.spacingSmall},medium:{marginTop:t.spacingMedium,marginBottom:t.spacingMedium},large:{marginTop:t.spacingLarge,marginBottom:t.spacingLarge},"x-large":{marginTop:t.spacingXLarge,marginBottom:t.spacingXLarge},"xx-large":{marginTop:t.spacingXXLarge,marginBottom:t.spacingXXLarge},none:{}},u={dashed:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:t.delimiterDashedBorder}},solid:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:t.delimiterSolidBorder}},none:{}};return{listItem:{label:"listItem",fontWeight:t.fontWeight,fontFamily:t.fontFamily,lineHeight:t.lineHeight,color:t.color,padding:0,...c[r],...o&&!s&&l[a],...s&&u[i],"&:first-of-type":{marginTop:"0"},"&:last-of-type":{marginBottom:"0"}}}}),(e=>{var t,n,r;const i=e.borders,a=e.colors,s=e.spacing,o=e.typography,c=e.key,l={canvas:{color:e["ic-brand-font-color-dark"]}};return{...{fontFamily:null==o?void 0:o.fontFamily,fontWeight:null==o?void 0:o.fontWeightNormal,lineHeight:null==o?void 0:o.lineHeight,fontSizeSmall:null==o?void 0:o.fontSizeSmall,fontSizeMedium:null==o?void 0:o.fontSizeMedium,fontSizeLarge:null==o?void 0:o.fontSizeLarge,color:null==a||null===(t=a.contrasts)||void 0===t?void 0:t.grey125125,spacingXXXSmall:null==s?void 0:s.xxxSmall,spacingXXSmall:null==s?void 0:s.xxSmall,spacingXSmall:null==s?void 0:s.xSmall,spacingSmall:null==s?void 0:s.small,spacingMedium:null==s?void 0:s.medium,spacingLarge:null==s?void 0:s.large,spacingXLarge:null==s?void 0:s.xLarge,spacingXXLarge:null==s?void 0:s.xxLarge,delimiterDashedBorder:`${null==i?void 0:i.widthSmall} dashed ${null==a||null===(n=a.contrasts)||void 0===n?void 0:n.grey1214}`,delimiterSolidBorder:`${null==i?void 0:i.widthSmall} solid ${null==a||null===(r=a.contrasts)||void 0===r?void 0:r.grey1214}`},...l[c]}}))(g=i()(((A=class extends a.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const t=this.props.elementRef;this.ref=e,"function"==typeof t&&t(e)}}componentDidMount(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t)}componentDidUpdate(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t)}render(){const e=this.props;e.delimiter,e.spacing,e.size;const t=e.margin,n=e.padding;e.elementRef;const r=e.children,i=e.styles,a=s(e,T);return o(l,Object.assign({},c(a),{css:null==i?void 0:i.listItem,as:"li",margin:t,padding:n,maxWidth:"100%",elementRef:this.handleRef}),r)}}).displayName="ListItem",A.componentId="List.Item",A.propTypes=E,A.allowedProps=["children","delimiter","size","margin","padding","spacing","elementRef"],A.defaultProps={padding:"none",spacing:"none",delimiter:"none",size:"medium"},g=A))||g)||g;const b={children:m.oneOf([k]),as:t.oneOf(["ul","ol"]),delimiter:t.oneOf(["none","dashed","solid"]),isUnstyled:t.bool,margin:n.spacing,size:t.oneOf(["small","medium","large"]),itemSpacing:t.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:t.func},I=["as","margin","isUnstyled","elementRef","styles"];var S,N;let C=r(((e,t)=>{const n=t.isUnstyled,r="ol"===t.as;return{list:{label:"list",paddingInlineStart:e.listPadding,paddingInlineEnd:0,...r&&{listStyleType:"none",paddingInlineStart:`calc(${e.listPadding} / 2)`,paddingInlineEnd:0,counterReset:"ol-counter","&>li::before":{fontWeight:e.orderedNumberFontWeight,counterIncrement:"ol-counter",content:'counters(ol-counter, ".") "."',marginInlineEnd:e.orderedNumberMargin,marginInlineStart:0}},...n&&{listStyleType:"none",paddingInlineStart:0}}}}),(e=>{const t=e.spacing,n=e.typography;return{...{listPadding:null==t?void 0:t.large,orderedNumberFontWeight:null==n?void 0:n.fontWeightBold,orderedNumberMargin:null==t?void 0:t.xSmall}}}))(S=i()(((N=class extends a.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const t=this.props.elementRef;this.ref=e,"function"==typeof t&&t(e)}}componentDidMount(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t)}componentDidUpdate(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t)}renderChildren(){return a.Children.map(this.props.children,(e=>{if(e)return f(e,{isUnstyled:this.props.isUnstyled,delimiter:this.props.delimiter,size:this.props.size,spacing:this.props.itemSpacing})}))}render(){const e=this.props,t=e.as,n=e.margin;e.isUnstyled,e.elementRef;const r=e.styles,i=s(e,I);return o(l,Object.assign({},c(i),{css:null==r?void 0:r.list,as:t,margin:n,elementRef:this.handleRef,display:"block"}),this.renderChildren())}}).displayName="List",N.componentId="List",N.propTypes=b,N.allowedProps=["children","as","delimiter","isUnstyled","margin","size","itemSpacing","elementRef"],N.defaultProps={as:"ul",delimiter:"none",isUnstyled:!1,size:"medium",itemSpacing:"none"},N.Item=k,S=N))||S)||S;function y(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){-1===r&&(r=n.length,a=!0);const e=n.slice(i,r).trim();!e&&a||t.push(e),i=r+1,r=n.indexOf(",",i)}return t}function D(e,t){const n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}const O=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,R=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,L={};function w(e,t){return(L.jsx?R:O).test(e)}const P=/[ \t\n\f\r]/g;function x(e){return""===e.replace(P,"")}class M{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function v(e,t){const n={},r={};let i=-1;for(;++i"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),te=Z({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function ne(e,t){return t in e?e[t]:t}function re(e,t){return ne(e,t.toLowerCase())}const ie=Z({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:re,properties:{xmlns:null,xmlnsXLink:null}}),ae=Z({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:G,ariaAutoComplete:null,ariaBusy:G,ariaChecked:G,ariaColCount:Y,ariaColIndex:Y,ariaColSpan:Y,ariaControls:j,ariaCurrent:null,ariaDescribedBy:j,ariaDetails:null,ariaDisabled:G,ariaDropEffect:j,ariaErrorMessage:null,ariaExpanded:G,ariaFlowTo:j,ariaGrabbed:G,ariaHasPopup:null,ariaHidden:G,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:j,ariaLevel:Y,ariaLive:null,ariaModal:G,ariaMultiLine:G,ariaMultiSelectable:G,ariaOrientation:null,ariaOwns:j,ariaPlaceholder:null,ariaPosInSet:Y,ariaPressed:G,ariaReadOnly:G,ariaRelevant:null,ariaRequired:G,ariaRoleDescription:j,ariaRowCount:Y,ariaRowIndex:Y,ariaRowSpan:Y,ariaSelected:G,ariaSetSize:Y,ariaSort:null,ariaValueMax:Y,ariaValueMin:Y,ariaValueNow:Y,ariaValueText:null,role:null}}),se=Z({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:re,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:q,acceptCharset:j,accessKey:j,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:j,autoFocus:U,autoPlay:U,blocking:j,capture:null,charSet:null,checked:U,cite:null,className:j,cols:Y,colSpan:null,content:null,contentEditable:G,controls:U,controlsList:j,coords:Y|q,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:z,draggable:G,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:j,height:Y,hidden:U,high:Y,href:null,hrefLang:null,htmlFor:j,httpEquiv:j,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:j,itemRef:j,itemScope:U,itemType:j,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:U,optimum:Y,pattern:null,ping:j,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:j,required:U,reversed:U,rows:Y,rowSpan:Y,sandbox:j,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:G,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:G,width:Y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:j,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:G,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:U,disableRemotePlayback:U,prefix:null,property:null,results:Y,security:null,unselectable:null}}),oe=Z({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:ne,properties:{about:V,accentHeight:Y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Y,amplitude:Y,arabicForm:null,ascent:Y,attributeName:null,attributeType:null,azimuth:Y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Y,by:null,calcMode:null,capHeight:Y,className:j,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Y,diffuseConstant:Y,direction:null,display:null,dur:null,divisor:Y,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:Y,enableBackground:null,end:null,event:null,exponent:Y,externalResourcesRequired:null,fill:null,fillOpacity:Y,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:q,g2:q,glyphName:q,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Y,horizOriginX:Y,horizOriginY:Y,id:null,ideographic:Y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Y,k:Y,k1:Y,k2:Y,k3:Y,k4:Y,kernelMatrix:V,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Y,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Y,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Y,overlineThickness:Y,paintOrder:null,panose1:null,path:null,pathLength:Y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:j,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Y,pointsAtY:Y,pointsAtZ:Y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:V,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:V,rev:V,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:V,requiredFeatures:V,requiredFonts:V,requiredFormats:V,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Y,specularExponent:Y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Y,strikethroughThickness:Y,string:null,stroke:null,strokeDashArray:V,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Y,strokeOpacity:Y,strokeWidth:null,style:null,surfaceScale:Y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:V,tabIndex:Y,tableValues:null,target:null,targetX:Y,targetY:Y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:V,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Y,underlineThickness:Y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Y,values:null,vAlphabetic:Y,vMathematical:Y,vectorEffect:null,vHanging:Y,vIdeographic:Y,version:null,vertAdvY:Y,vertOriginX:Y,vertOriginY:Y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),ce=/^data[-\w.:]+$/i,le=/-[a-z]/g,ue=/[A-Z]/g;function he(e,t){const n=B(t);let r=t,i=F;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&ce.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(le,de);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!le.test(e)){let n=e.replace(ue,pe);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=K}return new i(r,t)}function pe(e){return"-"+e.toLowerCase()}function de(e){return e.charAt(1).toUpperCase()}const me={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},fe=v([te,ee,ie,ae,se],"html"),_e=v([te,ee,ie,ae,oe],"svg");function Ee(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Te(e){return e.join(" ").trim()}var ge,Ae,ke,be={};var Ie=function(){if(ke)return be;ke=1;var e=be&&be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(be,"__esModule",{value:!0}),be.default=function(e,n){var r=null;if(!e||"string"!=typeof e)return r;var i=(0,t.default)(e),a="function"==typeof n;return i.forEach((function(e){if("declaration"===e.type){var t=e.property,i=e.value;a?n(t,i,e):i&&((r=r||{})[t]=i)}})),r};var t=e(function(){if(Ae)return ge;Ae=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,c="";function l(e){return e?e.replace(o,c):c}return ge=function(o,u){if("string"!=typeof o)throw new TypeError("First argument must be a string");if(!o)return[];u=u||{};var h=1,p=1;function d(e){var n=e.match(t);n&&(h+=n.length);var r=e.lastIndexOf("\n");p=~r?e.length-r:p+e.length}function m(){var e={line:h,column:p};return function(t){return t.position=new f(e),T(),t}}function f(e){this.start=e,this.end={line:h,column:p},this.source=u.source}function _(e){var t=new Error(u.source+":"+h+":"+p+": "+e);if(t.reason=e,t.filename=u.source,t.line=h,t.column=p,t.source=o,!u.silent)throw t}function E(e){var t=e.exec(o);if(t){var n=t[0];return d(n),o=o.slice(n.length),t}}function T(){E(n)}function g(e){var t;for(e=e||[];t=A();)!1!==t&&e.push(t);return e}function A(){var e=m();if("/"==o.charAt(0)&&"*"==o.charAt(1)){for(var t=2;c!=o.charAt(t)&&("*"!=o.charAt(t)||"/"!=o.charAt(t+1));)++t;if(t+=2,c===o.charAt(t-1))return _("End of comment missing");var n=o.slice(2,t-2);return p+=2,d(n),o=o.slice(t),p+=2,e({type:"comment",comment:n})}}function k(){var t=m(),n=E(r);if(n){if(A(),!E(i))return _("property missing ':'");var o=E(a),u=t({type:"declaration",property:l(n[0].replace(e,c)),value:o?l(o[0].replace(e,c)):c});return E(s),u}}return f.prototype.content=o,T(),function(){var e,t=[];for(g(t);e=k();)!1!==e&&(t.push(e),g(t));return t}()},ge}());return be}();const Se=u(Ie),Ne=Se.default||Se,Ce=De("end"),ye=De("start");function De(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Oe(e){return e&&"object"==typeof e?"position"in e||"type"in e?Le(e.position):"start"in e||"end"in e?Le(e):"line"in e||"column"in e?Re(e):"":""}function Re(e){return we(e&&e.line)+":"+we(e&&e.column)}function Le(e){return Re(e&&e.start)+"-"+Re(e&&e.end)}function we(e){return e&&"number"==typeof e?e:1}class Pe extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},a=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=s?s.line:void 0,this.name=Oe(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}Pe.prototype.file="",Pe.prototype.name="",Pe.prototype.reason="",Pe.prototype.message="",Pe.prototype.stack="",Pe.prototype.column=void 0,Pe.prototype.line=void 0,Pe.prototype.ancestors=void 0,Pe.prototype.cause=void 0,Pe.prototype.fatal=void 0,Pe.prototype.place=void 0,Pe.prototype.ruleId=void 0,Pe.prototype.source=void 0;const xe={}.hasOwnProperty,Me=new Map,ve=/[A-Z]/g,Be=/-([a-z])/g,Fe=new Set(["table","tbody","thead","tfoot","tr"]),He=new Set(["td","th"]),Ue="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ge(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,i,a){const s=Array.isArray(i.children),o=ye(n);return t(r,i,a,s,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,i,a){const s=Array.isArray(i.children)?n:t;return a?s(r,i,a):s(r,i)}}(0,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?_e:fe,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},a=ze(i,e,void 0);return a&&"string"!=typeof a?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ze(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(i=_e,e.schema=i);e.ancestors.push(t);const a=We(e,t.tagName,!1),s=function(e,t){const n={};let r,i;for(i in t.properties)if("children"!==i&&xe.call(t.properties,i)){const a=Ve(e,i,t.properties[i]);if(a){const[i,s]=a;e.tableCellAlignToStyle&&"align"===i&&"string"==typeof s&&He.has(t.tagName)?r=s:n[i]=s}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let o=qe(e,t);Fe.has(t.tagName)&&(o=o.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&x(t.value):x(t));var t})));return Ye(e,s,a,t),je(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Qe(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.name&&"html"===r.space&&(i=_e,e.schema=i);e.ancestors.push(t);const a=null===t.name?e.Fragment:We(e,t.name,!0),s=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const i=t.expression;i.type;const a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Qe(e,t.position);else{const i=r.name;let a;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Qe(e,t.position);else a=null===r.value||r.value;n[i]=a}return n}(e,t),o=qe(e,t);return Ye(e,s,a,t),je(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Qe(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return je(r,qe(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Ye(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function je(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function qe(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Me;for(;++ri?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s0?(at(e,e.length,0,t),e):t}const ot={}.hasOwnProperty;function ct(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function pt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const dt=Nt(/[A-Za-z]/),mt=Nt(/[\dA-Za-z]/),ft=Nt(/[#-'*+\--9=?A-Z^-~]/);function _t(e){return null!==e&&(e<32||127===e)}const Et=Nt(/\d/),Tt=Nt(/[\dA-Fa-f]/),gt=Nt(/[!-/:-@[-`{-~]/);function At(e){return null!==e&&e<-2}function kt(e){return null!==e&&(e<0||32===e)}function bt(e){return-2===e||-1===e||32===e}const It=Nt(/\p{P}|\p{S}/u),St=Nt(/\s/);function Nt(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Ct(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&a<57344){const t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(s=String.fromCharCode(a,t),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function yt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return function(r){if(bt(r))return e.enter(n),s(r);return t(r)};function s(r){return bt(r)&&a++a))return;const n=t.events.length;let i,o,c=n;for(;c--;)if("exit"===t.events[c][0]&&"chunkFlow"===t.events[c][1].type){if(i){o=t.events[c][1].end;break}i=!0}for(E(s),e=n;er;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function T(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Rt={tokenize:function(e,t,n){return yt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Lt(e){return null===e||kt(e)||St(e)?1:It(e)?2:void 0}function wt(e,t,n){const r=[];let i=-1;for(;++i1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const h=Object.assign({},e[n][1].end),p=Object.assign({},e[u][1].start);xt(h,-o),xt(p,o),a={type:o>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[n][1].end)},s={type:o>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:p},i={type:o>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[u][1].start)},r={type:o>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},a.start),e[u][1].start=Object.assign({},s.end),c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=st(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=st(c,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=st(c,wt(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),c=st(c,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(l=2,c=st(c,[["enter",e[u][1],t],["exit",e[u][1],t]])):l=0,at(e,n-1,u-n+3,c),u=n+c.length-l-2;break}u=-1;for(;++u=o?(e.exit("codeFencedFenceSequence"),bt(t)?yt(e,h,"whitespace")(t):h(t)):n(t)}function h(r){return null===r||At(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0};let a,s=0,o=0;return function(t){return function(t){const n=r.events[r.events.length-1];return s=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,a=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(t)}(t)};function c(t){return t===a?(o++,e.consume(t),c):o<3?n(t):(e.exit("codeFencedFenceSequence"),bt(t)?yt(e,l,"whitespace")(t):l(t))}function l(n){return null===n||At(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Ut,d,T)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||At(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(t)):bt(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),yt(e,h,"whitespace")(t)):96===t&&t===a?n(t):(e.consume(t),u)}function h(t){return null===t||At(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||At(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(t)):96===t&&t===a?n(t):(e.consume(t),p)}function d(t){return e.attempt(i,T,m)(t)}function m(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f}function f(t){return s>0&&bt(t)?yt(e,_,"linePrefix",s+1)(t):_(t)}function _(t){return null===t||At(t)?e.check(Ut,d,T)(t):(e.enter("codeFlowValue"),E(t))}function E(t){return null===t||At(t)?(e.exit("codeFlowValue"),_(t)):(e.consume(t),E)}function T(n){return e.exit("codeFenced"),t(n)}},concrete:!0};const zt={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),yt(e,i,"linePrefix",5)(t)};function i(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):n(e)}function a(t){return null===t?o(t):At(t)?e.attempt(Yt,a,o)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||At(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),s)}function o(n){return e.exit("codeIndented"),t(n)}}},Yt={tokenize:function(e,t,n){const r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):At(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):yt(e,a,"linePrefix",5)(t)}function a(e){const a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):At(e)?i(e):n(e)}},partial:!0};const jt={name:"codeText",tokenize:function(e,t,n){let r,i,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),a++,s):(e.exit("codeTextSequence"),o(t))}function o(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),o):96===t?(i=e.enter("codeTextSequence"),r=0,l(t)):At(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||At(t)?(e.exit("codeTextData"),o(t)):(e.consume(t),c)}function l(n){return 96===n?(e.consume(n),r++,l):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",c(n))}},resolve:function(e){let t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Vt(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Vt(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Vt(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}},partial:!0};function Jt(e,t,n,r,i,a,s,o,c){const l=c||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),h;if(null===t||32===t||41===t||_t(t))return n(t);return e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),m(t)};function h(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(o),h(t)):null===t||60===t||At(t)?n(t):(e.consume(t),92===t?d:p)}function d(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function m(i){return u||null!==i&&41!==i&&!kt(i)?u999||null===h||91===h||93===h&&!o||94===h&&!c&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):93===h?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):At(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(t){return null===t||91===t||93===t||At(t)||c++>999?(e.exit("chunkString"),l(t)):(e.consume(t),o||(o=!bt(t)),92===t?h:u)}function h(t){return 91===t||92===t||93===t?(e.consume(t),c++,u):u(t)}}function Zt(e,t,n,r,i,a){let s;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(i),e.consume(t),e.exit(i),s=40===t?41:t,o;return n(t)};function o(n){return n===s?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),c(n))}function c(t){return t===s?(e.exit(a),o(s)):null===t?n(t):At(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),yt(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(t))}function l(t){return t===s||null===t||At(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?u:l)}function u(t){return t===s||92===t?(e.consume(t),l):l(t)}}function en(e,t){let n;return function r(i){if(At(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r;if(bt(i))return yt(e,r,n?"linePrefix":"lineSuffix")(i);return t(i)}}const tn={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return $t.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return i=pt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):n(t)}function s(t){return kt(t)?en(e,o)(t):o(t)}function o(t){return Jt(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function c(t){return e.attempt(nn,l,l)(t)}function l(t){return bt(t)?yt(e,u,"whitespace")(t):u(t)}function u(a){return null===a||At(a)?(e.exit("definition"),r.parser.defined.push(i),t(a)):n(a)}}},nn={tokenize:function(e,t,n){return function(t){return kt(t)?en(e,r)(t):n(t)};function r(t){return Zt(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return bt(t)?yt(e,a,"whitespace")(t):a(t)}function a(e){return null===e||At(e)?t(e):n(e)}},partial:!0};const rn={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return At(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const an={name:"headingAtx",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||kt(t)?(e.exit("atxHeadingSequence"),a(t)):n(t)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),s(n)):null===n||At(n)?(e.exit("atxHeading"),t(n)):bt(n)?yt(e,a,"whitespace")(n):(e.enter("atxHeadingText"),o(n))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),a(t))}function o(t){return null===t||35===t||kt(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),o)}},resolve:function(e,t){let n,r,i=e.length-2,a=3;"whitespace"===e[a][1].type&&(a+=2);i-2>a&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(a===i-1||i-4>a&&"whitespace"===e[i-2][1].type)&&(i-=a+1===i?2:4);i>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},r={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},at(e,a,i-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e}};const sn=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],on=["pre","script","style","textarea"],cn={name:"htmlFlow",tokenize:function(e,t,n){const r=this;let i,a,s,o,c;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),l}(t)};function l(o){return 33===o?(e.consume(o),u):47===o?(e.consume(o),a=!0,d):63===o?(e.consume(o),i=3,r.interrupt?t:x):dt(o)?(e.consume(o),s=String.fromCharCode(o),m):n(o)}function u(a){return 45===a?(e.consume(a),i=2,h):91===a?(e.consume(a),i=5,o=0,p):dt(a)?(e.consume(a),i=4,r.interrupt?t:x):n(a)}function h(i){return 45===i?(e.consume(i),r.interrupt?t:x):n(i)}function p(i){const a="CDATA[";return i===a.charCodeAt(o++)?(e.consume(i),6===o?r.interrupt?t:C:p):n(i)}function d(t){return dt(t)?(e.consume(t),s=String.fromCharCode(t),m):n(t)}function m(o){if(null===o||47===o||62===o||kt(o)){const c=47===o,l=s.toLowerCase();return c||a||!on.includes(l)?sn.includes(s.toLowerCase())?(i=6,c?(e.consume(o),f):r.interrupt?t(o):C(o)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(o):a?_(o):E(o)):(i=1,r.interrupt?t(o):C(o))}return 45===o||mt(o)?(e.consume(o),s+=String.fromCharCode(o),m):n(o)}function f(i){return 62===i?(e.consume(i),r.interrupt?t:C):n(i)}function _(t){return bt(t)?(e.consume(t),_):S(t)}function E(t){return 47===t?(e.consume(t),S):58===t||95===t||dt(t)?(e.consume(t),T):bt(t)?(e.consume(t),E):S(t)}function T(t){return 45===t||46===t||58===t||95===t||mt(t)?(e.consume(t),T):g(t)}function g(t){return 61===t?(e.consume(t),A):bt(t)?(e.consume(t),g):E(t)}function A(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),c=t,k):bt(t)?(e.consume(t),A):b(t)}function k(t){return t===c?(e.consume(t),c=null,I):null===t||At(t)?n(t):(e.consume(t),k)}function b(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||kt(t)?g(t):(e.consume(t),b)}function I(e){return 47===e||62===e||bt(e)?E(e):n(e)}function S(t){return 62===t?(e.consume(t),N):n(t)}function N(t){return null===t||At(t)?C(t):bt(t)?(e.consume(t),N):n(t)}function C(t){return 45===t&&2===i?(e.consume(t),R):60===t&&1===i?(e.consume(t),L):62===t&&4===i?(e.consume(t),M):63===t&&3===i?(e.consume(t),x):93===t&&5===i?(e.consume(t),P):!At(t)||6!==i&&7!==i?null===t||At(t)?(e.exit("htmlFlowData"),y(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(ln,v,y)(t))}function y(t){return e.check(un,D,v)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),O}function O(t){return null===t||At(t)?y(t):(e.enter("htmlFlowData"),C(t))}function R(t){return 45===t?(e.consume(t),x):C(t)}function L(t){return 47===t?(e.consume(t),s="",w):C(t)}function w(t){if(62===t){const n=s.toLowerCase();return on.includes(n)?(e.consume(t),M):C(t)}return dt(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),w):C(t)}function P(t){return 93===t?(e.consume(t),x):C(t)}function x(t){return 62===t?(e.consume(t),M):45===t&&2===i?(e.consume(t),x):C(t)}function M(t){return null===t||At(t)?(e.exit("htmlFlowData"),v(t)):(e.consume(t),M)}function v(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},ln={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(vt,t,n)}},partial:!0},un={tokenize:function(e,t,n){const r=this;return function(t){if(At(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i;return n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0};const hn={name:"htmlText",tokenize:function(e,t,n){const r=this;let i,a,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),o};function o(t){return 33===t?(e.consume(t),c):47===t?(e.consume(t),A):63===t?(e.consume(t),T):dt(t)?(e.consume(t),I):n(t)}function c(t){return 45===t?(e.consume(t),l):91===t?(e.consume(t),a=0,d):dt(t)?(e.consume(t),E):n(t)}function l(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),h):At(t)?(s=u,w(t)):(e.consume(t),u)}function h(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?L(e):45===e?h(e):u(e)}function d(t){const r="CDATA[";return t===r.charCodeAt(a++)?(e.consume(t),6===a?m:d):n(t)}function m(t){return null===t?n(t):93===t?(e.consume(t),f):At(t)?(s=m,w(t)):(e.consume(t),m)}function f(t){return 93===t?(e.consume(t),_):m(t)}function _(t){return 62===t?L(t):93===t?(e.consume(t),_):m(t)}function E(t){return null===t||62===t?L(t):At(t)?(s=E,w(t)):(e.consume(t),E)}function T(t){return null===t?n(t):63===t?(e.consume(t),g):At(t)?(s=T,w(t)):(e.consume(t),T)}function g(e){return 62===e?L(e):T(e)}function A(t){return dt(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||mt(t)?(e.consume(t),k):b(t)}function b(t){return At(t)?(s=b,w(t)):bt(t)?(e.consume(t),b):L(t)}function I(t){return 45===t||mt(t)?(e.consume(t),I):47===t||62===t||kt(t)?S(t):n(t)}function S(t){return 47===t?(e.consume(t),L):58===t||95===t||dt(t)?(e.consume(t),N):At(t)?(s=S,w(t)):bt(t)?(e.consume(t),S):L(t)}function N(t){return 45===t||46===t||58===t||95===t||mt(t)?(e.consume(t),N):C(t)}function C(t){return 61===t?(e.consume(t),y):At(t)?(s=C,w(t)):bt(t)?(e.consume(t),C):S(t)}function y(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),i=t,D):At(t)?(s=y,w(t)):bt(t)?(e.consume(t),y):(e.consume(t),O)}function D(t){return t===i?(e.consume(t),i=void 0,R):null===t?n(t):At(t)?(s=D,w(t)):(e.consume(t),D)}function O(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||kt(t)?S(t):(e.consume(t),O)}function R(e){return 47===e||62===e||kt(e)?S(e):n(e)}function L(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function w(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return bt(t)?yt(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):x(t)}function x(t){return e.enter("htmlTextData"),s(t)}}};const pn={name:"labelEnd",tokenize:function(e,t,n){const r=this;let i,a,s=r.events.length;for(;s--;)if(("labelImage"===r.events[s][1].type||"labelLink"===r.events[s][1].type)&&!r.events[s][1]._balanced){i=r.events[s][1];break}return function(t){if(!i)return n(t);if(i._inactive)return u(t);return a=r.parser.defined.includes(pt(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),o};function o(t){return 40===t?e.attempt(dn,l,a?l:u)(t):91===t?e.attempt(mn,l,a?c:u)(t):a?l(t):u(t)}function c(t){return e.attempt(fn,l,u)(t)}function l(e){return t(e)}function u(e){return i._balanced=!0,n(e)}},resolveTo:function(e,t){let n,r,i,a,s=e.length,o=0;for(;s--;)if(n=e[s][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=s,"labelLink"!==n.type)){o=2;break}}else"labelEnd"===n.type&&(i=s);const c={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[i][1].end)},u={type:"labelText",start:Object.assign({},e[r+o+2][1].end),end:Object.assign({},e[i-2][1].start)};return a=[["enter",c,t],["enter",l,t]],a=st(a,e.slice(r+1,r+o+3)),a=st(a,[["enter",u,t]]),a=st(a,wt(t.parser.constructs.insideSpan.null,e.slice(r+o+4,i-3),t)),a=st(a,[["exit",u,t],e[i-2],e[i-1],["exit",l,t]]),a=st(a,e.slice(i+1)),a=st(a,[["exit",c,t]]),at(e,r,e.length,a),e},resolveAll:function(e){let t=-1;for(;++t=3&&(null===a||At(a))?(e.exit("thematicBreak"),t(a)):n(a)}function s(t){return t===r?(e.consume(t),i++,s):(e.exit("thematicBreakSequence"),bt(t)?yt(e,a,"whitespace")(t):a(t))}}};const An={name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,s=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:Et(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(gn,n,c)(t):c(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(t)}return n(t)};function o(t){return Et(t)&&++s<10?(e.consume(t),o):(!r.interrupt||s<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),c(t)):n(t)}function c(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(vt,r.interrupt?n:l,e.attempt(kn,h,u))}function l(e){return r.containerState.initialBlankLine=!0,a++,h(e)}function u(t){return bt(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),h):n(t)}function h(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(vt,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,yt(e,t,"listItemIndent",r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!bt(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(bn,t,s)(n))}function s(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,yt(e,e.attempt(An,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},kn={tokenize:function(e,t,n){const r=this;return yt(e,(function(e){const i=r.events[r.events.length-1];return!bt(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},bn={tokenize:function(e,t,n){const r=this;return yt(e,(function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0};const In={name:"setextUnderline",tokenize:function(e,t,n){const r=this;let i;return function(t){let s,o=r.events.length;for(;o--;)if("lineEnding"!==r.events[o][1].type&&"linePrefix"!==r.events[o][1].type&&"content"!==r.events[o][1].type){s="paragraph"===r.events[o][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||s))return e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),a(t)}(t);return n(t)};function a(t){return t===i?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),bt(t)?yt(e,s,"lineSuffix")(t):s(t))}function s(r){return null===r||At(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,i,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),i||"definition"!==e[a][1].type||(i=a);const s={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",s,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[i][1].end)):e[n][1]=s;return e.push(["exit",s,t]),e}};const Sn={tokenize:function(e){const t=this,n=e.attempt(vt,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,yt(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Xt,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Nn={resolveAll:On()},Cn=Dn("string"),yn=Dn("text");function Dn(e){return{tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,a,s);return a;function a(e){return c(e)?i(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),o;t.consume(e)}function o(e){return c(e)?(t.exit("data"),i(e)):(t.consume(e),o)}function c(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i-1){const e=s[0];"string"==typeof e?s[0]=e.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}(s,e)}function p(){const{line:e,column:t,offset:n,_index:i,_bufferIndex:a}=r;return{line:e,column:t,offset:n,_index:i,_bufferIndex:a}}function d(){let e;for(;r._index0){const e=a.tokenStack[a.tokenStack.length-1];(e[1]||Qn).call(a,void 0,e[0])}for(r.position={start:qn(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:qn(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},h=-1;++h1:t}function $n(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Zn(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Zn(t.slice(i),i>0,!1)),a.join("")}function Zn(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}const er={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ct(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);void 0===o?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(r,o);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const l={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Kn(e,t);const i={src:Ct(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){const n={src:Ct(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Kn(e,t);const i={href:Ct(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){const n={href:Ct(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=ye(t.children[1]),s=Ce(t.children[t.children.length-1]);a&&s&&(r.position={start:a,end:s}),i.push(r)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,s=a?a.length:t.children.length;let o=-1;const c=[];for(;++o((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case 0:case-1:return n(s,i);case 1:{const e=n([],i);for(const t of s)e.push(r(t));return e}case 2:{const e=n({},i);for(const[t,n]of s)e[r(t)]=r(n);return e}case 3:return n(new Date(s),i);case 4:{const{source:e,flags:t}=s;return n(new RegExp(e,t),i)}case 5:{const e=n(new Map,i);for(const[t,n]of s)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,i);for(const t of s)e.add(r(t));return e}case 7:{const{name:e,message:t}=s;return n(new nr[e](t),i)}case 8:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new nr[a](s),i)};return r})(new Map,e)(0),ir="",{toString:ar}={},{keys:sr}=Object,or=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=ar.call(e).slice(8,-1);switch(n){case"Array":return[1,ir];case"Object":return[2,ir];case"Date":return[3,ir];case"RegExp":return[4,ir];case"Map":return[5,ir];case"Set":return[6,ir]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},cr=([e,t])=>0===e&&("function"===t||"symbol"===t),lr=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const i=(e,t)=>{const i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[s,o]=or(r);switch(s){case 0:{let t=r;switch(o){case"bigint":s=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);t=null;break;case"undefined":return i([-1],r)}return i([s,t],r)}case 1:{if(o)return i([o,[...r]],r);const e=[],t=i([s,e],r);for(const n of r)e.push(a(n));return t}case 2:{if(o)switch(o){case"BigInt":return i([o,r.toString()],r);case"Boolean":case"Number":case"String":return i([o,r.valueOf()],r)}if(t&&"toJSON"in r)return a(r.toJSON());const n=[],c=i([s,n],r);for(const t of sr(r))!e&&cr(or(r[t]))||n.push([a(t),a(r[t])]);return c}case 3:return i([s,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return i([s,{source:e,flags:t}],r)}case 5:{const t=[],n=i([s,t],r);for(const[i,s]of r)(e||!cr(or(i))&&!cr(or(s)))&&t.push([a(i),a(s)]);return n}case 6:{const t=[],n=i([s,t],r);for(const i of r)!e&&cr(or(i))||t.push(a(i));return n}}const{message:c}=r;return i([s,{name:o,message:c}],r)};return a})(!(t||n),!!t,new Map,r)(e),r},ur="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?rr(lr(e,t)):structuredClone(e):(e,t)=>rr(lr(e,t));function hr(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function pr(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const dr=function(e){if(null==e)return fr;if("function"==typeof e)return mr(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n":"")+")"})}return u;function u(){let l,u,h,p=_r;if((!t||a(i,o,c[c.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Er,e];return null==e?_r:[e]}(n(i,c)),p[0]===Tr))return p;if("children"in i&&i.children){const t=i;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+s,h=c.concat(t);u>-1&&u0&&n.push({type:"text",value:"\n"}),n}function yr(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Dr(e,t){const n=function(e,t){const n=t||br,r=new Map,i=new Map,a=new Map,s={...er,...n.handlers},o={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r0&&h.push({type:"text",value:" "});let e="string"==typeof n?n:n(c,u);"string"==typeof e&&(e={type:"text",value:e}),h.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+l+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(c,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const d=a[a.length-1];if(d&&"element"===d.type&&"p"===d.tagName){const e=d.children[d.children.length-1];e&&"text"===e.type?e.value+=" ":d.children.push({type:"text",value:" "}),d.children.push(...h)}else a.push(...h);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+l},children:e.wrap(a,!0)};e.patch(i,m),o.push(m)}if(0!==o.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...ur(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:"\n"}]}}(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:"\n"},i),a}function Or(e,t){return e&&"run"in e?async function(n,r){const i=Dr(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Dr(n,{file:r,...e||t})}}function Rr(e){if(e)throw e}var Lr,wr;var Pr=function(){if(wr)return Lr;wr=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},a=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),a=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!a)return!1;for(r in n);return void 0===r||e.call(n,r)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},o=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return Lr=function e(){var t,n,r,c,l,u,h=arguments[0],p=1,d=arguments.length,m=!1;for("boolean"==typeof h&&(m=h,h=arguments[1]||{},p=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});pt.length;let o;r&&t.push(i);try{o=e.apply(this,t)}catch(a){if(r&&n)throw a;return i(a)}r||(o&&o.then&&"function"==typeof o.then?o.then(s,i):o instanceof Error?i(o):s(o))}function i(e,...r){n||(n=!0,t(e,...r))}function s(e){i(null,e)}}(o,i)(...s):r(null,...s)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Br={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Fr(e);let n,r=0,i=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let s=-1,o=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else s<0&&(n=!0,s=a+1),o>-1&&(e.codePointAt(a)===t.codePointAt(o--)?o<0&&(i=a):(o=-1,i=s));r===i?i=s:i<0&&(i=e.length);return e.slice(r,i)},dirname:function(e){if(Fr(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Fr(e);let t,n=e.length,r=-1,i=0,a=-1,s=0;for(;n--;){const o=e.codePointAt(n);if(47!==o)r<0&&(t=!0,r=n+1),46===o?a<0?a=n:1!==s&&(s=1):a>-1&&(s=-1);else if(t){i=n+1;break}}if(a<0||r<0||0===s||1===s&&a===r-1&&a===i+1)return"";return e.slice(a,r)},join:function(...e){let t,n=-1;for(;++n2){if(r=i.lastIndexOf("/"),r!==i.length-1){r<0?(i="",a=0):(i=i.slice(0,r),a=i.length-1-i.lastIndexOf("/")),s=c,o=0;continue}}else if(i.length>0){i="",a=0,s=c,o=0;continue}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(s+1,c):i=e.slice(s+1,c),a=c-s-1;s=c,o=0}else 46===n&&o>-1?o++:o=-1}return i}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function Fr(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Hr={cwd:function(){return"/"}};function Ur(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Gr(e){if("string"==typeof e)e=new URL(e);else if(!Ur(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n0){let[r,...a]=t;const s=n[i][1];Mr(s)&&Mr(r)&&(r=xr(!0,s,r)),n[i]=[e,r,...a]}}}}const Kr=(new Xr).freeze();function Jr(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function $r(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Zr(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ei(e){if(!Mr(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function ti(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ni(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Yr(e)}const ri=[],ii={allowDangerousHtml:!0},ai=/^(https?|ircs?|mailto|xmpp)$/i,si=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function oi(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,s=e.disallowedElements,o=e.rehypePlugins||ri,c=e.remarkPlugins||ri,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ii}:ii,u=e.skipHtml,p=e.unwrapDisallowed,d=e.urlTransform||ci,m=Kr().use(Xn).use(c).use(Or,l).use(o),f=new Yr;"string"==typeof r&&(f.value=r);for(const h of si)Object.hasOwn(e,h.from)&&(h.from,h.to&&h.to,h.id);const _=m.parse(f);let E=m.runSync(_,f);return i&&(E={type:"element",tagName:"div",properties:{className:i},children:"root"===E.type?E.children:[E]}),Ar(E,(function(e,r,i){if("raw"===e.type&&i&&"number"==typeof r)return u?i.children.splice(r,1):i.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in $e)if(Object.hasOwn($e,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=$e[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=d(String(n||""),t,e))}}if("element"===e.type){let a=t?!t.includes(e.tagName):!!s&&s.includes(e.tagName);if(!a&&n&&"number"==typeof r&&(a=!n(e,r,i)),a&&i&&"number"==typeof r)return p&&e.children?i.children.splice(r,1,...e.children):i.children.splice(r,1),r}})),Ge(E,{Fragment:h.Fragment,components:a,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0})}function ci(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||ai.test(e.slice(0,t))?e:""}const li=/[#.]/g;const ui=new Set(["button","menu","reset","submit"]),hi={}.hasOwnProperty;function pi(e,t,n){const r=n&&function(e){const t={};let n=-1;for(;++n1?n[e.line-2]:0)+e.column-1;if(r-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(void 0===i){const e=Ti(t,n[r-1]);i=-1===e?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}}}(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case"#documentType":return n={type:"doctype"},Si(e,t,n),n;case"#text":{const r=t;return n={type:"text",value:r.value},Si(e,r,n),n}default:return n=function(e,t){const n=e.schema;e.schema=t.namespaceURI===gi.svg?_e:fe;let r=-1;const i={};for(;++r=55296&&e<=57343}function Wi(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function Qi(e){return e>=64976&&e<=65007||Bi.has(e)}var Xi;!function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"}(Xi||(Xi={}));class Ki{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){const{line:n,col:r,offset:i}=this,a=r+t,s=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:s,endOffset:s}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(function(e){return e>=56320&&e<=57343}(t))return this.pos++,this._addGap(),1024*(e-55296)+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Hi.EOF;return this._err(Xi.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let n=0;n=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Hi.EOF;const n=this.html.charCodeAt(t);return n===Hi.CARRIAGE_RETURN?Hi.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Hi.EOF;let e=this.html.charCodeAt(this.pos);if(e===Hi.CARRIAGE_RETURN)return this.isEol=!0,this.skipNextNewLine=!0,Hi.LINE_FEED;if(e===Hi.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine))return this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance();this.skipNextNewLine=!1,Vi(e)&&(e=this._processSurrogate(e));return null===this.handler.onParseError||e>31&&e<127||e===Hi.LINE_FEED||e===Hi.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){Wi(e)?this._err(Xi.controlCharacterInInputStream):Qi(e)&&this._err(Xi.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}!function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"}(Ji||(Ji={}));const Zi=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((e=>e.charCodeAt(0)))),ea=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e=>e.charCodeAt(0))));var ta;const na=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),ra=null!==(ta=String.fromCodePoint)&&void 0!==ta?ta:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};var ia;!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(ia||(ia={}));var aa,sa,oa,ca,la,ua,ha,pa;function da(e){return e>=ia.ZERO&&e<=ia.NINE}function ma(e){return e>=ia.UPPER_A&&e<=ia.UPPER_F||e>=ia.LOWER_A&&e<=ia.LOWER_F}function fa(e){return e===ia.EQUALS||function(e){return e>=ia.UPPER_A&&e<=ia.UPPER_Z||e>=ia.LOWER_A&&e<=ia.LOWER_Z||da(e)}(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(aa||(aa={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(sa||(sa={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(oa||(oa={}));class _a{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=sa.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=oa.Strict}startEntity(e){this.decodeMode=e,this.state=sa.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case sa.EntityStart:return e.charCodeAt(t)===ia.NUM?(this.state=sa.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=sa.NamedEntity,this.stateNamedEntity(e,t));case sa.NumericStart:return this.stateNumericStart(e,t);case sa.NumericDecimal:return this.stateNumericDecimal(e,t);case sa.NumericHex:return this.stateNumericHex(e,t);case sa.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===ia.LOWER_X?(this.state=sa.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=sa.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const i=n-t;this.result=this.result*Math.pow(r,i)+parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){const n=t;for(;t=55296&&e<=57343||e>1114111?65533:null!==(t=na.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==ia.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],i=(r&aa.VALUE_LENGTH)>>14;for(;t>14,0!==i){if(a===ia.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==oa.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&aa.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~aa.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case sa.NamedEntity:return 0===this.result||this.decodeMode===oa.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case sa.NumericDecimal:return this.emitNumericEntity(0,2);case sa.NumericHex:return this.emitNumericEntity(0,3);case sa.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case sa.EntityStart:return 0}}}function Ea(e){let t="";const n=new _a(e,(e=>t+=ra(e)));return function(e,r){let i=0,a=0;for(;(a=e.indexOf("&",a))>=0;){t+=e.slice(i,a),n.startEntity(r);const s=n.write(e,a+1);if(s<0){i=a+n.end();break}i=a+s,a=0===s?i+1:i}const s=t+e.slice(i);return t="",s}}function Ta(e,t,n,r){const i=(t&aa.BRANCH_LENGTH)>>7,a=t&aa.JUMP_TABLE;if(0===i)return 0!==a&&r===a?n:-1;if(a){const t=r-a;return t<0||t>=i?-1:e[n+t]-1}let s=n,o=s+i-1;for(;s<=o;){const t=s+o>>>1,n=e[t];if(nr))return e[t+i];o=t-1}}return-1}Ea(Zi),Ea(ea),function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"}(ca||(ca={})),function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"}(la||(la={})),function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"}(ua||(ua={})),function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"}(ha||(ha={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"}(pa||(pa={}));const ga=new Map([[ha.A,pa.A],[ha.ADDRESS,pa.ADDRESS],[ha.ANNOTATION_XML,pa.ANNOTATION_XML],[ha.APPLET,pa.APPLET],[ha.AREA,pa.AREA],[ha.ARTICLE,pa.ARTICLE],[ha.ASIDE,pa.ASIDE],[ha.B,pa.B],[ha.BASE,pa.BASE],[ha.BASEFONT,pa.BASEFONT],[ha.BGSOUND,pa.BGSOUND],[ha.BIG,pa.BIG],[ha.BLOCKQUOTE,pa.BLOCKQUOTE],[ha.BODY,pa.BODY],[ha.BR,pa.BR],[ha.BUTTON,pa.BUTTON],[ha.CAPTION,pa.CAPTION],[ha.CENTER,pa.CENTER],[ha.CODE,pa.CODE],[ha.COL,pa.COL],[ha.COLGROUP,pa.COLGROUP],[ha.DD,pa.DD],[ha.DESC,pa.DESC],[ha.DETAILS,pa.DETAILS],[ha.DIALOG,pa.DIALOG],[ha.DIR,pa.DIR],[ha.DIV,pa.DIV],[ha.DL,pa.DL],[ha.DT,pa.DT],[ha.EM,pa.EM],[ha.EMBED,pa.EMBED],[ha.FIELDSET,pa.FIELDSET],[ha.FIGCAPTION,pa.FIGCAPTION],[ha.FIGURE,pa.FIGURE],[ha.FONT,pa.FONT],[ha.FOOTER,pa.FOOTER],[ha.FOREIGN_OBJECT,pa.FOREIGN_OBJECT],[ha.FORM,pa.FORM],[ha.FRAME,pa.FRAME],[ha.FRAMESET,pa.FRAMESET],[ha.H1,pa.H1],[ha.H2,pa.H2],[ha.H3,pa.H3],[ha.H4,pa.H4],[ha.H5,pa.H5],[ha.H6,pa.H6],[ha.HEAD,pa.HEAD],[ha.HEADER,pa.HEADER],[ha.HGROUP,pa.HGROUP],[ha.HR,pa.HR],[ha.HTML,pa.HTML],[ha.I,pa.I],[ha.IMG,pa.IMG],[ha.IMAGE,pa.IMAGE],[ha.INPUT,pa.INPUT],[ha.IFRAME,pa.IFRAME],[ha.KEYGEN,pa.KEYGEN],[ha.LABEL,pa.LABEL],[ha.LI,pa.LI],[ha.LINK,pa.LINK],[ha.LISTING,pa.LISTING],[ha.MAIN,pa.MAIN],[ha.MALIGNMARK,pa.MALIGNMARK],[ha.MARQUEE,pa.MARQUEE],[ha.MATH,pa.MATH],[ha.MENU,pa.MENU],[ha.META,pa.META],[ha.MGLYPH,pa.MGLYPH],[ha.MI,pa.MI],[ha.MO,pa.MO],[ha.MN,pa.MN],[ha.MS,pa.MS],[ha.MTEXT,pa.MTEXT],[ha.NAV,pa.NAV],[ha.NOBR,pa.NOBR],[ha.NOFRAMES,pa.NOFRAMES],[ha.NOEMBED,pa.NOEMBED],[ha.NOSCRIPT,pa.NOSCRIPT],[ha.OBJECT,pa.OBJECT],[ha.OL,pa.OL],[ha.OPTGROUP,pa.OPTGROUP],[ha.OPTION,pa.OPTION],[ha.P,pa.P],[ha.PARAM,pa.PARAM],[ha.PLAINTEXT,pa.PLAINTEXT],[ha.PRE,pa.PRE],[ha.RB,pa.RB],[ha.RP,pa.RP],[ha.RT,pa.RT],[ha.RTC,pa.RTC],[ha.RUBY,pa.RUBY],[ha.S,pa.S],[ha.SCRIPT,pa.SCRIPT],[ha.SEARCH,pa.SEARCH],[ha.SECTION,pa.SECTION],[ha.SELECT,pa.SELECT],[ha.SOURCE,pa.SOURCE],[ha.SMALL,pa.SMALL],[ha.SPAN,pa.SPAN],[ha.STRIKE,pa.STRIKE],[ha.STRONG,pa.STRONG],[ha.STYLE,pa.STYLE],[ha.SUB,pa.SUB],[ha.SUMMARY,pa.SUMMARY],[ha.SUP,pa.SUP],[ha.TABLE,pa.TABLE],[ha.TBODY,pa.TBODY],[ha.TEMPLATE,pa.TEMPLATE],[ha.TEXTAREA,pa.TEXTAREA],[ha.TFOOT,pa.TFOOT],[ha.TD,pa.TD],[ha.TH,pa.TH],[ha.THEAD,pa.THEAD],[ha.TITLE,pa.TITLE],[ha.TR,pa.TR],[ha.TRACK,pa.TRACK],[ha.TT,pa.TT],[ha.U,pa.U],[ha.UL,pa.UL],[ha.SVG,pa.SVG],[ha.VAR,pa.VAR],[ha.WBR,pa.WBR],[ha.XMP,pa.XMP]]);function Aa(e){var t;return null!==(t=ga.get(e))&&void 0!==t?t:pa.UNKNOWN}const ka=pa,ba={[ca.HTML]:new Set([ka.ADDRESS,ka.APPLET,ka.AREA,ka.ARTICLE,ka.ASIDE,ka.BASE,ka.BASEFONT,ka.BGSOUND,ka.BLOCKQUOTE,ka.BODY,ka.BR,ka.BUTTON,ka.CAPTION,ka.CENTER,ka.COL,ka.COLGROUP,ka.DD,ka.DETAILS,ka.DIR,ka.DIV,ka.DL,ka.DT,ka.EMBED,ka.FIELDSET,ka.FIGCAPTION,ka.FIGURE,ka.FOOTER,ka.FORM,ka.FRAME,ka.FRAMESET,ka.H1,ka.H2,ka.H3,ka.H4,ka.H5,ka.H6,ka.HEAD,ka.HEADER,ka.HGROUP,ka.HR,ka.HTML,ka.IFRAME,ka.IMG,ka.INPUT,ka.LI,ka.LINK,ka.LISTING,ka.MAIN,ka.MARQUEE,ka.MENU,ka.META,ka.NAV,ka.NOEMBED,ka.NOFRAMES,ka.NOSCRIPT,ka.OBJECT,ka.OL,ka.P,ka.PARAM,ka.PLAINTEXT,ka.PRE,ka.SCRIPT,ka.SECTION,ka.SELECT,ka.SOURCE,ka.STYLE,ka.SUMMARY,ka.TABLE,ka.TBODY,ka.TD,ka.TEMPLATE,ka.TEXTAREA,ka.TFOOT,ka.TH,ka.THEAD,ka.TITLE,ka.TR,ka.TRACK,ka.UL,ka.WBR,ka.XMP]),[ca.MATHML]:new Set([ka.MI,ka.MO,ka.MN,ka.MS,ka.MTEXT,ka.ANNOTATION_XML]),[ca.SVG]:new Set([ka.TITLE,ka.FOREIGN_OBJECT,ka.DESC]),[ca.XLINK]:new Set,[ca.XML]:new Set,[ca.XMLNS]:new Set},Ia=new Set([ka.H1,ka.H2,ka.H3,ka.H4,ka.H5,ka.H6]);var Sa;new Set([ha.STYLE,ha.SCRIPT,ha.XMP,ha.IFRAME,ha.NOEMBED,ha.NOFRAMES,ha.PLAINTEXT]),function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"}(Sa||(Sa={}));const Na={DATA:Sa.DATA,RCDATA:Sa.RCDATA,RAWTEXT:Sa.RAWTEXT,SCRIPT_DATA:Sa.SCRIPT_DATA,PLAINTEXT:Sa.PLAINTEXT,CDATA_SECTION:Sa.CDATA_SECTION};function Ca(e){return e>=Hi.LATIN_CAPITAL_A&&e<=Hi.LATIN_CAPITAL_Z}function ya(e){return function(e){return e>=Hi.LATIN_SMALL_A&&e<=Hi.LATIN_SMALL_Z}(e)||Ca(e)}function Da(e){return ya(e)||function(e){return e>=Hi.DIGIT_0&&e<=Hi.DIGIT_9}(e)}function Oa(e){return e+32}function Ra(e){return e===Hi.SPACE||e===Hi.LINE_FEED||e===Hi.TABULATION||e===Hi.FORM_FEED}function La(e){return Ra(e)||e===Hi.SOLIDUS||e===Hi.GREATER_THAN_SIGN}class wa{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=Sa.DATA,this.returnState=Sa.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Ki(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new _a(Zi,((e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)}),t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Xi.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(Xi.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{const t=function(e){return e===Hi.NULL?Xi.nullCharacterReference:e>1114111?Xi.characterReferenceOutsideUnicodeRange:Vi(e)?Xi.surrogateCharacterReference:Qi(e)?Xi.noncharacterCharacterReference:Wi(e)||e===Hi.CARRIAGE_RETURN?Xi.controlCharacterReference:null}(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;null===(r=(n=this.handler).onParseError)||void 0===r||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t0&&this._err(Xi.endTagWithAttributes),e.selfClosing&&this._err(Xi.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case Ji.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case Ji.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case Ji.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:Ji.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){const t=Ra(e)?Ji.WHITESPACE_CHARACTER:e===Hi.NULL?Ji.NULL_CHARACTER:Ji.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Ji.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Sa.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?oa.Attribute:oa.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Sa.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Sa.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Sa.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Sa.DATA:this._stateData(e);break;case Sa.RCDATA:this._stateRcdata(e);break;case Sa.RAWTEXT:this._stateRawtext(e);break;case Sa.SCRIPT_DATA:this._stateScriptData(e);break;case Sa.PLAINTEXT:this._statePlaintext(e);break;case Sa.TAG_OPEN:this._stateTagOpen(e);break;case Sa.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Sa.TAG_NAME:this._stateTagName(e);break;case Sa.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Sa.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Sa.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Sa.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Sa.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Sa.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Sa.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Sa.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Sa.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Sa.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Sa.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Sa.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Sa.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Sa.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Sa.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Sa.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Sa.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Sa.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Sa.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Sa.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Sa.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Sa.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Sa.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Sa.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Sa.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Sa.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Sa.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Sa.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Sa.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Sa.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Sa.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Sa.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Sa.BOGUS_COMMENT:this._stateBogusComment(e);break;case Sa.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Sa.COMMENT_START:this._stateCommentStart(e);break;case Sa.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Sa.COMMENT:this._stateComment(e);break;case Sa.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Sa.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Sa.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Sa.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Sa.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Sa.COMMENT_END:this._stateCommentEnd(e);break;case Sa.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Sa.DOCTYPE:this._stateDoctype(e);break;case Sa.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Sa.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Sa.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Sa.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Sa.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Sa.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Sa.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Sa.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Sa.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Sa.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Sa.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Sa.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Sa.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Sa.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Sa.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Sa.CDATA_SECTION:this._stateCdataSection(e);break;case Sa.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Sa.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Sa.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Sa.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case Hi.LESS_THAN_SIGN:this.state=Sa.TAG_OPEN;break;case Hi.AMPERSAND:this._startCharacterReference();break;case Hi.NULL:this._err(Xi.unexpectedNullCharacter),this._emitCodePoint(e);break;case Hi.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Hi.AMPERSAND:this._startCharacterReference();break;case Hi.LESS_THAN_SIGN:this.state=Sa.RCDATA_LESS_THAN_SIGN;break;case Hi.NULL:this._err(Xi.unexpectedNullCharacter),this._emitChars(Fi);break;case Hi.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Hi.LESS_THAN_SIGN:this.state=Sa.RAWTEXT_LESS_THAN_SIGN;break;case Hi.NULL:this._err(Xi.unexpectedNullCharacter),this._emitChars(Fi);break;case Hi.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Hi.LESS_THAN_SIGN:this.state=Sa.SCRIPT_DATA_LESS_THAN_SIGN;break;case Hi.NULL:this._err(Xi.unexpectedNullCharacter),this._emitChars(Fi);break;case Hi.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Hi.NULL:this._err(Xi.unexpectedNullCharacter),this._emitChars(Fi);break;case Hi.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(ya(e))this._createStartTagToken(),this.state=Sa.TAG_NAME,this._stateTagName(e);else switch(e){case Hi.EXCLAMATION_MARK:this.state=Sa.MARKUP_DECLARATION_OPEN;break;case Hi.SOLIDUS:this.state=Sa.END_TAG_OPEN;break;case Hi.QUESTION_MARK:this._err(Xi.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Sa.BOGUS_COMMENT,this._stateBogusComment(e);break;case Hi.EOF:this._err(Xi.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(Xi.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=Sa.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(ya(e))this._createEndTagToken(),this.state=Sa.TAG_NAME,this._stateTagName(e);else switch(e){case Hi.GREATER_THAN_SIGN:this._err(Xi.missingEndTagName),this.state=Sa.DATA;break;case Hi.EOF:this._err(Xi.eofBeforeTagName),this._emitChars("");break;case Hi.NULL:this._err(Xi.unexpectedNullCharacter),this.state=Sa.SCRIPT_DATA_ESCAPED,this._emitChars(Fi);break;case Hi.EOF:this._err(Xi.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Sa.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Hi.SOLIDUS?this.state=Sa.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ya(e)?(this._emitChars("<"),this.state=Sa.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=Sa.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){ya(e)?(this.state=Sa.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break;case Hi.NULL:this._err(Xi.unexpectedNullCharacter),this.state=Sa.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Fi);break;case Hi.EOF:this._err(Xi.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Sa.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Hi.SOLIDUS?(this.state=Sa.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=Sa.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Yi,!1)&&La(this.preprocessor.peek(Yi.length))){this._emitCodePoint(e);for(let e=0;e0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==ca.HTML);this.shortenToLength(t<0?0:t)}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(za,ca.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Ga,ca.HTML)}clearBackToTableRowContext(){this.clearBackTo(Ua,ca.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===pa.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===pa.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case ca.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case ca.SVG:if(Ha.has(r))return!1;break;case ca.MATHML:if(Fa.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Ma)}hasInListItemScope(e){return this.hasInDynamicScope(e,va)}hasInButtonScope(e){return this.hasInDynamicScope(e,Ba)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case ca.HTML:if(Ia.has(t))return!0;if(Ma.has(t))return!1;break;case ca.SVG:if(Ha.has(t))return!1;break;case ca.MATHML:if(Fa.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ca.HTML)switch(this.tagIDs[t]){case e:return!0;case pa.TABLE:case pa.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===ca.HTML)switch(this.tagIDs[e]){case pa.TBODY:case pa.THEAD:case pa.TFOOT:return!0;case pa.TABLE:case pa.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ca.HTML)switch(this.tagIDs[t]){case e:return!0;case pa.OPTION:case pa.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;Pa.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;xa.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&xa.has(this.currentTagId);)this.pop()}}var qa;!function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"}(qa||(qa={}));const Va={type:qa.Marker};class Wa{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let s=0;s[e.name,e.value])));let i=0;for(let a=0;ar.get(e.name)===e.value))&&(i+=1,i>=3&&this.entries.splice(e.idx,1))}}insertMarker(){this.entries.unshift(Va)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:qa.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:qa.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);t>=0&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(Va);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){const t=this.entries.find((t=>t.type===qa.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===qa.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===qa.Element&&t.element===e))}}const Qa={createDocument:()=>({nodeName:"#document",mode:ua.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),createTextNode:e=>({nodeName:"#text",value:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(e,t,n,r){const i=e.childNodes.find((e=>"#documentType"===e.nodeName));if(i)i.name=t,i.publicId=n,i.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Qa.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Qa.isTextNode(n))return void(n.value+=t)}Qa.appendChild(e,Qa.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Qa.isTextNode(r)?r.value+=t:Qa.insertBefore(e,Qa.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map((e=>e.name)));for(let r=0;re.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Xa="html",Ka=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Ja=[...Ka,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],$a=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Za=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],es=[...Za,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ts(e,t){return t.some((t=>e.startsWith(t)))}const ns="text/html",rs="application/xhtml+xml",is=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((e=>[e.toLowerCase(),e]))),as=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ca.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ca.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ca.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ca.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ca.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ca.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ca.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ca.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ca.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ca.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ca.XMLNS}]]),ss=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((e=>[e.toLowerCase(),e]))),os=new Set([pa.B,pa.BIG,pa.BLOCKQUOTE,pa.BODY,pa.BR,pa.CENTER,pa.CODE,pa.DD,pa.DIV,pa.DL,pa.DT,pa.EM,pa.EMBED,pa.H1,pa.H2,pa.H3,pa.H4,pa.H5,pa.H6,pa.HEAD,pa.HR,pa.I,pa.IMG,pa.LI,pa.LISTING,pa.MENU,pa.META,pa.NOBR,pa.OL,pa.P,pa.PRE,pa.RUBY,pa.S,pa.SMALL,pa.SPAN,pa.STRONG,pa.STRIKE,pa.SUB,pa.SUP,pa.TABLE,pa.TT,pa.U,pa.UL,pa.VAR]);function cs(e){for(let t=0;t0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(r=(n=this.treeAdapter).onItemPop)||void 0===r||r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}_setContextModes(e,t){const n=e===this.document||this.treeAdapter.getNamespaceURI(e)===ca.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,ca.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=ps.TEXT}switchToPlaintextParsing(){this.insertionMode=ps.TEXT,this.originalInsertionMode=ps.IN_BODY,this.tokenizer.state=Na.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===ha.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===ca.HTML)switch(this.fragmentContextID){case pa.TITLE:case pa.TEXTAREA:this.tokenizer.state=Na.RCDATA;break;case pa.STYLE:case pa.XMP:case pa.IFRAME:case pa.NOEMBED:case pa.NOFRAMES:case pa.NOSCRIPT:this.tokenizer.state=Na.RAWTEXT;break;case pa.SCRIPT:this.tokenizer.state=Na.SCRIPT_DATA;break;case pa.PLAINTEXT:this.tokenizer.state=Na.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,ca.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,ca.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(ha.HTML,ca.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,pa.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:n}=this._findFosterParentingLocation()),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),i=n?r.lastIndexOf(n):r.length,a=r[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===Ji.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):({current:t,currentTagId:n}=this.openElements),(e.tagID!==pa.SVG||this.treeAdapter.getTagName(t)!==ha.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==ca.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===pa.MGLYPH||e.tagID===pa.MALIGNMARK)&&!this._isIntegrationPoint(n,t,ca.HTML))}_processToken(e){switch(e.type){case Ji.CHARACTER:this.onCharacter(e);break;case Ji.NULL_CHARACTER:this.onNullCharacter(e);break;case Ji.COMMENT:this.onComment(e);break;case Ji.DOCTYPE:this.onDoctype(e);break;case Ji.START_TAG:this._processStartTag(e);break;case Ji.END_TAG:this.onEndTag(e);break;case Ji.EOF:this.onEof(e);break;case Ji.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return hs(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex((e=>e.type===qa.Marker||this.openElements.contains(e.element)));for(let n=t<0?e-1:t-1;n>=0;n--){const e=this.activeFormattingElements.entries[n];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=ps.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(pa.P),this.openElements.popUntilTagNamePopped(pa.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case pa.TR:return void(this.insertionMode=ps.IN_ROW);case pa.TBODY:case pa.THEAD:case pa.TFOOT:return void(this.insertionMode=ps.IN_TABLE_BODY);case pa.CAPTION:return void(this.insertionMode=ps.IN_CAPTION);case pa.COLGROUP:return void(this.insertionMode=ps.IN_COLUMN_GROUP);case pa.TABLE:return void(this.insertionMode=ps.IN_TABLE);case pa.BODY:return void(this.insertionMode=ps.IN_BODY);case pa.FRAMESET:return void(this.insertionMode=ps.IN_FRAMESET);case pa.SELECT:return void this._resetInsertionModeForSelect(e);case pa.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case pa.HTML:return void(this.insertionMode=this.headElement?ps.AFTER_HEAD:ps.BEFORE_HEAD);case pa.TD:case pa.TH:if(e>0)return void(this.insertionMode=ps.IN_CELL);break;case pa.HEAD:if(e>0)return void(this.insertionMode=ps.IN_HEAD)}this.insertionMode=ps.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===pa.TEMPLATE)break;if(e===pa.TABLE)return void(this.insertionMode=ps.IN_SELECT_IN_TABLE)}this.insertionMode=ps.IN_SELECT}_isElementCausesFosterParenting(e){return ms.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case pa.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===ca.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case pa.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return ba[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e);else switch(this.insertionMode){case ps.INITIAL:Cs(this,e);break;case ps.BEFORE_HTML:ys(this,e);break;case ps.BEFORE_HEAD:Ds(this,e);break;case ps.IN_HEAD:Ls(this,e);break;case ps.IN_HEAD_NO_SCRIPT:ws(this,e);break;case ps.AFTER_HEAD:Ps(this,e);break;case ps.IN_BODY:case ps.IN_CAPTION:case ps.IN_CELL:case ps.IN_TEMPLATE:vs(this,e);break;case ps.TEXT:case ps.IN_SELECT:case ps.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case ps.IN_TABLE:case ps.IN_TABLE_BODY:case ps.IN_ROW:qs(this,e);break;case ps.IN_TABLE_TEXT:Ks(this,e);break;case ps.IN_COLUMN_GROUP:eo(this,e);break;case ps.AFTER_BODY:lo(this,e);break;case ps.AFTER_AFTER_BODY:uo(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=Fi,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case ps.INITIAL:Cs(this,e);break;case ps.BEFORE_HTML:ys(this,e);break;case ps.BEFORE_HEAD:Ds(this,e);break;case ps.IN_HEAD:Ls(this,e);break;case ps.IN_HEAD_NO_SCRIPT:ws(this,e);break;case ps.AFTER_HEAD:Ps(this,e);break;case ps.TEXT:this._insertCharacters(e);break;case ps.IN_TABLE:case ps.IN_TABLE_BODY:case ps.IN_ROW:qs(this,e);break;case ps.IN_COLUMN_GROUP:eo(this,e);break;case ps.AFTER_BODY:lo(this,e);break;case ps.AFTER_AFTER_BODY:uo(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)Ss(this,e);else switch(this.insertionMode){case ps.INITIAL:case ps.BEFORE_HTML:case ps.BEFORE_HEAD:case ps.IN_HEAD:case ps.IN_HEAD_NO_SCRIPT:case ps.AFTER_HEAD:case ps.IN_BODY:case ps.IN_TABLE:case ps.IN_CAPTION:case ps.IN_COLUMN_GROUP:case ps.IN_TABLE_BODY:case ps.IN_ROW:case ps.IN_CELL:case ps.IN_SELECT:case ps.IN_SELECT_IN_TABLE:case ps.IN_TEMPLATE:case ps.IN_FRAMESET:case ps.AFTER_FRAMESET:Ss(this,e);break;case ps.IN_TABLE_TEXT:Js(this,e);break;case ps.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case ps.AFTER_AFTER_BODY:case ps.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case ps.INITIAL:!function(e,t){e._setDocumentType(t);const n=t.forceQuirks?ua.QUIRKS:function(e){if(e.name!==Xa)return ua.QUIRKS;const{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return ua.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),$a.has(n))return ua.QUIRKS;let e=null===t?Ja:Ka;if(ts(n,e))return ua.QUIRKS;if(e=null===t?Za:es,ts(n,e))return ua.LIMITED_QUIRKS}return ua.NO_QUIRKS}(t);(function(e){return e.name===Xa&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)})(t)||e._err(t,Xi.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=ps.BEFORE_HTML}(this,e);break;case ps.BEFORE_HEAD:case ps.IN_HEAD:case ps.IN_HEAD_NO_SCRIPT:case ps.AFTER_HEAD:this._err(e,Xi.misplacedDoctype);break;case ps.IN_TABLE_TEXT:Js(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,Xi.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(function(e){const t=e.tagID,n=t===pa.FONT&&e.attrs.some((({name:e})=>e===la.COLOR||e===la.SIZE||e===la.FACE));return n||os.has(t)}(t))ho(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ca.MATHML?cs(t):r===ca.SVG&&(!function(e){const t=ss.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=Aa(e.tagName))}(t),ls(t)),us(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case ps.INITIAL:Cs(this,e);break;case ps.BEFORE_HTML:!function(e,t){t.tagID===pa.HTML?(e._insertElement(t,ca.HTML),e.insertionMode=ps.BEFORE_HEAD):ys(e,t)}(this,e);break;case ps.BEFORE_HEAD:!function(e,t){switch(t.tagID){case pa.HTML:Gs(e,t);break;case pa.HEAD:e._insertElement(t,ca.HTML),e.headElement=e.openElements.current,e.insertionMode=ps.IN_HEAD;break;default:Ds(e,t)}}(this,e);break;case ps.IN_HEAD:Os(this,e);break;case ps.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case pa.HTML:Gs(e,t);break;case pa.BASEFONT:case pa.BGSOUND:case pa.HEAD:case pa.LINK:case pa.META:case pa.NOFRAMES:case pa.STYLE:Os(e,t);break;case pa.NOSCRIPT:e._err(t,Xi.nestedNoscriptInHead);break;default:ws(e,t)}}(this,e);break;case ps.AFTER_HEAD:!function(e,t){switch(t.tagID){case pa.HTML:Gs(e,t);break;case pa.BODY:e._insertElement(t,ca.HTML),e.framesetOk=!1,e.insertionMode=ps.IN_BODY;break;case pa.FRAMESET:e._insertElement(t,ca.HTML),e.insertionMode=ps.IN_FRAMESET;break;case pa.BASE:case pa.BASEFONT:case pa.BGSOUND:case pa.LINK:case pa.META:case pa.NOFRAMES:case pa.SCRIPT:case pa.STYLE:case pa.TEMPLATE:case pa.TITLE:e._err(t,Xi.abandonedHeadElementChild),e.openElements.push(e.headElement,pa.HEAD),Os(e,t),e.openElements.remove(e.headElement);break;case pa.HEAD:e._err(t,Xi.misplacedStartTagForHeadElement);break;default:Ps(e,t)}}(this,e);break;case ps.IN_BODY:Gs(this,e);break;case ps.IN_TABLE:Vs(this,e);break;case ps.IN_TABLE_TEXT:Js(this,e);break;case ps.IN_CAPTION:!function(e,t){const n=t.tagID;$s.has(n)?e.openElements.hasInTableScope(pa.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(pa.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=ps.IN_TABLE,Vs(e,t)):Gs(e,t)}(this,e);break;case ps.IN_COLUMN_GROUP:Zs(this,e);break;case ps.IN_TABLE_BODY:to(this,e);break;case ps.IN_ROW:ro(this,e);break;case ps.IN_CELL:!function(e,t){const n=t.tagID;$s.has(n)?(e.openElements.hasInTableScope(pa.TD)||e.openElements.hasInTableScope(pa.TH))&&(e._closeTableCell(),ro(e,t)):Gs(e,t)}(this,e);break;case ps.IN_SELECT:ao(this,e);break;case ps.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===pa.CAPTION||n===pa.TABLE||n===pa.TBODY||n===pa.TFOOT||n===pa.THEAD||n===pa.TR||n===pa.TD||n===pa.TH?(e.openElements.popUntilTagNamePopped(pa.SELECT),e._resetInsertionMode(),e._processStartTag(t)):ao(e,t)}(this,e);break;case ps.IN_TEMPLATE:!function(e,t){switch(t.tagID){case pa.BASE:case pa.BASEFONT:case pa.BGSOUND:case pa.LINK:case pa.META:case pa.NOFRAMES:case pa.SCRIPT:case pa.STYLE:case pa.TEMPLATE:case pa.TITLE:Os(e,t);break;case pa.CAPTION:case pa.COLGROUP:case pa.TBODY:case pa.TFOOT:case pa.THEAD:e.tmplInsertionModeStack[0]=ps.IN_TABLE,e.insertionMode=ps.IN_TABLE,Vs(e,t);break;case pa.COL:e.tmplInsertionModeStack[0]=ps.IN_COLUMN_GROUP,e.insertionMode=ps.IN_COLUMN_GROUP,Zs(e,t);break;case pa.TR:e.tmplInsertionModeStack[0]=ps.IN_TABLE_BODY,e.insertionMode=ps.IN_TABLE_BODY,to(e,t);break;case pa.TD:case pa.TH:e.tmplInsertionModeStack[0]=ps.IN_ROW,e.insertionMode=ps.IN_ROW,ro(e,t);break;default:e.tmplInsertionModeStack[0]=ps.IN_BODY,e.insertionMode=ps.IN_BODY,Gs(e,t)}}(this,e);break;case ps.AFTER_BODY:!function(e,t){t.tagID===pa.HTML?Gs(e,t):lo(e,t)}(this,e);break;case ps.IN_FRAMESET:!function(e,t){switch(t.tagID){case pa.HTML:Gs(e,t);break;case pa.FRAMESET:e._insertElement(t,ca.HTML);break;case pa.FRAME:e._appendElement(t,ca.HTML),t.ackSelfClosing=!0;break;case pa.NOFRAMES:Os(e,t)}}(this,e);break;case ps.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case pa.HTML:Gs(e,t);break;case pa.NOFRAMES:Os(e,t)}}(this,e);break;case ps.AFTER_AFTER_BODY:!function(e,t){t.tagID===pa.HTML?Gs(e,t):uo(e,t)}(this,e);break;case ps.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case pa.HTML:Gs(e,t);break;case pa.NOFRAMES:Os(e,t)}}(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===pa.P||t.tagID===pa.BR)return ho(e),void e._endTagOutsideForeignContent(t);for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===ca.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case ps.INITIAL:Cs(this,e);break;case ps.BEFORE_HTML:!function(e,t){const n=t.tagID;n!==pa.HTML&&n!==pa.HEAD&&n!==pa.BODY&&n!==pa.BR||ys(e,t)}(this,e);break;case ps.BEFORE_HEAD:!function(e,t){const n=t.tagID;n===pa.HEAD||n===pa.BODY||n===pa.HTML||n===pa.BR?Ds(e,t):e._err(t,Xi.endTagWithoutMatchingOpenElement)}(this,e);break;case ps.IN_HEAD:!function(e,t){switch(t.tagID){case pa.HEAD:e.openElements.pop(),e.insertionMode=ps.AFTER_HEAD;break;case pa.BODY:case pa.BR:case pa.HTML:Ls(e,t);break;case pa.TEMPLATE:Rs(e,t);break;default:e._err(t,Xi.endTagWithoutMatchingOpenElement)}}(this,e);break;case ps.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case pa.NOSCRIPT:e.openElements.pop(),e.insertionMode=ps.IN_HEAD;break;case pa.BR:ws(e,t);break;default:e._err(t,Xi.endTagWithoutMatchingOpenElement)}}(this,e);break;case ps.AFTER_HEAD:!function(e,t){switch(t.tagID){case pa.BODY:case pa.HTML:case pa.BR:Ps(e,t);break;case pa.TEMPLATE:Rs(e,t);break;default:e._err(t,Xi.endTagWithoutMatchingOpenElement)}}(this,e);break;case ps.IN_BODY:Ys(this,e);break;case ps.TEXT:!function(e,t){var n;t.tagID===pa.SCRIPT&&(null===(n=e.scriptHandler)||void 0===n||n.call(e,e.openElements.current));e.openElements.pop(),e.insertionMode=e.originalInsertionMode}(this,e);break;case ps.IN_TABLE:Ws(this,e);break;case ps.IN_TABLE_TEXT:Js(this,e);break;case ps.IN_CAPTION:!function(e,t){const n=t.tagID;switch(n){case pa.CAPTION:case pa.TABLE:e.openElements.hasInTableScope(pa.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(pa.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=ps.IN_TABLE,n===pa.TABLE&&Ws(e,t));break;case pa.BODY:case pa.COL:case pa.COLGROUP:case pa.HTML:case pa.TBODY:case pa.TD:case pa.TFOOT:case pa.TH:case pa.THEAD:case pa.TR:break;default:Ys(e,t)}}(this,e);break;case ps.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case pa.COLGROUP:e.openElements.currentTagId===pa.COLGROUP&&(e.openElements.pop(),e.insertionMode=ps.IN_TABLE);break;case pa.TEMPLATE:Rs(e,t);break;case pa.COL:break;default:eo(e,t)}}(this,e);break;case ps.IN_TABLE_BODY:no(this,e);break;case ps.IN_ROW:io(this,e);break;case ps.IN_CELL:!function(e,t){const n=t.tagID;switch(n){case pa.TD:case pa.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=ps.IN_ROW);break;case pa.TABLE:case pa.TBODY:case pa.TFOOT:case pa.THEAD:case pa.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),io(e,t));break;case pa.BODY:case pa.CAPTION:case pa.COL:case pa.COLGROUP:case pa.HTML:break;default:Ys(e,t)}}(this,e);break;case ps.IN_SELECT:so(this,e);break;case ps.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===pa.CAPTION||n===pa.TABLE||n===pa.TBODY||n===pa.TFOOT||n===pa.THEAD||n===pa.TR||n===pa.TD||n===pa.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(pa.SELECT),e._resetInsertionMode(),e.onEndTag(t)):so(e,t)}(this,e);break;case ps.IN_TEMPLATE:!function(e,t){t.tagID===pa.TEMPLATE&&Rs(e,t)}(this,e);break;case ps.AFTER_BODY:co(this,e);break;case ps.IN_FRAMESET:!function(e,t){t.tagID!==pa.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===pa.FRAMESET||(e.insertionMode=ps.AFTER_FRAMESET))}(this,e);break;case ps.AFTER_FRAMESET:!function(e,t){t.tagID===pa.HTML&&(e.insertionMode=ps.AFTER_AFTER_FRAMESET)}(this,e);break;case ps.AFTER_AFTER_BODY:uo(this,e)}}onEof(e){switch(this.insertionMode){case ps.INITIAL:Cs(this,e);break;case ps.BEFORE_HTML:ys(this,e);break;case ps.BEFORE_HEAD:Ds(this,e);break;case ps.IN_HEAD:Ls(this,e);break;case ps.IN_HEAD_NO_SCRIPT:ws(this,e);break;case ps.AFTER_HEAD:Ps(this,e);break;case ps.IN_BODY:case ps.IN_TABLE:case ps.IN_CAPTION:case ps.IN_COLUMN_GROUP:case ps.IN_TABLE_BODY:case ps.IN_ROW:case ps.IN_CELL:case ps.IN_SELECT:case ps.IN_SELECT_IN_TABLE:js(this,e);break;case ps.TEXT:!function(e,t){e._err(t,Xi.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case ps.IN_TABLE_TEXT:Js(this,e);break;case ps.IN_TEMPLATE:oo(this,e);break;case ps.AFTER_BODY:case ps.IN_FRAMESET:case ps.AFTER_FRAMESET:case ps.AFTER_AFTER_BODY:case ps.AFTER_AFTER_FRAMESET:Ns(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===Hi.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case ps.IN_HEAD:case ps.IN_HEAD_NO_SCRIPT:case ps.AFTER_HEAD:case ps.TEXT:case ps.IN_COLUMN_GROUP:case ps.IN_SELECT:case ps.IN_SELECT_IN_TABLE:case ps.IN_FRAMESET:case ps.AFTER_FRAMESET:this._insertCharacters(e);break;case ps.IN_BODY:case ps.IN_CAPTION:case ps.IN_CELL:case ps.IN_TEMPLATE:case ps.AFTER_BODY:case ps.AFTER_AFTER_BODY:case ps.AFTER_AFTER_FRAMESET:Ms(this,e);break;case ps.IN_TABLE:case ps.IN_TABLE_BODY:case ps.IN_ROW:qs(this,e);break;case ps.IN_TABLE_TEXT:Xs(this,e)}}}function Es(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):zs(e,t),n}function Ts(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function gs(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const n=e.activeFormattingElements.getElementEntry(s),o=n&&a>=3;!n||o?(o&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(s)):(s=As(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function As(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function ks(e,t,n){const r=Aa(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);r===pa.TEMPLATE&&i===ca.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function bs(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Is(e,t){for(let n=0;n<8;n++){const n=Es(e,t);if(!n)break;const r=Ts(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;const i=gs(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&ks(e,a,i),bs(e,r,n)}}function Ss(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Ns(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Cs(e,t){e._err(t,Xi.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ua.QUIRKS),e.insertionMode=ps.BEFORE_HTML,e._processToken(t)}function ys(e,t){e._insertFakeRootElement(),e.insertionMode=ps.BEFORE_HEAD,e._processToken(t)}function Ds(e,t){e._insertFakeElement(ha.HEAD,pa.HEAD),e.headElement=e.openElements.current,e.insertionMode=ps.IN_HEAD,e._processToken(t)}function Os(e,t){switch(t.tagID){case pa.HTML:Gs(e,t);break;case pa.BASE:case pa.BASEFONT:case pa.BGSOUND:case pa.LINK:case pa.META:e._appendElement(t,ca.HTML),t.ackSelfClosing=!0;break;case pa.TITLE:e._switchToTextParsing(t,Na.RCDATA);break;case pa.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Na.RAWTEXT):(e._insertElement(t,ca.HTML),e.insertionMode=ps.IN_HEAD_NO_SCRIPT);break;case pa.NOFRAMES:case pa.STYLE:e._switchToTextParsing(t,Na.RAWTEXT);break;case pa.SCRIPT:e._switchToTextParsing(t,Na.SCRIPT_DATA);break;case pa.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=ps.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(ps.IN_TEMPLATE);break;case pa.HEAD:e._err(t,Xi.misplacedStartTagForHeadElement);break;default:Ls(e,t)}}function Rs(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==pa.TEMPLATE&&e._err(t,Xi.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(pa.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Xi.endTagWithoutMatchingOpenElement)}function Ls(e,t){e.openElements.pop(),e.insertionMode=ps.AFTER_HEAD,e._processToken(t)}function ws(e,t){const n=t.type===Ji.EOF?Xi.openElementsLeftAfterEof:Xi.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=ps.IN_HEAD,e._processToken(t)}function Ps(e,t){e._insertFakeElement(ha.BODY,pa.BODY),e.insertionMode=ps.IN_BODY,xs(e,t)}function xs(e,t){switch(t.type){case Ji.CHARACTER:vs(e,t);break;case Ji.WHITESPACE_CHARACTER:Ms(e,t);break;case Ji.COMMENT:Ss(e,t);break;case Ji.START_TAG:Gs(e,t);break;case Ji.END_TAG:Ys(e,t);break;case Ji.EOF:js(e,t)}}function Ms(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function vs(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Bs(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ca.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Fs(e){const t=$i(e,la.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function Hs(e,t){e._switchToTextParsing(t,Na.RAWTEXT)}function Us(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ca.HTML)}function Gs(e,t){switch(t.tagID){case pa.I:case pa.S:case pa.B:case pa.U:case pa.EM:case pa.TT:case pa.BIG:case pa.CODE:case pa.FONT:case pa.SMALL:case pa.STRIKE:case pa.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ca.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case pa.A:!function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(ha.A);n&&(Is(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ca.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case pa.H1:case pa.H2:case pa.H3:case pa.H4:case pa.H5:case pa.H6:!function(e,t){e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),Ia.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ca.HTML)}(e,t);break;case pa.P:case pa.DL:case pa.OL:case pa.UL:case pa.DIV:case pa.DIR:case pa.NAV:case pa.MAIN:case pa.MENU:case pa.ASIDE:case pa.CENTER:case pa.FIGURE:case pa.FOOTER:case pa.HEADER:case pa.HGROUP:case pa.DIALOG:case pa.DETAILS:case pa.ADDRESS:case pa.ARTICLE:case pa.SEARCH:case pa.SECTION:case pa.SUMMARY:case pa.FIELDSET:case pa.BLOCKQUOTE:case pa.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._insertElement(t,ca.HTML)}(e,t);break;case pa.LI:case pa.DD:case pa.DT:!function(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const t=e.openElements.tagIDs[r];if(n===pa.LI&&t===pa.LI||(n===pa.DD||n===pa.DT)&&(t===pa.DD||t===pa.DT)){e.openElements.generateImpliedEndTagsWithExclusion(t),e.openElements.popUntilTagNamePopped(t);break}if(t!==pa.ADDRESS&&t!==pa.DIV&&t!==pa.P&&e._isSpecialElement(e.openElements.items[r],t))break}e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._insertElement(t,ca.HTML)}(e,t);break;case pa.BR:case pa.IMG:case pa.WBR:case pa.AREA:case pa.EMBED:case pa.KEYGEN:Bs(e,t);break;case pa.HR:!function(e,t){e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._appendElement(t,ca.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case pa.RB:case pa.RTC:!function(e,t){e.openElements.hasInScope(pa.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ca.HTML)}(e,t);break;case pa.RT:case pa.RP:!function(e,t){e.openElements.hasInScope(pa.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(pa.RTC),e._insertElement(t,ca.HTML)}(e,t);break;case pa.PRE:case pa.LISTING:!function(e,t){e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._insertElement(t,ca.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case pa.XMP:!function(e,t){e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Na.RAWTEXT)}(e,t);break;case pa.SVG:!function(e,t){e._reconstructActiveFormattingElements(),ls(t),us(t),t.selfClosing?e._appendElement(t,ca.SVG):e._insertElement(t,ca.SVG),t.ackSelfClosing=!0}(e,t);break;case pa.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case pa.BASE:case pa.LINK:case pa.META:case pa.STYLE:case pa.TITLE:case pa.SCRIPT:case pa.BGSOUND:case pa.BASEFONT:case pa.TEMPLATE:Os(e,t);break;case pa.BODY:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t);break;case pa.FORM:!function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._insertElement(t,ca.HTML),n||(e.formElement=e.openElements.current))}(e,t);break;case pa.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(pa.NOBR)&&(Is(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ca.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case pa.MATH:!function(e,t){e._reconstructActiveFormattingElements(),cs(t),us(t),t.selfClosing?e._appendElement(t,ca.MATHML):e._insertElement(t,ca.MATHML),t.ackSelfClosing=!0}(e,t);break;case pa.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==ua.QUIRKS&&e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._insertElement(t,ca.HTML),e.framesetOk=!1,e.insertionMode=ps.IN_TABLE}(e,t);break;case pa.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ca.HTML),Fs(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case pa.PARAM:case pa.TRACK:case pa.SOURCE:!function(e,t){e._appendElement(t,ca.HTML),t.ackSelfClosing=!0}(e,t);break;case pa.IMAGE:!function(e,t){t.tagName=ha.IMG,t.tagID=pa.IMG,Bs(e,t)}(e,t);break;case pa.BUTTON:!function(e,t){e.openElements.hasInScope(pa.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(pa.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ca.HTML),e.framesetOk=!1}(e,t);break;case pa.APPLET:case pa.OBJECT:case pa.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ca.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case pa.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Na.RAWTEXT)}(e,t);break;case pa.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ca.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===ps.IN_TABLE||e.insertionMode===ps.IN_CAPTION||e.insertionMode===ps.IN_TABLE_BODY||e.insertionMode===ps.IN_ROW||e.insertionMode===ps.IN_CELL?ps.IN_SELECT_IN_TABLE:ps.IN_SELECT}(e,t);break;case pa.OPTION:case pa.OPTGROUP:!function(e,t){e.openElements.currentTagId===pa.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ca.HTML)}(e,t);break;case pa.NOEMBED:case pa.NOFRAMES:Hs(e,t);break;case pa.FRAMESET:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ca.HTML),e.insertionMode=ps.IN_FRAMESET)}(e,t);break;case pa.TEXTAREA:!function(e,t){e._insertElement(t,ca.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Na.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=ps.TEXT}(e,t);break;case pa.NOSCRIPT:e.options.scriptingEnabled?Hs(e,t):Us(e,t);break;case pa.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(pa.P)&&e._closePElement(),e._insertElement(t,ca.HTML),e.tokenizer.state=Na.PLAINTEXT}(e,t);break;case pa.COL:case pa.TH:case pa.TD:case pa.TR:case pa.HEAD:case pa.FRAME:case pa.TBODY:case pa.TFOOT:case pa.THEAD:case pa.CAPTION:case pa.COLGROUP:break;default:Us(e,t)}}function zs(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const t=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==pa.UNKNOWN||e.treeAdapter.getTagName(t)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(t,a))break}}function Ys(e,t){switch(t.tagID){case pa.A:case pa.B:case pa.I:case pa.S:case pa.U:case pa.EM:case pa.TT:case pa.BIG:case pa.CODE:case pa.FONT:case pa.NOBR:case pa.SMALL:case pa.STRIKE:case pa.STRONG:Is(e,t);break;case pa.P:!function(e){e.openElements.hasInButtonScope(pa.P)||e._insertFakeElement(ha.P,pa.P),e._closePElement()}(e);break;case pa.DL:case pa.UL:case pa.OL:case pa.DIR:case pa.DIV:case pa.NAV:case pa.PRE:case pa.MAIN:case pa.MENU:case pa.ASIDE:case pa.BUTTON:case pa.CENTER:case pa.FIGURE:case pa.FOOTER:case pa.HEADER:case pa.HGROUP:case pa.DIALOG:case pa.ADDRESS:case pa.ARTICLE:case pa.DETAILS:case pa.SEARCH:case pa.SECTION:case pa.SUMMARY:case pa.LISTING:case pa.FIELDSET:case pa.BLOCKQUOTE:case pa.FIGCAPTION:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case pa.LI:!function(e){e.openElements.hasInListItemScope(pa.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(pa.LI),e.openElements.popUntilTagNamePopped(pa.LI))}(e);break;case pa.DD:case pa.DT:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case pa.H1:case pa.H2:case pa.H3:case pa.H4:case pa.H5:case pa.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case pa.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(ha.BR,pa.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case pa.BODY:!function(e,t){if(e.openElements.hasInScope(pa.BODY)&&(e.insertionMode=ps.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}(e,t);break;case pa.HTML:!function(e,t){e.openElements.hasInScope(pa.BODY)&&(e.insertionMode=ps.AFTER_BODY,co(e,t))}(e,t);break;case pa.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(pa.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(pa.FORM):n&&e.openElements.remove(n))}(e);break;case pa.APPLET:case pa.OBJECT:case pa.MARQUEE:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}(e,t);break;case pa.TEMPLATE:Rs(e,t);break;default:zs(e,t)}}function js(e,t){e.tmplInsertionModeStack.length>0?oo(e,t):Ns(e,t)}function qs(e,t){if(ms.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=ps.IN_TABLE_TEXT,t.type){case Ji.CHARACTER:Ks(e,t);break;case Ji.WHITESPACE_CHARACTER:Xs(e,t)}else Qs(e,t)}function Vs(e,t){switch(t.tagID){case pa.TD:case pa.TH:case pa.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ha.TBODY,pa.TBODY),e.insertionMode=ps.IN_TABLE_BODY,to(e,t)}(e,t);break;case pa.STYLE:case pa.SCRIPT:case pa.TEMPLATE:Os(e,t);break;case pa.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ha.COLGROUP,pa.COLGROUP),e.insertionMode=ps.IN_COLUMN_GROUP,Zs(e,t)}(e,t);break;case pa.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,ca.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case pa.TABLE:!function(e,t){e.openElements.hasInTableScope(pa.TABLE)&&(e.openElements.popUntilTagNamePopped(pa.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case pa.TBODY:case pa.TFOOT:case pa.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ca.HTML),e.insertionMode=ps.IN_TABLE_BODY}(e,t);break;case pa.INPUT:!function(e,t){Fs(t)?e._appendElement(t,ca.HTML):Qs(e,t),t.ackSelfClosing=!0}(e,t);break;case pa.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ca.HTML),e.insertionMode=ps.IN_CAPTION}(e,t);break;case pa.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ca.HTML),e.insertionMode=ps.IN_COLUMN_GROUP}(e,t);break;default:Qs(e,t)}}function Ws(e,t){switch(t.tagID){case pa.TABLE:e.openElements.hasInTableScope(pa.TABLE)&&(e.openElements.popUntilTagNamePopped(pa.TABLE),e._resetInsertionMode());break;case pa.TEMPLATE:Rs(e,t);break;case pa.BODY:case pa.CAPTION:case pa.COL:case pa.COLGROUP:case pa.HTML:case pa.TBODY:case pa.TD:case pa.TFOOT:case pa.TH:case pa.THEAD:case pa.TR:break;default:Qs(e,t)}}function Qs(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,xs(e,t),e.fosterParentingEnabled=n}function Xs(e,t){e.pendingCharacterTokens.push(t)}function Ks(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Js(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0&&e.openElements.currentTagId===pa.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===pa.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===pa.OPTGROUP&&e.openElements.pop();break;case pa.OPTION:e.openElements.currentTagId===pa.OPTION&&e.openElements.pop();break;case pa.SELECT:e.openElements.hasInSelectScope(pa.SELECT)&&(e.openElements.popUntilTagNamePopped(pa.SELECT),e._resetInsertionMode());break;case pa.TEMPLATE:Rs(e,t)}}function oo(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(pa.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ns(e,t)}function co(e,t){var n;if(t.tagID===pa.HTML){if(e.fragmentContext||(e.insertionMode=ps.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===pa.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(null===(n=e.treeAdapter.getNodeSourceCodeLocation(r))||void 0===n?void 0:n.endTag)&&e._setEndLocation(r,t)}}else lo(e,t)}function lo(e,t){e.insertionMode=ps.IN_BODY,xs(e,t)}function uo(e,t){e.insertionMode=ps.IN_BODY,xs(e,t)}function ho(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ca.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}new Set([ha.AREA,ha.BASE,ha.BASEFONT,ha.BGSOUND,ha.BR,ha.COL,ha.EMBED,ha.FRAME,ha.HR,ha.IMG,ha.INPUT,ha.KEYGEN,ha.LINK,ha.META,ha.PARAM,ha.SOURCE,ha.TRACK,ha.WBR]);const po=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),mo={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function fo(e,t){const n=function(e){const t="root"===e.type?e.children[0]:e;return Boolean(t&&("doctype"===t.type||"element"===t.type&&"html"===t.tagName.toLowerCase()))}(e),r=Oi("type",{handlers:{root:Eo,element:To,text:go,comment:bo,doctype:Ao,raw:Io},unknown:So}),i={parser:n?new _s(mo):_s.getFragmentParser(void 0,mo),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),No(i,ye());const a=function(e,t){const n=t||{};return bi({file:n.file||void 0,location:!1,schema:"svg"===n.space?_e:fe,verbose:n.verbose||!1},e)}(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&Ar(a,"comment",(function(e,t,n){const r=e;if(r.value.stitch&&n&&void 0!==t){return n.children[t]=r.value.stitch,t}})),"root"===a.type&&1===a.children.length&&a.children[0].type===e.type?a.children[0]:a}function _o(e,t){let n=-1;if(e)for(;++n4&&(t.parser.tokenizer.state=0);const n={type:Ji.CHARACTER,chars:e.value,location:yo(e)};No(t,ye(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ao(e,t){const n={type:Ji.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:yo(e)};No(t,ye(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ko(e,t){t.stitches=!0;const n=function(e){return ur("children"in e?{...e,children:[]}:e)}(e);if("children"in e&&"children"in n){const r=fo({type:"root",children:e.children},t.options);n.children=r.children}bo({type:"comment",value:{stitch:n}},t)}function bo(e,t){const n=e.value,r={type:Ji.COMMENT,data:n,location:yo(e)};No(t,ye(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Io(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Co(t,ye(e)),t.parser.tokenizer.write(e.value,!1),t.parser.tokenizer._runParsingLoop(),72===t.parser.tokenizer.state||78===t.parser.tokenizer.state){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function So(e,t){const n=e;if(!t.options.passThrough||!t.options.passThrough.includes(n.type)){let e="";throw po.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+e)}ko(n,t)}function No(e,t){Co(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Na.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Co(e,t){if(t&&void 0!==t.offset){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=1-t.column,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function yo(e){const t=ye(e)||{line:void 0,column:void 0,offset:void 0},n=Ce(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Do(e){return function(t,n){return fo(t,{...e,file:n})}}const Oo={100:"💯",1234:"🔢",grinning:"😀",smiley:"😃",smile:"😄",grin:"😁",laughing:"😆",satisfied:"😆",sweat_smile:"😅",rofl:"🤣",joy:"😂",slightly_smiling_face:"🙂",upside_down_face:"🙃",melting_face:"🫠",wink:"😉",blush:"😊",innocent:"😇",smiling_face_with_three_hearts:"🥰",heart_eyes:"😍",star_struck:"🤩",kissing_heart:"😘",kissing:"😗",relaxed:"☺️",kissing_closed_eyes:"😚",kissing_smiling_eyes:"😙",smiling_face_with_tear:"🥲",yum:"😋",stuck_out_tongue:"😛",stuck_out_tongue_winking_eye:"😜",zany_face:"🤪",stuck_out_tongue_closed_eyes:"😝",money_mouth_face:"🤑",hugs:"🤗",hand_over_mouth:"🤭",face_with_open_eyes_and_hand_over_mouth:"🫢",face_with_peeking_eye:"🫣",shushing_face:"🤫",thinking:"🤔",saluting_face:"🫡",zipper_mouth_face:"🤐",raised_eyebrow:"🤨",neutral_face:"😐",expressionless:"😑",no_mouth:"😶",dotted_line_face:"🫥",face_in_clouds:"😶‍🌫️",smirk:"😏",unamused:"😒",roll_eyes:"🙄",grimacing:"😬",face_exhaling:"😮‍💨",lying_face:"🤥",shaking_face:"🫨",relieved:"😌",pensive:"😔",sleepy:"😪",drooling_face:"🤤",sleeping:"😴",mask:"😷",face_with_thermometer:"🤒",face_with_head_bandage:"🤕",nauseated_face:"🤢",vomiting_face:"🤮",sneezing_face:"🤧",hot_face:"🥵",cold_face:"🥶",woozy_face:"🥴",dizzy_face:"😵",face_with_spiral_eyes:"😵‍💫",exploding_head:"🤯",cowboy_hat_face:"🤠",partying_face:"🥳",disguised_face:"🥸",sunglasses:"😎",nerd_face:"🤓",monocle_face:"🧐",confused:"😕",face_with_diagonal_mouth:"🫤",worried:"😟",slightly_frowning_face:"🙁",frowning_face:"☹️",open_mouth:"😮",hushed:"😯",astonished:"😲",flushed:"😳",pleading_face:"🥺",face_holding_back_tears:"🥹",frowning:"😦",anguished:"😧",fearful:"😨",cold_sweat:"😰",disappointed_relieved:"😥",cry:"😢",sob:"😭",scream:"😱",confounded:"😖",persevere:"😣",disappointed:"😞",sweat:"😓",weary:"😩",tired_face:"😫",yawning_face:"🥱",triumph:"😤",rage:"😡",pout:"😡",angry:"😠",cursing_face:"🤬",smiling_imp:"😈",imp:"👿",skull:"💀",skull_and_crossbones:"☠️",hankey:"💩",poop:"💩",shit:"💩",clown_face:"🤡",japanese_ogre:"👹",japanese_goblin:"👺",ghost:"👻",alien:"👽",space_invader:"👾",robot:"🤖",smiley_cat:"😺",smile_cat:"😸",joy_cat:"😹",heart_eyes_cat:"😻",smirk_cat:"😼",kissing_cat:"😽",scream_cat:"🙀",crying_cat_face:"😿",pouting_cat:"😾",see_no_evil:"🙈",hear_no_evil:"🙉",speak_no_evil:"🙊",love_letter:"💌",cupid:"💘",gift_heart:"💝",sparkling_heart:"💖",heartpulse:"💗",heartbeat:"💓",revolving_hearts:"💞",two_hearts:"💕",heart_decoration:"💟",heavy_heart_exclamation:"❣️",broken_heart:"💔",heart_on_fire:"❤️‍🔥",mending_heart:"❤️‍🩹",heart:"❤️",pink_heart:"🩷",orange_heart:"🧡",yellow_heart:"💛",green_heart:"💚",blue_heart:"💙",light_blue_heart:"🩵",purple_heart:"💜",brown_heart:"🤎",black_heart:"🖤",grey_heart:"🩶",white_heart:"🤍",kiss:"💋",anger:"💢",boom:"💥",collision:"💥",dizzy:"💫",sweat_drops:"💦",dash:"💨",hole:"🕳️",speech_balloon:"💬",eye_speech_bubble:"👁️‍🗨️",left_speech_bubble:"🗨️",right_anger_bubble:"🗯️",thought_balloon:"💭",zzz:"💤",wave:"👋",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐️",hand:"✋",raised_hand:"✋",vulcan_salute:"🖖",rightwards_hand:"🫱",leftwards_hand:"🫲",palm_down_hand:"🫳",palm_up_hand:"🫴",leftwards_pushing_hand:"🫷",rightwards_pushing_hand:"🫸",ok_hand:"👌",pinched_fingers:"🤌",pinching_hand:"🤏",v:"✌️",crossed_fingers:"🤞",hand_with_index_finger_and_thumb_crossed:"🫰",love_you_gesture:"🤟",metal:"🤘",call_me_hand:"🤙",point_left:"👈",point_right:"👉",point_up_2:"👆",middle_finger:"🖕",fu:"🖕",point_down:"👇",point_up:"☝️",index_pointing_at_the_viewer:"🫵","+1":"👍",thumbsup:"👍","-1":"👎",thumbsdown:"👎",fist_raised:"✊",fist:"✊",fist_oncoming:"👊",facepunch:"👊",punch:"👊",fist_left:"🤛",fist_right:"🤜",clap:"👏",raised_hands:"🙌",heart_hands:"🫶",open_hands:"👐",palms_up_together:"🤲",handshake:"🤝",pray:"🙏",writing_hand:"✍️",nail_care:"💅",selfie:"🤳",muscle:"💪",mechanical_arm:"🦾",mechanical_leg:"🦿",leg:"🦵",foot:"🦶",ear:"👂",ear_with_hearing_aid:"🦻",nose:"👃",brain:"🧠",anatomical_heart:"🫀",lungs:"🫁",tooth:"🦷",bone:"🦴",eyes:"👀",eye:"👁️",tongue:"👅",lips:"👄",biting_lip:"🫦",baby:"👶",child:"🧒",boy:"👦",girl:"👧",adult:"🧑",blond_haired_person:"👱",man:"👨",bearded_person:"🧔",man_beard:"🧔‍♂️",woman_beard:"🧔‍♀️",red_haired_man:"👨‍🦰",curly_haired_man:"👨‍🦱",white_haired_man:"👨‍🦳",bald_man:"👨‍🦲",woman:"👩",red_haired_woman:"👩‍🦰",person_red_hair:"🧑‍🦰",curly_haired_woman:"👩‍🦱",person_curly_hair:"🧑‍🦱",white_haired_woman:"👩‍🦳",person_white_hair:"🧑‍🦳",bald_woman:"👩‍🦲",person_bald:"🧑‍🦲",blond_haired_woman:"👱‍♀️",blonde_woman:"👱‍♀️",blond_haired_man:"👱‍♂️",older_adult:"🧓",older_man:"👴",older_woman:"👵",frowning_person:"🙍",frowning_man:"🙍‍♂️",frowning_woman:"🙍‍♀️",pouting_face:"🙎",pouting_man:"🙎‍♂️",pouting_woman:"🙎‍♀️",no_good:"🙅",no_good_man:"🙅‍♂️",ng_man:"🙅‍♂️",no_good_woman:"🙅‍♀️",ng_woman:"🙅‍♀️",ok_person:"🙆",ok_man:"🙆‍♂️",ok_woman:"🙆‍♀️",tipping_hand_person:"💁",information_desk_person:"💁",tipping_hand_man:"💁‍♂️",sassy_man:"💁‍♂️",tipping_hand_woman:"💁‍♀️",sassy_woman:"💁‍♀️",raising_hand:"🙋",raising_hand_man:"🙋‍♂️",raising_hand_woman:"🙋‍♀️",deaf_person:"🧏",deaf_man:"🧏‍♂️",deaf_woman:"🧏‍♀️",bow:"🙇",bowing_man:"🙇‍♂️",bowing_woman:"🙇‍♀️",facepalm:"🤦",man_facepalming:"🤦‍♂️",woman_facepalming:"🤦‍♀️",shrug:"🤷",man_shrugging:"🤷‍♂️",woman_shrugging:"🤷‍♀️",health_worker:"🧑‍⚕️",man_health_worker:"👨‍⚕️",woman_health_worker:"👩‍⚕️",student:"🧑‍🎓",man_student:"👨‍🎓",woman_student:"👩‍🎓",teacher:"🧑‍🏫",man_teacher:"👨‍🏫",woman_teacher:"👩‍🏫",judge:"🧑‍⚖️",man_judge:"👨‍⚖️",woman_judge:"👩‍⚖️",farmer:"🧑‍🌾",man_farmer:"👨‍🌾",woman_farmer:"👩‍🌾",cook:"🧑‍🍳",man_cook:"👨‍🍳",woman_cook:"👩‍🍳",mechanic:"🧑‍🔧",man_mechanic:"👨‍🔧",woman_mechanic:"👩‍🔧",factory_worker:"🧑‍🏭",man_factory_worker:"👨‍🏭",woman_factory_worker:"👩‍🏭",office_worker:"🧑‍💼",man_office_worker:"👨‍💼",woman_office_worker:"👩‍💼",scientist:"🧑‍🔬",man_scientist:"👨‍🔬",woman_scientist:"👩‍🔬",technologist:"🧑‍💻",man_technologist:"👨‍💻",woman_technologist:"👩‍💻",singer:"🧑‍🎤",man_singer:"👨‍🎤",woman_singer:"👩‍🎤",artist:"🧑‍🎨",man_artist:"👨‍🎨",woman_artist:"👩‍🎨",pilot:"🧑‍✈️",man_pilot:"👨‍✈️",woman_pilot:"👩‍✈️",astronaut:"🧑‍🚀",man_astronaut:"👨‍🚀",woman_astronaut:"👩‍🚀",firefighter:"🧑‍🚒",man_firefighter:"👨‍🚒",woman_firefighter:"👩‍🚒",police_officer:"👮",cop:"👮",policeman:"👮‍♂️",policewoman:"👮‍♀️",detective:"🕵️",male_detective:"🕵️‍♂️",female_detective:"🕵️‍♀️",guard:"💂",guardsman:"💂‍♂️",guardswoman:"💂‍♀️",ninja:"🥷",construction_worker:"👷",construction_worker_man:"👷‍♂️",construction_worker_woman:"👷‍♀️",person_with_crown:"🫅",prince:"🤴",princess:"👸",person_with_turban:"👳",man_with_turban:"👳‍♂️",woman_with_turban:"👳‍♀️",man_with_gua_pi_mao:"👲",woman_with_headscarf:"🧕",person_in_tuxedo:"🤵",man_in_tuxedo:"🤵‍♂️",woman_in_tuxedo:"🤵‍♀️",person_with_veil:"👰",man_with_veil:"👰‍♂️",woman_with_veil:"👰‍♀️",bride_with_veil:"👰‍♀️",pregnant_woman:"🤰",pregnant_man:"🫃",pregnant_person:"🫄",breast_feeding:"🤱",woman_feeding_baby:"👩‍🍼",man_feeding_baby:"👨‍🍼",person_feeding_baby:"🧑‍🍼",angel:"👼",santa:"🎅",mrs_claus:"🤶",mx_claus:"🧑‍🎄",superhero:"🦸",superhero_man:"🦸‍♂️",superhero_woman:"🦸‍♀️",supervillain:"🦹",supervillain_man:"🦹‍♂️",supervillain_woman:"🦹‍♀️",mage:"🧙",mage_man:"🧙‍♂️",mage_woman:"🧙‍♀️",fairy:"🧚",fairy_man:"🧚‍♂️",fairy_woman:"🧚‍♀️",vampire:"🧛",vampire_man:"🧛‍♂️",vampire_woman:"🧛‍♀️",merperson:"🧜",merman:"🧜‍♂️",mermaid:"🧜‍♀️",elf:"🧝",elf_man:"🧝‍♂️",elf_woman:"🧝‍♀️",genie:"🧞",genie_man:"🧞‍♂️",genie_woman:"🧞‍♀️",zombie:"🧟",zombie_man:"🧟‍♂️",zombie_woman:"🧟‍♀️",troll:"🧌",massage:"💆",massage_man:"💆‍♂️",massage_woman:"💆‍♀️",haircut:"💇",haircut_man:"💇‍♂️",haircut_woman:"💇‍♀️",walking:"🚶",walking_man:"🚶‍♂️",walking_woman:"🚶‍♀️",standing_person:"🧍",standing_man:"🧍‍♂️",standing_woman:"🧍‍♀️",kneeling_person:"🧎",kneeling_man:"🧎‍♂️",kneeling_woman:"🧎‍♀️",person_with_probing_cane:"🧑‍🦯",man_with_probing_cane:"👨‍🦯",woman_with_probing_cane:"👩‍🦯",person_in_motorized_wheelchair:"🧑‍🦼",man_in_motorized_wheelchair:"👨‍🦼",woman_in_motorized_wheelchair:"👩‍🦼",person_in_manual_wheelchair:"🧑‍🦽",man_in_manual_wheelchair:"👨‍🦽",woman_in_manual_wheelchair:"👩‍🦽",runner:"🏃",running:"🏃",running_man:"🏃‍♂️",running_woman:"🏃‍♀️",woman_dancing:"💃",dancer:"💃",man_dancing:"🕺",business_suit_levitating:"🕴️",dancers:"👯",dancing_men:"👯‍♂️",dancing_women:"👯‍♀️",sauna_person:"🧖",sauna_man:"🧖‍♂️",sauna_woman:"🧖‍♀️",climbing:"🧗",climbing_man:"🧗‍♂️",climbing_woman:"🧗‍♀️",person_fencing:"🤺",horse_racing:"🏇",skier:"⛷️",snowboarder:"🏂",golfing:"🏌️",golfing_man:"🏌️‍♂️",golfing_woman:"🏌️‍♀️",surfer:"🏄",surfing_man:"🏄‍♂️",surfing_woman:"🏄‍♀️",rowboat:"🚣",rowing_man:"🚣‍♂️",rowing_woman:"🚣‍♀️",swimmer:"🏊",swimming_man:"🏊‍♂️",swimming_woman:"🏊‍♀️",bouncing_ball_person:"⛹️",bouncing_ball_man:"⛹️‍♂️",basketball_man:"⛹️‍♂️",bouncing_ball_woman:"⛹️‍♀️",basketball_woman:"⛹️‍♀️",weight_lifting:"🏋️",weight_lifting_man:"🏋️‍♂️",weight_lifting_woman:"🏋️‍♀️",bicyclist:"🚴",biking_man:"🚴‍♂️",biking_woman:"🚴‍♀️",mountain_bicyclist:"🚵",mountain_biking_man:"🚵‍♂️",mountain_biking_woman:"🚵‍♀️",cartwheeling:"🤸",man_cartwheeling:"🤸‍♂️",woman_cartwheeling:"🤸‍♀️",wrestling:"🤼",men_wrestling:"🤼‍♂️",women_wrestling:"🤼‍♀️",water_polo:"🤽",man_playing_water_polo:"🤽‍♂️",woman_playing_water_polo:"🤽‍♀️",handball_person:"🤾",man_playing_handball:"🤾‍♂️",woman_playing_handball:"🤾‍♀️",juggling_person:"🤹",man_juggling:"🤹‍♂️",woman_juggling:"🤹‍♀️",lotus_position:"🧘",lotus_position_man:"🧘‍♂️",lotus_position_woman:"🧘‍♀️",bath:"🛀",sleeping_bed:"🛌",people_holding_hands:"🧑‍🤝‍🧑",two_women_holding_hands:"👭",couple:"👫",two_men_holding_hands:"👬",couplekiss:"💏",couplekiss_man_woman:"👩‍❤️‍💋‍👨",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",couple_with_heart:"💑",couple_with_heart_woman_man:"👩‍❤️‍👨",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",family:"👪",family_man_woman_boy:"👨‍👩‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",speaking_head:"🗣️",bust_in_silhouette:"👤",busts_in_silhouette:"👥",people_hugging:"🫂",footprints:"👣",monkey_face:"🐵",monkey:"🐒",gorilla:"🦍",orangutan:"🦧",dog:"🐶",dog2:"🐕",guide_dog:"🦮",service_dog:"🐕‍🦺",poodle:"🐩",wolf:"🐺",fox_face:"🦊",raccoon:"🦝",cat:"🐱",cat2:"🐈",black_cat:"🐈‍⬛",lion:"🦁",tiger:"🐯",tiger2:"🐅",leopard:"🐆",horse:"🐴",moose:"🫎",donkey:"🫏",racehorse:"🐎",unicorn:"🦄",zebra:"🦓",deer:"🦌",bison:"🦬",cow:"🐮",ox:"🐂",water_buffalo:"🐃",cow2:"🐄",pig:"🐷",pig2:"🐖",boar:"🐗",pig_nose:"🐽",ram:"🐏",sheep:"🐑",goat:"🐐",dromedary_camel:"🐪",camel:"🐫",llama:"🦙",giraffe:"🦒",elephant:"🐘",mammoth:"🦣",rhinoceros:"🦏",hippopotamus:"🦛",mouse:"🐭",mouse2:"🐁",rat:"🐀",hamster:"🐹",rabbit:"🐰",rabbit2:"🐇",chipmunk:"🐿️",beaver:"🦫",hedgehog:"🦔",bat:"🦇",bear:"🐻",polar_bear:"🐻‍❄️",koala:"🐨",panda_face:"🐼",sloth:"🦥",otter:"🦦",skunk:"🦨",kangaroo:"🦘",badger:"🦡",feet:"🐾",paw_prints:"🐾",turkey:"🦃",chicken:"🐔",rooster:"🐓",hatching_chick:"🐣",baby_chick:"🐤",hatched_chick:"🐥",bird:"🐦",penguin:"🐧",dove:"🕊️",eagle:"🦅",duck:"🦆",swan:"🦢",owl:"🦉",dodo:"🦤",feather:"🪶",flamingo:"🦩",peacock:"🦚",parrot:"🦜",wing:"🪽",black_bird:"🐦‍⬛",goose:"🪿",frog:"🐸",crocodile:"🐊",turtle:"🐢",lizard:"🦎",snake:"🐍",dragon_face:"🐲",dragon:"🐉",sauropod:"🦕","t-rex":"🦖",whale:"🐳",whale2:"🐋",dolphin:"🐬",flipper:"🐬",seal:"🦭",fish:"🐟",tropical_fish:"🐠",blowfish:"🐡",shark:"🦈",octopus:"🐙",shell:"🐚",coral:"🪸",jellyfish:"🪼",snail:"🐌",butterfly:"🦋",bug:"🐛",ant:"🐜",bee:"🐝",honeybee:"🐝",beetle:"🪲",lady_beetle:"🐞",cricket:"🦗",cockroach:"🪳",spider:"🕷️",spider_web:"🕸️",scorpion:"🦂",mosquito:"🦟",fly:"🪰",worm:"🪱",microbe:"🦠",bouquet:"💐",cherry_blossom:"🌸",white_flower:"💮",lotus:"🪷",rosette:"🏵️",rose:"🌹",wilted_flower:"🥀",hibiscus:"🌺",sunflower:"🌻",blossom:"🌼",tulip:"🌷",hyacinth:"🪻",seedling:"🌱",potted_plant:"🪴",evergreen_tree:"🌲",deciduous_tree:"🌳",palm_tree:"🌴",cactus:"🌵",ear_of_rice:"🌾",herb:"🌿",shamrock:"☘️",four_leaf_clover:"🍀",maple_leaf:"🍁",fallen_leaf:"🍂",leaves:"🍃",empty_nest:"🪹",nest_with_eggs:"🪺",mushroom:"🍄",grapes:"🍇",melon:"🍈",watermelon:"🍉",tangerine:"🍊",orange:"🍊",mandarin:"🍊",lemon:"🍋",banana:"🍌",pineapple:"🍍",mango:"🥭",apple:"🍎",green_apple:"🍏",pear:"🍐",peach:"🍑",cherries:"🍒",strawberry:"🍓",blueberries:"🫐",kiwi_fruit:"🥝",tomato:"🍅",olive:"🫒",coconut:"🥥",avocado:"🥑",eggplant:"🍆",potato:"🥔",carrot:"🥕",corn:"🌽",hot_pepper:"🌶️",bell_pepper:"🫑",cucumber:"🥒",leafy_green:"🥬",broccoli:"🥦",garlic:"🧄",onion:"🧅",peanuts:"🥜",beans:"🫘",chestnut:"🌰",ginger_root:"🫚",pea_pod:"🫛",bread:"🍞",croissant:"🥐",baguette_bread:"🥖",flatbread:"🫓",pretzel:"🥨",bagel:"🥯",pancakes:"🥞",waffle:"🧇",cheese:"🧀",meat_on_bone:"🍖",poultry_leg:"🍗",cut_of_meat:"🥩",bacon:"🥓",hamburger:"🍔",fries:"🍟",pizza:"🍕",hotdog:"🌭",sandwich:"🥪",taco:"🌮",burrito:"🌯",tamale:"🫔",stuffed_flatbread:"🥙",falafel:"🧆",egg:"🥚",fried_egg:"🍳",shallow_pan_of_food:"🥘",stew:"🍲",fondue:"🫕",bowl_with_spoon:"🥣",green_salad:"🥗",popcorn:"🍿",butter:"🧈",salt:"🧂",canned_food:"🥫",bento:"🍱",rice_cracker:"🍘",rice_ball:"🍙",rice:"🍚",curry:"🍛",ramen:"🍜",spaghetti:"🍝",sweet_potato:"🍠",oden:"🍢",sushi:"🍣",fried_shrimp:"🍤",fish_cake:"🍥",moon_cake:"🥮",dango:"🍡",dumpling:"🥟",fortune_cookie:"🥠",takeout_box:"🥡",crab:"🦀",lobster:"🦞",shrimp:"🦐",squid:"🦑",oyster:"🦪",icecream:"🍦",shaved_ice:"🍧",ice_cream:"🍨",doughnut:"🍩",cookie:"🍪",birthday:"🎂",cake:"🍰",cupcake:"🧁",pie:"🥧",chocolate_bar:"🍫",candy:"🍬",lollipop:"🍭",custard:"🍮",honey_pot:"🍯",baby_bottle:"🍼",milk_glass:"🥛",coffee:"☕",teapot:"🫖",tea:"🍵",sake:"🍶",champagne:"🍾",wine_glass:"🍷",cocktail:"🍸",tropical_drink:"🍹",beer:"🍺",beers:"🍻",clinking_glasses:"🥂",tumbler_glass:"🥃",pouring_liquid:"🫗",cup_with_straw:"🥤",bubble_tea:"🧋",beverage_box:"🧃",mate:"🧉",ice_cube:"🧊",chopsticks:"🥢",plate_with_cutlery:"🍽️",fork_and_knife:"🍴",spoon:"🥄",hocho:"🔪",knife:"🔪",jar:"🫙",amphora:"🏺",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",globe_with_meridians:"🌐",world_map:"🗺️",japan:"🗾",compass:"🧭",mountain_snow:"🏔️",mountain:"⛰️",volcano:"🌋",mount_fuji:"🗻",camping:"🏕️",beach_umbrella:"🏖️",desert:"🏜️",desert_island:"🏝️",national_park:"🏞️",stadium:"🏟️",classical_building:"🏛️",building_construction:"🏗️",bricks:"🧱",rock:"🪨",wood:"🪵",hut:"🛖",houses:"🏘️",derelict_house:"🏚️",house:"🏠",house_with_garden:"🏡",office:"🏢",post_office:"🏣",european_post_office:"🏤",hospital:"🏥",bank:"🏦",hotel:"🏨",love_hotel:"🏩",convenience_store:"🏪",school:"🏫",department_store:"🏬",factory:"🏭",japanese_castle:"🏯",european_castle:"🏰",wedding:"💒",tokyo_tower:"🗼",statue_of_liberty:"🗽",church:"⛪",mosque:"🕌",hindu_temple:"🛕",synagogue:"🕍",shinto_shrine:"⛩️",kaaba:"🕋",fountain:"⛲",tent:"⛺",foggy:"🌁",night_with_stars:"🌃",cityscape:"🏙️",sunrise_over_mountains:"🌄",sunrise:"🌅",city_sunset:"🌆",city_sunrise:"🌇",bridge_at_night:"🌉",hotsprings:"♨️",carousel_horse:"🎠",playground_slide:"🛝",ferris_wheel:"🎡",roller_coaster:"🎢",barber:"💈",circus_tent:"🎪",steam_locomotive:"🚂",railway_car:"🚃",bullettrain_side:"🚄",bullettrain_front:"🚅",train2:"🚆",metro:"🚇",light_rail:"🚈",station:"🚉",tram:"🚊",monorail:"🚝",mountain_railway:"🚞",train:"🚋",bus:"🚌",oncoming_bus:"🚍",trolleybus:"🚎",minibus:"🚐",ambulance:"🚑",fire_engine:"🚒",police_car:"🚓",oncoming_police_car:"🚔",taxi:"🚕",oncoming_taxi:"🚖",car:"🚗",red_car:"🚗",oncoming_automobile:"🚘",blue_car:"🚙",pickup_truck:"🛻",truck:"🚚",articulated_lorry:"🚛",tractor:"🚜",racing_car:"🏎️",motorcycle:"🏍️",motor_scooter:"🛵",manual_wheelchair:"🦽",motorized_wheelchair:"🦼",auto_rickshaw:"🛺",bike:"🚲",kick_scooter:"🛴",skateboard:"🛹",roller_skate:"🛼",busstop:"🚏",motorway:"🛣️",railway_track:"🛤️",oil_drum:"🛢️",fuelpump:"⛽",wheel:"🛞",rotating_light:"🚨",traffic_light:"🚥",vertical_traffic_light:"🚦",stop_sign:"🛑",construction:"🚧",anchor:"⚓",ring_buoy:"🛟",boat:"⛵",sailboat:"⛵",canoe:"🛶",speedboat:"🚤",passenger_ship:"🛳️",ferry:"⛴️",motor_boat:"🛥️",ship:"🚢",airplane:"✈️",small_airplane:"🛩️",flight_departure:"🛫",flight_arrival:"🛬",parachute:"🪂",seat:"💺",helicopter:"🚁",suspension_railway:"🚟",mountain_cableway:"🚠",aerial_tramway:"🚡",artificial_satellite:"🛰️",rocket:"🚀",flying_saucer:"🛸",bellhop_bell:"🛎️",luggage:"🧳",hourglass:"⌛",hourglass_flowing_sand:"⏳",watch:"⌚",alarm_clock:"⏰",stopwatch:"⏱️",timer_clock:"⏲️",mantelpiece_clock:"🕰️",clock12:"🕛",clock1230:"🕧",clock1:"🕐",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",new_moon:"🌑",waxing_crescent_moon:"🌒",first_quarter_moon:"🌓",moon:"🌔",waxing_gibbous_moon:"🌔",full_moon:"🌕",waning_gibbous_moon:"🌖",last_quarter_moon:"🌗",waning_crescent_moon:"🌘",crescent_moon:"🌙",new_moon_with_face:"🌚",first_quarter_moon_with_face:"🌛",last_quarter_moon_with_face:"🌜",thermometer:"🌡️",sunny:"☀️",full_moon_with_face:"🌝",sun_with_face:"🌞",ringed_planet:"🪐",star:"⭐",star2:"🌟",stars:"🌠",milky_way:"🌌",cloud:"☁️",partly_sunny:"⛅",cloud_with_lightning_and_rain:"⛈️",sun_behind_small_cloud:"🌤️",sun_behind_large_cloud:"🌥️",sun_behind_rain_cloud:"🌦️",cloud_with_rain:"🌧️",cloud_with_snow:"🌨️",cloud_with_lightning:"🌩️",tornado:"🌪️",fog:"🌫️",wind_face:"🌬️",cyclone:"🌀",rainbow:"🌈",closed_umbrella:"🌂",open_umbrella:"☂️",umbrella:"☔",parasol_on_ground:"⛱️",zap:"⚡",snowflake:"❄️",snowman_with_snow:"☃️",snowman:"⛄",comet:"☄️",fire:"🔥",droplet:"💧",ocean:"🌊",jack_o_lantern:"🎃",christmas_tree:"🎄",fireworks:"🎆",sparkler:"🎇",firecracker:"🧨",sparkles:"✨",balloon:"🎈",tada:"🎉",confetti_ball:"🎊",tanabata_tree:"🎋",bamboo:"🎍",dolls:"🎎",flags:"🎏",wind_chime:"🎐",rice_scene:"🎑",red_envelope:"🧧",ribbon:"🎀",gift:"🎁",reminder_ribbon:"🎗️",tickets:"🎟️",ticket:"🎫",medal_military:"🎖️",trophy:"🏆",medal_sports:"🏅","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉",soccer:"⚽",baseball:"⚾",softball:"🥎",basketball:"🏀",volleyball:"🏐",football:"🏈",rugby_football:"🏉",tennis:"🎾",flying_disc:"🥏",bowling:"🎳",cricket_game:"🏏",field_hockey:"🏑",ice_hockey:"🏒",lacrosse:"🥍",ping_pong:"🏓",badminton:"🏸",boxing_glove:"🥊",martial_arts_uniform:"🥋",goal_net:"🥅",golf:"⛳",ice_skate:"⛸️",fishing_pole_and_fish:"🎣",diving_mask:"🤿",running_shirt_with_sash:"🎽",ski:"🎿",sled:"🛷",curling_stone:"🥌",dart:"🎯",yo_yo:"🪀",kite:"🪁",gun:"🔫","8ball":"🎱",crystal_ball:"🔮",magic_wand:"🪄",video_game:"🎮",joystick:"🕹️",slot_machine:"🎰",game_die:"🎲",jigsaw:"🧩",teddy_bear:"🧸",pinata:"🪅",mirror_ball:"🪩",nesting_dolls:"🪆",spades:"♠️",hearts:"♥️",diamonds:"♦️",clubs:"♣️",chess_pawn:"♟️",black_joker:"🃏",mahjong:"🀄",flower_playing_cards:"🎴",performing_arts:"🎭",framed_picture:"🖼️",art:"🎨",thread:"🧵",sewing_needle:"🪡",yarn:"🧶",knot:"🪢",eyeglasses:"👓",dark_sunglasses:"🕶️",goggles:"🥽",lab_coat:"🥼",safety_vest:"🦺",necktie:"👔",shirt:"👕",tshirt:"👕",jeans:"👖",scarf:"🧣",gloves:"🧤",coat:"🧥",socks:"🧦",dress:"👗",kimono:"👘",sari:"🥻",one_piece_swimsuit:"🩱",swim_brief:"🩲",shorts:"🩳",bikini:"👙",womans_clothes:"👚",folding_hand_fan:"🪭",purse:"👛",handbag:"👜",pouch:"👝",shopping:"🛍️",school_satchel:"🎒",thong_sandal:"🩴",mans_shoe:"👞",shoe:"👞",athletic_shoe:"👟",hiking_boot:"🥾",flat_shoe:"🥿",high_heel:"👠",sandal:"👡",ballet_shoes:"🩰",boot:"👢",hair_pick:"🪮",crown:"👑",womans_hat:"👒",tophat:"🎩",mortar_board:"🎓",billed_cap:"🧢",military_helmet:"🪖",rescue_worker_helmet:"⛑️",prayer_beads:"📿",lipstick:"💄",ring:"💍",gem:"💎",mute:"🔇",speaker:"🔈",sound:"🔉",loud_sound:"🔊",loudspeaker:"📢",mega:"📣",postal_horn:"📯",bell:"🔔",no_bell:"🔕",musical_score:"🎼",musical_note:"🎵",notes:"🎶",studio_microphone:"🎙️",level_slider:"🎚️",control_knobs:"🎛️",microphone:"🎤",headphones:"🎧",radio:"📻",saxophone:"🎷",accordion:"🪗",guitar:"🎸",musical_keyboard:"🎹",trumpet:"🎺",violin:"🎻",banjo:"🪕",drum:"🥁",long_drum:"🪘",maracas:"🪇",flute:"🪈",iphone:"📱",calling:"📲",phone:"☎️",telephone:"☎️",telephone_receiver:"📞",pager:"📟",fax:"📠",battery:"🔋",low_battery:"🪫",electric_plug:"🔌",computer:"💻",desktop_computer:"🖥️",printer:"🖨️",keyboard:"⌨️",computer_mouse:"🖱️",trackball:"🖲️",minidisc:"💽",floppy_disk:"💾",cd:"💿",dvd:"📀",abacus:"🧮",movie_camera:"🎥",film_strip:"🎞️",film_projector:"📽️",clapper:"🎬",tv:"📺",camera:"📷",camera_flash:"📸",video_camera:"📹",vhs:"📼",mag:"🔍",mag_right:"🔎",candle:"🕯️",bulb:"💡",flashlight:"🔦",izakaya_lantern:"🏮",lantern:"🏮",diya_lamp:"🪔",notebook_with_decorative_cover:"📔",closed_book:"📕",book:"📖",open_book:"📖",green_book:"📗",blue_book:"📘",orange_book:"📙",books:"📚",notebook:"📓",ledger:"📒",page_with_curl:"📃",scroll:"📜",page_facing_up:"📄",newspaper:"📰",newspaper_roll:"🗞️",bookmark_tabs:"📑",bookmark:"🔖",label:"🏷️",moneybag:"💰",coin:"🪙",yen:"💴",dollar:"💵",euro:"💶",pound:"💷",money_with_wings:"💸",credit_card:"💳",receipt:"🧾",chart:"💹",envelope:"✉️",email:"📧","e-mail":"📧",incoming_envelope:"📨",envelope_with_arrow:"📩",outbox_tray:"📤",inbox_tray:"📥",package:"📦",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",postbox:"📮",ballot_box:"🗳️",pencil2:"✏️",black_nib:"✒️",fountain_pen:"🖋️",pen:"🖊️",paintbrush:"🖌️",crayon:"🖍️",memo:"📝",pencil:"📝",briefcase:"💼",file_folder:"📁",open_file_folder:"📂",card_index_dividers:"🗂️",date:"📅",calendar:"📆",spiral_notepad:"🗒️",spiral_calendar:"🗓️",card_index:"📇",chart_with_upwards_trend:"📈",chart_with_downwards_trend:"📉",bar_chart:"📊",clipboard:"📋",pushpin:"📌",round_pushpin:"📍",paperclip:"📎",paperclips:"🖇️",straight_ruler:"📏",triangular_ruler:"📐",scissors:"✂️",card_file_box:"🗃️",file_cabinet:"🗄️",wastebasket:"🗑️",lock:"🔒",unlock:"🔓",lock_with_ink_pen:"🔏",closed_lock_with_key:"🔐",key:"🔑",old_key:"🗝️",hammer:"🔨",axe:"🪓",pick:"⛏️",hammer_and_pick:"⚒️",hammer_and_wrench:"🛠️",dagger:"🗡️",crossed_swords:"⚔️",bomb:"💣",boomerang:"🪃",bow_and_arrow:"🏹",shield:"🛡️",carpentry_saw:"🪚",wrench:"🔧",screwdriver:"🪛",nut_and_bolt:"🔩",gear:"⚙️",clamp:"🗜️",balance_scale:"⚖️",probing_cane:"🦯",link:"🔗",chains:"⛓️",hook:"🪝",toolbox:"🧰",magnet:"🧲",ladder:"🪜",alembic:"⚗️",test_tube:"🧪",petri_dish:"🧫",dna:"🧬",microscope:"🔬",telescope:"🔭",satellite:"📡",syringe:"💉",drop_of_blood:"🩸",pill:"💊",adhesive_bandage:"🩹",crutch:"🩼",stethoscope:"🩺",x_ray:"🩻",door:"🚪",elevator:"🛗",mirror:"🪞",window:"🪟",bed:"🛏️",couch_and_lamp:"🛋️",chair:"🪑",toilet:"🚽",plunger:"🪠",shower:"🚿",bathtub:"🛁",mouse_trap:"🪤",razor:"🪒",lotion_bottle:"🧴",safety_pin:"🧷",broom:"🧹",basket:"🧺",roll_of_paper:"🧻",bucket:"🪣",soap:"🧼",bubbles:"🫧",toothbrush:"🪥",sponge:"🧽",fire_extinguisher:"🧯",shopping_cart:"🛒",smoking:"🚬",coffin:"⚰️",headstone:"🪦",funeral_urn:"⚱️",nazar_amulet:"🧿",hamsa:"🪬",moyai:"🗿",placard:"🪧",identification_card:"🪪",atm:"🏧",put_litter_in_its_place:"🚮",potable_water:"🚰",wheelchair:"♿",mens:"🚹",womens:"🚺",restroom:"🚻",baby_symbol:"🚼",wc:"🚾",passport_control:"🛂",customs:"🛃",baggage_claim:"🛄",left_luggage:"🛅",warning:"⚠️",children_crossing:"🚸",no_entry:"⛔",no_entry_sign:"🚫",no_bicycles:"🚳",no_smoking:"🚭",do_not_litter:"🚯","non-potable_water":"🚱",no_pedestrians:"🚷",no_mobile_phones:"📵",underage:"🔞",radioactive:"☢️",biohazard:"☣️",arrow_up:"⬆️",arrow_upper_right:"↗️",arrow_right:"➡️",arrow_lower_right:"↘️",arrow_down:"⬇️",arrow_lower_left:"↙️",arrow_left:"⬅️",arrow_upper_left:"↖️",arrow_up_down:"↕️",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",arrow_right_hook:"↪️",arrow_heading_up:"⤴️",arrow_heading_down:"⤵️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",back:"🔙",end:"🔚",on:"🔛",soon:"🔜",top:"🔝",place_of_worship:"🛐",atom_symbol:"⚛️",om:"🕉️",star_of_david:"✡️",wheel_of_dharma:"☸️",yin_yang:"☯️",latin_cross:"✝️",orthodox_cross:"☦️",star_and_crescent:"☪️",peace_symbol:"☮️",menorah:"🕎",six_pointed_star:"🔯",khanda:"🪯",aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpius:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓",ophiuchus:"⛎",twisted_rightwards_arrows:"🔀",repeat:"🔁",repeat_one:"🔂",arrow_forward:"▶️",fast_forward:"⏩",next_track_button:"⏭️",play_or_pause_button:"⏯️",arrow_backward:"◀️",rewind:"⏪",previous_track_button:"⏮️",arrow_up_small:"🔼",arrow_double_up:"⏫",arrow_down_small:"🔽",arrow_double_down:"⏬",pause_button:"⏸️",stop_button:"⏹️",record_button:"⏺️",eject_button:"⏏️",cinema:"🎦",low_brightness:"🔅",high_brightness:"🔆",signal_strength:"📶",wireless:"🛜",vibration_mode:"📳",mobile_phone_off:"📴",female_sign:"♀️",male_sign:"♂️",transgender_symbol:"⚧️",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",heavy_minus_sign:"➖",heavy_division_sign:"➗",heavy_equals_sign:"🟰",infinity:"♾️",bangbang:"‼️",interrobang:"⁉️",question:"❓",grey_question:"❔",grey_exclamation:"❕",exclamation:"❗",heavy_exclamation_mark:"❗",wavy_dash:"〰️",currency_exchange:"💱",heavy_dollar_sign:"💲",medical_symbol:"⚕️",recycle:"♻️",fleur_de_lis:"⚜️",trident:"🔱",name_badge:"📛",beginner:"🔰",o:"⭕",white_check_mark:"✅",ballot_box_with_check:"☑️",heavy_check_mark:"✔️",x:"❌",negative_squared_cross_mark:"❎",curly_loop:"➰",loop:"➿",part_alternation_mark:"〽️",eight_spoked_asterisk:"✳️",eight_pointed_black_star:"✴️",sparkle:"❇️",copyright:"©️",registered:"®️",tm:"™️",hash:"#️⃣",asterisk:"*️⃣",zero:"0️⃣",one:"1️⃣",two:"2️⃣",three:"3️⃣",four:"4️⃣",five:"5️⃣",six:"6️⃣",seven:"7️⃣",eight:"8️⃣",nine:"9️⃣",keycap_ten:"🔟",capital_abcd:"🔠",abcd:"🔡",symbols:"🔣",abc:"🔤",a:"🅰️",ab:"🆎",b:"🅱️",cl:"🆑",cool:"🆒",free:"🆓",information_source:"ℹ️",id:"🆔",m:"Ⓜ️",new:"🆕",ng:"🆖",o2:"🅾️",ok:"🆗",parking:"🅿️",sos:"🆘",up:"🆙",vs:"🆚",koko:"🈁",sa:"🈂️",u6708:"🈷️",u6709:"🈶",u6307:"🈯",ideograph_advantage:"🉐",u5272:"🈹",u7121:"🈚",u7981:"🈲",accept:"🉑",u7533:"🈸",u5408:"🈴",u7a7a:"🈳",congratulations:"㊗️",secret:"㊙️",u55b6:"🈺",u6e80:"🈵",red_circle:"🔴",orange_circle:"🟠",yellow_circle:"🟡",green_circle:"🟢",large_blue_circle:"🔵",purple_circle:"🟣",brown_circle:"🟤",black_circle:"⚫",white_circle:"⚪",red_square:"🟥",orange_square:"🟧",yellow_square:"🟨",green_square:"🟩",blue_square:"🟦",purple_square:"🟪",brown_square:"🟫",black_large_square:"⬛",white_large_square:"⬜",black_medium_square:"◼️",white_medium_square:"◻️",black_medium_small_square:"◾",white_medium_small_square:"◽",black_small_square:"▪️",white_small_square:"▫️",large_orange_diamond:"🔶",large_blue_diamond:"🔷",small_orange_diamond:"🔸",small_blue_diamond:"🔹",small_red_triangle:"🔺",small_red_triangle_down:"🔻",diamond_shape_with_a_dot_inside:"💠",radio_button:"🔘",white_square_button:"🔳",black_square_button:"🔲",checkered_flag:"🏁",triangular_flag_on_post:"🚩",crossed_flags:"🎌",black_flag:"🏴",white_flag:"🏳️",rainbow_flag:"🏳️‍🌈",transgender_flag:"🏳️‍⚧️",pirate_flag:"🏴‍☠️",ascension_island:"🇦🇨",andorra:"🇦🇩",united_arab_emirates:"🇦🇪",afghanistan:"🇦🇫",antigua_barbuda:"🇦🇬",anguilla:"🇦🇮",albania:"🇦🇱",armenia:"🇦🇲",angola:"🇦🇴",antarctica:"🇦🇶",argentina:"🇦🇷",american_samoa:"🇦🇸",austria:"🇦🇹",australia:"🇦🇺",aruba:"🇦🇼",aland_islands:"🇦🇽",azerbaijan:"🇦🇿",bosnia_herzegovina:"🇧🇦",barbados:"🇧🇧",bangladesh:"🇧🇩",belgium:"🇧🇪",burkina_faso:"🇧🇫",bulgaria:"🇧🇬",bahrain:"🇧🇭",burundi:"🇧🇮",benin:"🇧🇯",st_barthelemy:"🇧🇱",bermuda:"🇧🇲",brunei:"🇧🇳",bolivia:"🇧🇴",caribbean_netherlands:"🇧🇶",brazil:"🇧🇷",bahamas:"🇧🇸",bhutan:"🇧🇹",bouvet_island:"🇧🇻",botswana:"🇧🇼",belarus:"🇧🇾",belize:"🇧🇿",canada:"🇨🇦",cocos_islands:"🇨🇨",congo_kinshasa:"🇨🇩",central_african_republic:"🇨🇫",congo_brazzaville:"🇨🇬",switzerland:"🇨🇭",cote_divoire:"🇨🇮",cook_islands:"🇨🇰",chile:"🇨🇱",cameroon:"🇨🇲",cn:"🇨🇳",colombia:"🇨🇴",clipperton_island:"🇨🇵",costa_rica:"🇨🇷",cuba:"🇨🇺",cape_verde:"🇨🇻",curacao:"🇨🇼",christmas_island:"🇨🇽",cyprus:"🇨🇾",czech_republic:"🇨🇿",de:"🇩🇪",diego_garcia:"🇩🇬",djibouti:"🇩🇯",denmark:"🇩🇰",dominica:"🇩🇲",dominican_republic:"🇩🇴",algeria:"🇩🇿",ceuta_melilla:"🇪🇦",ecuador:"🇪🇨",estonia:"🇪🇪",egypt:"🇪🇬",western_sahara:"🇪🇭",eritrea:"🇪🇷",es:"🇪🇸",ethiopia:"🇪🇹",eu:"🇪🇺",european_union:"🇪🇺",finland:"🇫🇮",fiji:"🇫🇯",falkland_islands:"🇫🇰",micronesia:"🇫🇲",faroe_islands:"🇫🇴",fr:"🇫🇷",gabon:"🇬🇦",gb:"🇬🇧",uk:"🇬🇧",grenada:"🇬🇩",georgia:"🇬🇪",french_guiana:"🇬🇫",guernsey:"🇬🇬",ghana:"🇬🇭",gibraltar:"🇬🇮",greenland:"🇬🇱",gambia:"🇬🇲",guinea:"🇬🇳",guadeloupe:"🇬🇵",equatorial_guinea:"🇬🇶",greece:"🇬🇷",south_georgia_south_sandwich_islands:"🇬🇸",guatemala:"🇬🇹",guam:"🇬🇺",guinea_bissau:"🇬🇼",guyana:"🇬🇾",hong_kong:"🇭🇰",heard_mcdonald_islands:"🇭🇲",honduras:"🇭🇳",croatia:"🇭🇷",haiti:"🇭🇹",hungary:"🇭🇺",canary_islands:"🇮🇨",indonesia:"🇮🇩",ireland:"🇮🇪",israel:"🇮🇱",isle_of_man:"🇮🇲",india:"🇮🇳",british_indian_ocean_territory:"🇮🇴",iraq:"🇮🇶",iran:"🇮🇷",iceland:"🇮🇸",it:"🇮🇹",jersey:"🇯🇪",jamaica:"🇯🇲",jordan:"🇯🇴",jp:"🇯🇵",kenya:"🇰🇪",kyrgyzstan:"🇰🇬",cambodia:"🇰🇭",kiribati:"🇰🇮",comoros:"🇰🇲",st_kitts_nevis:"🇰🇳",north_korea:"🇰🇵",kr:"🇰🇷",kuwait:"🇰🇼",cayman_islands:"🇰🇾",kazakhstan:"🇰🇿",laos:"🇱🇦",lebanon:"🇱🇧",st_lucia:"🇱🇨",liechtenstein:"🇱🇮",sri_lanka:"🇱🇰",liberia:"🇱🇷",lesotho:"🇱🇸",lithuania:"🇱🇹",luxembourg:"🇱🇺",latvia:"🇱🇻",libya:"🇱🇾",morocco:"🇲🇦",monaco:"🇲🇨",moldova:"🇲🇩",montenegro:"🇲🇪",st_martin:"🇲🇫",madagascar:"🇲🇬",marshall_islands:"🇲🇭",macedonia:"🇲🇰",mali:"🇲🇱",myanmar:"🇲🇲",mongolia:"🇲🇳",macau:"🇲🇴",northern_mariana_islands:"🇲🇵",martinique:"🇲🇶",mauritania:"🇲🇷",montserrat:"🇲🇸",malta:"🇲🇹",mauritius:"🇲🇺",maldives:"🇲🇻",malawi:"🇲🇼",mexico:"🇲🇽",malaysia:"🇲🇾",mozambique:"🇲🇿",namibia:"🇳🇦",new_caledonia:"🇳🇨",niger:"🇳🇪",norfolk_island:"🇳🇫",nigeria:"🇳🇬",nicaragua:"🇳🇮",netherlands:"🇳🇱",norway:"🇳🇴",nepal:"🇳🇵",nauru:"🇳🇷",niue:"🇳🇺",new_zealand:"🇳🇿",oman:"🇴🇲",panama:"🇵🇦",peru:"🇵🇪",french_polynesia:"🇵🇫",papua_new_guinea:"🇵🇬",philippines:"🇵🇭",pakistan:"🇵🇰",poland:"🇵🇱",st_pierre_miquelon:"🇵🇲",pitcairn_islands:"🇵🇳",puerto_rico:"🇵🇷",palestinian_territories:"🇵🇸",portugal:"🇵🇹",palau:"🇵🇼",paraguay:"🇵🇾",qatar:"🇶🇦",reunion:"🇷🇪",romania:"🇷🇴",serbia:"🇷🇸",ru:"🇷🇺",rwanda:"🇷🇼",saudi_arabia:"🇸🇦",solomon_islands:"🇸🇧",seychelles:"🇸🇨",sudan:"🇸🇩",sweden:"🇸🇪",singapore:"🇸🇬",st_helena:"🇸🇭",slovenia:"🇸🇮",svalbard_jan_mayen:"🇸🇯",slovakia:"🇸🇰",sierra_leone:"🇸🇱",san_marino:"🇸🇲",senegal:"🇸🇳",somalia:"🇸🇴",suriname:"🇸🇷",south_sudan:"🇸🇸",sao_tome_principe:"🇸🇹",el_salvador:"🇸🇻",sint_maarten:"🇸🇽",syria:"🇸🇾",swaziland:"🇸🇿",tristan_da_cunha:"🇹🇦",turks_caicos_islands:"🇹🇨",chad:"🇹🇩",french_southern_territories:"🇹🇫",togo:"🇹🇬",thailand:"🇹🇭",tajikistan:"🇹🇯",tokelau:"🇹🇰",timor_leste:"🇹🇱",turkmenistan:"🇹🇲",tunisia:"🇹🇳",tonga:"🇹🇴",tr:"🇹🇷",trinidad_tobago:"🇹🇹",tuvalu:"🇹🇻",taiwan:"🇹🇼",tanzania:"🇹🇿",ukraine:"🇺🇦",uganda:"🇺🇬",us_outlying_islands:"🇺🇲",united_nations:"🇺🇳",us:"🇺🇸",uruguay:"🇺🇾",uzbekistan:"🇺🇿",vatican_city:"🇻🇦",st_vincent_grenadines:"🇻🇨",venezuela:"🇻🇪",british_virgin_islands:"🇻🇬",us_virgin_islands:"🇻🇮",vietnam:"🇻🇳",vanuatu:"🇻🇺",wallis_futuna:"🇼🇫",samoa:"🇼🇸",kosovo:"🇽🇰",yemen:"🇾🇪",mayotte:"🇾🇹",south_africa:"🇿🇦",zambia:"🇿🇲",zimbabwe:"🇿🇼",england:"🏴󠁧󠁢󠁥󠁮󠁧󠁿",scotland:"🏴󠁧󠁢󠁳󠁣󠁴󠁿",wales:"🏴󠁧󠁢󠁷󠁬󠁳󠁿"};function Ro(e,t,n){const r=dr((n||{}).ignore||[]),i=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r0?{type:"text",value:a}:void 0),!1===a?r.lastIndex=n+1:(o!==n&&u.push({type:"text",value:e.value.slice(o,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),o=n+h[0].length,l=!0),!r.global)break;h=r.exec(e.value)}l?(o?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=xo(e,"(");let a=xo(e,")");for(;-1!==r&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function qo(e,t,n,r){return!(!Vo(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Vo(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||St(n)||It(n))&&(!t||47!==n)}function Wo(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Qo(){this.buffer()}function Xo(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=pt(this.sliceSerialize(e)).toLowerCase()}function Ko(e){this.exit(e)}function Jo(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function $o(){this.buffer()}function Zo(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=pt(this.sliceSerialize(e)).toLowerCase()}function ec(e){this.exit(e)}function tc(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),o(),s(),a+=i.move("]"),a}function nc(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteDefinition"),o=n.enter("label");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),o(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(n.indentLines(n.containerFlow(e,i.current()),rc)),s(),a}function rc(e,t,n){return 0===t?e:(n?"":" ")+e}tc.peek=function(){return"["};const ic=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function ac(e){this.enter({type:"delete",children:[]},e)}function sc(e){this.exit(e)}function oc(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function cc(e){return e.length}function lc(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function uc(e,t,n){return">"+(n?"":" ")+e}function hc(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r",...c.current()})),l+=c.move(">")):(o=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=c.move(" "+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),o()),l+=c.move(")"),s(),l}function Ac(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let c=o.move("![");const l=n.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(l+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return s(),n.stack=u,a(),"full"!==i&&l&&l===h?"shortcut"===i?c=c.slice(0,-1):c+=o.move("]"):c+=o.move(h+"]"),c}function kc(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a\u007F]/.test(e.url))}function Ic(e,t,n,r){const i=mc(n),a='"'===i?"Quote":"Apostrophe",s=n.createTracker(r);let o,c;if(bc(e,n)){const t=n.stack;n.stack=[],o=n.enter("autolink");let r=s.move("<");return r+=s.move(n.containerPhrasing(e,{before:r,after:">",...s.current()})),r+=s.move(">"),o(),n.stack=t,r}o=n.enter("link"),c=n.enter("label");let l=s.move("[");return l+=s.move(n.containerPhrasing(e,{before:l,after:"](",...s.current()})),l+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(n.safe(e.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(c=n.enter("destinationRaw"),l+=s.move(n.safe(e.url,{before:l,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=s.move(" "+i),l+=s.move(n.safe(e.title,{before:l,after:i,...s.current()})),l+=s.move(i),c()),l+=s.move(")"),o(),l}function Sc(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let c=o.move("[");const l=n.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(l+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return s(),n.stack=u,a(),"full"!==i&&l&&l===h?"shortcut"===i?c=c.slice(0,-1):c+=o.move("]"):c+=o.move(h+"]"),c}function Nc(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Cc(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}oc.peek=function(){return"~"},Ec.peek=function(e,t,n){return n.options.emphasis||"*"},Tc.peek=function(){return"<"},gc.peek=function(){return"!"},Ac.peek=function(){return"!"},kc.peek=function(){return"`"},Ic.peek=function(e,t,n){return bc(e,n)?"<":"["},Sc.peek=function(){return"["};const yc=dr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Dc(e,t,n,r){const i=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),a=n.enter("strong"),s=n.createTracker(r),o=s.move(i+i);let c=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const l=c.charCodeAt(0),u=_c(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=fc(l)+c.slice(1));const h=c.charCodeAt(c.length-1),p=_c(r.after.charCodeAt(0),h,i);p.inside&&(c=c.slice(0,-1)+fc(h));const d=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},o+c+d}Dc.peek=function(e,t,n){return n.options.strong||"*"};const Oc={blockquote:function(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),uc);return i(),s},break:pc,code:function(e,t,n,r){const i=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),a=e.value||"",s="`"===i?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(a,dc);return e(),t}const o=n.createTracker(r),c=i.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}(a,i)+1,3)),l=n.enter("codeFenced");let u=o.move(c);if(e.lang){const t=n.enter(`codeFencedLang${s}`);u+=o.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${s}`);u+=o.move(" "),u+=o.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...o.current()})),t()}return u+=o.move("\n"),a&&(u+=o.move(a+"\n")),u+=o.move(c),l(),u},definition:function(e,t,n,r){const i=mc(n),a='"'===i?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const c=n.createTracker(r);let l=c.move("[");return l+=c.move(n.safe(n.associationId(e),{before:l,after:"]",...c.current()})),l+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(o=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":"\n",...c.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=c.move(" "+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),o()),s(),l},emphasis:Ec,hardBreak:pc,heading:function(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(function(e,t){let n=!1;return Ar(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,Tr})),Boolean((!e.depth||e.depth<3)&&et(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),s=n.containerPhrasing(e,{...a.current(),before:"\n",after:"\n"});return r(),t(),s+"\n"+(1===i?"=":"-").repeat(s.length-(Math.max(s.lastIndexOf("\r"),s.lastIndexOf("\n"))+1))}const s="#".repeat(i),o=n.enter("headingAtx"),c=n.enter("phrasing");a.move(s+" ");let l=n.containerPhrasing(e,{before:"# ",after:"\n",...a.current()});return/^[\t ]/.test(l)&&(l=fc(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),c(),o(),l},html:Tc,image:gc,imageReference:Ac,inlineCode:kc,link:Ic,linkReference:Sc,list:function(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Nc(n);const o=e.ordered?"."===s?")":".":function(e){const t=Nc(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let c=!(!t||!n.bulletLastUsed)&&s===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==s&&"-"!==s||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(c=!0),Cc(n)===s&&t){let t=-1;for(;++t-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+a);let s=a.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const c=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,o.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(s))+e;return(n?a:a+" ".repeat(s-a.length))+e}));return c(),l},paragraph:function(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s},root:function(e,t,n,r){return(e.children.some((function(e){return yc(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Dc,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Cc(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Rc(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function Lc(e){this.exit(e),this.data.inTable=void 0}function wc(e){this.enter({type:"tableRow",children:[]},e)}function Pc(e){this.exit(e)}function xc(e){this.enter({type:"tableCell",children:[]},e)}function Mc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,vc));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function vc(e,t){return"|"===t?t:e}function Bc(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Oc.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return o(function(e,t,n){const r=e.children;let i=-1;const a=[],s=t.enter("table");for(;++il&&(l=e[u].length);++ac[a])&&(c[a]=e)}t.push(s)}s[u]=t,o[u]=r}var h;let p=-1;if("object"==typeof r&&"length"in r)for(;++pc[p]&&(c[p]=i),m[p]=i),d[p]=s}s.splice(1,0,d),o.splice(1,0,m),u=-1;const f=[];for(;++u0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Xc[43]=Qc,Xc[45]=Qc,Xc[46]=Qc,Xc[95]=Qc,Xc[72]=[Qc,Wc],Xc[104]=[Qc,Wc],Xc[87]=[Qc,Vc],Xc[119]=[Qc,Vc];const nl={tokenize:function(e,t,n){const r=this;return yt(e,(function(e){const i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function rl(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const e=r.events[i][1];if("labelImage"===e.type){s=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!s||!s._balanced)return n(i);const o=pt(r.sliceSerialize({start:s.end,end:r.now()}));if(94!==o.codePointAt(0)||!a.includes(o.slice(1)))return n(i);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)}}function il(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function al(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),o};function o(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(o){if(s>999||93===o&&!a||null===o||91===o||kt(o))return n(o);if(93===o){e.exit("chunkString");const a=e.exit("gfmFootnoteCallString");return i.includes(pt(r.sliceSerialize(a)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(o)}return kt(o)||(a=!0),s++,e.consume(o),92===o?l:c}function l(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function sl(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s,o=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),c};function c(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",l):n(t)}function l(t){if(o>999||93===t&&!s||null===t||91===t||kt(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return a=pt(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return kt(t)||(s=!0),o++,e.consume(t),92===t?u:l}function u(t){return 91===t||92===t||93===t?(e.consume(t),o++,l):l(t)}function h(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(a)||i.push(a),yt(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function ol(e,t,n){return e.check(vt,t,e.attempt(nl,t,n))}function cl(e){e.exit("gfmFootnoteDefinition")}function ll(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const i=this.previous,a=this.events;let s=0;return function(t){if(126===i&&"characterEscape"!==a[a.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),o(t)};function o(a){const c=Lt(i);if(126===a)return s>1?r(a):(e.consume(a),s++,o);if(s<2&&!t)return r(a);const l=e.exit("strikethroughSequenceTemporary"),u=Lt(a);return l._open=!u||2===u&&Boolean(c),l._close=!c||2===c&&Boolean(u),n(a)}},resolveAll:function(e,t){let n=-1;for(;++n0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push([...e]),e.length=0;let r=n.pop();for(;r;)e.push(...r),r=n.pop();this.map.length=0}}function hl(e,t){let n=!1;const r=[];for(;t-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const i=t>-1?r.events[t][1].type:null,a="tableHead"===i||"tableRow"===i?A:o;if(a===A&&r.parser.lazy[r.now().line])return n(e);return a(e)};function o(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return c(e);return i=!0,s+=1,c(e)}(t)}function c(t){return null===t?n(t):At(t)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h):n(t):bt(t)?yt(e,c,"whitespace")(t):(s+=1,i&&(i=!1,a+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),i=!0,c):(e.enter("data"),l(t)))}function l(t){return null===t||124===t||kt(t)?(e.exit("data"),c(t)):(e.consume(t),92===t?u:l)}function u(t){return 92===t||124===t?(e.consume(t),l):l(t)}function h(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),i=!1,bt(t)?yt(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?m(t):124===t?(i=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),d):g(t)}function d(t){return bt(t)?yt(e,m,"whitespace")(t):m(t)}function m(t){return 58===t?(s+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),f):45===t?(s+=1,f(t)):null===t||At(t)?T(t):g(t)}function f(t){return 45===t?(e.enter("tableDelimiterFiller"),_(t)):g(t)}function _(t){return 45===t?(e.consume(t),_):58===t?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(t))}function E(t){return bt(t)?yt(e,T,"whitespace")(t):T(t)}function T(n){return 124===n?p(n):(null===n||At(n))&&i&&a===s?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):g(n)}function g(e){return n(e)}function A(t){return e.enter("tableRow"),k(t)}function k(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),k):null===n||At(n)?(e.exit("tableRow"),t(n)):bt(n)?yt(e,k,"whitespace")(n):(e.enter("data"),b(n))}function b(t){return null===t||124===t||kt(t)?(e.exit("data"),k(t)):(e.consume(t),92===t?I:b)}function I(t){return 92===t||124===t?(e.consume(t),b):b(t)}}function dl(e,t){let n,r,i,a=-1,s=!0,o=0,c=[0,0,0,0],l=[0,0,0,0],u=!1,h=0;const p=new ul;for(;++an[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",s,t]])}return void 0!==i&&(a.end=Object.assign({},_l(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function fl(e,t,n,r,i){const a=[],s=_l(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function _l(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const El={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i};function i(t){return kt(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(t)}function s(r){return At(r)?t(r):bt(r)?e.check({tokenize:Tl},t,n)(r):n(r)}}};function Tl(e,t,n){return yt(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const gl={};function Al(e){const t=e||gl,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return ct([{text:Xc},{document:{91:{name:"gfmFootnoteDefinition",tokenize:sl,continuation:{tokenize:ol},exit:cl}},text:{91:{name:"gfmFootnoteCall",tokenize:al},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:rl,resolveTo:il}}},ll(e),{flow:{null:{name:"table",tokenize:pl,resolveAll:dl}}},{text:{91:El}}])}(t)),i.push([{transforms:[Yo],enter:{literalAutolink:Bo,literalAutolinkEmail:Fo,literalAutolinkHttp:Fo,literalAutolinkWww:Fo},exit:{literalAutolink:zo,literalAutolinkEmail:Go,literalAutolinkHttp:Ho,literalAutolinkWww:Uo}},{enter:{gfmFootnoteDefinition:Wo,gfmFootnoteDefinitionLabelString:Qo,gfmFootnoteCall:Jo,gfmFootnoteCallString:$o},exit:{gfmFootnoteDefinition:Ko,gfmFootnoteDefinitionLabelString:Xo,gfmFootnoteCall:ec,gfmFootnoteCallString:Zo}},{canContainEols:["delete"],enter:{strikethrough:ac},exit:{strikethrough:sc}},{enter:{table:Rc,tableData:xc,tableHeader:xc,tableRow:wc},exit:{codeText:Mc,table:Lc,tableData:Pc,tableHeader:Pc,tableRow:Pc}},{exit:{taskListCheckValueChecked:Fc,taskListCheckValueUnchecked:Fc,paragraph:Hc}}]),a.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Mo,notInConstruct:vo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Mo,notInConstruct:vo},{character:":",before:"[ps]",after:"\\/",inConstruct:Mo,notInConstruct:vo}]},{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:nc,footnoteReference:tc}},{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ic}],handlers:{delete:oc}},Bc(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Uc}}]}}(t))}const kl=["strong","summary","blockquote","details","table","tbody","thead","h1","h2","h3","h4","h5","h6","input","div","pre","ul","ol","li","br","em","hr","td","th","tr","a","img","p","del","span","code","button","mark"],bl=a.lazy((()=>p((()=>import("./index-Aym4CANT.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Alert}))))),Il=a.lazy((()=>p((()=>import("./index-Aym4CANT.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Avatar}))))),Sl=a.lazy((()=>p((()=>import("./index-Aym4CANT.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Button}))))),Nl=a.lazy((()=>p((()=>import("./index-Aym4CANT.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Byline}))))),Cl=a.lazy((()=>p((()=>import("./index-Aym4CANT.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Checkbox}))))),yl=a.lazy((()=>p((()=>import("./index-Aym4CANT.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Heading}))))),Dl=a.lazy((()=>p((()=>import("./index-Aym4CANT.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Img}))))),Ol=a.lazy((()=>p((()=>import("./index-Aym4CANT.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Link}))))),Rl=a.lazy((()=>p((()=>import("./index-Aym4CANT.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.SourceCodeEditor}))))),Ll=a.lazy((()=>p((()=>import("./index-Aym4CANT.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.Text}))))),wl=a.lazy((()=>p((()=>import("./index-Aym4CANT.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.ToggleDetails}))))),Pl=a.lazy((()=>p((()=>import("./index-Aym4CANT.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then((e=>({default:e.View}))))),xl=e=>a.Children.map(e.children,(e=>"string"!=typeof e?e:null)),Ml=e=>e?.style?.textAlign?.replace(/\b(left|right)\b/,(e=>"left"===e?"start":"end"))??"start",vl={hr:({node:e,...t})=>h.jsx(Pl,{as:e?.tagName,shadow:"topmost",borderWidth:"small",margin:"small none",padding:"none",borderColor:"primary",...t}),a:({node:e,...t})=>h.jsx(Ol,{to:e.href,...t}),button:({node:e,...t})=>h.jsx(Sl,{withBackground:!1,...t}),p:({node:e,...t})=>h.jsx(Ll,{as:e.tagName,...t}),em:({node:e,...t})=>h.jsx(Ll,{fontStyle:"italic",...t}),strong:({node:e,...t})=>h.jsx(Ll,{weight:"bold",...t}),span:({node:e,...t})=>h.jsx(Ll,{as:e.tagName,...t}),code:({node:e,...t})=>h.jsx(Ll,{as:e.tagName,...t}),del:({node:e,...t})=>h.jsx(Ll,{as:e.tagName,...t}),blockquote:({node:e,...t})=>{t={...t,children:xl(t)};const n={NOTE:"info",TIP:"success",IMPORTANT:"info",WARNING:"warning",CAUTION:"error"},r=a.Children.toArray(t.children)[0];let i,s;d.isValidElement(r)?[i,s]=r.props.children.split("--",2):[i,s]=r.toString().split("--",2);const o=i.match(/\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/);return o?h.jsx(bl,{variant:n[o[1]],children:i.replace(`${o[0]}`,"")}):h.jsx(Nl,{description:i,title:s,margin:"medium 0",...t,children:s?h.jsx(Il,{name:s}):h.jsx(h.Fragment,{})})},h1:({node:e,...t})=>h.jsx(yl,{margin:"none none medium",level:e.tagName,...t}),h2:({node:e,...t})=>h.jsx(yl,{margin:"small none",level:e.tagName,...t}),h3:({node:e,...t})=>h.jsx(yl,{margin:"small none",level:e.tagName,...t}),h4:({node:e,...t})=>h.jsx(yl,{level:e.tagName,...t}),h5:({node:e,...t})=>h.jsx(yl,{level:e.tagName,...t}),h6:({node:e,...t})=>h.jsx(yl,{as:"h6",...t}),img:({node:e,...t})=>h.jsx(Dl,{src:e.src,...t}),div:({node:e,...t})=>h.jsx(Pl,{as:e.tagName,...t}),pre:({node:e,...t})=>{if(1===e.children.length&&"code"===e.children[0].tagName){let t=e.children[0].children[0].value;return t.endsWith("\n")&&(t=t.slice(0,-1)),h.jsx(Rl,{label:"Code",lineNumbers:!0,foldGutter:!0,editable:!0,readOnly:!0,defaultValue:t})}return h.jsx(Pl,{as:e.tagName,...t})},ul:({node:e,...t})=>{t={...t,children:xl(t)};const{children:n,...r}=t,i="contains-task-list"===r?.className||!1;return h.jsx(C,{isUnstyled:i,...r,children:a.Children.map(n,(e=>{const{children:t,...n}=e.props;if(i&&t){let r=!1;return h.jsx(C.Item,{margin:"0 0 small small",...n,children:a.Children.map(t,(e=>{if("checkbox"===e?.props?.type&&(r=e?.props?.checked??!1),"checkbox"!==e?.props?.type&&" "!==e&&"[ ]"!==e&&"[X]"!==e)return h.jsx(Cl,{label:e,disabled:!0,defaultChecked:r})}))},e.key)}return h.jsx(C.Item,{...e.props},e.key)}))})},ol:({node:e,...t})=>{t={...t,children:xl(t)};const{children:n,...r}=t;return h.jsx(C,{as:e.tagName,...r,children:a.Children.map(n,(e=>h.jsx(C.Item,{...e.props},e.key)))})},input:({node:e,...t})=>h.jsx(e.tagName,{...t}),details:({node:e,...t})=>{const n=(t={...t,children:xl(t)}).children.shift();return h.jsx(wl,{summary:n,children:h.jsx(Pl,{display:"block",padding:"small",...t})})},table:({node:e,...t})=>{const{children:n,...r}=t;return h.jsx(_,{margin:"medium none",hover:!0,caption:"",...r,children:a.Children.map(n,(e=>{const{children:t,...n}=e.props;return"thead"===e.type?h.jsx(_.Head,{...n,children:a.Children.map(t,(e=>{const{children:t,...n}=e.props;return h.jsx(_.Row,{...n,children:a.Children.map(t,(e=>h.jsx(_.ColHeader,{id:e.key,textAlign:Ml(e.props),...e.props},e.key)))})}))}):h.jsx(_.Body,{...n,children:a.Children.map(t,(e=>{const{children:t,...n}=e.props;return h.jsx(_.Row,{...n,children:a.Children.map(t,(e=>h.jsx(_.Cell,{textAlign:Ml(e.props),...e.props})))})}))})}))})}};export{C as L,oi as M,Po as a,Do as b,kl as c,vl as d,k as e,Al as r}; diff --git a/assets/RenderTabNav-BgCD-W_P.js b/assets/RenderTabNav-Cf-NKHb4.js similarity index 88% rename from assets/RenderTabNav-BgCD-W_P.js rename to assets/RenderTabNav-Cf-NKHb4.js index a4a5531..8dfb178 100644 --- a/assets/RenderTabNav-BgCD-W_P.js +++ b/assets/RenderTabNav-Cf-NKHb4.js @@ -1 +1 @@ -import{a as e,P as a,j as n,V as s}from"./index-CrryxQyl.js";import{T as r}from"./index-DVeZ9h9n.js";function o(o){const t=e.c(21),{language:d,brand:l}=o,c=d;let m,p,w,j,x,f,h,C,b;if(t[0]!==l||t[1]!==c){const e=[...a],o=l.toLowerCase().split(" ")[0],d=`.markdown .lang { display: none; } .markdown .lang.${c.toUpperCase()} { display: inherit; }`,C=i;x=s,f="div",t[9]!==d?(h=n.jsx("style",{children:d}),t[9]=d,t[10]=h):h=t[10],m=r,p=C,w="secondary",j=e.map((e=>n.jsx(r.Panel,{id:e.brandName.toLowerCase(),renderTitle:e.brandName,isSelected:e.title===o},e.brandName.toLowerCase())),[o]),t[0]=l,t[1]=c,t[2]=m,t[3]=p,t[4]=w,t[5]=j,t[6]=x,t[7]=f,t[8]=h}else m=t[2],p=t[3],w=t[4],j=t[5],x=t[6],f=t[7],h=t[8];return t[11]!==m||t[12]!==p||t[13]!==w||t[14]!==j?(C=n.jsx(m,{onRequestTabChange:p,variant:w,children:j}),t[11]=m,t[12]=p,t[13]=w,t[14]=j,t[15]=C):C=t[15],t[16]!==x||t[17]!==f||t[18]!==h||t[19]!==C?(b=n.jsxs(x,{as:f,children:[h,C]}),t[16]=x,t[17]=f,t[18]=h,t[19]=C,t[20]=b):b=t[20],b}function i(e,a){window.location.href=`/#/${a.id?.toLowerCase().replaceAll(" ","-")}`}export{o as R}; +import{a as e,P as a,j as n,V as s}from"./index-DxmLT0bY.js";import{T as r}from"./index-VWJm_On8.js";function o(o){const t=e.c(21),{language:d,brand:l}=o,c=d;let m,p,w,j,x,f,h,C,b;if(t[0]!==l||t[1]!==c){const e=[...a],o=l.toLowerCase().split(" ")[0],d=`.markdown .lang { display: none; } .markdown .lang.${c.toUpperCase()} { display: inherit; }`,C=i;x=s,f="div",t[9]!==d?(h=n.jsx("style",{children:d}),t[9]=d,t[10]=h):h=t[10],m=r,p=C,w="secondary",j=e.map((e=>n.jsx(r.Panel,{id:e.brandName.toLowerCase(),renderTitle:e.brandName,isSelected:e.title===o},e.brandName.toLowerCase())),[o]),t[0]=l,t[1]=c,t[2]=m,t[3]=p,t[4]=w,t[5]=j,t[6]=x,t[7]=f,t[8]=h}else m=t[2],p=t[3],w=t[4],j=t[5],x=t[6],f=t[7],h=t[8];return t[11]!==m||t[12]!==p||t[13]!==w||t[14]!==j?(C=n.jsx(m,{onRequestTabChange:p,variant:w,children:j}),t[11]=m,t[12]=p,t[13]=w,t[14]=j,t[15]=C):C=t[15],t[16]!==x||t[17]!==f||t[18]!==h||t[19]!==C?(b=n.jsxs(x,{as:f,children:[h,C]}),t[16]=x,t[17]=f,t[18]=h,t[19]=C,t[20]=b):b=t[20],b}function i(e,a){window.location.href=`/#/${a.id?.toLowerCase().replaceAll(" ","-")}`}export{o as R}; diff --git a/assets/RenderTopNavBar-BTvx9fvK.js b/assets/RenderTopNavBar-BObK9Y19.js similarity index 99% rename from assets/RenderTopNavBar-BTvx9fvK.js rename to assets/RenderTopNavBar-BObK9Y19.js index f2cec5a..2d664fb 100644 --- a/assets/RenderTopNavBar-BTvx9fvK.js +++ b/assets/RenderTopNavBar-BObK9Y19.js @@ -1,4 +1,4 @@ -import{y as e,B as t,C as n,D as o,E as i,F as r,R as s,n as a,r as l,G as d,I as c,i as h,J as u,K as p,M as m,N as f,O as g,Q as v,w as b,k as y,s as w,l as C,p as I,m as S,h as x,U as k,W as _,v as O,t as T,X as B,x as E,T as R,V as P,o as M,S as A,Y as D,Z as N,$ as L,a as F,j as W,P as H,a0 as z,a1 as $,a2 as V,H as j}from"./index-CrryxQyl.js";function G(e){if(Array.isArray(e)){const t=e.slice(0);for(let e=0;e{if(null==t)return!1;const o=function(e,t){const n=[];return e.forEach(((e,o)=>{e===t&&n.push(o)})),n}(e,t);return 1===o.length||n===o[0]})).reduce(((e,t)=>{if("function"!=typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(...n){e.apply(this,n),t.apply(this,n)}}),null)}function q(e){const t=`${e}`,n=t.match(/[\d.\-\+]*\s*(.*)/);return[parseFloat(t),n&&n.length>0?n[1]:""]}function X(e,n,o,i){const r=e===window||e===document?e:t(e);return null==r||r.addEventListener(n,o,i),{remove(){null==r||r.removeEventListener(n,o,i)}}}function K(e,t){let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}const Y=n?function(e,n){const o=e&&t(e),i=n&&t(n);return!(!o||!i)&&(o instanceof Window||i instanceof Window?K(o,i):o.contains(i))}:K;function Z(e){const i={top:0,bottom:0,left:0,right:0,height:0,width:0};if(!n)return i;const r=e&&t(e);if(!r)return i;if(r===window)return{left:window.pageXOffset,top:window.pageYOffset,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth+window.pageXOffset,bottom:window.innerHeight+window.pageYOffset};const s=e===document?document:o(r),a=s&&s.documentElement;if(!a||!Y(a,r))return i;const l=r.getBoundingClientRect();let d;for(d in i)i[d]=l[d];if(s!==document&&s.defaultView){const e=s.defaultView.frameElement;if(e){const t=Z(e);i.top+=t.top,i.bottom+=t.top,i.left+=t.left,i.right+=t.left}}return{top:i.top+(window.pageYOffset||a.scrollTop)-(a.clientTop||0),left:i.left+(window.pageXOffset||a.scrollLeft)-(a.clientLeft||0),width:(null==i.width?r.offsetWidth:i.width)||0,height:(null==i.height?r.offsetHeight:i.height)||0,right:s.body.clientWidth-i.width-i.left,bottom:s.body.clientHeight-i.height-i.top}}const Q=function(){let e;if(n&&window.requestAnimationFrame&&window.cancelAnimationFrame)e=e=>{const t=window.requestAnimationFrame(e);return{cancel:()=>window.cancelAnimationFrame(t)}};else{let t=(new Date).getTime();e=e=>{const n=(new Date).getTime(),o=Math.max(0,16-(n-t)),i=setTimeout(e,o);return t=n,{cancel:()=>clearTimeout(i)}}}return e}();function J(e){const t=(e||document).activeElement;return t&&(n=t,Boolean(n.tagName.includes("-")&&customElements.get(n.tagName.toLowerCase())))?t.shadowRoot.activeElement:t;var n}function ee(e){const n=e&&t(e),o=J();return!!n&&(o===n||Y(n,o))}const te=["a[href]","frame","iframe","object","input:not([type=hidden])","select","textarea","button","*[tabindex]",'[contenteditable="true"]'].join(",");function ne(e,n,o){const i=e&&t(e);if(!i||"function"!=typeof i.querySelectorAll)return[];let r=Array.from(i.querySelectorAll(te));return o&&i.matches(te)&&(r=[...r,i]),r.filter((e=>"function"==typeof n?n(e)&&re(e):re(e)))}function oe(e){return"none"===i(e).display}function ie(e){var t,n;const o=["fixed","absolute"];return!!o.includes(null===(t=e.style.position)||void 0===t?void 0:t.toLowerCase())||!!o.includes(null===(n=i(e).getPropertyValue("position"))||void 0===n?void 0:n.toLowerCase())}function re(e){return!e.disabled&&function(e){let t=e;for(;t&&t!==document.body&&!(t instanceof ShadowRoot);){if(oe(t))return!1;if(ie(t))break;t=t.parentNode}return!0}(e)}function se(e,t){return ne(e,(e=>{return t=e.getAttribute("tabindex"),!(!isNaN(t)&&t<0);var t}),t)}const ae={toArray:()=>[],contains:()=>!1,add:()=>{},remove:()=>{}};function le(e){const n=t(e);if(!n)return ae;const o={toArray:()=>[...n.classList],contains:()=>!1,add:()=>{},remove:()=>{}};return o.add=e=>n.classList.add(e),o.remove=e=>n.classList.remove(e),o.contains=e=>n.classList.contains(e),o}const de=new WeakMap;function ce(e,t=!1){var r;if(!n)return 16;const s=e||(null===(r=o(e))||void 0===r?void 0:r.documentElement),a=de.get(s);if(!t&&a)return a;const l=parseInt(i(s).getPropertyValue("font-size"));return de.set(s,l),l}function he(e){const o=[];if(!n)return o;const r=e&&t(e);if(r){const e=(i(r)||{}).position;if("fixed"===e)return[r.ownerDocument];let t=r;for(;t&&1===t.nodeType&&(t=t.parentNode);){let n;try{n=i(t)}catch(s){}if(null==n)return o.push(t),o;const r=n,a=r.overflow,l=r.overflowX,d=r.overflowY;/(auto|scroll|overlay)/.test(a+d+l)&&("absolute"!==e||["relative","absolute","fixed"].indexOf(n.position)>=0)&&o.push(t)}const n=r.ownerDocument;n&&(o.push(n.body),n!==document&&o.push(n.defaultView))}return o}function ue(e,t){const n=t.currentTarget,o=t.relatedTarget;o&&(o===n||Y(n,o))||e(t)}function pe(e){const n=e&&t(e);return!!n&&J()===n}function me(e,n=!0){const o=e&&t(e);if(o===window||o===document||o===document.body)return!0;const r=o.parentNode;if(3===o.nodeType)return me(r,n);const s=o?i(o):{};if("none"===s.display)return!1;if("hidden"===s.visibility||"0"===s.opacity)return!1;if("hidden"===s.overflow&&"absolute"===s.position&&"auto"!==s.clip){const e=s.clip.substring(5).slice(0,-1).split(", ");let t=!0;if(e.forEach((e=>{"0px"!==e&&(t=!1)})),t)return!1}return!n||!r||me(r)}function fe(e,o){const i=t(o)||document;if(n){const t=r(i);return t&&t.matchMedia(e)}return null}function ge(t,o){if(!t||"number"==typeof t)return t;const i=q(t),r=e(i,2),s=r[0],a=r[1];if("rem"===a)return s*ce();if("em"===a){const e=n?document.body:null;return s*ce(o||e)}return s}const ve=Object.prototype.hasOwnProperty;function be(e,t){if(ye(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(let i=0;i{0!==n.indexOf("on")||"function"!=typeof t[n]&&"function"!=typeof e.props[n]||(d[n]=U(e.props[n],t[n]))})),null==i||null==o?s.cloneElement(e,d,...n):(a(r,`Cloning an element with a ref that will be overwritten because the ref is not a function. Use a composable callback-style ref instead. Ignoring ref: ${i}`),s.cloneElement(e,{...d,ref(e){l?o(e):o.current=e,i(e)}},...n))}function Ce(e,t={}){const n=l.Children.count(e);return 0===n?null:"string"==typeof e&&e.length>0||n>1?s.createElement("span",t,e):we(Array.isArray(e)?e[0]:e,t)}function Ie(e){return"string"==typeof e?e:e.displayName||e.name}function Se({props:e={},interactionTypes:t=["disabled","readonly"]}={}){const n=e.interaction,o=e.disabled,i=e.readOnly;return n||(t.includes("disabled")&&o?"disabled":t.includes("readonly")&&i?"readonly":"enabled")}function xe(e,t=[]){if(e&&e.type){return t.map((e=>Ie(e))).indexOf(Ie(e.type))>=0}return!1}const ke=({children:e,instanceCounterMap:t=c})=>s.createElement(d.Provider,{value:t},e);function _e(e){return function(t,n,o,i="",r=""){const s=t[n];return null==s?new Error(`The prop \`${n}\` is marked as required in \`${o}\`, but its value is \`${s}\``):e(t,n,o,i,r)}}const Oe={oneOf(e){function t(t,n,o){const i=s.Children.toArray(t[n]),r=e.map((e=>e?Te(e):e));for(let e=0;efunction(t,n,o){const i=s.Children.toArray(t[n]),r={},a=e.map((e=>{const t=Te(e);return r[t]=0,t}));for(let e=0;e{r[e]>1&&l.push(`${r[e]} children of type ${e}`),0===r[e]&&l.push(`0 children of type ${e}`)})),l.length>0?new Error(`Expected exactly one of each ${a.join(", ")} in ${o} but found:${l.join("\n")}`):null},enforceOrder(...e){function t(e,t){for(let n=0;n\n${t.map((e=>e?Te(e):"??")).map((e=>` <${e} />`)).join("\n")}\n`}function o(o,i,r){const a=s.Children.toArray(o[i]).map((e=>e&&e.type?Te(e.type):e?null:void 0));for(let n=0;ne?Te(e):"??"))))return null}return new Error(`Expected children of ${r} in one of the following formats:\n ${function(e,t){return t.map((t=>n(e,t))).join("\n\n")}(r,e)}\n\n\n Instead of:\n ${n(r,a)}`)}return o.isRequired=_e(o),o}},Te=e=>"string"==typeof e?e:e.displayName||e.name;function Be(e,t="onChange",n="defaultValue"){return function(o,i,r){const s=e(o,i,r,"prop",i,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");return s||(o[i]&&"function"!=typeof o[t]?new Error([`You provided a '${i}' prop without an '${t}' handler on '${r}'. This will render a controlled component. If the component should be uncontrolled and manage its own state, use '${n}'. Otherwise, set '${t}'.`].join("")):null)}}const Ee=!("undefined"==typeof window||!window.document||!window.document.createElement)?h.oneOfType([h.element,h.instanceOf(Element)]):h.element,Re=e=>(t={})=>{var n,o;try{if(u(e))return e}catch{e={}}let i;if(0===Object.keys(t).length){i=p.getCurrentTheme()||f}else i=t;const r=i.key,s=(null===(n=e)||void 0===n||null===(o=n.themeOverrides)||void 0===o?void 0:o[r])||e.themeOverrides||{};return m(i,e,s)};function Pe({children:e,theme:t={},dir:n,instanceCounterMap:o,as:i}){const r=n||l.useContext(g);let a=s.createElement(ke,{instanceCounterMap:o},s.createElement(v,{theme:Re(t)},s.createElement(g.Provider,{value:r},e)));if(n){const e=i||"span";a=s.createElement(e,{dir:r},a)}return a}Pe.propTypes={children:h.node,theme:h.object,dir:h.oneOf(["ltr","rtl"]),instanceCounterMap:h.instanceOf(Map),as:h.string};const Me={as:h.elementType,children:h.node,elementRef:h.func},Ae=["children","styles"];var De,Ne;let Le=b((()=>({screenReaderContent:{label:"screenReaderContent",width:"0.0625rem !important",height:"0.0625rem !important",margin:"-0.0625rem !important",padding:"0 !important",position:"absolute",top:0,insetInlineStart:0,whiteSpace:"nowrap",overflow:"hidden !important",clip:"rect(0 0 0 0) !important",border:"0 !important"}})),null)((Ne=class e extends l.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const t=this.props.elementRef;this.ref=e,"function"==typeof t&&t(e)}}componentDidMount(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t)}componentDidUpdate(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t)}render(){const t=this.props,n=t.children,o=t.styles,i=y(t,Ae),r=w(e,i);return C(r,Object.assign({},I(i),{css:null==o?void 0:o.screenReaderContent,ref:this.handleRef}),n)}},Ne.displayName="ScreenReaderContent",Ne.componentId="ScreenReaderContent",Ne.propTypes=Me,Ne.allowedProps=["as","children","elementRef"],Ne.defaultProps={as:"span",children:null},De=Ne))||De;var Fe,We={exports:{}};var He=(Fe||(Fe=1,function(e,t){function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return s[e];var n,r=String(e);return(n=o[r.toLowerCase()])?n:(n=i[r.toLowerCase()])||(1===r.length?r.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var r;if(r=o[t.toLowerCase()])return r===n;if(r=i[t.toLowerCase()])return r===n}else if("number"==typeof t)return t===n;return!1}};var o=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91}; +import{y as e,B as t,C as n,D as o,E as i,F as r,R as s,n as a,r as l,G as d,I as c,i as h,J as u,K as p,M as m,N as f,O as g,Q as v,w as b,k as y,s as w,l as C,p as I,m as S,h as x,U as k,W as _,v as O,t as T,X as B,x as E,T as R,V as P,o as M,S as A,Y as D,Z as N,$ as L,a as F,j as W,P as H,a0 as z,a1 as $,a2 as V,H as j}from"./index-DxmLT0bY.js";function G(e){if(Array.isArray(e)){const t=e.slice(0);for(let e=0;e{if(null==t)return!1;const o=function(e,t){const n=[];return e.forEach(((e,o)=>{e===t&&n.push(o)})),n}(e,t);return 1===o.length||n===o[0]})).reduce(((e,t)=>{if("function"!=typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(...n){e.apply(this,n),t.apply(this,n)}}),null)}function q(e){const t=`${e}`,n=t.match(/[\d.\-\+]*\s*(.*)/);return[parseFloat(t),n&&n.length>0?n[1]:""]}function X(e,n,o,i){const r=e===window||e===document?e:t(e);return null==r||r.addEventListener(n,o,i),{remove(){null==r||r.removeEventListener(n,o,i)}}}function K(e,t){let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}const Y=n?function(e,n){const o=e&&t(e),i=n&&t(n);return!(!o||!i)&&(o instanceof Window||i instanceof Window?K(o,i):o.contains(i))}:K;function Z(e){const i={top:0,bottom:0,left:0,right:0,height:0,width:0};if(!n)return i;const r=e&&t(e);if(!r)return i;if(r===window)return{left:window.pageXOffset,top:window.pageYOffset,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth+window.pageXOffset,bottom:window.innerHeight+window.pageYOffset};const s=e===document?document:o(r),a=s&&s.documentElement;if(!a||!Y(a,r))return i;const l=r.getBoundingClientRect();let d;for(d in i)i[d]=l[d];if(s!==document&&s.defaultView){const e=s.defaultView.frameElement;if(e){const t=Z(e);i.top+=t.top,i.bottom+=t.top,i.left+=t.left,i.right+=t.left}}return{top:i.top+(window.pageYOffset||a.scrollTop)-(a.clientTop||0),left:i.left+(window.pageXOffset||a.scrollLeft)-(a.clientLeft||0),width:(null==i.width?r.offsetWidth:i.width)||0,height:(null==i.height?r.offsetHeight:i.height)||0,right:s.body.clientWidth-i.width-i.left,bottom:s.body.clientHeight-i.height-i.top}}const Q=function(){let e;if(n&&window.requestAnimationFrame&&window.cancelAnimationFrame)e=e=>{const t=window.requestAnimationFrame(e);return{cancel:()=>window.cancelAnimationFrame(t)}};else{let t=(new Date).getTime();e=e=>{const n=(new Date).getTime(),o=Math.max(0,16-(n-t)),i=setTimeout(e,o);return t=n,{cancel:()=>clearTimeout(i)}}}return e}();function J(e){const t=(e||document).activeElement;return t&&(n=t,Boolean(n.tagName.includes("-")&&customElements.get(n.tagName.toLowerCase())))?t.shadowRoot.activeElement:t;var n}function ee(e){const n=e&&t(e),o=J();return!!n&&(o===n||Y(n,o))}const te=["a[href]","frame","iframe","object","input:not([type=hidden])","select","textarea","button","*[tabindex]",'[contenteditable="true"]'].join(",");function ne(e,n,o){const i=e&&t(e);if(!i||"function"!=typeof i.querySelectorAll)return[];let r=Array.from(i.querySelectorAll(te));return o&&i.matches(te)&&(r=[...r,i]),r.filter((e=>"function"==typeof n?n(e)&&re(e):re(e)))}function oe(e){return"none"===i(e).display}function ie(e){var t,n;const o=["fixed","absolute"];return!!o.includes(null===(t=e.style.position)||void 0===t?void 0:t.toLowerCase())||!!o.includes(null===(n=i(e).getPropertyValue("position"))||void 0===n?void 0:n.toLowerCase())}function re(e){return!e.disabled&&function(e){let t=e;for(;t&&t!==document.body&&!(t instanceof ShadowRoot);){if(oe(t))return!1;if(ie(t))break;t=t.parentNode}return!0}(e)}function se(e,t){return ne(e,(e=>{return t=e.getAttribute("tabindex"),!(!isNaN(t)&&t<0);var t}),t)}const ae={toArray:()=>[],contains:()=>!1,add:()=>{},remove:()=>{}};function le(e){const n=t(e);if(!n)return ae;const o={toArray:()=>[...n.classList],contains:()=>!1,add:()=>{},remove:()=>{}};return o.add=e=>n.classList.add(e),o.remove=e=>n.classList.remove(e),o.contains=e=>n.classList.contains(e),o}const de=new WeakMap;function ce(e,t=!1){var r;if(!n)return 16;const s=e||(null===(r=o(e))||void 0===r?void 0:r.documentElement),a=de.get(s);if(!t&&a)return a;const l=parseInt(i(s).getPropertyValue("font-size"));return de.set(s,l),l}function he(e){const o=[];if(!n)return o;const r=e&&t(e);if(r){const e=(i(r)||{}).position;if("fixed"===e)return[r.ownerDocument];let t=r;for(;t&&1===t.nodeType&&(t=t.parentNode);){let n;try{n=i(t)}catch(s){}if(null==n)return o.push(t),o;const r=n,a=r.overflow,l=r.overflowX,d=r.overflowY;/(auto|scroll|overlay)/.test(a+d+l)&&("absolute"!==e||["relative","absolute","fixed"].indexOf(n.position)>=0)&&o.push(t)}const n=r.ownerDocument;n&&(o.push(n.body),n!==document&&o.push(n.defaultView))}return o}function ue(e,t){const n=t.currentTarget,o=t.relatedTarget;o&&(o===n||Y(n,o))||e(t)}function pe(e){const n=e&&t(e);return!!n&&J()===n}function me(e,n=!0){const o=e&&t(e);if(o===window||o===document||o===document.body)return!0;const r=o.parentNode;if(3===o.nodeType)return me(r,n);const s=o?i(o):{};if("none"===s.display)return!1;if("hidden"===s.visibility||"0"===s.opacity)return!1;if("hidden"===s.overflow&&"absolute"===s.position&&"auto"!==s.clip){const e=s.clip.substring(5).slice(0,-1).split(", ");let t=!0;if(e.forEach((e=>{"0px"!==e&&(t=!1)})),t)return!1}return!n||!r||me(r)}function fe(e,o){const i=t(o)||document;if(n){const t=r(i);return t&&t.matchMedia(e)}return null}function ge(t,o){if(!t||"number"==typeof t)return t;const i=q(t),r=e(i,2),s=r[0],a=r[1];if("rem"===a)return s*ce();if("em"===a){const e=n?document.body:null;return s*ce(o||e)}return s}const ve=Object.prototype.hasOwnProperty;function be(e,t){if(ye(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(let i=0;i{0!==n.indexOf("on")||"function"!=typeof t[n]&&"function"!=typeof e.props[n]||(d[n]=U(e.props[n],t[n]))})),null==i||null==o?s.cloneElement(e,d,...n):(a(r,`Cloning an element with a ref that will be overwritten because the ref is not a function. Use a composable callback-style ref instead. Ignoring ref: ${i}`),s.cloneElement(e,{...d,ref(e){l?o(e):o.current=e,i(e)}},...n))}function Ce(e,t={}){const n=l.Children.count(e);return 0===n?null:"string"==typeof e&&e.length>0||n>1?s.createElement("span",t,e):we(Array.isArray(e)?e[0]:e,t)}function Ie(e){return"string"==typeof e?e:e.displayName||e.name}function Se({props:e={},interactionTypes:t=["disabled","readonly"]}={}){const n=e.interaction,o=e.disabled,i=e.readOnly;return n||(t.includes("disabled")&&o?"disabled":t.includes("readonly")&&i?"readonly":"enabled")}function xe(e,t=[]){if(e&&e.type){return t.map((e=>Ie(e))).indexOf(Ie(e.type))>=0}return!1}const ke=({children:e,instanceCounterMap:t=c})=>s.createElement(d.Provider,{value:t},e);function _e(e){return function(t,n,o,i="",r=""){const s=t[n];return null==s?new Error(`The prop \`${n}\` is marked as required in \`${o}\`, but its value is \`${s}\``):e(t,n,o,i,r)}}const Oe={oneOf(e){function t(t,n,o){const i=s.Children.toArray(t[n]),r=e.map((e=>e?Te(e):e));for(let e=0;efunction(t,n,o){const i=s.Children.toArray(t[n]),r={},a=e.map((e=>{const t=Te(e);return r[t]=0,t}));for(let e=0;e{r[e]>1&&l.push(`${r[e]} children of type ${e}`),0===r[e]&&l.push(`0 children of type ${e}`)})),l.length>0?new Error(`Expected exactly one of each ${a.join(", ")} in ${o} but found:${l.join("\n")}`):null},enforceOrder(...e){function t(e,t){for(let n=0;n\n${t.map((e=>e?Te(e):"??")).map((e=>` <${e} />`)).join("\n")}\n`}function o(o,i,r){const a=s.Children.toArray(o[i]).map((e=>e&&e.type?Te(e.type):e?null:void 0));for(let n=0;ne?Te(e):"??"))))return null}return new Error(`Expected children of ${r} in one of the following formats:\n ${function(e,t){return t.map((t=>n(e,t))).join("\n\n")}(r,e)}\n\n\n Instead of:\n ${n(r,a)}`)}return o.isRequired=_e(o),o}},Te=e=>"string"==typeof e?e:e.displayName||e.name;function Be(e,t="onChange",n="defaultValue"){return function(o,i,r){const s=e(o,i,r,"prop",i,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");return s||(o[i]&&"function"!=typeof o[t]?new Error([`You provided a '${i}' prop without an '${t}' handler on '${r}'. This will render a controlled component. If the component should be uncontrolled and manage its own state, use '${n}'. Otherwise, set '${t}'.`].join("")):null)}}const Ee=!("undefined"==typeof window||!window.document||!window.document.createElement)?h.oneOfType([h.element,h.instanceOf(Element)]):h.element,Re=e=>(t={})=>{var n,o;try{if(u(e))return e}catch{e={}}let i;if(0===Object.keys(t).length){i=p.getCurrentTheme()||f}else i=t;const r=i.key,s=(null===(n=e)||void 0===n||null===(o=n.themeOverrides)||void 0===o?void 0:o[r])||e.themeOverrides||{};return m(i,e,s)};function Pe({children:e,theme:t={},dir:n,instanceCounterMap:o,as:i}){const r=n||l.useContext(g);let a=s.createElement(ke,{instanceCounterMap:o},s.createElement(v,{theme:Re(t)},s.createElement(g.Provider,{value:r},e)));if(n){const e=i||"span";a=s.createElement(e,{dir:r},a)}return a}Pe.propTypes={children:h.node,theme:h.object,dir:h.oneOf(["ltr","rtl"]),instanceCounterMap:h.instanceOf(Map),as:h.string};const Me={as:h.elementType,children:h.node,elementRef:h.func},Ae=["children","styles"];var De,Ne;let Le=b((()=>({screenReaderContent:{label:"screenReaderContent",width:"0.0625rem !important",height:"0.0625rem !important",margin:"-0.0625rem !important",padding:"0 !important",position:"absolute",top:0,insetInlineStart:0,whiteSpace:"nowrap",overflow:"hidden !important",clip:"rect(0 0 0 0) !important",border:"0 !important"}})),null)((Ne=class e extends l.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const t=this.props.elementRef;this.ref=e,"function"==typeof t&&t(e)}}componentDidMount(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t)}componentDidUpdate(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t)}render(){const t=this.props,n=t.children,o=t.styles,i=y(t,Ae),r=w(e,i);return C(r,Object.assign({},I(i),{css:null==o?void 0:o.screenReaderContent,ref:this.handleRef}),n)}},Ne.displayName="ScreenReaderContent",Ne.componentId="ScreenReaderContent",Ne.propTypes=Me,Ne.allowedProps=["as","children","elementRef"],Ne.defaultProps={as:"span",children:null},De=Ne))||De;var Fe,We={exports:{}};var He=(Fe||(Fe=1,function(e,t){function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return s[e];var n,r=String(e);return(n=o[r.toLowerCase()])?n:(n=i[r.toLowerCase()])||(1===r.length?r.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var r;if(r=o[t.toLowerCase()])return r===n;if(r=i[t.toLowerCase()])return r===n}else if("number"==typeof t)return t===n;return!1}};var o=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91}; /*! * Programatically add the following */ diff --git a/assets/error-DNgfncXY.js b/assets/error-CbdNqE21.js similarity index 91% rename from assets/error-DNgfncXY.js rename to assets/error-CbdNqE21.js index fa4b2ec..c8a7ae4 100644 --- a/assets/error-DNgfncXY.js +++ b/assets/error-CbdNqE21.js @@ -1 +1 @@ -import{a as e,u as s,e as r,z as a,A as n,j as i,V as o}from"./index-CrryxQyl.js";import{a as t,g as c,R as d,L as m,I as u,T as l,c as h}from"./RenderTopNavBar-BTvx9fvK.js";import{R as g}from"./RenderTabNav-BgCD-W_P.js";import{B as p}from"./index-BaJp6lgV.js";import"./index-DVeZ9h9n.js";const E={awkward:{EN:"Well, this is awkward.",ES_LA:"Esto es incómodo.",PT_BR:"Isso é constrangedor.",DE:"Das ist peinlich."},not_your_fault:{EN:"I'm not sure what happened, but I'm pretty sure it's not your fault.",ES_LA:"No estoy seguro de qué pasó, pero estoy bastante seguro de que no es tu culpa.",PT_BR:"Não tenho certeza do que aconteceu, mas tenho certeza de que não é sua culpa.",DE:"Ich bin mir nicht sicher, was passiert ist, aber ich bin mir ziemlich sicher, dass es nicht deine Schuld ist."},uhm:{EN:"Uhm...",ES_LA:"Ehm...",PT_BR:"Hã...",DE:"Ähm..."},class_dismissed:{EN:"class dismissed",ES_LA:"clase despedida",PT_BR:"classe dispensada",DE:"Klasse entlassen"},unknown_error:{EN:"An unknown error occurred.",ES_LA:"Ocurrió un error desconocido.",PT_BR:"Ocorreu um erro desconhecido.",DE:"Ein unbekannter Fehler ist aufgetreten."},back:{EN:"Back",ES_LA:"Atrás",PT_BR:"Voltar",DE:"Zurück"}};function x(){const x=e.c(26),{config:j}=s(),{mode:f}=j,k="App"===f,w=r().language;let b,y;x[0]!==w?(y=t(w),b=c(E,y),x[0]=w,x[1]=b,x[2]=y):(b=x[1],y=x[2]);const N=b,A=a();let R,T,B,S,D,I,L,P,z;return n(A)?R=`${A.status} ${A.statusText}`:A instanceof Error?R=A.message:"string"==typeof A?R=A:(console.error(A),R=N.unknown_error),x[3]!==k||x[4]!==y||x[5]!==N?(T=k?i.jsx(d,{language:y}):i.jsxs(i.Fragment,{children:[i.jsx(g,{language:y,brand:"Instructure"}),i.jsx(m,{href:"#",onClick:_,margin:"0 0 0 large",renderIcon:i.jsx(u,{size:"x-small"}),children:N.back})]}),x[3]=k,x[4]=y,x[5]=N,x[6]=T):T=x[6],x[7]===Symbol.for("react.memo_cache_sentinel")?(B={messageColor:"primary"},x[7]=B):B=x[7],x[8]!==R?(S=i.jsx(l,{as:"p",children:i.jsx("i",{children:R})}),x[8]=R,x[9]=S):S=x[9],x[10]!==k||x[11]!==N?(D=k&&i.jsxs(l,{as:"p",children:[N.uhm," ",i.jsx(m,{href:"./#/",children:N.class_dismissed}),"."]}),x[10]=k,x[11]=N,x[12]=D):D=x[12],x[13]!==S||x[14]!==D?(I=i.jsxs(i.Fragment,{children:[S,D]}),x[13]=S,x[14]=D,x[15]=I):I=x[15],x[16]!==N.awkward||x[17]!==I?(L=i.jsx(o,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:i.jsx(p,{size:"medium",heading:N.awkward,headingAs:"h1",themeOverride:B,message:I})}),x[16]=N.awkward,x[17]=I,x[18]=L):L=x[18],x[19]!==k||x[20]!==y?(P=k&&i.jsx(h,{language:y}),x[19]=k,x[20]=y,x[21]=P):P=x[21],x[22]!==T||x[23]!==L||x[24]!==P?(z=i.jsxs(i.Fragment,{children:[T,L,P]}),x[22]=T,x[23]=L,x[24]=P,x[25]=z):z=x[25],z}function _(){return history.back()}function j(){const s=e.c(1);let r;return s[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(x,{}),s[0]=r):r=s[0],r}x.displayName="Route.Error",j.displayName="Error.ErrorPage";export{x as Component,j as ErrorBoundary}; +import{a as e,u as s,e as r,z as a,A as n,j as i,V as o}from"./index-DxmLT0bY.js";import{a as t,g as c,R as d,L as m,I as u,T as l,c as h}from"./RenderTopNavBar-BObK9Y19.js";import{R as g}from"./RenderTabNav-Cf-NKHb4.js";import{B as p}from"./index-DsnmBOMj.js";import"./index-VWJm_On8.js";const E={awkward:{EN:"Well, this is awkward.",ES_LA:"Esto es incómodo.",PT_BR:"Isso é constrangedor.",DE:"Das ist peinlich."},not_your_fault:{EN:"I'm not sure what happened, but I'm pretty sure it's not your fault.",ES_LA:"No estoy seguro de qué pasó, pero estoy bastante seguro de que no es tu culpa.",PT_BR:"Não tenho certeza do que aconteceu, mas tenho certeza de que não é sua culpa.",DE:"Ich bin mir nicht sicher, was passiert ist, aber ich bin mir ziemlich sicher, dass es nicht deine Schuld ist."},uhm:{EN:"Uhm...",ES_LA:"Ehm...",PT_BR:"Hã...",DE:"Ähm..."},class_dismissed:{EN:"class dismissed",ES_LA:"clase despedida",PT_BR:"classe dispensada",DE:"Klasse entlassen"},unknown_error:{EN:"An unknown error occurred.",ES_LA:"Ocurrió un error desconocido.",PT_BR:"Ocorreu um erro desconhecido.",DE:"Ein unbekannter Fehler ist aufgetreten."},back:{EN:"Back",ES_LA:"Atrás",PT_BR:"Voltar",DE:"Zurück"}};function x(){const x=e.c(26),{config:j}=s(),{mode:f}=j,k="App"===f,w=r().language;let b,y;x[0]!==w?(y=t(w),b=c(E,y),x[0]=w,x[1]=b,x[2]=y):(b=x[1],y=x[2]);const N=b,A=a();let R,T,B,S,D,I,L,P,z;return n(A)?R=`${A.status} ${A.statusText}`:A instanceof Error?R=A.message:"string"==typeof A?R=A:(console.error(A),R=N.unknown_error),x[3]!==k||x[4]!==y||x[5]!==N?(T=k?i.jsx(d,{language:y}):i.jsxs(i.Fragment,{children:[i.jsx(g,{language:y,brand:"Instructure"}),i.jsx(m,{href:"#",onClick:_,margin:"0 0 0 large",renderIcon:i.jsx(u,{size:"x-small"}),children:N.back})]}),x[3]=k,x[4]=y,x[5]=N,x[6]=T):T=x[6],x[7]===Symbol.for("react.memo_cache_sentinel")?(B={messageColor:"primary"},x[7]=B):B=x[7],x[8]!==R?(S=i.jsx(l,{as:"p",children:i.jsx("i",{children:R})}),x[8]=R,x[9]=S):S=x[9],x[10]!==k||x[11]!==N?(D=k&&i.jsxs(l,{as:"p",children:[N.uhm," ",i.jsx(m,{href:"./#/",children:N.class_dismissed}),"."]}),x[10]=k,x[11]=N,x[12]=D):D=x[12],x[13]!==S||x[14]!==D?(I=i.jsxs(i.Fragment,{children:[S,D]}),x[13]=S,x[14]=D,x[15]=I):I=x[15],x[16]!==N.awkward||x[17]!==I?(L=i.jsx(o,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:i.jsx(p,{size:"medium",heading:N.awkward,headingAs:"h1",themeOverride:B,message:I})}),x[16]=N.awkward,x[17]=I,x[18]=L):L=x[18],x[19]!==k||x[20]!==y?(P=k&&i.jsx(h,{language:y}),x[19]=k,x[20]=y,x[21]=P):P=x[21],x[22]!==T||x[23]!==L||x[24]!==P?(z=i.jsxs(i.Fragment,{children:[T,L,P]}),x[22]=T,x[23]=L,x[24]=P,x[25]=z):z=x[25],z}function _(){return history.back()}function j(){const s=e.c(1);let r;return s[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(x,{}),s[0]=r):r=s[0],r}x.displayName="Route.Error",j.displayName="Error.ErrorPage";export{x as Component,j as ErrorBoundary}; diff --git a/assets/index-Bv50oJ9E.js b/assets/index-Aym4CANT.js similarity index 99% rename from assets/index-Bv50oJ9E.js rename to assets/index-Aym4CANT.js index e4ab5e4..356c58e 100644 --- a/assets/index-Bv50oJ9E.js +++ b/assets/index-Aym4CANT.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.node-BuQMAeGn.js","assets/index-CrryxQyl.js","assets/index-CqQFZXZA.css","assets/index-BDfvr0fn.js"])))=>i.map(i=>d[i]); -import{S as p,b as t,c as r,F as c,T as s,d as M,I as z,e as d,f as A}from"./index-C6-OLeBB.js";export{g as FormFieldLabel,i as FormFieldLayout,h as FormFieldMessage,G as Grid,k as GridCol,j as GridRow,l as IconCheckLine,m as IconMiniArrowDoubleLine,n as IconMiniArrowDownLine,o as IconMiniArrowUpLine,a as Table}from"./index-C6-OLeBB.js";import{r as u,R as f,a3 as q,m as W,C as v,a4 as y,a5 as w,K as C,a6 as x,i as E,k as P,s as X,p as Z,S as V,T as D,w as _,t as U,l as Y,x as $,v as K,h as Q,V as J,W as ee,a7 as oe,o as pe,q as te,Y as ne,_ as re,n as ce,y as se,U as le,X as ie,a8 as Me,a9 as be,B as ze,E as de}from"./index-CrryxQyl.js";export{H as Heading,ac as IconCanvasLogoLine,ad as IconElevateLogoLine,ae as IconImpactLogoLine,a1 as IconInstructureLogoLine,af as IconMasteryLogoLine,ab as InlineSVG,aa as Spinner,O as TextDirectionContext,N as canvas}from"./index-CrryxQyl.js";import{q as Oe,r as he,S as Ae,t as ue,j as fe,B as me,u as qe,P as Re,e as We,v as ve,w as ge,s as ye,C as Le,x as Ne,y as Be,z as we,n as Ce,A as Te,f as Se,k as xe,m as Ie,D as Ee,i as Pe,T as Xe,p as He,E as Ze,o as Ve,l as ke,F as De,G as _e,H as je,J as Fe,K as Ue,M as Ye,h as Ge,N as $e,Q as Ke,U as Qe,V as Je,W as eo,X as oo,Y as po,Z as to,_ as no,$ as ro,a0 as co}from"./RenderTopNavBar-BTvx9fvK.js";export{a2 as Avatar,a3 as Breadcrumb,I as IconArrowOpenStartLine,af as IconArrowOpenUpSolid,aa as IconDiscussionLine,ab as IconHamburgerLine,ac as IconHeartLine,ad as IconMoreLine,ae as IconQuestionLine,a4 as InlineList,a1 as InstUISettingsProvider,L as Link,O as Options,a5 as Position,a6 as Responsive,a7 as TopNavBar,a8 as Tray,a9 as TruncateText}from"./RenderTopNavBar-BTvx9fvK.js";import{I as so,B as lo,E as io}from"./index-Cw9o-rUL.js";export{b as IconCopyLine,a as RadioInput,R as RadioInputGroup,T as ToggleDetails}from"./index-Cw9o-rUL.js";export{B as Billboard}from"./index-BaJp6lgV.js";import{I as ao}from"./index-B8c3q9fI.js";export{a as IconSearchLine}from"./index-B8c3q9fI.js";export{F as Focusable,T as Tabs}from"./index-DVeZ9h9n.js";export{L as List,e as ListItem}from"./Mdtoui-g9rlRwfF.js";export{S as SourceCodeEditor}from"./index-DM7MZwnz.js";export{I as IconRssLine}from"./IconRssLine-BzGIEfvJ.js";const Mo=(()=>{{const e=function(){return e=>e};return e.deprecatePropValues=()=>()=>null,e.warnDeprecatedProps=()=>{},e.warnDeprecatedComponent=()=>{},e.changedPackageWarning=()=>"",e}})(),bo=u.createContext({locale:void 0,timezone:void 0}),zo=({children:e,locale:o,timezone:p})=>f.createElement(bo.Provider,{value:{locale:o,timezone:p}},Oe(e));var Oo,ho,Ao={exports:{}},uo={exports:{}};function fo(){return Oo.apply(null,arguments)}function mo(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function qo(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function Ro(e,o){return Object.prototype.hasOwnProperty.call(e,o)}function Wo(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var o;for(o in e)if(Ro(e,o))return!1;return!0}function vo(e){return void 0===e}function go(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function yo(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function Lo(e,o){var p,t=[],n=e.length;for(p=0;p>>0;for(o=0;o0)for(p=0;p=0?p?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+t}var Uo=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Yo=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Go={},$o={};function Ko(e,o,p,t){var n=t;"string"==typeof t&&(n=function(){return this[t]()}),e&&($o[e]=n),o&&($o[o[0]]=function(){return Fo(n.apply(this,arguments),o[1],o[2])}),p&&($o[p]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function Qo(e,o){return e.isValid()?(o=Jo(o,e.localeData()),Go[o]=Go[o]||function(e){var o,p,t,n=e.match(Uo);for(o=0,p=n.length;o=0&&Yo.test(e);)e=e.replace(Yo,t),Yo.lastIndex=0,p-=1;return e}var ep={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function op(e){return"string"==typeof e?ep[e]||ep[e.toLowerCase()]:void 0}function pp(e){var o,p,t={};for(p in e)Ro(e,p)&&(o=op(p))&&(t[o]=e[p]);return t}var tp={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};var np,rp=/\d/,cp=/\d\d/,sp=/\d{3}/,lp=/\d{4}/,ip=/[+-]?\d{6}/,ap=/\d\d?/,Mp=/\d\d\d\d?/,bp=/\d\d\d\d\d\d?/,zp=/\d{1,3}/,dp=/\d{1,4}/,Op=/[+-]?\d{1,6}/,hp=/\d+/,Ap=/[+-]?\d+/,up=/Z|[+-]\d\d:?\d\d/gi,fp=/Z|[+-]\d\d(?::?\d\d)?/gi,mp=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,qp=/^[1-9]\d?/,Rp=/^([1-9]\d|\d)/;function Wp(e,o,p){np[e]=Do(o)?o:function(e,t){return e&&p?p:o}}function vp(e,o){return Ro(np,e)?np[e](o._strict,o._locale):new RegExp(gp(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,o,p,t,n){return o||p||t||n}))))}function gp(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function yp(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Lp(e){var o=+e,p=0;return 0!==o&&isFinite(o)&&(p=yp(o)),p}np={};var Np={};function Bp(e,o){var p,t,n=o;for("string"==typeof e&&(e=[e]),go(o)&&(n=function(e,p){p[o]=Lp(e)}),t=e.length,p=0;p68?1900:2e3)};var Dp,_p=jp("FullYear",!0);function jp(e,o){return function(p){return null!=p?(Up(this,e,p),fo.updateOffset(this,o),this):Fp(this,e)}}function Fp(e,o){if(!e.isValid())return NaN;var p=e._d,t=e._isUTC;switch(o){case"Milliseconds":return t?p.getUTCMilliseconds():p.getMilliseconds();case"Seconds":return t?p.getUTCSeconds():p.getSeconds();case"Minutes":return t?p.getUTCMinutes():p.getMinutes();case"Hours":return t?p.getUTCHours():p.getHours();case"Date":return t?p.getUTCDate():p.getDate();case"Day":return t?p.getUTCDay():p.getDay();case"Month":return t?p.getUTCMonth():p.getMonth();case"FullYear":return t?p.getUTCFullYear():p.getFullYear();default:return NaN}}function Up(e,o,p){var t,n,r,c,s;if(e.isValid()&&!isNaN(p)){switch(t=e._d,n=e._isUTC,o){case"Milliseconds":return void(n?t.setUTCMilliseconds(p):t.setMilliseconds(p));case"Seconds":return void(n?t.setUTCSeconds(p):t.setSeconds(p));case"Minutes":return void(n?t.setUTCMinutes(p):t.setMinutes(p));case"Hours":return void(n?t.setUTCHours(p):t.setHours(p));case"Date":return void(n?t.setUTCDate(p):t.setDate(p));case"FullYear":break;default:return}r=p,c=e.month(),s=29!==(s=e.date())||1!==c||Tp(r)?s:28,n?t.setUTCFullYear(r,c,s):t.setFullYear(r,c,s)}}function Yp(e,o){if(isNaN(e)||isNaN(o))return NaN;var p=function(e,o){return(e%o+o)%o}(o,12);return e+=(o-p)/12,1===p?Tp(e)?29:28:31-p%7%2}Dp=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var o;for(o=0;o=0?(s=new Date(e+400,o,p,t,n,r,c),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,o,p,t,n,r,c),s}function rt(e){var o,p;return e<100&&e>=0?((p=Array.prototype.slice.call(arguments))[0]=e+400,o=new Date(Date.UTC.apply(null,p)),isFinite(o.getUTCFullYear())&&o.setUTCFullYear(e)):o=new Date(Date.UTC.apply(null,arguments)),o}function ct(e,o,p){var t=7+o-p;return-((7+rt(e,0,t).getUTCDay()-o)%7)+t-1}function st(e,o,p,t,n){var r,c,s=1+7*(o-1)+(7+p-t)%7+ct(e,t,n);return s<=0?c=kp(r=e-1)+s:s>kp(e)?(r=e+1,c=s-kp(e)):(r=e,c=s),{year:r,dayOfYear:c}}function lt(e,o,p){var t,n,r=ct(e.year(),o,p),c=Math.floor((e.dayOfYear()-r-1)/7)+1;return c<1?t=c+it(n=e.year()-1,o,p):c>it(e.year(),o,p)?(t=c-it(e.year(),o,p),n=e.year()+1):(n=e.year(),t=c),{week:t,year:n}}function it(e,o,p){var t=ct(e,o,p),n=ct(e+1,o,p);return(kp(e)-t+n)/7}Ko("w",["ww",2],"wo","week"),Ko("W",["WW",2],"Wo","isoWeek"),Wp("w",ap,qp),Wp("ww",ap,cp),Wp("W",ap,qp),Wp("WW",ap,cp),wp(["w","ww","W","WW"],(function(e,o,p,t){o[t.substr(0,1)]=Lp(e)}));function at(e,o){return e.slice(o,7).concat(e.slice(0,o))}Ko("d",0,"do","day"),Ko("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),Ko("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),Ko("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),Ko("e",0,0,"weekday"),Ko("E",0,0,"isoWeekday"),Wp("d",ap),Wp("e",ap),Wp("E",ap),Wp("dd",(function(e,o){return o.weekdaysMinRegex(e)})),Wp("ddd",(function(e,o){return o.weekdaysShortRegex(e)})),Wp("dddd",(function(e,o){return o.weekdaysRegex(e)})),wp(["dd","ddd","dddd"],(function(e,o,p,t){var n=p._locale.weekdaysParse(e,t,p._strict);null!=n?o.d=n:wo(p).invalidWeekday=e})),wp(["d","e","E"],(function(e,o,p,t){o[t]=Lp(e)}));var Mt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),zt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),dt=mp,Ot=mp,ht=mp;function At(e,o,p){var t,n,r,c=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],t=0;t<7;++t)r=Bo([2e3,1]).day(t),this._minWeekdaysParse[t]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[t]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[t]=this.weekdays(r,"").toLocaleLowerCase();return p?"dddd"===o?-1!==(n=Dp.call(this._weekdaysParse,c))?n:null:"ddd"===o?-1!==(n=Dp.call(this._shortWeekdaysParse,c))?n:null:-1!==(n=Dp.call(this._minWeekdaysParse,c))?n:null:"dddd"===o?-1!==(n=Dp.call(this._weekdaysParse,c))||-1!==(n=Dp.call(this._shortWeekdaysParse,c))||-1!==(n=Dp.call(this._minWeekdaysParse,c))?n:null:"ddd"===o?-1!==(n=Dp.call(this._shortWeekdaysParse,c))||-1!==(n=Dp.call(this._weekdaysParse,c))||-1!==(n=Dp.call(this._minWeekdaysParse,c))?n:null:-1!==(n=Dp.call(this._minWeekdaysParse,c))||-1!==(n=Dp.call(this._weekdaysParse,c))||-1!==(n=Dp.call(this._shortWeekdaysParse,c))?n:null}function ut(){function e(e,o){return o.length-e.length}var o,p,t,n,r,c=[],s=[],l=[],i=[];for(o=0;o<7;o++)p=Bo([2e3,1]).day(o),t=gp(this.weekdaysMin(p,"")),n=gp(this.weekdaysShort(p,"")),r=gp(this.weekdays(p,"")),c.push(t),s.push(n),l.push(r),i.push(t),i.push(n),i.push(r);c.sort(e),s.sort(e),l.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+c.join("|")+")","i")}function ft(){return this.hours()%12||12}function mt(e,o){Ko(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),o)}))}function qt(e,o){return o._meridiemParse}Ko("H",["HH",2],0,"hour"),Ko("h",["hh",2],0,ft),Ko("k",["kk",2],0,(function(){return this.hours()||24})),Ko("hmm",0,0,(function(){return""+ft.apply(this)+Fo(this.minutes(),2)})),Ko("hmmss",0,0,(function(){return""+ft.apply(this)+Fo(this.minutes(),2)+Fo(this.seconds(),2)})),Ko("Hmm",0,0,(function(){return""+this.hours()+Fo(this.minutes(),2)})),Ko("Hmmss",0,0,(function(){return""+this.hours()+Fo(this.minutes(),2)+Fo(this.seconds(),2)})),mt("a",!0),mt("A",!1),Wp("a",qt),Wp("A",qt),Wp("H",ap,Rp),Wp("h",ap,qp),Wp("k",ap,qp),Wp("HH",ap,cp),Wp("hh",ap,cp),Wp("kk",ap,cp),Wp("hmm",Mp),Wp("hmmss",bp),Wp("Hmm",Mp),Wp("Hmmss",bp),Bp(["H","HH"],Ep),Bp(["k","kk"],(function(e,o,p){var t=Lp(e);o[Ep]=24===t?0:t})),Bp(["a","A"],(function(e,o,p){p._isPm=p._locale.isPM(e),p._meridiem=e})),Bp(["h","hh"],(function(e,o,p){o[Ep]=Lp(e),wo(p).bigHour=!0})),Bp("hmm",(function(e,o,p){var t=e.length-2;o[Ep]=Lp(e.substr(0,t)),o[Pp]=Lp(e.substr(t)),wo(p).bigHour=!0})),Bp("hmmss",(function(e,o,p){var t=e.length-4,n=e.length-2;o[Ep]=Lp(e.substr(0,t)),o[Pp]=Lp(e.substr(t,2)),o[Xp]=Lp(e.substr(n)),wo(p).bigHour=!0})),Bp("Hmm",(function(e,o,p){var t=e.length-2;o[Ep]=Lp(e.substr(0,t)),o[Pp]=Lp(e.substr(t))})),Bp("Hmmss",(function(e,o,p){var t=e.length-4,n=e.length-2;o[Ep]=Lp(e.substr(0,t)),o[Pp]=Lp(e.substr(t,2)),o[Xp]=Lp(e.substr(n))}));var Rt=jp("Hours",!0);var Wt,vt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Gp,monthsShort:$p,week:{dow:0,doy:6},weekdays:Mt,weekdaysMin:zt,weekdaysShort:bt,meridiemParse:/[ap]\.?m?\.?/i},gt={},yt={};function Lt(e,o){var p,t=Math.min(e.length,o.length);for(p=0;p0;){if(t=Bt(n.slice(0,o).join("-")))return t;if(p&&p.length>=o&&Lt(n,p)>=o-1)break;o--}r++}return Wt}(e)}function St(e){var o,p=e._a;return p&&-2===wo(e).overflow&&(o=p[xp]<0||p[xp]>11?xp:p[Ip]<1||p[Ip]>Yp(p[Sp],p[xp])?Ip:p[Ep]<0||p[Ep]>24||24===p[Ep]&&(0!==p[Pp]||0!==p[Xp]||0!==p[Hp])?Ep:p[Pp]<0||p[Pp]>59?Pp:p[Xp]<0||p[Xp]>59?Xp:p[Hp]<0||p[Hp]>999?Hp:-1,wo(e)._overflowDayOfYear&&(oIp)&&(o=Ip),wo(e)._overflowWeeks&&-1===o&&(o=Zp),wo(e)._overflowWeekday&&-1===o&&(o=Vp),wo(e).overflow=o),e}var xt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,It=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Et=/Z|[+-]\d\d(?::?\d\d)?/,Pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Xt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ht=/^\/?Date\((-?\d+)/i,Zt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Vt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function kt(e){var o,p,t,n,r,c,s=e._i,l=xt.exec(s)||It.exec(s),i=Pt.length,a=Xt.length;if(l){for(wo(e).iso=!0,o=0,p=i;o7)&&(l=!0)):(r=e._locale._week.dow,c=e._locale._week.doy,i=lt($t(),r,c),p=jt(o.gg,e._a[Sp],i.year),t=jt(o.w,i.week),null!=o.d?((n=o.d)<0||n>6)&&(l=!0):null!=o.e?(n=o.e+r,(o.e<0||o.e>6)&&(l=!0)):n=r);t<1||t>it(p,r,c)?wo(e)._overflowWeeks=!0:null!=l?wo(e)._overflowWeekday=!0:(s=st(p,t,n,r,c),e._a[Sp]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(r=jt(e._a[Sp],t[Sp]),(e._dayOfYear>kp(r)||0===e._dayOfYear)&&(wo(e)._overflowDayOfYear=!0),p=rt(r,0,e._dayOfYear),e._a[xp]=p.getUTCMonth(),e._a[Ip]=p.getUTCDate()),o=0;o<3&&null==e._a[o];++o)e._a[o]=c[o]=t[o];for(;o<7;o++)e._a[o]=c[o]=null==e._a[o]?2===o?1:0:e._a[o];24===e._a[Ep]&&0===e._a[Pp]&&0===e._a[Xp]&&0===e._a[Hp]&&(e._nextDay=!0,e._a[Ep]=0),e._d=(e._useUTC?rt:nt).apply(null,c),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ep]=24),e._w&&void 0!==e._w.d&&e._w.d!==n&&(wo(e).weekdayMismatch=!0)}}function Ut(e){if(e._f!==fo.ISO_8601)if(e._f!==fo.RFC_2822){e._a=[],wo(e).empty=!0;var o,p,t,n,r,c,s,l=""+e._i,i=l.length,a=0;for(s=(t=Jo(e._f,e._locale).match(Uo)||[]).length,o=0;o0&&wo(e).unusedInput.push(r),l=l.slice(l.indexOf(p)+p.length),a+=p.length),$o[n]?(p?wo(e).empty=!1:wo(e).unusedTokens.push(n),Cp(n,p,e)):e._strict&&!p&&wo(e).unusedTokens.push(n);wo(e).charsLeftOver=i-a,l.length>0&&wo(e).unusedInput.push(l),e._a[Ep]<=12&&!0===wo(e).bigHour&&e._a[Ep]>0&&(wo(e).bigHour=void 0),wo(e).parsedDateParts=e._a.slice(0),wo(e).meridiem=e._meridiem,e._a[Ep]=function(e,o,p){var t;if(null==p)return o;return null!=e.meridiemHour?e.meridiemHour(o,p):null!=e.isPM?((t=e.isPM(p))&&o<12&&(o+=12),t||12!==o||(o=0),o):o}(e._locale,e._a[Ep],e._meridiem),null!==(c=wo(e).era)&&(e._a[Sp]=e._locale.erasConvertYear(c,e._a[Sp])),Ft(e),St(e)}else _t(e);else kt(e)}function Yt(e){var o=e._i,p=e._f;return e._locale=e._locale||Tt(e._l),null===o||void 0===p&&""===o?To({nullInput:!0}):("string"==typeof o&&(e._i=o=e._locale.preparse(o)),Po(o)?new Eo(St(o)):(yo(o)?e._d=o:mo(p)?function(e){var o,p,t,n,r,c,s=!1,l=e._f.length;if(0===l)return wo(e).invalidFormat=!0,void(e._d=new Date(NaN));for(n=0;nthis?this:e:To()}));function Jt(e,o){var p,t;if(1===o.length&&mo(o[0])&&(o=o[0]),!o.length)return $t();for(p=o[0],t=1;t=0?new Date(e+400,o,p)-Bn:new Date(e,o,p).valueOf()}function Tn(e,o,p){return e<100&&e>=0?Date.UTC(e+400,o,p)-Bn:Date.UTC(e,o,p)}function Sn(e,o){return o.erasAbbrRegex(e)}function xn(){var e,o,p,t,n,r=[],c=[],s=[],l=[],i=this.eras();for(e=0,o=i.length;e(r=it(e,t,n))&&(o=r),Pn.call(this,e,o,p,t,n))}function Pn(e,o,p,t,n){var r=st(e,o,p,t,n),c=rt(r.year,0,r.dayOfYear);return this.year(c.getUTCFullYear()),this.month(c.getUTCMonth()),this.date(c.getUTCDate()),this}Ko("N",0,0,"eraAbbr"),Ko("NN",0,0,"eraAbbr"),Ko("NNN",0,0,"eraAbbr"),Ko("NNNN",0,0,"eraName"),Ko("NNNNN",0,0,"eraNarrow"),Ko("y",["y",1],"yo","eraYear"),Ko("y",["yy",2],0,"eraYear"),Ko("y",["yyy",3],0,"eraYear"),Ko("y",["yyyy",4],0,"eraYear"),Wp("N",Sn),Wp("NN",Sn),Wp("NNN",Sn),Wp("NNNN",(function(e,o){return o.erasNameRegex(e)})),Wp("NNNNN",(function(e,o){return o.erasNarrowRegex(e)})),Bp(["N","NN","NNN","NNNN","NNNNN"],(function(e,o,p,t){var n=p._locale.erasParse(e,t,p._strict);n?wo(p).era=n:wo(p).invalidEra=e})),Wp("y",hp),Wp("yy",hp),Wp("yyy",hp),Wp("yyyy",hp),Wp("yo",(function(e,o){return o._eraYearOrdinalRegex||hp})),Bp(["y","yy","yyy","yyyy"],Sp),Bp(["yo"],(function(e,o,p,t){var n;p._locale._eraYearOrdinalRegex&&(n=e.match(p._locale._eraYearOrdinalRegex)),p._locale.eraYearOrdinalParse?o[Sp]=p._locale.eraYearOrdinalParse(e,n):o[Sp]=parseInt(e,10)})),Ko(0,["gg",2],0,(function(){return this.weekYear()%100})),Ko(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),In("gggg","weekYear"),In("ggggg","weekYear"),In("GGGG","isoWeekYear"),In("GGGGG","isoWeekYear"),Wp("G",Ap),Wp("g",Ap),Wp("GG",ap,cp),Wp("gg",ap,cp),Wp("GGGG",dp,lp),Wp("gggg",dp,lp),Wp("GGGGG",Op,ip),Wp("ggggg",Op,ip),wp(["gggg","ggggg","GGGG","GGGGG"],(function(e,o,p,t){o[t.substr(0,2)]=Lp(e)})),wp(["gg","GG"],(function(e,o,p,t){o[t]=fo.parseTwoDigitYear(e)})),Ko("Q",0,"Qo","quarter"),Wp("Q",rp),Bp("Q",(function(e,o){o[xp]=3*(Lp(e)-1)})),Ko("D",["DD",2],"Do","date"),Wp("D",ap,qp),Wp("DD",ap,cp),Wp("Do",(function(e,o){return e?o._dayOfMonthOrdinalParse||o._ordinalParse:o._dayOfMonthOrdinalParseLenient})),Bp(["D","DD"],Ip),Bp("Do",(function(e,o){o[Ip]=Lp(e.match(ap)[0])}));var Xn=jp("Date",!0);Ko("DDD",["DDDD",3],"DDDo","dayOfYear"),Wp("DDD",zp),Wp("DDDD",sp),Bp(["DDD","DDDD"],(function(e,o,p){p._dayOfYear=Lp(e)})),Ko("m",["mm",2],0,"minute"),Wp("m",ap,Rp),Wp("mm",ap,cp),Bp(["m","mm"],Pp);var Hn=jp("Minutes",!1);Ko("s",["ss",2],0,"second"),Wp("s",ap,Rp),Wp("ss",ap,cp),Bp(["s","ss"],Xp);var Zn,Vn,kn=jp("Seconds",!1);for(Ko("S",0,0,(function(){return~~(this.millisecond()/100)})),Ko(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),Ko(0,["SSS",3],0,"millisecond"),Ko(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),Ko(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),Ko(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),Ko(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),Ko(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),Ko(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Wp("S",zp,rp),Wp("SS",zp,cp),Wp("SSS",zp,sp),Zn="SSSS";Zn.length<=9;Zn+="S")Wp(Zn,hp);function Dn(e,o){o[Hp]=Lp(1e3*("0."+e))}for(Zn="S";Zn.length<=9;Zn+="S")Bp(Zn,Dn);Vn=jp("Milliseconds",!1),Ko("z",0,0,"zoneAbbr"),Ko("zz",0,0,"zoneName");var _n=Eo.prototype;function jn(e){return e}_n.add=un,_n.calendar=function(e,o){1===arguments.length&&(arguments[0]?qn(arguments[0])?(e=arguments[0],o=void 0):function(e){var o,p=qo(e)&&!Wo(e),t=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(o=0;op.valueOf():p.valueOf()9999?Qo(p,o?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Do(Date.prototype.toISOString)?o?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Qo(p,"Z")):Qo(p,o?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},_n.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,o,p,t="moment",n="";return this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",n="Z"),e="["+t+'("]',o=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p=n+'[")]',this.format(e+o+"-MM-DD[T]HH:mm:ss.SSS"+p)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(_n[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),_n.toJSON=function(){return this.isValid()?this.toISOString():null},_n.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},_n.unix=function(){return Math.floor(this.valueOf()/1e3)},_n.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},_n.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},_n.eraName=function(){var e,o,p,t=this.localeData().eras();for(e=0,o=t.length;ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},_n.isLocal=function(){return!!this.isValid()&&!this._isUTC},_n.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},_n.isUtc=an,_n.isUTC=an,_n.zoneAbbr=function(){return this._isUTC?"UTC":""},_n.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},_n.dates=Ho("dates accessor is deprecated. Use date instead.",Xn),_n.months=Ho("months accessor is deprecated. Use month instead",pt),_n.years=Ho("years accessor is deprecated. Use year instead",_p),_n.zone=Ho("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,o){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,o),this):-this.utcOffset()})),_n.isDSTShifted=Ho("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!vo(this._isDSTShifted))return this._isDSTShifted;var e,o={};return Io(o,this),(o=Yt(o))._a?(e=o._isUTC?Bo(o._a):$t(o._a),this._isDSTShifted=this.isValid()&&function(e,o){var p,t=Math.min(e.length,o.length),n=Math.abs(e.length-o.length),r=0;for(p=0;p0):this._isDSTShifted=!1,this._isDSTShifted}));var Fn=jo.prototype;function Un(e,o,p,t){var n=Tt(),r=Bo().set(t,o);return n[p](r,e)}function Yn(e,o,p){if(go(e)&&(o=e,e=void 0),e=e||"",null!=o)return Un(e,o,p,"month");var t,n=[];for(t=0;t<12;t++)n[t]=Un(e,t,p,"month");return n}function Gn(e,o,p,t){"boolean"==typeof e?(go(o)&&(p=o,o=void 0),o=o||""):(p=o=e,e=!1,go(o)&&(p=o,o=void 0),o=o||"");var n,r=Tt(),c=e?r._week.dow:0,s=[];if(null!=p)return Un(o,(p+c)%7,t,"day");for(n=0;n<7;n++)s[n]=Un(o,(n+c)%7,t,"day");return s}Fn.calendar=function(e,o,p){var t=this._calendar[e]||this._calendar.sameElse;return Do(t)?t.call(o,p):t},Fn.longDateFormat=function(e){var o=this._longDateFormat[e],p=this._longDateFormat[e.toUpperCase()];return o||!p?o:(this._longDateFormat[e]=p.match(Uo).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},Fn.invalidDate=function(){return this._invalidDate},Fn.ordinal=function(e){return this._ordinal.replace("%d",e)},Fn.preparse=jn,Fn.postformat=jn,Fn.relativeTime=function(e,o,p,t){var n=this._relativeTime[p];return Do(n)?n(e,o,p,t):n.replace(/%d/i,e)},Fn.pastFuture=function(e,o){var p=this._relativeTime[e>0?"future":"past"];return Do(p)?p(o):p.replace(/%s/i,o)},Fn.set=function(e){var o,p;for(p in e)Ro(e,p)&&(Do(o=e[p])?this[p]=o:this["_"+p]=o);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Fn.eras=function(e,o){var p,t,n,r=this._eras||Tt("en")._eras;for(p=0,t=r.length;p=0)return l[t]},Fn.erasConvertYear=function(e,o){var p=e.since<=e.until?1:-1;return void 0===o?fo(e.since).year():fo(e.since).year()+(o-e.offset)*p},Fn.erasAbbrRegex=function(e){return Ro(this,"_erasAbbrRegex")||xn.call(this),e?this._erasAbbrRegex:this._erasRegex},Fn.erasNameRegex=function(e){return Ro(this,"_erasNameRegex")||xn.call(this),e?this._erasNameRegex:this._erasRegex},Fn.erasNarrowRegex=function(e){return Ro(this,"_erasNarrowRegex")||xn.call(this),e?this._erasNarrowRegex:this._erasRegex},Fn.months=function(e,o){return e?mo(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Kp).test(o)?"format":"standalone"][e.month()]:mo(this._months)?this._months:this._months.standalone},Fn.monthsShort=function(e,o){return e?mo(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Kp.test(o)?"format":"standalone"][e.month()]:mo(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Fn.monthsParse=function(e,o,p){var t,n,r;if(this._monthsParseExact)return et.call(this,e,o,p);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),t=0;t<12;t++){if(n=Bo([2e3,t]),p&&!this._longMonthsParse[t]&&(this._longMonthsParse[t]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[t]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),p||this._monthsParse[t]||(r="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[t]=new RegExp(r.replace(".",""),"i")),p&&"MMMM"===o&&this._longMonthsParse[t].test(e))return t;if(p&&"MMM"===o&&this._shortMonthsParse[t].test(e))return t;if(!p&&this._monthsParse[t].test(e))return t}},Fn.monthsRegex=function(e){return this._monthsParseExact?(Ro(this,"_monthsRegex")||tt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(Ro(this,"_monthsRegex")||(this._monthsRegex=Jp),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Fn.monthsShortRegex=function(e){return this._monthsParseExact?(Ro(this,"_monthsRegex")||tt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(Ro(this,"_monthsShortRegex")||(this._monthsShortRegex=Qp),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Fn.week=function(e){return lt(e,this._week.dow,this._week.doy).week},Fn.firstDayOfYear=function(){return this._week.doy},Fn.firstDayOfWeek=function(){return this._week.dow},Fn.weekdays=function(e,o){var p=mo(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(o)?"format":"standalone"];return!0===e?at(p,this._week.dow):e?p[e.day()]:p},Fn.weekdaysMin=function(e){return!0===e?at(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Fn.weekdaysShort=function(e){return!0===e?at(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Fn.weekdaysParse=function(e,o,p){var t,n,r;if(this._weekdaysParseExact)return At.call(this,e,o,p);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),t=0;t<7;t++){if(n=Bo([2e3,1]).day(t),p&&!this._fullWeekdaysParse[t]&&(this._fullWeekdaysParse[t]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[t]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[t]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[t]||(r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[t]=new RegExp(r.replace(".",""),"i")),p&&"dddd"===o&&this._fullWeekdaysParse[t].test(e))return t;if(p&&"ddd"===o&&this._shortWeekdaysParse[t].test(e))return t;if(p&&"dd"===o&&this._minWeekdaysParse[t].test(e))return t;if(!p&&this._weekdaysParse[t].test(e))return t}},Fn.weekdaysRegex=function(e){return this._weekdaysParseExact?(Ro(this,"_weekdaysRegex")||ut.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Ro(this,"_weekdaysRegex")||(this._weekdaysRegex=dt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Fn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(Ro(this,"_weekdaysRegex")||ut.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ro(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ot),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Fn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(Ro(this,"_weekdaysRegex")||ut.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ro(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ht),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Fn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Fn.meridiem=function(e,o,p){return e>11?p?"pm":"PM":p?"am":"AM"},wt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var o=e%10;return e+(1===Lp(e%100/10)?"th":1===o?"st":2===o?"nd":3===o?"rd":"th")}}),fo.lang=Ho("moment.lang is deprecated. Use moment.locale instead.",wt),fo.langData=Ho("moment.langData is deprecated. Use moment.localeData instead.",Tt);var $n=Math.abs;function Kn(e,o,p,t){var n=zn(o,p);return e._milliseconds+=t*n._milliseconds,e._days+=t*n._days,e._months+=t*n._months,e._bubble()}function Qn(e){return e<0?Math.floor(e):Math.ceil(e)}function Jn(e){return 4800*e/146097}function er(e){return 146097*e/4800}function or(e){return function(){return this.as(e)}}var pr=or("ms"),tr=or("s"),nr=or("m"),rr=or("h"),cr=or("d"),sr=or("w"),lr=or("M"),ir=or("Q"),ar=or("y"),Mr=pr;function br(e){return function(){return this.isValid()?this._data[e]:NaN}}var zr=br("milliseconds"),dr=br("seconds"),Or=br("minutes"),hr=br("hours"),Ar=br("days"),ur=br("months"),fr=br("years");var mr=Math.round,qr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Rr(e,o,p,t,n){return n.relativeTime(o||1,!!p,e,t)}var Wr=Math.abs;function vr(e){return(e>0)-(e<0)||+e}function gr(){if(!this.isValid())return this.localeData().invalidDate();var e,o,p,t,n,r,c,s,l=Wr(this._milliseconds)/1e3,i=Wr(this._days),a=Wr(this._months),M=this.asSeconds();return M?(e=yp(l/60),o=yp(e/60),l%=60,e%=60,p=yp(a/12),a%=12,t=l?l.toFixed(3).replace(/\.?0+$/,""):"",n=M<0?"-":"",r=vr(this._months)!==vr(M)?"-":"",c=vr(this._days)!==vr(M)?"-":"",s=vr(this._milliseconds)!==vr(M)?"-":"",n+"P"+(p?r+p+"Y":"")+(a?r+a+"M":"")+(i?c+i+"D":"")+(o||e||l?"T":"")+(o?s+o+"H":"")+(e?s+e+"M":"")+(l?s+t+"S":"")):"P0D"}var yr=on.prototype;yr.isValid=function(){return this._isValid},yr.abs=function(){var e=this._data;return this._milliseconds=$n(this._milliseconds),this._days=$n(this._days),this._months=$n(this._months),e.milliseconds=$n(e.milliseconds),e.seconds=$n(e.seconds),e.minutes=$n(e.minutes),e.hours=$n(e.hours),e.months=$n(e.months),e.years=$n(e.years),this},yr.add=function(e,o){return Kn(this,e,o,1)},yr.subtract=function(e,o){return Kn(this,e,o,-1)},yr.as=function(e){if(!this.isValid())return NaN;var o,p,t=this._milliseconds;if("month"===(e=op(e))||"quarter"===e||"year"===e)switch(o=this._days+t/864e5,p=this._months+Jn(o),e){case"month":return p;case"quarter":return p/3;case"year":return p/12}else switch(o=this._days+Math.round(er(this._months)),e){case"week":return o/7+t/6048e5;case"day":return o+t/864e5;case"hour":return 24*o+t/36e5;case"minute":return 1440*o+t/6e4;case"second":return 86400*o+t/1e3;case"millisecond":return Math.floor(864e5*o)+t;default:throw new Error("Unknown unit "+e)}},yr.asMilliseconds=pr,yr.asSeconds=tr,yr.asMinutes=nr,yr.asHours=rr,yr.asDays=cr,yr.asWeeks=sr,yr.asMonths=lr,yr.asQuarters=ir,yr.asYears=ar,yr.valueOf=Mr,yr._bubble=function(){var e,o,p,t,n,r=this._milliseconds,c=this._days,s=this._months,l=this._data;return r>=0&&c>=0&&s>=0||r<=0&&c<=0&&s<=0||(r+=864e5*Qn(er(s)+c),c=0,s=0),l.milliseconds=r%1e3,e=yp(r/1e3),l.seconds=e%60,o=yp(e/60),l.minutes=o%60,p=yp(o/60),l.hours=p%24,c+=yp(p/24),s+=n=yp(Jn(c)),c-=Qn(er(n)),t=yp(s/12),s%=12,l.days=c,l.months=s,l.years=t,this},yr.clone=function(){return zn(this)},yr.get=function(e){return e=op(e),this.isValid()?this[e+"s"]():NaN},yr.milliseconds=zr,yr.seconds=dr,yr.minutes=Or,yr.hours=hr,yr.days=Ar,yr.weeks=function(){return yp(this.days()/7)},yr.months=ur,yr.years=fr,yr.humanize=function(e,o){if(!this.isValid())return this.localeData().invalidDate();var p,t,n=!1,r=qr;return"object"==typeof e&&(o=e,e=!1),"boolean"==typeof e&&(n=e),"object"==typeof o&&(r=Object.assign({},qr,o),null!=o.s&&null==o.ss&&(r.ss=o.s-1)),t=function(e,o,p,t){var n=zn(e).abs(),r=mr(n.as("s")),c=mr(n.as("m")),s=mr(n.as("h")),l=mr(n.as("d")),i=mr(n.as("M")),a=mr(n.as("w")),M=mr(n.as("y")),b=r<=p.ss&&["s",r]||r0,b[4]=t,Rr.apply(null,b)}(this,!n,r,p=this.localeData()),n&&(t=p.pastFuture(+this,t)),p.postformat(t)},yr.toISOString=gr,yr.toString=gr,yr.toJSON=gr,yr.locale=Wn,yr.localeData=gn,yr.toIsoString=Ho("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",gr),yr.lang=vn,Ko("X",0,0,"unix"),Ko("x",0,0,"valueOf"),Wp("x",Ap),Wp("X",/[+-]?\d+(\.\d{1,3})?/),Bp("X",(function(e,o,p){p._d=new Date(1e3*parseFloat(e))})),Bp("x",(function(e,o,p){p._d=new Date(Lp(e))})), +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.node-CLoDR8RL.js","assets/index-DxmLT0bY.js","assets/index-CqQFZXZA.css","assets/index-H8vdBuKt.js"])))=>i.map(i=>d[i]); +import{S as p,b as t,c as r,F as c,T as s,d as M,I as z,e as d,f as A}from"./index-CmNFgSR4.js";export{g as FormFieldLabel,i as FormFieldLayout,h as FormFieldMessage,G as Grid,k as GridCol,j as GridRow,l as IconCheckLine,m as IconMiniArrowDoubleLine,n as IconMiniArrowDownLine,o as IconMiniArrowUpLine,a as Table}from"./index-CmNFgSR4.js";import{r as u,R as f,a3 as q,m as W,C as v,a4 as y,a5 as w,K as C,a6 as x,i as E,k as P,s as X,p as Z,S as V,T as D,w as _,t as U,l as Y,x as $,v as K,h as Q,V as J,W as ee,a7 as oe,o as pe,q as te,Y as ne,_ as re,n as ce,y as se,U as le,X as ie,a8 as Me,a9 as be,B as ze,E as de}from"./index-DxmLT0bY.js";export{H as Heading,ac as IconCanvasLogoLine,ad as IconElevateLogoLine,ae as IconImpactLogoLine,a1 as IconInstructureLogoLine,af as IconMasteryLogoLine,ab as InlineSVG,aa as Spinner,O as TextDirectionContext,N as canvas}from"./index-DxmLT0bY.js";import{q as Oe,r as he,S as Ae,t as ue,j as fe,B as me,u as qe,P as Re,e as We,v as ve,w as ge,s as ye,C as Le,x as Ne,y as Be,z as we,n as Ce,A as Te,f as Se,k as xe,m as Ie,D as Ee,i as Pe,T as Xe,p as He,E as Ze,o as Ve,l as ke,F as De,G as _e,H as je,J as Fe,K as Ue,M as Ye,h as Ge,N as $e,Q as Ke,U as Qe,V as Je,W as eo,X as oo,Y as po,Z as to,_ as no,$ as ro,a0 as co}from"./RenderTopNavBar-BObK9Y19.js";export{a2 as Avatar,a3 as Breadcrumb,I as IconArrowOpenStartLine,af as IconArrowOpenUpSolid,aa as IconDiscussionLine,ab as IconHamburgerLine,ac as IconHeartLine,ad as IconMoreLine,ae as IconQuestionLine,a4 as InlineList,a1 as InstUISettingsProvider,L as Link,O as Options,a5 as Position,a6 as Responsive,a7 as TopNavBar,a8 as Tray,a9 as TruncateText}from"./RenderTopNavBar-BObK9Y19.js";import{I as so,B as lo,E as io}from"./index-CFaT5J52.js";export{b as IconCopyLine,a as RadioInput,R as RadioInputGroup,T as ToggleDetails}from"./index-CFaT5J52.js";export{B as Billboard}from"./index-DsnmBOMj.js";import{I as ao}from"./index-CaYtQ08a.js";export{a as IconSearchLine}from"./index-CaYtQ08a.js";export{F as Focusable,T as Tabs}from"./index-VWJm_On8.js";export{L as List,e as ListItem}from"./Mdtoui-DwpTTe70.js";export{S as SourceCodeEditor}from"./index-C-ITlPCi.js";export{I as IconRssLine}from"./IconRssLine-CfLRRZ3P.js";const Mo=(()=>{{const e=function(){return e=>e};return e.deprecatePropValues=()=>()=>null,e.warnDeprecatedProps=()=>{},e.warnDeprecatedComponent=()=>{},e.changedPackageWarning=()=>"",e}})(),bo=u.createContext({locale:void 0,timezone:void 0}),zo=({children:e,locale:o,timezone:p})=>f.createElement(bo.Provider,{value:{locale:o,timezone:p}},Oe(e));var Oo,ho,Ao={exports:{}},uo={exports:{}};function fo(){return Oo.apply(null,arguments)}function mo(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function qo(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function Ro(e,o){return Object.prototype.hasOwnProperty.call(e,o)}function Wo(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var o;for(o in e)if(Ro(e,o))return!1;return!0}function vo(e){return void 0===e}function go(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function yo(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function Lo(e,o){var p,t=[],n=e.length;for(p=0;p>>0;for(o=0;o0)for(p=0;p=0?p?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+t}var Uo=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Yo=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Go={},$o={};function Ko(e,o,p,t){var n=t;"string"==typeof t&&(n=function(){return this[t]()}),e&&($o[e]=n),o&&($o[o[0]]=function(){return Fo(n.apply(this,arguments),o[1],o[2])}),p&&($o[p]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function Qo(e,o){return e.isValid()?(o=Jo(o,e.localeData()),Go[o]=Go[o]||function(e){var o,p,t,n=e.match(Uo);for(o=0,p=n.length;o=0&&Yo.test(e);)e=e.replace(Yo,t),Yo.lastIndex=0,p-=1;return e}var ep={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function op(e){return"string"==typeof e?ep[e]||ep[e.toLowerCase()]:void 0}function pp(e){var o,p,t={};for(p in e)Ro(e,p)&&(o=op(p))&&(t[o]=e[p]);return t}var tp={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};var np,rp=/\d/,cp=/\d\d/,sp=/\d{3}/,lp=/\d{4}/,ip=/[+-]?\d{6}/,ap=/\d\d?/,Mp=/\d\d\d\d?/,bp=/\d\d\d\d\d\d?/,zp=/\d{1,3}/,dp=/\d{1,4}/,Op=/[+-]?\d{1,6}/,hp=/\d+/,Ap=/[+-]?\d+/,up=/Z|[+-]\d\d:?\d\d/gi,fp=/Z|[+-]\d\d(?::?\d\d)?/gi,mp=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,qp=/^[1-9]\d?/,Rp=/^([1-9]\d|\d)/;function Wp(e,o,p){np[e]=Do(o)?o:function(e,t){return e&&p?p:o}}function vp(e,o){return Ro(np,e)?np[e](o._strict,o._locale):new RegExp(gp(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,o,p,t,n){return o||p||t||n}))))}function gp(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function yp(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Lp(e){var o=+e,p=0;return 0!==o&&isFinite(o)&&(p=yp(o)),p}np={};var Np={};function Bp(e,o){var p,t,n=o;for("string"==typeof e&&(e=[e]),go(o)&&(n=function(e,p){p[o]=Lp(e)}),t=e.length,p=0;p68?1900:2e3)};var Dp,_p=jp("FullYear",!0);function jp(e,o){return function(p){return null!=p?(Up(this,e,p),fo.updateOffset(this,o),this):Fp(this,e)}}function Fp(e,o){if(!e.isValid())return NaN;var p=e._d,t=e._isUTC;switch(o){case"Milliseconds":return t?p.getUTCMilliseconds():p.getMilliseconds();case"Seconds":return t?p.getUTCSeconds():p.getSeconds();case"Minutes":return t?p.getUTCMinutes():p.getMinutes();case"Hours":return t?p.getUTCHours():p.getHours();case"Date":return t?p.getUTCDate():p.getDate();case"Day":return t?p.getUTCDay():p.getDay();case"Month":return t?p.getUTCMonth():p.getMonth();case"FullYear":return t?p.getUTCFullYear():p.getFullYear();default:return NaN}}function Up(e,o,p){var t,n,r,c,s;if(e.isValid()&&!isNaN(p)){switch(t=e._d,n=e._isUTC,o){case"Milliseconds":return void(n?t.setUTCMilliseconds(p):t.setMilliseconds(p));case"Seconds":return void(n?t.setUTCSeconds(p):t.setSeconds(p));case"Minutes":return void(n?t.setUTCMinutes(p):t.setMinutes(p));case"Hours":return void(n?t.setUTCHours(p):t.setHours(p));case"Date":return void(n?t.setUTCDate(p):t.setDate(p));case"FullYear":break;default:return}r=p,c=e.month(),s=29!==(s=e.date())||1!==c||Tp(r)?s:28,n?t.setUTCFullYear(r,c,s):t.setFullYear(r,c,s)}}function Yp(e,o){if(isNaN(e)||isNaN(o))return NaN;var p=function(e,o){return(e%o+o)%o}(o,12);return e+=(o-p)/12,1===p?Tp(e)?29:28:31-p%7%2}Dp=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var o;for(o=0;o=0?(s=new Date(e+400,o,p,t,n,r,c),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,o,p,t,n,r,c),s}function rt(e){var o,p;return e<100&&e>=0?((p=Array.prototype.slice.call(arguments))[0]=e+400,o=new Date(Date.UTC.apply(null,p)),isFinite(o.getUTCFullYear())&&o.setUTCFullYear(e)):o=new Date(Date.UTC.apply(null,arguments)),o}function ct(e,o,p){var t=7+o-p;return-((7+rt(e,0,t).getUTCDay()-o)%7)+t-1}function st(e,o,p,t,n){var r,c,s=1+7*(o-1)+(7+p-t)%7+ct(e,t,n);return s<=0?c=kp(r=e-1)+s:s>kp(e)?(r=e+1,c=s-kp(e)):(r=e,c=s),{year:r,dayOfYear:c}}function lt(e,o,p){var t,n,r=ct(e.year(),o,p),c=Math.floor((e.dayOfYear()-r-1)/7)+1;return c<1?t=c+it(n=e.year()-1,o,p):c>it(e.year(),o,p)?(t=c-it(e.year(),o,p),n=e.year()+1):(n=e.year(),t=c),{week:t,year:n}}function it(e,o,p){var t=ct(e,o,p),n=ct(e+1,o,p);return(kp(e)-t+n)/7}Ko("w",["ww",2],"wo","week"),Ko("W",["WW",2],"Wo","isoWeek"),Wp("w",ap,qp),Wp("ww",ap,cp),Wp("W",ap,qp),Wp("WW",ap,cp),wp(["w","ww","W","WW"],(function(e,o,p,t){o[t.substr(0,1)]=Lp(e)}));function at(e,o){return e.slice(o,7).concat(e.slice(0,o))}Ko("d",0,"do","day"),Ko("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),Ko("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),Ko("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),Ko("e",0,0,"weekday"),Ko("E",0,0,"isoWeekday"),Wp("d",ap),Wp("e",ap),Wp("E",ap),Wp("dd",(function(e,o){return o.weekdaysMinRegex(e)})),Wp("ddd",(function(e,o){return o.weekdaysShortRegex(e)})),Wp("dddd",(function(e,o){return o.weekdaysRegex(e)})),wp(["dd","ddd","dddd"],(function(e,o,p,t){var n=p._locale.weekdaysParse(e,t,p._strict);null!=n?o.d=n:wo(p).invalidWeekday=e})),wp(["d","e","E"],(function(e,o,p,t){o[t]=Lp(e)}));var Mt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),zt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),dt=mp,Ot=mp,ht=mp;function At(e,o,p){var t,n,r,c=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],t=0;t<7;++t)r=Bo([2e3,1]).day(t),this._minWeekdaysParse[t]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[t]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[t]=this.weekdays(r,"").toLocaleLowerCase();return p?"dddd"===o?-1!==(n=Dp.call(this._weekdaysParse,c))?n:null:"ddd"===o?-1!==(n=Dp.call(this._shortWeekdaysParse,c))?n:null:-1!==(n=Dp.call(this._minWeekdaysParse,c))?n:null:"dddd"===o?-1!==(n=Dp.call(this._weekdaysParse,c))||-1!==(n=Dp.call(this._shortWeekdaysParse,c))||-1!==(n=Dp.call(this._minWeekdaysParse,c))?n:null:"ddd"===o?-1!==(n=Dp.call(this._shortWeekdaysParse,c))||-1!==(n=Dp.call(this._weekdaysParse,c))||-1!==(n=Dp.call(this._minWeekdaysParse,c))?n:null:-1!==(n=Dp.call(this._minWeekdaysParse,c))||-1!==(n=Dp.call(this._weekdaysParse,c))||-1!==(n=Dp.call(this._shortWeekdaysParse,c))?n:null}function ut(){function e(e,o){return o.length-e.length}var o,p,t,n,r,c=[],s=[],l=[],i=[];for(o=0;o<7;o++)p=Bo([2e3,1]).day(o),t=gp(this.weekdaysMin(p,"")),n=gp(this.weekdaysShort(p,"")),r=gp(this.weekdays(p,"")),c.push(t),s.push(n),l.push(r),i.push(t),i.push(n),i.push(r);c.sort(e),s.sort(e),l.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+c.join("|")+")","i")}function ft(){return this.hours()%12||12}function mt(e,o){Ko(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),o)}))}function qt(e,o){return o._meridiemParse}Ko("H",["HH",2],0,"hour"),Ko("h",["hh",2],0,ft),Ko("k",["kk",2],0,(function(){return this.hours()||24})),Ko("hmm",0,0,(function(){return""+ft.apply(this)+Fo(this.minutes(),2)})),Ko("hmmss",0,0,(function(){return""+ft.apply(this)+Fo(this.minutes(),2)+Fo(this.seconds(),2)})),Ko("Hmm",0,0,(function(){return""+this.hours()+Fo(this.minutes(),2)})),Ko("Hmmss",0,0,(function(){return""+this.hours()+Fo(this.minutes(),2)+Fo(this.seconds(),2)})),mt("a",!0),mt("A",!1),Wp("a",qt),Wp("A",qt),Wp("H",ap,Rp),Wp("h",ap,qp),Wp("k",ap,qp),Wp("HH",ap,cp),Wp("hh",ap,cp),Wp("kk",ap,cp),Wp("hmm",Mp),Wp("hmmss",bp),Wp("Hmm",Mp),Wp("Hmmss",bp),Bp(["H","HH"],Ep),Bp(["k","kk"],(function(e,o,p){var t=Lp(e);o[Ep]=24===t?0:t})),Bp(["a","A"],(function(e,o,p){p._isPm=p._locale.isPM(e),p._meridiem=e})),Bp(["h","hh"],(function(e,o,p){o[Ep]=Lp(e),wo(p).bigHour=!0})),Bp("hmm",(function(e,o,p){var t=e.length-2;o[Ep]=Lp(e.substr(0,t)),o[Pp]=Lp(e.substr(t)),wo(p).bigHour=!0})),Bp("hmmss",(function(e,o,p){var t=e.length-4,n=e.length-2;o[Ep]=Lp(e.substr(0,t)),o[Pp]=Lp(e.substr(t,2)),o[Xp]=Lp(e.substr(n)),wo(p).bigHour=!0})),Bp("Hmm",(function(e,o,p){var t=e.length-2;o[Ep]=Lp(e.substr(0,t)),o[Pp]=Lp(e.substr(t))})),Bp("Hmmss",(function(e,o,p){var t=e.length-4,n=e.length-2;o[Ep]=Lp(e.substr(0,t)),o[Pp]=Lp(e.substr(t,2)),o[Xp]=Lp(e.substr(n))}));var Rt=jp("Hours",!0);var Wt,vt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Gp,monthsShort:$p,week:{dow:0,doy:6},weekdays:Mt,weekdaysMin:zt,weekdaysShort:bt,meridiemParse:/[ap]\.?m?\.?/i},gt={},yt={};function Lt(e,o){var p,t=Math.min(e.length,o.length);for(p=0;p0;){if(t=Bt(n.slice(0,o).join("-")))return t;if(p&&p.length>=o&&Lt(n,p)>=o-1)break;o--}r++}return Wt}(e)}function St(e){var o,p=e._a;return p&&-2===wo(e).overflow&&(o=p[xp]<0||p[xp]>11?xp:p[Ip]<1||p[Ip]>Yp(p[Sp],p[xp])?Ip:p[Ep]<0||p[Ep]>24||24===p[Ep]&&(0!==p[Pp]||0!==p[Xp]||0!==p[Hp])?Ep:p[Pp]<0||p[Pp]>59?Pp:p[Xp]<0||p[Xp]>59?Xp:p[Hp]<0||p[Hp]>999?Hp:-1,wo(e)._overflowDayOfYear&&(oIp)&&(o=Ip),wo(e)._overflowWeeks&&-1===o&&(o=Zp),wo(e)._overflowWeekday&&-1===o&&(o=Vp),wo(e).overflow=o),e}var xt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,It=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Et=/Z|[+-]\d\d(?::?\d\d)?/,Pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Xt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ht=/^\/?Date\((-?\d+)/i,Zt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Vt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function kt(e){var o,p,t,n,r,c,s=e._i,l=xt.exec(s)||It.exec(s),i=Pt.length,a=Xt.length;if(l){for(wo(e).iso=!0,o=0,p=i;o7)&&(l=!0)):(r=e._locale._week.dow,c=e._locale._week.doy,i=lt($t(),r,c),p=jt(o.gg,e._a[Sp],i.year),t=jt(o.w,i.week),null!=o.d?((n=o.d)<0||n>6)&&(l=!0):null!=o.e?(n=o.e+r,(o.e<0||o.e>6)&&(l=!0)):n=r);t<1||t>it(p,r,c)?wo(e)._overflowWeeks=!0:null!=l?wo(e)._overflowWeekday=!0:(s=st(p,t,n,r,c),e._a[Sp]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(r=jt(e._a[Sp],t[Sp]),(e._dayOfYear>kp(r)||0===e._dayOfYear)&&(wo(e)._overflowDayOfYear=!0),p=rt(r,0,e._dayOfYear),e._a[xp]=p.getUTCMonth(),e._a[Ip]=p.getUTCDate()),o=0;o<3&&null==e._a[o];++o)e._a[o]=c[o]=t[o];for(;o<7;o++)e._a[o]=c[o]=null==e._a[o]?2===o?1:0:e._a[o];24===e._a[Ep]&&0===e._a[Pp]&&0===e._a[Xp]&&0===e._a[Hp]&&(e._nextDay=!0,e._a[Ep]=0),e._d=(e._useUTC?rt:nt).apply(null,c),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ep]=24),e._w&&void 0!==e._w.d&&e._w.d!==n&&(wo(e).weekdayMismatch=!0)}}function Ut(e){if(e._f!==fo.ISO_8601)if(e._f!==fo.RFC_2822){e._a=[],wo(e).empty=!0;var o,p,t,n,r,c,s,l=""+e._i,i=l.length,a=0;for(s=(t=Jo(e._f,e._locale).match(Uo)||[]).length,o=0;o0&&wo(e).unusedInput.push(r),l=l.slice(l.indexOf(p)+p.length),a+=p.length),$o[n]?(p?wo(e).empty=!1:wo(e).unusedTokens.push(n),Cp(n,p,e)):e._strict&&!p&&wo(e).unusedTokens.push(n);wo(e).charsLeftOver=i-a,l.length>0&&wo(e).unusedInput.push(l),e._a[Ep]<=12&&!0===wo(e).bigHour&&e._a[Ep]>0&&(wo(e).bigHour=void 0),wo(e).parsedDateParts=e._a.slice(0),wo(e).meridiem=e._meridiem,e._a[Ep]=function(e,o,p){var t;if(null==p)return o;return null!=e.meridiemHour?e.meridiemHour(o,p):null!=e.isPM?((t=e.isPM(p))&&o<12&&(o+=12),t||12!==o||(o=0),o):o}(e._locale,e._a[Ep],e._meridiem),null!==(c=wo(e).era)&&(e._a[Sp]=e._locale.erasConvertYear(c,e._a[Sp])),Ft(e),St(e)}else _t(e);else kt(e)}function Yt(e){var o=e._i,p=e._f;return e._locale=e._locale||Tt(e._l),null===o||void 0===p&&""===o?To({nullInput:!0}):("string"==typeof o&&(e._i=o=e._locale.preparse(o)),Po(o)?new Eo(St(o)):(yo(o)?e._d=o:mo(p)?function(e){var o,p,t,n,r,c,s=!1,l=e._f.length;if(0===l)return wo(e).invalidFormat=!0,void(e._d=new Date(NaN));for(n=0;nthis?this:e:To()}));function Jt(e,o){var p,t;if(1===o.length&&mo(o[0])&&(o=o[0]),!o.length)return $t();for(p=o[0],t=1;t=0?new Date(e+400,o,p)-Bn:new Date(e,o,p).valueOf()}function Tn(e,o,p){return e<100&&e>=0?Date.UTC(e+400,o,p)-Bn:Date.UTC(e,o,p)}function Sn(e,o){return o.erasAbbrRegex(e)}function xn(){var e,o,p,t,n,r=[],c=[],s=[],l=[],i=this.eras();for(e=0,o=i.length;e(r=it(e,t,n))&&(o=r),Pn.call(this,e,o,p,t,n))}function Pn(e,o,p,t,n){var r=st(e,o,p,t,n),c=rt(r.year,0,r.dayOfYear);return this.year(c.getUTCFullYear()),this.month(c.getUTCMonth()),this.date(c.getUTCDate()),this}Ko("N",0,0,"eraAbbr"),Ko("NN",0,0,"eraAbbr"),Ko("NNN",0,0,"eraAbbr"),Ko("NNNN",0,0,"eraName"),Ko("NNNNN",0,0,"eraNarrow"),Ko("y",["y",1],"yo","eraYear"),Ko("y",["yy",2],0,"eraYear"),Ko("y",["yyy",3],0,"eraYear"),Ko("y",["yyyy",4],0,"eraYear"),Wp("N",Sn),Wp("NN",Sn),Wp("NNN",Sn),Wp("NNNN",(function(e,o){return o.erasNameRegex(e)})),Wp("NNNNN",(function(e,o){return o.erasNarrowRegex(e)})),Bp(["N","NN","NNN","NNNN","NNNNN"],(function(e,o,p,t){var n=p._locale.erasParse(e,t,p._strict);n?wo(p).era=n:wo(p).invalidEra=e})),Wp("y",hp),Wp("yy",hp),Wp("yyy",hp),Wp("yyyy",hp),Wp("yo",(function(e,o){return o._eraYearOrdinalRegex||hp})),Bp(["y","yy","yyy","yyyy"],Sp),Bp(["yo"],(function(e,o,p,t){var n;p._locale._eraYearOrdinalRegex&&(n=e.match(p._locale._eraYearOrdinalRegex)),p._locale.eraYearOrdinalParse?o[Sp]=p._locale.eraYearOrdinalParse(e,n):o[Sp]=parseInt(e,10)})),Ko(0,["gg",2],0,(function(){return this.weekYear()%100})),Ko(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),In("gggg","weekYear"),In("ggggg","weekYear"),In("GGGG","isoWeekYear"),In("GGGGG","isoWeekYear"),Wp("G",Ap),Wp("g",Ap),Wp("GG",ap,cp),Wp("gg",ap,cp),Wp("GGGG",dp,lp),Wp("gggg",dp,lp),Wp("GGGGG",Op,ip),Wp("ggggg",Op,ip),wp(["gggg","ggggg","GGGG","GGGGG"],(function(e,o,p,t){o[t.substr(0,2)]=Lp(e)})),wp(["gg","GG"],(function(e,o,p,t){o[t]=fo.parseTwoDigitYear(e)})),Ko("Q",0,"Qo","quarter"),Wp("Q",rp),Bp("Q",(function(e,o){o[xp]=3*(Lp(e)-1)})),Ko("D",["DD",2],"Do","date"),Wp("D",ap,qp),Wp("DD",ap,cp),Wp("Do",(function(e,o){return e?o._dayOfMonthOrdinalParse||o._ordinalParse:o._dayOfMonthOrdinalParseLenient})),Bp(["D","DD"],Ip),Bp("Do",(function(e,o){o[Ip]=Lp(e.match(ap)[0])}));var Xn=jp("Date",!0);Ko("DDD",["DDDD",3],"DDDo","dayOfYear"),Wp("DDD",zp),Wp("DDDD",sp),Bp(["DDD","DDDD"],(function(e,o,p){p._dayOfYear=Lp(e)})),Ko("m",["mm",2],0,"minute"),Wp("m",ap,Rp),Wp("mm",ap,cp),Bp(["m","mm"],Pp);var Hn=jp("Minutes",!1);Ko("s",["ss",2],0,"second"),Wp("s",ap,Rp),Wp("ss",ap,cp),Bp(["s","ss"],Xp);var Zn,Vn,kn=jp("Seconds",!1);for(Ko("S",0,0,(function(){return~~(this.millisecond()/100)})),Ko(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),Ko(0,["SSS",3],0,"millisecond"),Ko(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),Ko(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),Ko(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),Ko(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),Ko(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),Ko(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Wp("S",zp,rp),Wp("SS",zp,cp),Wp("SSS",zp,sp),Zn="SSSS";Zn.length<=9;Zn+="S")Wp(Zn,hp);function Dn(e,o){o[Hp]=Lp(1e3*("0."+e))}for(Zn="S";Zn.length<=9;Zn+="S")Bp(Zn,Dn);Vn=jp("Milliseconds",!1),Ko("z",0,0,"zoneAbbr"),Ko("zz",0,0,"zoneName");var _n=Eo.prototype;function jn(e){return e}_n.add=un,_n.calendar=function(e,o){1===arguments.length&&(arguments[0]?qn(arguments[0])?(e=arguments[0],o=void 0):function(e){var o,p=qo(e)&&!Wo(e),t=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(o=0;op.valueOf():p.valueOf()9999?Qo(p,o?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Do(Date.prototype.toISOString)?o?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Qo(p,"Z")):Qo(p,o?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},_n.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,o,p,t="moment",n="";return this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",n="Z"),e="["+t+'("]',o=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p=n+'[")]',this.format(e+o+"-MM-DD[T]HH:mm:ss.SSS"+p)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(_n[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),_n.toJSON=function(){return this.isValid()?this.toISOString():null},_n.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},_n.unix=function(){return Math.floor(this.valueOf()/1e3)},_n.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},_n.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},_n.eraName=function(){var e,o,p,t=this.localeData().eras();for(e=0,o=t.length;ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},_n.isLocal=function(){return!!this.isValid()&&!this._isUTC},_n.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},_n.isUtc=an,_n.isUTC=an,_n.zoneAbbr=function(){return this._isUTC?"UTC":""},_n.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},_n.dates=Ho("dates accessor is deprecated. Use date instead.",Xn),_n.months=Ho("months accessor is deprecated. Use month instead",pt),_n.years=Ho("years accessor is deprecated. Use year instead",_p),_n.zone=Ho("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,o){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,o),this):-this.utcOffset()})),_n.isDSTShifted=Ho("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!vo(this._isDSTShifted))return this._isDSTShifted;var e,o={};return Io(o,this),(o=Yt(o))._a?(e=o._isUTC?Bo(o._a):$t(o._a),this._isDSTShifted=this.isValid()&&function(e,o){var p,t=Math.min(e.length,o.length),n=Math.abs(e.length-o.length),r=0;for(p=0;p0):this._isDSTShifted=!1,this._isDSTShifted}));var Fn=jo.prototype;function Un(e,o,p,t){var n=Tt(),r=Bo().set(t,o);return n[p](r,e)}function Yn(e,o,p){if(go(e)&&(o=e,e=void 0),e=e||"",null!=o)return Un(e,o,p,"month");var t,n=[];for(t=0;t<12;t++)n[t]=Un(e,t,p,"month");return n}function Gn(e,o,p,t){"boolean"==typeof e?(go(o)&&(p=o,o=void 0),o=o||""):(p=o=e,e=!1,go(o)&&(p=o,o=void 0),o=o||"");var n,r=Tt(),c=e?r._week.dow:0,s=[];if(null!=p)return Un(o,(p+c)%7,t,"day");for(n=0;n<7;n++)s[n]=Un(o,(n+c)%7,t,"day");return s}Fn.calendar=function(e,o,p){var t=this._calendar[e]||this._calendar.sameElse;return Do(t)?t.call(o,p):t},Fn.longDateFormat=function(e){var o=this._longDateFormat[e],p=this._longDateFormat[e.toUpperCase()];return o||!p?o:(this._longDateFormat[e]=p.match(Uo).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},Fn.invalidDate=function(){return this._invalidDate},Fn.ordinal=function(e){return this._ordinal.replace("%d",e)},Fn.preparse=jn,Fn.postformat=jn,Fn.relativeTime=function(e,o,p,t){var n=this._relativeTime[p];return Do(n)?n(e,o,p,t):n.replace(/%d/i,e)},Fn.pastFuture=function(e,o){var p=this._relativeTime[e>0?"future":"past"];return Do(p)?p(o):p.replace(/%s/i,o)},Fn.set=function(e){var o,p;for(p in e)Ro(e,p)&&(Do(o=e[p])?this[p]=o:this["_"+p]=o);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Fn.eras=function(e,o){var p,t,n,r=this._eras||Tt("en")._eras;for(p=0,t=r.length;p=0)return l[t]},Fn.erasConvertYear=function(e,o){var p=e.since<=e.until?1:-1;return void 0===o?fo(e.since).year():fo(e.since).year()+(o-e.offset)*p},Fn.erasAbbrRegex=function(e){return Ro(this,"_erasAbbrRegex")||xn.call(this),e?this._erasAbbrRegex:this._erasRegex},Fn.erasNameRegex=function(e){return Ro(this,"_erasNameRegex")||xn.call(this),e?this._erasNameRegex:this._erasRegex},Fn.erasNarrowRegex=function(e){return Ro(this,"_erasNarrowRegex")||xn.call(this),e?this._erasNarrowRegex:this._erasRegex},Fn.months=function(e,o){return e?mo(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Kp).test(o)?"format":"standalone"][e.month()]:mo(this._months)?this._months:this._months.standalone},Fn.monthsShort=function(e,o){return e?mo(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Kp.test(o)?"format":"standalone"][e.month()]:mo(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Fn.monthsParse=function(e,o,p){var t,n,r;if(this._monthsParseExact)return et.call(this,e,o,p);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),t=0;t<12;t++){if(n=Bo([2e3,t]),p&&!this._longMonthsParse[t]&&(this._longMonthsParse[t]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[t]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),p||this._monthsParse[t]||(r="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[t]=new RegExp(r.replace(".",""),"i")),p&&"MMMM"===o&&this._longMonthsParse[t].test(e))return t;if(p&&"MMM"===o&&this._shortMonthsParse[t].test(e))return t;if(!p&&this._monthsParse[t].test(e))return t}},Fn.monthsRegex=function(e){return this._monthsParseExact?(Ro(this,"_monthsRegex")||tt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(Ro(this,"_monthsRegex")||(this._monthsRegex=Jp),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Fn.monthsShortRegex=function(e){return this._monthsParseExact?(Ro(this,"_monthsRegex")||tt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(Ro(this,"_monthsShortRegex")||(this._monthsShortRegex=Qp),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Fn.week=function(e){return lt(e,this._week.dow,this._week.doy).week},Fn.firstDayOfYear=function(){return this._week.doy},Fn.firstDayOfWeek=function(){return this._week.dow},Fn.weekdays=function(e,o){var p=mo(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(o)?"format":"standalone"];return!0===e?at(p,this._week.dow):e?p[e.day()]:p},Fn.weekdaysMin=function(e){return!0===e?at(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Fn.weekdaysShort=function(e){return!0===e?at(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Fn.weekdaysParse=function(e,o,p){var t,n,r;if(this._weekdaysParseExact)return At.call(this,e,o,p);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),t=0;t<7;t++){if(n=Bo([2e3,1]).day(t),p&&!this._fullWeekdaysParse[t]&&(this._fullWeekdaysParse[t]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[t]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[t]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[t]||(r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[t]=new RegExp(r.replace(".",""),"i")),p&&"dddd"===o&&this._fullWeekdaysParse[t].test(e))return t;if(p&&"ddd"===o&&this._shortWeekdaysParse[t].test(e))return t;if(p&&"dd"===o&&this._minWeekdaysParse[t].test(e))return t;if(!p&&this._weekdaysParse[t].test(e))return t}},Fn.weekdaysRegex=function(e){return this._weekdaysParseExact?(Ro(this,"_weekdaysRegex")||ut.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Ro(this,"_weekdaysRegex")||(this._weekdaysRegex=dt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Fn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(Ro(this,"_weekdaysRegex")||ut.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ro(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ot),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Fn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(Ro(this,"_weekdaysRegex")||ut.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ro(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ht),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Fn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Fn.meridiem=function(e,o,p){return e>11?p?"pm":"PM":p?"am":"AM"},wt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var o=e%10;return e+(1===Lp(e%100/10)?"th":1===o?"st":2===o?"nd":3===o?"rd":"th")}}),fo.lang=Ho("moment.lang is deprecated. Use moment.locale instead.",wt),fo.langData=Ho("moment.langData is deprecated. Use moment.localeData instead.",Tt);var $n=Math.abs;function Kn(e,o,p,t){var n=zn(o,p);return e._milliseconds+=t*n._milliseconds,e._days+=t*n._days,e._months+=t*n._months,e._bubble()}function Qn(e){return e<0?Math.floor(e):Math.ceil(e)}function Jn(e){return 4800*e/146097}function er(e){return 146097*e/4800}function or(e){return function(){return this.as(e)}}var pr=or("ms"),tr=or("s"),nr=or("m"),rr=or("h"),cr=or("d"),sr=or("w"),lr=or("M"),ir=or("Q"),ar=or("y"),Mr=pr;function br(e){return function(){return this.isValid()?this._data[e]:NaN}}var zr=br("milliseconds"),dr=br("seconds"),Or=br("minutes"),hr=br("hours"),Ar=br("days"),ur=br("months"),fr=br("years");var mr=Math.round,qr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Rr(e,o,p,t,n){return n.relativeTime(o||1,!!p,e,t)}var Wr=Math.abs;function vr(e){return(e>0)-(e<0)||+e}function gr(){if(!this.isValid())return this.localeData().invalidDate();var e,o,p,t,n,r,c,s,l=Wr(this._milliseconds)/1e3,i=Wr(this._days),a=Wr(this._months),M=this.asSeconds();return M?(e=yp(l/60),o=yp(e/60),l%=60,e%=60,p=yp(a/12),a%=12,t=l?l.toFixed(3).replace(/\.?0+$/,""):"",n=M<0?"-":"",r=vr(this._months)!==vr(M)?"-":"",c=vr(this._days)!==vr(M)?"-":"",s=vr(this._milliseconds)!==vr(M)?"-":"",n+"P"+(p?r+p+"Y":"")+(a?r+a+"M":"")+(i?c+i+"D":"")+(o||e||l?"T":"")+(o?s+o+"H":"")+(e?s+e+"M":"")+(l?s+t+"S":"")):"P0D"}var yr=on.prototype;yr.isValid=function(){return this._isValid},yr.abs=function(){var e=this._data;return this._milliseconds=$n(this._milliseconds),this._days=$n(this._days),this._months=$n(this._months),e.milliseconds=$n(e.milliseconds),e.seconds=$n(e.seconds),e.minutes=$n(e.minutes),e.hours=$n(e.hours),e.months=$n(e.months),e.years=$n(e.years),this},yr.add=function(e,o){return Kn(this,e,o,1)},yr.subtract=function(e,o){return Kn(this,e,o,-1)},yr.as=function(e){if(!this.isValid())return NaN;var o,p,t=this._milliseconds;if("month"===(e=op(e))||"quarter"===e||"year"===e)switch(o=this._days+t/864e5,p=this._months+Jn(o),e){case"month":return p;case"quarter":return p/3;case"year":return p/12}else switch(o=this._days+Math.round(er(this._months)),e){case"week":return o/7+t/6048e5;case"day":return o+t/864e5;case"hour":return 24*o+t/36e5;case"minute":return 1440*o+t/6e4;case"second":return 86400*o+t/1e3;case"millisecond":return Math.floor(864e5*o)+t;default:throw new Error("Unknown unit "+e)}},yr.asMilliseconds=pr,yr.asSeconds=tr,yr.asMinutes=nr,yr.asHours=rr,yr.asDays=cr,yr.asWeeks=sr,yr.asMonths=lr,yr.asQuarters=ir,yr.asYears=ar,yr.valueOf=Mr,yr._bubble=function(){var e,o,p,t,n,r=this._milliseconds,c=this._days,s=this._months,l=this._data;return r>=0&&c>=0&&s>=0||r<=0&&c<=0&&s<=0||(r+=864e5*Qn(er(s)+c),c=0,s=0),l.milliseconds=r%1e3,e=yp(r/1e3),l.seconds=e%60,o=yp(e/60),l.minutes=o%60,p=yp(o/60),l.hours=p%24,c+=yp(p/24),s+=n=yp(Jn(c)),c-=Qn(er(n)),t=yp(s/12),s%=12,l.days=c,l.months=s,l.years=t,this},yr.clone=function(){return zn(this)},yr.get=function(e){return e=op(e),this.isValid()?this[e+"s"]():NaN},yr.milliseconds=zr,yr.seconds=dr,yr.minutes=Or,yr.hours=hr,yr.days=Ar,yr.weeks=function(){return yp(this.days()/7)},yr.months=ur,yr.years=fr,yr.humanize=function(e,o){if(!this.isValid())return this.localeData().invalidDate();var p,t,n=!1,r=qr;return"object"==typeof e&&(o=e,e=!1),"boolean"==typeof e&&(n=e),"object"==typeof o&&(r=Object.assign({},qr,o),null!=o.s&&null==o.ss&&(r.ss=o.s-1)),t=function(e,o,p,t){var n=zn(e).abs(),r=mr(n.as("s")),c=mr(n.as("m")),s=mr(n.as("h")),l=mr(n.as("d")),i=mr(n.as("M")),a=mr(n.as("w")),M=mr(n.as("y")),b=r<=p.ss&&["s",r]||r0,b[4]=t,Rr.apply(null,b)}(this,!n,r,p=this.localeData()),n&&(t=p.pastFuture(+this,t)),p.postformat(t)},yr.toISOString=gr,yr.toString=gr,yr.toJSON=gr,yr.locale=Wn,yr.localeData=gn,yr.toIsoString=Ho("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",gr),yr.lang=vn,Ko("X",0,0,"unix"),Ko("x",0,0,"valueOf"),Wp("x",Ap),Wp("X",/[+-]?\d+(\.\d{1,3})?/),Bp("X",(function(e,o,p){p._d=new Date(1e3*parseFloat(e))})),Bp("x",(function(e,o,p){p._d=new Date(Lp(e))})), //! moment.js fo.version="2.30.1",Oo=$t,fo.fn=_n,fo.min=function(){return Jt("isBefore",[].slice.call(arguments,0))},fo.max=function(){return Jt("isAfter",[].slice.call(arguments,0))},fo.now=function(){return Date.now?Date.now():+new Date},fo.utc=Bo,fo.unix=function(e){return $t(1e3*e)},fo.months=function(e,o){return Yn(e,o,"months")},fo.isDate=yo,fo.locale=wt,fo.invalid=To,fo.duration=zn,fo.isMoment=Po,fo.weekdays=function(e,o,p){return Gn(e,o,p,"weekdays")},fo.parseZone=function(){return $t.apply(null,arguments).parseZone()},fo.localeData=Tt,fo.isDuration=pn,fo.monthsShort=function(e,o){return Yn(e,o,"monthsShort")},fo.weekdaysMin=function(e,o,p){return Gn(e,o,p,"weekdaysMin")},fo.defineLocale=Ct,fo.updateLocale=function(e,o){if(null!=o){var p,t,n=vt;null!=gt[e]&&null!=gt[e].parentLocale?gt[e].set(_o(gt[e]._config,o)):(null!=(t=Bt(e))&&(n=t._config),o=_o(n,o),null==t&&(o.abbr=e),(p=new jo(o)).parentLocale=gt[e],gt[e]=p),wt(e)}else null!=gt[e]&&(null!=gt[e].parentLocale?(gt[e]=gt[e].parentLocale,e===wt()&&wt(e)):null!=gt[e]&&delete gt[e]);return gt[e]},fo.locales=function(){return Zo(gt)},fo.weekdaysShort=function(e,o,p){return Gn(e,o,p,"weekdaysShort")},fo.normalizeUnits=op,fo.relativeTimeRounding=function(e){return void 0===e?mr:"function"==typeof e&&(mr=e,!0)},fo.relativeTimeThreshold=function(e,o){return void 0!==qr[e]&&(void 0===o?qr[e]:(qr[e]=o,"s"===e&&(qr.ss=o-1),!0))},fo.calendarFormat=function(e,o){var p=e.diff(o,"days",!0);return p<-6?"sameElse":p<-1?"lastWeek":p<0?"lastDay":p<1?"sameDay":p<2?"nextDay":p<7?"nextWeek":"sameElse"},fo.prototype=_n,fo.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Lr=q(Object.freeze(Object.defineProperty({__proto__:null,default:fo},Symbol.toStringTag,{value:"Module"})));var Nr,Br=uo.exports;function wr(){return Nr||(Nr=1,function(o){ //! moment-timezone.js @@ -14,7 +14,7 @@ var p,t;p=Br,t=function(o){void 0===o.version&&o.default&&(o=o.default);var p,t= }`,CT={count:E.number,countUntil:E.number,children:E.element,type:E.oneOf(["count","notification"]),standalone:E.bool,pulse:E.bool,variant:E.oneOf(["primary","success","danger","inverse"]),placement:Re.placement,display:E.oneOf(["inline-block","block"]),margin:D.spacing,elementRef:E.func,formatOverflowText:E.func,formatOutput:E.func,as:E.elementType};var TT,ST,xT,IT;let ET=(TT=K(),ST=_(((e,o)=>{const p=o.type,t=o.variant,n=o.placement,r=void 0===n?"":n,c=o.standalone,s=o.pulse,l=r.indexOf("top")>-1,i=r.indexOf("bottom")>-1,a=r.indexOf("start")>-1,M=r.indexOf("end")>-1,b=r.indexOf("center")>-1,z={danger:{badge:{color:e.color,backgroundColor:e.colorDanger},pulseBorder:{borderColor:e.colorDanger}},success:{badge:{color:e.color,backgroundColor:e.colorSuccess},pulseBorder:{borderColor:e.colorSuccess}},primary:{badge:{color:e.color,backgroundColor:e.colorPrimary},pulseBorder:{borderColor:e.colorPrimary}},inverse:{badge:{color:e.colorInverse,backgroundColor:e.color},pulseBorder:{borderColor:e.color}}},d={count:{...l&&{top:`calc(-1 * ${e.countOffset})`},...i&&{bottom:`calc(-1 * ${e.countOffset})`},...a&&{insetInlineStart:`calc(-1 * ${e.countOffset})`,insetInlineEnd:"auto"},...M&&{insetInlineEnd:`calc(-1 * ${e.countOffset})`,insetInlineStart:"auto"},...b&&{...(M||a)&&{top:`calc(50% - (${e.size} / 2))`},...a&&{insetInlineStart:"auto",insetInlineEnd:`calc(100% - ${e.countOffset})`},...M&&{insetInlineEnd:"auto",insetInlineStart:`calc(100% - ${e.countOffset})`}}},notification:{...l&&{top:e.notificationOffset},...i&&{bottom:e.notificationOffset},...a&&{insetInlineStart:e.notificationOffset,insetInlineEnd:"auto"},...M&&{insetInlineEnd:e.notificationOffset,insetInlineStart:"auto"},...b&&{...(M||a)&&{top:`calc(50% - (${e.sizeNotification} / 2))`},...a&&{insetInlineStart:`calc(-1 * ${e.sizeNotification} / 2)`,insetInlineEnd:"auto"},...M&&{insetInlineEnd:`calc(-1 * ${e.sizeNotification} / 2)`,insetInlineStart:"auto"}}}},O={count:{lineHeight:e.size,minWidth:e.size,paddingInlineStart:e.padding,paddingInlineEnd:e.padding},notification:{width:e.sizeNotification,height:e.sizeNotification}};return{badge:{label:"badge",fontFamily:e.fontFamily,fontWeight:e.fontWeight,boxSizing:"border-box",pointerEvents:"none",textAlign:"center",fontSize:e.fontSize,whiteSpace:"nowrap",borderRadius:e.borderRadius,...z[t].badge,...s&&{position:"relative","&::before":{content:'""',width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",borderRadius:e.borderRadius,position:"absolute",top:"-0.25rem",insetInlineEnd:"auto",insetInlineStart:"-0.25rem",boxSizing:"border-box",border:`${e.pulseBorderThickness} solid`,opacity:0,transform:"scale(0.75)",animationName:wT,animationDuration:"1s",animationIterationCount:"4",animationDirection:"alternate",...z[t].pulseBorder}},...O[p],...!c&&{position:"absolute",zIndex:e.notificationZIndex,...d[p]}},wrapper:{label:"badge__wrapper",position:"relative",boxSizing:"border-box",svg:{display:"block"}}}}),(e=>{var o,p,t,n,r;const c=e.borders,s=e.colors,l=e.spacing,i=e.typography,a=e.stacking,M=e.key,b={canvas:{colorPrimary:e["ic-brand-primary"]}};return{...{fontFamily:null==i?void 0:i.fontFamily,fontWeight:null==i?void 0:i.fontWeightNormal,color:null==s||null===(o=s.contrasts)||void 0===o?void 0:o.white1010,fontSize:null==i?void 0:i.fontSizeXSmall,colorDanger:null==s||null===(p=s.contrasts)||void 0===p?void 0:p.red4570,colorSuccess:null==s||null===(t=s.contrasts)||void 0===t?void 0:t.green4570,colorPrimary:null==s||null===(n=s.contrasts)||void 0===n?void 0:n.blue4570,colorInverse:null==s||null===(r=s.contrasts)||void 0===r?void 0:r.grey4570,size:"1.25rem",countOffset:"0.5rem",notificationOffset:"0.125rem",notificationZIndex:null==a?void 0:a.above,sizeNotification:null==l?void 0:l.small,borderRadius:"999rem",padding:null==l?void 0:l.xxSmall,pulseBorderThickness:null==c?void 0:c.widthMedium},...b[M]}})),TT(xT=ST(xT=U()((IT=class extends u.Component{constructor(e){super(e),this._defaultId=void 0,this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this._defaultId=this.props.deterministicId()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}countOverflow(){const e=this.props,o=e.count,p=e.countUntil;return p&&o&&p>1&&o>=p}renderOutput(){const e=this.props,o=e.count,p=e.countUntil,t=e.formatOverflowText,n=e.formatOutput,r=e.type;let c=(o||"").toString();return o&&p&&t&&"count"===r&&this.countOverflow()&&(c=t(o,p)),"function"==typeof n?n(c):"count"===r?c:null}renderBadge(){const e=this.props,o=e.count,p=e.margin,t=e.standalone,n=e.type,r=e.styles;return Y(J,Object.assign({margin:t?p:"none",css:null==r?void 0:r.badge,title:"count"===n&&this.countOverflow()?null==o?void 0:o.toString():"",id:t?void 0:this._defaultId,display:t?"inline-block":"block"},t&&{elementRef:this.handleRef}),this.renderOutput())}renderChildren(){return u.Children.map(this.props.children,(e=>ye(e,{"aria-describedby":this._defaultId})))}render(){const e=this.props,o=e.margin,p=e.standalone,t=e.display,n=e.as,r=e.styles;return p?this.renderBadge():Y(J,{as:n,margin:o,elementRef:this.handleRef,css:null==r?void 0:r.wrapper,display:t},this.renderChildren(),this.renderBadge())}},IT.displayName="Badge",IT.componentId="Badge",IT.propTypes=CT,IT.allowedProps=["count","countUntil","children","type","standalone","pulse","variant","placement","display","margin","elementRef","formatOverflowText","formatOutput","as"],IT.defaultProps={standalone:!1,type:"count",variant:"primary",display:"inline-block",pulse:!1,placement:"top end",elementRef:()=>{},formatOverflowText:(e,o)=>o-1+" +"},xT=IT))||xT)||xT)||xT);const PT={children:E.node.isRequired,title:E.node,description:E.oneOfType([E.string,E.node]),alignContent:E.oneOf(["top","center"]),margin:D.spacing,size:E.oneOf(["small","medium","large"]),elementRef:E.func};var XT,HT,ZT;let VT=(XT=_(((e,o)=>{const p=o.alignContent,t=o.size,n={display:"flex",background:e.background,margin:0,padding:0,fontFamily:e.fontFamily,...{top:{alignItems:"flex-start"},center:{alignItems:"center"}}[p]},r={color:e.color,margin:0,padding:0};return{byline:{label:"byline",...n,"&:is(figure)":n,"&:-webkit-any(figure)":n},figure:{label:"byline__figure",marginInlineStart:0,marginInlineEnd:e.figureMargin},caption:{label:"byline__caption",...r,"&:is(figcaption)":r,"&:-webkit-any(figcaption)":r},title:{label:"byline__title",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",display:"block",margin:e.titleMargin,fontSize:e.titleFontSize,fontWeight:e.titleFontWeight,lineHeight:e.titleLineHeight},description:{label:"byline__description",fontSize:e.descriptionFontSize,lineHeight:e.descriptionLineHeight,fontWeight:e.descriptionFontWeight},maxWidth:t&&e[t]}}),(e=>{var o,p;const t=e.colors,n=e.spacing,r=e.typography,c=e.breakpoints,s=e.key,l={canvas:{color:e["ic-brand-font-color-dark"]}};return{...{fontFamily:null==r?void 0:r.fontFamily,background:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.white1010,color:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.grey125125,figureMargin:null==n?void 0:n.small,titleMargin:`0 0 ${null==n?void 0:n.xSmall} 0`,titleFontSize:null==r?void 0:r.fontSizeLarge,titleFontWeight:null==r?void 0:r.fontWeightNormal,titleLineHeight:null==r?void 0:r.lineHeightFit,descriptionFontSize:null==r?void 0:r.fontSizeMedium,descriptionFontWeight:null==r?void 0:r.fontWeightNormal,descriptionLineHeight:null==r?void 0:r.lineHeightCondensed,small:null==c?void 0:c.small,medium:null==c?void 0:c.medium,large:null==c?void 0:c.large},...l[s]}})),XT((ZT=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){var o,p,t,n,r,c;const s=J.omitViewProps(pe(this.props,e.allowedProps),e);return Y(J,Object.assign({},s,{elementRef:this.handleRef,css:null===(o=this.props.styles)||void 0===o?void 0:o.byline,as:"figure",margin:this.props.margin,maxWidth:null===(p=this.props.styles)||void 0===p?void 0:p.maxWidth}),Y("div",{css:null===(t=this.props.styles)||void 0===t?void 0:t.figure},this.props.children),Y("figcaption",{css:null===(n=this.props.styles)||void 0===n?void 0:n.caption},this.props.title&&Y("span",{css:null===(r=this.props.styles)||void 0===r?void 0:r.title},this.props.title),this.props.description&&Y("div",{css:null===(c=this.props.styles)||void 0===c?void 0:c.description},this.props.description)))}},ZT.displayName="Byline",ZT.componentId="Byline",ZT.propTypes=PT,ZT.allowedProps=["alignContent","children","description","elementRef","margin","size","title"],ZT.defaultProps={alignContent:"center"},HT=ZT))||HT);const kT={children:E.oneOfType([E.node,E.func]),date:Vr.iso8601.isRequired,label:E.string.isRequired,interaction:E.oneOf(["enabled","disabled"]),isSelected:E.bool,isToday:E.bool,isOutsideMonth:E.bool,onClick:E.func,onKeyDown:E.func,elementRef:E.func,as:E.elementType},DT=["children","label","interaction","isOutsideMonth","isSelected","isToday","onClick","onKeyDown","as","styles"];var _T,jT,FT;let UT=(_T=_(((e,o,p)=>{const t=o.isOutsideMonth,n=o.isSelected,r=o.isToday,c=p.isDisabled;return{calendarDay:{label:"calendarDay",padding:0},day:{label:"calendarDay__day",display:"flex",alignItems:"center",justifyContent:"center",background:e.background,color:e.color,fontSize:e.fontSize,textDecoration:"none",lineHeight:1,height:e.height,minWidth:e.minWidth,border:"none",margin:0,...t&&{color:e.outsideMonthColor},...n&&{background:e.selectedBackground,borderRadius:e.selectedBorderRadius,color:e.selectedColor},...r&&!n&&{background:e.todayBackground,borderRadius:e.todayBorderRadius,color:e.todayColor},...c&&{opacity:.5}}}}),(e=>{var o,p,t,n,r,c,s;const l=e.borders,i=e.colors,a=e.typography,M=e.spacing,b=e.forms,z=e.key,d={canvas:{color:e["ic-brand-font-color-dark"],todayBackground:e["ic-brand-primary"]}};return{...{color:null==i||null===(o=i.contrasts)||void 0===o?void 0:o.grey125125,background:null==i||null===(p=i.contrasts)||void 0===p?void 0:p.white1010,fontSize:null==a?void 0:a.fontSizeMedium,padding:null==M?void 0:M.xxSmall,height:null==b?void 0:b.inputHeightSmall,minWidth:null==b?void 0:b.inputHeightSmall,outsideMonthColor:null==i||null===(t=i.contrasts)||void 0===t?void 0:t.grey4570,selectedBackground:null==i||null===(n=i.contrasts)||void 0===n?void 0:n.green4570,selectedColor:null==i||null===(r=i.contrasts)||void 0===r?void 0:r.white1010,selectedBorderRadius:null==l?void 0:l.radiusMedium,todayBackground:null==i||null===(c=i.contrasts)||void 0===c?void 0:c.blue4570,todayColor:null==i||null===(s=i.contrasts)||void 0===s?void 0:s.white1010,todayBorderRadius:null==b?void 0:b.inputHeightSmall},...d[z]}})),_T(jT=U()((FT=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleClick=e=>{const o=this.props,p=o.onClick,t=o.date;"function"==typeof p&&p(e,{date:t})},this.handleKeyDown=e=>{const o=this.props,p=o.onKeyDown,t=o.date;"function"==typeof p&&p(e,{date:t})},this.handleElementRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStylesVariables)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStylesVariables)}get makeStylesVariables(){return{isDisabled:this.isDisabled}}get isDisabled(){return"disabled"===this.props.interaction}get elementType(){return this.props.as||X(e,this.props)}shouldApplyAriaSelected(){const e=this.props.role;return!!e&&["option","gridcell"].indexOf(e)>-1}render(){const o=this.props,p=o.children,t=o.label;o.interaction,o.isOutsideMonth;const n=o.isSelected,r=o.isToday,c=o.onClick,s=o.onKeyDown;o.as;const l=o.styles,i=P(o,DT),a=this.elementType,M=this.isDisabled,b=J.omitViewProps(pe(i,e.allowedProps),e);return Y(J,Object.assign({},b,{as:a,css:null==l?void 0:l.calendarDay,display:"inline-block",margin:"xxx-small",borderWidth:"none",borderColor:"transparent",background:"transparent",cursor:"button"===a||"a"===a?M?"not-allowed":"pointer":"auto",disabled:M,"aria-current":r?"date":void 0,"aria-selected":this.shouldApplyAriaSelected()?n?"true":"false":void 0,onClick:c&&this.handleClick,onKeyDown:s&&this.handleKeyDown,elementRef:this.handleElementRef}),Y("span",{css:null==l?void 0:l.day},Y(Qr,{alt:t},$(p))))}},FT.displayName="Day",FT.componentId="Calendar.Day",FT.propTypes=kT,FT.allowedProps=["children","date","label","interaction","isSelected","isToday","isOutsideMonth","onClick","onKeyDown","elementRef","as"],FT.defaultProps={interaction:"enabled",isSelected:!1,isToday:!1,isOutsideMonth:!1},jT=FT))||jT)||jT);const YT={as:E.elementType,children:Le.oneOf([UT]),currentDate:E.string,disabledDates:E.oneOfType([E.array,E.func]),locale:E.string,onDateSelected:E.func,onRequestRenderNextMonth:E.func,onRequestRenderPrevMonth:E.func,renderNavigationLabel:E.oneOfType([E.node,E.func]),renderNextMonthButton:E.oneOfType([E.node,E.func]),renderPrevMonthButton:E.oneOfType([E.node,E.func]),renderWeekdayLabels:E.arrayOf(E.oneOfType([E.node,E.func])),role:E.oneOf(["table","listbox"]),selectedDate:E.string,timezone:E.string,visibleMonth:E.string,withYearPicker:E.object};var GT,$T,KT,QT,JT;let eS=(GT=_(((e,o)=>{const p=o.withYearPicker;return{navigation:{label:"calendar__navigation",textAlign:"center",color:e.color,background:e.background,fontFamily:e.fontFamily,fontSize:e.fontSize,fontWeight:e.fontWeight,marginBottom:p?e.navWithYearMargin:e.navMargin},navigationWithButtons:{label:"calendar__navigation--withButtons",display:"flex",alignItems:"center",justifyContent:"space-between"},weekdayHeader:{label:"calendar__weekdayHeader",textAlign:"center",maxWidth:e.maxHeaderWidth},yearPicker:{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:e.yearPickerMargin}}}),(e=>{var o,p;const t=e.colors,n=e.typography,r=e.spacing,c=e.key,s={canvas:{color:e["ic-brand-font-color-dark"]}};return{...{fontSize:null==n?void 0:n.fontSizeMedium,fontFamily:null==n?void 0:n.fontFamily,fontWeight:null==n?void 0:n.fontWeightNormal,color:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.grey125125,background:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.white1010,navMargin:null==r?void 0:r.small,navWithYearMargin:null==r?void 0:r.xSmall,yearPickerMargin:null==r?void 0:r.mediumSmall,maxHeaderWidth:null==r?void 0:r.medium},...s[c]}})),GT($T=U()((KT=class e extends u.Component{constructor(e){super(e),this.ref=null,this._weekdayHeaderIds=(this.props.renderWeekdayLabels||this.defaultWeekdays).reduce(((e,o,p)=>({...e,[p]:Ne(`weekday-header-${p}`)})),{}),this.handleRef=e=>{this.ref=e},this.calculateState=(e,o,p)=>{const t=this.props.visibleMonth||p;return{visibleMonth:t?Hr.parse(t,e,o):Hr.now(e,o),today:p?Hr.parse(p,e,o):Hr.now(e,o)}},this.renderMonthNavigationButtons=()=>{const e=this.props,o=e.renderNextMonthButton,p=e.renderPrevMonthButton;return{prevButton:p?$(p):QT||(QT=Y(ao,{size:"small",withBackground:!1,withBorder:!1,renderIcon:Y(Be,{color:"primary"}),screenReaderLabel:"Previous month"})),nextButton:o?$(o):JT||(JT=Y(ao,{size:"small",withBackground:!1,withBorder:!1,renderIcon:Y(we,{color:"primary"}),screenReaderLabel:"Next month"}))}},this.handleMonthChange=e=>o=>{const p=this.props,t=p.onRequestRenderNextMonth,n=p.onRequestRenderPrevMonth,r=this.state.visibleMonth.clone();if("prev"===e){if(!this.hasPrevMonth)return;if(n)return void n(o,r.subtract({months:1}).format("YYYY-MM"));r.subtract({months:1})}else{if(!this.hasNextMonth)return;if(t)return void t(o,r.add({months:1}).format("YYYY-MM"));r.add({months:1})}this.setState({visibleMonth:r})},this.handleYearChange=(e,o)=>{const p=this.props.withYearPicker,t=this.state.visibleMonth,n=Number(Hr.parse(o,this.locale(),this.timezone()).locale("en").format("YYYY")),r=t.clone();null!=p&&p.onRequestYearChange?p.onRequestYearChange(e,n):(r.year(n),this.setState({visibleMonth:r}))},this.handleDayClick=(e,{date:o})=>{if(this.props.onDateSelected){const p=Hr.parse(o,this.locale(),this.timezone());this.props.onDateSelected(p.toISOString(),p,e)}},this.state=this.calculateState(this.locale(),this.timezone(),e.currentDate)}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(e){var o,p;null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p);(e.locale!==this.props.locale||e.timezone!==this.props.timezone||e.visibleMonth!==this.props.visibleMonth)&&this.setState((()=>({...this.calculateState(this.locale(),this.timezone(),this.props.currentDate)})))}get role(){return"listbox"===this.props.role?this.props.role:void 0}get hasPrevMonth(){const e=Number(this.state.visibleMonth.clone().locale("en").subtract({months:1}).format("YYYY"));return!this.props.withYearPicker||this.props.withYearPicker&&e>=this.props.withYearPicker.startYear}get hasNextMonth(){const e=Number(this.state.visibleMonth.clone().locale("en").add({months:1}).format("YYYY"));return!this.props.withYearPicker||this.props.withYearPicker&&e<=this.props.withYearPicker.endYear}renderHeader(){const e=this.props,o=e.renderNavigationLabel,t=e.styles,n=e.withYearPicker,r=this.state.visibleMonth,c=this.renderMonthNavigationButtons(),s=c.prevButton,l=c.nextButton,i=(e,o)=>ye(e,{onClick:Ce(e.props.onClick,o)}),a=[null==t?void 0:t.navigation,...s||l?[null==t?void 0:t.navigationWithButtons]:[]],M=[];if(n){const e=n.startYear;for(let o=n.endYear;o>=e;o--)M.push(Hr.parse(o.toString(),this.locale(),this.timezone()).format("YYYY"))}return Y("div",null,Y("div",{css:a},s&&i(s,this.handleMonthChange("prev")),o?$(o):Y("span",null,Y("div",null,r.format("MMMM")),n?null:Y("div",null,r.format("YYYY"))),l&&i(l,this.handleMonthChange("next"))),n?Y("div",{css:null==t?void 0:t.yearPicker},Y(p,{width:"90px",renderLabel:"",placeholder:"--",assistiveText:n.screenReaderLabel,value:r.format("YYYY"),onChange:(e,{value:o})=>this.handleYearChange(e,`${o}`)},M.map((e=>Y(p.Option,{key:e,id:`opt-${e}`,value:e},`${e}`))))):null)}renderBody(){return Y("table",{role:this.role},Y("thead",null,this.renderWeekdayHeaders()),Y("tbody",null,this.renderDays()))}renderWeekdayHeaders(){const e=this.props.styles,o=this.props.renderWeekdayLabels||this.defaultWeekdays,p=o.length;return Q(7===p,`[Calendar] \`renderWeekdayLabels\` should be an array with 7 labels (one for each weekday). ${p} provided.`),Y("tr",null,o.map(((o,p)=>Y("th",{key:p,scope:"col",css:null==e?void 0:e.weekdayHeader,id:this._weekdayHeaderIds[p]},$(o)))))}get defaultWeekdays(){const e=Hr.getLocalDayNamesOfTheWeek(this.locale(),"short"),o=Hr.getLocalDayNamesOfTheWeek(this.locale(),"long");return[Y(Qr,{key:1,alt:o[0]},e[0]),Y(Qr,{key:2,alt:o[1]},e[1]),Y(Qr,{key:3,alt:o[2]},e[2]),Y(Qr,{key:4,alt:o[3]},e[3]),Y(Qr,{key:5,alt:o[4]},e[4]),Y(Qr,{key:6,alt:o[5]},e[5]),Y(Qr,{key:7,alt:o[6]},e[6])]}renderDays(){const o=this.props.children,p=u.Children.toArray(o||this.renderDefaultdays()),t=p.length,n="listbox"===this.role?"presentation":void 0;return Q(t===e.DAY_COUNT,`[Calendar] should have exactly ${e.DAY_COUNT} children. ${t} provided.`),p.reduce(((e,o,p)=>{const t=Math.floor(p/7);return e[t]||e.push([]),e[t].push(o),e}),[]).map((e=>Y("tr",{key:`row${e[0].props.date}`,role:n},e.map(((e,o)=>Y("td",{key:e.props.date,role:n},"presentation"===n?ye(e,{"aria-describedby":this._weekdayHeaderIds[o]}):e))))))}locale(){return this.props.locale?this.props.locale:this.context&&this.context.locale?this.context.locale:Dr.browserLocale()}timezone(){return this.props.timezone?this.props.timezone:this.context&&this.context.timezone?this.context.timezone:Hr.browserTimeZone()}isDisabledDate(e){const o=this.props.disabledDates;if(!o)return!1;if(Array.isArray(o)){for(const p of o)if(e.isSame(p,"day"))return!0;return!1}return o(e.toISOString())}renderDefaultdays(){const o=this.props.selectedDate,p=this.state,t=p.visibleMonth,n=p.today,r=Hr.getFirstDayOfWeek(t.clone().startOf("month")),c=[];for(let s=0;s{const r=p.toISOString();return Y(e.Day,{key:r,date:r,isSelected:!!o&&p.isSame(o,"day"),isToday:p.isSame(n,"day"),isOutsideMonth:!p.isSame(t,"month"),label:p.format("D MMMM YYYY"),onClick:this.handleDayClick,interaction:this.isDisabledDate(p)?"disabled":"enabled"},p.format("DD"))}))}render(){const o=J.omitViewProps(pe(this.props,e.allowedProps),e);return Y(J,Object.assign({},o,{as:this.props.as,display:"inline-block",padding:"small",background:"primary",elementRef:this.handleRef}),this.renderHeader(),this.renderBody())}},KT.displayName="Calendar",KT.componentId="Calendar",KT.contextType=bo,KT.Day=UT,KT.DAY_COUNT=42,KT.propTypes=YT,KT.allowedProps=["as","children","currentDate","disabledDates","locale","onDateSelected","onRequestRenderNextMonth","onRequestRenderPrevMonth","renderNavigationLabel","renderNextMonthButton","renderPrevMonthButton","renderWeekdayLabels","role","selectedDate","timezone","visibleMonth"],KT.defaultProps={as:"span",role:"table"},$T=KT))||$T)||$T);const oS={children:E.node.isRequired,checked:E.bool,focused:E.bool,hovered:E.bool,size:E.oneOf(["small","medium","large"]),indeterminate:E.bool};var pS,tS,nS,rS,cS;let sS=(pS=_(((e,o)=>{const p=o.size,t=o.checked,n=o.focused,r=o.hovered,c=o.indeterminate,s=t||c,l={small:{label:{fontSize:e.labelFontSizeSmall},facade:{fontSize:e.iconSizeSmall,width:e.facadeSizeSmall,height:e.facadeSizeSmall}},medium:{label:{fontSize:e.labelFontSizeMedium},facade:{fontSize:e.iconSizeMedium,width:e.facadeSizeMedium,height:e.facadeSizeMedium}},large:{label:{fontSize:e.labelFontSizeLarge},facade:{fontSize:e.iconSizeLarge,width:e.facadeSizeLarge,height:e.facadeSizeLarge}}};return{checkboxFacade:{label:"checkboxFacade",display:"flex",alignItems:"flex-start"},facade:{label:"checkboxFacade__facade",color:e.color,background:e.background,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",flexShrink:0,transition:"all 0.2s",border:`${e.borderWidth} solid ${e.borderColor}`,borderRadius:e.borderRadius,marginInlineEnd:e.marginRight,marginInlineStart:"0",padding:e.padding,...l[p].facade,"&::before":{content:'""',position:"absolute",top:"-0.3125rem",bottom:"-0.3125rem",left:"-0.3125rem",right:"-0.3125rem",boxSizing:"border-box",borderRadius:`calc(${e.borderRadius} * 1.5)`,border:`${e.focusBorderWidth} ${e.focusBorderStyle} ${e.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none",...n&&{transform:"scale(1)",opacity:1}},...s&&{background:e.checkedBackground,borderColor:e.checkedBorderColor},...r&&{borderColor:e.hoverBorderColor}},label:{label:"checkboxFacade__label",flex:"1 1 auto",minWidth:"0.0625rem",color:e.labelColor,fontFamily:e.labelFontFamily,fontWeight:e.labelFontWeight,lineHeight:e.labelLineHeight,...l[p].label,...s&&{color:e.checkedLabelColor}}}}),(e=>{var o,p,t,n,r,c,s,l,i;const a=e.colors,M=e.borders,b=e.spacing,z=e.typography,d=e.key,O={canvas:{focusBorderColor:e["ic-brand-primary"],labelColor:e["ic-brand-font-color-dark"],checkedLabelColor:e["ic-brand-font-color-dark"],checkedBackground:e["ic-brand-font-color-dark"],checkedBorderColor:e["ic-brand-font-color-dark"],hoverBorderColor:e["ic-brand-font-color-dark"]}};return{...{color:null==a||null===(o=a.contrasts)||void 0===o?void 0:o.white1010,borderWidth:null==M?void 0:M.widthSmall,borderColor:null==a||null===(p=a.contrasts)||void 0===p?void 0:p.grey1214,borderRadius:null==M?void 0:M.radiusMedium,background:null==a||null===(t=a.contrasts)||void 0===t?void 0:t.white1010,marginRight:null==b?void 0:b.xSmall,padding:null==b?void 0:b.xxxSmall,checkedBackground:null==a||null===(n=a.contrasts)||void 0===n?void 0:n.grey125125,checkedBorderColor:null==a||null===(r=a.contrasts)||void 0===r?void 0:r.grey125125,hoverBorderColor:null==a||null===(c=a.contrasts)||void 0===c?void 0:c.grey125125,focusBorderColor:null==a||null===(s=a.contrasts)||void 0===s?void 0:s.blue4570,focusBorderWidth:null==M?void 0:M.widthMedium,focusBorderStyle:null==M?void 0:M.style,labelColor:null==a||null===(l=a.contrasts)||void 0===l?void 0:l.grey125125,checkedLabelColor:null==a||null===(i=a.contrasts)||void 0===i?void 0:i.grey125125,labelFontFamily:null==z?void 0:z.fontFamily,labelFontWeight:null==z?void 0:z.fontWeightNormal,labelLineHeight:null==z?void 0:z.lineHeightCondensed,facadeSizeSmall:"1rem",facadeSizeMedium:"1.25rem",facadeSizeLarge:"1.75rem",labelFontSizeSmall:null==z?void 0:z.fontSizeSmall,labelFontSizeMedium:null==z?void 0:z.fontSizeMedium,labelFontSizeLarge:null==z?void 0:z.fontSizeLarge,iconSizeSmall:"0.625rem",iconSizeMedium:"0.75rem",iconSizeLarge:"1rem"},...O[d]}})),pS(((nS=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}renderIcon(){return this.props.indeterminate?rS||(rS=Y(V,{viewBox:"0 0 1920 1920",inline:!1},Y("rect",{x:"140",y:"820",width:"1640",height:"280"}))):this.props.checked?cS||(cS=Y(Cy,{inline:!1})):null}render(){const e=this.props,o=e.children,p=e.styles;return Y("span",{css:null==p?void 0:p.checkboxFacade,ref:this.handleRef},Y("span",{css:null==p?void 0:p.facade,"aria-hidden":"true"},this.renderIcon()),Y("span",{css:null==p?void 0:p.label},o))}}).displayName="CheckboxFacade",nS.componentId="CheckboxFacade",nS.propTypes=oS,nS.allowedProps=["children","checked","focused","hovered","size","indeterminate"],nS.defaultProps={checked:!1,focused:!1,hovered:!1,size:"medium",indeterminate:!1},tS=nS))||tS);const lS={children:E.node.isRequired,checked:E.bool,disabled:E.bool,readOnly:E.bool,focused:E.bool,size:E.oneOf(["small","medium","large"]),labelPlacement:E.oneOf(["top","start","end"])};var iS,aS,MS;let bS=(iS=_(((e,o)=>{const p=o.size,t=o.checked,n=o.focused,r=o.labelPlacement,c={start:{facade:{marginInlineEnd:"0",marginInlineStart:e.marginStart},label:{textAlign:"end"}},end:{facade:{marginInlineEnd:e.marginEnd,marginInlineStart:"0"},label:{}},top:{facade:{marginTop:e.marginVertical},label:{display:"block"}}},s={small:{fontSize:e.labelFontSizeSmall},medium:{fontSize:e.labelFontSizeMedium},large:{fontSize:e.labelFontSizeLarge}};return{toggleFacade:{label:"toggleFacade",display:"flex",alignItems:"center",..."top"===r&&{display:"block"}},facade:{label:"toggleFacade__facade",background:e.background,borderColor:e.borderColor,cursor:"pointer",display:"inline-block",userSelect:"none",position:"relative",borderRadius:"3rem",verticalAlign:"middle",boxShadow:`inset 0 0 0 ${e.borderWidth} ${e.borderColor}`,height:e.toggleSize,width:`calc(${e.toggleSize} * 1.5)`,...c[r].facade,...t&&{background:e.checkedBackground,boxShadow:"none"},"&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",boxSizing:"border-box",borderRadius:e.borderRadius,border:`${e.focusBorderWidth} ${e.focusBorderStyle} ${e.focusOutlineColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none",...n&&{transform:"scale(1)",opacity:1}}},icon:{label:"toggleFacade__icon",display:"block",textAlign:"center",position:"absolute",top:"0",insetInlineStart:"0",insetInlineEnd:"auto",transition:"all 0.2s",transform:"translate3d(0, 0, 0)",fontSize:"0.875rem",height:e.toggleSize,width:e.toggleSize,...t&&{transform:"translate3d(50%, 0, 0)",'[dir="rtl"] &':{transform:"translate3d(-50%, 0, 0)"}}},iconToggle:{label:"toggleFacade__iconToggle",position:"relative",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center","&::before":{content:'""',position:"absolute",top:e.borderWidth,left:e.borderWidth,height:`calc(100% - (${e.borderWidth} * 2))`,width:`calc(100% - (${e.borderWidth} * 2))`,background:e.toggleBackground,boxShadow:e.toggleShadow,borderRadius:"100%"}},iconSVG:{label:"toggleFacade__iconSVG",display:"block",color:e.uncheckedIconColor,position:"relative",zIndex:1,...t&&{color:e.checkedIconColor}},label:{label:"toggleFacade__label",flex:1,minWidth:"0.0625rem",color:e.labelColor,fontFamily:e.labelFontFamily,fontWeight:e.labelFontWeight,lineHeight:e.labelLineHeight,...s[p],...c[r].label}}}),(e=>{var o,p,t,n,r,c,s,l,i,a,M;const b=e.colors,z=e.borders,d=e.forms,O=e.shadows,h=e.spacing,A=e.typography,u=e.key,f={canvas:{focusOutlineColor:e["ic-brand-primary"],labelColor:e["ic-brand-font-color-dark"]},"canvas-high-contrast":{background:null==b||null===(o=b.contrasts)||void 0===o?void 0:o.grey125125,borderColor:null==b||null===(p=b.contrasts)||void 0===p?void 0:p.grey125125}};return{...{color:null==b||null===(t=b.contrasts)||void 0===t?void 0:t.white1010,background:null==b||null===(n=b.contrasts)||void 0===n?void 0:n.grey1111,borderColor:null==b||null===(r=b.contrasts)||void 0===r?void 0:r.grey1214,borderWidth:null==z?void 0:z.widthSmall,borderRadius:"4rem",marginEnd:null==h?void 0:h.small,marginStart:null==h?void 0:h.small,marginVertical:null==h?void 0:h.xSmall,checkedBackground:null==b||null===(c=b.contrasts)||void 0===c?void 0:c.green4570,uncheckedIconColor:null==b||null===(s=b.contrasts)||void 0===s?void 0:s.grey125125,checkedIconColor:null==b||null===(l=b.contrasts)||void 0===l?void 0:l.green4570,focusOutlineColor:null==b||null===(i=b.contrasts)||void 0===i?void 0:i.blue4570,focusBorderWidth:null==z?void 0:z.widthMedium,focusBorderStyle:null==z?void 0:z.style,toggleBackground:null==b||null===(a=b.contrasts)||void 0===a?void 0:a.white1010,toggleShadow:null==O?void 0:O.depth1,toggleSize:null==d?void 0:d.inputHeightSmall,labelColor:null==b||null===(M=b.contrasts)||void 0===M?void 0:M.grey125125,labelFontFamily:null==A?void 0:A.fontFamily,labelFontWeight:null==A?void 0:A.fontWeightNormal,labelLineHeight:null==A?void 0:A.lineHeightCondensed,labelFontSizeSmall:null==A?void 0:A.fontSizeSmall,labelFontSizeMedium:null==A?void 0:A.fontSizeMedium,labelFontSizeLarge:null==A?void 0:A.fontSizeLarge},...f[u]}})),iS(((MS=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}renderIcon(){const e=this.props,o=e.styles,p=e.checked;return Y(p?Te:so,{css:null==o?void 0:o.iconSVG})}renderLabel(){const e=this.props,o=e.children,p=e.styles;return Y("span",{css:null==p?void 0:p.label},o)}render(){const e=this.props,o=e.labelPlacement,p=e.styles;return Y("span",{css:null==p?void 0:p.toggleFacade,ref:this.handleRef},("top"===o||"start"===o)&&this.renderLabel(),Y("span",{css:null==p?void 0:p.facade,"aria-hidden":"true"},Y("span",{css:null==p?void 0:p.icon},Y("span",{css:null==p?void 0:p.iconToggle},this.renderIcon()))),"end"===o&&this.renderLabel())}}).displayName="ToggleFacade",MS.componentId="ToggleFacade",MS.propTypes=lS,MS.allowedProps=["children","checked","disabled","readOnly","focused","size","labelPlacement"],MS.defaultProps={checked:!1,focused:!1,size:"medium",disabled:!1,readOnly:!1,labelPlacement:"end"},aS=MS))||aS);const zS={label:E.node.isRequired,id:E.string,value:E.oneOfType([E.string,E.number]),messages:E.arrayOf(t.message),defaultChecked:E.bool,checked:Se(E.bool,"onChange","defaultChecked"),onChange:E.func,onKeyDown:E.func,onFocus:E.func,onBlur:E.func,onMouseOver:E.func,onMouseOut:E.func,disabled:E.bool,readOnly:E.bool,indeterminate:E.bool,size:E.oneOf(["small","medium","large"]),variant:E.oneOf(["simple","toggle"]),inline:E.bool,labelPlacement:E.oneOf(["top","start","end"])};var dS,OS;let hS=K()(dS=_(((e,o)=>{const p=o.inline;return{checkbox:{label:"checkbox",position:"relative",width:"100%",...o.disabled&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5},...p&&{display:"inline-block",verticalAlign:"middle",width:"auto"}},container:{width:"fit-content"},input:{label:"checkbox__input",padding:0,margin:0,fontSize:"inherit",lineHeight:"inherit",width:"auto",position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",opacity:1e-4},control:{label:"checkbox__control",all:"initial",display:"block",direction:"inherit",textAlign:"start"}}}),null)(dS=U()((OS=class e extends u.Component{constructor(e){super(e),this._defaultId=void 0,this._input=null,this.ref=null,this.handleRef=e=>{this.ref=e},this.handleChange=e=>{const o=this.props,p=o.onChange,t=o.disabled,n=o.checked,r=o.readOnly;t||r?e.preventDefault():(void 0===n&&this.setState({checked:!this.state.checked}),"function"==typeof p&&p(e))},this.handleKeyDown=e=>{"toggle"===this.props.variant&&e.keyCode===ve.codes.enter&&(this._input&&this._input.click(),e.preventDefault())},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1})},this.handleMouseOver=()=>{!this.props.disabled&&this.setState({hovered:!0})},this.handleMouseOut=()=>{this.setState({hovered:!1})},this.state={focused:!1,hovered:!1,checked:void 0===e.checked?!!e.defaultChecked:void 0},void 0===e.checked&&(this.state.checked=!!e.defaultChecked),this._defaultId=e.deterministicId()}componentDidMount(){var e,o;this._input&&(this._input.indeterminate=this.props.indeterminate),null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(e){var o,p;e.indeterminate!==this.props.indeterminate&&this._input&&(this._input.indeterminate=this.props.indeterminate||!1),null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p)}get id(){return this.props.id||this._defaultId}get checked(){return void 0===this.props.checked?this.state.checked:this.props.checked}get focused(){return xe(this._input)}focus(){this._input&&this._input.focus()}renderFacade(){const e=this.props,o=e.size,p=e.disabled,t=e.variant,n=e.label,r=e.readOnly,c=e.indeterminate,s=e.labelPlacement,l=e.themeOverride,i=this.state,a=i.hovered,M=i.focused;return Q(!("simple"===t&&"end"!==s),"[Checkbox] The `simple` variant does not support the `labelPlacement` property. Use the `toggle` variant instead."),"toggle"===t?Y(bS,{disabled:p,size:o,focused:M,checked:this.checked,readOnly:r,labelPlacement:s,themeOverride:l},n):Y(sS,{size:o,hovered:a,focused:M,checked:this.checked,indeterminate:c,themeOverride:l},n)}renderMessages(){const e=this.props.messages;return e&&e.length>0?Y(J,{display:"block",margin:"small 0 0"},Y(r,{messages:e})):null}render(){const o=this.props,p=o.disabled,t=o.readOnly,n=o.value,r=o.onKeyDown,c=o.onFocus,s=o.onBlur,l=o.onMouseOver,i=o.onMouseOut,a=o.indeterminate,M=o.variant,b=o.styles,z=pe(this.props,e.allowedProps);return Q(!("toggle"===M&&a),"[Checkbox] The `toggle` variant does not support the `indeterminate` property. Use the `simple` variant instead."),Y("div",{css:null==b?void 0:b.checkbox,onMouseOver:Ce(l,this.handleMouseOver),onMouseOut:Ce(i,this.handleMouseOut),ref:this.handleRef},Y("div",{css:null==b?void 0:b.container},Y("input",Object.assign({},z,{id:this.id,value:n,type:"checkbox",ref:e=>{this._input=e},disabled:p||t,"aria-checked":a?"mixed":void 0,css:null==b?void 0:b.input,onChange:this.handleChange,onKeyDown:Ce(r,this.handleKeyDown),onFocus:Ce(c,this.handleFocus),onBlur:Ce(s,this.handleBlur),checked:this.checked})),Y("label",{htmlFor:this.id,css:null==b?void 0:b.control},this.renderFacade(),this.renderMessages())))}},OS.displayName="Checkbox",OS.componentId="Checkbox",OS.propTypes=zS,OS.allowedProps=["label","id","value","messages","defaultChecked","checked","onChange","onKeyDown","onFocus","onBlur","onMouseOver","onMouseOut","disabled","readOnly","indeterminate","size","variant","inline","labelPlacement"],OS.defaultProps={size:"medium",variant:"simple",disabled:!1,inline:!1,indeterminate:!1,readOnly:!1,labelPlacement:"end"},dS=OS))||dS)||dS)||dS;const AS={name:E.string.isRequired,description:E.node.isRequired,defaultValue:E.array,value:Se(E.array),onChange:E.func,disabled:E.bool,readOnly:E.bool,messages:E.arrayOf(t.message),children:Le.oneOf([hS]),size:E.oneOf(["small","medium","large"]),layout:E.oneOf(["stacked","columns","inline"])};var uS,fS;let mS=K()(uS=U()((fS=class e extends u.Component{constructor(e){super(e),this._messagesId=void 0,this.ref=null,this.handleRef=e=>{this.ref=e},this.handleChange=e=>{const o=this.value;this.props.disabled||this.props.readOnly?e.preventDefault():(e.target.checked?o.push(e.target.value):o.splice(o.indexOf(e.target.value),1),void 0===this.props.value&&this.setState({value:o}),"function"==typeof this.props.onChange&&this.props.onChange(o))},void 0===e.value&&(this.state={value:e.defaultValue||[]}),this._messagesId=e.deterministicId()}get hasMessages(){return this.props.messages&&this.props.messages.length>0}get value(){return void 0===this.props.value?[...this.state.value]:[...this.props.value]}renderChildren(){const e=this.props,o=e.children,p=e.name,t=e.size,n=e.disabled,r=e.readOnly;return u.Children.map(o,(e=>Ie(e,[hS])?ye(e,{key:`${e.props.name}`,name:p,label:e.props.label,disabled:n||e.props.disabled,readOnly:r||e.props.readOnly,size:t,checked:this.value.indexOf(e.props.value)>-1,onChange:this.handleChange,width:e.props.width||"auto","aria-describedby":this.hasMessages?this._messagesId:void 0}):e))}render(){return f.createElement(c,Object.assign({},pe(this.props,e.allowedProps),te(this.props,c.allowedProps),{description:this.props.description,rowSpacing:"small",vAlign:"top",messagesId:this._messagesId,elementRef:this.handleRef}),this.renderChildren())}},fS.displayName="CheckboxGroup",fS.componentId="CheckboxGroup",fS.propTypes=AS,fS.allowedProps=["name","description","defaultValue","value","onChange","disabled","readOnly","messages","children","size","layout"],fS.defaultProps={disabled:!1,readOnly:!1,size:"medium",layout:"stacked",children:null},uS=fS))||uS)||uS;const qS=oe` 0% {} 50% { background-color: transparent; } - 100% {}`,RS={label:E.string.isRequired,language:E.oneOf(["sh","js","json","javascript","jsx","shell","css","html","markdown","yaml","yml","bash"]),readOnly:E.bool,onChange:E.func,options:E.object,attachment:E.oneOf(["bottom","top"]),value:E.string},WS=["value","label","attachment","readOnly","onChange","styles"];var vS,gS,yS,LS;const NS=u.lazy((()=>{const e="undefined"==typeof navigator||"undefined"!=typeof global&&!0===global.PREVENT_CODEMIRROR_RENDER;return re(e?()=>import("./index.node-BuQMAeGn.js"):()=>import("./index-BDfvr0fn.js"),__vite__mapDeps([3,1,2]))}));let BS=(vS=K(),gS=_(((e,o)=>{const p=o.attachment;return{codeEditor:{label:"codeEditor"},globalStyles:{".CodeMirror":{direction:"ltr",position:"relative",overflow:"hidden",background:e.background,height:"auto",fontFamily:e.fontFamily,fontSize:e.fontSize,borderRadius:e.borderRadius,border:e.border,color:e.color,lineHeight:1.4375,minHeight:"1.4375rem",marginBottom:"1rem",...p&&{top:{borderBottomLeftRadius:0,borderBottomRightRadius:0,marginTop:"0.25rem"},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0,marginBottom:"0.25rem"}}[p]},".CodeMirror-lines":{padding:`${e.verticalPadding} 0`,cursor:"text",minHeight:"0.0625rem"},".CodeMirror pre":{padding:`0 ${e.horizontalPadding}`,borderRadius:"0",borderWidth:"0",background:"transparent",fontFamily:"inherit",fontSize:"inherit",margin:"0",whiteSpace:"pre",wordWrap:"normal",lineHeight:"inherit",color:"inherit",zIndex:`calc(${e.zIndex} + 3)`,position:"relative",overflow:"visible",WebkitTapHighlightColor:"transparent",fontVariantLigatures:"contextual"},".CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler":{background:e.background},".CodeMirror-cursor":{borderLeft:`0.0625rem solid ${e.cursorColor}`,borderRight:"none",width:"0",position:"absolute",pointerEvents:"none"},".CodeMirror-cursors":{visibility:"hidden",position:"relative",zIndex:`calc(${e.zIndex} + 4)`},".CodeMirror-dragcursors":{visibility:"visible"},".CodeMirror-focused .CodeMirror-cursors":{visibility:"visible"},".CodeMirror-crosshair":{cursor:"crosshair"},".cm-fat-cursor .CodeMirror-cursor":{width:"auto",border:"0 !important",background:e.fatCursorBackground},".cm-fat-cursor .CodeMirror-cursors":{zIndex:`calc(${e.zIndex} + 2)`},".CodeMirror .CodeMirror-secondarycursor":{borderLeft:`0.0625rem solid ${e.secondaryCursorColor}`},".cm-fat-cursor-mark":{background:e.fatCursorMarkBackground,animation:`${qS} 1.06s steps(1) infinite`},".cm-animate-fat-cursor":{width:"auto",border:"0",animation:`${qS} 1.06s steps(1) infinite`,backgroundColor:e.fatCursorBackground},".cm-tab":{display:"inline-block",textDecoration:"inherit"},".CodeMirror-rulers":{position:"absolute",left:"0",right:"0",top:"-50px",bottom:"-20px",overflow:"hidden"},".CodeMirror-ruler":{borderLeft:`0.0625rem solid ${e.rulerColor}`,top:"0",bottom:"0",position:"absolute"},"div.CodeMirror span.CodeMirror-matchingbracket":{outline:`0.0625rem solid ${e.matchingBracketOutline}`},"div.CodeMirror span.CodeMirror-nonmatchingbracket":{color:e.nonMatchingBracketColor},".CodeMirror-matchingtag":{background:e.matchingTagBackground},"div.CodeMirror-activeline-background":{background:e.activeLineBackground},".CodeMirror-scroll":{overflow:"scroll !important",marginBottom:"-30px",marginRight:"-30px",paddingBottom:"30px",height:"100%",outline:"none",position:"relative"},".CodeMirror-sizer":{position:"relative",borderRight:"30px solid transparent"},".CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler":{position:"absolute",zIndex:`calc(${e.zIndex} + 7)`,display:"none"},".CodeMirror-vscrollbar":{right:"0",top:"0",overflowX:"hidden",overflowY:"scroll"},".CodeMirror-hscrollbar":{bottom:"0",left:"0",overflowY:"hidden",overflowX:"scroll"},".CodeMirror-scrollbar-filler":{right:"0",bottom:"0"},".CodeMirror-gutter-filler":{left:"0",bottom:"0"},".CodeMirror-gutters":{borderTopLeftRadius:e.borderRadius,borderBottomLeftRadius:e.borderRadius,borderRight:`0.0625rem solid ${e.gutterBorder}`,overflow:"hidden",background:e.gutterBackground,whiteSpace:"nowrap",position:"absolute",left:"0",top:"0",minHeight:"100%",zIndex:`calc(${e.zIndex} + 4)`},".CodeMirror-linenumber":{padding:"0 0.1875rem 0 0.3125rem",minWidth:"1.25rem",textAlign:"right",color:e.lineNumberColor,whiteSpace:"nowrap"},".CodeMirror-guttermarker":{color:e.gutterMarkerColor},".CodeMirror-guttermarker-subtle":{color:e.gutterMarkerSubtleColor},".CodeMirror-gutter":{whiteSpace:"normal",height:"100%",display:"inline-block",verticalAlign:"top",marginBottom:"-30px"},".CodeMirror-gutter-wrapper":{position:"absolute",zIndex:`calc(${e.zIndex} + 5)`,background:"none !important",border:"none !important"},".CodeMirror-gutter-background":{position:"absolute",top:"0",bottom:"0",zIndex:`calc(${e.zIndex} + 5)`},".CodeMirror-gutter-elt":{position:"absolute",cursor:"default",zIndex:`calc(${e.zIndex} + 5)`},".CodeMirror-gutter-wrapper ::selection":{backgroundColor:"transparent"},".CodeMirror-wrap pre":{wordWrap:"break-word",whiteSpace:"pre-wrap",wordBreak:"normal"},".CodeMirror-linebackground":{position:"absolute",left:"0",right:"0",top:"0",bottom:"0",zIndex:`calc(${e.zIndex} + 1)`},".CodeMirror-linewidget":{position:"relative",zIndex:`calc(${e.zIndex} + 3)`,padding:"0.1px"},".CodeMirror-rtl pre":{direction:"rtl"},".CodeMirror-code":{outline:"none"},".CodeMirror-scroll, .CodeMirror-sizer, .CodeMirror-gutter, .CodeMirror-gutters, .CodeMirror-linenumber":{boxSizing:"content-box"},".CodeMirror-measure":{position:"absolute",width:"100%",height:"0",overflow:"hidden",visibility:"hidden"},".CodeMirror-measure pre":{position:"static"},".CodeMirror-selected, .CodeMirror-focused .CodeMirror-selected, .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection":{background:e.selectedBackground},".cm-searching":{background:e.searchingBackground},".cm-force-border":{paddingRight:"0.1px"},"@media print":{".CodeMirror .CodeMirror-cursors":{visibility:"hidden"}},".cm-tab-wrap-hack::after":{content:'""'},".CodeMirror-selectedtext":{background:"none"},".CodeMirror-focused":{boxShadow:e.focusBoxShadow,borderColor:e.focusBorderColor},".cm-keyword":{color:e.keywordColor,fontWeight:"bold"},".cm-atom":{color:e.atomColor},".cm-number":{color:e.numberColor},".cm-def":{color:e.defColor},"span.cm-variable-2, span.cm-tag":{color:e.tagColor},"span.cm-variable-3, span.cm-def, span.cm-type":{color:e.typeColor},".cm-variable":{color:e.variableColor},".cm-property":{color:e.propertyColor},".cm-qualifier":{color:e.qualifierColor},".cm-operator":{color:e.operatorColor},".cm-comment":{color:e.commentColor,fontWeight:"normal"},".cm-string":{color:e.stringColor,fontStyle:"italic"},".cm-string-2":{color:e.secondaryStringColor},".cm-meta":{color:e.metaColor},".cm-builtin":{color:e.builtInColor},".cm-tag":{color:e.tagColor},".cm-attribute":{color:e.attributeColor},".cm-header":{color:e.headerColor},".cm-hr":{color:e.hrColor},".cm-link":{color:e.linkColor,fontStyle:"italic",textDecoration:"none"},".cm-error":{}}}}),(e=>{var o,p,t,n,r,c,s,l,i,a,M,b,z,d,O,h,A,u,f,m,q,R,W,v,g,y,L,N,B,w,C,T,S,x,I,E,P,X,H,Z,V,k,D,_;const j=e.colors,F=e.borders,U=e.spacing,Y=e.typography,G=e.stacking;return{...{fontFamily:null==Y?void 0:Y.fontFamilyMonospace,fontSize:null==Y?void 0:Y.fontSizeSmall,background:null==j||null===(o=j.contrasts)||void 0===o?void 0:o.grey1111,border:`${null==F?void 0:F.widthSmall} solid ${null==j||null===(p=j.contrasts)||void 0===p?void 0:p.grey1111}`,borderRadius:null==F?void 0:F.radiusMedium,focusBorderColor:null==j||null===(t=j.contrasts)||void 0===t?void 0:t.blue4570,focusBoxShadow:`inset 0 0 0 1px ${null==j||null===(n=j.contrasts)||void 0===n?void 0:n.white1010}`,horizontalPadding:null==U?void 0:U.xSmall,verticalPadding:null==U?void 0:U.xxSmall,color:null==j||null===(r=j.contrasts)||void 0===r?void 0:r.grey125125,lineNumberColor:null==j||null===(c=j.contrasts)||void 0===c?void 0:c.grey4570,gutterBorder:null==j||null===(s=j.contrasts)||void 0===s?void 0:s.grey1111,gutterBackground:null==j||null===(l=j.contrasts)||void 0===l?void 0:l.grey1214,gutterMarkerColor:null==j||null===(i=j.contrasts)||void 0===i?void 0:i.blue4570,gutterMarkerSubtleColor:null==j||null===(a=j.contrasts)||void 0===a?void 0:a.grey4570,cursorColor:null==j||null===(M=j.contrasts)||void 0===M?void 0:M.grey125125,secondaryCursorColor:null==j||null===(b=j.contrasts)||void 0===b?void 0:b.grey4570,rulerColor:null==j||null===(z=j.contrasts)||void 0===z?void 0:z.grey4570,matchingBracketOutline:null==j||null===(d=j.contrasts)||void 0===d?void 0:d.grey4570,nonMatchingBracketColor:null==j||null===(O=j.contrasts)||void 0===O?void 0:O.red4570,matchingTagBackground:"rgba(255, 150, 0, 0.3)",activeLineBackground:null==j||null===(h=j.contrasts)||void 0===h?void 0:h.grey1214,selectedBackground:null==j||null===(A=j.contrasts)||void 0===A?void 0:A.grey1424,fatCursorBackground:null==j||null===(u=j.contrasts)||void 0===u?void 0:u.green4570,fatCursorMarkBackground:"rgba(20, 255, 20, 0.5)",searchingBackground:"rgba(255, 255, 0, 0.4)",zIndex:null==G?void 0:G.above,quoteColor:null==j||null===(f=j.contrasts)||void 0===f?void 0:f.green4570,headerColor:null==j||null===(m=j.contrasts)||void 0===m?void 0:m.orange4570,negativeColor:null==j||null===(q=j.contrasts)||void 0===q?void 0:q.red4570,positiveColor:null==j||null===(R=j.contrasts)||void 0===R?void 0:R.green4570,keywordColor:null==j||null===(W=j.contrasts)||void 0===W?void 0:W.blue4570,atomColor:null==j||null===(v=j.contrasts)||void 0===v?void 0:v.orange4570,numberColor:null==j||null===(g=j.contrasts)||void 0===g?void 0:g.orange4570,defColor:null==j||null===(y=j.contrasts)||void 0===y?void 0:y.grey125125,variableColor:null==j||null===(L=j.contrasts)||void 0===L?void 0:L.blue4570,secondaryVariableColor:null==j||null===(N=j.contrasts)||void 0===N?void 0:N.orange4570,typeColor:null==j||null===(B=j.contrasts)||void 0===B?void 0:B.blue4570,commentColor:null==j||null===(w=j.contrasts)||void 0===w?void 0:w.grey4570,stringColor:null==j||null===(C=j.contrasts)||void 0===C?void 0:C.blue4570,secondaryStringColor:null==j||null===(T=j.contrasts)||void 0===T?void 0:T.red4570,metaColor:null==j||null===(S=j.contrasts)||void 0===S?void 0:S.grey125125,qualifierColor:null==j||null===(x=j.contrasts)||void 0===x?void 0:x.green4570,builtInColor:null==j||null===(I=j.contrasts)||void 0===I?void 0:I.orange4570,bracketColor:null==j||null===(E=j.contrasts)||void 0===E?void 0:E.grey4570,tagColor:null==j||null===(P=j.contrasts)||void 0===P?void 0:P.green4570,attributeColor:null==j||null===(X=j.contrasts)||void 0===X?void 0:X.blue4570,hrColor:null==j||null===(H=j.contrasts)||void 0===H?void 0:H.grey4570,linkColor:null==j||null===(Z=j.contrasts)||void 0===Z?void 0:Z.blue4570,errorColor:null==j||null===(V=j.contrasts)||void 0===V?void 0:V.red4570,propertyColor:null==j||null===(k=j.contrasts)||void 0===k?void 0:k.blue5782,nodeColor:null==j||null===(D=j.contrasts)||void 0===D?void 0:D.orange4570,operatorColor:null==j||null===(_=j.contrasts)||void 0===_?void 0:_.grey125125}}})),vS(yS=gS(yS=U()(yS=Mo("[TBD]",null,"This component is deprecated and will be removed in a later version. Use instead, which is the wrapper for the newer version of the CodeMirror code editor.")(((LS=class extends u.Component{constructor(e){super(e),this._id=void 0,this.codeMirror=void 0,this.ref=void 0,this.editor=void 0,this._id=e.deterministicId(),this.ref=u.createRef(),this.editor=u.createRef(),this.codeMirror=u.createRef()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}focus(){this.codeMirror&&this.codeMirror.focus()}get mode(){const e=this.props.language;return"json"===e||"js"===e?"jsx":"sh"===e?"shell":"html"===e?"htmlmixed":"yml"===e?"yaml":e}get options(){return{...this.props.options,readOnly:this.props.readOnly,mode:this.mode,extraKeys:this.props.readOnly?{Tab:!1,"Shift-Tab":!1}:{}}}render(){const e=this.props,o=e.value,p=e.label;e.attachment,e.readOnly;const t=e.onChange,n=e.styles,r=P(e,WS);return Y("div",{css:null==n?void 0:n.codeEditor,ref:this.ref},Y(u.Suspense,null,Y(ne,{styles:null==n?void 0:n.globalStyles}),Y("label",{htmlFor:this._id},Y(Ae,null,p),Y(NS,Object.assign({},Z(r),{id:this._id,options:this.options,value:o,onBeforeChange:(e,o,p)=>{null==t||t(p)},ref:this.codeMirror,editorDidMount:e=>{this.editor.current=e},editorWillUnmount:()=>{this.editor.current.display.wrapper.remove(),this.codeMirror.current&&(this.codeMirror.current.hydrated=!1)}})))))}}).displayName="CodeEditor",LS.componentId="CodeEditor",LS.propTypes=RS,LS.allowedProps=["label","language","readOnly","onChange","options","attachment","value"],LS.defaultProps={language:"jsx",readOnly:!1,options:{styleActiveLine:!0}},yS=LS))||yS)||yS)||yS)||yS);const wS=(e,o)=>{const p=.4*o.a,t=1-p,n=1-t*(1-t);return`rgba(\n ${o.r*p/n+e.r*t*(1-p)/n},\n ${o.g*p/n+e.g*t*(1-p)/n},\n ${o.b*p/n+e.b*t*(1-p)/n},\n ${o.a<.6?.6:o.a})`},CS="#384A5899",TS={color:E.string,elementRef:E.func,shape:E.oneOf(["circle","rectangle"])};var SS,xS,IS;let ES=(SS=_(((e,o)=>{const p=o.color,t=o.shape;return{colorIndicator:{label:"colorIndicator",width:"rectangle"===t?e.rectangleIndicatorSize:e.circleIndicatorSize,height:"rectangle"===t?e.rectangleIndicatorSize:e.circleIndicatorSize,borderRadius:"rectangle"===t?e.rectangularIndicatorBorderRadius:e.circleIndicatorSize,boxSizing:"border-box",borderWidth:e.borderWidth,boxShadow:p?`inset 0 0 0 1.5rem ${p}`:"none",borderStyle:"solid",backgroundImage:e.backgroundImage,backgroundSize:e.backgroundSize,backgroundPosition:e.backgroundPosition,borderColor:wS(tc(e.colorIndicatorBorderColor),tc(ec(p)?p:"#fff"))}}}),(e=>{var o,p,t,n;const r=e.colors,c=e.borders,s=e.spacing;return{...{borderWidth:null==c?void 0:c.widthSmall,backgroundImage:`linear-gradient(45deg, ${null==r||null===(o=r.contrasts)||void 0===o?void 0:o.grey1214} 25%, transparent 25%),\n linear-gradient(-45deg, ${null==r||null===(p=r.contrasts)||void 0===p?void 0:p.grey1214} 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, ${null==r||null===(t=r.contrasts)||void 0===t?void 0:t.grey1214} 75%),\n linear-gradient(-45deg, transparent 75%, ${null==r||null===(n=r.contrasts)||void 0===n?void 0:n.grey1214} 75%)`,backgroundSize:".5rem .5rem",backgroundPosition:"0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px",circleIndicatorSize:"1.5rem",rectangleIndicatorSize:"2.375rem",colorIndicatorBorderColor:CS,rectangularIndicatorBorderRadius:null==s?void 0:s.xxSmall,rectangularIndicatorBorderWidth:null==c?void 0:c.widthSmall}}})),SS(xS=U()((IS=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){const o=this.props.styles;return Y("div",Object.assign({},pe(this.props,e.allowedProps),{ref:this.handleRef,css:null==o?void 0:o.colorIndicator}))}},IS.displayName="ColorIndicator",IS.propTypes=TS,IS.allowedProps=["color","elementRef","shape"],IS.componentId="ColorIndicator",IS.defaultProps={shape:"circle"},xS=IS))||xS)||xS);const PS=(e,o)=>{for(const p in e)if(e[p]!==o[p])return!0;return!1},XS={disabled:E.bool,hue:E.number.isRequired,color:E.object.isRequired,width:E.number.isRequired,height:E.number.isRequired,indicatorRadius:E.number.isRequired,onChange:E.func.isRequired,elementRef:E.func,navigationExplanationScreenReaderLabel:E.string.isRequired};var HS,ZS,VS,kS;let DS=(HS=K(),ZS=_(((e,o,p)=>{var t,n;return{ColorPalette:{label:"ColorPalette"},indicator:{label:"ColorPalette__indicator",width:o.indicatorRadius/8+"rem",height:o.indicatorRadius/8+"rem",borderRadius:o.indicatorRadius/8+"rem",background:e.whiteColor,position:"absolute",borderStyle:"solid",borderWidth:e.indicatorBorderWidth,borderColor:e.indicatorBorderColor,top:(null==p||null===(t=p.colorPosition)||void 0===t?void 0:t.y)-Ee(o.indicatorRadius/16+"rem")+"px",left:(null==p||null===(n=p.colorPosition)||void 0===n?void 0:n.x)-Ee(o.indicatorRadius/16+"rem")+"px"},palette:{label:"ColorPalette__palette",width:o.width/16+"rem",height:o.height/16+"rem",borderRadius:e.paletteBorderRadius,borderStyle:"solid",borderWidth:e.paletteBorderWidth,boxSizing:"border-box",borderColor:e.colorIndicatorBorderColor,background:`linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,1)),\n linear-gradient(to right, white, hsl(${o.hue},100%,50%))`},disabledOverlay:{label:"ColorPalette__disabledOverlay",background:"rgba(255,255,255,.5)",zIndex:e.disabledOverlayZIndex,width:o.width/16+1+"rem",height:o.height/16+1+"rem",position:"absolute",top:"-.5rem",left:"-.5rem"},paletteOffset:e.paletteOffset}}),(e=>{var o,p;const t=e.colors,n=e.borders,r=e.stacking;return{...{indicatorBorderColor:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.grey125125,whiteColor:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.white1010,colorIndicatorBorderColor:CS,indicatorBorderWidth:n.widthSmall,paletteBorderRadius:n.radiusMedium,paletteBorderWidth:n.widthSmall,disabledOverlayZIndex:r.topmost,paletteOffset:"0.125rem"}}})),HS(VS=ZS((kS=class extends u.Component{constructor(e){var o;super(e),this._id=void 0,this.ref=null,this._paletteRef=null,this._mouseMoveListener=void 0,this._mouseUpListener=void 0,this._paletteOffset=Ee(null===(o=this.props.styles)||void 0===o?void 0:o.paletteOffset),this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.calcSaturation=e=>Math.round(e/this.paletteWidth*100)/100,this.calcLuminance=e=>Math.round((this.paletteHeight-e)/this.paletteHeight*100)/100,this.handleMouseUp=()=>{this.removeEventListeners()},this.handleChange=e=>{if(this.props.disabled)return;const o=e.clientX,p=e.clientY,t=this.calcColorPosition(o,p),n=t.newXPosition,r=t.newYPosition;this.setState({colorPosition:{x:n,y:r}}),this.props.onChange({h:this.props.hue,s:this.calcSaturation(n),v:this.calcLuminance(r)})},this.state={colorPosition:{x:0,y:0}},this._id=e.deterministicId("ColorMixer__Palette")}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.state),this.setState({colorPosition:this.calcPositionFromColor(this.props.color)})}componentDidUpdate(e){var o,p;null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p,this.state),PS(e.color,this.props.color)&&this.setState({colorPosition:this.calcPositionFromColor(this.props.color)})}componentWillUnmount(){this.removeEventListeners()}get paletteWidth(){return this._paletteRef.getBoundingClientRect().width-this._paletteOffset}get paletteHeight(){return this._paletteRef.getBoundingClientRect().height-this._paletteOffset}calcPositionFromColor(e){const o=e.s,p=e.v;return{x:o*this.paletteWidth,y:(1-p)*this.paletteHeight}}handlePaletteMouseDown(e){this.handleChange(e),this._mouseMoveListener=Pe(window,"mousemove",this.handleChange),this._mouseUpListener=Pe(window,"mouseup",this.handleMouseUp)}removeEventListeners(){var e,o;null===(e=this._mouseMoveListener)||void 0===e||e.remove(),null===(o=this._mouseUpListener)||void 0===o||o.remove()}calcColorPosition(e,o){const p=this._paletteRef.getBoundingClientRect(),t=p.x,n=p.y;return this.applyBoundaries(e-t,o-n)}applyBoundaries(e,o){let p=e,t=o;return e>this.paletteWidth&&(p=this.paletteWidth),e<0&&(p=0),o>this.paletteHeight&&(t=this.paletteHeight),o<0&&(t=0),{newXPosition:p,newYPosition:t}}handleKeyDown(e){if(this.props.disabled)return;const o=e.key;if("Tab"===o)return;e.preventDefault();let p=0,t=0;"ArrowLeft"!==o&&"a"!==o||(p=-2),"ArrowRight"!==o&&"d"!==o||(p=2),"ArrowUp"!==o&&"w"!==o||(t=-2),"ArrowDown"!==o&&"s"!==o||(t=2);const n=this.applyBoundaries(this.state.colorPosition.x+p,this.state.colorPosition.y+t),r=n.newXPosition,c=n.newYPosition;this.setState({colorPosition:{x:r,y:c}}),this.props.onChange({h:this.props.hue,s:this.calcSaturation(r),v:this.calcLuminance(c)})}render(){var e,o,p;return Y(J,{elementRef:this.handleRef,disabled:this.props.disabled,position:"relative",background:"transparent",display:"inline-block",borderRadius:"medium",borderWidth:"0",padding:"0",as:"div",tabIndex:this.props.disabled?void 0:0,onKeyDown:e=>this.handleKeyDown(e),onMouseDown:e=>this.handlePaletteMouseDown(e),"aria-label":this.props.navigationExplanationScreenReaderLabel,id:this._id,role:"button"},Y("div",{css:null===(e=this.props.styles)||void 0===e?void 0:e.indicator}),this.props.disabled&&Y("div",{css:null===(o=this.props.styles)||void 0===o?void 0:o.disabledOverlay}),Y("div",{css:null===(p=this.props.styles)||void 0===p?void 0:p.palette,ref:e=>{this._paletteRef=e}}))}},kS.displayName="ColorPalette",kS.propTypes=XS,kS.allowedProps=["disabled","hue","color","width","height","indicatorRadius","onChange","elementRef","navigationExplanationScreenReaderLabel"],kS.componentId="ColorMixer.Palette",VS=kS))||VS)||VS);const _S={isColorSlider:E.bool,onChange:E.func.isRequired,width:E.number.isRequired,value:E.number.isRequired,minValue:E.number.isRequired,maxValue:E.number.isRequired,indicatorRadius:E.number.isRequired,height:E.number.isRequired,elementRef:E.func,navigationExplanationScreenReaderLabel:E.string.isRequired};var jS,FS,US;let YS=(jS=_(((e,o,p)=>{var t;const n=o.isColorSlider?{background:"linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%)"}:{background:e.checkerboardBackgroundImage,backgroundSize:e.checkerboardBackgroundSize,backgroundPosition:e.checkerboardBackgroundPosition};return{colorSlider:{label:"colorMixerSlider"},indicator:{label:"colorMixerSlider__indicator",width:o.indicatorRadius/8+"rem",height:o.indicatorRadius/8+"rem",borderRadius:o.indicatorRadius/8+"rem",background:"white",position:"absolute",borderStyle:"solid",borderWidth:e.indicatorBorderWidth,borderColor:e.indicatorBorderColor,top:"-0.1875rem",left:((null==p?void 0:p.sliderPositionFromValue)-o.indicatorRadius)/16+"rem",zIndex:e.indicatorZIndex},sliderBackground:{label:"colorMixerSlider__sliderBackground",borderRadius:o.height/16+"rem",width:o.width/16+"rem",height:o.height/16+"rem",boxSizing:"border-box",...n},slider:{label:"colorMixerSlider__slider",width:o.width/16+"rem",height:o.height/16+"rem",background:o.isColorSlider?"transparent":`linear-gradient(to right, rgba(255,0,0,0), ${null===(t=o.color)||void 0===t?void 0:t.slice(0,-2)})`,borderRadius:o.height/16+"rem",boxSizing:"border-box",borderStyle:"solid",borderColor:e.colorIndicatorBorderColor,borderWidth:e.sliderBorderWidth},disabledOverlay:{label:"colorMixerSlider__disabledOverlay",background:"rgba(255,255,255,.5)",zIndex:e.disabledOverlayZIndex,width:o.width/16+1+"rem",height:o.height/16+1+"rem",position:"absolute",top:"-.5rem",left:"-.5rem"}}}),(e=>{var o,p,t,n,r;const c=e.colors,s=e.borders,l=e.stacking;return{...{indicatorBorderColor:null==c||null===(o=c.contrasts)||void 0===o?void 0:o.grey125125,checkerboardBackgroundImage:`linear-gradient(45deg, ${null==c||null===(p=c.contrasts)||void 0===p?void 0:p.grey1111} 25%, transparent 25%),\n linear-gradient(-45deg, ${null==c||null===(t=c.contrasts)||void 0===t?void 0:t.grey1111} 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, ${null==c||null===(n=c.contrasts)||void 0===n?void 0:n.grey1111} 75%),\n linear-gradient(-45deg, transparent 75%, ${null==c||null===(r=c.contrasts)||void 0===r?void 0:r.grey1111} 75%)`,checkerboardBackgroundSize:".5rem .5rem",checkerboardBackgroundPosition:"0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px",colorIndicatorBorderColor:CS,indicatorBorderWidth:s.widthSmall,sliderBorderWidth:s.widthSmall,indicatorZIndex:l.above,disabledOverlayZIndex:l.topmost}}})),jS((US=class extends u.Component{constructor(...e){super(...e),this.ref=null,this._sliderRef=null,this._mouseMoveListener=void 0,this._mouseUpListener=void 0,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.handleChange=e=>{if(this.props.disabled)return;const o=e.clientX,p=this.calcSliderPositionFromCursorPosition(o,this._sliderRef);this.props.onChange(this.calcValueFromSliderPosition(p))},this.handleMouseUp=()=>{this.removeEventListeners()},this.calcSliderPositionFromCursorPosition=(e,o)=>{if(this.props.isColorSlider){const p=e-o.getBoundingClientRect().x;return p<0?0:p>this.props.width?this.props.width-1:p}return e-o.getBoundingClientRect().x},this.calcSliderPositionFromValue=e=>this.props.isColorSlider?e/360*this.props.width:this.props.width-(1-e)*this.props.width,this.calcValueFromSliderPosition=e=>{if(this.props.isColorSlider)return e/this.props.width*360;{const o=e<0?0:e>this.props.width?this.props.width:e;return Math.round(100*o/this.props.width)}}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStylesProps)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStylesProps)}componentWillUnmount(){this.removeEventListeners()}removeEventListeners(){var e,o;null===(e=this._mouseMoveListener)||void 0===e||e.remove(),null===(o=this._mouseUpListener)||void 0===o||o.remove()}get sliderPositionFromValue(){return this.calcSliderPositionFromValue(this.props.value)}get roundedValue(){const e=this.props,o=e.value;return e.maxValue<=1?Math.round(100*o):Math.round(o)}get makeStylesProps(){return{sliderPositionFromValue:this.sliderPositionFromValue}}handleMouseDown(e){this.handleChange(e),this._mouseMoveListener=Pe(window,"mousemove",this.handleChange),this._mouseUpListener=Pe(window,"mouseup",this.handleMouseUp)}applyBoundaries(e){return e>this.props.width?this.props.width:e<0?0:e}handleKeyDown(e){const o=e.key;if("Tab"===o)return;e.preventDefault();let p=0;"ArrowLeft"!==o&&"a"!==o||(p=-2),"ArrowRight"!==o&&"d"!==o||(p=2);const t=this.applyBoundaries(this.sliderPositionFromValue+p);this.props.onChange(this.calcValueFromSliderPosition(t))}render(){var e,o,p,t;return Y(J,{elementRef:this.handleRef,disabled:this.props.disabled,position:"relative",background:"transparent",margin:"small 0 0 0",display:"inline-block",borderRadius:"medium",borderWidth:"0",padding:"0",as:"div",onKeyDown:e=>this.handleKeyDown(e),onMouseDown:e=>this.handleMouseDown(e),tabIndex:this.props.disabled?void 0:0,"aria-label":this.props.navigationExplanationScreenReaderLabel,role:"slider","aria-valuemin":this.props.minValue,"aria-valuemax":this.props.maxValue,"aria-valuenow":this.roundedValue},Y("div",{css:null===(e=this.props.styles)||void 0===e?void 0:e.indicator}),this.props.disabled&&Y("div",{css:null===(o=this.props.styles)||void 0===o?void 0:o.disabledOverlay}),Y("div",{ref:e=>{this._sliderRef=e},css:null===(p=this.props.styles)||void 0===p?void 0:p.sliderBackground},Y("div",{css:null===(t=this.props.styles)||void 0===t?void 0:t.slider})))}},US.displayName="Slider",US.propTypes=_S,US.allowedProps=["isColorSlider","onChange","width","value","minValue","maxValue","indicatorRadius","height","elementRef","navigationExplanationScreenReaderLabel"],US.componentId="ColorMixer.Slider",US.defaultProps={isColorSlider:!1},FS=US))||FS);const GS={disabled:E.bool,label:E.string,width:E.number.isRequired,value:E.object.isRequired,onChange:E.func.isRequired,withAlpha:E.bool,rgbRedInputScreenReaderLabel:E.string.isRequired,rgbGreenInputScreenReaderLabel:E.string.isRequired,rgbBlueInputScreenReaderLabel:E.string.isRequired,rgbAlphaInputScreenReaderLabel:E.string.isRequired,elementRef:E.func};var $S,KS,QS,JS;let ex=($S=_(((e,o)=>({RGBAInput:{label:"RGBAInput",marginTop:e.rgbaInputTopMargin,width:o.width/16+"rem"},label:{label:"RGBAInput__label",fontWeight:e.labelFontWeight},inputContainer:{label:"RGBAInput__inputContainer",display:"flex",marginTop:e.inputContainerTopMargin},rgbInput:{label:"RGBAInput__rgbInput",marginInlineEnd:e.tgbInputTopMargin,flex:7},aInput:{label:"RGBAInput__aInput",flex:10}})),(e=>{const o=e.spacing;return{...{labelFontWeight:e.typography.fontWeightBold,inputContainerTopMargin:o.xSmall,tgbInputTopMargin:o.xSmall,rgbaInputTopMargin:o.medium}}})),$S(((QS=class extends u.Component{constructor(e){super(e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.state={value:e.value}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(e){var o,p;null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p),(PS(e.value,this.props.value)||PS(this.state.value,this.props.value))&&this.setState({value:this.props.value})}handleChange(e,o){const p="a"===e?100:255,t="a"===e?Number(o.target.value)/100:Number(o.target.value),n={...this.props.value,[e]:t};if(!isNaN(Number(t))&&t>=0&&t<=p)return this.setState({value:n}),void this.props.onChange(n)}render(){const e=this.props,o=e.styles,p=e.disabled,t=e.label,n=e.withAlpha;return Y("div",{ref:this.handleRef,css:null==o?void 0:o.RGBAInput},t&&Y("div",{css:null==o?void 0:o.label},t),Y("div",{css:null==o?void 0:o.inputContainer},Y("span",{css:null==o?void 0:o.rgbInput},Y(s,{disabled:p,value:`${this.state.value.r}`,onChange:e=>this.handleChange("r",e),renderLabel:Y(Ae,null,this.props.rgbRedInputScreenReaderLabel)})),Y("span",{css:null==o?void 0:o.rgbInput},Y(s,{disabled:p,value:`${this.state.value.g}`,onChange:e=>this.handleChange("g",e),renderLabel:Y(Ae,null,this.props.rgbGreenInputScreenReaderLabel)})),Y("span",{css:null==o?void 0:o.rgbInput},Y(s,{disabled:p,value:`${this.state.value.b}`,onChange:e=>this.handleChange("b",e),renderLabel:Y(Ae,null,this.props.rgbBlueInputScreenReaderLabel)})),n&&Y("span",{css:null==o?void 0:o.aInput},Y(s,{"aria-label":"%",disabled:p,value:`${Math.round(100*this.state.value.a)}`,onChange:e=>this.handleChange("a",e),renderAfterInput:JS||(JS=Y("span",{"aria-hidden":"true",role:"presentation"},"%")),renderLabel:Y(Ae,null,this.props.rgbAlphaInputScreenReaderLabel)}))))}}).displayName="RGBAInput",QS.propTypes=GS,QS.allowedProps=["disabled","label","width","value","onChange","withAlpha","rgbRedInputScreenReaderLabel","rgbGreenInputScreenReaderLabel","rgbBlueInputScreenReaderLabel","rgbAlphaInputScreenReaderLabel","elementRef"],QS.componentId="ColorMixer.RGBAInput",QS.defaultProps={withAlpha:!1},KS=QS))||KS);const ox={disabled:E.bool,elementRef:E.func,withAlpha:E.bool,value:E.string,onChange:E.func.isRequired,rgbRedInputScreenReaderLabel:E.string.isRequired,rgbGreenInputScreenReaderLabel:E.string.isRequired,rgbBlueInputScreenReaderLabel:E.string.isRequired,rgbAlphaInputScreenReaderLabel:E.string.isRequired,colorSliderNavigationExplanationScreenReaderLabel:E.string.isRequired,alphaSliderNavigationExplanationScreenReaderLabel:E.string.isRequired,colorPaletteNavigationExplanationScreenReaderLabel:E.string.isRequired};var px,tx;let nx=_((()=>({colorMixer:{label:"colorMixer",width:"17rem"},sliderAndPaletteContainer:{label:"colorMixer__sliderAndPaletteContainer",display:"flex",flexDirection:"column"}})),null)(px=U()((tx=class e extends u.Component{constructor(e){super(e),this.ref=null,this._width=272,this._paletteHeight=160,this._sliderHeight=8,this._sliderIndicatorRadius=6,this._paletteIndicatorRadius=6,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.state={h:0,s:0,v:0,a:1}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o),ce(ec(this.props.value),"[ColorMixer] The passed color value is not valid."),this.setState({...pc(this.props.value)})}componentDidUpdate(e,o){var p,t;null===(p=(t=this.props).makeStyles)||void 0===p||p.call(t);const n=this.state,r=n.h,c=n.s,s=n.v,l=n.a;o.h===r&&o.s===c&&o.v===s&&o.a===l||this.props.onChange(oc({h:r,s:c,v:s,a:l})),e.value!==this.props.value&&oc({h:r,s:c,v:s,a:l})!==this.props.value&&this.setState({...pc(this.props.value)})}render(){const o=this.props,p=o.disabled,t=o.styles,n=o.withAlpha,r=o.rgbRedInputScreenReaderLabel,c=o.rgbGreenInputScreenReaderLabel,s=o.rgbBlueInputScreenReaderLabel,l=o.rgbAlphaInputScreenReaderLabel,i=o.colorSliderNavigationExplanationScreenReaderLabel,a=o.alphaSliderNavigationExplanationScreenReaderLabel,M=o.colorPaletteNavigationExplanationScreenReaderLabel,b=this.state,z=b.h,d=b.s,O=b.v,h=b.a;return Y("div",Object.assign({},pe(this.props,e.allowedProps),{"aria-disabled":p,ref:this.handleRef,css:null==t?void 0:t.colorMixer}),Y("span",{css:null==t?void 0:t.sliderAndPaletteContainer,"aria-label":`${oc({h:z,s:d,v:O,a:h})}`,"aria-live":"polite"},Y(DS,{disabled:p,width:this._width,height:this._paletteHeight,indicatorRadius:this._paletteIndicatorRadius,hue:z,color:{h:z,s:d,v:O},onChange:e=>{this.setState({s:e.s,v:e.v})},navigationExplanationScreenReaderLabel:M}),Y(YS,{disabled:p,isColorSlider:!0,width:this._width,height:this._sliderHeight,indicatorRadius:this._sliderIndicatorRadius,value:z,minValue:0,maxValue:359,color:oc({h:z,s:d,v:O,a:h}),onChange:e=>{this.setState({h:e})},navigationExplanationScreenReaderLabel:i}),n&&Y(YS,{disabled:p,width:this._width,height:this._sliderHeight,indicatorRadius:this._sliderIndicatorRadius,color:oc({h:z,s:d,v:O}),value:h,minValue:0,maxValue:1,onChange:e=>this.setState({a:e/100}),navigationExplanationScreenReaderLabel:a})),Y(ex,{disabled:p,label:n?"RGBA":"RGB",width:this._width,value:tc({h:z,s:d,v:O,a:h}),onChange:e=>this.setState({...pc(e)}),withAlpha:n,rgbRedInputScreenReaderLabel:r,rgbGreenInputScreenReaderLabel:c,rgbBlueInputScreenReaderLabel:s,rgbAlphaInputScreenReaderLabel:l}))}},tx.displayName="ColorMixer",tx.propTypes=ox,tx.allowedProps=["disabled","elementRef","value","onChange","withAlpha","rgbRedInputScreenReaderLabel","rgbGreenInputScreenReaderLabel","rgbBlueInputScreenReaderLabel","rgbAlphaInputScreenReaderLabel","colorSliderNavigationExplanationScreenReaderLabel","alphaSliderNavigationExplanationScreenReaderLabel","colorPaletteNavigationExplanationScreenReaderLabel"],tx.componentId="ColorMixer",tx.defaultProps={value:"#000",withAlpha:!1,disabled:!1},px=tx))||px)||px;const rx={as:E.elementType,children:E.node.isRequired,color:E.oneOf(["primary","success","danger","info","warning","alert"]),elementRef:E.func,margin:D.spacing,statusLabel:E.string,renderIcon:E.oneOfType([E.node,E.func])},cx=["margin","children","color","as","elementRef","styles","makeStyles","statusLabel","renderIcon"];var sx,lx,ix;let ax=(sx=_(((e,o)=>{const p=o.color,t={primary:{color:e.primaryColor,borderColor:e.primaryColor},success:{color:e.successColor,borderColor:e.successColor},danger:{color:e.dangerColor,borderColor:e.dangerColor},info:{color:e.infoColor,borderColor:e.infoColor},warning:{color:e.warningColor,borderColor:e.warningColor},alert:{color:e.alertColor,borderColor:e.alertColor}};return{pill:{label:"pill",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:e.fontFamily,boxSizing:"border-box",padding:e.padding,background:e.background,borderWidth:e.borderWidth,borderStyle:e.borderStyle,borderRadius:e.borderRadius,lineHeight:`calc(${e.height} - (${e.borderWidth} * 2))`,...t[p]},status:{label:"pill__status",boxSizing:"border-box",fontSize:e.textFontSize,fontWeight:e.statusLabelFontWeight,marginRight:"0.125rem"},icon:{label:"pill__icon",display:"flex",alignItems:"center",marginRight:"0.375rem",fontSize:"0.75rem"},text:{label:"pill__text",boxSizing:"border-box",maxWidth:e.maxWidth,fontSize:e.textFontSize,fontWeight:e.textFontWeight,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},maxWidth:e.maxWidth}}),(e=>{var o,p,t,n,r,c,s;const l=e.borders,i=e.colors,a=e.spacing,M=e.typography,b=e.key;return{...{fontFamily:null==M?void 0:M.fontFamily,padding:`0 ${null==a?void 0:a.xSmall}`,height:"1.5rem",background:null==i||null===(o=i.contrasts)||void 0===o?void 0:o.white1010,textFontSize:null==M?void 0:M.fontSizeSmall,textFontWeight:null==M?void 0:M.fontWeightNormal,statusLabelFontWeight:null==M?void 0:M.fontWeightBold,maxWidth:"15rem",primaryColor:null==i||null===(p=i.contrasts)||void 0===p?void 0:p.grey4570,infoColor:null==i||null===(t=i.contrasts)||void 0===t?void 0:t.blue4570,dangerColor:null==i||null===(n=i.contrasts)||void 0===n?void 0:n.red4570,successColor:null==i||null===(r=i.contrasts)||void 0===r?void 0:r.green4570,warningColor:null==i||null===(c=i.contrasts)||void 0===c?void 0:c.orange4570,alertColor:null==i||null===(s=i.contrasts)||void 0===s?void 0:s.blue4570,borderWidth:null==l?void 0:l.widthSmall,borderStyle:null==l?void 0:l.style,borderRadius:"999rem"},...{instructure:{height:"1.5rem"}}[b]}})),sx(lx=U()((ix=class extends u.Component{constructor(e){super(e),this.ref=null,this.ellipsisRef=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.state={truncated:!1}}componentDidMount(){var e,o;this.setTruncation(),null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}setTruncation(){this.ellipsisRef&&this.setState({truncated:this.ellipsisRef.offsetWidth{this.ellipsisRef=e}},s&&Y("span",{css:null==c?void 0:c.status},s&&s.concat(":")),n)))}render(){return this.state.truncated?Y(We,{renderTip:this.props.statusLabel?this.props.statusLabel.concat(": ",this.props.children):this.props.children,elementRef:this.handleRef},(({focused:e,getTriggerProps:o})=>this.renderPill(e,o))):this.renderPill()}},ix.displayName="Pill",ix.componentId="Pill",ix.allowedProps=["as","children","color","elementRef","margin"],ix.propTypes=rx,ix.defaultProps={color:"primary"},lx=ix))||lx)||lx);const Mx={elementRef:E.func,failureLabel:E.string.isRequired,firstColor:E.string.isRequired,firstColorLabel:E.string,graphicsTextLabel:E.string.isRequired,withoutColorPreview:E.bool,label:E.string.isRequired,largeTextLabel:E.string.isRequired,normalTextLabel:E.string.isRequired,secondColor:E.string.isRequired,secondColorLabel:E.string,successLabel:E.string.isRequired};var bx,zx,dx;let Ox=(bx=_((e=>{const o=o=>({label:o?"colorContrast__successDescription":"colorContrast__failureDescription",flex:1,color:o?e.successColor:e.failureColor});return{colorContrast:{label:"colorContrast",width:e.width,fontFamily:e.fontFamily,fontWeight:e.fontWeight,lineHeight:e.lineHeight,fontSize:e.fontSize},statusWrapper:{label:"colorContrast__statusWrapper",width:"100%",display:"flex",marginBottom:e.statusWrapperBottomMargin},successDescription:o(!0),failureDescription:o(!1),colorIndicator:{marginInlineEnd:e.colorIndicatorRightMargin},statusIndicatorWrapper:{label:"colorContrast__statusIndicatorWrapper",flex:1,display:"flex",flexDirection:"row-reverse"},colorIndicatorLabel:{label:"colorContrast__colorIndicatorLabel",wordBreak:"break-all"},pickedColorHex:{label:"colorContrast__pickedColorHex",color:e.pickedHexColor},colorPreview:{label:"colorContrast__colorPreview",display:"flex",width:"100%",marginBottom:e.colorPreviewBottomMargin,marginTop:e.colorPreviewTopMargin},firstColorPreview:{label:"colorContrast__firstColorPreview",display:"flex",flex:1},secondColorPreview:{label:"colorContrast__secondColorPreview",display:"flex"},label:{label:"colorContrast__label",marginBottom:e.labelBottomMargin}}}),(e=>{var o,p,t;const n=e.colors,r=e.typography,c=e.spacing,s=e.borders;return{...{width:"17rem",fontFamily:null==r?void 0:r.fontFamily,fontWeight:null==r?void 0:r.fontWeightNormal,lineHeight:null==r?void 0:r.lineHeight,fontSize:null==r?void 0:r.fontSizeMedium,statusWrapperBottomMargin:null==c?void 0:c.xxSmall,colorIndicatorRightMargin:null==c?void 0:c.small,colorPreviewBottomMargin:null==c?void 0:c.small,colorPreviewTopMargin:null==c?void 0:c.xSmall,labelBottomMargin:null==c?void 0:c.xxSmall,smallBorder:s.widthSmall,successColor:null==n||null===(o=n.contrasts)||void 0===o?void 0:o.green4570,failureColor:null==n||null===(p=n.contrasts)||void 0===p?void 0:p.red4570,pickedHexColor:null==n||null===(t=n.contrasts)||void 0===t?void 0:t.grey4570}}})),bx(zx=U()((dx=class e extends u.Component{constructor(e){super(e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.renderStatus=(e,o)=>{const p=this.props,t=p.successLabel,n=p.failureLabel,r=p.styles;return Y("div",{css:null==r?void 0:r.statusWrapper},Y("div",{css:e?null==r?void 0:r.successDescription:null==r?void 0:r.failureDescription},o),Y("div",{css:null==r?void 0:r.statusIndicatorWrapper},Y(ax,{color:e?"success":"danger"},e?t:n)))},this.renderColorIndicator=(e,o)=>{var p,t,n;return Y(f.Fragment,null,Y("div",null,Y("div",{css:null===(p=this.props.styles)||void 0===p?void 0:p.colorIndicator},Y(ES,{color:e}))),Y("div",null,Y("div",{css:null===(t=this.props.styles)||void 0===t?void 0:t.colorIndicatorLabel},o),Y("div",{css:null===(n=this.props.styles)||void 0===n?void 0:n.pickedColorHex},e)))},this.calcBlendedColor=(e,o)=>{const p=1-(1-e.a)*(1-o.a);return{r:o.r*o.a/p+e.r*e.a*(1-o.a)/p,g:o.g*o.a/p+e.g*e.a*(1-o.a)/p,b:o.b*o.a/p+e.b*e.a*(1-o.a)/p,a:1}}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}renderPreview(){const e=this.props,o=e.styles,p=e.withoutColorPreview,t=e.firstColor,n=e.secondColor,r=e.firstColorLabel,c=e.secondColorLabel;return p?null:(r&&c||Q(!1,"When `withoutColorPreview` is not set to true, the properties `firstColorLabel` and `secondColorLabel` are required!"),!p&&Y("div",{css:null==o?void 0:o.colorPreview},Y("div",{css:null==o?void 0:o.firstColorPreview},this.renderColorIndicator(t,r||"")),Y("div",{css:null==o?void 0:o.secondColorPreview},this.renderColorIndicator(n,c||""))))}get calcContrast(){const e=tc(this.props.firstColor),o=tc(this.props.secondColor),p=this.calcBlendedColor({r:255,g:255,b:255,a:1},e),t=this.calcBlendedColor(p,o);return Jr(oc(p),oc(t),2)}render(){const o=this.props,p=o.styles,t=o.label,n=o.normalTextLabel,r=o.largeTextLabel,c=o.graphicsTextLabel,s=this.calcContrast;return Y("div",Object.assign({},pe(this.props,e.allowedProps),{ref:this.handleRef,css:null==p?void 0:p.colorContrast}),Y("div",{css:null==p?void 0:p.label},Y(Xe,{weight:"bold",as:"div"},t)),Y(Xe,{size:"x-large"},s,":1"),this.renderPreview(),this.renderStatus(s>=4.5,n),this.renderStatus(s>=3,r),this.renderStatus(s>=3,c))}},dx.displayName="ColorContrast",dx.propTypes=Mx,dx.allowedProps=["elementRef","failureLabel","firstColor","firstColorLabel","graphicsTextLabel","withoutColorPreview","label","largeTextLabel","normalTextLabel","secondColor","secondColorLabel","successLabel"],dx.componentId="ColorContrast",dx.defaultProps={withoutColorPreview:!1},zx=dx))||zx)||zx);const hx={colors:E.array.isRequired,onSelect:E.func.isRequired,selected:E.string,disabled:E.bool,elementRef:E.func,label:E.string,popoverScreenReaderLabel:E.string,colorMixerSettings:E.shape({addNewPresetButtonScreenReaderLabel:E.string.isRequired,selectColorLabel:E.string.isRequired,removeColorLabel:E.string.isRequired,onPresetChange:E.func,popoverAddButtonLabel:E.string.isRequired,popoverCloseButtonLabel:E.string.isRequired,maxHeight:E.string,colorMixer:E.shape({withAlpha:E.bool,rgbRedInputScreenReaderLabel:E.string.isRequired,rgbGreenInputScreenReaderLabel:E.string.isRequired,rgbBlueInputScreenReaderLabel:E.string.isRequired,rgbAlphaInputScreenReaderLabel:E.string.isRequired,colorSliderNavigationExplanationScreenReaderLabel:E.string.isRequired,alphaSliderNavigationExplanationScreenReaderLabel:E.string.isRequired,colorPaletteNavigationExplanationScreenReaderLabel:E.string.isRequired}).isRequired,colorContrast:E.shape({firstColor:E.string.isRequired,label:E.string.isRequired,successLabel:E.string.isRequired,failureLabel:E.string.isRequired,normalTextLabel:E.string.isRequired,largeTextLabel:E.string.isRequired,graphicsTextLabel:E.string.isRequired,firstColorLabel:E.string.isRequired,secondColorLabel:E.string.isRequired})})};var Ax,ux,fx,mx;let qx=(Ax=_(((e,o)=>{const p=o.colorMixerSettings;return{colorPreset:{label:"colorPreset",display:"flex",flexWrap:"wrap",width:"17rem",...o.disabled&&{opacity:.5}},addNewPresetButton:{label:"colorPreset__addNewPresetButton",width:"2.375rem",height:"2.375rem",margin:e.xxSmallSpacing},selectedIndicator:{label:"colorPreset__selectedIndicator",width:"1.25rem",height:"1.25rem",borderStyle:"solid",borderColor:e.selectedIndicatorBorderColor,borderWidth:e.smallBorder,borderRadius:"1.25rem",boxSizing:"border-box",position:"relative",insetInlineStart:"1.5rem",bottom:"2.75rem",backgroundColor:e.selectedIndicatorBackgroundColor,display:"flex",alignItems:"center",justifyContent:"center"},popoverContent:{label:"colorPreset__popoverContent",padding:e.smallSpacing,maxHeight:(null==p?void 0:p.maxHeight)||"100vh",overflow:"auto"},popoverDivider:{label:"colorPreset__popoverDivider",borderTop:"solid",borderWidth:e.smallBorder,borderColor:e.popoverDividerColor,margin:`${e.smallSpacing} 0 ${e.smallSpacing} 0`},popoverContrastBlock:{label:"colorPreset__popoverContrastBlock",borderTop:"solid",borderWidth:e.smallBorder,borderColor:e.popoverDividerColor,marginTop:e.popoverContentBlockTopMargin,marginBottom:e.popoverContentBlockBottomMargin,paddingTop:e.popoverContentBlockTopPadding},popoverFooter:{label:"colorPreset__popoverFooter",backgroundColor:e.popoverFooterColor,display:"flex",flexDirection:"row-reverse",padding:e.smallSpacing},label:{label:"colorPreset__label",width:"100%",margin:e.xxSmallSpacing}}}),(e=>{var o,p,t,n,r,c,s,l;const i=e.colors,a=e.borders,M=e.spacing;return{...{xxSmallSpacing:null==M?void 0:M.xxSmall,smallSpacing:null==M?void 0:M.small,selectedIndicatorBackgroundColor:null==i||null===(o=i.contrasts)||void 0===o?void 0:o.white1010,selectedIndicatorBorderColor:null==i||null===(p=i.contrasts)||void 0===p?void 0:p.grey125125,popoverDividerColor:null==i||null===(t=i.contrasts)||void 0===t?void 0:t.grey1214,smallBorder:null==a?void 0:a.widthSmall,popoverFooterColor:null==i||null===(n=i.contrasts)||void 0===n?void 0:n.grey1111,checkerboardBackgroundImage:`linear-gradient(45deg, ${null==i||null===(r=i.contrasts)||void 0===r?void 0:r.grey4570} 25%, transparent 25%),\n linear-gradient(-45deg, ${null==i||null===(c=i.contrasts)||void 0===c?void 0:c.grey4570} 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, ${null==i||null===(s=i.contrasts)||void 0===s?void 0:s.grey4570} 75%),\n linear-gradient(-45deg, transparent 75%, ${null==i||null===(l=i.contrasts)||void 0===l?void 0:l.grey4570} 75%)`,checkerboardBackgroundSize:".5rem .5rem",checkerboardBackgroundPosition:"0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px",popoverContentBlockTopMargin:null==M?void 0:M.medium,popoverContentBlockBottomMargin:null==M?void 0:M.small,popoverContentBlockTopPadding:null==M?void 0:M.medium}}})),Ax(ux=U()((fx=class e extends u.Component{constructor(e){super(e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.onMenuItemSelected=e=>(o,p)=>{var t,n;("select"===p.value&&this.props.onSelect(e),"remove"===p.value)&&(null===(t=this.props)||void 0===t||null===(n=t.colorMixerSettings)||void 0===n||n.onPresetChange(this.props.colors.filter((o=>o!==e))))},this.renderAddNewPresetButton=()=>{var e,o,p,t,n,r,c,s,l,i,a,M;return Y(He,{renderTrigger:Y("div",{css:null===(e=this.props)||void 0===e||null===(o=e.styles)||void 0===o?void 0:o.addNewPresetButton},Y(ao,{disabled:this.props.disabled,screenReaderLabel:this.props.colorMixerSettings.addNewPresetButtonScreenReaderLabel},mx||(mx=Y(zf,null)))),isShowingContent:this.state.openAddNew,onShowContent:()=>{this.props.disabled||this.setState({openAddNew:!0})},onHideContent:()=>{this.setState({openAddNew:!1})},on:"click",screenReaderLabel:this.props.popoverScreenReaderLabel,shouldContainFocus:!0,shouldReturnFocus:!0,shouldCloseOnDocumentClick:!0,offsetY:16,mountNode:()=>document.getElementById("main")},Y("div",{css:null===(p=this.props.styles)||void 0===p?void 0:p.popoverContent},Y(nx,{value:oc(this.state.newColor),onChange:e=>this.setState({newColor:tc(e)}),withAlpha:null===(t=this.props)||void 0===t||null===(n=t.colorMixerSettings)||void 0===n||null===(r=n.colorMixer)||void 0===r?void 0:r.withAlpha,rgbRedInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbRedInputScreenReaderLabel,rgbGreenInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbGreenInputScreenReaderLabel,rgbBlueInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbBlueInputScreenReaderLabel,rgbAlphaInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbAlphaInputScreenReaderLabel,colorSliderNavigationExplanationScreenReaderLabel:this.props.colorMixerSettings.colorMixer.colorSliderNavigationExplanationScreenReaderLabel,alphaSliderNavigationExplanationScreenReaderLabel:this.props.colorMixerSettings.colorMixer.alphaSliderNavigationExplanationScreenReaderLabel,colorPaletteNavigationExplanationScreenReaderLabel:this.props.colorMixerSettings.colorMixer.colorPaletteNavigationExplanationScreenReaderLabel}),(null===(c=this.props)||void 0===c||null===(s=c.colorMixerSettings)||void 0===s?void 0:s.colorContrast)&&Y("div",{css:null===(l=this.props.styles)||void 0===l?void 0:l.popoverContrastBlock},Y(Ox,{firstColor:this.props.colorMixerSettings.colorContrast.firstColor,secondColor:oc(this.state.newColor),label:this.props.colorMixerSettings.colorContrast.label,successLabel:this.props.colorMixerSettings.colorContrast.successLabel,failureLabel:this.props.colorMixerSettings.colorContrast.failureLabel,normalTextLabel:this.props.colorMixerSettings.colorContrast.normalTextLabel,largeTextLabel:this.props.colorMixerSettings.colorContrast.largeTextLabel,graphicsTextLabel:this.props.colorMixerSettings.colorContrast.graphicsTextLabel,firstColorLabel:this.props.colorMixerSettings.colorContrast.firstColorLabel,secondColorLabel:this.props.colorMixerSettings.colorContrast.secondColorLabel}))),Y("div",{css:null===(i=this.props.styles)||void 0===i?void 0:i.popoverFooter},Y(lo,{onClick:()=>{var e,o;null===(e=this.props)||void 0===e||null===(o=e.colorMixerSettings)||void 0===o||o.onPresetChange([oc(this.state.newColor),...this.props.colors]),this.setState({openAddNew:!1})},color:"primary",margin:"0 xx-small 0 xx-small"},null===(a=this.props.colorMixerSettings)||void 0===a?void 0:a.popoverAddButtonLabel),Y(lo,{onClick:()=>this.setState({openAddNew:!1}),color:"secondary",margin:"0 xx-small 0 xx-small"},null===(M=this.props.colorMixerSettings)||void 0===M?void 0:M.popoverCloseButtonLabel)))},this.renderColorIndicator=(e,o)=>{const p=this.renderIndicatorBase(e,o);return this.props.disabled?p:this.renderIndicatorTooltip(p,e)},this.renderIndicatorBase=(e,o)=>{var p,t;return Y(J,Object.assign({disabled:this.props.disabled,position:"relative",width:"2.375rem",height:"2.375rem",background:"transparent",margin:"xx-small",display:"inline-block",borderRadius:"medium",borderWidth:"0",padding:"0",cursor:this.props.disabled?"not-allowed":"auto",as:"button"},o?{onClick:()=>this.props.onSelect(e)}:{},this.isSelectedColor(e)?{"aria-label":"selected"}:{}),Y("div",null,Y(ES,{color:e,shape:"rectangle",role:"presentation"}),this.isSelectedColor(e)&&Y("div",{css:null===(p=this.props)||void 0===p||null===(t=p.styles)||void 0===t?void 0:t.selectedIndicator},Y(By,{themeOverride:{sizeXSmall:"0.8rem"},size:"x-small"}))))},this.renderIndicatorTooltip=(e,o)=>Y(We,{renderTip:Y("div",null,o)},e),this.renderSettingsMenu=(e,o)=>Y(Ze,{onSelect:this.onMenuItemSelected(e),trigger:this.renderColorIndicator(e),key:`color-preset-color-${o}`,rootPageId:"root",width:"10rem",offsetY:"15rem"},Y(Ze.Page,{withoutHeaderSeparator:!0,id:"root",renderTitle:e},Y(Ze.Option,{value:"select",id:"select"},this.props.colorMixerSettings.selectColorLabel),Y(Ze.Option,{value:"remove",id:"remove"},this.props.colorMixerSettings.removeColorLabel))),this.state={openEditor:!1,openAddNew:!1,newColor:{r:51,g:99,b:42,a:1}}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}get isModifiable(){var e;return"function"==typeof(null===(e=this.props.colorMixerSettings)||void 0===e?void 0:e.onPresetChange)}isSelectedColor(e){const o=this.props.selected;return!!o&&oc(o)===oc(e)}render(){const o=this.props,p=o.styles,t=o.label,n=o.colors;return this.isModifiable||0!==n.length?Y("div",Object.assign({},pe(this.props,e.allowedProps),{ref:this.handleRef,css:null==p?void 0:p.colorPreset}),t&&Y("div",{css:null==p?void 0:p.label},Y(Xe,{weight:"bold"},t)),this.isModifiable&&this.renderAddNewPresetButton(),n.map(((e,o)=>this.isModifiable?this.renderSettingsMenu(e,o):Y("div",{key:`color-preset-color-${o}`},this.renderColorIndicator(e,!0))))):null}},fx.displayName="ColorPreset",fx.propTypes=hx,fx.allowedProps=["colors","disabled","elementRef","label","colorMixerSettings","onSelect","popoverScreenReaderLabel","selected"],fx.componentId="ColorPreset",fx.defaultProps={disabled:!1},ux=fx))||ux)||ux);const Rx={checkContrast:E.shape({isStrict:E.bool,contrastStrength:E.oneOf(["min","mid","max"]),contrastAgainst:E.string,renderContrastSuccessMessage:E.func,renderContrastErrorMessage:E.func}),colorMixerSettings:E.shape({popoverAddButtonLabel:E.string.isRequired,popoverCloseButtonLabel:E.string.isRequired,colorMixer:E.shape({withAlpha:E.bool,rgbRedInputScreenReaderLabel:E.string.isRequired,rgbGreenInputScreenReaderLabel:E.string.isRequired,rgbBlueInputScreenReaderLabel:E.string.isRequired,rgbAlphaInputScreenReaderLabel:E.string.isRequired,colorSliderNavigationExplanationScreenReaderLabel:E.string.isRequired,alphaSliderNavigationExplanationScreenReaderLabel:E.string.isRequired,colorPaletteNavigationExplanationScreenReaderLabel:E.string.isRequired}),colorPreset:E.shape({colors:E.arrayOf(E.string).isRequired,label:E.string.isRequired}),colorContrast:E.shape({firstColor:E.string.isRequired,label:E.string.isRequired,successLabel:E.string.isRequired,failureLabel:E.string.isRequired,normalTextLabel:E.string.isRequired,largeTextLabel:E.string.isRequired,graphicsTextLabel:E.string.isRequired,firstColorLabel:E.string.isRequired,secondColorLabel:E.string.isRequired})}),children:E.func,disabled:E.bool,elementRef:E.func,isRequired:E.bool,label:E.node.isRequired,onChange:E.func,placeholderText:E.string,popoverScreenReaderLabel:E.string,popoverButtonScreenReaderLabel:E.string,popoverMaxHeight:E.string,renderInvalidColorMessage:E.func,renderIsRequiredMessage:E.func,renderMessages:E.func,tooltip:E.node,id:E.string,value:E.string,width:E.string,withAlpha:E.bool};var Wx,vx,gx,yx,Lx,Nx,Bx;const wx=["0","1","2","3","4","5","6","7","8","9","a","A","b","B","c","C","d","D","e","E","f","F",null];let Cx=(Wx=_(((e,o,p)=>{const t=e.hashMarkColor,n=e.errorIconColor,r=e.warningIconColor,c=e.successIconColor,s=o.checkContrast,l=o.popoverMaxHeight,i=p.isSimple;return{colorPicker:{label:"colorPicker",display:"flex"},simpleColorContainer:{label:"colorPicker__simpleColorContainer",display:"flex",paddingLeft:e.simpleColorContainerLeftPadding,alignItems:"center"},hashMarkContainer:{label:"colorPicker__hashMarkContainer",color:t,display:"inline-block",fontSize:"1rem",lineHeight:e.hashMarkContainerLineHeight,...i?{paddingInlineStart:e.hashMarkContainerLeftPadding,paddingInlineEnd:e.hashMarkContainerRightPadding}:{}},errorIcons:{label:"colorPicker__errorIcons",display:"flex",paddingInlineEnd:e.errorIconsRightPadding,color:null!=s&&s.isStrict?n:r},successIcon:{label:"colorPicker__successIcon",display:"flex",paddingInlineEnd:e.successIconRightPadding,color:c},label:{label:"colorPicker__label",marginInlineEnd:e.labelRightMargin},popoverContent:{label:"colorPicker__popoverContent",padding:e.popoverContentPadding},popoverContentBlock:{label:"colorPicker__popoverContentBlock",borderTop:"solid",borderWidth:e.popoverContentBlockBorderWidth,borderColor:e.popoverSeparatorColor,marginTop:e.popoverContentBlockTopMargin,marginBottom:e.popoverContentBlockBottomMargin,paddingTop:e.popoverContentBlockTopPadding},popoverFooter:{label:"colorPicker__popoverFooter",backgroundColor:e.popoverFooterColor,display:"flex",justifyContent:"flex-end",padding:e.popoverFooterPadding,borderTop:`solid ${e.popoverFooterTopBorderWidth}`,borderColor:e.popoverSeparatorColor},colorMixerButtonContainer:{label:"colorPicker__colorMixerButtonContainer",alignSelf:"flex-start",marginInlineStart:e.colorMixerButtonContainerLeftMargin},popoverContentContainer:{label:"colorPicker__popoverContentContainer",maxHeight:l||"100vh",overflow:"auto"},colorMixerButtonWrapper:{label:"colorPicker__colorMixerButtonWrapper",position:"static"}}}),(e=>{var o,p,t,n,r,c,s,l,i,a,M;const b=e.colors,z=e.borders,d=e.spacing,O=e.typography;return{...{hashMarkColor:null==b||null===(o=b.contrasts)||void 0===o?void 0:o.grey4570,warningIconColor:null==b||null===(p=b.contrasts)||void 0===p?void 0:p.orange4570,errorIconColor:null==b||null===(t=b.contrasts)||void 0===t?void 0:t.red4570,successIconColor:null==b||null===(n=b.contrasts)||void 0===n?void 0:n.green4570,popoverSeparatorColor:null==b||null===(r=b.contrasts)||void 0===r?void 0:r.grey1214,popoverFooterColor:null==b||null===(c=b.contrasts)||void 0===c?void 0:c.grey1111,smallBorder:null==z?void 0:z.widthSmall,smallSpacing:null==d?void 0:d.small,xSmallSpacing:null==d?void 0:d.xSmall,xxSmallSpacing:null==d?void 0:d.xxSmall,xxxSmallSpacing:null==d?void 0:d.xxxSmall,xLargeFontSize:null==O?void 0:O.fontSizeXLarge,checkerboardBackgroundColor:null==b||null===(s=b.contrasts)||void 0===s?void 0:s.white1010,checkerboardBackgroundImage:`linear-gradient(45deg, ${null==b||null===(l=b.contrasts)||void 0===l?void 0:l.grey1214} 25%, transparent 25%),\n linear-gradient(-45deg, ${null==b||null===(i=b.contrasts)||void 0===i?void 0:i.grey1214} 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, ${null==b||null===(a=b.contrasts)||void 0===a?void 0:a.grey1214} 75%),\n linear-gradient(-45deg, transparent 75%, ${null==b||null===(M=b.contrasts)||void 0===M?void 0:M.grey1214} 75%)`,checkerboardBackgroundSize:".5rem .5rem",checkerboardBackgroundPosition:"0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px",colorIndicatorBorderColor:CS,simpleColorContainerLeftPadding:null==d?void 0:d.xSmall,hashMarkContainerLineHeight:null==O?void 0:O.fontSizeXLarge,hashMarkContainerLeftPadding:null==d?void 0:d.xSmall,hashMarkContainerRightPadding:null==d?void 0:d.xxxSmall,errorIconsRightPadding:null==d?void 0:d.small,successIconRightPadding:null==d?void 0:d.small,labelRightMargin:null==d?void 0:d.xxSmall,popoverContentPadding:null==d?void 0:d.small,popoverContentBlockBorderWidth:null==z?void 0:z.widthSmall,popoverContentBlockTopMargin:null==d?void 0:d.medium,popoverContentBlockBottomMargin:null==d?void 0:d.small,popoverContentBlockTopPadding:null==d?void 0:d.medium,popoverFooterPadding:null==d?void 0:d.xSmall,popoverFooterTopBorderWidth:null==z?void 0:z.widthSmall,colorMixerButtonContainerLeftMargin:null==d?void 0:d.xSmall}}})),Wx(vx=U()((gx=class e extends u.Component{constructor(e){super(e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.inputContainerRef=null,this.handleInputContainerRef=e=>{this.inputContainerRef=e,this.setLabelHeight()},this.setLabelHeight=()=>{var e;this.inputContainerRef&&this.setState({labelHeight:this.inputContainerRef.getBoundingClientRect().y-((null===(e=this.inputContainerRef.parentElement)||void 0===e?void 0:e.getBoundingClientRect().y)||0)})},this.checkSettings=()=>{this.props.children&&this.props.colorMixerSettings&&ce(!1,"You should either use children, colorMixerSettings or neither, not both. In this case, the colorMixerSettings will be ignored.",""),this.props.value&&"function"!=typeof this.props.onChange&&Q(!1,"You provided a `value` prop on ColorPicker, which will render a controlled component. Please provide an `onChange` handler.")},this.renderPopover=()=>{var e;return Y(He,{renderTrigger:Y(ao,{disabled:this.props.disabled,screenReaderLabel:this.props.popoverButtonScreenReaderLabel||""},Y(ES,{color:`#${this.state.hexCode}`})),isShowingContent:this.state.openColorPicker,onShowContent:()=>{this.setState({openColorPicker:!0,mixedColor:this.state.hexCode})},onHideContent:()=>{this.setState({openColorPicker:!1})},on:"click",screenReaderLabel:this.props.popoverScreenReaderLabel,shouldContainFocus:!0,shouldReturnFocus:!0,shouldCloseOnDocumentClick:!0,offsetY:"10rem"},Y("div",{css:null===(e=this.props.styles)||void 0===e?void 0:e.popoverContentContainer},this.isDefaultPopover?this.renderDefaultPopoverContent():this.renderCustomPopoverContent()))},this.renderCustomPopoverContent=()=>{const e=this.props,o=e.children,p=e.onChange;return Y("div",null,"function"==typeof o&&o(`#${this.mixedColorWithStrippedAlpha}`,(e=>{this.setState({mixedColor:oc(e).slice(1)})}),(()=>{this.setState({openColorPicker:!1,hexCode:this.mixedColorWithStrippedAlpha}),null==p||p(`#${this.mixedColorWithStrippedAlpha}`)}),(()=>this.setState({openColorPicker:!1,mixedColor:this.state.hexCode}))))},this.renderDefaultPopoverContent=()=>{var e,o,p,t,n,r,c,s,l,i,a,M;return Y(f.Fragment,null,Y("div",{css:null===(e=this.props.styles)||void 0===e?void 0:e.popoverContent},(null===(o=this.props)||void 0===o||null===(p=o.colorMixerSettings)||void 0===p?void 0:p.colorMixer)&&Y(nx,{value:`#${this.state.mixedColor}`,onChange:e=>this.setState({mixedColor:oc(e).slice(1)}),withAlpha:this.props.colorMixerSettings.colorMixer.withAlpha,rgbRedInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbRedInputScreenReaderLabel,rgbGreenInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbGreenInputScreenReaderLabel,rgbBlueInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbBlueInputScreenReaderLabel,rgbAlphaInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbAlphaInputScreenReaderLabel,colorSliderNavigationExplanationScreenReaderLabel:this.props.colorMixerSettings.colorMixer.colorSliderNavigationExplanationScreenReaderLabel,alphaSliderNavigationExplanationScreenReaderLabel:this.props.colorMixerSettings.colorMixer.alphaSliderNavigationExplanationScreenReaderLabel,colorPaletteNavigationExplanationScreenReaderLabel:this.props.colorMixerSettings.colorMixer.colorPaletteNavigationExplanationScreenReaderLabel}),(null===(t=this.props)||void 0===t||null===(n=t.colorMixerSettings)||void 0===n?void 0:n.colorPreset)&&Y("div",{css:null===(r=this.props.styles)||void 0===r?void 0:r.popoverContentBlock},Y(qx,{label:this.props.colorMixerSettings.colorPreset.label,colors:this.props.colorMixerSettings.colorPreset.colors,selected:this.mixedColorWithStrippedAlpha?`#${this.mixedColorWithStrippedAlpha}`:void 0,onSelect:e=>this.setState({mixedColor:e.slice(1)})})),(null===(c=this.props)||void 0===c||null===(s=c.colorMixerSettings)||void 0===s?void 0:s.colorContrast)&&Y("div",{css:null===(l=this.props.styles)||void 0===l?void 0:l.popoverContentBlock},Y(Ox,{firstColor:this.props.colorMixerSettings.colorContrast.firstColor,secondColor:`#${this.mixedColorWithStrippedAlpha}`,label:this.props.colorMixerSettings.colorContrast.label,successLabel:this.props.colorMixerSettings.colorContrast.successLabel,failureLabel:this.props.colorMixerSettings.colorContrast.failureLabel,normalTextLabel:this.props.colorMixerSettings.colorContrast.normalTextLabel,largeTextLabel:this.props.colorMixerSettings.colorContrast.largeTextLabel,graphicsTextLabel:this.props.colorMixerSettings.colorContrast.graphicsTextLabel,firstColorLabel:this.props.colorMixerSettings.colorContrast.firstColorLabel,secondColorLabel:this.props.colorMixerSettings.colorContrast.secondColorLabel}))),Y("div",{css:null===(i=this.props.styles)||void 0===i?void 0:i.popoverFooter},Y(lo,{onClick:()=>this.setState({openColorPicker:!1,mixedColor:this.state.hexCode}),color:"secondary",margin:"xx-small"},null===(a=this.props.colorMixerSettings)||void 0===a?void 0:a.popoverCloseButtonLabel),Y(lo,{onClick:()=>{"function"==typeof this.props.onChange?(this.props.onChange(`#${this.mixedColorWithStrippedAlpha}`),this.setState({openColorPicker:!1})):this.setState({openColorPicker:!1,hexCode:`${this.mixedColorWithStrippedAlpha}`})},color:"primary",margin:"xx-small"},null===(M=this.props.colorMixerSettings)||void 0===M?void 0:M.popoverAddButtonLabel)))},this.state={hexCode:"",showHelperErrorMessages:!1,openColorPicker:!1,mixedColor:"",labelHeight:0}}componentDidMount(){var e,o,p;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,{...this.state,isSimple:this.isSimple}),this.checkSettings(),this.props.value&&this.setState({hexCode:null===(p=this.props.value)||void 0===p?void 0:p.slice(1)})}componentDidUpdate(e){var o,p,t;(null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p,{...this.state,isSimple:this.isSimple}),e.value!==this.props.value)&&this.setState({showHelperErrorMessages:!1,hexCode:(null===(t=this.props.value)||void 0===t?void 0:t.slice(1))||""});this.checkSettings()}get renderMode(){return this.props.children?"customPopover":this.props.colorMixerSettings?"defaultPopover":"simple"}get isSimple(){return"simple"===this.renderMode}get isDefaultPopover(){return"defaultPopover"===this.renderMode}get isCustomPopover(){return"customPopover"===this.renderMode}get mixedColorWithStrippedAlpha(){const e=this.state.mixedColor;return 8===e.length&&"FF"===e.slice(-2)?e.slice(0,-2):e}getMinContrast(e){return{min:3,mid:4.5,max:7}[e]}renderMessages(){var e;const o=this.state,p=o.hexCode,t=o.showHelperErrorMessages,n=ec(p),r=this.props,c=r.checkContrast,s=r.renderMessages,l=r.renderInvalidColorMessage,i=r.renderIsRequiredMessage,a=r.isRequired,M=n?Jr((null===(e=this.props.checkContrast)||void 0===e?void 0:e.contrastAgainst)||"#fff",p,2):void 0,b=null!=c&&c.contrastStrength?c.contrastStrength:"mid",z=this.getMinContrast(b);let d=[],O=[],h=[],A=[];if(c&&M){const e=c.renderContrastSuccessMessage,o=c.renderContrastErrorMessage;M=e?Y("div",{css:null==p?void 0:p.errorIcons},o.isStrict?yx||(yx=Y(rg,null)):Lx||(Lx=Y(Rg,null))):Y("div",{css:null==p?void 0:p.successIcon},Nx||(Nx=Y(am,null)))}return null}handleOnChange(e,o){const p=this.props.onChange;o.length>(this.props.withAlpha?8:6)||void 0!==o.split("").find((e=>!wx.includes(e)))||("function"==typeof p?p(`#${o}`):this.setState({showHelperErrorMessages:!1,hexCode:o}))}handleOnPaste(e){const o=e.clipboardData.getData("Text");let p=o;if(o[0]&&"#"===o[0]&&(p=o.slice(1)),this.props.withAlpha&&p.length>8||!this.props.withAlpha&&p.length>6)return e.preventDefault();const t=`${this.state.hexCode}${p}`;ec(t)&&("function"==typeof this.props.onChange?this.props.onChange(`#${t}`):this.setState({showHelperErrorMessages:!1,hexCode:t})),e.preventDefault()}handleOnBlur(){this.setState({showHelperErrorMessages:!0})}renderLabel(){const e=this.props,o=e.label,p=e.tooltip,t=e.styles;return p?Y("div",null,Y("span",{css:null==t?void 0:t.label},o),Y("span",null,Y(We,{renderTip:p},Bx||(Bx=Y(eR,{tabIndex:-1}))))):o}render(){var o,p,t;const n=this.props,r=n.disabled,c=n.isRequired,l=n.placeholderText,i=n.width,a=n.id;return Y("div",Object.assign({},pe(this.props,e.allowedProps),{css:null===(o=this.props.styles)||void 0===o?void 0:o.colorPicker,ref:this.handleRef}),Y(s,{id:a,isRequired:c,disabled:r,renderLabel:()=>this.renderLabel(),display:"inline-block",width:i,placeholder:l,themeOverride:{padding:""},renderAfterInput:this.renderAfterInput(),renderBeforeInput:this.renderBeforeInput(),inputContainerRef:this.handleInputContainerRef,value:this.state.hexCode,onChange:(e,o)=>this.handleOnChange(e,o),onPaste:e=>this.handleOnPaste(e),onBlur:()=>this.handleOnBlur(),messages:this.renderMessages()}),!this.isSimple&&Y("div",{css:null===(p=this.props.styles)||void 0===p?void 0:p.colorMixerButtonContainer,style:{paddingTop:this.state.labelHeight}},Y("div",{css:null===(t=this.props.styles)||void 0===t?void 0:t.colorMixerButtonWrapper},this.renderPopover())))}},gx.displayName="ColorPicker",gx.propTypes=Rx,gx.allowedProps=["id","checkContrast","colorMixerSettings","children","disabled","elementRef","isRequired","label","onChange","placeholderText","popoverScreenReaderLabel","popoverButtonScreenReaderLabel","popoverMaxHeight","renderInvalidColorMessage","renderIsRequiredMessage","renderMessages","tooltip","value","width","withAlpha"],gx.componentId="ColorPicker",gx.defaultProps={disabled:!1,withAlpha:!1,width:"22.5rem",popoverMaxHeight:"100vh"},vx=gx))||vx)||vx);const Tx={renderLabel:E.oneOfType([E.node,E.func]).isRequired,value:Se(E.string),size:E.oneOf(["small","medium","large"]),placeholder:E.string,onChange:E.func,onBlur:E.func,interaction:E.oneOf(["enabled","disabled","readonly"]),isRequired:E.bool,isInline:E.bool,assistiveText:E.string,layout:E.oneOf(["stacked","inline"]),width:E.string,display:E.oneOf(["inline-block","block"]),inputRef:E.func,messages:E.arrayOf(t.message),placement:Re.placement,isShowingCalendar:E.bool,onRequestValidateDate:E.func,onRequestShowCalendar:E.func,onRequestHideCalendar:E.func,onRequestSelectNextDay:E.func,onRequestSelectPrevDay:E.func,onRequestRenderNextMonth:E.func,onRequestRenderPrevMonth:E.func,renderNavigationLabel:E.oneOfType([E.func,E.node]),renderWeekdayLabels:E.arrayOf(E.oneOfType([E.func,E.node])),renderNextMonthButton:E.oneOfType([E.func,E.node]),renderPrevMonthButton:E.oneOfType([E.func,E.node]),children:Le.oneOf([eS.Day]),disabledDates:E.oneOfType([E.array,E.func]),currentDate:E.string,disabledDateErrorMessage:E.oneOfType([E.func,E.string]),invalidDateErrorMessage:E.oneOfType([E.func,E.string]),locale:E.string,timezone:E.string,withYearPicker:E.object},Sx=["renderLabel","value","placeholder","onBlur","isRequired","size","isInline","layout","width","onRequestValidateDate","onRequestShowCalendar","onRequestHideCalendar","onRequestSelectNextDay","onRequestSelectPrevDay","onRequestRenderNextMonth","onRequestRenderPrevMonth"],xx=["ref"];var Ix,Ex,Px;let Xx=_(((e,o)=>({dateInput:{label:"dateInput",display:o.display},assistiveText:{label:"dateInput__assistiveText",display:"none"}})),null)(Ix=U()((Ex=class extends u.Component{constructor(...e){super(...e),this.state={hasInputRef:!1,isShowingCalendar:!1,validatedDate:void 0,messages:[]},this._input=void 0,this.ref=null,this.formatDateId=e=>e.replace(/\s/g,""),this.handleInputRef=e=>{var o,p;this.state.hasInputRef||this.setState({hasInputRef:!0}),this._input=e,null===(o=(p=this.props).inputRef)||void 0===o||o.call(p,e)},this.handleInputChange=(e,o)=>{var p,t;null===(p=(t=this.props).onChange)||void 0===p||p.call(t,e,{value:o}),this.handleShowCalendar(e)},this.handleShowCalendar=e=>{if(this.props.children){if("enabled"===this.interaction&&this.props.children){var o,p;null===(o=(p=this.props).onRequestShowCalendar)||void 0===o||o.call(p,e)}}else this.setState({isShowingCalendar:!0})},this.validateDate=e=>{const o=this.props.invalidDateErrorMessage,p=this.props.disabledDateErrorMessage||o,t=[],n=this.props.disabledDates;return("function"==typeof n&&n(e)||Array.isArray(n)&&n.find((o=>Hr.parse(o,this.locale(),this.timezone()).isSame(Hr.parse(e,this.locale(),this.timezone()),"day"))))&&t.push("function"==typeof p?p(e):{type:"error",text:p}),Hr.parse(e,this.locale(),this.timezone(),[Hr.momentISOFormat,"llll","LLLL","lll","LLL","ll","LL","l","L"],!0).isValid()||t.push("function"==typeof o?o(e):{type:"error",text:o}),t},this.handleHideCalendar=(e,o)=>{if(this.props.children){var p,t,n,r;null===(p=(t=this.props).onRequestValidateDate)||void 0===p||p.call(t,e),null===(n=(r=this.props).onRequestHideCalendar)||void 0===n||n.call(r,e)}else{const p=o||this.props.value,t=[];if(this.props.onRequestValidateDate){var c,s;const o=null===(c=(s=this.props).onRequestValidateDate)||void 0===c?void 0:c.call(s,e,p||"",this.validateDate(p||""));t.push(...o||[])}else p&&t.push(...this.validateDate(p));this.setState({messages:t,isShowingCalendar:!1})}},this.handleHighlightOption=(e,{direction:o})=>{const p=this.props,t=p.onRequestSelectNextDay,n=p.onRequestSelectPrevDay,r=p.onChange,c=p.value,s=p.currentDate,l=c&&Hr.parse(c,this.locale(),this.timezone()).isValid();-1===o&&(n?null==n||n(e):(r(e,{value:Hr.parse(l?c:s,this.locale(),this.timezone()).subtract(1,"day").format("MMMM D, YYYY")}),this.setState({messages:[]}))),1===o&&(t?null==t||t(e):(r(e,{value:Hr.parse(l?c:s,this.locale(),this.timezone()).add(1,"day").format("MMMM D, YYYY")}),this.setState({messages:[]})))},this.shouldShowCalendar=()=>this.props.children?this.props.isShowingCalendar:this.state.isShowingCalendar}locale(){return this.props.locale?this.props.locale:this.context&&this.context.locale?this.context.locale:Dr.browserLocale()}timezone(){return this.props.timezone?this.props.timezone:this.context&&this.context.timezone?this.context.timezone:Hr.browserTimeZone()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}get selectedDateId(){let e;return u.Children.toArray(this.props.children).forEach((o=>{const p=o.props,t=p.date;p.isSelected&&(e=this.formatDateId(t))})),e}get interaction(){return fe({props:this.props})}renderMonthNavigationButton(e="prev"){const o=this.props,p=o.renderPrevMonthButton,t=o.renderNextMonthButton,n="prev"===e?p:t;return n&&ye($(n),{tabIndex:-1})}renderDays(e){const o=this.props.children;if(o)return u.Children.map(o,(o=>{const p=o.props,t=p.date,n=p.isOutsideMonth,r={tabIndex:-1,id:this.formatDateId(t)},c=e(r),s=n?{...r,onClick:c.onClick,role:"presentation"}:c;return ye(o,s)}))}renderCalendar({getListProps:e,getOptionProps:o}){const p=this.props,t=p.onRequestRenderNextMonth,n=p.onRequestRenderPrevMonth,r=p.renderNavigationLabel,c=p.renderWeekdayLabels,s=p.value,l=p.onChange,i=p.disabledDates,a=p.currentDate,M=!!s&&Hr.parse(s,this.locale(),this.timezone()).isValid(),b=this.props.children?{}:{disabledDates:i,currentDate:a,selectedDate:M?s:void 0,visibleMonth:M?s:void 0,onDateSelected:(e,o,p)=>{null==l||l(p,{value:`${o.format("MMMM")} ${o.format("D")}, ${o.format("YYYY")}`}),this.handleHideCalendar(p,e)}};return Y(eS,Object.assign({},e({onRequestRenderNextMonth:t,onRequestRenderPrevMonth:n,renderNavigationLabel:r,renderWeekdayLabels:c,renderNextMonthButton:this.renderMonthNavigationButton("next"),renderPrevMonthButton:this.renderMonthNavigationButton("prev")}),b),this.renderDays(o))}renderInput({getInputProps:e,getTriggerProps:o}){const p=this.props,t=p.renderLabel,n=p.value,r=p.placeholder,c=p.onBlur,l=p.isRequired,i=p.size,a=p.isInline,M=p.layout,b=p.width;p.onRequestValidateDate,p.onRequestShowCalendar,p.onRequestHideCalendar,p.onRequestSelectNextDay,p.onRequestSelectPrevDay,p.onRequestRenderNextMonth,p.onRequestRenderPrevMonth;const z=P(p,Sx),d=this.interaction,O=o(),h=O.ref,A=P(O,xx),u=this.props.messages||this.state.messages;return Y(s,Object.assign({},A,Z(z),e({renderLabel:$(t),value:n,placeholder:r,size:i,layout:M,width:b,messages:u,onChange:this.handleInputChange,onBlur:Ce(c,this.handleHideCalendar),inputRef:Ce(h,this.handleInputRef),interaction:d,isRequired:l,display:a?"inline-block":"block",renderAfterInput:Px||(Px=Y(cm,{inline:!1}))}),{onKeyDown:e=>{var o;this.props.children||"Enter"===e.key&&this.handleHideCalendar(e),null===(o=A.onKeyDown)||void 0===o||o.call(A,e)}}))}render(){const e=this.props,o=e.placement,p=e.assistiveText,t=e.styles,n=this.shouldShowCalendar();return Y(Ve,{isShowingOptions:n,onRequestShowOptions:this.handleShowCalendar,onRequestHideOptions:this.handleHideCalendar,onRequestHighlightOption:this.handleHighlightOption,onRequestSelectOption:e=>this.handleHideCalendar(e),selectedOptionId:this.selectedDateId,highlightedOptionId:this.selectedDateId},(({getRootProps:e,getInputProps:r,getTriggerProps:c,getListProps:s,getOptionProps:l,getDescriptionProps:i})=>Y("span",Object.assign({},e({css:null==t?void 0:t.dateInput}),{ref:e=>this.ref=e}),this.renderInput({getInputProps:r,getTriggerProps:c}),Y("span",Object.assign({},i(),{css:null==t?void 0:t.assistiveText}),p),Y(He,{placement:o,isShowingContent:n,positionTarget:this._input,shouldReturnFocus:!1,shouldFocusContentOnTriggerBlur:!0},this.renderCalendar({getListProps:s,getOptionProps:l})))))}},Ex.displayName="DateInput",Ex.componentId="DateInput",Ex.Day=eS.Day,Ex.propTypes=Tx,Ex.allowedProps=["renderLabel","value","size","placeholder","onChange","onBlur","interaction","isRequired","isInline","assistiveText","layout","width","display","inputRef","messages","placement","isShowingCalendar","onRequestValidateDate","onRequestShowCalendar","onRequestHideCalendar","onRequestSelectNextDay","onRequestSelectPrevDay","onRequestRenderNextMonth","onRequestRenderPrevMonth","renderNavigationLabel","renderWeekdayLabels","renderNextMonthButton","renderPrevMonthButton","children","disabledDates","currentDate","disabledDateErrorMessage","invalidDateErrorMessage","locale","timezone"],Ex.defaultProps={value:"",size:"medium",onBlur:()=>{},isRequired:!1,isInline:!1,layout:"stacked",display:"inline-block",placement:"bottom center",isShowingCalendar:!1},Ix=Ex))||Ix)||Ix;const Hx={renderLabel:E.oneOfType([E.node,E.func]).isRequired,screenReaderLabels:E.object.isRequired,value:Se(E.string),placeholder:E.string,onChange:E.func,onBlur:E.func,interaction:E.oneOf(["enabled","disabled","readonly"]),isRequired:E.bool,isInline:E.bool,width:E.string,messages:E.arrayOf(t.message),invalidDateErrorMessage:E.oneOfType([E.func,E.string]),locale:E.string,timezone:E.string,withYearPicker:E.object,dateFormat:E.oneOfType([E.string,E.object]),onRequestValidateDate:E.func};var Zx,Vx,kx;function Dx(e="",o,p){const t=e.split(/[,.\s/.-]+/).filter(Boolean),n=new Intl.DateTimeFormat(o).formatToParts(new Date);let r,c,s,l=0;if(n.forEach((e=>{"month"===e.type?(c=parseInt(t[l],10),l++):"day"===e.type?(r=parseInt(t[l],10),l++):"year"===e.type&&(s=parseInt(t[l],10),l++)})),!s||!c||!r||s<1e3||s>9999)return null;const i=new Date(Date.UTC(s,c-1,r));if(i.getMonth()!==c-1||i.getDate()!==r)return null;const a=new Intl.DateTimeFormat("en-US",{timeZone:p,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(i).reduce(((e,o)=>"literal"===o.type?e:{...e,[o.type]:o.value}),{}),M=`${a.year}-${a.month}-${a.day}T${a.hour}:${a.minute}:${a.second}`,b=new Date(M+"Z").getTime()-i.getTime();return new Date(i.getTime()-b)}const _x=({renderLabel:e,screenReaderLabels:o,isRequired:p=!1,interaction:t="enabled",isInline:n=!1,value:r,messages:c,width:l,onChange:i,onBlur:a,withYearPicker:M,invalidDateErrorMessage:b,locale:z,timezone:d,placeholder:O,dateFormat:h,onRequestValidateDate:A,...f})=>{const m=u.useContext(bo),q=()=>z||(m.locale?m.locale:Dr.browserLocale()),R=()=>d||(m.timezone?m.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone),W=u.useState(c||[]),v=se(W,2),g=v[0],y=v[1],L=u.useState(!1),N=se(L,2),B=N[0],w=N[1];u.useEffect((()=>{g.length||b||y(c||[])}),[c]),u.useEffect((()=>{const e=C(r);!se(e,2)[1]&&r||y(c||[])}),[r]);const C=(e="")=>{let o=null;return h?"string"==typeof h?o=Dx(e,h,R()):h.parser&&(o=h.parser(e)):o=Dx(e,q(),R()),o?[T(o),o.toISOString()]:["",""]},T=e=>"string"!=typeof h&&null!=h&&h.formatter?h.formatter(e):e.toLocaleDateString("string"==typeof h?h:q(),{timeZone:R(),calendar:"gregory",numberingSystem:"latn"}),S=C(r)[1];return Y(s,Object.assign({},Z(f),{renderLabel:e,onChange:(e,o)=>{const p=C(o),t=se(p,2)[1];null==i||i(e,o,t)},onBlur:e=>{const o=C(r),p=se(o,2),t=p[0],n=p[1];t?t!==r&&(null==i||i(e,t,n)):r&&b&&y([{type:"error",text:b}]),null==A||A(e,r||"",n),null==a||a(e,r||"",n)},isRequired:p,value:r,placeholder:null!=O?O:(()=>{const e=new Date("2024-09-01"),o=T(e),p=e=>new RegExp(`(?"Y".repeat(e.length))).replace(p(n),(e=>"M".repeat(e.length))).replace(p(r),(e=>"D".repeat(e.length)))})(),width:l,display:n?"inline-block":"block",messages:g,interaction:t,renderAfterInput:Y(He,{renderTrigger:Y(ao,{withBackground:!1,withBorder:!1,screenReaderLabel:o.calendarIcon,shape:"circle",interaction:t},Zx||(Zx=Y(cm,null))),isShowingContent:B,onShowContent:()=>w(!0),onHideContent:()=>w(!1),on:"click",shouldContainFocus:!0,shouldReturnFocus:!0,shouldCloseOnDocumentClick:!0},Y(eS,{withYearPicker:M,onDateSelected:(e,o,p)=>{w(!1);const t=T(new Date(e));null==i||i(p,t,e),null==A||A(p,t,e)},selectedDate:S,visibleMonth:S,locale:q(),timezone:R(),role:"listbox",renderNextMonthButton:Y(ao,{size:"small",withBackground:!1,withBorder:!1,renderIcon:Vx||(Vx=Y(we,{color:"primary"})),screenReaderLabel:o.nextMonthButton}),renderPrevMonthButton:Y(ao,{size:"small",withBackground:!1,withBorder:!1,renderIcon:kx||(kx=Y(Be,{color:"primary"})),screenReaderLabel:o.prevMonthButton})}))}))};_x.propTypes=Hx;const jx={renderLabel:E.oneOfType([E.node,E.func]).isRequired,defaultToFirstOption:E.bool,value:Se(Vr.iso8601,"onChange"),defaultValue:Vr.iso8601,id:E.string,format:E.string,step:E.oneOf([5,10,15,20,30,60]),interaction:E.oneOf(["enabled","disabled","readonly"]),placeholder:E.string,isRequired:E.bool,isInline:E.bool,width:E.string,optionsMaxWidth:E.string,visibleOptionsCount:E.number,messages:E.arrayOf(t.message),placement:Re.placement,constrain:Re.constrain,mountNode:Re.mountNode,onChange:E.func,onFocus:E.func,onBlur:E.func,onShowOptions:E.func,onHideOptions:E.func,inputRef:E.func,listRef:E.func,renderEmptyOption:E.oneOfType([E.node,E.func]),renderBeforeInput:E.oneOfType([E.node,E.func]),renderAfterInput:E.oneOfType([E.node,E.func]),locale:E.string,timezone:E.string,allowNonStepInput:E.bool,onInputChange:E.func},Fx=["value","defaultValue","placeholder","renderLabel","inputRef","id","listRef","renderBeforeInput","renderAfterInput","isRequired","isInline","width","format","step","optionsMaxWidth","visibleOptionsCount","messages","placement","constrain","onFocus","onShowOptions","onHideOptions","onInputChange","onKeyDown","mountNode"];var Ux,Yx;let Gx=K()(Ux=U()((Yx=class extends u.Component{constructor(e){super(e),this.ref=null,this._emptyOptionId=this.props.deterministicId("Select-EmptyOption"),this.getOption=(e,o,p=this.state.options)=>p.find((p=>p[e]===o)),this.handleRef=e=>{this.ref=e},this.handleBlur=e=>{var o,p;null===(o=(p=this.props).onBlur)||void 0===o||o.call(p,e)},this.handleInputChange=e=>{var o,p;const t=e.target.value,n=this.filterOptions(t);var r,c;(1==(null==n?void 0:n.length)?(this.isControlled||this.setState({selectedOptionId:n[0].id}),this.setState({fireChangeOnBlur:n[0]})):this.setState({selectedOptionId:this.isControlled?this.state.selectedOptionId:void 0,fireChangeOnBlur:void 0}),this.setState({inputValue:t,filteredOptions:n,highlightedOptionId:n.length>0?n[0].id:void 0,isShowingOptions:!0}),this.state.isShowingOptions)||(null===(r=(c=this.props).onShowOptions)||void 0===r||r.call(c,e));const s=this.parseInputText(t);null===(o=(p=this.props).onInputChange)||void 0===o||o.call(p,e,t,s.isValid()?s.toISOString():void 0)},this.onKeyDown=e=>{var o,p;const t=this.parseInputText(this.state.inputValue);"Enter"===e.key&&this.props.allowNonStepInput&&t.isValid()&&this.setState((()=>({isShowingOptions:!1,highlightedOptionId:void 0}))),null===(o=(p=this.props).onKeyDown)||void 0===o||o.call(p,e)},this.handleShowOptions=e=>{var o,p;this.setState({isShowingOptions:!0,highlightedOptionId:this.state.selectedOptionId}),null===(o=(p=this.props).onShowOptions)||void 0===o||o.call(p,e)},this.handleBlurOrEsc=e=>{var o,p;const t=this.state,n=t.selectedOptionId,r=t.inputValue;let c="";if(this.props.defaultValue){const e=Hr.parse(this.props.defaultValue,this.locale(),this.timezone());c=this.props.format?e.format(this.props.format):e.toISOString()}const s=this.getOption("id",n);let l=c;var i,a;(s?l=s.label:""===r&&(l=""),this.setState((()=>({isShowingOptions:!1,highlightedOptionId:void 0,inputValue:l,filteredOptions:this.filterOptions("")}))),this.state.fireChangeOnBlur&&"Escape"!==e.key)&&(this.setState((()=>({fireChangeOnBlur:void 0}))),null===(i=(a=this.props).onChange)||void 0===i||i.call(a,e,{value:this.state.fireChangeOnBlur.value.toISOString(),inputText:this.state.fireChangeOnBlur.label}));null===(o=(p=this.props).onHideOptions)||void 0===o||o.call(p,e)},this.handleSelectOption=(e,o)=>{var p,t;if(o.id===this._emptyOptionId)return void this.setState({isShowingOptions:!1});const n=this.getOption("id",o.id);let r;const c=this.state.selectedOptionId;if(this.isControlled){const e=this.getOption("id",this.state.selectedOptionId);r=e?e.label:"",this.setState({isShowingOptions:!1})}else r=n.label,this.setState({isShowingOptions:!1,selectedOptionId:o.id,inputValue:r});var s,l;o.id!==c&&(null===(s=(l=this.props).onChange)||void 0===s||s.call(l,e,{value:n.value.toISOString(),inputText:r}));null===(p=(t=this.props).onHideOptions)||void 0===p||p.call(t,e)},this.handleHighlightOption=(e,o)=>{if(o.id===this._emptyOptionId)return;const p=this.getOption("id",o.id).label,t=e.type;this.setState((e=>({highlightedOptionId:o.id,inputValue:"keydown"===t?p:e.inputValue})))},this.parseInputText=e=>{const o=Hr.parse(e,this.locale(),this.timezone(),[this.props.format],!0),p=this.getBaseDate();return o.year(p.year()),o.month(p.month()),o.date(p.date()),o},this.state=this.getInitialState()}componentDidMount(){this.setState(this.getInitialState())}focus(){var e;null===(e=this.ref)||void 0===e||e.focus()}get _select(){return this.ref}get isControlled(){return void 0!==this.props.value}get interaction(){return fe({props:this.props})}get focused(){return this.ref&&this.ref.focused}get id(){return this.ref&&this.ref.id}locale(){return this.props.locale?this.props.locale:this.context&&this.context.locale?this.context.locale:Dr.browserLocale()}timezone(){return this.props.timezone?this.props.timezone:this.context&&this.context.timezone?this.context.timezone:Hr.browserTimeZone()}componentDidUpdate(e){if(this.props.step===e.step&&this.props.format===e.format&&this.props.locale===e.locale&&this.props.timezone===e.timezone&&this.props.allowNonStepInput===e.allowNonStepInput||this.setState(this.getInitialState()),this.props.value!==e.value){let o;this.props.value&&(o=Hr.parse(this.props.value,this.locale(),this.timezone()));const p=this.getInitialState();let t;this.setState(p),this.isControlled?o&&(t=this.getOption("id",this.getFormattedId(o),p.options)):e.value&&(t=this.getOption("id",this.getFormattedId(Hr.parse(e.value,this.locale(),this.timezone()))));const n=this.props.value?this.props.value:"",r=Hr.parse(n,this.locale(),this.timezone());let c="";r.isValid()&&(c=this.props.format?r.format(this.props.format):r.toISOString()),this.setState({inputValue:t?t.label:c,selectedOptionId:t?t.id:void 0})}}getFormattedId(e){return e.toISOString().replace(/\s/g,"")}getInitialState(){const e=this.generateOptions(),o=this.getInitialOption(e);return{inputValue:o?o.label:"",options:e,filteredOptions:e.length>288?e.filter((e=>e.value.minute()%this.props.step==0)):e,isShowingOptions:!1,highlightedOptionId:o?o.id:void 0,selectedOptionId:o?o.id:void 0}}getInitialOption(e){const o=this.props,p=o.value,t=o.defaultValue,n=o.defaultToFirstOption,r=o.format,c=p||t;if("string"==typeof c){const o=Hr.parse(c,this.locale(),this.timezone()),p=this.getOption("value",o,e);return p||{id:this.getFormattedId(o),label:r?o.format(r):o.toISOString(),value:o}}if(n)return e[0]}getBaseDate(){let e;const o=this.props.value||this.props.defaultValue;return e=o?Hr.parse(o,this.locale(),this.timezone()):Hr.now(this.locale(),this.timezone()),e.set({second:0,millisecond:0}).clone()}generateOptions(){const e=this.getBaseDate(),o=[],p=this.props.step?this.props.step:30,t=this.props.allowNonStepInput?60:60/p,n=this.props.allowNonStepInput?1:p;for(let r=0;r<24;r++)for(let p=0;p5){const o=this.parseInputText(e);o.isValid()&&(o.set({second:0}),p=o.format(this.props.format))}var t;return this.props.allowNonStepInput&&p.length<3?null===(t=this.state)||void 0===t?void 0:t.options.filter((e=>e.label.toLowerCase().startsWith(p.toLowerCase())&&e.value.minute()%this.props.step==0)):null===(o=this.state)||void 0===o?void 0:o.options.filter((e=>e.label.toLowerCase().startsWith(p.toLowerCase())))}renderOptions(){const e=this.state,o=e.filteredOptions,p=e.highlightedOptionId,t=e.selectedOptionId;return o.length<1?this.renderEmptyOption():o.map((e=>{const o=e.id,n=e.label;return f.createElement(M.Option,{id:o,key:o,isHighlighted:o===p,isSelected:o===t},n)}))}renderEmptyOption(){return f.createElement(M.Option,{id:this._emptyOptionId,isHighlighted:!1,isSelected:!1},$(this.props.renderEmptyOption))}render(){const e=this.props;e.value,e.defaultValue;const o=e.placeholder,p=e.renderLabel,t=e.inputRef,n=e.id,r=e.listRef,c=e.renderBeforeInput,s=e.renderAfterInput,l=e.isRequired,i=e.isInline,a=e.width;e.format,e.step;const b=e.optionsMaxWidth,z=e.visibleOptionsCount,d=e.messages,O=e.placement,h=e.constrain,A=e.onFocus;e.onShowOptions,e.onHideOptions,e.onInputChange,e.onKeyDown;const u=e.mountNode,m=P(e,Fx),q=this.state,R=q.inputValue,W=q.isShowingOptions;return f.createElement(M,Object.assign({mountNode:u,renderLabel:p,inputValue:R,interaction:this.interaction,placeholder:o,id:n,onFocus:A,onBlur:this.handleBlur,ref:this.handleRef,inputRef:t,listRef:r,isRequired:l,isInline:i,width:a,optionsMaxWidth:b,visibleOptionsCount:z,messages:d,placement:O,constrain:h,renderBeforeInput:c,renderAfterInput:s,isShowingOptions:W,onRequestShowOptions:this.handleShowOptions,onRequestHideOptions:this.handleBlurOrEsc,onRequestHighlightOption:this.handleHighlightOption,onRequestSelectOption:this.handleSelectOption,onInputChange:this.handleInputChange,onKeyDown:this.onKeyDown},Z(m)),W&&this.renderOptions())}},Yx.displayName="TimeSelect",Yx.componentId="TimeSelect",Yx.allowedProps=["renderLabel","defaultToFirstOption","value","defaultValue","id","format","step","interaction","placeholder","isRequired","isInline","width","optionsMaxWidth","mountNode","visibleOptionsCount","messages","placement","constrain","onChange","onFocus","onBlur","onShowOptions","onHideOptions","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","locale","timezone","allowNonStepInput","onInputChange"],Yx.propTypes=jx,Yx.defaultProps={defaultToFirstOption:!1,format:"LT",step:30,isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",renderEmptyOption:"---",allowNonStepInput:!1},Yx.contextType=bo,Ux=Yx))||Ux)||Ux;const $x={description:E.node.isRequired,dateRenderLabel:E.oneOfType([E.func,E.node]).isRequired,prevMonthLabel:E.string.isRequired,nextMonthLabel:E.string.isRequired,datePlaceholder:E.string,timePlaceholder:E.string,dateFormat:E.string,interaction:E.oneOf(["enabled","disabled","readonly"]),timeRenderLabel:E.oneOfType([E.func,E.node]).isRequired,timeStep:E.oneOf([5,10,15,20,30,60]),timeFormat:E.string,locale:E.string,timezone:E.string,invalidDateTimeMessage:E.oneOfType([E.string,E.func]).isRequired,showMessages:E.bool,messages:E.arrayOf(t.message),messageFormat:E.string,layout:E.oneOf(["stacked","columns","inline"]),rowSpacing:E.oneOf(["none","small","medium","large"]),colSpacing:E.oneOf(["none","small","medium","large"]),value:Se(Vr.iso8601,"onChange"),defaultValue:Vr.iso8601,renderWeekdayLabels:E.arrayOf(E.oneOfType([E.func,E.node])),isRequired:E.bool,onChange:E.func,dateInputRef:E.func,timeInputRef:E.func,onBlur:E.func,disabledDates:E.oneOfType([E.func,E.arrayOf(E.string)]),disabledDateTimeMessage:E.oneOfType([E.string,E.func]),allowNonStepInput:E.bool,reset:E.func,initialTimeForNewDate:function(e,o,p,t){const n=e[o];if(void 0===n||""===n)return null;return"string"!=typeof n||n.match(/^\d{2}:\d{2}$/)?null:new Error(`Invalid ${t} \`${o}\` \`${n}\` supplied to \`${p}\`, expected a HH:MM formatted string.`)}};var Kx,Qx,Jx,eI;let oI=U()((Qx=class extends u.Component{constructor(e){super(e),this.ref=null,this.handleRef=e=>{this.ref=e},this.reset=()=>this.setState(this.recalculateState()),this.handleDateTextChange=(e,o)=>{const p=this.tryParseDate(o.value);this.setState({dateInputText:o.value,dateInputTextChanged:!0,calendarSelectedDate:p||void 0,renderedDate:p?p.clone():Hr.now(this.locale(),this.timezone())})},this.handleDayClick=(e,{date:o})=>{const p=Hr.parse(o,this.locale(),this.timezone());this.updateStateBasedOnDateInput(p,e)},this.handleHideCalendar=e=>{e.persist(),window.setTimeout((()=>{if("Enter"===e.key)this.updateStateBasedOnDateInput(this.state.calendarSelectedDate,e);else{const o=this.tryParseDate(this.state.dateInputText);this.updateStateBasedOnDateInput(o,e)}this.setState({isShowingCalendar:!1,dateInputTextChanged:!1})}),0)},this.updateStateBasedOnTimeSelect=(e,o)=>{const p=this.state.iso?o.value:this.state.dateInputText,t=this.recalculateState(p,!0,!1);this.changeStateIfNeeded(t,e),this.setState({timeSelectValue:o.value})},this.changeStateIfNeeded=(e,o)=>{const p=e.dateInputText;if(this.props.isRequired&&!e.iso||p&&p.length>0&&!e.iso){const o="function"==typeof this.props.invalidDateTimeMessage?this.props.invalidDateTimeMessage(p||""):this.props.invalidDateTimeMessage;e.message={text:o,type:"error"}}var t,n,r;this.areDifferentDates(this.state.iso,e.iso)&&(null===(t=(n=this.props).onChange)||void 0===t||t.call(n,o,null===(r=e.iso)||void 0===r?void 0:r.toISOString()));this.setState(e)},this.areDifferentDates=(e,o)=>!(!e&&!o)&&(!e||!o||!e.isSame(o)),this.handleBlur=e=>{"function"==typeof this.props.onBlur&&window.setTimeout((()=>{var o,p;null===(o=(p=this.props).onBlur)||void 0===o||o.call(p,e)}),0)},this.handleShowCalendar=e=>{this.setState({isShowingCalendar:!0})},this.handleSelectNextDay=e=>{let o;o=this.state.calendarSelectedDate?this.state.calendarSelectedDate.clone():this.state.iso?this.state.iso.clone():Hr.now(this.locale(),this.timezone()),o.add({days:1}),this.setState({calendarSelectedDate:o,renderedDate:o.clone()})},this.handleSelectPrevDay=e=>{let o;o=this.state.calendarSelectedDate?this.state.calendarSelectedDate.clone():this.state.iso?this.state.iso.clone():Hr.now(this.locale(),this.timezone()),o.subtract({days:1}),this.setState({calendarSelectedDate:o,renderedDate:o.clone()})},this.handleRenderNextMonth=e=>{this.setState({renderedDate:this.state.renderedDate.clone().add({months:1})})},this.handleRenderPrevMonth=e=>{this.setState({renderedDate:this.state.renderedDate.clone().subtract({months:1})})},this.state=this.recalculateState(e.value||e.defaultValue)}componentDidMount(){var e,o;const p=this.recalculateState(this.props.value||this.props.defaultValue);this.setState(p),null===(e=(o=this.props).reset)||void 0===e||e.call(o,this.reset)}componentDidUpdate(e){(e.value!==this.props.value||e.defaultValue!==this.props.defaultValue||e.locale!==this.props.locale||e.timezone!==this.props.timezone||e.dateFormat!==this.props.dateFormat||e.messageFormat!==this.props.messageFormat||e.invalidDateTimeMessage!==this.props.invalidDateTimeMessage)&&this.setState((e=>({...this.recalculateState(this.props.value||this.props.defaultValue)})))}recalculateState(e,o=!1,p=!1){let t;if(e){const r=Hr.parse(e,this.locale(),this.timezone());if(r.isValid()){var n;if(p&&this.state.timeSelectValue){const e=Hr.parse(this.state.timeSelectValue,this.locale(),this.timezone());r.hour(e.hour()).minute(e.minute())}if(o&&this.state.iso&&r.date(this.state.iso.date()).month(this.state.iso.month()).year(this.state.iso.year()),this.props.initialTimeForNewDate&&(null===(n=this.state)||void 0===n||!n.timeSelectValue)){const e=Number(this.props.initialTimeForNewDate.slice(0,2)),o=Number(this.props.initialTimeForNewDate.slice(3,5));isNaN(e)||isNaN(o)?Q(!1,"[DateTimeInput] initialTimeForNewDate prop is not in the correct format. Please use HH:MM format."):e<0||e>23||o>59||o<0?Q(!1,"[DateTimeInput] 0 <= hour < 24 and 0 <= minute < 60 for initialTimeForNewDate prop."):r.hour(e).minute(o)}const e=r.toISOString();if(this.isDisabledDate(r)){let o="function"==typeof this.props.disabledDateTimeMessage?this.props.disabledDateTimeMessage(r.toISOString(!0)):this.props.disabledDateTimeMessage;return o||(o="function"==typeof this.props.invalidDateTimeMessage?this.props.invalidDateTimeMessage(r.toISOString(!0)):this.props.invalidDateTimeMessage),t=o?{text:o,type:"error"}:void 0,{iso:r.clone(),calendarSelectedDate:r.clone(),dateInputTextChanged:!1,dateInputText:r.format(this.dateFormat),message:t,timeSelectValue:e,renderedDate:r.clone()}}return{iso:r.clone(),calendarSelectedDate:r.clone(),dateInputTextChanged:!1,dateInputText:r.format(this.dateFormat),message:{type:"success",text:r.format(this.props.messageFormat)},timeSelectValue:e,renderedDate:r.clone()}}}const r=e?{}:{timeSelectValue:"",message:void 0};return{iso:void 0,calendarSelectedDate:void 0,dateInputText:e||"",renderedDate:Hr.now(this.locale(),this.timezone()),dateInputTextChanged:!1,...r}}locale(){return this.props.locale?this.props.locale:this.context&&this.context.locale?this.context.locale:Dr.browserLocale()}timezone(){return this.props.timezone?this.props.timezone:this.context&&this.context.timezone?this.context.timezone:Hr.browserTimeZone()}get dateFormat(){return this.props.dateFormat}isDisabledDate(e){const o=this.props.disabledDates;if(!o)return!1;if(Array.isArray(o)){for(const p of o)if(e.isSame(p,"day"))return!0;return!1}return o(e.toISOString())}tryParseDate(e){const o=Hr.parse(e,this.locale(),this.timezone());return o.isValid()?o:null}updateStateBasedOnDateInput(e,o){let p;if(!e||!this.state.timeSelectValue||this.state.dateInputText&&""!=this.state.dateInputText)p=e?this.recalculateState(null==e?void 0:e.toISOString(),!1,!0):this.recalculateState(this.state.dateInputText,!1,!0);else{const o=Hr.parse(this.state.timeSelectValue,this.locale(),this.timezone()),t=e.set({hour:o.hour(),minute:o.minute()});p=this.recalculateState(t.toISOString(),!1,!1)}this.changeStateIfNeeded(p,o)}renderDays(){const e=this.state.renderedDate,o=Hr.getFirstDayOfWeek(e.startOf("month")),p=[];for(let t=0;t{const p=o.toISOString();return f.createElement(Xx.Day,{key:p,date:p,isSelected:!!this.state.calendarSelectedDate&&o.isSame(this.state.calendarSelectedDate,"day"),isToday:o.isSame(Hr.now(this.locale(),this.timezone()),"day"),isOutsideMonth:!o.isSame(e,"month"),label:o.format("D MMMM YYYY"),onClick:this.handleDayClick,interaction:this.isDisabledDate(o)?"disabled":"enabled"},o.format("DD"))}))}get defaultWeekdays(){if(!this.state.isShowingCalendar)return[];const e=Hr.getLocalDayNamesOfTheWeek(this.locale(),"short"),o=Hr.getLocalDayNamesOfTheWeek(this.locale(),"long");return[f.createElement(Qr,{key:1,alt:o[0]},e[0]),f.createElement(Qr,{key:2,alt:o[1]},e[1]),f.createElement(Qr,{key:3,alt:o[2]},e[2]),f.createElement(Qr,{key:4,alt:o[3]},e[3]),f.createElement(Qr,{key:5,alt:o[4]},e[4]),f.createElement(Qr,{key:6,alt:o[5]},e[5]),f.createElement(Qr,{key:7,alt:o[6]},e[6])]}renderNextPrevMonthButton(e){if(this.state.isShowingCalendar)return f.createElement(ao,{size:"small",withBackground:!1,withBorder:!1,renderIcon:"prev"===e?Jx||(Jx=f.createElement(Be,{color:"primary"})):eI||(eI=f.createElement(we,{color:"primary"})),screenReaderLabel:"prev"===e?this.props.prevMonthLabel:this.props.nextMonthLabel})}render(){const e=this.props,o=e.description,p=e.datePlaceholder,t=e.timePlaceholder,n=e.dateRenderLabel,r=e.dateInputRef,s=e.timeRenderLabel,l=e.timeFormat,i=e.timeStep,a=e.timeInputRef,M=e.locale,b=e.timezone,z=e.showMessages,d=e.messages,O=e.layout,h=e.rowSpacing,A=e.colSpacing,u=e.isRequired,m=e.interaction,q=e.renderWeekdayLabels,R=e.allowNonStepInput;return f.createElement(c,{description:o,layout:O,rowSpacing:h,colSpacing:A,vAlign:"top",elementRef:this.handleRef,messages:[...z&&this.state.message?[this.state.message]:[],...d||[]]},f.createElement(Xx,{display:"block",value:this.state.dateInputText,onChange:this.handleDateTextChange,onBlur:this.handleBlur,inputRef:r,placeholder:p,renderLabel:n,renderWeekdayLabels:q||this.defaultWeekdays,onRequestShowCalendar:this.handleShowCalendar,onRequestHideCalendar:this.handleHideCalendar,isShowingCalendar:this.state.isShowingCalendar,renderNextMonthButton:this.renderNextPrevMonthButton("next"),renderPrevMonthButton:this.renderNextPrevMonthButton("prev"),onRequestSelectNextDay:this.handleSelectNextDay,onRequestSelectPrevDay:this.handleSelectPrevDay,onRequestRenderNextMonth:this.handleRenderNextMonth,onRequestRenderPrevMonth:this.handleRenderPrevMonth,isRequired:u,interaction:m,renderNavigationLabel:f.createElement("span",null,f.createElement("div",null,this.state.renderedDate.format("MMMM")),f.createElement("div",null,this.state.renderedDate.format("y")))},this.renderDays()),f.createElement(Gx,{value:this.state.timeSelectValue,onChange:this.updateStateBasedOnTimeSelect,placeholder:t,onBlur:this.handleBlur,renderLabel:s,locale:M,format:l,step:i,timezone:b,inputRef:a,interaction:m,allowNonStepInput:R}))}},Qx.displayName="DateTimeInput",Qx.DEFAULT_MESSAGE_FORMAT="LLLL",Qx.propTypes=$x,Qx.allowedProps=["description","dateRenderLabel","prevMonthLabel","nextMonthLabel","datePlaceholder","timePlaceholder","dateFormat","interaction","timeRenderLabel","timeStep","timeFormat","locale","timezone","invalidDateTimeMessage","showMessages","messages","messageFormat","layout","rowSpacing","colSpacing","value","defaultValue","renderWeekdayLabels","isRequired","onChange","dateInputRef","timeInputRef","onBlur","disabledDates","disabledDateTimeMessage","allowNonStepInput","reset"],Qx.defaultProps={layout:"inline",colSpacing:"medium",rowSpacing:"small",timeStep:30,showMessages:!0,messageFormat:Qx.DEFAULT_MESSAGE_FORMAT,isRequired:!1,dateFormat:"LL",allowNonStepInput:!1},Qx.contextType=bo,Kx=Qx))||Kx;const pI={label:E.string.isRequired,children:E.node,contentRef:E.func,onSizeChange:E.func,role:E.string};var tI,nI,rI;let cI=(tI=_(((e,o,p)=>{const t=p.shouldTransition?{transition:`margin ${e.duration}`}:{};return{drawerContent:{label:"drawerLayout__content",overflowY:e.overflowY,height:"100%",boxSizing:"content-box",...t}}}),(e=>{const o=e.transitions;return{duration:null==o?void 0:o.duration,overflowY:"auto"}})),tI(nI=U()((rI=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this._resizeListener=void 0,this._debounced=void 0,this.makeStyleProps=e=>({shouldTransition:e}),this.handleContentRef=e=>{this.ref=e,"function"==typeof this.props.contentRef&&this.props.contentRef(e)}}get _content(){return this.ref}componentDidMount(){var e,o;const p=ke(this.ref),t=p.width;"function"==typeof this.props.onSizeChange&&(this.props.onSizeChange({width:p.width,height:p.height}),this._debounced=De(this.props.onSizeChange,100,{leading:!1,trailing:!0})),this._resizeListener=new ResizeObserver((e=>{for(const p of e){const e={width:p.contentRect.width};var o;if(e.width!==t)null===(o=this._debounced)||void 0===o||o.call(this,e)}})),this._resizeListener.observe(this.ref),null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps(!1))}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps(!0))}componentWillUnmount(){var e,o;null===(e=this._resizeListener)||void 0===e||e.disconnect(),null===(o=this._debounced)||void 0===o||o.cancel()}render(){var o;const p=this.props,t=p.style,n=p.label,r=p.role;return Y("div",Object.assign({},pe(this.props,e.allowedProps),{role:r,style:t,ref:this.handleContentRef,"aria-label":n,css:null===(o=this.props.styles)||void 0===o?void 0:o.drawerContent}),this.props.children)}},rI.displayName="DrawerContent",rI.componentId="DrawerLayout.Content",rI.locatorAttribute="data-drawer-content",rI.propTypes=pI,rI.allowedProps=["label","children","contentRef","onSizeChange","role"],rI.defaultProps={role:"region"},nI=rI))||nI)||nI);const sI={label:E.string.isRequired,children:E.oneOfType([E.func,E.node]),render:E.func,placement:E.oneOf(["start","end"]),open:E.bool,onOpen:E.func,onClose:E.func,border:E.bool,shadow:E.bool,onTransition:E.func,onEnter:E.func,onEntering:E.func,onEntered:E.func,onExit:E.func,onExiting:E.func,onExited:E.func,contentRef:E.func,mountNode:E.oneOfType([_e,E.func]),defaultFocusElement:E.oneOfType([E.element,E.func]),liveRegion:E.oneOfType([_e,E.arrayOf(_e),E.func]),onDismiss:E.func,shouldContainFocus:E.bool,shouldReturnFocus:E.bool,shouldCloseOnDocumentClick:E.bool,shouldCloseOnEscape:E.bool,dir:E.oneOf(Object.values(le.DIRECTION))},lI=["label","children","render","placement","open","onOpen","onClose","border","shadow","onEnter","onEntering","onEntered","onExit","onExiting","onExited","contentRef","mountNode","defaultFocusElement","liveRegion","onDismiss","onTransition","shouldReturnFocus","shouldCloseOnEscape","shouldCloseOnDocumentClick","shouldContainFocus","styles"];var iI,aI,MI;let bI=(iI=_(((e,o,p)=>{const t=o.border,n=p.placement,r={start:{borderRightWidth:e.borderWidth},end:{borderLeftWidth:e.borderWidth}},c=t?{borderWidth:0,borderColor:e.borderColor,borderStyle:e.borderStyle,boxSizing:"border-box",...r[n]}:{boxSizing:"content-box"},s={position:"absolute",backgroundColor:e.background,zIndex:e.zIndex,overflowY:e.overflowY,overflowX:e.overflowX,...c,top:0,bottom:0,...{start:{left:0},end:{right:0}}[n]};return{drawerTray:{label:"drawerTray",...s},drawerTrayWithShadow:{label:"drawerTray--with-shadow",...s,boxShadow:e.boxShadow},drawerTrayContent:{label:"drawerTray__content",overflowY:e.contentOverflowY,height:"100%",boxSizing:"content-box"}}}),(e=>{var o,p;const t=e.colors,n=e.borders,r=e.stacking,c=e.shadows;return{...{background:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.white1010,borderColor:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.grey1214,borderWidth:null==n?void 0:n.widthSmall,borderStyle:null==n?void 0:n.style,zIndex:null==r?void 0:r.topmost,boxShadow:null==c?void 0:c.depth3,overflowX:"hidden",overflowY:"auto",contentOverflowY:"auto"}}})),iI(aI=le()(aI=U()((MI=class e extends u.Component{get _content(){return this.ref}constructor(e){super(e),this.ref=null,this._DOMNode=null,this.makeStyleProps=()=>({placement:this.placement}),this.handleContentRef=e=>{this.ref=e,"function"==typeof this.props.contentRef&&this.props.contentRef(e)},this.handleTransitionEntered=e=>{this.setState({transitioning:!1})},this.handleTransitionExited=e=>{this.setState({transitioning:!1})},this.handlePortalOpen=e=>{this.DOMNode=e,this.setState({portalOpen:!0})},this.state={transitioning:!1,portalOpen:!1}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps())}componentDidUpdate(e){var o,p;this.props.open!==e.open&&this.setState({transitioning:!0}),null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p,this.makeStyleProps())}get placement(){const e=this.props,o=e.placement;return e.dir===le.DIRECTION.rtl?je(o," "):o}get transition(){return"end"===this.placement?"fade":"slide-left"}get DOMNode(){return this._DOMNode}set DOMNode(e){this._DOMNode=e}renderContent(){const e=this.props,o=e.children,p=e.render;return"function"==typeof p?p():"function"==typeof o?o():o}render(){const o=this.props,p=o.label;o.children,o.render,o.placement;const t=o.open,n=o.onOpen,r=o.onClose;o.border;const c=o.shadow,s=o.onEnter,l=o.onEntering,i=o.onEntered,a=o.onExit,M=o.onExiting,b=o.onExited;o.contentRef;const z=o.mountNode,d=o.defaultFocusElement,O=o.liveRegion,h=o.onDismiss,A=o.onTransition,u=o.shouldReturnFocus,f=o.shouldCloseOnEscape,m=o.shouldCloseOnDocumentClick,q=o.shouldContainFocus,R=o.styles,W=P(o,lI);return Y(AI.Consumer,null,(o=>{var v;const g=this.state.portalOpen,y=o&&!!z,L=c&&o?null==R?void 0:R.drawerTrayWithShadow:null==R?void 0:R.drawerTray;let N=t;y&&!g&&(N=!1);const B=Y(ge,{in:N,type:this.transition,onTransition:A,onEnter:s,onEntering:l,onEntered:Ce(this.handleTransitionEntered,i,n),onExit:a,onExiting:M,onExited:Ce(this.handleTransitionExited,b,r),unmountOnExit:!0},Y("div",Object.assign({},pe(W,e.allowedProps),{ref:this.handleContentRef,css:L}),Y(Fe,{open:!0,role:o?"dialog":"region",label:p,shouldReturnFocus:u,shouldContainFocus:!this.state.transitioning&&q&&o,shouldCloseOnDocumentClick:m&&o,shouldCloseOnEscape:f&&o,defaultFocusElement:d,liveRegion:O,onDismiss:h,as:"div",css:null===(v=this.props.styles)||void 0===v?void 0:v.drawerTrayContent},this.renderContent())));return y?Y(Ue,{mountNode:z,open:!0,onOpen:this.handlePortalOpen},B):B}))}},MI.displayName="DrawerTray",MI.componentId="DrawerLayout.Tray",MI.locatorAttribute="data-drawer-tray",MI.propTypes=sI,MI.allowedProps=["label","children","render","placement","open","onOpen","onClose","border","shadow","onTransition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","contentRef","mountNode","defaultFocusElement","liveRegion","onDismiss","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","shouldCloseOnEscape","dir"],MI.defaultProps={shouldContainFocus:!0,shouldCloseOnEscape:!0,shouldCloseOnDocumentClick:!0,shouldReturnFocus:!0,open:!1,shadow:!0,border:!0,placement:"start"},aI=MI))||aI)||aI)||aI);const zI={children:Le.oneOfEach([cI,bI]),minWidth:E.string,onOverlayTrayChange:E.func,dir:E.oneOf(Object.values(le.DIRECTION))};var dI,OI;let hI=K()(dI=_((()=>({drawerLayout:{label:"drawerLayout",position:"relative",height:"100%"}})),null)(dI=le()(dI=U()((OI=class e extends u.Component{constructor(e){super(e),this._id=void 0,this._content=null,this._tray=null,this.ref=null,this.handleRef=e=>{this.ref=e},this.handleTrayContentRef=e=>{this._tray=e},this.handleContentSizeChange=({width:e})=>{this.setState(((o,p)=>{const t=this.getNextState(p.minWidth,o.trayWidth,e,o.shouldOverlayTray);return o.shouldOverlayTray!==t.shouldOverlayTray&&this.notifyOverlayTrayChange(t.shouldOverlayTray),t}))},this.handleTraySizeChange=({width:e})=>{this.setState(((o,p)=>{const t=this.getNextState(p.minWidth,e,o.contentWidth,!0);return o.shouldOverlayTray!==t.shouldOverlayTray&&this.notifyOverlayTrayChange(t.shouldOverlayTray),t}))},this.handleTrayTransitionEnter=()=>{let e=0;this._tray&&(e=ke(this._tray).width),this.handleTraySizeChange({width:e})},this.handleTrayTransitionExit=()=>{this.handleTraySizeChange({width:0})},this.state={shouldOverlayTray:!1,trayWidth:0,contentWidth:0},this._id=e.deterministicId()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}get trayProps(){return u.Children.toArray(this.props.children).filter((e=>Ie(e,[bI])))[0].props}get trayPlacement(){const e=this.trayProps,o=e.placement,p=e.dir;return(void 0===p?this.props.dir:p)===le.DIRECTION.rtl?je(o," "):o}get contentMargin(){const e=this.state.trayWidth||0;return this.state.shouldOverlayTray?0:e}get contentStyle(){let e=0,o=0;return this.shouldOverlayTray(this.props.minWidth,this.state.trayWidth,this.state.contentWidth,this.state.shouldOverlayTray)||("start"===this.trayPlacement&&(e=this.contentMargin),"end"===this.trayPlacement&&(o=this.contentMargin)),{marginLeft:`${e}px`,marginRight:`${o}px`}}shouldOverlayTray(e,o,p,t){if(!this._content)return!1;const n=Ee(e,this._content);return t?p-o{if(Ie(p,[bI]))return e++,ye(p,{label:p.props.label,key:p.props.label,[bI.locatorAttribute]:this._id,contentRef:this.handleTrayContentRef,onEnter:this.handleTrayTransitionEnter,onExit:this.handleTrayTransitionExit});if(Ie(p,[cI])){o++;const e=e=>{const o=p.props.contentRef;this._content=e,"function"==typeof o&&o(e)};return null!==this.state.trayWidth?ye(p,{label:p.props.label,key:p.props.label,[cI.locatorAttribute]:this._id,style:this.contentStyle,onSizeChange:Ce(this.handleContentSizeChange,p.props.onSizeChange),contentRef:e}):null}return p}));return Q(e<=1,"[DrawerLayout] Only one 'DrawerTray' per 'DrawerLayout' is supported."),Q(o<=1,"[DrawerLayout] Only one 'DrawerContent' per 'DrawerLayout' is supported."),p}render(){var o;const p={[e.locatorAttribute]:this._id};return Y(AI.Provider,{value:this.state.shouldOverlayTray},Y("div",Object.assign({},p,{css:null===(o=this.props.styles)||void 0===o?void 0:o.drawerLayout,ref:this.handleRef}),this.renderChildren()))}},OI.displayName="DrawerLayout",OI.componentId="DrawerLayout",OI.locatorAttribute="data-drawer-layout",OI.propTypes=zI,OI.allowedProps=["children","minWidth","onOverlayTrayChange","dir"],OI.defaultProps={minWidth:"30rem"},OI.Content=cI,OI.Tray=bI,dI=OI))||dI)||dI)||dI)||dI;const AI=u.createContext(!1),uI={mode:E.oneOf(["view","edit"]).isRequired,onChangeMode:E.func.isRequired,children:E.func,render:E.func,value:E.any,onChange:E.func,readOnly:E.bool,elementRef:E.func};class fI extends u.Component{constructor(e){super(e),this.state={showModeToggle:!1,valueOnEdit:null},this._editorRef=null,this._editButtonRef=null,this.handleEditESC=e=>{"Escape"===e.key&&(e.stopPropagation(),this.enterView())},this.handleViewMouseOver=e=>{"view"===this.props.mode&&(e.stopPropagation(),this.setState({showModeToggle:!0}))},this.handleViewMouseOut=e=>{"view"===this.props.mode&&(e.stopPropagation(),this.setState({showModeToggle:document.activeElement===this._editButtonRef}))},this.handleViewClick=e=>{1===e.buttons&&Ye((()=>{this.enterEdit()}))},this.handleEditBlur=()=>{this.enterView()},this.handleEditButtonFocus=()=>{this.setState({showModeToggle:!0})},this.handleEditButtonBlur=()=>{this.setState({showModeToggle:!1})},this.handleEditButtonClick=()=>{this.enterEdit()},this.ref=null,this.handleContainerRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.getContainerProps=(e={})=>{const o=this.props,p=o.mode,t=o.readOnly;return{onMouseOver:this.handleViewMouseOver,onMouseOut:this.handleViewMouseOut,onMouseDown:"edit"!==p?this.handleViewClick:void 0,onKeyUp:"edit"===p?this.handleEditESC:void 0,readOnly:t,...e,ref:this.handleContainerRef}},this.getViewerProps=(e={})=>({mode:this.props.mode,readOnly:this.props.readOnly,...e}),this.getEditorProps=(e={})=>({mode:this.props.mode,onBlur:this.handleEditBlur,editorRef:e=>{this._editorRef=e},readOnly:this.props.readOnly,...e}),this.getEditButtonProps=(e={})=>({onClick:this.handleEditButtonClick,onFocus:this.handleEditButtonFocus,onBlur:this.handleEditButtonBlur,isVisible:this.state.showModeToggle,buttonRef:e=>{this._editButtonRef=e},readOnly:this.props.readOnly,...e}),ce(!e.readOnly||"view"===e.mode,'[Editable] When readOnly is true, mode must be "view"')}componentDidMount(){"edit"===this.props.mode&&this.focusEditor()}componentDidUpdate(e){const o=this.props,p=o.mode,t=o.value,n=o.onChange;"edit"!==e.mode&&"edit"===p&&(this.setState({valueOnEdit:t}),this.focusEditor()),"edit"===e.mode&&"edit"!==p&&(this._editButtonRef&&this._editButtonRef.focus(),n&&!ie(this.state.valueOnEdit,t)&&n(t))}focusEditor(){ce(!!this._editorRef&&!this.props.readOnly,"[Editable] Did you forget to connect editorRef to your editor component?"),this._editorRef&&this._editorRef.focus()}enterView(){"view"!==this.props.mode&&(this.setState({showModeToggle:!0}),this.props.onChangeMode("view"))}enterEdit(){this.props.readOnly||(this.setState({showModeToggle:!1}),"edit"!==this.props.mode&&this.props.onChangeMode("edit"))}render(){const e=this.props,o=e.children,p=e.render,t=void 0===p?o:p,n=e.mode;return"function"==typeof t?t({mode:n,getContainerProps:this.getContainerProps,getViewerProps:this.getViewerProps,getEditorProps:this.getEditorProps,getEditButtonProps:this.getEditButtonProps}):null}}fI.displayName="Editable",fI.propTypes=uI,fI.allowedProps=["mode","onChangeMode","children","render","value","onChange","readOnly","elementRef"],fI.defaultProps={readOnly:!1,children:null};const mI={children:E.node,as:E.elementType,elementRef:E.func,margin:D.spacing,padding:D.spacing,align:E.oneOf(["center","start","end","stretch"]),direction:E.oneOf(["row","column"]),textAlign:E.oneOf(["start","center","end"]),overflowX:E.oneOf(["auto","hidden","visible"]),overflowY:E.oneOf(["auto","hidden","visible"]),shouldGrow:E.bool,shouldShrink:E.bool,size:E.string,withVisualDebug:E.bool};var qI,RI;let WI=_(((e,o)=>{const p=o.shouldGrow,t=o.shouldShrink,n=o.align;return{flexItem:{label:"flexItem",boxSizing:"border-box",minWidth:"0.0625rem",flexBasis:o.size,flexShrink:t?1:0,...p&&{flexGrow:1},...n&&{alignSelf:{start:"flex-start",end:"flex-end",center:"center",stretch:"stretch"}[n]}}}}),null)((RI=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){const o=pe(this.props,e.allowedProps),p=this.props,t=p.as,n=p.children,r=p.withVisualDebug,c=p.textAlign,s=p.size,l=p.direction,i=p.margin,a=p.padding,M=p.overflowX,b=p.overflowY,z=p.styles,d="column"===l,O="row"===l;return Y(J,Object.assign({},o,{css:null==z?void 0:z.flexItem,elementRef:this.handleRef,as:t,minHeight:d?s:void 0,minWidth:O?s:void 0,textAlign:c,margin:i,padding:a,overflowX:M,overflowY:b||(d?"auto":"visible"),withVisualDebug:r}),n)}},RI.displayName="Item",RI.componentId="Flex.Item",RI.propTypes=mI,RI.allowedProps=["children","as","elementRef","margin","padding","align","direction","textAlign","overflowX","overflowY","shouldGrow","shouldShrink","size","withVisualDebug"],RI.defaultProps={as:"span",shouldGrow:!1,shouldShrink:!1},qI=RI))||qI;const vI={children:E.oneOfType([E.node,E.func]),as:E.elementType,elementRef:E.func,height:E.oneOfType([E.string,E.number]),width:E.oneOfType([E.string,E.number]),margin:D.spacing,padding:D.spacing,gap:D.spacing,display:E.oneOf(["flex","inline-flex"]),textAlign:E.oneOf(["start","center","end"]),direction:E.oneOf(["row","column","row-reverse","column-reverse"]),alignItems:E.oneOf(["center","start","end","stretch"]),justifyItems:E.oneOf(["center","start","end","space-around","space-between"]),wrap:E.oneOf(["wrap","no-wrap","wrap-reverse"]),withVisualDebug:E.bool};var gI,yI,LI;let NI=(gI=_(((e,o)=>{const p=o.justifyItems,t=o.wrap,n=o.direction,r=o.gap,c=o.alignItems||("column"===n||"column-reverse"===n?"stretch":"center");return{flex:{label:"flex",fontFamily:e.fontFamily,boxSizing:"border-box",alignItems:{center:"center",start:"flex-start",end:"flex-end",stretch:"stretch"}[c],justifyContent:{start:"flex-start",end:"flex-end",center:"center","space-around":"space-around","space-between":"space-between"}[p],flexWrap:{wrap:"wrap","wrap-reverse":"wrap-reverse","no-wrap":void 0}[t],flexDirection:{column:"column","column-reverse":"column-reverse",row:"row","row-reverse":"row-reverse"}[n],gap:((e,o)=>Me("Flex",o,e,"gap"))(r,e)}}}),(e=>{const o=e.typography,p=e.spacing;return{...{fontFamily:null==o?void 0:o.fontFamily,...be("gap",p)}}})),gI((LI=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}renderChildren(e){return u.Children.map(e,(e=>e?Ie(e,["Item"])?ye(e,{withVisualDebug:this.props.withVisualDebug,...e.props,direction:this.props.direction.replace(/-reverse/,"")}):e:null))}render(){const e=this.props,o=e.as,p=e.withVisualDebug,t=e.height,n=e.display,r=e.margin,c=e.padding,s=e.textAlign,l=e.width,i=e.styles,a=e.gap,M=(e.wrap,$(this.props.children));return(null==a?void 0:a.split(" ")).length,M&&u.Children.count(M)>0?Y(J,Object.assign({},Z(this.props),{css:null==i?void 0:i.flex,elementRef:this.handleRef,as:o,display:n,width:l,height:t,margin:r,padding:c,textAlign:s,withVisualDebug:p}),this.renderChildren(M)):null}},LI.displayName="Flex",LI.componentId="Flex",LI.Item=WI,LI.propTypes=vI,LI.allowedProps=["children","as","elementRef","height","width","margin","padding","display","textAlign","direction","alignItems","justifyItems","wrap","withVisualDebug"],LI.defaultProps={as:"span",direction:"row",justifyItems:"start",display:"flex",withVisualDebug:!1,wrap:"no-wrap",gap:"none"},yI=LI))||yI);const BI={renderViewer:E.func.isRequired,renderEditor:E.func.isRequired,renderEditButton:E.func.isRequired,mode:E.oneOf(["view","edit"]).isRequired,onChangeMode:E.func.isRequired,value:E.any,onChange:E.func,readOnly:E.bool,showFocusRing:E.bool,editButtonPlacement:E.oneOf(["start","end"]),inline:E.bool};var wI,CI;let TI=_((()=>({inPlaceEdit:{label:"inPlaceEdit",boxSizing:"border-box",maxWidth:"100%",position:"relative",overflow:"visible",direction:"inherit",margin:0,textDecoration:"none",textAlign:"inherit",userSelect:"none",touchAction:"manipulation",background:"transparent",border:"none",outline:"none"}})),null)(((CI=class extends u.Component{constructor(e){super(e),this.ref=null,this._editButtonRef=null,this.handleRef=e=>{this.ref=e},this.handleEditButtonRef=e=>{this._editButtonRef=e},this.renderAll=({getContainerProps:e,getViewerProps:o,getEditorProps:p,getEditButtonProps:t})=>{const n="start"===this.props.editButtonPlacement?"row-reverse":"row",r="row-reverse"===n?"end":"start",c="start"===this.props.editButtonPlacement?"0 xx-small 0 0":"0 0 0 xx-small";return Y(NI,Object.assign({display:this.props.inline?"inline-flex":"flex",direction:n,justifyItems:r},e()),Y(NI.Item,{shouldGrow:!0,shouldShrink:!0},this.renderEditor(p()),this.renderViewer(o())),Y(NI.Item,{margin:c},this.renderEditButton(t())))},ce(!e.readOnly||"view"===e.mode,'[InPlaceEdit] When readOnly is true, mode is forced to "view"')}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}renderEditor({mode:e,onBlur:o,editorRef:p,readOnly:t}){var n;const r=this.props,c=r.showFocusRing,s=r.renderEditor;return!t&&"edit"===e?Y(J,{as:"span",display:"block",withFocusOutline:c,position:"relative",css:null===(n=this.props.styles)||void 0===n?void 0:n.inPlaceEdit,borderRadius:"medium",margin:"auto"},s({onBlur:o,editorRef:p})):null}renderViewer({readOnly:e,mode:o}){return e||"view"===o?this.props.renderViewer():null}renderEditButton({buttonRef:e,...o}){return this.props.renderEditButton({elementRef:Ce(this.handleEditButtonRef,e),...o})}render(){const e=this.props,o=e.mode,p=e.value,t=e.onChange,n=e.onChangeMode,r=e.readOnly;return Y(fI,{mode:o,onChangeMode:n,render:this.renderAll,value:p,onChange:t,readOnly:r,elementRef:this.handleRef})}}).displayName="InPlaceEdit",CI.componentId="InPlaceEdit",CI.propTypes=BI,CI.allowedProps=["renderViewer","renderEditor","renderEditButton","mode","onChangeMode","value","onChange","readOnly","showFocusRing","editButtonPlacement","inline"],CI.defaultProps={readOnly:!1,showFocusRing:!0,inline:!0,editButtonPlacement:"end"},CI.renderDefaultEditButton=({isVisible:e,readOnly:o,label:p,...t})=>o?null:Y(ao,Object.assign({size:"small",screenReaderLabel:p,withBackground:!1,withBorder:!1},t),e?Jm:null),wI=CI))||wI;function SI(e){return(Array.isArray(e)?e:e.split(",")).map((e=>e.trim().replace(/^\w+$/,".$&")))}const xI={id:E.string,renderLabel:E.oneOfType([E.func,E.node]).isRequired,accept:E.oneOfType([E.string,E.arrayOf(E.string)]),messages:E.arrayOf(t.message),onClick:E.func,onDrop:E.func,onDropAccepted:E.func,onDropRejected:E.func,onDragEnter:E.func,onDragOver:E.func,onDragLeave:E.func,shouldEnablePreview:E.bool,shouldAllowMultiple:E.bool,shouldAllowRepeats:E.bool,maxSize:E.number,minSize:E.number,interaction:E.oneOf(["enabled","disabled","readonly"]),display:E.oneOf(["block","inline-block"]),height:E.oneOfType([E.string,E.number]),width:E.oneOfType([E.string,E.number]),maxWidth:E.oneOfType([E.string,E.number]),minWidth:E.oneOfType([E.string,E.number]),margin:D.spacing},II=["display","height","width","minWidth","maxWidth","margin","onDropAccepted","onDropRejected"];var EI,PI,XI,HI;let ZI=(EI=K(),PI=_(((e,o,p)=>{const t=o.height,n=p.functionallyDisabled,r=p.visuallyDisabled,c=p.dragRejected,s=p.dragAccepted,l=s?{borderColor:e.acceptedColor}:{},i=c?{borderColor:e.rejectedColor}:{},a=n?{cursor:"not-allowed",pointerEvents:"none"}:{},M=r?{opacity:.5}:{},b=t?{height:"100%"}:{},z=s||c?{}:{borderColor:e.hoverBorderColor};return{fileDropLabel:{label:"fileDrop__label",display:"block",boxSizing:"border-box",position:"relative",...b,...a,...M},fileDropInput:{label:"fileDrop__input",width:"0.0625rem",height:"0.0625rem",margin:"-0.0625rem",padding:0,position:"absolute",overflow:"hidden",clip:"rect(0 0 0 0)",border:0},fileDropLabelContent:{label:"fileDrop__labelContent",display:"block",boxSizing:"border-box",zIndex:1,textAlign:"center",borderRadius:e.borderRadius,border:`${e.borderWidth} ${e.borderStyle} ${e.borderColor}`,cursor:"pointer","&:hover":{...z},...b,...l,...i},fileDropLayout:{label:"fileDrop__layout",display:"block",overflow:"hidden",borderRadius:e.borderRadius,...b}}}),(e=>{var o,p,t,n,r;const c=e.colors,s=e.borders,l=e.key,i={canvas:{hoverBorderColor:e["ic-brand-primary"],acceptedColor:e["ic-brand-primary"]}};return{...{backgroundColor:null==c||null===(o=c.contrasts)||void 0===o?void 0:o.white1010,borderRadius:null==s?void 0:s.radiusLarge,borderWidth:null==s?void 0:s.widthMedium,borderStyle:"dashed",borderColor:null==c||null===(p=c.contrasts)||void 0===p?void 0:p.grey1214,hoverBorderColor:null==c||null===(t=c.contrasts)||void 0===t?void 0:t.blue4570,acceptedColor:null==c||null===(n=c.contrasts)||void 0===n?void 0:n.blue4570,rejectedColor:null==c||null===(r=c.contrasts)||void 0===r?void 0:r.red4570},...i[l]}})),EI(XI=PI(XI=U()((HI=class extends u.Component{constructor(e){super(e),this.makeStyleProps=()=>({functionallyDisabled:this.functionallyDisabled,visuallyDisabled:"disabled"===this.interaction,dragRejected:this.state.isDragRejected||this.invalid,dragAccepted:this.state.isDragAccepted}),this.state={isDragAccepted:!1,isDragRejected:!1,isFocused:!1,isFileBrowserDisplayed:!1},this.enterCounter=0,this.fileInputEl=void 0,this.defaultId=null,this.messagesId="",this.ref=null,this.handleElementRef=e=>{this.ref=e},this.handleDragEnter=e=>{var o,p;if(e.preventDefault(),this.enterCounter+=1,this.enterCounter>1)return;const t=this.allFilesAccepted(this.getDataTransferItems(e));this.setState({isDragAccepted:t,isDragRejected:!t}),null===(o=(p=this.props).onDragEnter)||void 0===o||o.call(p,e)},this.handleDragOver=e=>{var o,p;e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect="copy"}catch(t){}return null===(o=(p=this.props).onDragOver)||void 0===o||o.call(p,e),!1},this.handleDragLeave=e=>{var o,p;e.preventDefault(),this.enterCounter-=1,this.enterCounter>0||(this.setState({isDragAccepted:!1,isDragRejected:!1}),null===(o=(p=this.props).onDragLeave)||void 0===o||o.call(p,e))},this.handleChange=e=>{const o=this.props,p=o.onDrop,t=o.onDropAccepted,n=o.onDropRejected,r=o.shouldEnablePreview,c=this.getDataTransferItems(e,r),s=this.parseFiles(c),l=se(s,2),i=l[0],a=l[1];e.preventDefault(),this.enterCounter=0,p&&p(i,a,e),a.length>0&&n&&n(a,e),i.length>0&&t&&t(i,e),this.setState({isDragAccepted:!1,isDragRejected:!1,isFileBrowserDisplayed:!1})},this.fileAccepted=e=>!this.props.accept||function(e,o){if(e&&o&&"application/x-moz-file"!==e.type){const p=SI(o),t=e.type||"",n=t.replace(/\/.*$/,"");return p.some((o=>"."===o.charAt(0)?e.name?e.name.toLowerCase().endsWith(o.toLowerCase()):t.endsWith(o.slice(1)):/\/\*$/.test(o)?n===o.replace(/\/.*$/,""):t===o))}return!0}(e,this.props.accept),this.handleRef=e=>{this.fileInputEl=e},this.handleBlur=()=>{this.setState({isFocused:!1,isFileBrowserDisplayed:!1})},this.handleFocus=()=>{this.setState({isFocused:!0,isFileBrowserDisplayed:!1})},this.handleClick=e=>{var o;this.fileInputEl.value&&this.props.shouldAllowRepeats&&(this.fileInputEl.value=null),null===(o=this.fileInputEl)||void 0===o||o.focus(),this.props.onClick(e),this.setState({isFileBrowserDisplayed:!0})},this.handleKeyDown=e=>{this.state.isFocused&&function(e){return e.keyCode===ve.codes.space||e.keyCode===ve.codes.enter}(e)&&this.props.shouldAllowRepeats&&(this.fileInputEl.value=null)},this.handleKeyUp=e=>{e.keyCode===ve.codes.esc&&this.state.isFileBrowserDisplayed&&(e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),this.setState({isFileBrowserDisplayed:!1}))},this.defaultId=e.deterministicId(),this.messagesId=e.deterministicId("FileDrop-messages")}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps())}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps())}convertToFile(e){return e instanceof DataTransferItem?e.getAsFile():e}get functionallyDisabled(){return"disabled"===this.interaction||"readonly"===this.interaction}get interaction(){return fe({props:this.props})}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get invalid(){return!!this.hasMessages&&this.props.messages.findIndex((e=>"error"===e.type))>=0}getDataTransferItems(e,o){let p=[];return Array.from(function(e,o){if("dataTransfer"in e){const o=e.dataTransfer;if(o){if(o.files&&o.files.length)return o.files;if(o.items&&o.items.length)return o.items}}else if(o&&o.files)return o.files;return[]}(e,this.fileInputEl)).forEach((e=>{const o=this.convertToFile(e);o&&p.push(o)})),p.length>1&&(p=this.props.shouldAllowMultiple?p:[p[0]]),o?p.map((e=>Object.assign(e,{preview:window.URL.createObjectURL(e)}))):p}parseFiles(e){const o=[],p=[];return e.forEach((e=>{const t=this.convertToFile(e);t&&this.fileAccepted(t)&&this.fileMatchSize(t)?o.push(e):p.push(e)})),[o,p]}fileMatchSize(e){return e.size<=this.props.maxSize&&e.size>=this.props.minSize}allFilesAccepted(e){return e.every(this.fileAccepted)}acceptStr(){const e=this.props.accept;return e?SI(e).join(","):void 0}renderLabel(){const e=this.props.renderLabel;return $(e,{isDragAccepted:this.state.isDragAccepted,isDragRejected:this.state.isDragRejected,interaction:this.interaction})}render(){var e,o,p,t;const n=this.props,c=n.display,s=n.height,l=n.width,i=n.minWidth,a=n.maxWidth,M=n.margin;n.onDropAccepted,n.onDropRejected;const b=P(n,II),z=this.props.id||this.defaultId,d=this.state.isDragRejected||this.invalid?"danger":void 0;return Y(J,{display:c,position:"relative",width:l,minWidth:i,maxWidth:a,margin:M,height:s,elementRef:this.handleElementRef},Y("label",{css:null===(e=this.props.styles)||void 0===e?void 0:e.fileDropLabel,htmlFor:z,onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleChange},Y(J,{display:"block",position:"relative",withFocusOutline:this.state.isFocused,borderRadius:"large",focusColor:d,height:s},Y("span",{css:null===(o=this.props.styles)||void 0===o?void 0:o.fileDropLabelContent},Y("span",{css:null===(p=this.props.styles)||void 0===p?void 0:p.fileDropLayout},Y(J,{height:s},this.renderLabel()))))),Y("input",Object.assign({},Z(b),{onClick:this.handleClick,type:"file",css:null===(t=this.props.styles)||void 0===t?void 0:t.fileDropInput,id:z,ref:this.handleRef,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,multiple:this.props.shouldAllowMultiple,accept:this.acceptStr(),onChange:this.handleChange,"aria-describedby":this.hasMessages?this.messagesId:void 0,"aria-invalid":this.invalid,disabled:this.functionallyDisabled})),this.hasMessages?Y(J,{display:"block",margin:"small 0 0"},Y(r,{id:this.messagesId,messages:this.props.messages})):null)}},HI.displayName="FileDrop",HI.componentId="FileDrop",HI.propTypes=xI,HI.allowedProps=["id","renderLabel","accept","messages","onClick","onDrop","onDropAccepted","onDropRejected","onDragEnter","onDragOver","onDragLeave","shouldEnablePreview","shouldAllowMultiple","shouldAllowRepeats","maxSize","minSize","interaction","display","height","width","maxWidth","minWidth","margin"],HI.defaultProps={onClick:function(e){},shouldEnablePreview:!1,shouldAllowMultiple:!1,shouldAllowRepeats:!0,maxSize:1/0,minSize:0,messages:[],display:"block"},XI=HI))||XI)||XI)||XI);const VI={src:E.string.isRequired,alt:E.string,display:E.oneOf(["inline-block","block"]),loading:E.oneOf(["eager","lazy"]),margin:D.spacing,overlay:E.shape({color:E.string.isRequired,opacity:E.oneOf([0,1,2,3,4,5,6,7,8,9,10]).isRequired,blend:E.oneOf(["normal","multiply","screen","overlay","color-burn"])}),withGrayscale:E.bool,withBlur:E.bool,constrain:E.oneOf(["cover","contain"]),elementRef:E.func,height:E.oneOfType([E.string,E.number]),width:E.oneOfType([E.string,E.number])},kI=["src","alt","margin","display","overlay","withGrayscale","withBlur","constrain","width","height","elementRef","styles","loading"];var DI,_I;let jI=_(((e,o)=>{const p=o.overlay,t=o.withBlur,n=o.withGrayscale,r=o.constrain,c="cover"===r,s="contain"===r,l={transition:`all ${e.effectTransitionDuration}`},i={width:"100%",height:"100%"},a={objectFit:"cover",...i},M={objectFit:"contain",...i,...p&&{width:"auto",height:"auto",maxWidth:"100%",maxHeight:"100%"}};return{overlay:{label:"img__overlay",position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",...l,...p&&{backgroundColor:p.color,opacity:.1*p.opacity,mixBlendMode:p.blend?p.blend:void 0}},container:{label:"img__container",...p&&{position:"relative",overflow:"hidden"},...c&&i,...s&&{height:"inherit"}},img:{label:"img",margin:"0",padding:"0",float:"none",top:"auto",bottom:"auto",left:"auto",right:"auto",lineHeight:"normal",position:"static",transform:"none",maxHeight:"none",minHeight:"0",minWidth:"0",maxWidth:"100%",...(()=>{const o=[];return t&&o.push(`blur(${e.imageBlurAmount})`),n&&o.push("grayscale(1)"),o.length>0?{...l,filter:o.join(" ")}:{filter:"none"}})(),...p&&{display:"block"},...c&&a,...s&&M}}}),(()=>({effectTransitionDuration:"1s",imageBlurAmount:"0.25em"})))(DI=U()(((_I=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){const e=this.props,o=e.src,p=e.alt,t=e.margin,n=e.display,r=e.overlay;e.withGrayscale,e.withBlur,e.constrain;const c=e.width,s=e.height;e.elementRef;const l=e.styles,i=e.loading,a=P(e,kI),M={alt:p||""},b={css:null==l?void 0:l.img,src:o,loading:i},z={...Z(a),width:c,height:s,margin:t,display:n,elementRef:this.handleRef};if(r){const e={...z};return Y(J,Object.assign({},e,{as:"span",css:null==l?void 0:l.container}),Y("img",Object.assign({},b,M)),r&&Y("span",{css:null==l?void 0:l.overlay}))}return Y(J,Object.assign({},z,b,M,{as:"img"}))}}).displayName="Img",_I.componentId="Img",_I.propTypes=VI,_I.allowedProps=["src","alt","display","loading","margin","overlay","withGrayscale","withBlur","constrain","elementRef","height","width"],_I.defaultProps={alt:"",display:"inline-block",withGrayscale:!1,withBlur:!1},DI=_I))||DI)||DI;const FI=u.createContext({registerMenuItem:e=>{},removeMenuItem:e=>{}}),UI={children:E.node.isRequired,defaultSelected:E.bool,selected:Se(E.bool,"onSelect","defaultSelected"),onSelect:E.func,onClick:E.func,onKeyDown:E.func,onKeyUp:E.func,onMouseOver:E.func,controls:E.string,disabled:E.bool,as:E.elementType,type:E.oneOf(["button","checkbox","radio","flyout"]),value:E.oneOfType([E.string,E.number]),href:E.string,target:E.string,renderLabelInfo:E.node};var YI,GI,$I,KI,QI,JI;let eE=(YI=K(),GI=_(((e,o)=>{const p=o.type,t=o.disabled,n="checkbox"===p||"radio"===p,r="flyout"===p?{insetInlineStart:"auto",insetInlineEnd:e.iconPadding}:{},c=n?{paddingInlineStart:e.labelPadding}:{},s=n?{insetInlineStart:e.iconPadding,insetInlineEnd:"auto"}:{},l=t?{cursor:"not-allowed",pointerEvents:"none",opacity:.5}:{},i={textDecoration:"none"};return{menuItem:{label:"menuItem",position:"relative",border:"none",outline:"none",padding:e.padding,margin:"0",width:"100%",borderRadius:"initial",boxSizing:"border-box",textAlign:"start",cursor:"pointer",userSelect:"none",fontFamily:e.fontFamily,fontWeight:e.fontWeight,lineHeight:e.lineHeight,fontSize:e.fontSize,background:e.background,transition:"background 0.2s",display:"block",textDecoration:"none",...c,"&:focus, &:active, &:hover":{background:e.activeBackground,'[class*="menuItem__label"]':{color:e.activeLabelColor},'[class*="menuItem__icon"]':{color:e.activeIconColor}},"&::-moz-focus-inner":{padding:"0",margin:"0",border:"0"},...l,"&:is(a)":{"&, &:link, &:visited, &:active, &:hover, &:focus":i},"&:-webkit-any(a)":{"&, &:link, &:visited, &:active, &:hover, &:focus":i}},icon:{label:"menuItem__icon",position:"absolute",display:"flex",alignItems:"center",top:"0",width:"1em",height:"100%",color:e.iconColor,...s,...r},labelInfo:{label:"menuItem__labelInfo",height:"100%",float:"right",clear:"right",paddingRight:"1.75rem"},label:{label:"menuItem__label",color:e.labelColor}}}),(e=>{var o,p,t,n,r,c;const s=e.colors,l=e.typography,i=e.spacing,a=e.key,M={canvas:{labelColor:e["ic-brand-font-color-dark"],iconColor:e["ic-brand-font-color-dark"],activeBackground:e["ic-brand-primary"]}};return{...{padding:`${null==i?void 0:i.xSmall} ${null==i?void 0:i.small}`,fontFamily:null==l?void 0:l.fontFamily,fontWeight:null==l?void 0:l.fontWeightNormal,lineHeight:null==l?void 0:l.lineHeightCondensed,fontSize:null==l?void 0:l.fontSizeMedium,labelPadding:null==i?void 0:i.large,labelColor:null==s||null===(o=s.contrasts)||void 0===o?void 0:o.grey125125,background:null==s||null===(p=s.contrasts)||void 0===p?void 0:p.white1010,iconColor:null==s||null===(t=s.contrasts)||void 0===t?void 0:t.grey125125,iconPadding:null==i?void 0:i.small,activeBackground:null==s||null===(n=s.contrasts)||void 0===n?void 0:n.blue4570,activeLabelColor:null==s||null===(r=s.contrasts)||void 0===r?void 0:r.white1010,activeIconColor:null==s||null===(c=s.contrasts)||void 0===c?void 0:c.white1010},...M[a]}})),YI($I=GI($I=U()((KI=class e extends u.Component{constructor(e){super(e),this.labelId=void 0,this.ref=null,this.handleRef=e=>{this.ref=e},this.handleClick=e=>{const o=this.props,p=o.onSelect,t=o.onClick,n=o.disabled,r=o.value,c=!this.selected;n?e.preventDefault():(void 0===this.props.selected&&this.setState({selected:c}),"function"==typeof p&&(e.persist(),p(e,r,c,this)),"function"==typeof t&&t(e))},this.handleKeyDown=e=>{const o=e.keyCode===ve.codes.space,p=e.keyCode===ve.codes.enter;if((o||p)&&(e.preventDefault(),e.stopPropagation(),p)){ze(this.ref).click()}},this.handleKeyUp=e=>{const o=e.keyCode===ve.codes.space,p=e.keyCode===ve.codes.enter;if((o||p)&&(e.preventDefault(),e.stopPropagation(),o)){ze(this.ref).click()}},this.handleMouseOver=e=>{this.focus(),"function"==typeof this.props.onMouseOver&&this.props.onMouseOver(e,this)},void 0===e.selected&&(this.state={selected:!!e.defaultSelected}),this.labelId=e.deterministicId("MenuItem__label")}get _node(){return this.ref}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o);const p=this.context;p&&p.registerMenuItem&&p.registerMenuItem(this)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentWillUnmount(){const e=this.context;e&&e.removeMenuItem&&e.removeMenuItem(this)}get elementType(){return X(e,this.props)}get role(){switch(this.props.type){case"checkbox":return"menuitemcheckbox";case"radio":return"menuitemradio";case"flyout":return"button";default:return"menuitem"}}get selected(){return void 0===this.props.selected?this.state.selected:this.props.selected}get focused(){return xe(this.ref)}focus(){ze(this.ref).focus()}renderContent(){var e,o,p,t;const n=this.props,r=n.children,c=n.type,s=n.renderLabelInfo;return Y("span",null,("checkbox"===c||"radio"===c)&&Y("span",{css:null===(e=this.props.styles)||void 0===e?void 0:e.icon},this.selected&&(QI||(QI=Y(Te,null)))),Y("span",{css:null===(o=this.props.styles)||void 0===o?void 0:o.label,id:this.labelId},r),"flyout"===c&&Y("span",{css:null===(p=this.props.styles)||void 0===p?void 0:p.icon},JI||(JI=Y(we,null))),s&&Y("span",{css:null===(t=this.props.styles)||void 0===t?void 0:t.labelInfo},$(s)))}render(){var o;const p=this.props,t=p.disabled,n=p.controls,r=p.onKeyDown,c=p.onKeyUp,s=p.type,l=p.href,i=pe(this.props,e.allowedProps),a=this.elementType;return Y(a,Object.assign({tabIndex:-1},i,{href:l,role:this.role,"aria-labelledby":this.labelId,"aria-disabled":t?"true":void 0,"aria-controls":n,"aria-checked":"checkbox"===s||"radio"===s?this.selected?"true":"false":void 0,onClick:this.handleClick,onKeyUp:Ce(c,this.handleKeyUp),onKeyDown:Ce(r,this.handleKeyDown),ref:this.handleRef,css:null===(o=this.props.styles)||void 0===o?void 0:o.menuItem,onMouseOver:this.handleMouseOver}),this.renderContent())}},KI.displayName="MenuItem",KI.componentId="Menu.Item",KI.propTypes=UI,KI.allowedProps=["children","defaultSelected","selected","onSelect","onClick","onKeyDown","onKeyUp","onMouseOver","controls","disabled","as","type","value","href","target","renderLabelInfo"],KI.defaultProps={type:"button",disabled:!1},KI.contextType=FI,$I=KI))||$I)||$I)||$I);var oE,pE,tE;let nE=(oE=_((e=>({menuItemSeparator:{label:"menuItemSeparator",height:e.height,margin:e.margin,overflow:"hidden",background:e.background}})),(e=>{var o;const p=e.colors,t=e.spacing,n=e.borders;return{...{background:null==p||null===(o=p.contrasts)||void 0===o?void 0:o.grey1214,height:null==n?void 0:n.widthSmall,margin:`0 ${null==t?void 0:t.small}`}}})),oE(pE=U()((tE=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){var o;const p=pe(this.props,e.allowedProps);return Y("div",Object.assign({},p,{role:"presentation",css:null===(o=this.props.styles)||void 0===o?void 0:o.menuItemSeparator,ref:this.handleRef}))}},tE.displayName="MenuItemSeparator",tE.componentId="Menu.Separator",tE.propTypes={},tE.allowedProps=[],pE=tE))||pE)||pE);const rE={label:E.node.isRequired,allowMultiple:E.bool,children:Le.oneOf([eE,nE]),selected:Se(E.array,"onSelect","defaultSelected"),defaultSelected:E.array,onSelect:E.func,onMouseOver:E.func,controls:E.string,itemRef:E.func,disabled:E.bool,isTabbable:E.bool};var cE,sE,lE,iE;let aE=(cE=K(),sE=_((e=>({menuItemGroup:{label:"menuItemGroup",display:"block"},label:{label:"menuItemGroup__label",background:e.background,padding:e.padding,display:"block",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,textAlign:"start"},items:{label:"menuItemGroup__items",padding:"0",margin:"0 0 0 0",listStyleType:"none"}})),(e=>{var o,p;const t=e.colors,n=e.spacing,r=e.typography,c=e.key,s={canvas:{color:e["ic-brand-font-color-dark"]}};return{...{fontSize:null==r?void 0:r.fontSizeMedium,fontFamily:null==r?void 0:r.fontFamily,fontWeight:null==r?void 0:r.fontWeightBold,padding:`${null==n?void 0:n.xSmall} ${null==n?void 0:n.small}`,color:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.grey125125,background:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.white1010},...s[c]}})),cE(lE=sE(lE=U()((iE=class e extends u.Component{constructor(e){super(e),this._labelId=void 0,this.ref=null,this.handleRef=e=>{this.ref=e},this.handleSelect=(e,o,p,t)=>{this.props.disabled?e.preventDefault():this.props.selected?this.updateSelected(e,o,this.props.selected,p,t):this.setState((n=>({selected:this.updateSelected(e,o,n.selected,p,t)})))},this.updateSelected=(e,o,p,t,n)=>{const r=this.props.allowMultiple;let c=r?[...p]:[];const s=c.indexOf(o);return!0===t&&s<0?c.push(o):!1===t&&-1!==s?c.splice(s,1):!r&&c.length<1&&(c=[...p]),"function"==typeof this.props.onSelect&&this.props.onSelect(e,c,t,n),c},void 0===e.selected&&(this.state={selected:this.selectedFromChildren(e)||e.defaultSelected}),this._labelId=e.deterministicId("MenuItemGroup")}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}selectedFromChildren(e){const o=e.children,p=e.allowMultiple,t=[];return u.Children.toArray(o).filter((e=>Ie(e,[eE]))).forEach(((e,o)=>{0!==t.length&&!p||!e.props.selected&&!e.props.defaultSelected||t.push(e.props.value||o)})),t.length>0?t:null}get selected(){return void 0===this.props.selected&&void 0===this.state.selected?[]:void 0===this.props.selected?[...this.state.selected]:[...this.props.selected]}renderLabel(){var e;const o=this.props.label;return Ge(o)?Y("span",{css:null===(e=this.props.styles)||void 0===e?void 0:e.label},o):o}renderChildren(){const e=this.props,o=e.disabled,p=e.controls,t=e.allowMultiple,n=e.isTabbable,r=e.onMouseOver,c=this.props.children;let s=-1;return u.Children.map(c,(e=>{if(Ie(e,[eE])){++s;const c=e.props.value||s;return Y("li",{role:"none"}," ",ye(e,{tabIndex:n&&0===s?0:-1,controls:p,value:c,children:e.props.children,type:t?"checkbox":"radio",ref:this.props.itemRef,disabled:o||e.props.disabled,selected:this.selected.indexOf(c)>-1,onSelect:this.handleSelect,onMouseOver:r})," ")}return e}))}render(){var o,p;const t=pe(this.props,e.allowedProps);return Y("span",Object.assign({},t,{css:null===(o=this.props.styles)||void 0===o?void 0:o.menuItemGroup,role:"presentation",ref:this.handleRef}),Y("span",{id:this._labelId},this.renderLabel()),Y("ul",{role:"menu",css:null===(p=this.props.styles)||void 0===p?void 0:p.items,"aria-disabled":this.props.disabled?"true":void 0,"aria-labelledby":this._labelId},this.renderChildren()))}},iE.displayName="MenuItemGroup",iE.componentId="Menu.Group",iE.propTypes=rE,iE.allowedProps=["label","allowMultiple","children","selected","defaultSelected","onSelect","onMouseOver","controls","itemRef","disabled","isTabbable"],iE.defaultProps={disabled:!1,children:null,isTabbable:!1,allowMultiple:!1,defaultSelected:[]},lE=iE))||lE)||lE)||lE);const ME={children:Le.oneOf(["MenuItem","MenuItemGroup","MenuItemSeparator","Menu"]),label:E.string,disabled:E.bool,trigger:E.node,placement:Re.placement,defaultShow:E.bool,show:Se(E.bool,"onToggle","defaultShow"),onToggle:E.func,onSelect:E.func,onDismiss:E.func,onFocus:E.func,onMouseOver:E.func,onKeyDown:E.func,onKeyUp:E.func,menuRef:E.func,popoverRef:E.func,mountNode:Re.mountNode,constrain:Re.constrain,shouldHideOnSelect:E.bool,shouldFocusTriggerOnClose:E.bool,positionContainerDisplay:E.oneOf(["inline-block","block"]),type:E.oneOf(["flyout"]),id:E.string,withArrow:E.bool,offsetX:E.oneOfType([E.string,E.number]),offsetY:E.oneOfType([E.string,E.number]),maxHeight:E.string,renderLabelInfo:E.node};var bE,zE,dE,OE;let hE=(bE=K(),zE=_(((e,o)=>({menu:{label:"menu",...o.maxHeight?{maxHeight:o.maxHeight,overflow:"auto"}:{},minWidth:e.minWidth,maxWidth:e.maxWidth,listStyleType:"none",margin:"0",padding:"0.25rem 0",background:e.background,borderRadius:e.borderRadius,display:"block",position:"relative","&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",right:"-0.25rem",bottom:"-0.25rem",border:`${e.focusBorderWidth} ${e.focusBorderStyle} ${e.focusBorderColor}`,borderRadius:e.focusBorderRadius,opacity:0,transform:"scale(0.9)",pointerEvents:"none"},"&:focus":{outline:"none","&::before":{opacity:1,transform:"scale(1)"}}}})),(e=>{var o,p;const t=e.colors,n=e.breakpoints,r=e.borders;return{...{minWidth:null==n?void 0:n.xxSmall,maxWidth:null==n?void 0:n.xSmall,background:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.white1010,borderRadius:null==r?void 0:r.radiusMedium,focusBorderStyle:null==r?void 0:r.style,focusBorderWidth:null==r?void 0:r.widthMedium,focusBorderColor:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.blue4570,focusBorderRadius:null==r?void 0:r.radiusMedium}}})),bE(dE=zE(dE=U()((OE=class extends u.Component{constructor(e){super(e),this.state={hasFocus:!1},this._rootNode=null,this._menuItems=[],this._popover=null,this._trigger=null,this._menu=null,this._labelId=this.props.deterministicId("Menu__label"),this._activeSubMenu=void 0,this._id=void 0,this.ref=null,this.handleRef=e=>{const o=this.props.menuRef;this._menu=e,"function"==typeof o&&o(e),this.props.trigger||(this.ref=e)},this.registerMenuItem=e=>{this._menuItems.push(e)},this.removeMenuItem=e=>{const o=this.getMenuItemIndex(e);Q(o>=0,"[Menu] Could not find registered menu item."),o>=0&&this._menuItems.splice(o,1)},this.getMenuItemIndex=e=>this._menuItems.findIndex((o=>o===e)),this.handleTriggerKeyDown=e=>{"flyout"===this.props.type&&e.keyCode===ve.codes.right&&(e.persist(),this.show(e))},this.handleTriggerMouseOver=e=>{"flyout"===this.props.type&&this.show(e)},this.handleToggle=e=>{"function"==typeof this.props.onToggle&&this.props.onToggle(e,this)},this.handleMenuKeyDown=e=>{const o=e&&e.keyCode,p=ve.codes,t=p.down,n=p.up,r=p.tab,c=p.left,s=ve.codes["page down"],l=ve.codes["page up"];o===t||o===s?(e.preventDefault(),e.stopPropagation(),this.moveFocus(1),this.hideActiveSubMenu(e)):o===n||o===l?(e.preventDefault(),e.stopPropagation(),this.moveFocus(-1),this.hideActiveSubMenu(e)):o!==r&&o!==c||(e.persist(),this.hide(e)),"function"==typeof this.props.onKeyDown&&this.props.onKeyDown(e)},this.handleMenuItemSelect=(e,o,p,t)=>{this.props.shouldHideOnSelect&&this.hide(e),"function"==typeof this.props.onSelect&&this.props.onSelect(e,o,p,t)},this.handleMenuItemFocus=()=>{this.setState({hasFocus:!0})},this.handleMenuItemBlur=()=>{this.setState({hasFocus:this.focusedIndex>=0})},this.handleMenuItemMouseOver=(e,o)=>{this._activeSubMenu&&o!==this._activeSubMenu._trigger&&this.hideActiveSubMenu(e)},this.hideActiveSubMenu=e=>{this._activeSubMenu&&(this._activeSubMenu.hide(e),this._activeSubMenu=null)},this.handleSubMenuToggle=(e,o)=>{e&&(this._activeSubMenu=o)},this.handleSubMenuDismiss=(e,o)=>{(e&&e.keyCode===ve.codes.tab||o)&&this.hide(e)},this.hide=e=>{this._popover&&this._popover.hide(e)},this.show=e=>{this._popover&&this._popover.show(e)},this._id=this.props.id||e.deterministicId()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}get menuItems(){return this._menuItems}focus(){var e,o;this.shown?(Q(!(null===(e=this._menu)||void 0===e||!e.focus),"[Menu] Could not focus the menu."),this._menu.focus()):(Q(!(null===(o=this._trigger)||void 0===o||!o.focus),"[Menu] Could not focus the trigger."),this._trigger.focus())}focused(){return this.shown?$e(this._menu)||this.state.hasFocus:$e(this._trigger)}get focusedIndex(){return this.menuItems.findIndex((e=>e&&!0===e.focused))}moveFocus(e){const o=this.menuItems?this.menuItems.length:0;if(o<=0)return;const p=this.focusedIndex<0&&e<0?0:this.focusedIndex,t=this.menuItems[(p+o+e)%o];Q(void 0!==t&&void 0!==t.focus,"[Menu] Could not focus next menu item."),t.focus()}get shown(){return!this._popover||this._popover.shown}renderChildren(){const e=this.props,o=e.children,p=e.disabled;let t=0;return u.Children.map(o,(e=>{if(!Ie(e,["MenuItemSeparator","MenuItem","MenuItemGroup","Menu"]))return;t+=1;const o=!this.state.hasFocus&&1===t;if(Ie(e,["MenuItemSeparator"]))return Y("li",{role:"none"},e);const n=e,r=n.props["aria-controls"]||n.props.controls||this.props["aria-controls"]||this.props.controls;if(Ie(e,["MenuItem"]))return Y("li",{role:"none"},ye(e,{controls:r,children:e.props.children,disabled:p||e.props.disabled,onFocus:this.handleMenuItemFocus,onBlur:this.handleMenuItemBlur,onSelect:this.handleMenuItemSelect,onMouseOver:this.handleMenuItemMouseOver,tabIndex:o?0:-1}));if(Ie(e,["MenuItemGroup"]))return Y("li",{role:"none"},ye(e,{label:e.props.label,controls:r,disabled:p||e.props.disabled,onFocus:this.handleMenuItemFocus,onBlur:this.handleMenuItemBlur,onSelect:this.handleMenuItemSelect,onMouseOver:this.handleMenuItemMouseOver,isTabbable:o}));if(Ie(e,["Menu"])){const t=p||e.props.disabled;return Y("li",{role:"none"},ye(e,{type:"flyout",controls:r,disabled:t,onSelect:this.handleMenuItemSelect,placement:"end top",offsetX:-5,offsetY:5,withArrow:!1,onToggle:this.handleSubMenuToggle,onDismiss:this.handleSubMenuDismiss,trigger:Y(eE,{onMouseOver:this.handleMenuItemMouseOver,onFocus:this.handleMenuItemFocus,onBlur:this.handleMenuItemBlur,tabIndex:o?0:-1,type:"flyout",disabled:t,renderLabelInfo:e.props.renderLabelInfo},e.props.title||e.props.label)}))}}))}renderMenu(){var e;const o=this.props,p=o.disabled,t=o.label,n=o.trigger,r=o.onKeyUp,c=this.props["aria-labelledby"],s=this.props["aria-controls"];return Y(FI.Provider,{value:{removeMenuItem:this.removeMenuItem,registerMenuItem:this.registerMenuItem}},Y("ul",{role:"menu","aria-label":t,tabIndex:0,css:null===(e=this.props.styles)||void 0===e?void 0:e.menu,"aria-labelledby":c||(n?this._labelId:void 0),"aria-controls":s,"aria-disabled":p?"true":void 0,onKeyDown:this.handleMenuKeyDown,onKeyUp:r,ref:this.handleRef},this.renderChildren()))}render(){const e=this.props,o=e.show,p=e.defaultShow,t=e.placement,n=e.withArrow,r=e.trigger,c=e.mountNode,s=e.popoverRef,l=e.disabled,i=e.onDismiss,a=e.onFocus,M=e.onMouseOver,b=e.positionContainerDisplay,z=e.offsetX,d=e.offsetY;return r?Y(He,{isShowingContent:o,defaultIsShowingContent:p,onHideContent:(e,{documentClick:o})=>{"function"==typeof i&&i(e,o),this.handleToggle(!1)},onShowContent:()=>this.handleToggle(!0),mountNode:c,placement:t,withArrow:n,id:this._id,on:["click"],shouldContainFocus:!0,shouldReturnFocus:!0,onFocus:a,onMouseOver:M,positionContainerDisplay:b,offsetX:z,offsetY:d,elementRef:e=>{this.ref=e},ref:e=>{this._popover=e,"function"==typeof s&&s(e)},renderTrigger:ye(r,{ref:e=>{this._trigger=e},"aria-haspopup":!0,id:this._labelId,onMouseOver:this.handleTriggerMouseOver,onKeyDown:this.handleTriggerKeyDown,disabled:r.props.disabled||l})},this.renderMenu()):this.renderMenu()}},OE.displayName="Menu",OE.componentId="Menu",OE.propTypes=ME,OE.allowedProps=["children","label","disabled","trigger","placement","defaultShow","show","onToggle","onSelect","onDismiss","onFocus","onMouseOver","onKeyDown","onKeyUp","menuRef","popoverRef","mountNode","constrain","shouldHideOnSelect","shouldFocusTriggerOnClose","positionContainerDisplay","type","id","withArrow","offsetX","offsetY","maxHeight","renderLabelInfo"],OE.defaultProps={label:null,disabled:!1,trigger:null,placement:"bottom center",defaultShow:!1,mountNode:null,constrain:"window",shouldHideOnSelect:!0,shouldFocusTriggerOnClose:!0,withArrow:!0,offsetX:0,offsetY:0},OE.Item=eE,OE.Group=aE,OE.Separator=nE,OE.contextType=FI,dE=OE))||dE)||dE)||dE);const AE={textAlign:E.oneOf(["start","center","end"]),renderLabel:E.oneOfType([E.func,E.node]),renderValue:E.oneOfType([E.func,E.node]),isGroupChild:E.bool},uE=["textAlign","renderLabel","renderValue","isGroupChild"];var fE,mE,qE;let RE=(fE=_(((e,o)=>{const p=o.textAlign;return{metric:{label:"metric",display:"flex",flexDirection:"column-reverse",boxSizing:"border-box",padding:e.padding,fontFamily:e.fontFamily,textAlign:p},label:{label:"metric__label",fontSize:e.labelFontSize,color:e.labelColor},value:{label:"metric__value",fontWeight:e.valueFontWeight,fontSize:e.valueFontSize,color:e.valueColor}}}),(e=>{var o,p;const t=e.colors,n=e.spacing,r=e.typography,c=e.key,s={canvas:{valueColor:e["ic-brand-font-color-dark"],labelColor:e["ic-brand-font-color-dark"]}};return{...{padding:`0 ${null==n?void 0:n.xSmall}`,fontFamily:null==r?void 0:r.fontFamily,valueColor:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.grey125125,valueFontSize:null==r?void 0:r.fontSizeXLarge,valueFontWeight:null==r?void 0:r.fontWeightBold,labelColor:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.grey125125,labelFontSize:null==r?void 0:r.fontSizeXSmall},...s[c]}})),fE(mE=U()(((qE=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){var e,o,p;const t=this.props;t.textAlign;const n=t.renderLabel,r=t.renderValue,c=t.isGroupChild,s=P(t,uE);return Y("div",Object.assign({},Z(s),{role:c?"row":void 0,css:null===(e=this.props.styles)||void 0===e?void 0:e.metric,ref:this.handleRef}),Y("div",{role:c?"rowheader":void 0,css:null===(o=this.props.styles)||void 0===o?void 0:o.label},$(n)),Y("div",{role:c?"gridcell":void 0,css:null===(p=this.props.styles)||void 0===p?void 0:p.value},$(r)))}}).displayName="Metric",qE.componentId="Metric",qE.propTypes=AE,qE.allowedProps=["textAlign","renderLabel","renderValue","isGroupChild"],qE.defaultProps={textAlign:"center",isGroupChild:!1},mE=qE))||mE)||mE);const WE={children:Le.oneOf([RE])};var vE,gE,yE;let LE=(vE=_((e=>({metricGroup:{label:"metricGroup",boxSizing:"border-box",display:"flex",flexWrap:"wrap",alignItems:"flex-start",justifyContent:"space-around",lineHeight:e.lineHeight}})),(e=>{const o=e.typography;return{...{lineHeight:null==o?void 0:o.lineHeightCondensed}}})),vE(gE=U()(((yE=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}renderChildren(){return u.Children.map(this.props.children,(e=>ye(e,{isGroupChild:!0})))}render(){var e;return Y("div",Object.assign({},Z(this.props),{css:null===(e=this.props.styles)||void 0===e?void 0:e.metricGroup,role:"grid","aria-readonly":"true",ref:this.handleRef}),this.renderChildren())}}).displayName="MetricGroup",yE.componentId="MetricGroup",yE.propTypes=WE,yE.allowedProps=["children"],yE.defaultProps={children:null},gE=yE))||gE)||gE);const NE={children:E.node,open:E.bool,onOpen:E.func,onClose:E.func,mountNode:E.oneOfType([_e,E.func]),insertAt:E.oneOf(["bottom","top"]),label:E.string.isRequired,onDismiss:E.func,defaultFocusElement:E.oneOfType([E.element,E.func]),contentElement:E.oneOfType([E.element,E.func]),shouldContainFocus:E.bool,shouldReturnFocus:E.bool,shouldCloseOnDocumentClick:E.bool,shouldCloseOnEscape:E.bool,transition:Ke,in:E.bool,unmountOnExit:E.bool,transitionOnMount:E.bool,transitionEnter:E.bool,transitionExit:E.bool,onEnter:E.func,onEntering:E.func,onEntered:E.func,onExit:E.func,onExiting:E.func,onExited:E.func};var BE,wE;let CE=U()((wE=class e extends u.Component{constructor(e){super(e),this._timeouts=[],this._DOMNode=null,this._isMounted=!1,this.ref=null,this.handleRef=e=>{this.ref=e},this.handlePortalOpen=e=>{this.DOMNode=e,this._timeouts.push(setTimeout((()=>{this._isMounted&&this.setState({open:!0})})))},this.handleTransitionExited=e=>{this.setState({open:!1,transitioning:!1})},this.state={open:e.open,transitioning:!1}}componentDidMount(){this._isMounted=!0}componentDidUpdate(e){e.open&&!this.props.open&&this.setState({transitioning:!!e.transition})}componentWillUnmount(){this._isMounted=!1,this._timeouts.forEach((e=>clearTimeout(e)))}get DOMNode(){return this._DOMNode}set DOMNode(e){this._DOMNode=e}renderTransition(e){return f.createElement(ge,Object.assign({},te(this.props,ge.allowedProps),{in:this.props.open,transitionOnMount:!0,unmountOnExit:!0,type:this.props.transition,onExited:Ce(this.handleTransitionExited,this.props.onExited)}),e)}render(){let o=f.createElement(Fe,Object.assign({},pe(this.props,e.allowedProps),te(this.props,Fe.allowedProps),{defaultFocusElement:this.props.defaultFocusElement,open:this.state.open,elementRef:this.handleRef}),this.props.children);return this.props.transition&&(o=this.renderTransition(o)),f.createElement(Ue,Object.assign({},te(this.props,Ue.allowedProps),{open:this.props.open||this.state.transitioning,onOpen:Ce(this.handlePortalOpen,this.props.onOpen)}),o)}},wE.displayName="Overlay",wE.allowedProps=["children","open","onOpen","onClose","mountNode","insertAt","label","onDismiss","defaultFocusElement","contentElement","shouldReturnFocus","shouldCloseOnDocumentClick","shouldCloseOnEscape","transition","in","unmountOnExit","transitionOnMount","transitionEnter","transitionExit","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],wE.propTypes=NE,wE.defaultProps={open:!1,insertAt:"bottom",shouldContainFocus:!1,shouldReturnFocus:!1,shouldCloseOnDocumentClick:!1,shouldCloseOnEscape:!0,in:!1,unmountOnExit:!1,transitionOnMount:!1,transitionEnter:!0,transitionExit:!0},BE=wE))||BE;const TE={children:E.node,variant:E.oneOf(["default","inverse"]),spacing:E.oneOf(["default","compact"])},SE=["children"];var xE,IE,EE;let PE=(xE=_(((e,o,p)=>{const t=o.variant,n=o.spacing,r=p.withCloseButton,c={default:{padding:e.padding,paddingInlineStart:e.padding,paddingInlineEnd:r?`calc(${e.padding} * 2 + 1em)`:e.padding},compact:{padding:e.paddingCompact,paddingInlineStart:e.paddingCompact,paddingInlineEnd:r?`calc(${e.paddingCompact} * 2 + 1em)`:e.paddingCompact}},s="inverse"===t?{background:e.inverseBackground,borderBottomColor:e.inverseBorderColor}:{};return{modalHeader:{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit",label:"modalHeader",boxSizing:"border-box",flex:"0 0 auto",background:e.background,borderBottomWidth:"0.0625rem",borderBottomStyle:"solid",borderBottomColor:e.borderColor,...c[n],...s}}}),(e=>{var o,p,t,n;const r=e.colors,c=e.spacing;return{...{background:null==r||null===(o=r.contrasts)||void 0===o?void 0:o.white1010,borderColor:null==r||null===(p=r.contrasts)||void 0===p?void 0:p.grey1214,padding:null==c?void 0:c.medium,paddingCompact:null==c?void 0:c.small,inverseBackground:null==r||null===(t=r.contrasts)||void 0===t?void 0:t.grey125125,inverseBorderColor:null==r||null===(n=r.contrasts)||void 0===n?void 0:n.grey125125}}})),xE(IE=U()(((EE=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e},this.makeStyleProps=()=>({withCloseButton:this.usesCloseButton})}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps())}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps())}get usesCloseButton(){let e=!1;return f.Children.forEach(this.props.children,(o=>{o&&Ie(o,[zT])&&(e=!0)})),e}render(){var e;const o=this.props,p=o.children,t=P(o,SE);return Y("div",Object.assign({css:null===(e=this.props.styles)||void 0===e?void 0:e.modalHeader},Z(t),{ref:this.handleRef}),p)}}).displayName="ModalHeader",EE.componentId="Modal.Header",EE.propTypes=TE,EE.allowedProps=["children","variant","spacing"],EE.defaultProps={variant:"default",spacing:"default"},IE=EE))||IE)||IE);const XE={children:E.node,padding:D.spacing,elementRef:E.func,as:E.elementType,variant:E.oneOf(["default","inverse"]),overflow:E.oneOf(["scroll","fit"])},HE=["as","elementRef","overflow","variant","padding","children"];var ZE,VE,kE;let DE=(ZE=_(((e,o)=>({modalBody:{label:"modalBody",boxSizing:"border-box",flex:"1 1 auto",overflowY:"auto","&:focus":{outline:"none"},..."inverse"===o.variant?{background:e.inverseBackground}:{}}})),(e=>{var o;const p=e.colors;return{inverseBackground:null==p||null===(o=p.contrasts)||void 0===o?void 0:o.grey100100}})),ZE(VE=U()((kE=class e extends u.Component{constructor(e){super(e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.state={isFirefox:!1}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o);const p=this.ref&&de(this.ref),t=!(!p||!Array.prototype.slice.call(p).join("").match(/(?:-moz-)/));t&&this.setState({isFirefox:t})}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){var o;const p=this.props,t=p.as;p.elementRef;const n=p.overflow;p.variant;const r=p.padding,c=p.children,s=P(p,HE),l=J.omitViewProps(pe(s,e.allowedProps),e),i="fit"===n;return Y(J,Object.assign({},l,{display:"block",width:i?"100%":void 0,height:i?"100%":void 0,elementRef:this.handleRef,as:t,css:null===(o=this.props.styles)||void 0===o?void 0:o.modalBody,padding:r},this.state.isFirefox&&{tabIndex:-1}),c)}},kE.displayName="ModalBody",kE.componentId="Modal.Body",kE.propTypes=XE,kE.allowedProps=["children","padding","elementRef","as","variant","overflow"],kE.defaultProps={padding:"medium",as:"div",variant:"default"},VE=kE))||VE)||VE);const _E={children:E.node,variant:E.oneOf(["default","inverse"])},jE=["children"];var FE,UE,YE;let GE=(FE=_(((e,o)=>{const p="inverse"===o.variant?{background:e.inverseBackground,borderTop:`${e.borderWidth} solid ${e.inverseBorderColor}`}:{background:e.background,borderTop:`${e.borderWidth} solid ${e.borderColor}`};return{modalFooter:{label:"modalFooter",flex:"0 0 auto",boxSizing:"border-box",padding:e.padding,borderBottomRightRadius:e.borderRadius,borderBottomLeftRadius:e.borderRadius,display:"flex",justifyContent:"flex-end",...p}}}),(e=>{var o,p,t,n;const r=e.colors,c=e.spacing,s=e.borders;return{...{background:null==r||null===(o=r.contrasts)||void 0===o?void 0:o.grey1111,borderColor:null==r||null===(p=r.contrasts)||void 0===p?void 0:p.grey1214,borderWidth:null==s?void 0:s.widthSmall,borderRadius:null==s?void 0:s.radiusMedium,padding:null==c?void 0:c.small,inverseBackground:null==r||null===(t=r.contrasts)||void 0===t?void 0:t.grey100100,inverseBorderColor:null==r||null===(n=r.contrasts)||void 0===n?void 0:n.grey100100}}})),FE(UE=U()(((YE=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){var e;const o=this.props,p=o.children,t=P(o,jE);return Y("div",Object.assign({css:null===(e=this.props.styles)||void 0===e?void 0:e.modalFooter},Z(t),{ref:this.handleRef}),p)}}).displayName="ModalFooter",YE.componentId="Modal.Footer",YE.propTypes=_E,YE.allowedProps=["children","variant"],YE.defaultProps={variant:"default"},UE=YE))||UE)||UE);const $E={label:E.string.isRequired,children:E.node,as:E.elementType,size:E.oneOf(["auto","small","medium","large","fullscreen"]),variant:E.oneOf(["default","inverse"]),open:E.bool,defaultFocusElement:E.oneOfType([E.element,E.func]),shouldReturnFocus:E.bool,shouldCloseOnDocumentClick:E.bool,onOpen:E.func,onClose:E.func,onDismiss:E.func,contentRef:E.func,mountNode:E.oneOfType([_e,E.func]),insertAt:E.oneOf(["bottom","top"]),liveRegion:E.oneOfType([_e,E.arrayOf(_e),E.func]),transition:Ke,onEnter:E.func,onEntering:E.func,onEntered:E.func,onExit:E.func,onExiting:E.func,onExited:E.func,constrain:E.oneOf(["window","parent"]),overflow:E.oneOf(["scroll","fit"])},KE=["open","onOpen","onClose","mountNode","insertAt","transition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","constrain","overflow"];var QE,JE,eP;let oP=(QE=_(((e,o)=>{const p=o.size,t=o.variant,n={maxWidth:"95%",maxHeight:"95%",..."fit"===o.overflow&&{transform:"translateY(2.5%)"}},r={auto:{flex:"0 1 auto",minWidth:e.autoMinWidth,...n},small:{flex:`0 1 ${e.smallMaxWidth}`,...n},medium:{flex:`0 1 ${e.mediumMaxWidth}`,...n},large:{flex:`0 1 ${e.largeMaxWidth}`,...n},fullscreen:{flex:1,width:"100%",height:"100%",boxShadow:"none",border:"none",borderRadius:0}},c="inverse"===t?{background:e.inverseBackground,color:e.inverseTextColor}:{background:e.background,color:e.textColor};return{modal:{label:"modal",fontFamily:e.fontFamily,display:"flex",minWidth:"1px",flexDirection:"column",position:"relative",boxSizing:"border-box",boxShadow:e.boxShadow,border:`0.0625rem solid ${e.borderColor}`,borderRadius:e.borderRadius,...r[p],...c},constrainContext:{label:"modal__constrainContext",display:"block",position:"relative",width:"100%",height:"100%"}}}),(e=>{var o,p,t,n,r;const c=e.colors,s=e.typography,l=e.borders,i=e.breakpoints,a=e.shadows,M=e.stacking;return{...{fontFamily:null==s?void 0:s.fontFamily,textColor:null==c||null===(o=c.contrasts)||void 0===o?void 0:o.grey125125,background:null==c||null===(p=c.contrasts)||void 0===p?void 0:p.white1010,borderColor:null==c||null===(t=c.contrasts)||void 0===t?void 0:t.grey1424,borderRadius:null==l?void 0:l.radiusMedium,inverseBackground:null==c||null===(n=c.contrasts)||void 0===n?void 0:n.grey100100,inverseTextColor:null==c||null===(r=c.contrasts)||void 0===r?void 0:r.white1010,autoMinWidth:null==i?void 0:i.xSmall,smallMaxWidth:null==i?void 0:i.small,mediumMaxWidth:null==i?void 0:i.medium,largeMaxWidth:null==i?void 0:i.large,boxShadow:null==a?void 0:a.depth3,zIndex:null==M?void 0:M.topmost}}})),QE(JE=U()((eP=class extends u.Component{constructor(e){var o;super(e),this._DOMNode=null,this._content=null,this.ref=null,this.handleRef=e=>{this.ref=e},this.handlePortalOpen=e=>{this.DOMNode=e},this.handleTransitionComplete=()=>{this.setState({transitioning:!1})},this.contentRef=e=>{this._content=e,"function"==typeof this.props.contentRef&&this.props.contentRef(e)},this.state={transitioning:!1,open:null!==(o=e.open)&&void 0!==o&&o}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(e){var o,p;this.props.open!==e.open&&this.setState({transitioning:!0,open:!!this.props.open}),null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p)}get defaultFocusElement(){return this.props.defaultFocusElement}get DOMNode(){return this._DOMNode}set DOMNode(e){this._DOMNode=e}get maskPlacement(){return"fit"===this.props.overflow?"stretch":"center"}renderChildren(){const e=this.props,o=e.children,p=e.variant,t=e.overflow;return u.Children.map(o,(e=>{var o;if(e)return u.isValidElement(e)?ye(e,{variant:p,overflow:(null==e||null===(o=e.props)||void 0===o?void 0:o.overflow)||t}):e}))}renderDialog(e){const o=this.props,p=o.onDismiss,t=o.label,n=o.shouldCloseOnDocumentClick,r=o.shouldReturnFocus,c=o.liveRegion,s=o.size,l=o.constrain,i=o.as,a=o.styles,M="fullscreen"===s,b=Y(Fe,Object.assign({},Z(e),{as:i,open:!0,label:t,defaultFocusElement:this.defaultFocusElement,shouldCloseOnDocumentClick:n,shouldCloseOnEscape:!0,shouldContainFocus:!0,shouldReturnFocus:r,liveRegion:c,onDismiss:p,css:null==a?void 0:a.modal,ref:this.contentRef}),this.renderChildren());return Y(Qe,{placement:this.maskPlacement,fullscreen:"window"===l,themeOverride:M?{borderRadius:"0em",borderWidth:"0em"}:{}},b)}render(){var e;const o=this.props,p=o.open,t=o.onOpen,n=o.onClose,r=o.mountNode,c=o.insertAt,s=o.transition,l=o.onEnter,i=o.onEntering,a=o.onEntered,M=o.onExit,b=o.onExiting,z=o.onExited,d=o.constrain;o.overflow;const O=P(o,KE),h=this.state.open||this.state.transitioning;return Y(Ue,{mountNode:r,insertAt:c,open:h,onOpen:this.handlePortalOpen},Y(ge,{in:p,transitionOnMount:!0,type:s,onEnter:l,onEntering:i,onEntered:Ce(this.handleTransitionComplete,a,t),onExit:M,onExiting:b,onExited:Ce(this.handleTransitionComplete,z,n)},"parent"===d?Y("span",{css:null===(e=this.props.styles)||void 0===e?void 0:e.constrainContext},this.renderDialog(O)):this.renderDialog(O)))}},eP.displayName="Modal",eP.componentId="Modal",eP.propTypes=$E,eP.allowedProps=["label","children","as","size","variant","open","defaultFocusElement","shouldReturnFocus","shouldCloseOnDocumentClick","onOpen","onClose","onDismiss","contentRef","mountNode","insertAt","liveRegion","transition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","constrain","overflow"],eP.defaultProps={open:!1,size:"auto",variant:"default",transition:"fade",insertAt:"bottom",shouldCloseOnDocumentClick:!0,shouldReturnFocus:!0,constrain:"window",overflow:"scroll"},eP.Header=PE,eP.Body=DE,eP.Footer=GE,JE=eP))||JE)||JE);const pP={renderLabel:E.oneOfType([E.node,E.string,E.func]).isRequired,renderAfter:E.oneOfType([E.node,E.func]),renderIcon:E.oneOfType([E.node,E.func]),href:E.string,onClick:E.func,isSelected:E.bool,elementRef:E.func,as:E.elementType,cursor:E.string,isDisabled:E.bool};var tP,nP,rP;let cP=(tP=_(((e,o)=>{const p=o.isSelected,t=o.isDisabled,n={appearance:"none",overflow:"visible",direction:"inherit",margin:"0",textDecoration:"none",userSelect:"none",touchAction:"manipulation",background:"transparent",border:"none",outline:"none",lineHeight:e.height,padding:`0 ${e.padding}`,alignItems:"flex-start","&:hover":{textDecoration:"underline",textDecorationColor:e.textColor},...t&&{pointerEvents:"none",opacity:.5}};return{item:{label:"item",...n,"&:is(a), &:is(button)":n,"&:-webkit-any(a), &:-webkit-any(button)":n},label:{label:"item__label",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontFamily:e.fontFamily,fontSize:e.fontSize,fontWeight:e.fontWeight,color:e.textColor,...p&&{color:e.textColorSelected,textDecoration:"underline"}}}}),(e=>{var o,p,t;const n=e.colors,r=e.spacing,c=e.typography;return{...{fontFamily:null==c?void 0:c.fontFamily,fontSize:"1.125rem",fontWeight:null==c?void 0:c.fontWeightBold,textColor:null==n||null===(o=n.contrasts)||void 0===o?void 0:o.blue4570,textColorSelected:null==n||null===(p=n.contrasts)||void 0===p?void 0:p.grey125125,height:"2.25rem",padding:null==r?void 0:r.small,backgroundColor:null==n||null===(t=n.contrasts)||void 0===t?void 0:t.white1010}}})),tP(nP=U()((rP=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.handleClick=e=>{const o=this.props,p=o.isDisabled,t=o.onClick;p?(e.preventDefault(),e.stopPropagation()):"function"==typeof t&&t(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){var o,p;const t=X(e,this.props),n=this.props,r=n.renderIcon,c=n.renderLabel,s=n.href,l=n.renderAfter,i=n.cursor,a=n.isDisabled,M=$(r),b=$(c),z=Ie(b,[Ae]);return M&&Q(z,"[AppNav] If an icon is used, the label text should be wrapped in ."),Y(J,Object.assign({},Z(this.props),{as:t,href:s,onClick:this.handleClick,disabled:a,elementRef:this.handleRef,display:"flex",position:"relative",borderRadius:"medium",cursor:a?"not-allowed":i,css:null===(o=this.props.styles)||void 0===o?void 0:o.item}),M,z?b:Y("span",{css:null===(p=this.props.styles)||void 0===p?void 0:p.label},b),l&&$(l))}},rP.displayName="Item",rP.componentId="AppNav.Item",rP.allowedProps=["renderLabel","renderAfter","renderIcon","href","onClick","isSelected","elementRef","as","cursor","isDisabled"],rP.propTypes=pP,rP.defaultProps={children:null,isSelected:!1,cursor:"pointer",isDisabled:!1},nP=rP))||nP)||nP);const sP={screenReaderLabel:E.string.isRequired,children:Le.oneOf([cP]),debounce:E.number,renderBeforeItems:E.oneOfType([E.node,E.func]),renderAfterItems:E.oneOfType([E.node,E.func]),margin:D.spacing,elementRef:E.func,renderTruncateLabel:E.oneOfType([E.node,E.func]),onUpdate:E.func,visibleItemsCount:E.number};var lP,iP,aP;let MP=(lP=_((e=>({appNav:{label:"appNav",fontFamily:e.fontFamily,borderBottom:`${e.borderWidth} ${e.borderStyle} ${e.borderColor}`},alignCenter:{alignItems:"center"},list:{label:"appNav__list",height:e.height,flexGrow:1,flexShrink:1,flexBasis:"0",minWidth:"0.0625rem",paddingInlineStart:e.horizontalMargin},horizontalMargin:e.horizontalMargin.toString(),menuTriggerWidth:e.menuTriggerWidth.toString()})),(e=>{var o;const p=e.colors,t=e.borders,n=e.spacing,r=e.typography;return{...{fontFamily:null==r?void 0:r.fontFamily,height:"3.75rem",borderColor:null==p||null===(o=p.contrasts)||void 0===o?void 0:o.grey1214,borderStyle:null==t?void 0:t.style,borderWidth:null==t?void 0:t.widthSmall,horizontalMargin:null==n?void 0:n.xxSmall,menuTriggerWidth:"7.5rem"}}})),lP(iP=U()((aP=class e extends u.Component{constructor(...e){super(...e),this.state={isMeasuring:!1},this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}renderMenu(o){return Y(hE,{trigger:Y(e.Item,{renderLabel:$(this.props.renderTruncateLabel)})},o.map(((e,o)=>Y(hE.Item,{href:e.props.href?e.props.href:void 0,onClick:e.props.onClick&&!e.props.href?e.props.onClick:void 0,key:o},$(e.props.renderLabel)))))}render(){const o=this.props,p=o.visibleItemsCount,t=o.screenReaderLabel,n=o.margin,r=o.debounce,c=o.styles,s=J.omitViewProps(pe(this.props,e.allowedProps),e),l=$(this.props.renderBeforeItems),i=$(this.props.renderAfterItems),a=l||i;return Y(J,Object.assign({},s,{as:"nav",css:[null==c?void 0:c.appNav,a?null==c?void 0:c.alignCenter:""],margin:n,display:a?"flex":"block",elementRef:this.handleRef}),l&&Y("span",null,l),Y(Je,{visibleItemsCount:p,debounce:r,onUpdate:this.props.onUpdate,renderHiddenItemMenu:e=>this.renderMenu(e),itemSpacing:null==c?void 0:c.horizontalMargin,fixMenuTriggerWidth:null==c?void 0:c.menuTriggerWidth,css:null==c?void 0:c.list,"aria-label":$(t)},this.props.children),i&&Y("span",null,i))}},aP.displayName="AppNav",aP.componentId="AppNav",aP.allowedProps=["screenReaderLabel","children","debounce","renderBeforeItems","renderAfterItems","margin","elementRef","renderTruncateLabel","onUpdate","visibleItemsCount"],aP.propTypes=sP,aP.defaultProps={children:null,debounce:300,margin:"0",renderTruncateLabel:()=>"More",visibleItemsCount:0},aP.Item=cP,iP=aP))||iP)||iP);const bP={renderLabel:E.oneOfType([E.node,E.func]).isRequired,id:E.string,interaction:E.oneOf(["enabled","disabled","readonly"]),messages:E.arrayOf(t.message),placeholder:E.string,isRequired:E.bool,showArrows:E.bool,size:E.oneOf(["medium","large"]),value:E.oneOfType([E.string,E.number]),width:E.string,display:E.oneOf(["inline-block","block"]),inputRef:E.func,onFocus:E.func,onBlur:E.func,onChange:E.func,onDecrement:E.func,onIncrement:E.func,onKeyDown:E.func,inputMode:E.oneOf(["numeric","decimal","tel"]),textAlign:E.oneOf(["start","center"])};var zP,dP,OP,hP,AP,uP;let fP=(zP=K(),dP=_(((e,o,p)=>{const t=o.size,n=o.textAlign,r=p.interaction,c=p.hasFocus,s=p.invalid,l="disabled"===r?{cursor:"not-allowed",pointerEvents:"none",opacity:.5}:{},i=c?{opacity:1,transform:"scale(1)"}:{},a=s?{borderColor:e.errorOutlineColor}:{},M=s?{borderColor:e.errorBorderColor}:{},b={all:"initial",textAlign:n,direction:"inherit",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",appearance:"none",lineHeight:1,margin:"0",flex:1,minWidth:"0.0625rem",boxSizing:"border-box",fontFamily:"inherit",fontSize:"inherit",fontWeight:e.fontWeight,color:e.color,background:e.background,padding:e.padding,textyAlign:n,"&::placeholder":{color:e.placeholderColor}};return{numberInput:{label:"numberInput"},arrowContainer:{label:"numberInput_arrowContainer",flex:`0 0 ${e.arrowsContainerWidth}`,display:"flex",flexDirection:"column",...l},arrow:{label:"numberInput_arrow",cursor:"pointer",userSelect:"none",textAlign:"center",flex:1,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.arrowsBackgroundColor,borderTop:"none",borderInlineEnd:"none",borderInlineStart:`${e.borderWidth} ${e.borderStyle} ${e.arrowsBorderColor}`,borderBottom:`${e.borderWidth} ${e.borderStyle} ${e.arrowsBorderColor}`,color:e.arrowsColor,"&:last-child":{borderBottom:"none"},"&:hover":{backgroundColor:e.arrowsHoverBackgroundColor},"&:active":{boxShadow:e.arrowsActiveBoxShadow}},inputWidth:{label:"numberInput_inputWidth",display:"block",position:"relative","&::before":{content:'""',pointerEvents:"none",boxSizing:"border-box",display:"block",position:"absolute",top:"-0.25rem",bottom:"-0.25rem",left:"-0.25rem",right:"-0.25rem",border:`${e.focusOutlineWidth} ${e.focusOutlineStyle} ${e.focusOutlineColor}`,borderRadius:`calc(${e.borderRadius} * 1.5)`,transition:"all 0.2s",opacity:0,transform:"scale(0.95)",...i,...a}},inputContainer:{label:"numberInput_inputContainer",display:"flex",margin:"0",boxSizing:"border-box",transition:"all 0.2s",overflow:"hidden",fontFamily:e.fontFamily,border:`${e.borderWidth} ${e.borderStyle} ${e.borderColor}`,borderRadius:e.borderRadius,...l,...M,..."medium"===t?{fontSize:e.mediumFontSize,height:e.mediumHeight}:{fontSize:e.largeFontSize,height:e.largeHeight}},input:{label:"numberInput_input",...b,"&:is(input)[type]":b,"&:-webkit-any(input)[type]":b,"&::-webkit-inner-spin-button":{display:"none"},"&::-webkit-outer-spin-button":{display:"none"},'&:is(input)[type="number"]':{MozAppearance:"textfield"}}}}),(e=>{var o,p,t,n,r,c,s,l,i,a,M,b;const z=e.colors,d=e.spacing,O=e.borders,h=e.typography,A=e.forms,u=e.key,f={canvas:{color:e["ic-brand-font-color-dark"],arrowsColor:e["ic-brand-font-color-dark"],focusOutlineColor:e["ic-brand-primary"]}};return{...{fontFamily:null==h?void 0:h.fontFamily,fontWeight:null==h?void 0:h.fontWeightNormal,borderWidth:null==O?void 0:O.widthSmall,borderStyle:null==O?void 0:O.style,borderColor:null==z||null===(o=z.contrasts)||void 0===o?void 0:o.grey1214,borderRadius:null==O?void 0:O.radiusMedium,color:null==z||null===(p=z.contrasts)||void 0===p?void 0:p.grey125125,background:null==z||null===(t=z.contrasts)||void 0===t?void 0:t.white1010,padding:`0 ${null==d?void 0:d.small}`,arrowsContainerWidth:"2rem",arrowsColor:null==z||null===(n=z.contrasts)||void 0===n?void 0:n.grey125125,arrowsBackgroundColor:null==z||null===(r=z.contrasts)||void 0===r?void 0:r.grey1111,arrowsHoverBackgroundColor:null==z||null===(c=z.contrasts)||void 0===c?void 0:c.grey1214,arrowsBorderColor:null==z||null===(s=z.contrasts)||void 0===s?void 0:s.grey1214,arrowsActiveBoxShadow:`inset 0 0 3px 1px ${null==z||null===(l=z.contrasts)||void 0===l?void 0:l.grey1214}`,focusOutlineWidth:null==O?void 0:O.widthMedium,focusOutlineStyle:null==O?void 0:O.style,focusOutlineColor:null==z||null===(i=z.contrasts)||void 0===i?void 0:i.blue4570,errorBorderColor:null==z||null===(a=z.contrasts)||void 0===a?void 0:a.red4570,errorOutlineColor:null==z||null===(M=z.contrasts)||void 0===M?void 0:M.red4570,placeholderColor:null==z||null===(b=z.contrasts)||void 0===b?void 0:b.grey4570,mediumFontSize:null==h?void 0:h.fontSizeMedium,mediumHeight:null==A?void 0:A.inputHeightMedium,largeFontSize:null==h?void 0:h.fontSizeLarge,largeHeight:null==A?void 0:A.inputHeightLarge},...f[u]}})),zP(OP=dP(OP=U()((hP=class e extends u.Component{constructor(...e){super(...e),this.state={hasFocus:!1},this.ref=null,this._input=null,this._id=void 0,this.handleRef=e=>{this.ref=e},this.handleInputRef=e=>{this._input=e,"function"==typeof this.props.inputRef&&this.props.inputRef(e)},this.handleFocus=e=>{this.setState({hasFocus:!0}),"function"==typeof this.props.onFocus&&this.props.onFocus(e)},this.handleBlur=e=>{this.setState({hasFocus:!1}),"function"==typeof this.props.onBlur&&this.props.onBlur(e)},this.handleChange=e=>{"function"==typeof this.props.onChange&&this.props.onChange(e,e.target.value)},this.handleKeyDown=e=>{const o=this.props,p=o.onKeyDown,t=o.onDecrement,n=o.onIncrement;"function"==typeof p&&p(e),e.keyCode===ve.codes.down?(e.preventDefault(),"function"==typeof t&&t(e)):e.keyCode===ve.codes.up&&(e.preventDefault(),"function"==typeof n&&n(e))},this.handleClickUpArrow=e=>{this.arrowClicked(e,this.props.onIncrement)},this.handleClickDownArrow=e=>{this.arrowClicked(e,this.props.onDecrement)}}get id(){return this.props.id?this.props.id:(this._id||(this._id=this.props.deterministicId()),this._id)}get invalid(){return!!this.props.messages&&this.props.messages.some((e=>"error"===e.type))}get interaction(){return fe({props:this.props})}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleVariables)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleVariables)}get makeStyleVariables(){return{interaction:this.interaction,hasFocus:this.state.hasFocus,invalid:this.invalid}}arrowClicked(e,o){const p=this.interaction;var t;(e.preventDefault(),"enabled"===p)&&(null===(t=this._input)||void 0===t||t.focus(),"function"==typeof o&&o(e))}renderArrows(){var e,o,p;return Y("span",{css:null===(e=this.props.styles)||void 0===e?void 0:e.arrowContainer},Y("button",{"aria-hidden":!0,css:null===(o=this.props.styles)||void 0===o?void 0:o.arrow,onMouseDown:this.handleClickUpArrow,tabIndex:-1,type:"button"},AP||(AP=Y(d,null))),Y("button",{"aria-hidden":!0,css:null===(p=this.props.styles)||void 0===p?void 0:p.arrow,onMouseDown:this.handleClickDownArrow,tabIndex:-1,type:"button"},uP||(uP=Y(z,null))))}render(){var o,p,t;const n=this.props,r=n.renderLabel,c=n.display,s=n.placeholder,l=n.isRequired,i=n.showArrows,a=n.value,M=n.width,b=this.interaction;return Y(A,Object.assign({},te(this.props,A.allowedProps),{label:$(r),inline:"inline-block"===c,id:this.id,elementRef:this.handleRef}),Y("span",{css:null===(o=this.props.styles)||void 0===o?void 0:o.inputWidth,style:M?{width:M}:void 0},Y("span",{css:null===(p=this.props.styles)||void 0===p?void 0:p.inputContainer},Y("input",Object.assign({},pe(this.props,[...A.allowedProps,...e.allowedProps]),{css:null===(t=this.props.styles)||void 0===t?void 0:t.input,"aria-invalid":this.invalid?"true":void 0,id:this.id,type:"number",inputMode:this.props.inputMode,placeholder:s,ref:this.handleInputRef,required:l,value:a,disabled:"disabled"===b,readOnly:"readonly"===b,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,onKeyDown:this.handleKeyDown})),i?this.renderArrows():null)))}},hP.displayName="NumberInput",hP.componentId="NumberInput",hP.allowedProps=["renderLabel","id","interaction","messages","placeholder","isRequired","showArrows","size","value","width","display","inputRef","onFocus","onBlur","onChange","onDecrement","onIncrement","onKeyDown","inputMode","textAlign"],hP.propTypes=bP,hP.defaultProps={interaction:void 0,messages:[],isRequired:!1,showArrows:!0,size:"medium",display:"block",textAlign:"start",inputMode:"numeric"},OP=hP))||OP)||OP)||OP);const mP=u.createContext({history:[],navigateToPreviousPage:()=>{}}),qP={children:E.oneOfType([E.func,E.node]),defaultFocusElement:E.oneOfType([E.element,E.func]),padding:D.spacing,textAlign:E.oneOf(["start","center","end"])},RP=["children"];class WP extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}get _content(){return this.ref}get defaultFocusElement(){let e=this.props.defaultFocusElement;if("function"==typeof e&&(e=e()),e&&(e=ze(e)),!e){const o=eo(this.ref);e=o&&o[0]}return Q(e&&!!e.focus,"[Page] A default focusable element is required or focus will be lost."),e}get focusable(){const e=this.defaultFocusElement;return!!e&&"function"==typeof e.focus}focus(){this.focusable&&this.defaultFocusElement.focus()}render(){const e=this.props,o=e.children,p=P(e,RP);return f.createElement(mP.Consumer,null,(({history:e,navigateToPreviousPage:t})=>f.createElement(J,{as:"div",padding:p.padding,textAlign:p.textAlign,elementRef:this.handleRef},o&&"function"==typeof o?o(e,t):o)))}}WP.displayName="Page",WP.componentId="Pages.Page",WP.allowedProps=["children","defaultFocusElement","padding","textAlign"],WP.propTypes=qP,WP.defaultProps={defaultFocusElement:null,padding:"small",textAlign:"start",children:null},WP.contextTypes={history:E.array,navigateToPreviousPage:E.func};const vP={children:Le.oneOf([WP]),defaultPageIndex:E.number,activePageIndex:Se(E.number,"onPageIndexChange","defaultPageIndex"),onPageIndexChange:E.func,margin:D.spacing};var gP,yP,LP,NP;let BP=(gP=K(),yP=_((e=>({pages:{fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,background:e.background,display:"block"}})),(e=>{var o,p;const t=e.colors,n=e.typography;return{fontSize:null==n?void 0:n.fontSizeMedium,fontFamily:null==n?void 0:n.fontFamily,fontWeight:null==n?void 0:n.fontWeightNormal,color:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.grey125125,background:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.white1010}})),gP(LP=yP((NP=class extends u.Component{get _contentElement(){return this.ref}constructor(e){super(e),this._timeouts=[],this._activePage=null,this._contentId=void 0,this.ref=null,this.handleRef=e=>{this.ref=e},this.handleBackButtonClick=()=>{var e,o;const p=[...this.state.history],t=p.pop(),n=p[p.length-1];this.setState({history:p}),null===(e=(o=this.props).onPageIndexChange)||void 0===e||e.call(o,n||0,t)},this.state={history:["number"==typeof e.defaultPageIndex?e.defaultPageIndex:e.activePageIndex]},this._contentId=e.deterministicId()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;const p=this.props.activePageIndex,t=this.state.history;"number"!=typeof p||0!==t.length&&p===t[t.length-1]||this.setState({history:[...t,p]}),this._timeouts.push(setTimeout((()=>{!this.focused&&this.focus()}),0)),null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentWillUnmount(){this._timeouts.forEach(clearTimeout)}get focused(){return $e(this.ref)}focus(){this._timeouts.push(setTimeout((()=>{const e=this._activePage;if(e&&e.focusable)e.focus();else{const e=eo(this.ref),o=e&&e[0];o&&o.focus()}})))}get activePage(){const e=this.props,o=e.activePageIndex,p=e.children,t=f.Children.toArray(p),n=o{this._activePage=e}}):null}render(){var e;const o=this.activePage;return o?Y(mP.Provider,{value:{history:this.state.history,navigateToPreviousPage:()=>{this.handleBackButtonClick()}}},Y(J,{as:"div",id:this._contentId,css:null===(e=this.props.styles)||void 0===e?void 0:e.pages,margin:this.props.margin,role:"region",elementRef:this.handleRef},o)):null}},NP.displayName="Pages",NP.componentId="Pages",NP.allowedProps=["children","defaultPageIndex","activePageIndex","onPageIndexChange","margin"],NP.propTypes=vP,NP.defaultProps={activePageIndex:0},NP.Page=WP,LP=NP))||LP)||LP);const wP={children:E.node.isRequired,current:E.bool,onClick:E.func};var CP,TP;let SP=U()((TP=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}render(){const o=this.props.current?["onClick","href"]:[],p=pe(this.props,e.allowedProps,o);return f.createElement(me,Object.assign({color:"primary",withBackground:this.props.current,withBorder:this.props.current},p,{"aria-current":this.props.current?"page":void 0,elementRef:this.handleRef}),this.props.children)}},TP.displayName="PaginationButton",TP.componentId="Pagination.Page",TP.propTypes=wP,TP.allowedProps=["children","current"],TP.defaultProps={current:!1},CP=TP))||CP;const xP={direction:E.oneOf(["first","prev","next","last"]),label:E.string.isRequired,buttonRef:E.func,onClick:E.func},IP=["label","direction","buttonRef"];var EP,PP;let XP=U()(((PP=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}get margin(){switch(this.props.direction){case"first":return"0 xx-small 0 0";case"last":return"0 0 0 xx-small";default:return}}get Icon(){switch(this.props.direction){case"first":return jg;case"prev":return Be;case"next":return we;case"last":return _g;default:return null}}render(){const e=this.props,o=e.label,p=e.direction,t=e.buttonRef,n=P(e,IP);return f.createElement(We,{elementRef:this.handleRef,on:["hover","focus"],renderTip:f.createElement(Gr,null,o)},f.createElement(ao,Object.assign({},n,{size:"small",withBackground:!1,withBorder:!1,screenReaderLabel:o,rel:n.href||n.to?p:void 0,elementRef:t,margin:this.margin}),this.Icon))}}).displayName="PaginationArrowButton",PP.componentId="Pagination.Navigation",PP.allowedProps=["direction","label","buttonRef"],PP.propTypes=xP,PP.defaultProps={},EP=PP))||EP;const HP={numberOfPages:E.number.isRequired,currentPageIndex:E.number.isRequired,onChange:E.func.isRequired,screenReaderLabel:E.func.isRequired,label:E.func,disabled:E.bool,inputRef:E.func};var ZP,VP,kP;let DP=(ZP=_((e=>({paginationPageInput:{label:"paginationPageInput",display:"inline-flex",alignItems:"center",margin:`0 ${e.inputSpacing}`},numberInput:{label:"paginationPageInput__input",width:e.inputWidth},inputLabel:{label:"paginationPageInput__inputLabel",marginInlineStart:e.inputSpacing,whiteSpace:"nowrap"}})),(e=>({...{inputSpacing:e.spacing.xSmall,inputWidth:"4.5rem"}}))),ZP(VP=U()(((kP=class extends u.Component{constructor(e){super(e),this.ref=null,this.handleRef=e=>{this.ref=e},this.handleInputRef=e=>{"function"==typeof this.props.inputRef&&this.props.inputRef(e)},this.handleChange=(e,o)=>{let p=o;o.length>0&&isNaN(o.slice(-1))&&(p=o.slice(0,-1)),this.setState({number:p?Number(p):this.MIN,value:p})},this.handleDecrement=e=>{this.setNewPage(e,Math.floor(this.currentPage-1))},this.handleIncrement=e=>{this.setNewPage(e,Math.floor(this.currentPage+1))},this.handleBlur=e=>{Math.round(this.state.number)!==this.currentPage&&this.setNewPage(e,Math.round(this.state.number))},this.state=this.initialState}get currentPage(){return this.props.currentPageIndex+1}get initialState(){return{number:this.currentPage,value:`${this.currentPage}`}}get MIN(){return 1}get MAX(){return this.props.numberOfPages}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(e){var o,p;null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p),this.props.currentPageIndex!==e.currentPageIndex&&this.resetInitialState()}resetInitialState(){this.setState(this.initialState)}handleKeyDown(e){if("enter"===e.key.toLowerCase()){const o=this.state,p=o.value,t=o.number;if(""===p||isNaN(p))return void this.resetInitialState();this.setNewPage(e,t)}}getNumberWithinRange(e){return ethis.MAX?this.MAX:e}setNewPage(e,o){const p=this.getNumberWithinRange(o);this.setState({number:p,value:`${p}`}),this.props.onChange(e,p-1)}renderLabel(){const e=this.props,o=e.label,p=e.numberOfPages,t=e.styles;return"function"==typeof o&&o(p)?Y("span",{css:null==t?void 0:t.inputLabel},o(p)):null}renderScreenReaderLabel(){const e=this.props,o=e.screenReaderLabel,p=e.numberOfPages;return Y(Ae,null,o(this.currentPage,p))}render(){const e=this.props,o=e.styles,p=e.disabled;return Y("span",{css:null==o?void 0:o.paginationPageInput,ref:this.handleRef},Y("span",{css:null==o?void 0:o.numberInput},Y(fP,{renderLabel:this.renderScreenReaderLabel(),onBlur:this.handleBlur,onChange:this.handleChange,onDecrement:this.handleDecrement,onIncrement:this.handleIncrement,onKeyDown:this.handleKeyDown.bind(this),interaction:p?"disabled":"enabled",showArrows:!1,value:this.state.value,width:"100%",textAlign:"center",inputRef:this.handleInputRef})),this.renderLabel())}}).displayName="PaginationPageInput",kP.componentId="Pagination.PageInput",kP.propTypes=HP,kP.allowedProps=["numberOfPages","currentPageIndex","onChange","screenReaderLabel","label","disabled","inputRef"],kP.defaultProps={disabled:!1},VP=kP))||VP)||VP);const _P={children:Le.oneOf([SP]),disabled:E.bool,withFirstAndLastButton:E.bool,showDisabledButtons:E.bool,label:E.node,labelNext:E.string,labelPrev:E.string,labelFirst:E.string,labelLast:E.string,labelNumberInput:E.func,screenReaderLabelNumberInput:E.func,variant:E.oneOf(["full","compact","input"]),margin:D.spacing,as:E.elementType,elementRef:E.func,inputRef:E.func,shouldHandleFocus:E.bool,totalPageNumber:E.number,currentPage:E.number,siblingCount:E.number,boundaryCount:E.number,onPageChange:E.func,renderPageIndicator:E.func,ellipsis:E.node};var jP,FP,UP,YP;const GP=e=>{const o=e.children;return o?Array.isArray(o)?o:[o]:[]};function $P(e){return e.children?"compact"===e.variant&&GP(e).length>5:"compact"===e.variant&&e.totalPageNumber>5}let KP=K()(jP=_((()=>({pagination:{label:"pagination",textAlign:"center"},pages:{label:"pagination__pages",display:"inline-flex",alignItems:"center"}})),null)(jP=U()((FP=class e extends u.Component{constructor(o){super(o),this._labelId=void 0,this._firstButton=null,this._prevButton=null,this._nextButton=null,this._lastButton=null,this.ref=null,this.currentPageRef=null,this.handleElementRef=e=>{this.ref=e,e&&"function"==typeof this.props.elementRef&&this.props.elementRef(e)},this.handleInputRef=e=>{"function"==typeof this.props.inputRef&&this.props.inputRef(e)},this.renderDefaultPageInput=()=>{const e=this.props,o=e.currentPage,p=e.totalPageNumber;return Y(DP,{numberOfPages:p,currentPageIndex:o-1,onChange:(e,p)=>{var t,n;return null===(t=(n=this.props).onPageChange)||void 0===t?void 0:t.call(n,p+1,o)},screenReaderLabel:this.props.screenReaderLabelNumberInput,label:this.props.labelNumberInput,disabled:this.props.disabled,inputRef:this.handleInputRef})},this.handleNavigation=(e,o)=>{const p=this.props.onPageChange;"function"==typeof p&&p(e,o)},this.renderPagesInInterval=(o,p,t)=>{if(p-o>1e3)throw new Error("Pagination: too many pages (more than 1000)");const n=[];for(let s=o;s<=p;s++){var r,c;n.push(Y(e.Page,{ref:e=>s===t?this.currentPageRef=e:null,key:s,onClick:()=>this.handleNavigation(s,t),current:s===t},null===(r=(c=this.props).renderPageIndicator)||void 0===r?void 0:r.call(c,s,t)))}return n},this.renderDefaultPages=()=>{const e=this.props,o=e.ellipsis,p=e.currentPage,t=e.totalPageNumber,n=e.siblingCount,r=e.boundaryCount,c=e.variant,s=[];if(t<=2*r||t<=1+n+r||"full"===c)return this.renderPagesInInterval(1,t,p);if(p>r+n+1){if(s.push(this.renderPagesInInterval(1,r,p)),s.push(o),p-n>t-r+1)return s.push(this.renderPagesInInterval(t-r+1,t,p)),s;s.push(this.renderPagesInInterval(p-n,p,p))}else s.push(this.renderPagesInInterval(1,Math.max(p,r),p));return p{if(!this.withFirstAndLastButton&&("first"===e||"last"===e))return null;if(!$P(this.props)&&!this.inputMode)return null;const o=this.props,p=o.totalPageNumber,t=o.currentPage,n=this.getArrowVariant(e,t-1,p),r=n.label,c=n.shouldEnableIcon,s=n.handleButtonRef,l=this.props.disabled||!c;return c||this.showDisabledButtons?Y(XP,{direction:e,"data-direction":e,label:r,onClick:()=>{"first"===e&&this.handleNavigation(1,t),"prev"===e&&this.handleNavigation(Math.max(t-1,1),t),"next"===e&&this.handleNavigation(Math.min(t+1,p),t),"last"===e&&this.handleNavigation(p,t)},disabled:l,buttonRef:s}):null},this._labelId=o.deterministicId()}get _root(){return this.ref}get inputMode(){return"input"===this.props.variant}get childPages(){return GP(this.props)}get withFirstAndLastButton(){return this.inputMode||this.props.withFirstAndLastButton}get showDisabledButtons(){return this.inputMode||this.props.showDisabledButtons}getSnapshotBeforeUpdate(){const e=oo();return e===this._firstButton||e===this._prevButton||e===this._nextButton||e===this._lastButton?{lastFocusedButton:e}:{lastFocusedButton:void 0}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(e,o,p){var t,n,r,c,s;(null===(t=(n=this.props).makeStyles)||void 0===t||t.call(n),this.props.currentPage!==e.currentPage&&document.activeElement!==this._firstButton&&document.activeElement!==this._prevButton&&document.activeElement!==this._nextButton&&document.activeElement!==this._lastButton)&&(null===(r=this.currentPageRef)||void 0===r||null===(c=r.ref)||void 0===c||null===(s=c.focus)||void 0===s||s.call(c));this.props.shouldHandleFocus&&($P(e)||$P(this.props))&&this.focusElementAfterUpdate(p)}focusElementAfterUpdate(e){const o=e.lastFocusedButton;if(o){var p;const e=eo(this.ref),t=o.dataset.direction;let n=o;e.includes(n)||("first"!==t&&"prev"!==t||(n=e[0]),"next"!==t&&"last"!==t||(n=e[e.length-1])),null===(p=n)||void 0===p||p.focus()}}get compactView(){return $P(this.props)}transferDisabledPropToChildren(e){return e&&this.props.disabled?f.Children.map(e,(e=>f.cloneElement(e,{disabled:this.props.disabled}))):e}renderLabel(){const e="full"===this.props.variant?"inline-block":"block",o=Ge(this.props.label);return Y(J,{as:"span",padding:o?"small":"0",display:o?e:"auto",id:this._labelId},this.props.label)}renderPageInput(e){return this.props.children?Y(DP,{numberOfPages:this.childPages.length,currentPageIndex:e,onChange:this.handleInputChange.bind(this),screenReaderLabel:this.props.screenReaderLabelNumberInput,label:this.props.labelNumberInput,disabled:this.props.disabled,inputRef:this.handleInputRef}):this.renderDefaultPageInput()}handleInputChange(e,o){var p,t;null===(p=(t=this.childPages[o].props).onClick)||void 0===p||p.call(t,e)}renderPages(e){if(!this.props.children)return this.renderDefaultPages();const o=this.childPages;let p=o;if(this.compactView){const t=0,n=o.length-1,r=Math.min(n-3,Math.max(e-1,t)),c=Math.min(e+4,n);p=o.slice(r,c);const s=o[t],l=o[n];r-t>1&&p.unshift(UP||(UP=Y("span",{key:"first","aria-hidden":"true"},"…"))),r-t>0&&p.unshift(s),n-c+1>1&&p.push(YP||(YP=Y("span",{key:"last","aria-hidden":"true"},"…"))),n-c+1>0&&p.push(l)}return Y(J,{display:"inline-block"},this.transferDisabledPropToChildren(p))}getArrowVariant(e,o,p){switch(e){case"first":return{pageIndex:0,label:this.props.labelFirst||"First Page",shouldEnableIcon:o>1,handleButtonRef:e=>{this._firstButton=e}};case"prev":return{pageIndex:o-1,label:this.props.labelPrev||"Previous Page",shouldEnableIcon:o>0,handleButtonRef:e=>{this._prevButton=e}};case"next":return{pageIndex:o+1,label:this.props.labelNext||"Next Page",shouldEnableIcon:o{this._nextButton=e}};case"last":return{pageIndex:p-1,label:this.props.labelLast||"Last Page",shouldEnableIcon:o{this._lastButton=e}}}}renderArrowButton(e,o){var p,t;if(!this.props.children)return this.renderDefaultArrowButton(e);const n=this.childPages;if(!$P(this.props)&&!this.inputMode)return null;if(!this.withFirstAndLastButton&&("first"===e||"last"===e))return null;const r=this.getArrowVariant(e,o,n.length),c=r.pageIndex,s=r.label,l=r.shouldEnableIcon,i=r.handleButtonRef,a=n[c],M=(null==a||null===(p=a.props)||void 0===p?void 0:p.disabled)||this.props.disabled||!l,b=null==a||null===(t=a.props)||void 0===t?void 0:t.onClick;return l||this.showDisabledButtons?Y(XP,{direction:e,"data-direction":e,label:s,onClick:b,disabled:M,buttonRef:i}):null}render(){var o,p;const t=(n=this.childPages,r=e=>e&&e.props&&e.props.current,Number(Object.keys(n).find((e=>r(n[Number(e)])))));var n,r;const c=J.omitViewProps(pe(this.props,e.allowedProps),e);return Y(J,Object.assign({},c,{role:"navigation",as:this.props.as,elementRef:this.handleElementRef,margin:this.props.margin,css:null===(o=this.props.styles)||void 0===o?void 0:o.pagination,"aria-labelledby":this.props.label?this._labelId:void 0}),this.props.label&&this.renderLabel(),Y(J,{display:"inline-block",css:null===(p=this.props.styles)||void 0===p?void 0:p.pages},this.renderArrowButton("first",t),this.renderArrowButton("prev",t),this.inputMode?this.renderPageInput(t):this.renderPages(t),this.renderArrowButton("next",t),this.renderArrowButton("last",t)))}},FP.displayName="Pagination",FP.componentId="Pagination",FP.propTypes=_P,FP.allowedProps=["children","disabled","withFirstAndLastButton","showDisabledButtons","label","labelNext","labelPrev","labelFirst","labelLast","labelNumberInput","screenReaderLabelNumberInput","variant","margin","as","elementRef","inputRef","shouldHandleFocus","totalPageNumber","currentPage","onPageChange","siblingCount","boundaryCount","renderPageIndicator","ellipsis"],FP.defaultProps={disabled:!1,withFirstAndLastButton:!1,showDisabledButtons:!1,variant:"full",as:"div",labelNumberInput:e=>`of ${e}`,screenReaderLabelNumberInput:(e,o)=>`Select page (${e} of ${o})`,shouldHandleFocus:!0,totalPageNumber:0,currentPage:1,siblingCount:1,boundaryCount:1,ellipsis:"...",renderPageIndicator:e=>e},FP.Page=SP,FP.Navigation=XP,jP=FP))||jP)||jP)||jP;const QP={screenReaderLabel:E.string.isRequired,size:E.oneOf(["x-small","small","medium","large"]),valueMax:E.number,valueNow:E.number,formatScreenReaderValue:E.func,renderValue:E.oneOfType([E.func,E.node]),color:E.oneOf(["primary","primary-inverse"]),meterColor:E.oneOfType([E.func,E.oneOf(["info","warning","danger","alert","success","brand"])]),shouldAnimate:E.bool,margin:D.spacing,elementRef:E.func,as:E.elementType},JP=["renderValue","formatScreenReaderValue","valueNow","valueMax","screenReaderLabel","size","color","meterColor","styles"];var eX,oX,pX;let tX=(eX=_(((e,o)=>{const p=o.valueNow,t=void 0===p?0:p,n=o.valueMax,r=void 0===n?100:n,c=o.size,s=o.color,l=o.meterColor,i=o.shouldAnimate,a="function"==typeof l?l({valueNow:t,valueMax:r}):l,M=(t>r?r:t<0?0:t)/r*100+"%",b={"x-small":{track:{height:e.xSmallHeight},value:{fontSize:e.xSmallValueFontSize}},small:{track:{height:e.smallHeight},value:{fontSize:e.smallValueFontSize}},medium:{track:{height:e.mediumHeight},value:{fontSize:e.mediumValueFontSize}},large:{track:{height:e.largeHeight},value:{fontSize:e.largeValueFontSize}}},z={primary:{trackLayout:{background:e.trackColor},trackBorder:{borderBottomColor:e.trackBottomBorderColor}},"primary-inverse":{trackLayout:{background:e.trackColorInverse},trackBorder:{borderBottomColor:e.trackBottomBorderColorInverse}}},d={primary:{brand:{background:e.meterColorBrand},info:{background:e.meterColorInfo},success:{background:e.meterColorSuccess},danger:{background:e.meterColorDanger},warning:{background:e.meterColorWarning},alert:{background:e.meterColorAlert}},"primary-inverse":{brand:{background:e.meterColorBrandInverse},info:{background:e.meterColorInfoInverse},success:{background:e.meterColorSuccessInverse},danger:{background:e.meterColorDangerInverse},warning:{background:e.meterColorWarningInverse},alert:{background:e.meterColorAlertInverse}}};return{progressBar:{label:"progressBar",display:"flex",alignItems:"center",fontFamily:e.fontFamily,fontWeight:e.fontWeight,lineHeight:e.lineHeight,fontSize:e.fontSize},trackLayout:{label:"progressBar__trackLayout",position:"relative",flex:1,...z[s].trackLayout},track:{label:"progressBar__track",display:"block",boxSizing:"border-box",width:"100%",borderBottomWidth:e.trackBottomBorderWidth,borderBottomStyle:"solid",background:"transparent",...b[c].track,...z[s].trackBorder},trackValue:{label:"progressBar__trackValue",display:"block",boxSizing:"border-box",height:"100%",width:M,maxWidth:"100%",...i&&{transition:"all 0.5s"},...a&&d[s][a]},value:{label:"progressBar__value",lineHeight:1,boxSizing:"border-box",paddingInlineStart:e.valuePadding,flex:"0 0 5.625rem",...b[c].value},htmlProgress:{label:"progressBar__htmlProgress",display:"block",position:"absolute",top:"0",left:"0",width:"100%",height:"100%",boxSizing:"border-box",zIndex:-1,opacity:0}}}),(e=>{var o,p,t,n,r,c,s,l,i,a,M,b,z,d,O,h,A,u,f,m,q;const R=e.borders,W=e.colors,v=e.spacing,g=e.typography,y=e.key,L={canvas:{meterColorBrand:e["ic-brand-primary"]},"canvas-high-contrast":{meterColorBrandInverse:null==W||null===(o=W.contrasts)||void 0===o?void 0:o.white1010,meterColorSuccessInverse:null==W||null===(p=W.contrasts)||void 0===p?void 0:p.white1010,meterColorInfoInverse:null==W||null===(t=W.contrasts)||void 0===t?void 0:t.white1010,meterColorAlertInverse:null==W||null===(n=W.contrasts)||void 0===n?void 0:n.white1010,meterColorWarningInverse:null==W||null===(r=W.contrasts)||void 0===r?void 0:r.white1010,meterColorDangerInverse:null==W||null===(c=W.contrasts)||void 0===c?void 0:c.white1010}};return{...{fontFamily:null==g?void 0:g.fontFamily,fontWeight:null==g?void 0:g.fontWeightNormal,lineHeight:null==g?void 0:g.lineHeightCondensed,fontSize:null==g?void 0:g.fontSizeMedium,xSmallHeight:null==v?void 0:v.xSmall,xSmallValueFontSize:null==g?void 0:g.fontSizeXSmall,smallHeight:"1.125rem",smallValueFontSize:null==g?void 0:g.fontSizeXSmall,mediumHeight:null==v?void 0:v.medium,mediumValueFontSize:null==g?void 0:g.fontSizeSmall,largeHeight:null==v?void 0:v.large,largeValueFontSize:null==g?void 0:g.fontSizeMedium,valuePadding:`${null==v?void 0:v.xxSmall}`,meterColorBrand:null==W||null===(s=W.contrasts)||void 0===s?void 0:s.blue4570,meterColorBrandInverse:null==W||null===(l=W.contrasts)||void 0===l?void 0:l.blue4570,meterColorInfo:null==W||null===(i=W.contrasts)||void 0===i?void 0:i.blue4570,meterColorInfoInverse:null==W||null===(a=W.contrasts)||void 0===a?void 0:a.blue4570,meterColorSuccess:null==W||null===(M=W.contrasts)||void 0===M?void 0:M.green4570,meterColorSuccessInverse:null==W||null===(b=W.contrasts)||void 0===b?void 0:b.green4570,meterColorDanger:null==W||null===(z=W.contrasts)||void 0===z?void 0:z.red4570,meterColorDangerInverse:null==W||null===(d=W.contrasts)||void 0===d?void 0:d.red4570,meterColorAlert:null==W||null===(O=W.contrasts)||void 0===O?void 0:O.blue4570,meterColorAlertInverse:null==W||null===(h=W.contrasts)||void 0===h?void 0:h.blue4570,meterColorWarning:null==W||null===(A=W.contrasts)||void 0===A?void 0:A.orange4570,meterColorWarningInverse:null==W||null===(u=W.contrasts)||void 0===u?void 0:u.orange4570,meterBorderWidthInverse:null==R?void 0:R.widthSmall,meterBorderColorInverse:"transparent",trackColor:null==W||null===(f=W.contrasts)||void 0===f?void 0:f.white1010,trackColorInverse:"transparent",trackBottomBorderWidth:null==R?void 0:R.widthSmall,trackBottomBorderColor:null==W||null===(m=W.contrasts)||void 0===m?void 0:m.grey1214,trackBottomBorderColorInverse:null==W||null===(q=W.contrasts)||void 0===q?void 0:q.white1010},...L[y]}})),eX(oX=U()(((pX=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){const e=this.props,o=e.renderValue,p=e.formatScreenReaderValue,t=e.valueNow,n=e.valueMax,r=e.screenReaderLabel;e.size,e.color,e.meterColor;const c=e.styles,s=P(e,JP),l=`${r} ${"function"==typeof p?p({valueNow:t,valueMax:n}):void 0}`,i=$(o,{valueNow:t,valueMax:n});return Y(J,Object.assign({},Z(s),{as:this.props.as,css:null==c?void 0:c.progressBar,margin:this.props.margin,elementRef:this.handleRef}),Y("span",{css:null==c?void 0:c.trackLayout},Y("progress",{css:null==c?void 0:c.htmlProgress,max:n,value:t,"aria-valuetext":l}),Y("span",{css:null==c?void 0:c.track,role:"presentation","aria-hidden":"true"},Y("span",{css:null==c?void 0:c.trackValue}))),i&&Y("span",{css:null==c?void 0:c.value,"aria-hidden":"true"},i))}}).displayName="ProgressBar",pX.componentId="ProgressBar",pX.allowedProps=["screenReaderLabel","size","valueMax","valueNow","formatScreenReaderValue","renderValue","color","meterColor","shouldAnimate","margin","elementRef","as"],pX.propTypes=QP,pX.defaultProps={formatScreenReaderValue:({valueNow:e,valueMax:o})=>`${e} / ${o}`,size:"medium",valueMax:100,valueNow:0,as:"div",color:"primary",shouldAnimate:!1,meterColor:({valueNow:e,valueMax:o})=>e/o>=1?"success":"brand"},oX=pX))||oX)||oX);const nX=1,rX=1.8,cX=2.75,sX=3.5,lX=3,iX=5,aX=7,MX=9,bX=.185,zX=.5,dX=.625,OX=.875,hX=.0625,AX=nX-bX/2+hX,uX=rX-zX/2+hX,fX=cX-dX/2+hX,mX=sX-OX/2+hX,qX=function(e){return(2*Math.PI*e).toFixed(3)},RX=function(e){return e/2},WX={screenReaderLabel:E.string.isRequired,size:E.oneOf(["x-small","small","medium","large"]),valueMax:E.number,valueNow:E.number,formatScreenReaderValue:E.func,renderValue:E.oneOfType([E.func,E.node]),color:E.oneOf(["primary","primary-inverse"]),meterColor:E.oneOfType([E.func,E.oneOf(["info","warning","danger","alert","success","brand"])]),margin:D.spacing,elementRef:E.func,as:E.elementType,shouldAnimateOnMount:E.bool,animationDelay:E.number},vX=["color","renderValue","formatScreenReaderValue","meterColor","valueNow","valueMax","screenReaderLabel","size","styles"];var gX,yX,LX;let NX=(gX=_(((e,o,p)=>{const t=o.size,n=o.color,r=o.meterColor,c=o.valueNow,s=void 0===c?0:c,l=o.valueMax,i=void 0===l?100:l,a=p.shouldAnimateOnMount,M="function"==typeof r?r({valueNow:s,valueMax:i}):r,b={"x-small":{progressCircle:{width:e.xSmallSize,height:e.xSmallSize},circle:{width:e.xSmallSize,height:e.xSmallSize},value:{padding:"0.5rem"},border:{transformOrigin:`${e.xSmallTransform} ${e.xSmallTransform}`},track:{transformOrigin:`${e.xSmallTransform} ${e.xSmallTransform}`,strokeWidth:e.xSmallStrokeWidth},meter:{strokeWidth:e.xSmallStrokeWidth,strokeDasharray:e.xSmallCircumference,...a&&{strokeDashoffset:`${e.xSmallCircumference} !important`}}},small:{progressCircle:{width:e.smallSize,height:e.smallSize},circle:{width:e.smallSize,height:e.smallSize},value:{},border:{transformOrigin:`${e.smallTransform} ${e.smallTransform}`},track:{transformOrigin:`${e.smallTransform} ${e.smallTransform}`,strokeWidth:e.smallStrokeWidth},meter:{strokeWidth:e.smallStrokeWidth,strokeDasharray:e.smallCircumference,...a&&{strokeDashoffset:`${e.smallCircumference} !important`}}},medium:{progressCircle:{width:e.mediumSize,height:e.mediumSize},circle:{width:e.mediumSize,height:e.mediumSize},value:{},border:{transformOrigin:`${e.mediumTransform} ${e.mediumTransform}`},track:{transformOrigin:`${e.mediumTransform} ${e.mediumTransform}`,strokeWidth:e.mediumStrokeWidth},meter:{strokeWidth:e.mediumStrokeWidth,strokeDasharray:e.mediumCircumference,...a&&{strokeDashoffset:`${e.mediumCircumference} !important`}}},large:{progressCircle:{width:e.largeSize,height:e.largeSize},circle:{width:e.largeSize,height:e.largeSize},value:{},border:{transformOrigin:`${e.largeTransform} ${e.largeTransform}`},track:{transformOrigin:`${e.largeTransform} ${e.largeTransform}`,strokeWidth:e.largeStrokeWidth},meter:{strokeWidth:e.largeStrokeWidth,strokeDasharray:e.largeCircumference,...a&&{strokeDashoffset:`${e.largeCircumference} !important`}}}},z={primary:{track:{stroke:e.trackColor},value:{color:e.color},border:{stroke:e.trackBorderColor}},"primary-inverse":{track:{stroke:e.trackColorInverse},value:{color:e.colorInverse},border:{stroke:e.trackBorderColorInverse}}},d={primary:{brand:{stroke:e.meterColorBrand},info:{stroke:e.meterColorInfo},warning:{stroke:e.meterColorWarning},danger:{stroke:e.meterColorDanger},alert:{stroke:e.meterColorAlert},success:{stroke:e.meterColorSuccess}},"primary-inverse":{brand:{stroke:e.meterColorBrandInverse},info:{stroke:e.meterColorInfoInverse},warning:{stroke:e.meterColorWarningInverse},danger:{stroke:e.meterColorDangerInverse},alert:{stroke:e.meterColorAlertInverse},success:{stroke:e.meterColorSuccessInverse}}};return{progressCircle:{label:"progressCircle",display:"inline-block",verticalAlign:"middle",position:"relative",overflow:"hidden",fontSize:"1rem",fontFamily:e.fontFamily,fontWeight:e.fontWeight,lineHeight:e.lineHeight,...b[t].progressCircle},center:{label:"progressCircle__center",transition:"all 0.5s",transitionDelay:"1s",display:"block",position:"absolute",transform:"translate3d(0, 0, 0)",top:0,left:0,height:"100%",width:"100%",borderRadius:"50%",...a&&{opacity:0,transform:"translate3d(0, 10%, 0)"}},value:{label:"progressCircle__value",boxSizing:"border-box",wordWrap:"break-word",textAlign:"center",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",padding:"1.5rem",width:"100%",height:"100%",lineHeight:1,...b[t].value,...z[n].value},circle:{label:"progressCircle__circle",transform:"rotate(-90deg)",display:"block",position:"absolute",top:0,left:0,...b[t].circle},track:{label:"progressCircle__track",fill:"none",opacity:1,transition:"all 0.5s",transitionDelay:"0.2s",transform:"translate3d(0, 0, 0)",...b[t].track,...z[n].track,...a&&{opacity:0,transform:"translate3d(0, 0, 0)"}},border:{label:"progressCircle__border",fill:"none",opacity:1,transition:"all 0.5s",transform:"translate3d(0, 0, 0) scale(1)",...b[t].border,...z[n].border,...a&&{opacity:0,transform:"translate3d(0, 0, 0) scale(0.75)"}},meter:{label:"progressCircle__meter",fill:"none",transition:"stroke-dashoffset 1s",transform:"translate3d(0, 0, 0)",...b[t].meter,...M&&d[n][M],...a&&{opacity:0}},radii:(()=>{const o="x-small"===t?"xSmall":t;return{radius:e[`${o}Radius`],borderOffsetRadius:e[`${o}BorderOffset`]}})(),dashOffset:(()=>{if(s{var o,p,t,n,r,c,s,l,i,a,M,b,z,d,O,h,A,u,f,m,q,R,W;const v=e.colors,g=e.typography,y=e.key,L={canvas:{color:e["ic-brand-font-color-dark"],meterColorBrand:e["ic-brand-primary"]},"canvas-high-contrast":{meterColorBrandInverse:null==v||null===(o=v.contrasts)||void 0===o?void 0:o.white1010,meterColorSuccessInverse:null==v||null===(p=v.contrasts)||void 0===p?void 0:p.white1010,meterColorInfoInverse:null==v||null===(t=v.contrasts)||void 0===t?void 0:t.white1010,meterColorAlertInverse:null==v||null===(n=v.contrasts)||void 0===n?void 0:n.white1010,meterColorWarningInverse:null==v||null===(r=v.contrasts)||void 0===r?void 0:r.white1010,meterColorDangerInverse:null==v||null===(c=v.contrasts)||void 0===c?void 0:c.white1010}};return{...{fontFamily:null==g?void 0:g.fontFamily,fontWeight:null==g?void 0:g.fontWeightNormal,lineHeight:null==g?void 0:g.lineHeightCondensed,xSmallSize:`${lX}em`,xSmallRadius:`${nX}em`,xSmallCircumference:`${qX(nX)}em`,xSmallTransform:`${RX(lX)}em`,xSmallStrokeWidth:`${bX}em`,xSmallBorderOffset:`${AX}em`,smallSize:`${iX}em`,smallRadius:`${rX}em`,smallCircumference:`${qX(rX)}em`,smallTransform:`${RX(iX)}em`,smallStrokeWidth:`${zX}em`,smallBorderOffset:`${uX}em`,mediumSize:`${aX}em`,mediumRadius:`${cX}em`,mediumCircumference:`${qX(cX)}em`,mediumTransform:`${RX(aX)}em`,mediumStrokeWidth:`${dX}em`,mediumBorderOffset:`${fX}em`,largeSize:`${MX}em`,largeRadius:`${sX}em`,largeCircumference:`${qX(sX)}em`,largeTransform:`${RX(MX)}em`,largeStrokeWidth:`${OX}em`,largeBorderOffset:`${mX}em`,color:null==v||null===(s=v.contrasts)||void 0===s?void 0:s.grey125125,colorInverse:null==v||null===(l=v.contrasts)||void 0===l?void 0:l.white1010,trackColor:null==v||null===(i=v.contrasts)||void 0===i?void 0:i.white1010,trackColorInverse:"transparent",trackBorderColor:null==v||null===(a=v.contrasts)||void 0===a?void 0:a.grey125125,trackBorderColorInverse:null==v||null===(M=v.contrasts)||void 0===M?void 0:M.white1010,meterColorBrand:null==v||null===(b=v.contrasts)||void 0===b?void 0:b.blue4570,meterColorBrandInverse:null==v||null===(z=v.contrasts)||void 0===z?void 0:z.blue4570,meterColorInfo:null==v||null===(d=v.contrasts)||void 0===d?void 0:d.blue4570,meterColorInfoInverse:null==v||null===(O=v.contrasts)||void 0===O?void 0:O.blue4570,meterColorSuccess:null==v||null===(h=v.contrasts)||void 0===h?void 0:h.green4570,meterColorSuccessInverse:null==v||null===(A=v.contrasts)||void 0===A?void 0:A.green4570,meterColorDanger:null==v||null===(u=v.contrasts)||void 0===u?void 0:u.red4570,meterColorDangerInverse:null==v||null===(f=v.contrasts)||void 0===f?void 0:f.red4570,meterColorAlert:null==v||null===(m=v.contrasts)||void 0===m?void 0:m.blue4570,meterColorAlertInverse:null==v||null===(q=v.contrasts)||void 0===q?void 0:q.blue4570,meterColorWarning:null==v||null===(R=v.contrasts)||void 0===R?void 0:R.orange4570,meterColorWarningInverse:null==v||null===(W=v.contrasts)||void 0===W?void 0:W.orange4570},...L[y]}})),gX(yX=U()(((LX=class extends u.Component{constructor(e){super(e),this._timeouts=[],this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.state={shouldAnimateOnMount:e.shouldAnimateOnMount}}get makeStylesVariables(){return{shouldAnimateOnMount:this.state.shouldAnimateOnMount}}componentDidMount(){var e,o;this.state.shouldAnimateOnMount&&this._timeouts.push(setTimeout((()=>{this.setState({shouldAnimateOnMount:!1})}),this.props.animationDelay||500)),null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStylesVariables)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStylesVariables)}componentWillUnmount(){this._timeouts.forEach((e=>clearTimeout(e)))}render(){var e,o,p;const t=this.props;t.color;const n=t.renderValue,r=t.formatScreenReaderValue;t.meterColor;const c=t.valueNow,s=t.valueMax,l=t.screenReaderLabel;t.size;const i=t.styles,a=P(t,vX),M=`${l} ${"function"==typeof r?r({valueNow:c,valueMax:s}):void 0}`,b=$(n,{valueNow:c,valueMax:s}),z={strokeDashoffset:`${null==i?void 0:i.dashOffset}em`};return Y(J,Object.assign({},Z(a),{as:this.props.as,elementRef:this.handleRef,css:null==i?void 0:i.progressCircle,margin:this.props.margin}),Y(Ae,null,Y("progress",{max:s,value:c,"aria-valuetext":M})),b&&Y("span",{css:null==i?void 0:i.center,"aria-hidden":"true"},Y("span",{css:null==i?void 0:i.value},b)),Y("svg",{css:null==i?void 0:i.circle,role:"presentation",focusable:"false"},Y("circle",{css:null==i?void 0:i.track,role:"presentation",cx:"50%",cy:"50%",r:null==i||null===(e=i.radii)||void 0===e?void 0:e.radius}),Y("circle",{css:null==i?void 0:i.border,role:"presentation",cx:"50%",cy:"50%",r:null==i||null===(o=i.radii)||void 0===o?void 0:o.borderOffsetRadius}),Y("circle",{css:null==i?void 0:i.meter,role:"presentation",style:z,cx:"50%",cy:"50%",r:null==i||null===(p=i.radii)||void 0===p?void 0:p.radius})))}}).displayName="ProgressCircle",LX.componentId="ProgressCircle",LX.allowedProps=["screenReaderLabel","size","valueMax","valueNow","formatScreenReaderValue","renderValue","color","meterColor","margin","elementRef","as","shouldAnimateOnMount","animationDelay"],LX.propTypes=WX,LX.defaultProps={formatScreenReaderValue:({valueNow:e,valueMax:o})=>`${e} / ${o}`,size:"medium",valueMax:100,valueNow:0,as:"div",color:"primary",shouldAnimateOnMount:!1,meterColor:({valueNow:e,valueMax:o})=>e/o>=1?"success":"brand"},yX=LX))||yX)||yX);const BX={min:E.number.isRequired,max:E.number.isRequired,defaultValue:E.number,value:Se(E.number),onChange:E.func,messages:E.arrayOf(t.message),size:E.oneOf(["small","medium","large"]),layout:E.oneOf(["stacked","inline"]),id:E.string,label:E.node.isRequired,displayValue:E.bool,step:E.number,formatValue:E.func,inline:E.bool,disabled:E.bool,readOnly:E.bool,thumbVariant:Mo.deprecatePropValues(E.oneOf(["deprecated","accessible"]),["deprecated"],"The `deprecated` variant is not fully accessible and will be removed in V9. The connected theme variables will be removed as well: `handleShadowColor`, `handleFocusOutlineColor`, `handleFocusOutlineWidth`. Please use the `accessible` variant.")};var wX,CX,TX,SX;let xX=(wX=K(),CX=_(((e,o)=>{const p=o.size,t=o.thumbVariant,n={small:{fontSize:e.valueSmallFontSize,padding:e.valueSmallPadding,lineHeight:e.valueSmallLineHeight},medium:{fontSize:e.valueMediumFontSize,padding:e.valueMediumPadding,lineHeight:e.valueMediumLineHeight},large:{fontSize:e.valueLargeFontSize,padding:e.valueLargePadding,lineHeight:e.valueLargeLineHeight}},r={borderRadius:"0.312em",borderColor:"transparent",color:"transparent",cursor:"pointer",background:e.trackBackground,height:`calc(${e.handleSize} / 2)`},c=`calc(${e.handleSize} + (${e.handleBorderSize} * 2))`,s={deprecated:{width:e.handleSize,height:e.handleSize,boxShadow:`0 0.0625rem 0 ${e.handleShadowColor}`},accessible:{width:c,height:c,borderWidth:e.handleBorderSize,borderColor:e.handleBorderColor,borderStyle:"solid",boxSizing:"border-box",boxShadow:e.handleShadow}},l={appearance:"none",borderRadius:"50%",cursor:"pointer",transition:"all 0.15s ease-in-out",background:e.handleBackground,...s[t],"&:hover":{background:e.handleHoverBackground}},i={deprecated:{marginTop:`calc(-1 * ${e.handleSize} / 4)`},accessible:{marginTop:`calc(-1 * ${c} / 4)`}},a={deprecated:{background:e.handleFocusBackground,boxShadow:`0 0.0625rem 0 ${e.handleShadowColor}, 0 0 0 ${e.handleFocusOutlineWidth} ${e.handleFocusOutlineColor}`},accessible:{background:e.handleFocusBackground,boxShadow:e.handleShadow+", "+`inset 0 0 0 ${e.handleFocusInset} ${e.handleFocusBackground}, `+`inset 0 0 0 calc(${e.handleFocusInset} + ${e.handleFocusRingSize}) ${e.handleFocusRingColor}`}};return{rangeInput:{label:"rangeInput",display:"flex",justifyContent:"center",alignItems:"center",minWidth:e.minWidth},rangeInputInput:{label:"rangeInput__input",all:"initial",flex:"auto",boxSizing:"border-box",appearance:"none",width:"100%",outline:"none",margin:0,"&::-webkit-slider-thumb":{...l,...i[t]},"&::-moz-range-thumb":l,"&:focus, &:active":{outline:"none","&::-webkit-slider-thumb":a[t],"&::-moz-range-thumb":a[t]},"&::-moz-focus-inner, &::-moz-focus-outer":{border:0,outline:"none"},"&::-webkit-slider-runnable-track":r,"&::-moz-range-track":r,'[dir="rtl"] &':{direction:"rtl"}},rangeInputInputValue:{label:"rangeInput__value",all:"initial",boxSizing:"border-box",display:"block",color:"inherit",fontFamily:e.valueFontFamily,fontWeight:e.valueFontWeight,textAlign:"center",...n[p]}}}),(e=>{var o,p,t,n,r,c,s,l,i;const a=e.colors,M=e.borders,b=e.typography,z=e.spacing,d=e.forms,O=e.key,h={canvas:{handleBackground:e["ic-brand-primary"],handleHoverBackground:e["ic-brand-primary"],handleFocusBackground:e["ic-brand-primary"],handleShadowColor:po(e["ic-brand-primary"],15),handleFocusOutlineColor:to(e["ic-brand-primary"],40)}};return{...{minWidth:"12.5rem",handleSize:"1.5rem",handleBackground:null==a||null===(o=a.contrasts)||void 0===o?void 0:o.blue4570,handleBorderColor:null==a||null===(p=a.contrasts)||void 0===p?void 0:p.white1010,handleBorderSize:null==M?void 0:M.widthMedium,handleShadow:"0 0.0625rem 0.125rem rgba(0, 0, 0, .2), 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.1)",handleFocusInset:null==M?void 0:M.widthSmall,handleFocusRingSize:null==M?void 0:M.widthMedium,handleFocusRingColor:null==a||null===(t=a.contrasts)||void 0===t?void 0:t.white1010,handleFocusBackground:null==a||null===(n=a.contrasts)||void 0===n?void 0:n.blue4570,handleHoverBackground:null==a||null===(r=a.contrasts)||void 0===r?void 0:r.blue4570,handleShadowColor:po(null==a||null===(c=a.contrasts)||void 0===c?void 0:c.blue5782,10),handleFocusOutlineColor:to(null==a||null===(s=a.contrasts)||void 0===s?void 0:s.blue4570,40),handleFocusOutlineWidth:"0.75em",trackBackground:null==a||null===(l=a.contrasts)||void 0===l?void 0:l.grey4570,valueColor:null==a||null===(i=a.contrasts)||void 0===i?void 0:i.white1010,valueFontFamily:null==b?void 0:b.fontFamily,valueFontWeight:null==b?void 0:b.fontWeightNormal,valueSmallFontSize:null==b?void 0:b.fontSizeSmall,valueSmallPadding:`0 ${null==z?void 0:z.xSmall}`,valueSmallLineHeight:null==d?void 0:d.inputHeightSmall,valueMediumFontSize:null==b?void 0:b.fontSizeMedium,valueMediumPadding:`0 ${null==z?void 0:z.small}`,valueMediumLineHeight:null==d?void 0:d.inputHeightMedium,valueLargeFontSize:null==b?void 0:b.fontSizeLarge,valueLargePadding:`0 ${null==z?void 0:z.medium}`,valueLargeLineHeight:null==d?void 0:d.inputHeightLarge},...h[O]}})),wX(TX=CX(TX=U()((SX=class e extends u.Component{constructor(e){super(e),this.ref=null,this._input=null,this._inputListener=null,this._changeListener=null,this.defaultId=void 0,this.handleRef=e=>{this.ref=e},this.handleChange=e=>{const o=this.props,p=o.onChange;void 0===o.value&&this.setState({value:e.target.value}),"function"==typeof p&&p(e.target.value)},this.noopChange=()=>{},void 0===e.value&&(this.state={value:e.defaultValue}),this.defaultId=e.deterministicId()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o),null!==this._input&&(this._inputListener=Pe(this._input,"input",this.handleChange),this._changeListener=Pe(this._input,"change",this.handleChange))}componentWillUnmount(){var e,o;this._input&&(null===(e=this._inputListener)||void 0===e||e.remove(),null===(o=this._changeListener)||void 0===o||o.remove())}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}get value(){const e=void 0===this.props.value?this.state.value:this.props.value;return"string"==typeof e?parseInt(e):e}get invalid(){return this.props.messages&&this.props.messages.findIndex((e=>"error"===e.type))>=0}get id(){return this.props.id||this.defaultId}renderValue(){if(this.props.displayValue){var o;if(!this.value)return ce(!1,"RangeInput should have a `value` or `defaultValue` set for the value to be displayed. If no value has to be displayed, set `displayValue={false}`."),null;const p={[e.outputLocatorAttribute]:this.id};return Y(no,{background:"inverse",placement:"end center"},Y("div",Object.assign({},p,{css:null===(o=this.props.styles)||void 0===o?void 0:o.rangeInputInputValue}),this.props.formatValue(this.value,this.props.max)))}return null}render(){var o,p;const t=this.props,n=t.formatValue,r=t.disabled,c=t.readOnly,s=pe(this.props,e.allowedProps);return Y(A,Object.assign({},te(this.props,A.allowedProps),{label:this.props.label,id:this.id,elementRef:this.handleRef}),Y("div",{css:null===(o=this.props.styles)||void 0===o?void 0:o.rangeInput},Y("input",Object.assign({css:null===(p=this.props.styles)||void 0===p?void 0:p.rangeInputInput,ref:e=>{this._input=e},type:"range",id:this.id,min:this.props.min,max:this.props.max,step:this.props.step,value:this.value,onChange:this.noopChange,"aria-valuetext":n(this.value,this.props.max)},s,{disabled:r||c,"aria-disabled":r||c?"true":void 0})),this.renderValue()))}},SX.displayName="RangeInput",SX.componentId="RangeInput",SX.outputLocatorAttribute="data-range-output",SX.allowedProps=["min","max","defaultValue","value","onChange","messages","size","layout","id","label","displayValue","step","formatValue","inline","disabled","readOnly","thumbVariant"],SX.propTypes=BX,SX.defaultProps={step:1,formatValue:e=>e,max:0,min:0,inline:!1,size:"medium",layout:"stacked",displayValue:!0,disabled:!1,readOnly:!1,thumbVariant:"deprecated"},TX=SX))||TX)||TX)||TX);const IX={animationDelay:E.number,animateFill:E.bool,filled:E.bool,size:E.oneOf(["small","medium","large"])};var EX,PX,XX;let HX=(EX=_(((e,o,p)=>{const t=o.size,n=p.filled,r={small:{fontSize:e.smallIconFontSize},medium:{fontSize:e.mediumIconFontSize},large:{fontSize:e.largeIconFontSize}};return{ratingIcon:{label:"ratingIcon",display:"inline-block",verticalAlign:"bottom",margin:`0 ${e.iconMargin}`,lineHeight:1,"&:first-of-type":{marginLeft:0},"&:last-of-type":{marginRight:0}},icon:{label:"ratingIcon__icon",display:"inline-block",verticalAlign:"bottom",...r[t],color:n?e.iconFilledColor:e.iconEmptyColor}}}),(e=>{var o,p;const t=e.colors,n=e.typography,r=e.spacing,c=e.key,s={canvas:{iconEmptyColor:e["ic-brand-primary"],iconFilledColor:e["ic-brand-primary"]}};return{...{iconMargin:null==r?void 0:r.xxxSmall,iconEmptyColor:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.blue4570,iconFilledColor:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.blue4570,smallIconFontSize:null==n?void 0:n.fontSizeMedium,mediumIconFontSize:null==n?void 0:n.fontSizeLarge,largeIconFontSize:null==n?void 0:n.fontSizeXXLarge},...s[c]}})),EX(((XX=class extends u.Component{constructor(e){super(e),this.ref=null,this._timeouts=[],this._animation=void 0,this.makeStyleProps=()=>({filled:this.state.filled}),this.fill=()=>{this._animation=Ye((()=>{this.setState({filled:!0})}))},this.state={filled:e.filled&&!e.animateFill}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps()),this.props.animateFill&&this._timeouts.push(setTimeout(this.fill,this.props.animationDelay))}componentDidUpdate(e){var o,p;this.props.animateFill&&this.props.filled&&this.props.filled!==e.filled&&this.fill(),null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p,this.makeStyleProps())}componentWillUnmount(){this._animation&&this._animation.cancel(),this._timeouts.forEach((e=>clearTimeout(e)))}render(){var e,o,p;const t=this.props.animateFill,n=this.state.filled?Gw:Yw;return Y("span",{css:null===(e=this.props.styles)||void 0===e?void 0:e.ratingIcon,ref:e=>{this.ref=e}},Y("span",null,this.state.filled&&t?Y(ge,{in:!0,transitionOnMount:!0,type:"scale"},Y(n,{css:null===(o=this.props.styles)||void 0===o?void 0:o.icon})):Y(n,{css:null===(p=this.props.styles)||void 0===p?void 0:p.icon})))}}).displayName="RatingIcon",XX.componentId="Rating.Icon",XX.allowedProps=["animationDelay","animateFill","filled","size"],XX.propTypes=IX,XX.defaultProps={animationDelay:200,animateFill:!1,filled:!1,size:"medium"},PX=XX))||PX);const ZX={label:E.string.isRequired,formatValueText:E.func,iconCount:E.oneOf([3,5]),size:E.oneOf(["small","medium","large"]),valueMax:E.number,valueNow:E.number,animateFill:E.bool,margin:D.spacing};var VX,kX;let DX=_((()=>({rating:{label:"rating",lineHeight:1}})),null)(VX=U()((kX=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}get filled(){const e=this.props,o=e.valueNow,p=e.iconCount,t=e.valueMax,n=t&&t>0?t:p,r=Math.round(o*p/n);return r>p?p:r}get empty(){return this.props.iconCount-this.filled}render(){var o;const p=this.props,t=p.iconCount,n=p.animateFill,r=p.size,c=p.margin,s=p.label,l=p.formatValueText,i=s+" "+(null==l?void 0:l(this.filled,t)),a=J.omitViewProps(pe(this.props,e.allowedProps),e);return Y(J,Object.assign({},a,{css:null===(o=this.props.styles)||void 0===o?void 0:o.rating,margin:c,display:"inline-block",elementRef:this.handleRef}),Y(Ae,null,i),[...Array(this.filled)].map(((e,o)=>Y(HX,{key:o+1,filled:!0,animateFill:n,animationDelay:n?200*(o+1):void 0,size:r}))),[...Array(this.empty)].map(((e,o)=>Y(HX,{key:o+1,size:r}))))}},kX.displayName="Rating",kX.componentId="Rating",kX.allowedProps=["label","formatValueText","iconCount","size","valueMax","valueNow","animateFill","margin"],kX.propTypes=ZX,kX.defaultProps={animateFill:!1,formatValueText:(e,o)=>`${e} / ${o}`,iconCount:3,size:"medium",valueNow:0},kX.Icon=HX,VX=kX))||VX)||VX;const _X={elementRef:E.func,icon:E.node.isRequired,label:E.node.isRequired,as:E.elementType,href:E.string,onClick:E.func,selected:E.bool,minimized:E.bool};var jX,FX,UX;let YX=(jX=_(((e,o)=>{const p=o.selected;return{navigationItem:{label:"navigationItem",fontFamily:e.fontFamily,fontWeight:e.fontWeight,display:"block",width:"100%",textAlign:"center",padding:e.contentPadding,cursor:"pointer",border:"none",boxSizing:"border-box",textDecoration:e.linkTextDecoration,overflowWrap:"break-word",wordWrap:"break-word",hyphens:"auto",...p?{backgroundColor:e.selectedBackgroundColor,fill:e.selectedIconColor,color:e.selectedFontColor,"&:active, &:hover":{backgroundColor:e.selectedBackgroundColor,color:e.selectedFontColor,textDecoration:e.linkTextDecoration},"&:focus":{backgroundColor:e.selectedBackgroundColor,boxShadow:`${e.selectedOuterFocusOutline}, ${e.selectedInnerFocusOutline}`,outline:"none"}}:{backgroundColor:e.backgroundColor,color:e.fontColor,"&:active":{backgroundColor:e.hoverBackgroundColor},"&:hover":{transition:"background-color .3s",backgroundColor:"rgba(0, 0, 0, 0.2)",color:e.fontColor,textDecoration:e.linkTextDecoration},"&:focus":{backgroundColor:e.hoverBackgroundColor,boxShadow:`${e.outerFocusOutline}, ${e.innerFocusOutline}`,outline:"none"}}},icon:{label:"navigationItem__icon",fontSize:e.iconSize,fill:e.iconColor},label:{label:"navigationItem__label",fontSize:e.fontSize,lineHeight:e.lineHeight}}}),(e=>{var o,p,t,n,r,c,s,l,i,a;const M=e.colors,b=e.spacing,z=e.typography,d=e.key,O={canvas:{fontColor:e["ic-brand-global-nav-menu-item__text-color"],iconColor:e["ic-brand-global-nav-ic-icon-svg-fill"],hoverBackgroundColor:e["ic-global-nav-link-hover"],selectedFontColor:e["ic-brand-global-nav-menu-item__text-color--active"],selectedIconColor:e["ic-brand-global-nav-ic-icon-svg-fill--active"]},"canvas-high-contrast":{linkTextDecoration:"underline"}};return{...{fontSize:null==z?void 0:z.fontSizeSmall,fontFamily:null==z?void 0:z.fontFamily,fontWeight:null==z?void 0:z.fontWeightNormal,fontColor:null==M||null===(o=M.contrasts)||void 0===o?void 0:o.white1010,iconSize:"1.625rem",iconColor:null==M||null===(p=M.contrasts)||void 0===p?void 0:p.white1010,lineHeight:null==z?void 0:z.lineHeight,backgroundColor:"transparent",linkTextDecoration:"none",hoverBackgroundColor:null==M||null===(t=M.contrasts)||void 0===t?void 0:t.grey125125,outerFocusOutline:`inset 0 0 0 0.125rem ${null==M||null===(n=M.contrasts)||void 0===n?void 0:n.grey4570}`,innerFocusOutline:`inset 0 0 0 0.25rem ${null===(r=M.contrasts)||void 0===r?void 0:r.white1010}`,selectedFontColor:null==M||null===(c=M.contrasts)||void 0===c?void 0:c.blue4570,selectedIconColor:null==M||null===(s=M.contrasts)||void 0===s?void 0:s.blue4570,selectedBackgroundColor:null==M||null===(l=M.contrasts)||void 0===l?void 0:l.white1010,selectedOuterFocusOutline:`inset 0 0 0 0.125rem ${null===(i=M.contrasts)||void 0===i?void 0:i.white1010}`,selectedInnerFocusOutline:`inset 0 0 0 0.25rem ${null===(a=M.contrasts)||void 0===a?void 0:a.blue4570}`,contentPadding:null==b?void 0:b.xxSmall},...O[d]}})),jX(FX=U()((UX=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,{minimized:this.props.minimized})}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,{minimized:this.props.minimized})}renderLink(o){var p,t,n;const r=X(e,this.props),c=this.props,s=c.href,l=c.onClick,i=c.icon,a=c.label,M=pe(this.props,e.allowedProps);return Y(r,Object.assign({},M,{href:s,onClick:l,ref:o?this.handleRef:void 0,css:null===(p=this.props.styles)||void 0===p?void 0:p.navigationItem,"aria-label":this.props.minimized?a:void 0}),Y("div",{css:null===(t=this.props.styles)||void 0===t?void 0:t.icon,"aria-hidden":"true"},i),this.props.minimized?null:Y("div",{css:null===(n=this.props.styles)||void 0===n?void 0:n.label},a))}render(){const e=this.props,o=e.minimized,p=e.label,t=o&&Ge(p),n=this.renderLink(!t);return t?Y(We,{renderTip:p,placement:"end",elementRef:this.handleRef},n):n}},UX.displayName="SideNavBarItem",UX.componentId="SideNavBar.Item",UX.allowedProps=["elementRef","icon","label","as","href","onClick","selected","minimized"],UX.propTypes=_X,UX.defaultProps={as:"a",selected:!1,minimized:!1},FX=UX))||FX)||FX);const GX={children:Le.oneOf([YX]),minimized:Se(E.bool,"onMinimized","defaultMinimized"),defaultMinimized:E.bool,onMinimized:E.func,label:E.string.isRequired,toggleLabel:E.shape({expandedLabel:E.string,minimizedLabel:E.string}).isRequired,href:E.string,onClick:E.func};var $X,KX,QX;const JX=({minimized:e})=>({minimized:!e});let eH=($X=_(((e,o,p)=>{const t=p.minimized;return{navigation:{label:"navigation",color:e.fontColor,backgroundColor:e.backgroundColor,boxSizing:"border-box",display:"flex",flexDirection:"column",width:e.width,height:"100%",overflowY:"auto",...t?{width:e.minimizedWidth}:{}},list:{label:"navigation__list",padding:0,margin:0},content:{label:"navigation__content",listStyleType:"none",margin:"0",padding:"0",flex:"1 0 auto"},toggleIcon:{fill:e.fill,margin:"0 auto",transform:"translate3d(0, 0, 0)",transition:`all ${e.toggleTransition}`,...t?{transform:"rotate3d(0, 1, 0, -180deg)"}:{}}}}),(e=>{var o,p,t,n,r;const c=e.colors,s=e.spacing,l=e.borders,i=e.transitions,a=e.key,M={canvas:{backgroundColor:e["ic-brand-global-nav-bgd"],fontColor:e["ic-brand-global-nav-menu-item__text-color"],fill:e["ic-brand-global-nav-ic-icon-svg-fill"]}};return{...{fontColor:null==c||null===(o=c.contrasts)||void 0===o?void 0:o.white1010,backgroundColor:null==c||null===(p=c.contrasts)||void 0===p?void 0:p.grey100100,width:"5.25rem",minimizedWidth:"3.375rem",fill:null==c||null===(t=c.contrasts)||void 0===t?void 0:t.white1010,focusOutlineInnerWidth:null==l?void 0:l.widthMedium,focusOutlineOuterWidth:null==l?void 0:l.widthSmall,focusOutlineInnerColor:null==c||null===(n=c.contrasts)||void 0===n?void 0:n.blue4570,focusOutlineOuterColor:null==c||null===(r=c.contrasts)||void 0===r?void 0:r.white1010,marginBottom:null==s?void 0:s.small,toggleTransition:null==i?void 0:i.duration},...M[a]}})),$X(KX=U()((QX=class e extends u.Component{constructor(e){super(e),this.ref=null,this.handleNavToggle=e=>{this.isControlled()||this.setState(JX),"function"==typeof this.props.onMinimized&&this.props.onMinimized(e,!this.minimized)},this.state={minimized:this.isControlled(e)?!!e.minimized:!!e.defaultMinimized}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,{minimized:this.minimized})}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,{minimized:this.minimized})}get minimized(){return this.isControlled()?!!this.props.minimized:!!this.state.minimized}isControlled(e=this.props){return"boolean"==typeof e.minimized}renderChildren(){return u.Children.map(this.props.children,(e=>{var o;const p=ye(e,{minimized:this.state.minimized});return Y("li",{css:null===(o=this.props.styles)||void 0===o?void 0:o.list},p)}))}toggleMessage(){return this.state.minimized?this.props.toggleLabel.minimizedLabel:this.props.toggleLabel.expandedLabel}render(){var o,p,t;const n=this.props.label,r=pe(this.props,e.allowedProps,["minimized"]);return Y("nav",Object.assign({},r,{css:null===(o=this.props.styles)||void 0===o?void 0:o.navigation,"aria-label":n,ref:e=>{this.ref=e}}),Y("ul",{css:null===(p=this.props.styles)||void 0===p?void 0:p.content},this.renderChildren()),Y(YX,{"aria-expanded":!this.minimized,onClick:this.handleNavToggle,icon:Y(PR,{css:null===(t=this.props.styles)||void 0===t?void 0:t.toggleIcon,inline:!1}),label:Y(Ae,null,this.toggleMessage())}))}},QX.displayName="SideNavBar",QX.componentId="SideNavBar",QX.allowedProps=["children","minimized","defaultMinimized","onMinimized","label","toggleLabel","href","onClick"],QX.propTypes=GX,QX.defaultProps={children:null,defaultMinimized:!1,onClick:function(e){}},QX.Item=YX,KX=QX))||KX)||KX);const oH={className:E.string,text:E.oneOfType([E.string,E.node]).isRequired,title:E.string,disabled:E.bool,readOnly:E.bool,dismissible:E.bool,margin:D.spacing,onClick:E.func,elementRef:E.func,size:E.oneOf(["small","medium","large"]),variant:E.oneOf(["default","inline"])};var pH,tH,nH;let rH=(pH=_(((e,o)=>{const p=o.variant,t=o.size,n=o.dismissible,r=o.onClick,c=o.disabled,s=!!r,l={small:{tag:{padding:e.paddingSmall,fontSize:e.fontSizeSmall},text:{lineHeight:`calc(${e.heightSmall} - (${e.defaultBorderWidth} * 2))`},icon:{fontSize:"0.75rem"}},medium:{tag:{padding:e.padding,fontSize:`calc(${e.fontSizeMedium} - 0.0625rem)`},text:{lineHeight:`calc(${e.heightMedium} - (${e.defaultBorderWidth} * 2))`},icon:{fontSize:"0.875rem"}},large:{tag:{padding:e.padding,fontSize:`calc(${e.fontSizeLarge} - 0.0625rem)`},text:{lineHeight:`calc(${e.heightLarge} - (${e.defaultBorderWidth} * 2))`},icon:{fontSize:"1rem"}}},i=s?{tag:{touchAction:"manipulation",outline:"none",position:"relative",overflow:"visible",transition:`background-color ${e.transitionTiming}`,...!n&&{cursor:"pointer"},"&:focus":{"&::before":{opacity:1,transform:"scale(1)"}},...c&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5}},tagBefore:{content:'""',boxSizing:"border-box",border:`${e.focusOutlineWidth} ${e.focusOutlineStyle} ${e.focusOutlineColor}`,position:"absolute",top:"-0.3125rem",bottom:"-0.3125rem",left:"-0.3125rem",right:"-0.3125rem",opacity:0,transform:"scale(0.9)",transition:`all ${e.transitionTiming}`,pointerEvents:"none"}}:{},a={default:{tag:{backgroundColor:e.defaultBackground,border:`${e.defaultBorderWidth} ${e.defaultBorderStyle} ${e.defaultBorderColor}`,borderRadius:e.defaultBorderRadius,color:e.defaultColor,...s&&{"&:hover":{backgroundColor:e.defaultBackgroundHover}}},tagBefore:{...s&&{borderRadius:e.defaultBorderRadius}}},inline:{tag:{backgroundColor:e.inlineBackground,border:`${e.inlineBorderWidth} ${e.inlineBorderStyle} ${e.inlineBorderColor}`,borderRadius:e.inlineBorderRadius,color:e.inlineColor,cursor:"text",margin:"0 0.1875rem 0.1875rem",...s&&{"&:hover":{backgroundColor:e.inlineBackgroundHover}}},tagBefore:{...s&&{borderRadius:`calc(${e.inlineBorderRadius} * 1.5)`}}}},M={default:{...n&&{color:e.defaultIconColor,'[class$="-tag"]:hover > &':{color:e.defaultIconHoverColor}}},inline:{...n&&{backgroundColor:e.inlineIconColor,borderRadius:"50%",color:e.inlineBackground,fontSize:"0.75rem",padding:"0.25rem",position:"absolute",insetInlineEnd:0,insetInlineStart:"auto",top:0,transform:"translate(40%, -40%)",'[class$="-tag"]:hover > &':{backgroundColor:e.inlineIconHoverColor},'[dir="rtl"] &':{transform:"translate(-40%, -40%)"}}}};return{tag:{label:"tag",boxSizing:"border-box",fontFamily:e.fontFamily,display:"inline-flex",alignItems:"center",textAlign:"center",verticalAlign:"middle",userSelect:"none",...l[t].tag,...i.tag,...a[p].tag,"&::before":{...i.tagBefore,...a[p].tagBefore}},text:{label:"tag__text",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:e.maxWidth,...l[t].text},icon:{label:"tag__icon",marginInlineStart:e.iconMargin,marginInlineEnd:0,transition:`all ${e.transitionTiming}`,cursor:"pointer",...l[t].icon,...M[p]}}}),(e=>{var o,p,t,n,r,c,s,l,i,a,M,b,z,d,O;const h=e.borders,A=e.colors,u=e.forms,f=e.spacing,m=e.typography,q=e.key,R={"canvas-high-contrast":{defaultBackground:null==A||null===(o=A.contrasts)||void 0===o?void 0:o.white1010,defaultBorderColor:null==A||null===(p=A.contrasts)||void 0===p?void 0:p.grey125125},canvas:{focusOutlineColor:e["ic-brand-primary"],defaultIconColor:e["ic-brand-font-color-dark"],defaultIconHoverColor:e["ic-brand-primary"],defaultColor:e["ic-brand-font-color-dark"]}};return{...{fontFamily:m.fontFamily,heightSmall:"1.3125rem",heightMedium:u.inputHeightSmall,heightLarge:u.inputHeightMedium,fontSizeSmall:m.fontSizeXSmall,fontSizeMedium:m.fontSizeSmall,fontSizeLarge:m.fontSizeMedium,padding:`0 ${f.xSmall}`,paddingSmall:`0 ${f.xSmall}`,focusOutlineColor:null==A||null===(t=A.contrasts)||void 0===t?void 0:t.blue4570,focusOutlineWidth:h.widthMedium,focusOutlineStyle:h.style,maxWidth:"10rem",iconMargin:f.xSmall,transitionTiming:"0.2s",defaultBackgroundHover:null==A||null===(n=A.contrasts)||void 0===n?void 0:n.grey1214,defaultBackground:null==A||null===(r=A.contrasts)||void 0===r?void 0:r.grey1111,defaultBorderColor:null==A||null===(c=A.contrasts)||void 0===c?void 0:c.grey1214,defaultBorderRadius:"999rem",defaultBorderStyle:h.style,defaultBorderWidth:h.widthSmall,defaultColor:null==A||null===(s=A.contrasts)||void 0===s?void 0:s.grey125125,defaultIconColor:null==A||null===(l=A.contrasts)||void 0===l?void 0:l.grey125125,defaultIconHoverColor:null==A||null===(i=A.contrasts)||void 0===i?void 0:i.blue4570,inlineBackgroundHover:null==A||null===(a=A.contrasts)||void 0===a?void 0:a.grey1111,inlineBackground:null==A||null===(M=A.contrasts)||void 0===M?void 0:M.white1010,inlineBorderColor:null==A||null===(b=A.contrasts)||void 0===b?void 0:b.grey4570,inlineBorderRadius:h.radiusMedium,inlineBorderStyle:h.style,inlineBorderWidth:h.widthSmall,inlineColor:null==A||null===(z=A.contrasts)||void 0===z?void 0:z.grey125125,inlineIconColor:null==A||null===(d=A.contrasts)||void 0===d?void 0:d.grey4570,inlineIconHoverColor:null==A||null===(O=A.contrasts)||void 0===O?void 0:O.blue4570},...R[q]}})),pH(tH=U()((nH=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.focus=()=>{this.ref&&this.ref.focus()},this.handleClick=e=>{const o=this.props,p=o.disabled,t=o.readOnly,n=o.onClick;p||t?(e.preventDefault(),e.stopPropagation()):"function"==typeof n&&n(e)},this.handleRef=e=>{this.ref=e,"function"==typeof this.props.elementRef&&this.props.elementRef(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}get focused(){return xe(this.ref)}render(){const o=this.props,p=o.className,t=o.dismissible,n=o.disabled,r=o.readOnly,c=o.text,s=o.title,l=o.onClick,i=o.margin,a=o.styles,M=J.omitViewProps(pe(this.props,e.allowedProps),e);return Y(J,Object.assign({},M,{elementRef:this.handleRef,css:null==a?void 0:a.tag,className:p,as:l?"button":"span",margin:i,type:l?"button":void 0,onClick:null!=l?l:this.handleClick,disabled:n||r,display:void 0,title:s||("string"==typeof c?c:void 0)}),Y("span",{css:null==a?void 0:a.text},c),l&&t?Y(ro,{css:null==a?void 0:a.icon}):null)}},nH.displayName="Tag",nH.componentId="Tag",nH.allowedProps=["className","text","title","disabled","readOnly","dismissible","margin","onClick","elementRef","size","variant"],nH.propTypes=oH,nH.defaultProps={size:"medium",dismissible:!1,variant:"default",disabled:!1,readOnly:!1},tH=nH))||tH)||tH);const cH={label:E.node.isRequired,id:E.string,size:E.oneOf(["small","medium","large"]),layout:E.oneOf(["stacked","inline"]),autoGrow:E.bool,resize:E.oneOf(["none","both","horizontal","vertical"]),width:E.string,height:E.string,maxHeight:E.oneOfType([E.number,E.string]),messages:E.arrayOf(t.message),inline:E.bool,placeholder:E.string,disabled:E.bool,readOnly:E.bool,required:E.bool,textareaRef:E.func,defaultValue:E.string,value:Se(E.string),onChange:E.func};var sH,lH,iH,aH;let MH=(sH=K(),lH=_(((e,o)=>{const p=o.disabled,t=o.size,n={small:{fontSize:e.smallFontSize},medium:{fontSize:e.mediumFontSize},large:{fontSize:e.largeFontSize}};return{textArea:{label:"textArea",all:"initial",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",appearance:"none",height:"auto",margin:0,width:"100%",display:"block",boxSizing:"border-box",padding:e.padding,fontFamily:e.fontFamily,fontWeight:e.fontWeight,borderWidth:e.borderWidth,borderStyle:e.borderStyle,borderTopColor:e.borderTopColor,borderRightColor:e.borderRightColor,borderBottomColor:e.borderBottomColor,borderLeftColor:e.borderLeftColor,borderRadius:e.borderRadius,color:e.color,background:e.background,whiteSpace:"pre-wrap",wordWrap:"break-word",textAlign:"start",...n[t],"&:focus + [class$=-textArea__outline]":{transform:"scale(1)",opacity:1},"&[aria-invalid], &[aria-invalid]:focus, &[aria-invalid]:focus + [class$=-textArea__outline]":{borderColor:e.errorBorderColor},"&::placeholder":{color:e.placeholderColor},...p&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5}},textAreaLayout:{label:"textArea__layout",position:"relative"},textAreaOutline:{label:"textArea__outline",pointerEvents:"none",position:"absolute",display:"block",boxSizing:"border-box",top:"-0.25rem",bottom:"-0.25rem",left:"-0.25rem",right:"-0.25rem",border:`${e.focusOutlineWidth} ${e.focusOutlineStyle} ${e.focusOutlineColor}`,borderRadius:`calc(${e.borderRadius} * 1.5)`,transition:"all 0.2s",opacity:0,transform:"scale(0.95)"}}}),(e=>{var o,p,t,n,r,c,s,l,i,a;const M=e.colors,b=e.typography,z=e.borders,d=e.spacing,O=e.forms,h=e.key,A={canvas:{color:e["ic-brand-font-color-dark"],focusOutlineColor:e["ic-brand-primary"]}};return{...{fontFamily:null==b?void 0:b.fontFamily,fontWeight:null==b?void 0:b.fontWeightNormal,color:null==M||null===(o=M.contrasts)||void 0===o?void 0:o.grey125125,background:null==M||null===(p=M.contrasts)||void 0===p?void 0:p.white1010,borderWidth:null==z?void 0:z.widthSmall,borderStyle:null==z?void 0:z.style,borderTopColor:null==M||null===(t=M.contrasts)||void 0===t?void 0:t.grey1214,borderRightColor:null==M||null===(n=M.contrasts)||void 0===n?void 0:n.grey1214,borderBottomColor:null==M||null===(r=M.contrasts)||void 0===r?void 0:r.grey1214,borderLeftColor:null==M||null===(c=M.contrasts)||void 0===c?void 0:c.grey1214,borderRadius:null==z?void 0:z.radiusMedium,padding:null==d?void 0:d.small,focusOutlineColor:null==M||null===(s=M.contrasts)||void 0===s?void 0:s.blue4570,focusOutlineWidth:null==z?void 0:z.widthMedium,focusOutlineStyle:null==z?void 0:z.style,errorBorderColor:null==M||null===(l=M.contrasts)||void 0===l?void 0:l.red4570,errorOutlineColor:null==M||null===(i=M.contrasts)||void 0===i?void 0:i.red4570,placeholderColor:null==M||null===(a=M.contrasts)||void 0===a?void 0:a.grey4570,smallFontSize:null==b?void 0:b.fontSizeSmall,smallHeight:null==O?void 0:O.inputHeightSmall,mediumFontSize:null==b?void 0:b.fontSizeMedium,mediumHeight:null==O?void 0:O.inputHeightMedium,largeFontSize:null==b?void 0:b.fontSizeLarge,largeHeight:null==O?void 0:O.inputHeightLarge},...A[h]}})),sH(iH=lH(iH=U()((aH=class e extends u.Component{constructor(e){super(e),this._listener=void 0,this._request=void 0,this._defaultId=void 0,this._textareaResizeListener=void 0,this._debounced=void 0,this._textarea=null,this._container=null,this._height=void 0,this._manuallyResized=!1,this._highlightRef=null,this.myObserver=null,this.resizeTimeout=void 0,this.ref=null,this._textareaResize=()=>{const e=this._textarea.style.height;""!==e&&e!==this._height&&(this._manuallyResized=!0,this._textarea.style.overflowY="auto",this._container.style.minHeight=e)},this.grow=()=>{if(!this._textarea||this._manuallyResized)return;const e=this._textarea.offsetHeight-this._textarea.clientHeight;let o="";this._textarea.style.height="auto",this._textarea.style.overflowY="hidden",o=this._textarea.scrollHeight+e+"px";const p=this.props.maxHeight?Ee(this.props.maxHeight,this._container):void 0;this.props.maxHeight&&void 0!==p&&this._textarea.scrollHeight>p?this._textarea.style.overflowY="auto":this.props.height&&(""===this._textarea.value?o=this.props.height:Ee(this.props.height,this._container)>this._textarea.scrollHeight&&(this._textarea.style.overflowY="auto",o=this.props.height));void 0!==p&&Ee(o)>p||(this._container.style.minHeight=o),this._height=o,this._textarea.style.height=o},this.handleChange=e=>{const o=this.props,p=o.onChange,t=o.value,n=o.disabled,r=o.readOnly;n||r?e.preventDefault():(void 0===t&&this.autoGrow(),"function"==typeof p&&p(e))},this.handleContainerRef=e=>{this._container=e},this._defaultId=e.deterministicId(),"undefined"==typeof window&&(global.ResizeObserver=class{observe(){}unobserve(){}disconnect(){}})}componentDidMount(){var e,o;this.myObserver=new ResizeObserver((e=>{for(const o of e)if(this._highlightRef){const e=window.getComputedStyle(o.target);this._highlightRef.style.transition="none",this._highlightRef.style.width=`calc(${e.width}px + 2.125rem)`,this._highlightRef.style.height=`calc(${e.height}px + 2.125rem)`,clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{this._highlightRef&&(this._highlightRef.style.transition="all 0.2s")}),500)}})),this.autoGrow(),null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;this.autoGrow(),null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentWillUnmount(){this._listener&&this._listener.remove(),this._textareaResizeListener&&this._textareaResizeListener.disconnect(),this._request&&this._request.cancel(),this._debounced&&this._debounced.cancel(),this.myObserver&&this.myObserver.disconnect()}autoGrow(){if(this.props.autoGrow){if(this._debounced||(this._debounced=De(this.grow,200,{leading:!1,trailing:!0})),this._listener||(this._listener=Pe(window,"resize",this._debounced)),this._textarea&&!this._textareaResizeListener){const e=ke(this._textarea).height;this._textareaResizeListener=new ResizeObserver((o=>{for(const p of o){const o=p.contentRect.height;e!==o&&this._textareaResize()}})),this._textareaResizeListener.observe(this._textarea)}this._request=Ye(this.grow)}}focus(){this._textarea.focus()}get minHeight(){return this._textarea.style.minHeight}get invalid(){return this.props.messages&&this.props.messages.findIndex((e=>"error"===e.type))>=0}get id(){return this.props.id||this._defaultId}get focused(){return xe(this._textarea)}get value(){return this._textarea.value}render(){var o,p,t;const n=this.props,r=n.autoGrow,c=n.placeholder,s=n.value,l=n.defaultValue,i=n.disabled,a=n.readOnly,M=n.required,b=n.width,z=n.height,d=n.maxHeight,O=n.textareaRef,h=n.resize,u=pe(this.props,e.allowedProps),f={width:b,resize:h,height:r?void 0:z,maxHeight:d},m=Y("textarea",Object.assign({},u,{value:s,defaultValue:l,placeholder:c,ref:e=>{var o;e&&(null===(o=this.myObserver)||void 0===o||o.observe(e));this._textarea=e,"function"==typeof O&&O(e)},style:f,id:this.id,required:M,"aria-required":M,"aria-invalid":this.invalid?"true":void 0,disabled:i||a,css:null===(o=this.props.styles)||void 0===o?void 0:o.textArea,onChange:this.handleChange}));return Y(A,Object.assign({},te(this.props,A.allowedProps),{label:this.props.label,vAlign:"top",id:this.id,elementRef:e=>{this.ref=e}}),Y("div",{css:null===(p=this.props.styles)||void 0===p?void 0:p.textAreaLayout,style:{width:b,maxHeight:d},ref:this.handleContainerRef},m,i||a?null:Y("span",{css:null===(t=this.props.styles)||void 0===t?void 0:t.textAreaOutline,"aria-hidden":"true",ref:e=>this._highlightRef=e})))}},aH.displayName="TextArea",aH.componentId="TextArea",aH.allowedProps=["label","id","size","layout","autoGrow","resize","width","height","maxHeight","messages","inline","placeholder","disabled","readOnly","required","textareaRef","defaultValue","value","onChange"],aH.propTypes=cH,aH.defaultProps={size:"medium",autoGrow:!0,resize:"none",inline:!1,messages:[],disabled:!1,readOnly:!1,layout:"stacked",required:!1},iH=aH))||iH)||iH)||iH);const bH={children:E.node.isRequired,summary:E.node.isRequired,toggleLabel:E.oneOfType([E.node,E.func]).isRequired,as:E.elementType,elementRef:E.func,size:E.oneOf(["small","medium","large"]),expanded:Se(E.bool,"onToggle","defaultExpanded"),defaultExpanded:E.bool,onToggle:E.func,icon:E.oneOfType([E.node,E.func]),iconExpanded:E.oneOfType([E.node,E.func]),transition:E.bool,border:E.bool};var zH,dH;let OH=U()((dH=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this._button=null,this._shouldTransition=!1,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.handleButtonRef=e=>{this._button=e}}get focused(){return xe(this._button)}focus(){var e;null===(e=this._button)||void 0===e||e.focus()}componentDidMount(){this._shouldTransition=!0}renderIcon(e){const o=e?this.props.iconExpanded:this.props.icon;return o?$(o):null}renderToggle(e,o){const p=this.props,t=p.toggleLabel,n=p.size;let r;r="function"==typeof t?t(o):t;const c={...e};return f.createElement(ao,Object.assign({},c,{withBackground:!1,withBorder:!1,size:"large"===n?"medium":"small",elementRef:this.handleButtonRef,screenReaderLabel:r}),this.renderIcon(o))}renderDetails(e){return f.createElement(J,Object.assign({},e,{display:"block",borderWidth:"small none none none"}),this.props.transition&&this._shouldTransition?f.createElement(ge,{transitionOnMount:!0,in:!0,type:"fade"},this.props.children):this.props.children)}render(){const o=X(e,this.props);return f.createElement(io,te(this.props,io.allowedProps),(({expanded:p,getToggleProps:t,getDetailsProps:n})=>f.createElement(J,Object.assign({},pe(this.props,e.allowedProps),{borderWidth:this.props.border?"small":"none",as:o,elementRef:this.handleRef,display:"block",borderRadius:"medium",background:"primary"}),f.createElement(NI,{padding:"small"===this.props.size?"x-small":"small small small x-small"},f.createElement(NI.Item,null,this.renderToggle(t(),p)),f.createElement(NI.Item,{shouldGrow:!0,shouldShrink:!0,padding:"0 0 0 x-small"},this.props.summary)),p?this.renderDetails(n()):f.createElement("span",n()))))}},dH.displayName="ToggleGroup",dH.componentId="ToggleGroup",dH.allowedProps=["children","summary","toggleLabel","as","elementRef","size","expanded","defaultExpanded","onToggle","icon","iconExpanded","transition","border"],dH.propTypes=bH,dH.defaultProps={size:"medium",icon:we,iconExpanded:co,defaultExpanded:!1,transition:!0,as:"span",border:!0},zH=dH))||zH;const hH=oe` + 100% {}`,RS={label:E.string.isRequired,language:E.oneOf(["sh","js","json","javascript","jsx","shell","css","html","markdown","yaml","yml","bash"]),readOnly:E.bool,onChange:E.func,options:E.object,attachment:E.oneOf(["bottom","top"]),value:E.string},WS=["value","label","attachment","readOnly","onChange","styles"];var vS,gS,yS,LS;const NS=u.lazy((()=>{const e="undefined"==typeof navigator||"undefined"!=typeof global&&!0===global.PREVENT_CODEMIRROR_RENDER;return re(e?()=>import("./index.node-CLoDR8RL.js"):()=>import("./index-H8vdBuKt.js"),__vite__mapDeps([3,1,2]))}));let BS=(vS=K(),gS=_(((e,o)=>{const p=o.attachment;return{codeEditor:{label:"codeEditor"},globalStyles:{".CodeMirror":{direction:"ltr",position:"relative",overflow:"hidden",background:e.background,height:"auto",fontFamily:e.fontFamily,fontSize:e.fontSize,borderRadius:e.borderRadius,border:e.border,color:e.color,lineHeight:1.4375,minHeight:"1.4375rem",marginBottom:"1rem",...p&&{top:{borderBottomLeftRadius:0,borderBottomRightRadius:0,marginTop:"0.25rem"},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0,marginBottom:"0.25rem"}}[p]},".CodeMirror-lines":{padding:`${e.verticalPadding} 0`,cursor:"text",minHeight:"0.0625rem"},".CodeMirror pre":{padding:`0 ${e.horizontalPadding}`,borderRadius:"0",borderWidth:"0",background:"transparent",fontFamily:"inherit",fontSize:"inherit",margin:"0",whiteSpace:"pre",wordWrap:"normal",lineHeight:"inherit",color:"inherit",zIndex:`calc(${e.zIndex} + 3)`,position:"relative",overflow:"visible",WebkitTapHighlightColor:"transparent",fontVariantLigatures:"contextual"},".CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler":{background:e.background},".CodeMirror-cursor":{borderLeft:`0.0625rem solid ${e.cursorColor}`,borderRight:"none",width:"0",position:"absolute",pointerEvents:"none"},".CodeMirror-cursors":{visibility:"hidden",position:"relative",zIndex:`calc(${e.zIndex} + 4)`},".CodeMirror-dragcursors":{visibility:"visible"},".CodeMirror-focused .CodeMirror-cursors":{visibility:"visible"},".CodeMirror-crosshair":{cursor:"crosshair"},".cm-fat-cursor .CodeMirror-cursor":{width:"auto",border:"0 !important",background:e.fatCursorBackground},".cm-fat-cursor .CodeMirror-cursors":{zIndex:`calc(${e.zIndex} + 2)`},".CodeMirror .CodeMirror-secondarycursor":{borderLeft:`0.0625rem solid ${e.secondaryCursorColor}`},".cm-fat-cursor-mark":{background:e.fatCursorMarkBackground,animation:`${qS} 1.06s steps(1) infinite`},".cm-animate-fat-cursor":{width:"auto",border:"0",animation:`${qS} 1.06s steps(1) infinite`,backgroundColor:e.fatCursorBackground},".cm-tab":{display:"inline-block",textDecoration:"inherit"},".CodeMirror-rulers":{position:"absolute",left:"0",right:"0",top:"-50px",bottom:"-20px",overflow:"hidden"},".CodeMirror-ruler":{borderLeft:`0.0625rem solid ${e.rulerColor}`,top:"0",bottom:"0",position:"absolute"},"div.CodeMirror span.CodeMirror-matchingbracket":{outline:`0.0625rem solid ${e.matchingBracketOutline}`},"div.CodeMirror span.CodeMirror-nonmatchingbracket":{color:e.nonMatchingBracketColor},".CodeMirror-matchingtag":{background:e.matchingTagBackground},"div.CodeMirror-activeline-background":{background:e.activeLineBackground},".CodeMirror-scroll":{overflow:"scroll !important",marginBottom:"-30px",marginRight:"-30px",paddingBottom:"30px",height:"100%",outline:"none",position:"relative"},".CodeMirror-sizer":{position:"relative",borderRight:"30px solid transparent"},".CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler":{position:"absolute",zIndex:`calc(${e.zIndex} + 7)`,display:"none"},".CodeMirror-vscrollbar":{right:"0",top:"0",overflowX:"hidden",overflowY:"scroll"},".CodeMirror-hscrollbar":{bottom:"0",left:"0",overflowY:"hidden",overflowX:"scroll"},".CodeMirror-scrollbar-filler":{right:"0",bottom:"0"},".CodeMirror-gutter-filler":{left:"0",bottom:"0"},".CodeMirror-gutters":{borderTopLeftRadius:e.borderRadius,borderBottomLeftRadius:e.borderRadius,borderRight:`0.0625rem solid ${e.gutterBorder}`,overflow:"hidden",background:e.gutterBackground,whiteSpace:"nowrap",position:"absolute",left:"0",top:"0",minHeight:"100%",zIndex:`calc(${e.zIndex} + 4)`},".CodeMirror-linenumber":{padding:"0 0.1875rem 0 0.3125rem",minWidth:"1.25rem",textAlign:"right",color:e.lineNumberColor,whiteSpace:"nowrap"},".CodeMirror-guttermarker":{color:e.gutterMarkerColor},".CodeMirror-guttermarker-subtle":{color:e.gutterMarkerSubtleColor},".CodeMirror-gutter":{whiteSpace:"normal",height:"100%",display:"inline-block",verticalAlign:"top",marginBottom:"-30px"},".CodeMirror-gutter-wrapper":{position:"absolute",zIndex:`calc(${e.zIndex} + 5)`,background:"none !important",border:"none !important"},".CodeMirror-gutter-background":{position:"absolute",top:"0",bottom:"0",zIndex:`calc(${e.zIndex} + 5)`},".CodeMirror-gutter-elt":{position:"absolute",cursor:"default",zIndex:`calc(${e.zIndex} + 5)`},".CodeMirror-gutter-wrapper ::selection":{backgroundColor:"transparent"},".CodeMirror-wrap pre":{wordWrap:"break-word",whiteSpace:"pre-wrap",wordBreak:"normal"},".CodeMirror-linebackground":{position:"absolute",left:"0",right:"0",top:"0",bottom:"0",zIndex:`calc(${e.zIndex} + 1)`},".CodeMirror-linewidget":{position:"relative",zIndex:`calc(${e.zIndex} + 3)`,padding:"0.1px"},".CodeMirror-rtl pre":{direction:"rtl"},".CodeMirror-code":{outline:"none"},".CodeMirror-scroll, .CodeMirror-sizer, .CodeMirror-gutter, .CodeMirror-gutters, .CodeMirror-linenumber":{boxSizing:"content-box"},".CodeMirror-measure":{position:"absolute",width:"100%",height:"0",overflow:"hidden",visibility:"hidden"},".CodeMirror-measure pre":{position:"static"},".CodeMirror-selected, .CodeMirror-focused .CodeMirror-selected, .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection":{background:e.selectedBackground},".cm-searching":{background:e.searchingBackground},".cm-force-border":{paddingRight:"0.1px"},"@media print":{".CodeMirror .CodeMirror-cursors":{visibility:"hidden"}},".cm-tab-wrap-hack::after":{content:'""'},".CodeMirror-selectedtext":{background:"none"},".CodeMirror-focused":{boxShadow:e.focusBoxShadow,borderColor:e.focusBorderColor},".cm-keyword":{color:e.keywordColor,fontWeight:"bold"},".cm-atom":{color:e.atomColor},".cm-number":{color:e.numberColor},".cm-def":{color:e.defColor},"span.cm-variable-2, span.cm-tag":{color:e.tagColor},"span.cm-variable-3, span.cm-def, span.cm-type":{color:e.typeColor},".cm-variable":{color:e.variableColor},".cm-property":{color:e.propertyColor},".cm-qualifier":{color:e.qualifierColor},".cm-operator":{color:e.operatorColor},".cm-comment":{color:e.commentColor,fontWeight:"normal"},".cm-string":{color:e.stringColor,fontStyle:"italic"},".cm-string-2":{color:e.secondaryStringColor},".cm-meta":{color:e.metaColor},".cm-builtin":{color:e.builtInColor},".cm-tag":{color:e.tagColor},".cm-attribute":{color:e.attributeColor},".cm-header":{color:e.headerColor},".cm-hr":{color:e.hrColor},".cm-link":{color:e.linkColor,fontStyle:"italic",textDecoration:"none"},".cm-error":{}}}}),(e=>{var o,p,t,n,r,c,s,l,i,a,M,b,z,d,O,h,A,u,f,m,q,R,W,v,g,y,L,N,B,w,C,T,S,x,I,E,P,X,H,Z,V,k,D,_;const j=e.colors,F=e.borders,U=e.spacing,Y=e.typography,G=e.stacking;return{...{fontFamily:null==Y?void 0:Y.fontFamilyMonospace,fontSize:null==Y?void 0:Y.fontSizeSmall,background:null==j||null===(o=j.contrasts)||void 0===o?void 0:o.grey1111,border:`${null==F?void 0:F.widthSmall} solid ${null==j||null===(p=j.contrasts)||void 0===p?void 0:p.grey1111}`,borderRadius:null==F?void 0:F.radiusMedium,focusBorderColor:null==j||null===(t=j.contrasts)||void 0===t?void 0:t.blue4570,focusBoxShadow:`inset 0 0 0 1px ${null==j||null===(n=j.contrasts)||void 0===n?void 0:n.white1010}`,horizontalPadding:null==U?void 0:U.xSmall,verticalPadding:null==U?void 0:U.xxSmall,color:null==j||null===(r=j.contrasts)||void 0===r?void 0:r.grey125125,lineNumberColor:null==j||null===(c=j.contrasts)||void 0===c?void 0:c.grey4570,gutterBorder:null==j||null===(s=j.contrasts)||void 0===s?void 0:s.grey1111,gutterBackground:null==j||null===(l=j.contrasts)||void 0===l?void 0:l.grey1214,gutterMarkerColor:null==j||null===(i=j.contrasts)||void 0===i?void 0:i.blue4570,gutterMarkerSubtleColor:null==j||null===(a=j.contrasts)||void 0===a?void 0:a.grey4570,cursorColor:null==j||null===(M=j.contrasts)||void 0===M?void 0:M.grey125125,secondaryCursorColor:null==j||null===(b=j.contrasts)||void 0===b?void 0:b.grey4570,rulerColor:null==j||null===(z=j.contrasts)||void 0===z?void 0:z.grey4570,matchingBracketOutline:null==j||null===(d=j.contrasts)||void 0===d?void 0:d.grey4570,nonMatchingBracketColor:null==j||null===(O=j.contrasts)||void 0===O?void 0:O.red4570,matchingTagBackground:"rgba(255, 150, 0, 0.3)",activeLineBackground:null==j||null===(h=j.contrasts)||void 0===h?void 0:h.grey1214,selectedBackground:null==j||null===(A=j.contrasts)||void 0===A?void 0:A.grey1424,fatCursorBackground:null==j||null===(u=j.contrasts)||void 0===u?void 0:u.green4570,fatCursorMarkBackground:"rgba(20, 255, 20, 0.5)",searchingBackground:"rgba(255, 255, 0, 0.4)",zIndex:null==G?void 0:G.above,quoteColor:null==j||null===(f=j.contrasts)||void 0===f?void 0:f.green4570,headerColor:null==j||null===(m=j.contrasts)||void 0===m?void 0:m.orange4570,negativeColor:null==j||null===(q=j.contrasts)||void 0===q?void 0:q.red4570,positiveColor:null==j||null===(R=j.contrasts)||void 0===R?void 0:R.green4570,keywordColor:null==j||null===(W=j.contrasts)||void 0===W?void 0:W.blue4570,atomColor:null==j||null===(v=j.contrasts)||void 0===v?void 0:v.orange4570,numberColor:null==j||null===(g=j.contrasts)||void 0===g?void 0:g.orange4570,defColor:null==j||null===(y=j.contrasts)||void 0===y?void 0:y.grey125125,variableColor:null==j||null===(L=j.contrasts)||void 0===L?void 0:L.blue4570,secondaryVariableColor:null==j||null===(N=j.contrasts)||void 0===N?void 0:N.orange4570,typeColor:null==j||null===(B=j.contrasts)||void 0===B?void 0:B.blue4570,commentColor:null==j||null===(w=j.contrasts)||void 0===w?void 0:w.grey4570,stringColor:null==j||null===(C=j.contrasts)||void 0===C?void 0:C.blue4570,secondaryStringColor:null==j||null===(T=j.contrasts)||void 0===T?void 0:T.red4570,metaColor:null==j||null===(S=j.contrasts)||void 0===S?void 0:S.grey125125,qualifierColor:null==j||null===(x=j.contrasts)||void 0===x?void 0:x.green4570,builtInColor:null==j||null===(I=j.contrasts)||void 0===I?void 0:I.orange4570,bracketColor:null==j||null===(E=j.contrasts)||void 0===E?void 0:E.grey4570,tagColor:null==j||null===(P=j.contrasts)||void 0===P?void 0:P.green4570,attributeColor:null==j||null===(X=j.contrasts)||void 0===X?void 0:X.blue4570,hrColor:null==j||null===(H=j.contrasts)||void 0===H?void 0:H.grey4570,linkColor:null==j||null===(Z=j.contrasts)||void 0===Z?void 0:Z.blue4570,errorColor:null==j||null===(V=j.contrasts)||void 0===V?void 0:V.red4570,propertyColor:null==j||null===(k=j.contrasts)||void 0===k?void 0:k.blue5782,nodeColor:null==j||null===(D=j.contrasts)||void 0===D?void 0:D.orange4570,operatorColor:null==j||null===(_=j.contrasts)||void 0===_?void 0:_.grey125125}}})),vS(yS=gS(yS=U()(yS=Mo("[TBD]",null,"This component is deprecated and will be removed in a later version. Use instead, which is the wrapper for the newer version of the CodeMirror code editor.")(((LS=class extends u.Component{constructor(e){super(e),this._id=void 0,this.codeMirror=void 0,this.ref=void 0,this.editor=void 0,this._id=e.deterministicId(),this.ref=u.createRef(),this.editor=u.createRef(),this.codeMirror=u.createRef()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}focus(){this.codeMirror&&this.codeMirror.focus()}get mode(){const e=this.props.language;return"json"===e||"js"===e?"jsx":"sh"===e?"shell":"html"===e?"htmlmixed":"yml"===e?"yaml":e}get options(){return{...this.props.options,readOnly:this.props.readOnly,mode:this.mode,extraKeys:this.props.readOnly?{Tab:!1,"Shift-Tab":!1}:{}}}render(){const e=this.props,o=e.value,p=e.label;e.attachment,e.readOnly;const t=e.onChange,n=e.styles,r=P(e,WS);return Y("div",{css:null==n?void 0:n.codeEditor,ref:this.ref},Y(u.Suspense,null,Y(ne,{styles:null==n?void 0:n.globalStyles}),Y("label",{htmlFor:this._id},Y(Ae,null,p),Y(NS,Object.assign({},Z(r),{id:this._id,options:this.options,value:o,onBeforeChange:(e,o,p)=>{null==t||t(p)},ref:this.codeMirror,editorDidMount:e=>{this.editor.current=e},editorWillUnmount:()=>{this.editor.current.display.wrapper.remove(),this.codeMirror.current&&(this.codeMirror.current.hydrated=!1)}})))))}}).displayName="CodeEditor",LS.componentId="CodeEditor",LS.propTypes=RS,LS.allowedProps=["label","language","readOnly","onChange","options","attachment","value"],LS.defaultProps={language:"jsx",readOnly:!1,options:{styleActiveLine:!0}},yS=LS))||yS)||yS)||yS)||yS);const wS=(e,o)=>{const p=.4*o.a,t=1-p,n=1-t*(1-t);return`rgba(\n ${o.r*p/n+e.r*t*(1-p)/n},\n ${o.g*p/n+e.g*t*(1-p)/n},\n ${o.b*p/n+e.b*t*(1-p)/n},\n ${o.a<.6?.6:o.a})`},CS="#384A5899",TS={color:E.string,elementRef:E.func,shape:E.oneOf(["circle","rectangle"])};var SS,xS,IS;let ES=(SS=_(((e,o)=>{const p=o.color,t=o.shape;return{colorIndicator:{label:"colorIndicator",width:"rectangle"===t?e.rectangleIndicatorSize:e.circleIndicatorSize,height:"rectangle"===t?e.rectangleIndicatorSize:e.circleIndicatorSize,borderRadius:"rectangle"===t?e.rectangularIndicatorBorderRadius:e.circleIndicatorSize,boxSizing:"border-box",borderWidth:e.borderWidth,boxShadow:p?`inset 0 0 0 1.5rem ${p}`:"none",borderStyle:"solid",backgroundImage:e.backgroundImage,backgroundSize:e.backgroundSize,backgroundPosition:e.backgroundPosition,borderColor:wS(tc(e.colorIndicatorBorderColor),tc(ec(p)?p:"#fff"))}}}),(e=>{var o,p,t,n;const r=e.colors,c=e.borders,s=e.spacing;return{...{borderWidth:null==c?void 0:c.widthSmall,backgroundImage:`linear-gradient(45deg, ${null==r||null===(o=r.contrasts)||void 0===o?void 0:o.grey1214} 25%, transparent 25%),\n linear-gradient(-45deg, ${null==r||null===(p=r.contrasts)||void 0===p?void 0:p.grey1214} 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, ${null==r||null===(t=r.contrasts)||void 0===t?void 0:t.grey1214} 75%),\n linear-gradient(-45deg, transparent 75%, ${null==r||null===(n=r.contrasts)||void 0===n?void 0:n.grey1214} 75%)`,backgroundSize:".5rem .5rem",backgroundPosition:"0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px",circleIndicatorSize:"1.5rem",rectangleIndicatorSize:"2.375rem",colorIndicatorBorderColor:CS,rectangularIndicatorBorderRadius:null==s?void 0:s.xxSmall,rectangularIndicatorBorderWidth:null==c?void 0:c.widthSmall}}})),SS(xS=U()((IS=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){const o=this.props.styles;return Y("div",Object.assign({},pe(this.props,e.allowedProps),{ref:this.handleRef,css:null==o?void 0:o.colorIndicator}))}},IS.displayName="ColorIndicator",IS.propTypes=TS,IS.allowedProps=["color","elementRef","shape"],IS.componentId="ColorIndicator",IS.defaultProps={shape:"circle"},xS=IS))||xS)||xS);const PS=(e,o)=>{for(const p in e)if(e[p]!==o[p])return!0;return!1},XS={disabled:E.bool,hue:E.number.isRequired,color:E.object.isRequired,width:E.number.isRequired,height:E.number.isRequired,indicatorRadius:E.number.isRequired,onChange:E.func.isRequired,elementRef:E.func,navigationExplanationScreenReaderLabel:E.string.isRequired};var HS,ZS,VS,kS;let DS=(HS=K(),ZS=_(((e,o,p)=>{var t,n;return{ColorPalette:{label:"ColorPalette"},indicator:{label:"ColorPalette__indicator",width:o.indicatorRadius/8+"rem",height:o.indicatorRadius/8+"rem",borderRadius:o.indicatorRadius/8+"rem",background:e.whiteColor,position:"absolute",borderStyle:"solid",borderWidth:e.indicatorBorderWidth,borderColor:e.indicatorBorderColor,top:(null==p||null===(t=p.colorPosition)||void 0===t?void 0:t.y)-Ee(o.indicatorRadius/16+"rem")+"px",left:(null==p||null===(n=p.colorPosition)||void 0===n?void 0:n.x)-Ee(o.indicatorRadius/16+"rem")+"px"},palette:{label:"ColorPalette__palette",width:o.width/16+"rem",height:o.height/16+"rem",borderRadius:e.paletteBorderRadius,borderStyle:"solid",borderWidth:e.paletteBorderWidth,boxSizing:"border-box",borderColor:e.colorIndicatorBorderColor,background:`linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,1)),\n linear-gradient(to right, white, hsl(${o.hue},100%,50%))`},disabledOverlay:{label:"ColorPalette__disabledOverlay",background:"rgba(255,255,255,.5)",zIndex:e.disabledOverlayZIndex,width:o.width/16+1+"rem",height:o.height/16+1+"rem",position:"absolute",top:"-.5rem",left:"-.5rem"},paletteOffset:e.paletteOffset}}),(e=>{var o,p;const t=e.colors,n=e.borders,r=e.stacking;return{...{indicatorBorderColor:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.grey125125,whiteColor:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.white1010,colorIndicatorBorderColor:CS,indicatorBorderWidth:n.widthSmall,paletteBorderRadius:n.radiusMedium,paletteBorderWidth:n.widthSmall,disabledOverlayZIndex:r.topmost,paletteOffset:"0.125rem"}}})),HS(VS=ZS((kS=class extends u.Component{constructor(e){var o;super(e),this._id=void 0,this.ref=null,this._paletteRef=null,this._mouseMoveListener=void 0,this._mouseUpListener=void 0,this._paletteOffset=Ee(null===(o=this.props.styles)||void 0===o?void 0:o.paletteOffset),this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.calcSaturation=e=>Math.round(e/this.paletteWidth*100)/100,this.calcLuminance=e=>Math.round((this.paletteHeight-e)/this.paletteHeight*100)/100,this.handleMouseUp=()=>{this.removeEventListeners()},this.handleChange=e=>{if(this.props.disabled)return;const o=e.clientX,p=e.clientY,t=this.calcColorPosition(o,p),n=t.newXPosition,r=t.newYPosition;this.setState({colorPosition:{x:n,y:r}}),this.props.onChange({h:this.props.hue,s:this.calcSaturation(n),v:this.calcLuminance(r)})},this.state={colorPosition:{x:0,y:0}},this._id=e.deterministicId("ColorMixer__Palette")}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.state),this.setState({colorPosition:this.calcPositionFromColor(this.props.color)})}componentDidUpdate(e){var o,p;null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p,this.state),PS(e.color,this.props.color)&&this.setState({colorPosition:this.calcPositionFromColor(this.props.color)})}componentWillUnmount(){this.removeEventListeners()}get paletteWidth(){return this._paletteRef.getBoundingClientRect().width-this._paletteOffset}get paletteHeight(){return this._paletteRef.getBoundingClientRect().height-this._paletteOffset}calcPositionFromColor(e){const o=e.s,p=e.v;return{x:o*this.paletteWidth,y:(1-p)*this.paletteHeight}}handlePaletteMouseDown(e){this.handleChange(e),this._mouseMoveListener=Pe(window,"mousemove",this.handleChange),this._mouseUpListener=Pe(window,"mouseup",this.handleMouseUp)}removeEventListeners(){var e,o;null===(e=this._mouseMoveListener)||void 0===e||e.remove(),null===(o=this._mouseUpListener)||void 0===o||o.remove()}calcColorPosition(e,o){const p=this._paletteRef.getBoundingClientRect(),t=p.x,n=p.y;return this.applyBoundaries(e-t,o-n)}applyBoundaries(e,o){let p=e,t=o;return e>this.paletteWidth&&(p=this.paletteWidth),e<0&&(p=0),o>this.paletteHeight&&(t=this.paletteHeight),o<0&&(t=0),{newXPosition:p,newYPosition:t}}handleKeyDown(e){if(this.props.disabled)return;const o=e.key;if("Tab"===o)return;e.preventDefault();let p=0,t=0;"ArrowLeft"!==o&&"a"!==o||(p=-2),"ArrowRight"!==o&&"d"!==o||(p=2),"ArrowUp"!==o&&"w"!==o||(t=-2),"ArrowDown"!==o&&"s"!==o||(t=2);const n=this.applyBoundaries(this.state.colorPosition.x+p,this.state.colorPosition.y+t),r=n.newXPosition,c=n.newYPosition;this.setState({colorPosition:{x:r,y:c}}),this.props.onChange({h:this.props.hue,s:this.calcSaturation(r),v:this.calcLuminance(c)})}render(){var e,o,p;return Y(J,{elementRef:this.handleRef,disabled:this.props.disabled,position:"relative",background:"transparent",display:"inline-block",borderRadius:"medium",borderWidth:"0",padding:"0",as:"div",tabIndex:this.props.disabled?void 0:0,onKeyDown:e=>this.handleKeyDown(e),onMouseDown:e=>this.handlePaletteMouseDown(e),"aria-label":this.props.navigationExplanationScreenReaderLabel,id:this._id,role:"button"},Y("div",{css:null===(e=this.props.styles)||void 0===e?void 0:e.indicator}),this.props.disabled&&Y("div",{css:null===(o=this.props.styles)||void 0===o?void 0:o.disabledOverlay}),Y("div",{css:null===(p=this.props.styles)||void 0===p?void 0:p.palette,ref:e=>{this._paletteRef=e}}))}},kS.displayName="ColorPalette",kS.propTypes=XS,kS.allowedProps=["disabled","hue","color","width","height","indicatorRadius","onChange","elementRef","navigationExplanationScreenReaderLabel"],kS.componentId="ColorMixer.Palette",VS=kS))||VS)||VS);const _S={isColorSlider:E.bool,onChange:E.func.isRequired,width:E.number.isRequired,value:E.number.isRequired,minValue:E.number.isRequired,maxValue:E.number.isRequired,indicatorRadius:E.number.isRequired,height:E.number.isRequired,elementRef:E.func,navigationExplanationScreenReaderLabel:E.string.isRequired};var jS,FS,US;let YS=(jS=_(((e,o,p)=>{var t;const n=o.isColorSlider?{background:"linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%)"}:{background:e.checkerboardBackgroundImage,backgroundSize:e.checkerboardBackgroundSize,backgroundPosition:e.checkerboardBackgroundPosition};return{colorSlider:{label:"colorMixerSlider"},indicator:{label:"colorMixerSlider__indicator",width:o.indicatorRadius/8+"rem",height:o.indicatorRadius/8+"rem",borderRadius:o.indicatorRadius/8+"rem",background:"white",position:"absolute",borderStyle:"solid",borderWidth:e.indicatorBorderWidth,borderColor:e.indicatorBorderColor,top:"-0.1875rem",left:((null==p?void 0:p.sliderPositionFromValue)-o.indicatorRadius)/16+"rem",zIndex:e.indicatorZIndex},sliderBackground:{label:"colorMixerSlider__sliderBackground",borderRadius:o.height/16+"rem",width:o.width/16+"rem",height:o.height/16+"rem",boxSizing:"border-box",...n},slider:{label:"colorMixerSlider__slider",width:o.width/16+"rem",height:o.height/16+"rem",background:o.isColorSlider?"transparent":`linear-gradient(to right, rgba(255,0,0,0), ${null===(t=o.color)||void 0===t?void 0:t.slice(0,-2)})`,borderRadius:o.height/16+"rem",boxSizing:"border-box",borderStyle:"solid",borderColor:e.colorIndicatorBorderColor,borderWidth:e.sliderBorderWidth},disabledOverlay:{label:"colorMixerSlider__disabledOverlay",background:"rgba(255,255,255,.5)",zIndex:e.disabledOverlayZIndex,width:o.width/16+1+"rem",height:o.height/16+1+"rem",position:"absolute",top:"-.5rem",left:"-.5rem"}}}),(e=>{var o,p,t,n,r;const c=e.colors,s=e.borders,l=e.stacking;return{...{indicatorBorderColor:null==c||null===(o=c.contrasts)||void 0===o?void 0:o.grey125125,checkerboardBackgroundImage:`linear-gradient(45deg, ${null==c||null===(p=c.contrasts)||void 0===p?void 0:p.grey1111} 25%, transparent 25%),\n linear-gradient(-45deg, ${null==c||null===(t=c.contrasts)||void 0===t?void 0:t.grey1111} 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, ${null==c||null===(n=c.contrasts)||void 0===n?void 0:n.grey1111} 75%),\n linear-gradient(-45deg, transparent 75%, ${null==c||null===(r=c.contrasts)||void 0===r?void 0:r.grey1111} 75%)`,checkerboardBackgroundSize:".5rem .5rem",checkerboardBackgroundPosition:"0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px",colorIndicatorBorderColor:CS,indicatorBorderWidth:s.widthSmall,sliderBorderWidth:s.widthSmall,indicatorZIndex:l.above,disabledOverlayZIndex:l.topmost}}})),jS((US=class extends u.Component{constructor(...e){super(...e),this.ref=null,this._sliderRef=null,this._mouseMoveListener=void 0,this._mouseUpListener=void 0,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.handleChange=e=>{if(this.props.disabled)return;const o=e.clientX,p=this.calcSliderPositionFromCursorPosition(o,this._sliderRef);this.props.onChange(this.calcValueFromSliderPosition(p))},this.handleMouseUp=()=>{this.removeEventListeners()},this.calcSliderPositionFromCursorPosition=(e,o)=>{if(this.props.isColorSlider){const p=e-o.getBoundingClientRect().x;return p<0?0:p>this.props.width?this.props.width-1:p}return e-o.getBoundingClientRect().x},this.calcSliderPositionFromValue=e=>this.props.isColorSlider?e/360*this.props.width:this.props.width-(1-e)*this.props.width,this.calcValueFromSliderPosition=e=>{if(this.props.isColorSlider)return e/this.props.width*360;{const o=e<0?0:e>this.props.width?this.props.width:e;return Math.round(100*o/this.props.width)}}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStylesProps)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStylesProps)}componentWillUnmount(){this.removeEventListeners()}removeEventListeners(){var e,o;null===(e=this._mouseMoveListener)||void 0===e||e.remove(),null===(o=this._mouseUpListener)||void 0===o||o.remove()}get sliderPositionFromValue(){return this.calcSliderPositionFromValue(this.props.value)}get roundedValue(){const e=this.props,o=e.value;return e.maxValue<=1?Math.round(100*o):Math.round(o)}get makeStylesProps(){return{sliderPositionFromValue:this.sliderPositionFromValue}}handleMouseDown(e){this.handleChange(e),this._mouseMoveListener=Pe(window,"mousemove",this.handleChange),this._mouseUpListener=Pe(window,"mouseup",this.handleMouseUp)}applyBoundaries(e){return e>this.props.width?this.props.width:e<0?0:e}handleKeyDown(e){const o=e.key;if("Tab"===o)return;e.preventDefault();let p=0;"ArrowLeft"!==o&&"a"!==o||(p=-2),"ArrowRight"!==o&&"d"!==o||(p=2);const t=this.applyBoundaries(this.sliderPositionFromValue+p);this.props.onChange(this.calcValueFromSliderPosition(t))}render(){var e,o,p,t;return Y(J,{elementRef:this.handleRef,disabled:this.props.disabled,position:"relative",background:"transparent",margin:"small 0 0 0",display:"inline-block",borderRadius:"medium",borderWidth:"0",padding:"0",as:"div",onKeyDown:e=>this.handleKeyDown(e),onMouseDown:e=>this.handleMouseDown(e),tabIndex:this.props.disabled?void 0:0,"aria-label":this.props.navigationExplanationScreenReaderLabel,role:"slider","aria-valuemin":this.props.minValue,"aria-valuemax":this.props.maxValue,"aria-valuenow":this.roundedValue},Y("div",{css:null===(e=this.props.styles)||void 0===e?void 0:e.indicator}),this.props.disabled&&Y("div",{css:null===(o=this.props.styles)||void 0===o?void 0:o.disabledOverlay}),Y("div",{ref:e=>{this._sliderRef=e},css:null===(p=this.props.styles)||void 0===p?void 0:p.sliderBackground},Y("div",{css:null===(t=this.props.styles)||void 0===t?void 0:t.slider})))}},US.displayName="Slider",US.propTypes=_S,US.allowedProps=["isColorSlider","onChange","width","value","minValue","maxValue","indicatorRadius","height","elementRef","navigationExplanationScreenReaderLabel"],US.componentId="ColorMixer.Slider",US.defaultProps={isColorSlider:!1},FS=US))||FS);const GS={disabled:E.bool,label:E.string,width:E.number.isRequired,value:E.object.isRequired,onChange:E.func.isRequired,withAlpha:E.bool,rgbRedInputScreenReaderLabel:E.string.isRequired,rgbGreenInputScreenReaderLabel:E.string.isRequired,rgbBlueInputScreenReaderLabel:E.string.isRequired,rgbAlphaInputScreenReaderLabel:E.string.isRequired,elementRef:E.func};var $S,KS,QS,JS;let ex=($S=_(((e,o)=>({RGBAInput:{label:"RGBAInput",marginTop:e.rgbaInputTopMargin,width:o.width/16+"rem"},label:{label:"RGBAInput__label",fontWeight:e.labelFontWeight},inputContainer:{label:"RGBAInput__inputContainer",display:"flex",marginTop:e.inputContainerTopMargin},rgbInput:{label:"RGBAInput__rgbInput",marginInlineEnd:e.tgbInputTopMargin,flex:7},aInput:{label:"RGBAInput__aInput",flex:10}})),(e=>{const o=e.spacing;return{...{labelFontWeight:e.typography.fontWeightBold,inputContainerTopMargin:o.xSmall,tgbInputTopMargin:o.xSmall,rgbaInputTopMargin:o.medium}}})),$S(((QS=class extends u.Component{constructor(e){super(e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.state={value:e.value}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(e){var o,p;null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p),(PS(e.value,this.props.value)||PS(this.state.value,this.props.value))&&this.setState({value:this.props.value})}handleChange(e,o){const p="a"===e?100:255,t="a"===e?Number(o.target.value)/100:Number(o.target.value),n={...this.props.value,[e]:t};if(!isNaN(Number(t))&&t>=0&&t<=p)return this.setState({value:n}),void this.props.onChange(n)}render(){const e=this.props,o=e.styles,p=e.disabled,t=e.label,n=e.withAlpha;return Y("div",{ref:this.handleRef,css:null==o?void 0:o.RGBAInput},t&&Y("div",{css:null==o?void 0:o.label},t),Y("div",{css:null==o?void 0:o.inputContainer},Y("span",{css:null==o?void 0:o.rgbInput},Y(s,{disabled:p,value:`${this.state.value.r}`,onChange:e=>this.handleChange("r",e),renderLabel:Y(Ae,null,this.props.rgbRedInputScreenReaderLabel)})),Y("span",{css:null==o?void 0:o.rgbInput},Y(s,{disabled:p,value:`${this.state.value.g}`,onChange:e=>this.handleChange("g",e),renderLabel:Y(Ae,null,this.props.rgbGreenInputScreenReaderLabel)})),Y("span",{css:null==o?void 0:o.rgbInput},Y(s,{disabled:p,value:`${this.state.value.b}`,onChange:e=>this.handleChange("b",e),renderLabel:Y(Ae,null,this.props.rgbBlueInputScreenReaderLabel)})),n&&Y("span",{css:null==o?void 0:o.aInput},Y(s,{"aria-label":"%",disabled:p,value:`${Math.round(100*this.state.value.a)}`,onChange:e=>this.handleChange("a",e),renderAfterInput:JS||(JS=Y("span",{"aria-hidden":"true",role:"presentation"},"%")),renderLabel:Y(Ae,null,this.props.rgbAlphaInputScreenReaderLabel)}))))}}).displayName="RGBAInput",QS.propTypes=GS,QS.allowedProps=["disabled","label","width","value","onChange","withAlpha","rgbRedInputScreenReaderLabel","rgbGreenInputScreenReaderLabel","rgbBlueInputScreenReaderLabel","rgbAlphaInputScreenReaderLabel","elementRef"],QS.componentId="ColorMixer.RGBAInput",QS.defaultProps={withAlpha:!1},KS=QS))||KS);const ox={disabled:E.bool,elementRef:E.func,withAlpha:E.bool,value:E.string,onChange:E.func.isRequired,rgbRedInputScreenReaderLabel:E.string.isRequired,rgbGreenInputScreenReaderLabel:E.string.isRequired,rgbBlueInputScreenReaderLabel:E.string.isRequired,rgbAlphaInputScreenReaderLabel:E.string.isRequired,colorSliderNavigationExplanationScreenReaderLabel:E.string.isRequired,alphaSliderNavigationExplanationScreenReaderLabel:E.string.isRequired,colorPaletteNavigationExplanationScreenReaderLabel:E.string.isRequired};var px,tx;let nx=_((()=>({colorMixer:{label:"colorMixer",width:"17rem"},sliderAndPaletteContainer:{label:"colorMixer__sliderAndPaletteContainer",display:"flex",flexDirection:"column"}})),null)(px=U()((tx=class e extends u.Component{constructor(e){super(e),this.ref=null,this._width=272,this._paletteHeight=160,this._sliderHeight=8,this._sliderIndicatorRadius=6,this._paletteIndicatorRadius=6,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.state={h:0,s:0,v:0,a:1}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o),ce(ec(this.props.value),"[ColorMixer] The passed color value is not valid."),this.setState({...pc(this.props.value)})}componentDidUpdate(e,o){var p,t;null===(p=(t=this.props).makeStyles)||void 0===p||p.call(t);const n=this.state,r=n.h,c=n.s,s=n.v,l=n.a;o.h===r&&o.s===c&&o.v===s&&o.a===l||this.props.onChange(oc({h:r,s:c,v:s,a:l})),e.value!==this.props.value&&oc({h:r,s:c,v:s,a:l})!==this.props.value&&this.setState({...pc(this.props.value)})}render(){const o=this.props,p=o.disabled,t=o.styles,n=o.withAlpha,r=o.rgbRedInputScreenReaderLabel,c=o.rgbGreenInputScreenReaderLabel,s=o.rgbBlueInputScreenReaderLabel,l=o.rgbAlphaInputScreenReaderLabel,i=o.colorSliderNavigationExplanationScreenReaderLabel,a=o.alphaSliderNavigationExplanationScreenReaderLabel,M=o.colorPaletteNavigationExplanationScreenReaderLabel,b=this.state,z=b.h,d=b.s,O=b.v,h=b.a;return Y("div",Object.assign({},pe(this.props,e.allowedProps),{"aria-disabled":p,ref:this.handleRef,css:null==t?void 0:t.colorMixer}),Y("span",{css:null==t?void 0:t.sliderAndPaletteContainer,"aria-label":`${oc({h:z,s:d,v:O,a:h})}`,"aria-live":"polite"},Y(DS,{disabled:p,width:this._width,height:this._paletteHeight,indicatorRadius:this._paletteIndicatorRadius,hue:z,color:{h:z,s:d,v:O},onChange:e=>{this.setState({s:e.s,v:e.v})},navigationExplanationScreenReaderLabel:M}),Y(YS,{disabled:p,isColorSlider:!0,width:this._width,height:this._sliderHeight,indicatorRadius:this._sliderIndicatorRadius,value:z,minValue:0,maxValue:359,color:oc({h:z,s:d,v:O,a:h}),onChange:e=>{this.setState({h:e})},navigationExplanationScreenReaderLabel:i}),n&&Y(YS,{disabled:p,width:this._width,height:this._sliderHeight,indicatorRadius:this._sliderIndicatorRadius,color:oc({h:z,s:d,v:O}),value:h,minValue:0,maxValue:1,onChange:e=>this.setState({a:e/100}),navigationExplanationScreenReaderLabel:a})),Y(ex,{disabled:p,label:n?"RGBA":"RGB",width:this._width,value:tc({h:z,s:d,v:O,a:h}),onChange:e=>this.setState({...pc(e)}),withAlpha:n,rgbRedInputScreenReaderLabel:r,rgbGreenInputScreenReaderLabel:c,rgbBlueInputScreenReaderLabel:s,rgbAlphaInputScreenReaderLabel:l}))}},tx.displayName="ColorMixer",tx.propTypes=ox,tx.allowedProps=["disabled","elementRef","value","onChange","withAlpha","rgbRedInputScreenReaderLabel","rgbGreenInputScreenReaderLabel","rgbBlueInputScreenReaderLabel","rgbAlphaInputScreenReaderLabel","colorSliderNavigationExplanationScreenReaderLabel","alphaSliderNavigationExplanationScreenReaderLabel","colorPaletteNavigationExplanationScreenReaderLabel"],tx.componentId="ColorMixer",tx.defaultProps={value:"#000",withAlpha:!1,disabled:!1},px=tx))||px)||px;const rx={as:E.elementType,children:E.node.isRequired,color:E.oneOf(["primary","success","danger","info","warning","alert"]),elementRef:E.func,margin:D.spacing,statusLabel:E.string,renderIcon:E.oneOfType([E.node,E.func])},cx=["margin","children","color","as","elementRef","styles","makeStyles","statusLabel","renderIcon"];var sx,lx,ix;let ax=(sx=_(((e,o)=>{const p=o.color,t={primary:{color:e.primaryColor,borderColor:e.primaryColor},success:{color:e.successColor,borderColor:e.successColor},danger:{color:e.dangerColor,borderColor:e.dangerColor},info:{color:e.infoColor,borderColor:e.infoColor},warning:{color:e.warningColor,borderColor:e.warningColor},alert:{color:e.alertColor,borderColor:e.alertColor}};return{pill:{label:"pill",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:e.fontFamily,boxSizing:"border-box",padding:e.padding,background:e.background,borderWidth:e.borderWidth,borderStyle:e.borderStyle,borderRadius:e.borderRadius,lineHeight:`calc(${e.height} - (${e.borderWidth} * 2))`,...t[p]},status:{label:"pill__status",boxSizing:"border-box",fontSize:e.textFontSize,fontWeight:e.statusLabelFontWeight,marginRight:"0.125rem"},icon:{label:"pill__icon",display:"flex",alignItems:"center",marginRight:"0.375rem",fontSize:"0.75rem"},text:{label:"pill__text",boxSizing:"border-box",maxWidth:e.maxWidth,fontSize:e.textFontSize,fontWeight:e.textFontWeight,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},maxWidth:e.maxWidth}}),(e=>{var o,p,t,n,r,c,s;const l=e.borders,i=e.colors,a=e.spacing,M=e.typography,b=e.key;return{...{fontFamily:null==M?void 0:M.fontFamily,padding:`0 ${null==a?void 0:a.xSmall}`,height:"1.5rem",background:null==i||null===(o=i.contrasts)||void 0===o?void 0:o.white1010,textFontSize:null==M?void 0:M.fontSizeSmall,textFontWeight:null==M?void 0:M.fontWeightNormal,statusLabelFontWeight:null==M?void 0:M.fontWeightBold,maxWidth:"15rem",primaryColor:null==i||null===(p=i.contrasts)||void 0===p?void 0:p.grey4570,infoColor:null==i||null===(t=i.contrasts)||void 0===t?void 0:t.blue4570,dangerColor:null==i||null===(n=i.contrasts)||void 0===n?void 0:n.red4570,successColor:null==i||null===(r=i.contrasts)||void 0===r?void 0:r.green4570,warningColor:null==i||null===(c=i.contrasts)||void 0===c?void 0:c.orange4570,alertColor:null==i||null===(s=i.contrasts)||void 0===s?void 0:s.blue4570,borderWidth:null==l?void 0:l.widthSmall,borderStyle:null==l?void 0:l.style,borderRadius:"999rem"},...{instructure:{height:"1.5rem"}}[b]}})),sx(lx=U()((ix=class extends u.Component{constructor(e){super(e),this.ref=null,this.ellipsisRef=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.state={truncated:!1}}componentDidMount(){var e,o;this.setTruncation(),null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}setTruncation(){this.ellipsisRef&&this.setState({truncated:this.ellipsisRef.offsetWidth{this.ellipsisRef=e}},s&&Y("span",{css:null==c?void 0:c.status},s&&s.concat(":")),n)))}render(){return this.state.truncated?Y(We,{renderTip:this.props.statusLabel?this.props.statusLabel.concat(": ",this.props.children):this.props.children,elementRef:this.handleRef},(({focused:e,getTriggerProps:o})=>this.renderPill(e,o))):this.renderPill()}},ix.displayName="Pill",ix.componentId="Pill",ix.allowedProps=["as","children","color","elementRef","margin"],ix.propTypes=rx,ix.defaultProps={color:"primary"},lx=ix))||lx)||lx);const Mx={elementRef:E.func,failureLabel:E.string.isRequired,firstColor:E.string.isRequired,firstColorLabel:E.string,graphicsTextLabel:E.string.isRequired,withoutColorPreview:E.bool,label:E.string.isRequired,largeTextLabel:E.string.isRequired,normalTextLabel:E.string.isRequired,secondColor:E.string.isRequired,secondColorLabel:E.string,successLabel:E.string.isRequired};var bx,zx,dx;let Ox=(bx=_((e=>{const o=o=>({label:o?"colorContrast__successDescription":"colorContrast__failureDescription",flex:1,color:o?e.successColor:e.failureColor});return{colorContrast:{label:"colorContrast",width:e.width,fontFamily:e.fontFamily,fontWeight:e.fontWeight,lineHeight:e.lineHeight,fontSize:e.fontSize},statusWrapper:{label:"colorContrast__statusWrapper",width:"100%",display:"flex",marginBottom:e.statusWrapperBottomMargin},successDescription:o(!0),failureDescription:o(!1),colorIndicator:{marginInlineEnd:e.colorIndicatorRightMargin},statusIndicatorWrapper:{label:"colorContrast__statusIndicatorWrapper",flex:1,display:"flex",flexDirection:"row-reverse"},colorIndicatorLabel:{label:"colorContrast__colorIndicatorLabel",wordBreak:"break-all"},pickedColorHex:{label:"colorContrast__pickedColorHex",color:e.pickedHexColor},colorPreview:{label:"colorContrast__colorPreview",display:"flex",width:"100%",marginBottom:e.colorPreviewBottomMargin,marginTop:e.colorPreviewTopMargin},firstColorPreview:{label:"colorContrast__firstColorPreview",display:"flex",flex:1},secondColorPreview:{label:"colorContrast__secondColorPreview",display:"flex"},label:{label:"colorContrast__label",marginBottom:e.labelBottomMargin}}}),(e=>{var o,p,t;const n=e.colors,r=e.typography,c=e.spacing,s=e.borders;return{...{width:"17rem",fontFamily:null==r?void 0:r.fontFamily,fontWeight:null==r?void 0:r.fontWeightNormal,lineHeight:null==r?void 0:r.lineHeight,fontSize:null==r?void 0:r.fontSizeMedium,statusWrapperBottomMargin:null==c?void 0:c.xxSmall,colorIndicatorRightMargin:null==c?void 0:c.small,colorPreviewBottomMargin:null==c?void 0:c.small,colorPreviewTopMargin:null==c?void 0:c.xSmall,labelBottomMargin:null==c?void 0:c.xxSmall,smallBorder:s.widthSmall,successColor:null==n||null===(o=n.contrasts)||void 0===o?void 0:o.green4570,failureColor:null==n||null===(p=n.contrasts)||void 0===p?void 0:p.red4570,pickedHexColor:null==n||null===(t=n.contrasts)||void 0===t?void 0:t.grey4570}}})),bx(zx=U()((dx=class e extends u.Component{constructor(e){super(e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.renderStatus=(e,o)=>{const p=this.props,t=p.successLabel,n=p.failureLabel,r=p.styles;return Y("div",{css:null==r?void 0:r.statusWrapper},Y("div",{css:e?null==r?void 0:r.successDescription:null==r?void 0:r.failureDescription},o),Y("div",{css:null==r?void 0:r.statusIndicatorWrapper},Y(ax,{color:e?"success":"danger"},e?t:n)))},this.renderColorIndicator=(e,o)=>{var p,t,n;return Y(f.Fragment,null,Y("div",null,Y("div",{css:null===(p=this.props.styles)||void 0===p?void 0:p.colorIndicator},Y(ES,{color:e}))),Y("div",null,Y("div",{css:null===(t=this.props.styles)||void 0===t?void 0:t.colorIndicatorLabel},o),Y("div",{css:null===(n=this.props.styles)||void 0===n?void 0:n.pickedColorHex},e)))},this.calcBlendedColor=(e,o)=>{const p=1-(1-e.a)*(1-o.a);return{r:o.r*o.a/p+e.r*e.a*(1-o.a)/p,g:o.g*o.a/p+e.g*e.a*(1-o.a)/p,b:o.b*o.a/p+e.b*e.a*(1-o.a)/p,a:1}}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}renderPreview(){const e=this.props,o=e.styles,p=e.withoutColorPreview,t=e.firstColor,n=e.secondColor,r=e.firstColorLabel,c=e.secondColorLabel;return p?null:(r&&c||Q(!1,"When `withoutColorPreview` is not set to true, the properties `firstColorLabel` and `secondColorLabel` are required!"),!p&&Y("div",{css:null==o?void 0:o.colorPreview},Y("div",{css:null==o?void 0:o.firstColorPreview},this.renderColorIndicator(t,r||"")),Y("div",{css:null==o?void 0:o.secondColorPreview},this.renderColorIndicator(n,c||""))))}get calcContrast(){const e=tc(this.props.firstColor),o=tc(this.props.secondColor),p=this.calcBlendedColor({r:255,g:255,b:255,a:1},e),t=this.calcBlendedColor(p,o);return Jr(oc(p),oc(t),2)}render(){const o=this.props,p=o.styles,t=o.label,n=o.normalTextLabel,r=o.largeTextLabel,c=o.graphicsTextLabel,s=this.calcContrast;return Y("div",Object.assign({},pe(this.props,e.allowedProps),{ref:this.handleRef,css:null==p?void 0:p.colorContrast}),Y("div",{css:null==p?void 0:p.label},Y(Xe,{weight:"bold",as:"div"},t)),Y(Xe,{size:"x-large"},s,":1"),this.renderPreview(),this.renderStatus(s>=4.5,n),this.renderStatus(s>=3,r),this.renderStatus(s>=3,c))}},dx.displayName="ColorContrast",dx.propTypes=Mx,dx.allowedProps=["elementRef","failureLabel","firstColor","firstColorLabel","graphicsTextLabel","withoutColorPreview","label","largeTextLabel","normalTextLabel","secondColor","secondColorLabel","successLabel"],dx.componentId="ColorContrast",dx.defaultProps={withoutColorPreview:!1},zx=dx))||zx)||zx);const hx={colors:E.array.isRequired,onSelect:E.func.isRequired,selected:E.string,disabled:E.bool,elementRef:E.func,label:E.string,popoverScreenReaderLabel:E.string,colorMixerSettings:E.shape({addNewPresetButtonScreenReaderLabel:E.string.isRequired,selectColorLabel:E.string.isRequired,removeColorLabel:E.string.isRequired,onPresetChange:E.func,popoverAddButtonLabel:E.string.isRequired,popoverCloseButtonLabel:E.string.isRequired,maxHeight:E.string,colorMixer:E.shape({withAlpha:E.bool,rgbRedInputScreenReaderLabel:E.string.isRequired,rgbGreenInputScreenReaderLabel:E.string.isRequired,rgbBlueInputScreenReaderLabel:E.string.isRequired,rgbAlphaInputScreenReaderLabel:E.string.isRequired,colorSliderNavigationExplanationScreenReaderLabel:E.string.isRequired,alphaSliderNavigationExplanationScreenReaderLabel:E.string.isRequired,colorPaletteNavigationExplanationScreenReaderLabel:E.string.isRequired}).isRequired,colorContrast:E.shape({firstColor:E.string.isRequired,label:E.string.isRequired,successLabel:E.string.isRequired,failureLabel:E.string.isRequired,normalTextLabel:E.string.isRequired,largeTextLabel:E.string.isRequired,graphicsTextLabel:E.string.isRequired,firstColorLabel:E.string.isRequired,secondColorLabel:E.string.isRequired})})};var Ax,ux,fx,mx;let qx=(Ax=_(((e,o)=>{const p=o.colorMixerSettings;return{colorPreset:{label:"colorPreset",display:"flex",flexWrap:"wrap",width:"17rem",...o.disabled&&{opacity:.5}},addNewPresetButton:{label:"colorPreset__addNewPresetButton",width:"2.375rem",height:"2.375rem",margin:e.xxSmallSpacing},selectedIndicator:{label:"colorPreset__selectedIndicator",width:"1.25rem",height:"1.25rem",borderStyle:"solid",borderColor:e.selectedIndicatorBorderColor,borderWidth:e.smallBorder,borderRadius:"1.25rem",boxSizing:"border-box",position:"relative",insetInlineStart:"1.5rem",bottom:"2.75rem",backgroundColor:e.selectedIndicatorBackgroundColor,display:"flex",alignItems:"center",justifyContent:"center"},popoverContent:{label:"colorPreset__popoverContent",padding:e.smallSpacing,maxHeight:(null==p?void 0:p.maxHeight)||"100vh",overflow:"auto"},popoverDivider:{label:"colorPreset__popoverDivider",borderTop:"solid",borderWidth:e.smallBorder,borderColor:e.popoverDividerColor,margin:`${e.smallSpacing} 0 ${e.smallSpacing} 0`},popoverContrastBlock:{label:"colorPreset__popoverContrastBlock",borderTop:"solid",borderWidth:e.smallBorder,borderColor:e.popoverDividerColor,marginTop:e.popoverContentBlockTopMargin,marginBottom:e.popoverContentBlockBottomMargin,paddingTop:e.popoverContentBlockTopPadding},popoverFooter:{label:"colorPreset__popoverFooter",backgroundColor:e.popoverFooterColor,display:"flex",flexDirection:"row-reverse",padding:e.smallSpacing},label:{label:"colorPreset__label",width:"100%",margin:e.xxSmallSpacing}}}),(e=>{var o,p,t,n,r,c,s,l;const i=e.colors,a=e.borders,M=e.spacing;return{...{xxSmallSpacing:null==M?void 0:M.xxSmall,smallSpacing:null==M?void 0:M.small,selectedIndicatorBackgroundColor:null==i||null===(o=i.contrasts)||void 0===o?void 0:o.white1010,selectedIndicatorBorderColor:null==i||null===(p=i.contrasts)||void 0===p?void 0:p.grey125125,popoverDividerColor:null==i||null===(t=i.contrasts)||void 0===t?void 0:t.grey1214,smallBorder:null==a?void 0:a.widthSmall,popoverFooterColor:null==i||null===(n=i.contrasts)||void 0===n?void 0:n.grey1111,checkerboardBackgroundImage:`linear-gradient(45deg, ${null==i||null===(r=i.contrasts)||void 0===r?void 0:r.grey4570} 25%, transparent 25%),\n linear-gradient(-45deg, ${null==i||null===(c=i.contrasts)||void 0===c?void 0:c.grey4570} 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, ${null==i||null===(s=i.contrasts)||void 0===s?void 0:s.grey4570} 75%),\n linear-gradient(-45deg, transparent 75%, ${null==i||null===(l=i.contrasts)||void 0===l?void 0:l.grey4570} 75%)`,checkerboardBackgroundSize:".5rem .5rem",checkerboardBackgroundPosition:"0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px",popoverContentBlockTopMargin:null==M?void 0:M.medium,popoverContentBlockBottomMargin:null==M?void 0:M.small,popoverContentBlockTopPadding:null==M?void 0:M.medium}}})),Ax(ux=U()((fx=class e extends u.Component{constructor(e){super(e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.onMenuItemSelected=e=>(o,p)=>{var t,n;("select"===p.value&&this.props.onSelect(e),"remove"===p.value)&&(null===(t=this.props)||void 0===t||null===(n=t.colorMixerSettings)||void 0===n||n.onPresetChange(this.props.colors.filter((o=>o!==e))))},this.renderAddNewPresetButton=()=>{var e,o,p,t,n,r,c,s,l,i,a,M;return Y(He,{renderTrigger:Y("div",{css:null===(e=this.props)||void 0===e||null===(o=e.styles)||void 0===o?void 0:o.addNewPresetButton},Y(ao,{disabled:this.props.disabled,screenReaderLabel:this.props.colorMixerSettings.addNewPresetButtonScreenReaderLabel},mx||(mx=Y(zf,null)))),isShowingContent:this.state.openAddNew,onShowContent:()=>{this.props.disabled||this.setState({openAddNew:!0})},onHideContent:()=>{this.setState({openAddNew:!1})},on:"click",screenReaderLabel:this.props.popoverScreenReaderLabel,shouldContainFocus:!0,shouldReturnFocus:!0,shouldCloseOnDocumentClick:!0,offsetY:16,mountNode:()=>document.getElementById("main")},Y("div",{css:null===(p=this.props.styles)||void 0===p?void 0:p.popoverContent},Y(nx,{value:oc(this.state.newColor),onChange:e=>this.setState({newColor:tc(e)}),withAlpha:null===(t=this.props)||void 0===t||null===(n=t.colorMixerSettings)||void 0===n||null===(r=n.colorMixer)||void 0===r?void 0:r.withAlpha,rgbRedInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbRedInputScreenReaderLabel,rgbGreenInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbGreenInputScreenReaderLabel,rgbBlueInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbBlueInputScreenReaderLabel,rgbAlphaInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbAlphaInputScreenReaderLabel,colorSliderNavigationExplanationScreenReaderLabel:this.props.colorMixerSettings.colorMixer.colorSliderNavigationExplanationScreenReaderLabel,alphaSliderNavigationExplanationScreenReaderLabel:this.props.colorMixerSettings.colorMixer.alphaSliderNavigationExplanationScreenReaderLabel,colorPaletteNavigationExplanationScreenReaderLabel:this.props.colorMixerSettings.colorMixer.colorPaletteNavigationExplanationScreenReaderLabel}),(null===(c=this.props)||void 0===c||null===(s=c.colorMixerSettings)||void 0===s?void 0:s.colorContrast)&&Y("div",{css:null===(l=this.props.styles)||void 0===l?void 0:l.popoverContrastBlock},Y(Ox,{firstColor:this.props.colorMixerSettings.colorContrast.firstColor,secondColor:oc(this.state.newColor),label:this.props.colorMixerSettings.colorContrast.label,successLabel:this.props.colorMixerSettings.colorContrast.successLabel,failureLabel:this.props.colorMixerSettings.colorContrast.failureLabel,normalTextLabel:this.props.colorMixerSettings.colorContrast.normalTextLabel,largeTextLabel:this.props.colorMixerSettings.colorContrast.largeTextLabel,graphicsTextLabel:this.props.colorMixerSettings.colorContrast.graphicsTextLabel,firstColorLabel:this.props.colorMixerSettings.colorContrast.firstColorLabel,secondColorLabel:this.props.colorMixerSettings.colorContrast.secondColorLabel}))),Y("div",{css:null===(i=this.props.styles)||void 0===i?void 0:i.popoverFooter},Y(lo,{onClick:()=>{var e,o;null===(e=this.props)||void 0===e||null===(o=e.colorMixerSettings)||void 0===o||o.onPresetChange([oc(this.state.newColor),...this.props.colors]),this.setState({openAddNew:!1})},color:"primary",margin:"0 xx-small 0 xx-small"},null===(a=this.props.colorMixerSettings)||void 0===a?void 0:a.popoverAddButtonLabel),Y(lo,{onClick:()=>this.setState({openAddNew:!1}),color:"secondary",margin:"0 xx-small 0 xx-small"},null===(M=this.props.colorMixerSettings)||void 0===M?void 0:M.popoverCloseButtonLabel)))},this.renderColorIndicator=(e,o)=>{const p=this.renderIndicatorBase(e,o);return this.props.disabled?p:this.renderIndicatorTooltip(p,e)},this.renderIndicatorBase=(e,o)=>{var p,t;return Y(J,Object.assign({disabled:this.props.disabled,position:"relative",width:"2.375rem",height:"2.375rem",background:"transparent",margin:"xx-small",display:"inline-block",borderRadius:"medium",borderWidth:"0",padding:"0",cursor:this.props.disabled?"not-allowed":"auto",as:"button"},o?{onClick:()=>this.props.onSelect(e)}:{},this.isSelectedColor(e)?{"aria-label":"selected"}:{}),Y("div",null,Y(ES,{color:e,shape:"rectangle",role:"presentation"}),this.isSelectedColor(e)&&Y("div",{css:null===(p=this.props)||void 0===p||null===(t=p.styles)||void 0===t?void 0:t.selectedIndicator},Y(By,{themeOverride:{sizeXSmall:"0.8rem"},size:"x-small"}))))},this.renderIndicatorTooltip=(e,o)=>Y(We,{renderTip:Y("div",null,o)},e),this.renderSettingsMenu=(e,o)=>Y(Ze,{onSelect:this.onMenuItemSelected(e),trigger:this.renderColorIndicator(e),key:`color-preset-color-${o}`,rootPageId:"root",width:"10rem",offsetY:"15rem"},Y(Ze.Page,{withoutHeaderSeparator:!0,id:"root",renderTitle:e},Y(Ze.Option,{value:"select",id:"select"},this.props.colorMixerSettings.selectColorLabel),Y(Ze.Option,{value:"remove",id:"remove"},this.props.colorMixerSettings.removeColorLabel))),this.state={openEditor:!1,openAddNew:!1,newColor:{r:51,g:99,b:42,a:1}}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}get isModifiable(){var e;return"function"==typeof(null===(e=this.props.colorMixerSettings)||void 0===e?void 0:e.onPresetChange)}isSelectedColor(e){const o=this.props.selected;return!!o&&oc(o)===oc(e)}render(){const o=this.props,p=o.styles,t=o.label,n=o.colors;return this.isModifiable||0!==n.length?Y("div",Object.assign({},pe(this.props,e.allowedProps),{ref:this.handleRef,css:null==p?void 0:p.colorPreset}),t&&Y("div",{css:null==p?void 0:p.label},Y(Xe,{weight:"bold"},t)),this.isModifiable&&this.renderAddNewPresetButton(),n.map(((e,o)=>this.isModifiable?this.renderSettingsMenu(e,o):Y("div",{key:`color-preset-color-${o}`},this.renderColorIndicator(e,!0))))):null}},fx.displayName="ColorPreset",fx.propTypes=hx,fx.allowedProps=["colors","disabled","elementRef","label","colorMixerSettings","onSelect","popoverScreenReaderLabel","selected"],fx.componentId="ColorPreset",fx.defaultProps={disabled:!1},ux=fx))||ux)||ux);const Rx={checkContrast:E.shape({isStrict:E.bool,contrastStrength:E.oneOf(["min","mid","max"]),contrastAgainst:E.string,renderContrastSuccessMessage:E.func,renderContrastErrorMessage:E.func}),colorMixerSettings:E.shape({popoverAddButtonLabel:E.string.isRequired,popoverCloseButtonLabel:E.string.isRequired,colorMixer:E.shape({withAlpha:E.bool,rgbRedInputScreenReaderLabel:E.string.isRequired,rgbGreenInputScreenReaderLabel:E.string.isRequired,rgbBlueInputScreenReaderLabel:E.string.isRequired,rgbAlphaInputScreenReaderLabel:E.string.isRequired,colorSliderNavigationExplanationScreenReaderLabel:E.string.isRequired,alphaSliderNavigationExplanationScreenReaderLabel:E.string.isRequired,colorPaletteNavigationExplanationScreenReaderLabel:E.string.isRequired}),colorPreset:E.shape({colors:E.arrayOf(E.string).isRequired,label:E.string.isRequired}),colorContrast:E.shape({firstColor:E.string.isRequired,label:E.string.isRequired,successLabel:E.string.isRequired,failureLabel:E.string.isRequired,normalTextLabel:E.string.isRequired,largeTextLabel:E.string.isRequired,graphicsTextLabel:E.string.isRequired,firstColorLabel:E.string.isRequired,secondColorLabel:E.string.isRequired})}),children:E.func,disabled:E.bool,elementRef:E.func,isRequired:E.bool,label:E.node.isRequired,onChange:E.func,placeholderText:E.string,popoverScreenReaderLabel:E.string,popoverButtonScreenReaderLabel:E.string,popoverMaxHeight:E.string,renderInvalidColorMessage:E.func,renderIsRequiredMessage:E.func,renderMessages:E.func,tooltip:E.node,id:E.string,value:E.string,width:E.string,withAlpha:E.bool};var Wx,vx,gx,yx,Lx,Nx,Bx;const wx=["0","1","2","3","4","5","6","7","8","9","a","A","b","B","c","C","d","D","e","E","f","F",null];let Cx=(Wx=_(((e,o,p)=>{const t=e.hashMarkColor,n=e.errorIconColor,r=e.warningIconColor,c=e.successIconColor,s=o.checkContrast,l=o.popoverMaxHeight,i=p.isSimple;return{colorPicker:{label:"colorPicker",display:"flex"},simpleColorContainer:{label:"colorPicker__simpleColorContainer",display:"flex",paddingLeft:e.simpleColorContainerLeftPadding,alignItems:"center"},hashMarkContainer:{label:"colorPicker__hashMarkContainer",color:t,display:"inline-block",fontSize:"1rem",lineHeight:e.hashMarkContainerLineHeight,...i?{paddingInlineStart:e.hashMarkContainerLeftPadding,paddingInlineEnd:e.hashMarkContainerRightPadding}:{}},errorIcons:{label:"colorPicker__errorIcons",display:"flex",paddingInlineEnd:e.errorIconsRightPadding,color:null!=s&&s.isStrict?n:r},successIcon:{label:"colorPicker__successIcon",display:"flex",paddingInlineEnd:e.successIconRightPadding,color:c},label:{label:"colorPicker__label",marginInlineEnd:e.labelRightMargin},popoverContent:{label:"colorPicker__popoverContent",padding:e.popoverContentPadding},popoverContentBlock:{label:"colorPicker__popoverContentBlock",borderTop:"solid",borderWidth:e.popoverContentBlockBorderWidth,borderColor:e.popoverSeparatorColor,marginTop:e.popoverContentBlockTopMargin,marginBottom:e.popoverContentBlockBottomMargin,paddingTop:e.popoverContentBlockTopPadding},popoverFooter:{label:"colorPicker__popoverFooter",backgroundColor:e.popoverFooterColor,display:"flex",justifyContent:"flex-end",padding:e.popoverFooterPadding,borderTop:`solid ${e.popoverFooterTopBorderWidth}`,borderColor:e.popoverSeparatorColor},colorMixerButtonContainer:{label:"colorPicker__colorMixerButtonContainer",alignSelf:"flex-start",marginInlineStart:e.colorMixerButtonContainerLeftMargin},popoverContentContainer:{label:"colorPicker__popoverContentContainer",maxHeight:l||"100vh",overflow:"auto"},colorMixerButtonWrapper:{label:"colorPicker__colorMixerButtonWrapper",position:"static"}}}),(e=>{var o,p,t,n,r,c,s,l,i,a,M;const b=e.colors,z=e.borders,d=e.spacing,O=e.typography;return{...{hashMarkColor:null==b||null===(o=b.contrasts)||void 0===o?void 0:o.grey4570,warningIconColor:null==b||null===(p=b.contrasts)||void 0===p?void 0:p.orange4570,errorIconColor:null==b||null===(t=b.contrasts)||void 0===t?void 0:t.red4570,successIconColor:null==b||null===(n=b.contrasts)||void 0===n?void 0:n.green4570,popoverSeparatorColor:null==b||null===(r=b.contrasts)||void 0===r?void 0:r.grey1214,popoverFooterColor:null==b||null===(c=b.contrasts)||void 0===c?void 0:c.grey1111,smallBorder:null==z?void 0:z.widthSmall,smallSpacing:null==d?void 0:d.small,xSmallSpacing:null==d?void 0:d.xSmall,xxSmallSpacing:null==d?void 0:d.xxSmall,xxxSmallSpacing:null==d?void 0:d.xxxSmall,xLargeFontSize:null==O?void 0:O.fontSizeXLarge,checkerboardBackgroundColor:null==b||null===(s=b.contrasts)||void 0===s?void 0:s.white1010,checkerboardBackgroundImage:`linear-gradient(45deg, ${null==b||null===(l=b.contrasts)||void 0===l?void 0:l.grey1214} 25%, transparent 25%),\n linear-gradient(-45deg, ${null==b||null===(i=b.contrasts)||void 0===i?void 0:i.grey1214} 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, ${null==b||null===(a=b.contrasts)||void 0===a?void 0:a.grey1214} 75%),\n linear-gradient(-45deg, transparent 75%, ${null==b||null===(M=b.contrasts)||void 0===M?void 0:M.grey1214} 75%)`,checkerboardBackgroundSize:".5rem .5rem",checkerboardBackgroundPosition:"0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px",colorIndicatorBorderColor:CS,simpleColorContainerLeftPadding:null==d?void 0:d.xSmall,hashMarkContainerLineHeight:null==O?void 0:O.fontSizeXLarge,hashMarkContainerLeftPadding:null==d?void 0:d.xSmall,hashMarkContainerRightPadding:null==d?void 0:d.xxxSmall,errorIconsRightPadding:null==d?void 0:d.small,successIconRightPadding:null==d?void 0:d.small,labelRightMargin:null==d?void 0:d.xxSmall,popoverContentPadding:null==d?void 0:d.small,popoverContentBlockBorderWidth:null==z?void 0:z.widthSmall,popoverContentBlockTopMargin:null==d?void 0:d.medium,popoverContentBlockBottomMargin:null==d?void 0:d.small,popoverContentBlockTopPadding:null==d?void 0:d.medium,popoverFooterPadding:null==d?void 0:d.xSmall,popoverFooterTopBorderWidth:null==z?void 0:z.widthSmall,colorMixerButtonContainerLeftMargin:null==d?void 0:d.xSmall}}})),Wx(vx=U()((gx=class e extends u.Component{constructor(e){super(e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.inputContainerRef=null,this.handleInputContainerRef=e=>{this.inputContainerRef=e,this.setLabelHeight()},this.setLabelHeight=()=>{var e;this.inputContainerRef&&this.setState({labelHeight:this.inputContainerRef.getBoundingClientRect().y-((null===(e=this.inputContainerRef.parentElement)||void 0===e?void 0:e.getBoundingClientRect().y)||0)})},this.checkSettings=()=>{this.props.children&&this.props.colorMixerSettings&&ce(!1,"You should either use children, colorMixerSettings or neither, not both. In this case, the colorMixerSettings will be ignored.",""),this.props.value&&"function"!=typeof this.props.onChange&&Q(!1,"You provided a `value` prop on ColorPicker, which will render a controlled component. Please provide an `onChange` handler.")},this.renderPopover=()=>{var e;return Y(He,{renderTrigger:Y(ao,{disabled:this.props.disabled,screenReaderLabel:this.props.popoverButtonScreenReaderLabel||""},Y(ES,{color:`#${this.state.hexCode}`})),isShowingContent:this.state.openColorPicker,onShowContent:()=>{this.setState({openColorPicker:!0,mixedColor:this.state.hexCode})},onHideContent:()=>{this.setState({openColorPicker:!1})},on:"click",screenReaderLabel:this.props.popoverScreenReaderLabel,shouldContainFocus:!0,shouldReturnFocus:!0,shouldCloseOnDocumentClick:!0,offsetY:"10rem"},Y("div",{css:null===(e=this.props.styles)||void 0===e?void 0:e.popoverContentContainer},this.isDefaultPopover?this.renderDefaultPopoverContent():this.renderCustomPopoverContent()))},this.renderCustomPopoverContent=()=>{const e=this.props,o=e.children,p=e.onChange;return Y("div",null,"function"==typeof o&&o(`#${this.mixedColorWithStrippedAlpha}`,(e=>{this.setState({mixedColor:oc(e).slice(1)})}),(()=>{this.setState({openColorPicker:!1,hexCode:this.mixedColorWithStrippedAlpha}),null==p||p(`#${this.mixedColorWithStrippedAlpha}`)}),(()=>this.setState({openColorPicker:!1,mixedColor:this.state.hexCode}))))},this.renderDefaultPopoverContent=()=>{var e,o,p,t,n,r,c,s,l,i,a,M;return Y(f.Fragment,null,Y("div",{css:null===(e=this.props.styles)||void 0===e?void 0:e.popoverContent},(null===(o=this.props)||void 0===o||null===(p=o.colorMixerSettings)||void 0===p?void 0:p.colorMixer)&&Y(nx,{value:`#${this.state.mixedColor}`,onChange:e=>this.setState({mixedColor:oc(e).slice(1)}),withAlpha:this.props.colorMixerSettings.colorMixer.withAlpha,rgbRedInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbRedInputScreenReaderLabel,rgbGreenInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbGreenInputScreenReaderLabel,rgbBlueInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbBlueInputScreenReaderLabel,rgbAlphaInputScreenReaderLabel:this.props.colorMixerSettings.colorMixer.rgbAlphaInputScreenReaderLabel,colorSliderNavigationExplanationScreenReaderLabel:this.props.colorMixerSettings.colorMixer.colorSliderNavigationExplanationScreenReaderLabel,alphaSliderNavigationExplanationScreenReaderLabel:this.props.colorMixerSettings.colorMixer.alphaSliderNavigationExplanationScreenReaderLabel,colorPaletteNavigationExplanationScreenReaderLabel:this.props.colorMixerSettings.colorMixer.colorPaletteNavigationExplanationScreenReaderLabel}),(null===(t=this.props)||void 0===t||null===(n=t.colorMixerSettings)||void 0===n?void 0:n.colorPreset)&&Y("div",{css:null===(r=this.props.styles)||void 0===r?void 0:r.popoverContentBlock},Y(qx,{label:this.props.colorMixerSettings.colorPreset.label,colors:this.props.colorMixerSettings.colorPreset.colors,selected:this.mixedColorWithStrippedAlpha?`#${this.mixedColorWithStrippedAlpha}`:void 0,onSelect:e=>this.setState({mixedColor:e.slice(1)})})),(null===(c=this.props)||void 0===c||null===(s=c.colorMixerSettings)||void 0===s?void 0:s.colorContrast)&&Y("div",{css:null===(l=this.props.styles)||void 0===l?void 0:l.popoverContentBlock},Y(Ox,{firstColor:this.props.colorMixerSettings.colorContrast.firstColor,secondColor:`#${this.mixedColorWithStrippedAlpha}`,label:this.props.colorMixerSettings.colorContrast.label,successLabel:this.props.colorMixerSettings.colorContrast.successLabel,failureLabel:this.props.colorMixerSettings.colorContrast.failureLabel,normalTextLabel:this.props.colorMixerSettings.colorContrast.normalTextLabel,largeTextLabel:this.props.colorMixerSettings.colorContrast.largeTextLabel,graphicsTextLabel:this.props.colorMixerSettings.colorContrast.graphicsTextLabel,firstColorLabel:this.props.colorMixerSettings.colorContrast.firstColorLabel,secondColorLabel:this.props.colorMixerSettings.colorContrast.secondColorLabel}))),Y("div",{css:null===(i=this.props.styles)||void 0===i?void 0:i.popoverFooter},Y(lo,{onClick:()=>this.setState({openColorPicker:!1,mixedColor:this.state.hexCode}),color:"secondary",margin:"xx-small"},null===(a=this.props.colorMixerSettings)||void 0===a?void 0:a.popoverCloseButtonLabel),Y(lo,{onClick:()=>{"function"==typeof this.props.onChange?(this.props.onChange(`#${this.mixedColorWithStrippedAlpha}`),this.setState({openColorPicker:!1})):this.setState({openColorPicker:!1,hexCode:`${this.mixedColorWithStrippedAlpha}`})},color:"primary",margin:"xx-small"},null===(M=this.props.colorMixerSettings)||void 0===M?void 0:M.popoverAddButtonLabel)))},this.state={hexCode:"",showHelperErrorMessages:!1,openColorPicker:!1,mixedColor:"",labelHeight:0}}componentDidMount(){var e,o,p;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,{...this.state,isSimple:this.isSimple}),this.checkSettings(),this.props.value&&this.setState({hexCode:null===(p=this.props.value)||void 0===p?void 0:p.slice(1)})}componentDidUpdate(e){var o,p,t;(null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p,{...this.state,isSimple:this.isSimple}),e.value!==this.props.value)&&this.setState({showHelperErrorMessages:!1,hexCode:(null===(t=this.props.value)||void 0===t?void 0:t.slice(1))||""});this.checkSettings()}get renderMode(){return this.props.children?"customPopover":this.props.colorMixerSettings?"defaultPopover":"simple"}get isSimple(){return"simple"===this.renderMode}get isDefaultPopover(){return"defaultPopover"===this.renderMode}get isCustomPopover(){return"customPopover"===this.renderMode}get mixedColorWithStrippedAlpha(){const e=this.state.mixedColor;return 8===e.length&&"FF"===e.slice(-2)?e.slice(0,-2):e}getMinContrast(e){return{min:3,mid:4.5,max:7}[e]}renderMessages(){var e;const o=this.state,p=o.hexCode,t=o.showHelperErrorMessages,n=ec(p),r=this.props,c=r.checkContrast,s=r.renderMessages,l=r.renderInvalidColorMessage,i=r.renderIsRequiredMessage,a=r.isRequired,M=n?Jr((null===(e=this.props.checkContrast)||void 0===e?void 0:e.contrastAgainst)||"#fff",p,2):void 0,b=null!=c&&c.contrastStrength?c.contrastStrength:"mid",z=this.getMinContrast(b);let d=[],O=[],h=[],A=[];if(c&&M){const e=c.renderContrastSuccessMessage,o=c.renderContrastErrorMessage;M=e?Y("div",{css:null==p?void 0:p.errorIcons},o.isStrict?yx||(yx=Y(rg,null)):Lx||(Lx=Y(Rg,null))):Y("div",{css:null==p?void 0:p.successIcon},Nx||(Nx=Y(am,null)))}return null}handleOnChange(e,o){const p=this.props.onChange;o.length>(this.props.withAlpha?8:6)||void 0!==o.split("").find((e=>!wx.includes(e)))||("function"==typeof p?p(`#${o}`):this.setState({showHelperErrorMessages:!1,hexCode:o}))}handleOnPaste(e){const o=e.clipboardData.getData("Text");let p=o;if(o[0]&&"#"===o[0]&&(p=o.slice(1)),this.props.withAlpha&&p.length>8||!this.props.withAlpha&&p.length>6)return e.preventDefault();const t=`${this.state.hexCode}${p}`;ec(t)&&("function"==typeof this.props.onChange?this.props.onChange(`#${t}`):this.setState({showHelperErrorMessages:!1,hexCode:t})),e.preventDefault()}handleOnBlur(){this.setState({showHelperErrorMessages:!0})}renderLabel(){const e=this.props,o=e.label,p=e.tooltip,t=e.styles;return p?Y("div",null,Y("span",{css:null==t?void 0:t.label},o),Y("span",null,Y(We,{renderTip:p},Bx||(Bx=Y(eR,{tabIndex:-1}))))):o}render(){var o,p,t;const n=this.props,r=n.disabled,c=n.isRequired,l=n.placeholderText,i=n.width,a=n.id;return Y("div",Object.assign({},pe(this.props,e.allowedProps),{css:null===(o=this.props.styles)||void 0===o?void 0:o.colorPicker,ref:this.handleRef}),Y(s,{id:a,isRequired:c,disabled:r,renderLabel:()=>this.renderLabel(),display:"inline-block",width:i,placeholder:l,themeOverride:{padding:""},renderAfterInput:this.renderAfterInput(),renderBeforeInput:this.renderBeforeInput(),inputContainerRef:this.handleInputContainerRef,value:this.state.hexCode,onChange:(e,o)=>this.handleOnChange(e,o),onPaste:e=>this.handleOnPaste(e),onBlur:()=>this.handleOnBlur(),messages:this.renderMessages()}),!this.isSimple&&Y("div",{css:null===(p=this.props.styles)||void 0===p?void 0:p.colorMixerButtonContainer,style:{paddingTop:this.state.labelHeight}},Y("div",{css:null===(t=this.props.styles)||void 0===t?void 0:t.colorMixerButtonWrapper},this.renderPopover())))}},gx.displayName="ColorPicker",gx.propTypes=Rx,gx.allowedProps=["id","checkContrast","colorMixerSettings","children","disabled","elementRef","isRequired","label","onChange","placeholderText","popoverScreenReaderLabel","popoverButtonScreenReaderLabel","popoverMaxHeight","renderInvalidColorMessage","renderIsRequiredMessage","renderMessages","tooltip","value","width","withAlpha"],gx.componentId="ColorPicker",gx.defaultProps={disabled:!1,withAlpha:!1,width:"22.5rem",popoverMaxHeight:"100vh"},vx=gx))||vx)||vx);const Tx={renderLabel:E.oneOfType([E.node,E.func]).isRequired,value:Se(E.string),size:E.oneOf(["small","medium","large"]),placeholder:E.string,onChange:E.func,onBlur:E.func,interaction:E.oneOf(["enabled","disabled","readonly"]),isRequired:E.bool,isInline:E.bool,assistiveText:E.string,layout:E.oneOf(["stacked","inline"]),width:E.string,display:E.oneOf(["inline-block","block"]),inputRef:E.func,messages:E.arrayOf(t.message),placement:Re.placement,isShowingCalendar:E.bool,onRequestValidateDate:E.func,onRequestShowCalendar:E.func,onRequestHideCalendar:E.func,onRequestSelectNextDay:E.func,onRequestSelectPrevDay:E.func,onRequestRenderNextMonth:E.func,onRequestRenderPrevMonth:E.func,renderNavigationLabel:E.oneOfType([E.func,E.node]),renderWeekdayLabels:E.arrayOf(E.oneOfType([E.func,E.node])),renderNextMonthButton:E.oneOfType([E.func,E.node]),renderPrevMonthButton:E.oneOfType([E.func,E.node]),children:Le.oneOf([eS.Day]),disabledDates:E.oneOfType([E.array,E.func]),currentDate:E.string,disabledDateErrorMessage:E.oneOfType([E.func,E.string]),invalidDateErrorMessage:E.oneOfType([E.func,E.string]),locale:E.string,timezone:E.string,withYearPicker:E.object},Sx=["renderLabel","value","placeholder","onBlur","isRequired","size","isInline","layout","width","onRequestValidateDate","onRequestShowCalendar","onRequestHideCalendar","onRequestSelectNextDay","onRequestSelectPrevDay","onRequestRenderNextMonth","onRequestRenderPrevMonth"],xx=["ref"];var Ix,Ex,Px;let Xx=_(((e,o)=>({dateInput:{label:"dateInput",display:o.display},assistiveText:{label:"dateInput__assistiveText",display:"none"}})),null)(Ix=U()((Ex=class extends u.Component{constructor(...e){super(...e),this.state={hasInputRef:!1,isShowingCalendar:!1,validatedDate:void 0,messages:[]},this._input=void 0,this.ref=null,this.formatDateId=e=>e.replace(/\s/g,""),this.handleInputRef=e=>{var o,p;this.state.hasInputRef||this.setState({hasInputRef:!0}),this._input=e,null===(o=(p=this.props).inputRef)||void 0===o||o.call(p,e)},this.handleInputChange=(e,o)=>{var p,t;null===(p=(t=this.props).onChange)||void 0===p||p.call(t,e,{value:o}),this.handleShowCalendar(e)},this.handleShowCalendar=e=>{if(this.props.children){if("enabled"===this.interaction&&this.props.children){var o,p;null===(o=(p=this.props).onRequestShowCalendar)||void 0===o||o.call(p,e)}}else this.setState({isShowingCalendar:!0})},this.validateDate=e=>{const o=this.props.invalidDateErrorMessage,p=this.props.disabledDateErrorMessage||o,t=[],n=this.props.disabledDates;return("function"==typeof n&&n(e)||Array.isArray(n)&&n.find((o=>Hr.parse(o,this.locale(),this.timezone()).isSame(Hr.parse(e,this.locale(),this.timezone()),"day"))))&&t.push("function"==typeof p?p(e):{type:"error",text:p}),Hr.parse(e,this.locale(),this.timezone(),[Hr.momentISOFormat,"llll","LLLL","lll","LLL","ll","LL","l","L"],!0).isValid()||t.push("function"==typeof o?o(e):{type:"error",text:o}),t},this.handleHideCalendar=(e,o)=>{if(this.props.children){var p,t,n,r;null===(p=(t=this.props).onRequestValidateDate)||void 0===p||p.call(t,e),null===(n=(r=this.props).onRequestHideCalendar)||void 0===n||n.call(r,e)}else{const p=o||this.props.value,t=[];if(this.props.onRequestValidateDate){var c,s;const o=null===(c=(s=this.props).onRequestValidateDate)||void 0===c?void 0:c.call(s,e,p||"",this.validateDate(p||""));t.push(...o||[])}else p&&t.push(...this.validateDate(p));this.setState({messages:t,isShowingCalendar:!1})}},this.handleHighlightOption=(e,{direction:o})=>{const p=this.props,t=p.onRequestSelectNextDay,n=p.onRequestSelectPrevDay,r=p.onChange,c=p.value,s=p.currentDate,l=c&&Hr.parse(c,this.locale(),this.timezone()).isValid();-1===o&&(n?null==n||n(e):(r(e,{value:Hr.parse(l?c:s,this.locale(),this.timezone()).subtract(1,"day").format("MMMM D, YYYY")}),this.setState({messages:[]}))),1===o&&(t?null==t||t(e):(r(e,{value:Hr.parse(l?c:s,this.locale(),this.timezone()).add(1,"day").format("MMMM D, YYYY")}),this.setState({messages:[]})))},this.shouldShowCalendar=()=>this.props.children?this.props.isShowingCalendar:this.state.isShowingCalendar}locale(){return this.props.locale?this.props.locale:this.context&&this.context.locale?this.context.locale:Dr.browserLocale()}timezone(){return this.props.timezone?this.props.timezone:this.context&&this.context.timezone?this.context.timezone:Hr.browserTimeZone()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}get selectedDateId(){let e;return u.Children.toArray(this.props.children).forEach((o=>{const p=o.props,t=p.date;p.isSelected&&(e=this.formatDateId(t))})),e}get interaction(){return fe({props:this.props})}renderMonthNavigationButton(e="prev"){const o=this.props,p=o.renderPrevMonthButton,t=o.renderNextMonthButton,n="prev"===e?p:t;return n&&ye($(n),{tabIndex:-1})}renderDays(e){const o=this.props.children;if(o)return u.Children.map(o,(o=>{const p=o.props,t=p.date,n=p.isOutsideMonth,r={tabIndex:-1,id:this.formatDateId(t)},c=e(r),s=n?{...r,onClick:c.onClick,role:"presentation"}:c;return ye(o,s)}))}renderCalendar({getListProps:e,getOptionProps:o}){const p=this.props,t=p.onRequestRenderNextMonth,n=p.onRequestRenderPrevMonth,r=p.renderNavigationLabel,c=p.renderWeekdayLabels,s=p.value,l=p.onChange,i=p.disabledDates,a=p.currentDate,M=!!s&&Hr.parse(s,this.locale(),this.timezone()).isValid(),b=this.props.children?{}:{disabledDates:i,currentDate:a,selectedDate:M?s:void 0,visibleMonth:M?s:void 0,onDateSelected:(e,o,p)=>{null==l||l(p,{value:`${o.format("MMMM")} ${o.format("D")}, ${o.format("YYYY")}`}),this.handleHideCalendar(p,e)}};return Y(eS,Object.assign({},e({onRequestRenderNextMonth:t,onRequestRenderPrevMonth:n,renderNavigationLabel:r,renderWeekdayLabels:c,renderNextMonthButton:this.renderMonthNavigationButton("next"),renderPrevMonthButton:this.renderMonthNavigationButton("prev")}),b),this.renderDays(o))}renderInput({getInputProps:e,getTriggerProps:o}){const p=this.props,t=p.renderLabel,n=p.value,r=p.placeholder,c=p.onBlur,l=p.isRequired,i=p.size,a=p.isInline,M=p.layout,b=p.width;p.onRequestValidateDate,p.onRequestShowCalendar,p.onRequestHideCalendar,p.onRequestSelectNextDay,p.onRequestSelectPrevDay,p.onRequestRenderNextMonth,p.onRequestRenderPrevMonth;const z=P(p,Sx),d=this.interaction,O=o(),h=O.ref,A=P(O,xx),u=this.props.messages||this.state.messages;return Y(s,Object.assign({},A,Z(z),e({renderLabel:$(t),value:n,placeholder:r,size:i,layout:M,width:b,messages:u,onChange:this.handleInputChange,onBlur:Ce(c,this.handleHideCalendar),inputRef:Ce(h,this.handleInputRef),interaction:d,isRequired:l,display:a?"inline-block":"block",renderAfterInput:Px||(Px=Y(cm,{inline:!1}))}),{onKeyDown:e=>{var o;this.props.children||"Enter"===e.key&&this.handleHideCalendar(e),null===(o=A.onKeyDown)||void 0===o||o.call(A,e)}}))}render(){const e=this.props,o=e.placement,p=e.assistiveText,t=e.styles,n=this.shouldShowCalendar();return Y(Ve,{isShowingOptions:n,onRequestShowOptions:this.handleShowCalendar,onRequestHideOptions:this.handleHideCalendar,onRequestHighlightOption:this.handleHighlightOption,onRequestSelectOption:e=>this.handleHideCalendar(e),selectedOptionId:this.selectedDateId,highlightedOptionId:this.selectedDateId},(({getRootProps:e,getInputProps:r,getTriggerProps:c,getListProps:s,getOptionProps:l,getDescriptionProps:i})=>Y("span",Object.assign({},e({css:null==t?void 0:t.dateInput}),{ref:e=>this.ref=e}),this.renderInput({getInputProps:r,getTriggerProps:c}),Y("span",Object.assign({},i(),{css:null==t?void 0:t.assistiveText}),p),Y(He,{placement:o,isShowingContent:n,positionTarget:this._input,shouldReturnFocus:!1,shouldFocusContentOnTriggerBlur:!0},this.renderCalendar({getListProps:s,getOptionProps:l})))))}},Ex.displayName="DateInput",Ex.componentId="DateInput",Ex.Day=eS.Day,Ex.propTypes=Tx,Ex.allowedProps=["renderLabel","value","size","placeholder","onChange","onBlur","interaction","isRequired","isInline","assistiveText","layout","width","display","inputRef","messages","placement","isShowingCalendar","onRequestValidateDate","onRequestShowCalendar","onRequestHideCalendar","onRequestSelectNextDay","onRequestSelectPrevDay","onRequestRenderNextMonth","onRequestRenderPrevMonth","renderNavigationLabel","renderWeekdayLabels","renderNextMonthButton","renderPrevMonthButton","children","disabledDates","currentDate","disabledDateErrorMessage","invalidDateErrorMessage","locale","timezone"],Ex.defaultProps={value:"",size:"medium",onBlur:()=>{},isRequired:!1,isInline:!1,layout:"stacked",display:"inline-block",placement:"bottom center",isShowingCalendar:!1},Ix=Ex))||Ix)||Ix;const Hx={renderLabel:E.oneOfType([E.node,E.func]).isRequired,screenReaderLabels:E.object.isRequired,value:Se(E.string),placeholder:E.string,onChange:E.func,onBlur:E.func,interaction:E.oneOf(["enabled","disabled","readonly"]),isRequired:E.bool,isInline:E.bool,width:E.string,messages:E.arrayOf(t.message),invalidDateErrorMessage:E.oneOfType([E.func,E.string]),locale:E.string,timezone:E.string,withYearPicker:E.object,dateFormat:E.oneOfType([E.string,E.object]),onRequestValidateDate:E.func};var Zx,Vx,kx;function Dx(e="",o,p){const t=e.split(/[,.\s/.-]+/).filter(Boolean),n=new Intl.DateTimeFormat(o).formatToParts(new Date);let r,c,s,l=0;if(n.forEach((e=>{"month"===e.type?(c=parseInt(t[l],10),l++):"day"===e.type?(r=parseInt(t[l],10),l++):"year"===e.type&&(s=parseInt(t[l],10),l++)})),!s||!c||!r||s<1e3||s>9999)return null;const i=new Date(Date.UTC(s,c-1,r));if(i.getMonth()!==c-1||i.getDate()!==r)return null;const a=new Intl.DateTimeFormat("en-US",{timeZone:p,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(i).reduce(((e,o)=>"literal"===o.type?e:{...e,[o.type]:o.value}),{}),M=`${a.year}-${a.month}-${a.day}T${a.hour}:${a.minute}:${a.second}`,b=new Date(M+"Z").getTime()-i.getTime();return new Date(i.getTime()-b)}const _x=({renderLabel:e,screenReaderLabels:o,isRequired:p=!1,interaction:t="enabled",isInline:n=!1,value:r,messages:c,width:l,onChange:i,onBlur:a,withYearPicker:M,invalidDateErrorMessage:b,locale:z,timezone:d,placeholder:O,dateFormat:h,onRequestValidateDate:A,...f})=>{const m=u.useContext(bo),q=()=>z||(m.locale?m.locale:Dr.browserLocale()),R=()=>d||(m.timezone?m.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone),W=u.useState(c||[]),v=se(W,2),g=v[0],y=v[1],L=u.useState(!1),N=se(L,2),B=N[0],w=N[1];u.useEffect((()=>{g.length||b||y(c||[])}),[c]),u.useEffect((()=>{const e=C(r);!se(e,2)[1]&&r||y(c||[])}),[r]);const C=(e="")=>{let o=null;return h?"string"==typeof h?o=Dx(e,h,R()):h.parser&&(o=h.parser(e)):o=Dx(e,q(),R()),o?[T(o),o.toISOString()]:["",""]},T=e=>"string"!=typeof h&&null!=h&&h.formatter?h.formatter(e):e.toLocaleDateString("string"==typeof h?h:q(),{timeZone:R(),calendar:"gregory",numberingSystem:"latn"}),S=C(r)[1];return Y(s,Object.assign({},Z(f),{renderLabel:e,onChange:(e,o)=>{const p=C(o),t=se(p,2)[1];null==i||i(e,o,t)},onBlur:e=>{const o=C(r),p=se(o,2),t=p[0],n=p[1];t?t!==r&&(null==i||i(e,t,n)):r&&b&&y([{type:"error",text:b}]),null==A||A(e,r||"",n),null==a||a(e,r||"",n)},isRequired:p,value:r,placeholder:null!=O?O:(()=>{const e=new Date("2024-09-01"),o=T(e),p=e=>new RegExp(`(?"Y".repeat(e.length))).replace(p(n),(e=>"M".repeat(e.length))).replace(p(r),(e=>"D".repeat(e.length)))})(),width:l,display:n?"inline-block":"block",messages:g,interaction:t,renderAfterInput:Y(He,{renderTrigger:Y(ao,{withBackground:!1,withBorder:!1,screenReaderLabel:o.calendarIcon,shape:"circle",interaction:t},Zx||(Zx=Y(cm,null))),isShowingContent:B,onShowContent:()=>w(!0),onHideContent:()=>w(!1),on:"click",shouldContainFocus:!0,shouldReturnFocus:!0,shouldCloseOnDocumentClick:!0},Y(eS,{withYearPicker:M,onDateSelected:(e,o,p)=>{w(!1);const t=T(new Date(e));null==i||i(p,t,e),null==A||A(p,t,e)},selectedDate:S,visibleMonth:S,locale:q(),timezone:R(),role:"listbox",renderNextMonthButton:Y(ao,{size:"small",withBackground:!1,withBorder:!1,renderIcon:Vx||(Vx=Y(we,{color:"primary"})),screenReaderLabel:o.nextMonthButton}),renderPrevMonthButton:Y(ao,{size:"small",withBackground:!1,withBorder:!1,renderIcon:kx||(kx=Y(Be,{color:"primary"})),screenReaderLabel:o.prevMonthButton})}))}))};_x.propTypes=Hx;const jx={renderLabel:E.oneOfType([E.node,E.func]).isRequired,defaultToFirstOption:E.bool,value:Se(Vr.iso8601,"onChange"),defaultValue:Vr.iso8601,id:E.string,format:E.string,step:E.oneOf([5,10,15,20,30,60]),interaction:E.oneOf(["enabled","disabled","readonly"]),placeholder:E.string,isRequired:E.bool,isInline:E.bool,width:E.string,optionsMaxWidth:E.string,visibleOptionsCount:E.number,messages:E.arrayOf(t.message),placement:Re.placement,constrain:Re.constrain,mountNode:Re.mountNode,onChange:E.func,onFocus:E.func,onBlur:E.func,onShowOptions:E.func,onHideOptions:E.func,inputRef:E.func,listRef:E.func,renderEmptyOption:E.oneOfType([E.node,E.func]),renderBeforeInput:E.oneOfType([E.node,E.func]),renderAfterInput:E.oneOfType([E.node,E.func]),locale:E.string,timezone:E.string,allowNonStepInput:E.bool,onInputChange:E.func},Fx=["value","defaultValue","placeholder","renderLabel","inputRef","id","listRef","renderBeforeInput","renderAfterInput","isRequired","isInline","width","format","step","optionsMaxWidth","visibleOptionsCount","messages","placement","constrain","onFocus","onShowOptions","onHideOptions","onInputChange","onKeyDown","mountNode"];var Ux,Yx;let Gx=K()(Ux=U()((Yx=class extends u.Component{constructor(e){super(e),this.ref=null,this._emptyOptionId=this.props.deterministicId("Select-EmptyOption"),this.getOption=(e,o,p=this.state.options)=>p.find((p=>p[e]===o)),this.handleRef=e=>{this.ref=e},this.handleBlur=e=>{var o,p;null===(o=(p=this.props).onBlur)||void 0===o||o.call(p,e)},this.handleInputChange=e=>{var o,p;const t=e.target.value,n=this.filterOptions(t);var r,c;(1==(null==n?void 0:n.length)?(this.isControlled||this.setState({selectedOptionId:n[0].id}),this.setState({fireChangeOnBlur:n[0]})):this.setState({selectedOptionId:this.isControlled?this.state.selectedOptionId:void 0,fireChangeOnBlur:void 0}),this.setState({inputValue:t,filteredOptions:n,highlightedOptionId:n.length>0?n[0].id:void 0,isShowingOptions:!0}),this.state.isShowingOptions)||(null===(r=(c=this.props).onShowOptions)||void 0===r||r.call(c,e));const s=this.parseInputText(t);null===(o=(p=this.props).onInputChange)||void 0===o||o.call(p,e,t,s.isValid()?s.toISOString():void 0)},this.onKeyDown=e=>{var o,p;const t=this.parseInputText(this.state.inputValue);"Enter"===e.key&&this.props.allowNonStepInput&&t.isValid()&&this.setState((()=>({isShowingOptions:!1,highlightedOptionId:void 0}))),null===(o=(p=this.props).onKeyDown)||void 0===o||o.call(p,e)},this.handleShowOptions=e=>{var o,p;this.setState({isShowingOptions:!0,highlightedOptionId:this.state.selectedOptionId}),null===(o=(p=this.props).onShowOptions)||void 0===o||o.call(p,e)},this.handleBlurOrEsc=e=>{var o,p;const t=this.state,n=t.selectedOptionId,r=t.inputValue;let c="";if(this.props.defaultValue){const e=Hr.parse(this.props.defaultValue,this.locale(),this.timezone());c=this.props.format?e.format(this.props.format):e.toISOString()}const s=this.getOption("id",n);let l=c;var i,a;(s?l=s.label:""===r&&(l=""),this.setState((()=>({isShowingOptions:!1,highlightedOptionId:void 0,inputValue:l,filteredOptions:this.filterOptions("")}))),this.state.fireChangeOnBlur&&"Escape"!==e.key)&&(this.setState((()=>({fireChangeOnBlur:void 0}))),null===(i=(a=this.props).onChange)||void 0===i||i.call(a,e,{value:this.state.fireChangeOnBlur.value.toISOString(),inputText:this.state.fireChangeOnBlur.label}));null===(o=(p=this.props).onHideOptions)||void 0===o||o.call(p,e)},this.handleSelectOption=(e,o)=>{var p,t;if(o.id===this._emptyOptionId)return void this.setState({isShowingOptions:!1});const n=this.getOption("id",o.id);let r;const c=this.state.selectedOptionId;if(this.isControlled){const e=this.getOption("id",this.state.selectedOptionId);r=e?e.label:"",this.setState({isShowingOptions:!1})}else r=n.label,this.setState({isShowingOptions:!1,selectedOptionId:o.id,inputValue:r});var s,l;o.id!==c&&(null===(s=(l=this.props).onChange)||void 0===s||s.call(l,e,{value:n.value.toISOString(),inputText:r}));null===(p=(t=this.props).onHideOptions)||void 0===p||p.call(t,e)},this.handleHighlightOption=(e,o)=>{if(o.id===this._emptyOptionId)return;const p=this.getOption("id",o.id).label,t=e.type;this.setState((e=>({highlightedOptionId:o.id,inputValue:"keydown"===t?p:e.inputValue})))},this.parseInputText=e=>{const o=Hr.parse(e,this.locale(),this.timezone(),[this.props.format],!0),p=this.getBaseDate();return o.year(p.year()),o.month(p.month()),o.date(p.date()),o},this.state=this.getInitialState()}componentDidMount(){this.setState(this.getInitialState())}focus(){var e;null===(e=this.ref)||void 0===e||e.focus()}get _select(){return this.ref}get isControlled(){return void 0!==this.props.value}get interaction(){return fe({props:this.props})}get focused(){return this.ref&&this.ref.focused}get id(){return this.ref&&this.ref.id}locale(){return this.props.locale?this.props.locale:this.context&&this.context.locale?this.context.locale:Dr.browserLocale()}timezone(){return this.props.timezone?this.props.timezone:this.context&&this.context.timezone?this.context.timezone:Hr.browserTimeZone()}componentDidUpdate(e){if(this.props.step===e.step&&this.props.format===e.format&&this.props.locale===e.locale&&this.props.timezone===e.timezone&&this.props.allowNonStepInput===e.allowNonStepInput||this.setState(this.getInitialState()),this.props.value!==e.value){let o;this.props.value&&(o=Hr.parse(this.props.value,this.locale(),this.timezone()));const p=this.getInitialState();let t;this.setState(p),this.isControlled?o&&(t=this.getOption("id",this.getFormattedId(o),p.options)):e.value&&(t=this.getOption("id",this.getFormattedId(Hr.parse(e.value,this.locale(),this.timezone()))));const n=this.props.value?this.props.value:"",r=Hr.parse(n,this.locale(),this.timezone());let c="";r.isValid()&&(c=this.props.format?r.format(this.props.format):r.toISOString()),this.setState({inputValue:t?t.label:c,selectedOptionId:t?t.id:void 0})}}getFormattedId(e){return e.toISOString().replace(/\s/g,"")}getInitialState(){const e=this.generateOptions(),o=this.getInitialOption(e);return{inputValue:o?o.label:"",options:e,filteredOptions:e.length>288?e.filter((e=>e.value.minute()%this.props.step==0)):e,isShowingOptions:!1,highlightedOptionId:o?o.id:void 0,selectedOptionId:o?o.id:void 0}}getInitialOption(e){const o=this.props,p=o.value,t=o.defaultValue,n=o.defaultToFirstOption,r=o.format,c=p||t;if("string"==typeof c){const o=Hr.parse(c,this.locale(),this.timezone()),p=this.getOption("value",o,e);return p||{id:this.getFormattedId(o),label:r?o.format(r):o.toISOString(),value:o}}if(n)return e[0]}getBaseDate(){let e;const o=this.props.value||this.props.defaultValue;return e=o?Hr.parse(o,this.locale(),this.timezone()):Hr.now(this.locale(),this.timezone()),e.set({second:0,millisecond:0}).clone()}generateOptions(){const e=this.getBaseDate(),o=[],p=this.props.step?this.props.step:30,t=this.props.allowNonStepInput?60:60/p,n=this.props.allowNonStepInput?1:p;for(let r=0;r<24;r++)for(let p=0;p5){const o=this.parseInputText(e);o.isValid()&&(o.set({second:0}),p=o.format(this.props.format))}var t;return this.props.allowNonStepInput&&p.length<3?null===(t=this.state)||void 0===t?void 0:t.options.filter((e=>e.label.toLowerCase().startsWith(p.toLowerCase())&&e.value.minute()%this.props.step==0)):null===(o=this.state)||void 0===o?void 0:o.options.filter((e=>e.label.toLowerCase().startsWith(p.toLowerCase())))}renderOptions(){const e=this.state,o=e.filteredOptions,p=e.highlightedOptionId,t=e.selectedOptionId;return o.length<1?this.renderEmptyOption():o.map((e=>{const o=e.id,n=e.label;return f.createElement(M.Option,{id:o,key:o,isHighlighted:o===p,isSelected:o===t},n)}))}renderEmptyOption(){return f.createElement(M.Option,{id:this._emptyOptionId,isHighlighted:!1,isSelected:!1},$(this.props.renderEmptyOption))}render(){const e=this.props;e.value,e.defaultValue;const o=e.placeholder,p=e.renderLabel,t=e.inputRef,n=e.id,r=e.listRef,c=e.renderBeforeInput,s=e.renderAfterInput,l=e.isRequired,i=e.isInline,a=e.width;e.format,e.step;const b=e.optionsMaxWidth,z=e.visibleOptionsCount,d=e.messages,O=e.placement,h=e.constrain,A=e.onFocus;e.onShowOptions,e.onHideOptions,e.onInputChange,e.onKeyDown;const u=e.mountNode,m=P(e,Fx),q=this.state,R=q.inputValue,W=q.isShowingOptions;return f.createElement(M,Object.assign({mountNode:u,renderLabel:p,inputValue:R,interaction:this.interaction,placeholder:o,id:n,onFocus:A,onBlur:this.handleBlur,ref:this.handleRef,inputRef:t,listRef:r,isRequired:l,isInline:i,width:a,optionsMaxWidth:b,visibleOptionsCount:z,messages:d,placement:O,constrain:h,renderBeforeInput:c,renderAfterInput:s,isShowingOptions:W,onRequestShowOptions:this.handleShowOptions,onRequestHideOptions:this.handleBlurOrEsc,onRequestHighlightOption:this.handleHighlightOption,onRequestSelectOption:this.handleSelectOption,onInputChange:this.handleInputChange,onKeyDown:this.onKeyDown},Z(m)),W&&this.renderOptions())}},Yx.displayName="TimeSelect",Yx.componentId="TimeSelect",Yx.allowedProps=["renderLabel","defaultToFirstOption","value","defaultValue","id","format","step","interaction","placeholder","isRequired","isInline","width","optionsMaxWidth","mountNode","visibleOptionsCount","messages","placement","constrain","onChange","onFocus","onBlur","onShowOptions","onHideOptions","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","locale","timezone","allowNonStepInput","onInputChange"],Yx.propTypes=jx,Yx.defaultProps={defaultToFirstOption:!1,format:"LT",step:30,isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",renderEmptyOption:"---",allowNonStepInput:!1},Yx.contextType=bo,Ux=Yx))||Ux)||Ux;const $x={description:E.node.isRequired,dateRenderLabel:E.oneOfType([E.func,E.node]).isRequired,prevMonthLabel:E.string.isRequired,nextMonthLabel:E.string.isRequired,datePlaceholder:E.string,timePlaceholder:E.string,dateFormat:E.string,interaction:E.oneOf(["enabled","disabled","readonly"]),timeRenderLabel:E.oneOfType([E.func,E.node]).isRequired,timeStep:E.oneOf([5,10,15,20,30,60]),timeFormat:E.string,locale:E.string,timezone:E.string,invalidDateTimeMessage:E.oneOfType([E.string,E.func]).isRequired,showMessages:E.bool,messages:E.arrayOf(t.message),messageFormat:E.string,layout:E.oneOf(["stacked","columns","inline"]),rowSpacing:E.oneOf(["none","small","medium","large"]),colSpacing:E.oneOf(["none","small","medium","large"]),value:Se(Vr.iso8601,"onChange"),defaultValue:Vr.iso8601,renderWeekdayLabels:E.arrayOf(E.oneOfType([E.func,E.node])),isRequired:E.bool,onChange:E.func,dateInputRef:E.func,timeInputRef:E.func,onBlur:E.func,disabledDates:E.oneOfType([E.func,E.arrayOf(E.string)]),disabledDateTimeMessage:E.oneOfType([E.string,E.func]),allowNonStepInput:E.bool,reset:E.func,initialTimeForNewDate:function(e,o,p,t){const n=e[o];if(void 0===n||""===n)return null;return"string"!=typeof n||n.match(/^\d{2}:\d{2}$/)?null:new Error(`Invalid ${t} \`${o}\` \`${n}\` supplied to \`${p}\`, expected a HH:MM formatted string.`)}};var Kx,Qx,Jx,eI;let oI=U()((Qx=class extends u.Component{constructor(e){super(e),this.ref=null,this.handleRef=e=>{this.ref=e},this.reset=()=>this.setState(this.recalculateState()),this.handleDateTextChange=(e,o)=>{const p=this.tryParseDate(o.value);this.setState({dateInputText:o.value,dateInputTextChanged:!0,calendarSelectedDate:p||void 0,renderedDate:p?p.clone():Hr.now(this.locale(),this.timezone())})},this.handleDayClick=(e,{date:o})=>{const p=Hr.parse(o,this.locale(),this.timezone());this.updateStateBasedOnDateInput(p,e)},this.handleHideCalendar=e=>{e.persist(),window.setTimeout((()=>{if("Enter"===e.key)this.updateStateBasedOnDateInput(this.state.calendarSelectedDate,e);else{const o=this.tryParseDate(this.state.dateInputText);this.updateStateBasedOnDateInput(o,e)}this.setState({isShowingCalendar:!1,dateInputTextChanged:!1})}),0)},this.updateStateBasedOnTimeSelect=(e,o)=>{const p=this.state.iso?o.value:this.state.dateInputText,t=this.recalculateState(p,!0,!1);this.changeStateIfNeeded(t,e),this.setState({timeSelectValue:o.value})},this.changeStateIfNeeded=(e,o)=>{const p=e.dateInputText;if(this.props.isRequired&&!e.iso||p&&p.length>0&&!e.iso){const o="function"==typeof this.props.invalidDateTimeMessage?this.props.invalidDateTimeMessage(p||""):this.props.invalidDateTimeMessage;e.message={text:o,type:"error"}}var t,n,r;this.areDifferentDates(this.state.iso,e.iso)&&(null===(t=(n=this.props).onChange)||void 0===t||t.call(n,o,null===(r=e.iso)||void 0===r?void 0:r.toISOString()));this.setState(e)},this.areDifferentDates=(e,o)=>!(!e&&!o)&&(!e||!o||!e.isSame(o)),this.handleBlur=e=>{"function"==typeof this.props.onBlur&&window.setTimeout((()=>{var o,p;null===(o=(p=this.props).onBlur)||void 0===o||o.call(p,e)}),0)},this.handleShowCalendar=e=>{this.setState({isShowingCalendar:!0})},this.handleSelectNextDay=e=>{let o;o=this.state.calendarSelectedDate?this.state.calendarSelectedDate.clone():this.state.iso?this.state.iso.clone():Hr.now(this.locale(),this.timezone()),o.add({days:1}),this.setState({calendarSelectedDate:o,renderedDate:o.clone()})},this.handleSelectPrevDay=e=>{let o;o=this.state.calendarSelectedDate?this.state.calendarSelectedDate.clone():this.state.iso?this.state.iso.clone():Hr.now(this.locale(),this.timezone()),o.subtract({days:1}),this.setState({calendarSelectedDate:o,renderedDate:o.clone()})},this.handleRenderNextMonth=e=>{this.setState({renderedDate:this.state.renderedDate.clone().add({months:1})})},this.handleRenderPrevMonth=e=>{this.setState({renderedDate:this.state.renderedDate.clone().subtract({months:1})})},this.state=this.recalculateState(e.value||e.defaultValue)}componentDidMount(){var e,o;const p=this.recalculateState(this.props.value||this.props.defaultValue);this.setState(p),null===(e=(o=this.props).reset)||void 0===e||e.call(o,this.reset)}componentDidUpdate(e){(e.value!==this.props.value||e.defaultValue!==this.props.defaultValue||e.locale!==this.props.locale||e.timezone!==this.props.timezone||e.dateFormat!==this.props.dateFormat||e.messageFormat!==this.props.messageFormat||e.invalidDateTimeMessage!==this.props.invalidDateTimeMessage)&&this.setState((e=>({...this.recalculateState(this.props.value||this.props.defaultValue)})))}recalculateState(e,o=!1,p=!1){let t;if(e){const r=Hr.parse(e,this.locale(),this.timezone());if(r.isValid()){var n;if(p&&this.state.timeSelectValue){const e=Hr.parse(this.state.timeSelectValue,this.locale(),this.timezone());r.hour(e.hour()).minute(e.minute())}if(o&&this.state.iso&&r.date(this.state.iso.date()).month(this.state.iso.month()).year(this.state.iso.year()),this.props.initialTimeForNewDate&&(null===(n=this.state)||void 0===n||!n.timeSelectValue)){const e=Number(this.props.initialTimeForNewDate.slice(0,2)),o=Number(this.props.initialTimeForNewDate.slice(3,5));isNaN(e)||isNaN(o)?Q(!1,"[DateTimeInput] initialTimeForNewDate prop is not in the correct format. Please use HH:MM format."):e<0||e>23||o>59||o<0?Q(!1,"[DateTimeInput] 0 <= hour < 24 and 0 <= minute < 60 for initialTimeForNewDate prop."):r.hour(e).minute(o)}const e=r.toISOString();if(this.isDisabledDate(r)){let o="function"==typeof this.props.disabledDateTimeMessage?this.props.disabledDateTimeMessage(r.toISOString(!0)):this.props.disabledDateTimeMessage;return o||(o="function"==typeof this.props.invalidDateTimeMessage?this.props.invalidDateTimeMessage(r.toISOString(!0)):this.props.invalidDateTimeMessage),t=o?{text:o,type:"error"}:void 0,{iso:r.clone(),calendarSelectedDate:r.clone(),dateInputTextChanged:!1,dateInputText:r.format(this.dateFormat),message:t,timeSelectValue:e,renderedDate:r.clone()}}return{iso:r.clone(),calendarSelectedDate:r.clone(),dateInputTextChanged:!1,dateInputText:r.format(this.dateFormat),message:{type:"success",text:r.format(this.props.messageFormat)},timeSelectValue:e,renderedDate:r.clone()}}}const r=e?{}:{timeSelectValue:"",message:void 0};return{iso:void 0,calendarSelectedDate:void 0,dateInputText:e||"",renderedDate:Hr.now(this.locale(),this.timezone()),dateInputTextChanged:!1,...r}}locale(){return this.props.locale?this.props.locale:this.context&&this.context.locale?this.context.locale:Dr.browserLocale()}timezone(){return this.props.timezone?this.props.timezone:this.context&&this.context.timezone?this.context.timezone:Hr.browserTimeZone()}get dateFormat(){return this.props.dateFormat}isDisabledDate(e){const o=this.props.disabledDates;if(!o)return!1;if(Array.isArray(o)){for(const p of o)if(e.isSame(p,"day"))return!0;return!1}return o(e.toISOString())}tryParseDate(e){const o=Hr.parse(e,this.locale(),this.timezone());return o.isValid()?o:null}updateStateBasedOnDateInput(e,o){let p;if(!e||!this.state.timeSelectValue||this.state.dateInputText&&""!=this.state.dateInputText)p=e?this.recalculateState(null==e?void 0:e.toISOString(),!1,!0):this.recalculateState(this.state.dateInputText,!1,!0);else{const o=Hr.parse(this.state.timeSelectValue,this.locale(),this.timezone()),t=e.set({hour:o.hour(),minute:o.minute()});p=this.recalculateState(t.toISOString(),!1,!1)}this.changeStateIfNeeded(p,o)}renderDays(){const e=this.state.renderedDate,o=Hr.getFirstDayOfWeek(e.startOf("month")),p=[];for(let t=0;t{const p=o.toISOString();return f.createElement(Xx.Day,{key:p,date:p,isSelected:!!this.state.calendarSelectedDate&&o.isSame(this.state.calendarSelectedDate,"day"),isToday:o.isSame(Hr.now(this.locale(),this.timezone()),"day"),isOutsideMonth:!o.isSame(e,"month"),label:o.format("D MMMM YYYY"),onClick:this.handleDayClick,interaction:this.isDisabledDate(o)?"disabled":"enabled"},o.format("DD"))}))}get defaultWeekdays(){if(!this.state.isShowingCalendar)return[];const e=Hr.getLocalDayNamesOfTheWeek(this.locale(),"short"),o=Hr.getLocalDayNamesOfTheWeek(this.locale(),"long");return[f.createElement(Qr,{key:1,alt:o[0]},e[0]),f.createElement(Qr,{key:2,alt:o[1]},e[1]),f.createElement(Qr,{key:3,alt:o[2]},e[2]),f.createElement(Qr,{key:4,alt:o[3]},e[3]),f.createElement(Qr,{key:5,alt:o[4]},e[4]),f.createElement(Qr,{key:6,alt:o[5]},e[5]),f.createElement(Qr,{key:7,alt:o[6]},e[6])]}renderNextPrevMonthButton(e){if(this.state.isShowingCalendar)return f.createElement(ao,{size:"small",withBackground:!1,withBorder:!1,renderIcon:"prev"===e?Jx||(Jx=f.createElement(Be,{color:"primary"})):eI||(eI=f.createElement(we,{color:"primary"})),screenReaderLabel:"prev"===e?this.props.prevMonthLabel:this.props.nextMonthLabel})}render(){const e=this.props,o=e.description,p=e.datePlaceholder,t=e.timePlaceholder,n=e.dateRenderLabel,r=e.dateInputRef,s=e.timeRenderLabel,l=e.timeFormat,i=e.timeStep,a=e.timeInputRef,M=e.locale,b=e.timezone,z=e.showMessages,d=e.messages,O=e.layout,h=e.rowSpacing,A=e.colSpacing,u=e.isRequired,m=e.interaction,q=e.renderWeekdayLabels,R=e.allowNonStepInput;return f.createElement(c,{description:o,layout:O,rowSpacing:h,colSpacing:A,vAlign:"top",elementRef:this.handleRef,messages:[...z&&this.state.message?[this.state.message]:[],...d||[]]},f.createElement(Xx,{display:"block",value:this.state.dateInputText,onChange:this.handleDateTextChange,onBlur:this.handleBlur,inputRef:r,placeholder:p,renderLabel:n,renderWeekdayLabels:q||this.defaultWeekdays,onRequestShowCalendar:this.handleShowCalendar,onRequestHideCalendar:this.handleHideCalendar,isShowingCalendar:this.state.isShowingCalendar,renderNextMonthButton:this.renderNextPrevMonthButton("next"),renderPrevMonthButton:this.renderNextPrevMonthButton("prev"),onRequestSelectNextDay:this.handleSelectNextDay,onRequestSelectPrevDay:this.handleSelectPrevDay,onRequestRenderNextMonth:this.handleRenderNextMonth,onRequestRenderPrevMonth:this.handleRenderPrevMonth,isRequired:u,interaction:m,renderNavigationLabel:f.createElement("span",null,f.createElement("div",null,this.state.renderedDate.format("MMMM")),f.createElement("div",null,this.state.renderedDate.format("y")))},this.renderDays()),f.createElement(Gx,{value:this.state.timeSelectValue,onChange:this.updateStateBasedOnTimeSelect,placeholder:t,onBlur:this.handleBlur,renderLabel:s,locale:M,format:l,step:i,timezone:b,inputRef:a,interaction:m,allowNonStepInput:R}))}},Qx.displayName="DateTimeInput",Qx.DEFAULT_MESSAGE_FORMAT="LLLL",Qx.propTypes=$x,Qx.allowedProps=["description","dateRenderLabel","prevMonthLabel","nextMonthLabel","datePlaceholder","timePlaceholder","dateFormat","interaction","timeRenderLabel","timeStep","timeFormat","locale","timezone","invalidDateTimeMessage","showMessages","messages","messageFormat","layout","rowSpacing","colSpacing","value","defaultValue","renderWeekdayLabels","isRequired","onChange","dateInputRef","timeInputRef","onBlur","disabledDates","disabledDateTimeMessage","allowNonStepInput","reset"],Qx.defaultProps={layout:"inline",colSpacing:"medium",rowSpacing:"small",timeStep:30,showMessages:!0,messageFormat:Qx.DEFAULT_MESSAGE_FORMAT,isRequired:!1,dateFormat:"LL",allowNonStepInput:!1},Qx.contextType=bo,Kx=Qx))||Kx;const pI={label:E.string.isRequired,children:E.node,contentRef:E.func,onSizeChange:E.func,role:E.string};var tI,nI,rI;let cI=(tI=_(((e,o,p)=>{const t=p.shouldTransition?{transition:`margin ${e.duration}`}:{};return{drawerContent:{label:"drawerLayout__content",overflowY:e.overflowY,height:"100%",boxSizing:"content-box",...t}}}),(e=>{const o=e.transitions;return{duration:null==o?void 0:o.duration,overflowY:"auto"}})),tI(nI=U()((rI=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this._resizeListener=void 0,this._debounced=void 0,this.makeStyleProps=e=>({shouldTransition:e}),this.handleContentRef=e=>{this.ref=e,"function"==typeof this.props.contentRef&&this.props.contentRef(e)}}get _content(){return this.ref}componentDidMount(){var e,o;const p=ke(this.ref),t=p.width;"function"==typeof this.props.onSizeChange&&(this.props.onSizeChange({width:p.width,height:p.height}),this._debounced=De(this.props.onSizeChange,100,{leading:!1,trailing:!0})),this._resizeListener=new ResizeObserver((e=>{for(const p of e){const e={width:p.contentRect.width};var o;if(e.width!==t)null===(o=this._debounced)||void 0===o||o.call(this,e)}})),this._resizeListener.observe(this.ref),null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps(!1))}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps(!0))}componentWillUnmount(){var e,o;null===(e=this._resizeListener)||void 0===e||e.disconnect(),null===(o=this._debounced)||void 0===o||o.cancel()}render(){var o;const p=this.props,t=p.style,n=p.label,r=p.role;return Y("div",Object.assign({},pe(this.props,e.allowedProps),{role:r,style:t,ref:this.handleContentRef,"aria-label":n,css:null===(o=this.props.styles)||void 0===o?void 0:o.drawerContent}),this.props.children)}},rI.displayName="DrawerContent",rI.componentId="DrawerLayout.Content",rI.locatorAttribute="data-drawer-content",rI.propTypes=pI,rI.allowedProps=["label","children","contentRef","onSizeChange","role"],rI.defaultProps={role:"region"},nI=rI))||nI)||nI);const sI={label:E.string.isRequired,children:E.oneOfType([E.func,E.node]),render:E.func,placement:E.oneOf(["start","end"]),open:E.bool,onOpen:E.func,onClose:E.func,border:E.bool,shadow:E.bool,onTransition:E.func,onEnter:E.func,onEntering:E.func,onEntered:E.func,onExit:E.func,onExiting:E.func,onExited:E.func,contentRef:E.func,mountNode:E.oneOfType([_e,E.func]),defaultFocusElement:E.oneOfType([E.element,E.func]),liveRegion:E.oneOfType([_e,E.arrayOf(_e),E.func]),onDismiss:E.func,shouldContainFocus:E.bool,shouldReturnFocus:E.bool,shouldCloseOnDocumentClick:E.bool,shouldCloseOnEscape:E.bool,dir:E.oneOf(Object.values(le.DIRECTION))},lI=["label","children","render","placement","open","onOpen","onClose","border","shadow","onEnter","onEntering","onEntered","onExit","onExiting","onExited","contentRef","mountNode","defaultFocusElement","liveRegion","onDismiss","onTransition","shouldReturnFocus","shouldCloseOnEscape","shouldCloseOnDocumentClick","shouldContainFocus","styles"];var iI,aI,MI;let bI=(iI=_(((e,o,p)=>{const t=o.border,n=p.placement,r={start:{borderRightWidth:e.borderWidth},end:{borderLeftWidth:e.borderWidth}},c=t?{borderWidth:0,borderColor:e.borderColor,borderStyle:e.borderStyle,boxSizing:"border-box",...r[n]}:{boxSizing:"content-box"},s={position:"absolute",backgroundColor:e.background,zIndex:e.zIndex,overflowY:e.overflowY,overflowX:e.overflowX,...c,top:0,bottom:0,...{start:{left:0},end:{right:0}}[n]};return{drawerTray:{label:"drawerTray",...s},drawerTrayWithShadow:{label:"drawerTray--with-shadow",...s,boxShadow:e.boxShadow},drawerTrayContent:{label:"drawerTray__content",overflowY:e.contentOverflowY,height:"100%",boxSizing:"content-box"}}}),(e=>{var o,p;const t=e.colors,n=e.borders,r=e.stacking,c=e.shadows;return{...{background:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.white1010,borderColor:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.grey1214,borderWidth:null==n?void 0:n.widthSmall,borderStyle:null==n?void 0:n.style,zIndex:null==r?void 0:r.topmost,boxShadow:null==c?void 0:c.depth3,overflowX:"hidden",overflowY:"auto",contentOverflowY:"auto"}}})),iI(aI=le()(aI=U()((MI=class e extends u.Component{get _content(){return this.ref}constructor(e){super(e),this.ref=null,this._DOMNode=null,this.makeStyleProps=()=>({placement:this.placement}),this.handleContentRef=e=>{this.ref=e,"function"==typeof this.props.contentRef&&this.props.contentRef(e)},this.handleTransitionEntered=e=>{this.setState({transitioning:!1})},this.handleTransitionExited=e=>{this.setState({transitioning:!1})},this.handlePortalOpen=e=>{this.DOMNode=e,this.setState({portalOpen:!0})},this.state={transitioning:!1,portalOpen:!1}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps())}componentDidUpdate(e){var o,p;this.props.open!==e.open&&this.setState({transitioning:!0}),null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p,this.makeStyleProps())}get placement(){const e=this.props,o=e.placement;return e.dir===le.DIRECTION.rtl?je(o," "):o}get transition(){return"end"===this.placement?"fade":"slide-left"}get DOMNode(){return this._DOMNode}set DOMNode(e){this._DOMNode=e}renderContent(){const e=this.props,o=e.children,p=e.render;return"function"==typeof p?p():"function"==typeof o?o():o}render(){const o=this.props,p=o.label;o.children,o.render,o.placement;const t=o.open,n=o.onOpen,r=o.onClose;o.border;const c=o.shadow,s=o.onEnter,l=o.onEntering,i=o.onEntered,a=o.onExit,M=o.onExiting,b=o.onExited;o.contentRef;const z=o.mountNode,d=o.defaultFocusElement,O=o.liveRegion,h=o.onDismiss,A=o.onTransition,u=o.shouldReturnFocus,f=o.shouldCloseOnEscape,m=o.shouldCloseOnDocumentClick,q=o.shouldContainFocus,R=o.styles,W=P(o,lI);return Y(AI.Consumer,null,(o=>{var v;const g=this.state.portalOpen,y=o&&!!z,L=c&&o?null==R?void 0:R.drawerTrayWithShadow:null==R?void 0:R.drawerTray;let N=t;y&&!g&&(N=!1);const B=Y(ge,{in:N,type:this.transition,onTransition:A,onEnter:s,onEntering:l,onEntered:Ce(this.handleTransitionEntered,i,n),onExit:a,onExiting:M,onExited:Ce(this.handleTransitionExited,b,r),unmountOnExit:!0},Y("div",Object.assign({},pe(W,e.allowedProps),{ref:this.handleContentRef,css:L}),Y(Fe,{open:!0,role:o?"dialog":"region",label:p,shouldReturnFocus:u,shouldContainFocus:!this.state.transitioning&&q&&o,shouldCloseOnDocumentClick:m&&o,shouldCloseOnEscape:f&&o,defaultFocusElement:d,liveRegion:O,onDismiss:h,as:"div",css:null===(v=this.props.styles)||void 0===v?void 0:v.drawerTrayContent},this.renderContent())));return y?Y(Ue,{mountNode:z,open:!0,onOpen:this.handlePortalOpen},B):B}))}},MI.displayName="DrawerTray",MI.componentId="DrawerLayout.Tray",MI.locatorAttribute="data-drawer-tray",MI.propTypes=sI,MI.allowedProps=["label","children","render","placement","open","onOpen","onClose","border","shadow","onTransition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","contentRef","mountNode","defaultFocusElement","liveRegion","onDismiss","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","shouldCloseOnEscape","dir"],MI.defaultProps={shouldContainFocus:!0,shouldCloseOnEscape:!0,shouldCloseOnDocumentClick:!0,shouldReturnFocus:!0,open:!1,shadow:!0,border:!0,placement:"start"},aI=MI))||aI)||aI)||aI);const zI={children:Le.oneOfEach([cI,bI]),minWidth:E.string,onOverlayTrayChange:E.func,dir:E.oneOf(Object.values(le.DIRECTION))};var dI,OI;let hI=K()(dI=_((()=>({drawerLayout:{label:"drawerLayout",position:"relative",height:"100%"}})),null)(dI=le()(dI=U()((OI=class e extends u.Component{constructor(e){super(e),this._id=void 0,this._content=null,this._tray=null,this.ref=null,this.handleRef=e=>{this.ref=e},this.handleTrayContentRef=e=>{this._tray=e},this.handleContentSizeChange=({width:e})=>{this.setState(((o,p)=>{const t=this.getNextState(p.minWidth,o.trayWidth,e,o.shouldOverlayTray);return o.shouldOverlayTray!==t.shouldOverlayTray&&this.notifyOverlayTrayChange(t.shouldOverlayTray),t}))},this.handleTraySizeChange=({width:e})=>{this.setState(((o,p)=>{const t=this.getNextState(p.minWidth,e,o.contentWidth,!0);return o.shouldOverlayTray!==t.shouldOverlayTray&&this.notifyOverlayTrayChange(t.shouldOverlayTray),t}))},this.handleTrayTransitionEnter=()=>{let e=0;this._tray&&(e=ke(this._tray).width),this.handleTraySizeChange({width:e})},this.handleTrayTransitionExit=()=>{this.handleTraySizeChange({width:0})},this.state={shouldOverlayTray:!1,trayWidth:0,contentWidth:0},this._id=e.deterministicId()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}get trayProps(){return u.Children.toArray(this.props.children).filter((e=>Ie(e,[bI])))[0].props}get trayPlacement(){const e=this.trayProps,o=e.placement,p=e.dir;return(void 0===p?this.props.dir:p)===le.DIRECTION.rtl?je(o," "):o}get contentMargin(){const e=this.state.trayWidth||0;return this.state.shouldOverlayTray?0:e}get contentStyle(){let e=0,o=0;return this.shouldOverlayTray(this.props.minWidth,this.state.trayWidth,this.state.contentWidth,this.state.shouldOverlayTray)||("start"===this.trayPlacement&&(e=this.contentMargin),"end"===this.trayPlacement&&(o=this.contentMargin)),{marginLeft:`${e}px`,marginRight:`${o}px`}}shouldOverlayTray(e,o,p,t){if(!this._content)return!1;const n=Ee(e,this._content);return t?p-o{if(Ie(p,[bI]))return e++,ye(p,{label:p.props.label,key:p.props.label,[bI.locatorAttribute]:this._id,contentRef:this.handleTrayContentRef,onEnter:this.handleTrayTransitionEnter,onExit:this.handleTrayTransitionExit});if(Ie(p,[cI])){o++;const e=e=>{const o=p.props.contentRef;this._content=e,"function"==typeof o&&o(e)};return null!==this.state.trayWidth?ye(p,{label:p.props.label,key:p.props.label,[cI.locatorAttribute]:this._id,style:this.contentStyle,onSizeChange:Ce(this.handleContentSizeChange,p.props.onSizeChange),contentRef:e}):null}return p}));return Q(e<=1,"[DrawerLayout] Only one 'DrawerTray' per 'DrawerLayout' is supported."),Q(o<=1,"[DrawerLayout] Only one 'DrawerContent' per 'DrawerLayout' is supported."),p}render(){var o;const p={[e.locatorAttribute]:this._id};return Y(AI.Provider,{value:this.state.shouldOverlayTray},Y("div",Object.assign({},p,{css:null===(o=this.props.styles)||void 0===o?void 0:o.drawerLayout,ref:this.handleRef}),this.renderChildren()))}},OI.displayName="DrawerLayout",OI.componentId="DrawerLayout",OI.locatorAttribute="data-drawer-layout",OI.propTypes=zI,OI.allowedProps=["children","minWidth","onOverlayTrayChange","dir"],OI.defaultProps={minWidth:"30rem"},OI.Content=cI,OI.Tray=bI,dI=OI))||dI)||dI)||dI)||dI;const AI=u.createContext(!1),uI={mode:E.oneOf(["view","edit"]).isRequired,onChangeMode:E.func.isRequired,children:E.func,render:E.func,value:E.any,onChange:E.func,readOnly:E.bool,elementRef:E.func};class fI extends u.Component{constructor(e){super(e),this.state={showModeToggle:!1,valueOnEdit:null},this._editorRef=null,this._editButtonRef=null,this.handleEditESC=e=>{"Escape"===e.key&&(e.stopPropagation(),this.enterView())},this.handleViewMouseOver=e=>{"view"===this.props.mode&&(e.stopPropagation(),this.setState({showModeToggle:!0}))},this.handleViewMouseOut=e=>{"view"===this.props.mode&&(e.stopPropagation(),this.setState({showModeToggle:document.activeElement===this._editButtonRef}))},this.handleViewClick=e=>{1===e.buttons&&Ye((()=>{this.enterEdit()}))},this.handleEditBlur=()=>{this.enterView()},this.handleEditButtonFocus=()=>{this.setState({showModeToggle:!0})},this.handleEditButtonBlur=()=>{this.setState({showModeToggle:!1})},this.handleEditButtonClick=()=>{this.enterEdit()},this.ref=null,this.handleContainerRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.getContainerProps=(e={})=>{const o=this.props,p=o.mode,t=o.readOnly;return{onMouseOver:this.handleViewMouseOver,onMouseOut:this.handleViewMouseOut,onMouseDown:"edit"!==p?this.handleViewClick:void 0,onKeyUp:"edit"===p?this.handleEditESC:void 0,readOnly:t,...e,ref:this.handleContainerRef}},this.getViewerProps=(e={})=>({mode:this.props.mode,readOnly:this.props.readOnly,...e}),this.getEditorProps=(e={})=>({mode:this.props.mode,onBlur:this.handleEditBlur,editorRef:e=>{this._editorRef=e},readOnly:this.props.readOnly,...e}),this.getEditButtonProps=(e={})=>({onClick:this.handleEditButtonClick,onFocus:this.handleEditButtonFocus,onBlur:this.handleEditButtonBlur,isVisible:this.state.showModeToggle,buttonRef:e=>{this._editButtonRef=e},readOnly:this.props.readOnly,...e}),ce(!e.readOnly||"view"===e.mode,'[Editable] When readOnly is true, mode must be "view"')}componentDidMount(){"edit"===this.props.mode&&this.focusEditor()}componentDidUpdate(e){const o=this.props,p=o.mode,t=o.value,n=o.onChange;"edit"!==e.mode&&"edit"===p&&(this.setState({valueOnEdit:t}),this.focusEditor()),"edit"===e.mode&&"edit"!==p&&(this._editButtonRef&&this._editButtonRef.focus(),n&&!ie(this.state.valueOnEdit,t)&&n(t))}focusEditor(){ce(!!this._editorRef&&!this.props.readOnly,"[Editable] Did you forget to connect editorRef to your editor component?"),this._editorRef&&this._editorRef.focus()}enterView(){"view"!==this.props.mode&&(this.setState({showModeToggle:!0}),this.props.onChangeMode("view"))}enterEdit(){this.props.readOnly||(this.setState({showModeToggle:!1}),"edit"!==this.props.mode&&this.props.onChangeMode("edit"))}render(){const e=this.props,o=e.children,p=e.render,t=void 0===p?o:p,n=e.mode;return"function"==typeof t?t({mode:n,getContainerProps:this.getContainerProps,getViewerProps:this.getViewerProps,getEditorProps:this.getEditorProps,getEditButtonProps:this.getEditButtonProps}):null}}fI.displayName="Editable",fI.propTypes=uI,fI.allowedProps=["mode","onChangeMode","children","render","value","onChange","readOnly","elementRef"],fI.defaultProps={readOnly:!1,children:null};const mI={children:E.node,as:E.elementType,elementRef:E.func,margin:D.spacing,padding:D.spacing,align:E.oneOf(["center","start","end","stretch"]),direction:E.oneOf(["row","column"]),textAlign:E.oneOf(["start","center","end"]),overflowX:E.oneOf(["auto","hidden","visible"]),overflowY:E.oneOf(["auto","hidden","visible"]),shouldGrow:E.bool,shouldShrink:E.bool,size:E.string,withVisualDebug:E.bool};var qI,RI;let WI=_(((e,o)=>{const p=o.shouldGrow,t=o.shouldShrink,n=o.align;return{flexItem:{label:"flexItem",boxSizing:"border-box",minWidth:"0.0625rem",flexBasis:o.size,flexShrink:t?1:0,...p&&{flexGrow:1},...n&&{alignSelf:{start:"flex-start",end:"flex-end",center:"center",stretch:"stretch"}[n]}}}}),null)((RI=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){const o=pe(this.props,e.allowedProps),p=this.props,t=p.as,n=p.children,r=p.withVisualDebug,c=p.textAlign,s=p.size,l=p.direction,i=p.margin,a=p.padding,M=p.overflowX,b=p.overflowY,z=p.styles,d="column"===l,O="row"===l;return Y(J,Object.assign({},o,{css:null==z?void 0:z.flexItem,elementRef:this.handleRef,as:t,minHeight:d?s:void 0,minWidth:O?s:void 0,textAlign:c,margin:i,padding:a,overflowX:M,overflowY:b||(d?"auto":"visible"),withVisualDebug:r}),n)}},RI.displayName="Item",RI.componentId="Flex.Item",RI.propTypes=mI,RI.allowedProps=["children","as","elementRef","margin","padding","align","direction","textAlign","overflowX","overflowY","shouldGrow","shouldShrink","size","withVisualDebug"],RI.defaultProps={as:"span",shouldGrow:!1,shouldShrink:!1},qI=RI))||qI;const vI={children:E.oneOfType([E.node,E.func]),as:E.elementType,elementRef:E.func,height:E.oneOfType([E.string,E.number]),width:E.oneOfType([E.string,E.number]),margin:D.spacing,padding:D.spacing,gap:D.spacing,display:E.oneOf(["flex","inline-flex"]),textAlign:E.oneOf(["start","center","end"]),direction:E.oneOf(["row","column","row-reverse","column-reverse"]),alignItems:E.oneOf(["center","start","end","stretch"]),justifyItems:E.oneOf(["center","start","end","space-around","space-between"]),wrap:E.oneOf(["wrap","no-wrap","wrap-reverse"]),withVisualDebug:E.bool};var gI,yI,LI;let NI=(gI=_(((e,o)=>{const p=o.justifyItems,t=o.wrap,n=o.direction,r=o.gap,c=o.alignItems||("column"===n||"column-reverse"===n?"stretch":"center");return{flex:{label:"flex",fontFamily:e.fontFamily,boxSizing:"border-box",alignItems:{center:"center",start:"flex-start",end:"flex-end",stretch:"stretch"}[c],justifyContent:{start:"flex-start",end:"flex-end",center:"center","space-around":"space-around","space-between":"space-between"}[p],flexWrap:{wrap:"wrap","wrap-reverse":"wrap-reverse","no-wrap":void 0}[t],flexDirection:{column:"column","column-reverse":"column-reverse",row:"row","row-reverse":"row-reverse"}[n],gap:((e,o)=>Me("Flex",o,e,"gap"))(r,e)}}}),(e=>{const o=e.typography,p=e.spacing;return{...{fontFamily:null==o?void 0:o.fontFamily,...be("gap",p)}}})),gI((LI=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}renderChildren(e){return u.Children.map(e,(e=>e?Ie(e,["Item"])?ye(e,{withVisualDebug:this.props.withVisualDebug,...e.props,direction:this.props.direction.replace(/-reverse/,"")}):e:null))}render(){const e=this.props,o=e.as,p=e.withVisualDebug,t=e.height,n=e.display,r=e.margin,c=e.padding,s=e.textAlign,l=e.width,i=e.styles,a=e.gap,M=(e.wrap,$(this.props.children));return(null==a?void 0:a.split(" ")).length,M&&u.Children.count(M)>0?Y(J,Object.assign({},Z(this.props),{css:null==i?void 0:i.flex,elementRef:this.handleRef,as:o,display:n,width:l,height:t,margin:r,padding:c,textAlign:s,withVisualDebug:p}),this.renderChildren(M)):null}},LI.displayName="Flex",LI.componentId="Flex",LI.Item=WI,LI.propTypes=vI,LI.allowedProps=["children","as","elementRef","height","width","margin","padding","display","textAlign","direction","alignItems","justifyItems","wrap","withVisualDebug"],LI.defaultProps={as:"span",direction:"row",justifyItems:"start",display:"flex",withVisualDebug:!1,wrap:"no-wrap",gap:"none"},yI=LI))||yI);const BI={renderViewer:E.func.isRequired,renderEditor:E.func.isRequired,renderEditButton:E.func.isRequired,mode:E.oneOf(["view","edit"]).isRequired,onChangeMode:E.func.isRequired,value:E.any,onChange:E.func,readOnly:E.bool,showFocusRing:E.bool,editButtonPlacement:E.oneOf(["start","end"]),inline:E.bool};var wI,CI;let TI=_((()=>({inPlaceEdit:{label:"inPlaceEdit",boxSizing:"border-box",maxWidth:"100%",position:"relative",overflow:"visible",direction:"inherit",margin:0,textDecoration:"none",textAlign:"inherit",userSelect:"none",touchAction:"manipulation",background:"transparent",border:"none",outline:"none"}})),null)(((CI=class extends u.Component{constructor(e){super(e),this.ref=null,this._editButtonRef=null,this.handleRef=e=>{this.ref=e},this.handleEditButtonRef=e=>{this._editButtonRef=e},this.renderAll=({getContainerProps:e,getViewerProps:o,getEditorProps:p,getEditButtonProps:t})=>{const n="start"===this.props.editButtonPlacement?"row-reverse":"row",r="row-reverse"===n?"end":"start",c="start"===this.props.editButtonPlacement?"0 xx-small 0 0":"0 0 0 xx-small";return Y(NI,Object.assign({display:this.props.inline?"inline-flex":"flex",direction:n,justifyItems:r},e()),Y(NI.Item,{shouldGrow:!0,shouldShrink:!0},this.renderEditor(p()),this.renderViewer(o())),Y(NI.Item,{margin:c},this.renderEditButton(t())))},ce(!e.readOnly||"view"===e.mode,'[InPlaceEdit] When readOnly is true, mode is forced to "view"')}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}renderEditor({mode:e,onBlur:o,editorRef:p,readOnly:t}){var n;const r=this.props,c=r.showFocusRing,s=r.renderEditor;return!t&&"edit"===e?Y(J,{as:"span",display:"block",withFocusOutline:c,position:"relative",css:null===(n=this.props.styles)||void 0===n?void 0:n.inPlaceEdit,borderRadius:"medium",margin:"auto"},s({onBlur:o,editorRef:p})):null}renderViewer({readOnly:e,mode:o}){return e||"view"===o?this.props.renderViewer():null}renderEditButton({buttonRef:e,...o}){return this.props.renderEditButton({elementRef:Ce(this.handleEditButtonRef,e),...o})}render(){const e=this.props,o=e.mode,p=e.value,t=e.onChange,n=e.onChangeMode,r=e.readOnly;return Y(fI,{mode:o,onChangeMode:n,render:this.renderAll,value:p,onChange:t,readOnly:r,elementRef:this.handleRef})}}).displayName="InPlaceEdit",CI.componentId="InPlaceEdit",CI.propTypes=BI,CI.allowedProps=["renderViewer","renderEditor","renderEditButton","mode","onChangeMode","value","onChange","readOnly","showFocusRing","editButtonPlacement","inline"],CI.defaultProps={readOnly:!1,showFocusRing:!0,inline:!0,editButtonPlacement:"end"},CI.renderDefaultEditButton=({isVisible:e,readOnly:o,label:p,...t})=>o?null:Y(ao,Object.assign({size:"small",screenReaderLabel:p,withBackground:!1,withBorder:!1},t),e?Jm:null),wI=CI))||wI;function SI(e){return(Array.isArray(e)?e:e.split(",")).map((e=>e.trim().replace(/^\w+$/,".$&")))}const xI={id:E.string,renderLabel:E.oneOfType([E.func,E.node]).isRequired,accept:E.oneOfType([E.string,E.arrayOf(E.string)]),messages:E.arrayOf(t.message),onClick:E.func,onDrop:E.func,onDropAccepted:E.func,onDropRejected:E.func,onDragEnter:E.func,onDragOver:E.func,onDragLeave:E.func,shouldEnablePreview:E.bool,shouldAllowMultiple:E.bool,shouldAllowRepeats:E.bool,maxSize:E.number,minSize:E.number,interaction:E.oneOf(["enabled","disabled","readonly"]),display:E.oneOf(["block","inline-block"]),height:E.oneOfType([E.string,E.number]),width:E.oneOfType([E.string,E.number]),maxWidth:E.oneOfType([E.string,E.number]),minWidth:E.oneOfType([E.string,E.number]),margin:D.spacing},II=["display","height","width","minWidth","maxWidth","margin","onDropAccepted","onDropRejected"];var EI,PI,XI,HI;let ZI=(EI=K(),PI=_(((e,o,p)=>{const t=o.height,n=p.functionallyDisabled,r=p.visuallyDisabled,c=p.dragRejected,s=p.dragAccepted,l=s?{borderColor:e.acceptedColor}:{},i=c?{borderColor:e.rejectedColor}:{},a=n?{cursor:"not-allowed",pointerEvents:"none"}:{},M=r?{opacity:.5}:{},b=t?{height:"100%"}:{},z=s||c?{}:{borderColor:e.hoverBorderColor};return{fileDropLabel:{label:"fileDrop__label",display:"block",boxSizing:"border-box",position:"relative",...b,...a,...M},fileDropInput:{label:"fileDrop__input",width:"0.0625rem",height:"0.0625rem",margin:"-0.0625rem",padding:0,position:"absolute",overflow:"hidden",clip:"rect(0 0 0 0)",border:0},fileDropLabelContent:{label:"fileDrop__labelContent",display:"block",boxSizing:"border-box",zIndex:1,textAlign:"center",borderRadius:e.borderRadius,border:`${e.borderWidth} ${e.borderStyle} ${e.borderColor}`,cursor:"pointer","&:hover":{...z},...b,...l,...i},fileDropLayout:{label:"fileDrop__layout",display:"block",overflow:"hidden",borderRadius:e.borderRadius,...b}}}),(e=>{var o,p,t,n,r;const c=e.colors,s=e.borders,l=e.key,i={canvas:{hoverBorderColor:e["ic-brand-primary"],acceptedColor:e["ic-brand-primary"]}};return{...{backgroundColor:null==c||null===(o=c.contrasts)||void 0===o?void 0:o.white1010,borderRadius:null==s?void 0:s.radiusLarge,borderWidth:null==s?void 0:s.widthMedium,borderStyle:"dashed",borderColor:null==c||null===(p=c.contrasts)||void 0===p?void 0:p.grey1214,hoverBorderColor:null==c||null===(t=c.contrasts)||void 0===t?void 0:t.blue4570,acceptedColor:null==c||null===(n=c.contrasts)||void 0===n?void 0:n.blue4570,rejectedColor:null==c||null===(r=c.contrasts)||void 0===r?void 0:r.red4570},...i[l]}})),EI(XI=PI(XI=U()((HI=class extends u.Component{constructor(e){super(e),this.makeStyleProps=()=>({functionallyDisabled:this.functionallyDisabled,visuallyDisabled:"disabled"===this.interaction,dragRejected:this.state.isDragRejected||this.invalid,dragAccepted:this.state.isDragAccepted}),this.state={isDragAccepted:!1,isDragRejected:!1,isFocused:!1,isFileBrowserDisplayed:!1},this.enterCounter=0,this.fileInputEl=void 0,this.defaultId=null,this.messagesId="",this.ref=null,this.handleElementRef=e=>{this.ref=e},this.handleDragEnter=e=>{var o,p;if(e.preventDefault(),this.enterCounter+=1,this.enterCounter>1)return;const t=this.allFilesAccepted(this.getDataTransferItems(e));this.setState({isDragAccepted:t,isDragRejected:!t}),null===(o=(p=this.props).onDragEnter)||void 0===o||o.call(p,e)},this.handleDragOver=e=>{var o,p;e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect="copy"}catch(t){}return null===(o=(p=this.props).onDragOver)||void 0===o||o.call(p,e),!1},this.handleDragLeave=e=>{var o,p;e.preventDefault(),this.enterCounter-=1,this.enterCounter>0||(this.setState({isDragAccepted:!1,isDragRejected:!1}),null===(o=(p=this.props).onDragLeave)||void 0===o||o.call(p,e))},this.handleChange=e=>{const o=this.props,p=o.onDrop,t=o.onDropAccepted,n=o.onDropRejected,r=o.shouldEnablePreview,c=this.getDataTransferItems(e,r),s=this.parseFiles(c),l=se(s,2),i=l[0],a=l[1];e.preventDefault(),this.enterCounter=0,p&&p(i,a,e),a.length>0&&n&&n(a,e),i.length>0&&t&&t(i,e),this.setState({isDragAccepted:!1,isDragRejected:!1,isFileBrowserDisplayed:!1})},this.fileAccepted=e=>!this.props.accept||function(e,o){if(e&&o&&"application/x-moz-file"!==e.type){const p=SI(o),t=e.type||"",n=t.replace(/\/.*$/,"");return p.some((o=>"."===o.charAt(0)?e.name?e.name.toLowerCase().endsWith(o.toLowerCase()):t.endsWith(o.slice(1)):/\/\*$/.test(o)?n===o.replace(/\/.*$/,""):t===o))}return!0}(e,this.props.accept),this.handleRef=e=>{this.fileInputEl=e},this.handleBlur=()=>{this.setState({isFocused:!1,isFileBrowserDisplayed:!1})},this.handleFocus=()=>{this.setState({isFocused:!0,isFileBrowserDisplayed:!1})},this.handleClick=e=>{var o;this.fileInputEl.value&&this.props.shouldAllowRepeats&&(this.fileInputEl.value=null),null===(o=this.fileInputEl)||void 0===o||o.focus(),this.props.onClick(e),this.setState({isFileBrowserDisplayed:!0})},this.handleKeyDown=e=>{this.state.isFocused&&function(e){return e.keyCode===ve.codes.space||e.keyCode===ve.codes.enter}(e)&&this.props.shouldAllowRepeats&&(this.fileInputEl.value=null)},this.handleKeyUp=e=>{e.keyCode===ve.codes.esc&&this.state.isFileBrowserDisplayed&&(e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),this.setState({isFileBrowserDisplayed:!1}))},this.defaultId=e.deterministicId(),this.messagesId=e.deterministicId("FileDrop-messages")}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps())}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps())}convertToFile(e){return e instanceof DataTransferItem?e.getAsFile():e}get functionallyDisabled(){return"disabled"===this.interaction||"readonly"===this.interaction}get interaction(){return fe({props:this.props})}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get invalid(){return!!this.hasMessages&&this.props.messages.findIndex((e=>"error"===e.type))>=0}getDataTransferItems(e,o){let p=[];return Array.from(function(e,o){if("dataTransfer"in e){const o=e.dataTransfer;if(o){if(o.files&&o.files.length)return o.files;if(o.items&&o.items.length)return o.items}}else if(o&&o.files)return o.files;return[]}(e,this.fileInputEl)).forEach((e=>{const o=this.convertToFile(e);o&&p.push(o)})),p.length>1&&(p=this.props.shouldAllowMultiple?p:[p[0]]),o?p.map((e=>Object.assign(e,{preview:window.URL.createObjectURL(e)}))):p}parseFiles(e){const o=[],p=[];return e.forEach((e=>{const t=this.convertToFile(e);t&&this.fileAccepted(t)&&this.fileMatchSize(t)?o.push(e):p.push(e)})),[o,p]}fileMatchSize(e){return e.size<=this.props.maxSize&&e.size>=this.props.minSize}allFilesAccepted(e){return e.every(this.fileAccepted)}acceptStr(){const e=this.props.accept;return e?SI(e).join(","):void 0}renderLabel(){const e=this.props.renderLabel;return $(e,{isDragAccepted:this.state.isDragAccepted,isDragRejected:this.state.isDragRejected,interaction:this.interaction})}render(){var e,o,p,t;const n=this.props,c=n.display,s=n.height,l=n.width,i=n.minWidth,a=n.maxWidth,M=n.margin;n.onDropAccepted,n.onDropRejected;const b=P(n,II),z=this.props.id||this.defaultId,d=this.state.isDragRejected||this.invalid?"danger":void 0;return Y(J,{display:c,position:"relative",width:l,minWidth:i,maxWidth:a,margin:M,height:s,elementRef:this.handleElementRef},Y("label",{css:null===(e=this.props.styles)||void 0===e?void 0:e.fileDropLabel,htmlFor:z,onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleChange},Y(J,{display:"block",position:"relative",withFocusOutline:this.state.isFocused,borderRadius:"large",focusColor:d,height:s},Y("span",{css:null===(o=this.props.styles)||void 0===o?void 0:o.fileDropLabelContent},Y("span",{css:null===(p=this.props.styles)||void 0===p?void 0:p.fileDropLayout},Y(J,{height:s},this.renderLabel()))))),Y("input",Object.assign({},Z(b),{onClick:this.handleClick,type:"file",css:null===(t=this.props.styles)||void 0===t?void 0:t.fileDropInput,id:z,ref:this.handleRef,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,multiple:this.props.shouldAllowMultiple,accept:this.acceptStr(),onChange:this.handleChange,"aria-describedby":this.hasMessages?this.messagesId:void 0,"aria-invalid":this.invalid,disabled:this.functionallyDisabled})),this.hasMessages?Y(J,{display:"block",margin:"small 0 0"},Y(r,{id:this.messagesId,messages:this.props.messages})):null)}},HI.displayName="FileDrop",HI.componentId="FileDrop",HI.propTypes=xI,HI.allowedProps=["id","renderLabel","accept","messages","onClick","onDrop","onDropAccepted","onDropRejected","onDragEnter","onDragOver","onDragLeave","shouldEnablePreview","shouldAllowMultiple","shouldAllowRepeats","maxSize","minSize","interaction","display","height","width","maxWidth","minWidth","margin"],HI.defaultProps={onClick:function(e){},shouldEnablePreview:!1,shouldAllowMultiple:!1,shouldAllowRepeats:!0,maxSize:1/0,minSize:0,messages:[],display:"block"},XI=HI))||XI)||XI)||XI);const VI={src:E.string.isRequired,alt:E.string,display:E.oneOf(["inline-block","block"]),loading:E.oneOf(["eager","lazy"]),margin:D.spacing,overlay:E.shape({color:E.string.isRequired,opacity:E.oneOf([0,1,2,3,4,5,6,7,8,9,10]).isRequired,blend:E.oneOf(["normal","multiply","screen","overlay","color-burn"])}),withGrayscale:E.bool,withBlur:E.bool,constrain:E.oneOf(["cover","contain"]),elementRef:E.func,height:E.oneOfType([E.string,E.number]),width:E.oneOfType([E.string,E.number])},kI=["src","alt","margin","display","overlay","withGrayscale","withBlur","constrain","width","height","elementRef","styles","loading"];var DI,_I;let jI=_(((e,o)=>{const p=o.overlay,t=o.withBlur,n=o.withGrayscale,r=o.constrain,c="cover"===r,s="contain"===r,l={transition:`all ${e.effectTransitionDuration}`},i={width:"100%",height:"100%"},a={objectFit:"cover",...i},M={objectFit:"contain",...i,...p&&{width:"auto",height:"auto",maxWidth:"100%",maxHeight:"100%"}};return{overlay:{label:"img__overlay",position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",...l,...p&&{backgroundColor:p.color,opacity:.1*p.opacity,mixBlendMode:p.blend?p.blend:void 0}},container:{label:"img__container",...p&&{position:"relative",overflow:"hidden"},...c&&i,...s&&{height:"inherit"}},img:{label:"img",margin:"0",padding:"0",float:"none",top:"auto",bottom:"auto",left:"auto",right:"auto",lineHeight:"normal",position:"static",transform:"none",maxHeight:"none",minHeight:"0",minWidth:"0",maxWidth:"100%",...(()=>{const o=[];return t&&o.push(`blur(${e.imageBlurAmount})`),n&&o.push("grayscale(1)"),o.length>0?{...l,filter:o.join(" ")}:{filter:"none"}})(),...p&&{display:"block"},...c&&a,...s&&M}}}),(()=>({effectTransitionDuration:"1s",imageBlurAmount:"0.25em"})))(DI=U()(((_I=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){const e=this.props,o=e.src,p=e.alt,t=e.margin,n=e.display,r=e.overlay;e.withGrayscale,e.withBlur,e.constrain;const c=e.width,s=e.height;e.elementRef;const l=e.styles,i=e.loading,a=P(e,kI),M={alt:p||""},b={css:null==l?void 0:l.img,src:o,loading:i},z={...Z(a),width:c,height:s,margin:t,display:n,elementRef:this.handleRef};if(r){const e={...z};return Y(J,Object.assign({},e,{as:"span",css:null==l?void 0:l.container}),Y("img",Object.assign({},b,M)),r&&Y("span",{css:null==l?void 0:l.overlay}))}return Y(J,Object.assign({},z,b,M,{as:"img"}))}}).displayName="Img",_I.componentId="Img",_I.propTypes=VI,_I.allowedProps=["src","alt","display","loading","margin","overlay","withGrayscale","withBlur","constrain","elementRef","height","width"],_I.defaultProps={alt:"",display:"inline-block",withGrayscale:!1,withBlur:!1},DI=_I))||DI)||DI;const FI=u.createContext({registerMenuItem:e=>{},removeMenuItem:e=>{}}),UI={children:E.node.isRequired,defaultSelected:E.bool,selected:Se(E.bool,"onSelect","defaultSelected"),onSelect:E.func,onClick:E.func,onKeyDown:E.func,onKeyUp:E.func,onMouseOver:E.func,controls:E.string,disabled:E.bool,as:E.elementType,type:E.oneOf(["button","checkbox","radio","flyout"]),value:E.oneOfType([E.string,E.number]),href:E.string,target:E.string,renderLabelInfo:E.node};var YI,GI,$I,KI,QI,JI;let eE=(YI=K(),GI=_(((e,o)=>{const p=o.type,t=o.disabled,n="checkbox"===p||"radio"===p,r="flyout"===p?{insetInlineStart:"auto",insetInlineEnd:e.iconPadding}:{},c=n?{paddingInlineStart:e.labelPadding}:{},s=n?{insetInlineStart:e.iconPadding,insetInlineEnd:"auto"}:{},l=t?{cursor:"not-allowed",pointerEvents:"none",opacity:.5}:{},i={textDecoration:"none"};return{menuItem:{label:"menuItem",position:"relative",border:"none",outline:"none",padding:e.padding,margin:"0",width:"100%",borderRadius:"initial",boxSizing:"border-box",textAlign:"start",cursor:"pointer",userSelect:"none",fontFamily:e.fontFamily,fontWeight:e.fontWeight,lineHeight:e.lineHeight,fontSize:e.fontSize,background:e.background,transition:"background 0.2s",display:"block",textDecoration:"none",...c,"&:focus, &:active, &:hover":{background:e.activeBackground,'[class*="menuItem__label"]':{color:e.activeLabelColor},'[class*="menuItem__icon"]':{color:e.activeIconColor}},"&::-moz-focus-inner":{padding:"0",margin:"0",border:"0"},...l,"&:is(a)":{"&, &:link, &:visited, &:active, &:hover, &:focus":i},"&:-webkit-any(a)":{"&, &:link, &:visited, &:active, &:hover, &:focus":i}},icon:{label:"menuItem__icon",position:"absolute",display:"flex",alignItems:"center",top:"0",width:"1em",height:"100%",color:e.iconColor,...s,...r},labelInfo:{label:"menuItem__labelInfo",height:"100%",float:"right",clear:"right",paddingRight:"1.75rem"},label:{label:"menuItem__label",color:e.labelColor}}}),(e=>{var o,p,t,n,r,c;const s=e.colors,l=e.typography,i=e.spacing,a=e.key,M={canvas:{labelColor:e["ic-brand-font-color-dark"],iconColor:e["ic-brand-font-color-dark"],activeBackground:e["ic-brand-primary"]}};return{...{padding:`${null==i?void 0:i.xSmall} ${null==i?void 0:i.small}`,fontFamily:null==l?void 0:l.fontFamily,fontWeight:null==l?void 0:l.fontWeightNormal,lineHeight:null==l?void 0:l.lineHeightCondensed,fontSize:null==l?void 0:l.fontSizeMedium,labelPadding:null==i?void 0:i.large,labelColor:null==s||null===(o=s.contrasts)||void 0===o?void 0:o.grey125125,background:null==s||null===(p=s.contrasts)||void 0===p?void 0:p.white1010,iconColor:null==s||null===(t=s.contrasts)||void 0===t?void 0:t.grey125125,iconPadding:null==i?void 0:i.small,activeBackground:null==s||null===(n=s.contrasts)||void 0===n?void 0:n.blue4570,activeLabelColor:null==s||null===(r=s.contrasts)||void 0===r?void 0:r.white1010,activeIconColor:null==s||null===(c=s.contrasts)||void 0===c?void 0:c.white1010},...M[a]}})),YI($I=GI($I=U()((KI=class e extends u.Component{constructor(e){super(e),this.labelId=void 0,this.ref=null,this.handleRef=e=>{this.ref=e},this.handleClick=e=>{const o=this.props,p=o.onSelect,t=o.onClick,n=o.disabled,r=o.value,c=!this.selected;n?e.preventDefault():(void 0===this.props.selected&&this.setState({selected:c}),"function"==typeof p&&(e.persist(),p(e,r,c,this)),"function"==typeof t&&t(e))},this.handleKeyDown=e=>{const o=e.keyCode===ve.codes.space,p=e.keyCode===ve.codes.enter;if((o||p)&&(e.preventDefault(),e.stopPropagation(),p)){ze(this.ref).click()}},this.handleKeyUp=e=>{const o=e.keyCode===ve.codes.space,p=e.keyCode===ve.codes.enter;if((o||p)&&(e.preventDefault(),e.stopPropagation(),o)){ze(this.ref).click()}},this.handleMouseOver=e=>{this.focus(),"function"==typeof this.props.onMouseOver&&this.props.onMouseOver(e,this)},void 0===e.selected&&(this.state={selected:!!e.defaultSelected}),this.labelId=e.deterministicId("MenuItem__label")}get _node(){return this.ref}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o);const p=this.context;p&&p.registerMenuItem&&p.registerMenuItem(this)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentWillUnmount(){const e=this.context;e&&e.removeMenuItem&&e.removeMenuItem(this)}get elementType(){return X(e,this.props)}get role(){switch(this.props.type){case"checkbox":return"menuitemcheckbox";case"radio":return"menuitemradio";case"flyout":return"button";default:return"menuitem"}}get selected(){return void 0===this.props.selected?this.state.selected:this.props.selected}get focused(){return xe(this.ref)}focus(){ze(this.ref).focus()}renderContent(){var e,o,p,t;const n=this.props,r=n.children,c=n.type,s=n.renderLabelInfo;return Y("span",null,("checkbox"===c||"radio"===c)&&Y("span",{css:null===(e=this.props.styles)||void 0===e?void 0:e.icon},this.selected&&(QI||(QI=Y(Te,null)))),Y("span",{css:null===(o=this.props.styles)||void 0===o?void 0:o.label,id:this.labelId},r),"flyout"===c&&Y("span",{css:null===(p=this.props.styles)||void 0===p?void 0:p.icon},JI||(JI=Y(we,null))),s&&Y("span",{css:null===(t=this.props.styles)||void 0===t?void 0:t.labelInfo},$(s)))}render(){var o;const p=this.props,t=p.disabled,n=p.controls,r=p.onKeyDown,c=p.onKeyUp,s=p.type,l=p.href,i=pe(this.props,e.allowedProps),a=this.elementType;return Y(a,Object.assign({tabIndex:-1},i,{href:l,role:this.role,"aria-labelledby":this.labelId,"aria-disabled":t?"true":void 0,"aria-controls":n,"aria-checked":"checkbox"===s||"radio"===s?this.selected?"true":"false":void 0,onClick:this.handleClick,onKeyUp:Ce(c,this.handleKeyUp),onKeyDown:Ce(r,this.handleKeyDown),ref:this.handleRef,css:null===(o=this.props.styles)||void 0===o?void 0:o.menuItem,onMouseOver:this.handleMouseOver}),this.renderContent())}},KI.displayName="MenuItem",KI.componentId="Menu.Item",KI.propTypes=UI,KI.allowedProps=["children","defaultSelected","selected","onSelect","onClick","onKeyDown","onKeyUp","onMouseOver","controls","disabled","as","type","value","href","target","renderLabelInfo"],KI.defaultProps={type:"button",disabled:!1},KI.contextType=FI,$I=KI))||$I)||$I)||$I);var oE,pE,tE;let nE=(oE=_((e=>({menuItemSeparator:{label:"menuItemSeparator",height:e.height,margin:e.margin,overflow:"hidden",background:e.background}})),(e=>{var o;const p=e.colors,t=e.spacing,n=e.borders;return{...{background:null==p||null===(o=p.contrasts)||void 0===o?void 0:o.grey1214,height:null==n?void 0:n.widthSmall,margin:`0 ${null==t?void 0:t.small}`}}})),oE(pE=U()((tE=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){var o;const p=pe(this.props,e.allowedProps);return Y("div",Object.assign({},p,{role:"presentation",css:null===(o=this.props.styles)||void 0===o?void 0:o.menuItemSeparator,ref:this.handleRef}))}},tE.displayName="MenuItemSeparator",tE.componentId="Menu.Separator",tE.propTypes={},tE.allowedProps=[],pE=tE))||pE)||pE);const rE={label:E.node.isRequired,allowMultiple:E.bool,children:Le.oneOf([eE,nE]),selected:Se(E.array,"onSelect","defaultSelected"),defaultSelected:E.array,onSelect:E.func,onMouseOver:E.func,controls:E.string,itemRef:E.func,disabled:E.bool,isTabbable:E.bool};var cE,sE,lE,iE;let aE=(cE=K(),sE=_((e=>({menuItemGroup:{label:"menuItemGroup",display:"block"},label:{label:"menuItemGroup__label",background:e.background,padding:e.padding,display:"block",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,textAlign:"start"},items:{label:"menuItemGroup__items",padding:"0",margin:"0 0 0 0",listStyleType:"none"}})),(e=>{var o,p;const t=e.colors,n=e.spacing,r=e.typography,c=e.key,s={canvas:{color:e["ic-brand-font-color-dark"]}};return{...{fontSize:null==r?void 0:r.fontSizeMedium,fontFamily:null==r?void 0:r.fontFamily,fontWeight:null==r?void 0:r.fontWeightBold,padding:`${null==n?void 0:n.xSmall} ${null==n?void 0:n.small}`,color:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.grey125125,background:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.white1010},...s[c]}})),cE(lE=sE(lE=U()((iE=class e extends u.Component{constructor(e){super(e),this._labelId=void 0,this.ref=null,this.handleRef=e=>{this.ref=e},this.handleSelect=(e,o,p,t)=>{this.props.disabled?e.preventDefault():this.props.selected?this.updateSelected(e,o,this.props.selected,p,t):this.setState((n=>({selected:this.updateSelected(e,o,n.selected,p,t)})))},this.updateSelected=(e,o,p,t,n)=>{const r=this.props.allowMultiple;let c=r?[...p]:[];const s=c.indexOf(o);return!0===t&&s<0?c.push(o):!1===t&&-1!==s?c.splice(s,1):!r&&c.length<1&&(c=[...p]),"function"==typeof this.props.onSelect&&this.props.onSelect(e,c,t,n),c},void 0===e.selected&&(this.state={selected:this.selectedFromChildren(e)||e.defaultSelected}),this._labelId=e.deterministicId("MenuItemGroup")}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}selectedFromChildren(e){const o=e.children,p=e.allowMultiple,t=[];return u.Children.toArray(o).filter((e=>Ie(e,[eE]))).forEach(((e,o)=>{0!==t.length&&!p||!e.props.selected&&!e.props.defaultSelected||t.push(e.props.value||o)})),t.length>0?t:null}get selected(){return void 0===this.props.selected&&void 0===this.state.selected?[]:void 0===this.props.selected?[...this.state.selected]:[...this.props.selected]}renderLabel(){var e;const o=this.props.label;return Ge(o)?Y("span",{css:null===(e=this.props.styles)||void 0===e?void 0:e.label},o):o}renderChildren(){const e=this.props,o=e.disabled,p=e.controls,t=e.allowMultiple,n=e.isTabbable,r=e.onMouseOver,c=this.props.children;let s=-1;return u.Children.map(c,(e=>{if(Ie(e,[eE])){++s;const c=e.props.value||s;return Y("li",{role:"none"}," ",ye(e,{tabIndex:n&&0===s?0:-1,controls:p,value:c,children:e.props.children,type:t?"checkbox":"radio",ref:this.props.itemRef,disabled:o||e.props.disabled,selected:this.selected.indexOf(c)>-1,onSelect:this.handleSelect,onMouseOver:r})," ")}return e}))}render(){var o,p;const t=pe(this.props,e.allowedProps);return Y("span",Object.assign({},t,{css:null===(o=this.props.styles)||void 0===o?void 0:o.menuItemGroup,role:"presentation",ref:this.handleRef}),Y("span",{id:this._labelId},this.renderLabel()),Y("ul",{role:"menu",css:null===(p=this.props.styles)||void 0===p?void 0:p.items,"aria-disabled":this.props.disabled?"true":void 0,"aria-labelledby":this._labelId},this.renderChildren()))}},iE.displayName="MenuItemGroup",iE.componentId="Menu.Group",iE.propTypes=rE,iE.allowedProps=["label","allowMultiple","children","selected","defaultSelected","onSelect","onMouseOver","controls","itemRef","disabled","isTabbable"],iE.defaultProps={disabled:!1,children:null,isTabbable:!1,allowMultiple:!1,defaultSelected:[]},lE=iE))||lE)||lE)||lE);const ME={children:Le.oneOf(["MenuItem","MenuItemGroup","MenuItemSeparator","Menu"]),label:E.string,disabled:E.bool,trigger:E.node,placement:Re.placement,defaultShow:E.bool,show:Se(E.bool,"onToggle","defaultShow"),onToggle:E.func,onSelect:E.func,onDismiss:E.func,onFocus:E.func,onMouseOver:E.func,onKeyDown:E.func,onKeyUp:E.func,menuRef:E.func,popoverRef:E.func,mountNode:Re.mountNode,constrain:Re.constrain,shouldHideOnSelect:E.bool,shouldFocusTriggerOnClose:E.bool,positionContainerDisplay:E.oneOf(["inline-block","block"]),type:E.oneOf(["flyout"]),id:E.string,withArrow:E.bool,offsetX:E.oneOfType([E.string,E.number]),offsetY:E.oneOfType([E.string,E.number]),maxHeight:E.string,renderLabelInfo:E.node};var bE,zE,dE,OE;let hE=(bE=K(),zE=_(((e,o)=>({menu:{label:"menu",...o.maxHeight?{maxHeight:o.maxHeight,overflow:"auto"}:{},minWidth:e.minWidth,maxWidth:e.maxWidth,listStyleType:"none",margin:"0",padding:"0.25rem 0",background:e.background,borderRadius:e.borderRadius,display:"block",position:"relative","&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",right:"-0.25rem",bottom:"-0.25rem",border:`${e.focusBorderWidth} ${e.focusBorderStyle} ${e.focusBorderColor}`,borderRadius:e.focusBorderRadius,opacity:0,transform:"scale(0.9)",pointerEvents:"none"},"&:focus":{outline:"none","&::before":{opacity:1,transform:"scale(1)"}}}})),(e=>{var o,p;const t=e.colors,n=e.breakpoints,r=e.borders;return{...{minWidth:null==n?void 0:n.xxSmall,maxWidth:null==n?void 0:n.xSmall,background:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.white1010,borderRadius:null==r?void 0:r.radiusMedium,focusBorderStyle:null==r?void 0:r.style,focusBorderWidth:null==r?void 0:r.widthMedium,focusBorderColor:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.blue4570,focusBorderRadius:null==r?void 0:r.radiusMedium}}})),bE(dE=zE(dE=U()((OE=class extends u.Component{constructor(e){super(e),this.state={hasFocus:!1},this._rootNode=null,this._menuItems=[],this._popover=null,this._trigger=null,this._menu=null,this._labelId=this.props.deterministicId("Menu__label"),this._activeSubMenu=void 0,this._id=void 0,this.ref=null,this.handleRef=e=>{const o=this.props.menuRef;this._menu=e,"function"==typeof o&&o(e),this.props.trigger||(this.ref=e)},this.registerMenuItem=e=>{this._menuItems.push(e)},this.removeMenuItem=e=>{const o=this.getMenuItemIndex(e);Q(o>=0,"[Menu] Could not find registered menu item."),o>=0&&this._menuItems.splice(o,1)},this.getMenuItemIndex=e=>this._menuItems.findIndex((o=>o===e)),this.handleTriggerKeyDown=e=>{"flyout"===this.props.type&&e.keyCode===ve.codes.right&&(e.persist(),this.show(e))},this.handleTriggerMouseOver=e=>{"flyout"===this.props.type&&this.show(e)},this.handleToggle=e=>{"function"==typeof this.props.onToggle&&this.props.onToggle(e,this)},this.handleMenuKeyDown=e=>{const o=e&&e.keyCode,p=ve.codes,t=p.down,n=p.up,r=p.tab,c=p.left,s=ve.codes["page down"],l=ve.codes["page up"];o===t||o===s?(e.preventDefault(),e.stopPropagation(),this.moveFocus(1),this.hideActiveSubMenu(e)):o===n||o===l?(e.preventDefault(),e.stopPropagation(),this.moveFocus(-1),this.hideActiveSubMenu(e)):o!==r&&o!==c||(e.persist(),this.hide(e)),"function"==typeof this.props.onKeyDown&&this.props.onKeyDown(e)},this.handleMenuItemSelect=(e,o,p,t)=>{this.props.shouldHideOnSelect&&this.hide(e),"function"==typeof this.props.onSelect&&this.props.onSelect(e,o,p,t)},this.handleMenuItemFocus=()=>{this.setState({hasFocus:!0})},this.handleMenuItemBlur=()=>{this.setState({hasFocus:this.focusedIndex>=0})},this.handleMenuItemMouseOver=(e,o)=>{this._activeSubMenu&&o!==this._activeSubMenu._trigger&&this.hideActiveSubMenu(e)},this.hideActiveSubMenu=e=>{this._activeSubMenu&&(this._activeSubMenu.hide(e),this._activeSubMenu=null)},this.handleSubMenuToggle=(e,o)=>{e&&(this._activeSubMenu=o)},this.handleSubMenuDismiss=(e,o)=>{(e&&e.keyCode===ve.codes.tab||o)&&this.hide(e)},this.hide=e=>{this._popover&&this._popover.hide(e)},this.show=e=>{this._popover&&this._popover.show(e)},this._id=this.props.id||e.deterministicId()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}get menuItems(){return this._menuItems}focus(){var e,o;this.shown?(Q(!(null===(e=this._menu)||void 0===e||!e.focus),"[Menu] Could not focus the menu."),this._menu.focus()):(Q(!(null===(o=this._trigger)||void 0===o||!o.focus),"[Menu] Could not focus the trigger."),this._trigger.focus())}focused(){return this.shown?$e(this._menu)||this.state.hasFocus:$e(this._trigger)}get focusedIndex(){return this.menuItems.findIndex((e=>e&&!0===e.focused))}moveFocus(e){const o=this.menuItems?this.menuItems.length:0;if(o<=0)return;const p=this.focusedIndex<0&&e<0?0:this.focusedIndex,t=this.menuItems[(p+o+e)%o];Q(void 0!==t&&void 0!==t.focus,"[Menu] Could not focus next menu item."),t.focus()}get shown(){return!this._popover||this._popover.shown}renderChildren(){const e=this.props,o=e.children,p=e.disabled;let t=0;return u.Children.map(o,(e=>{if(!Ie(e,["MenuItemSeparator","MenuItem","MenuItemGroup","Menu"]))return;t+=1;const o=!this.state.hasFocus&&1===t;if(Ie(e,["MenuItemSeparator"]))return Y("li",{role:"none"},e);const n=e,r=n.props["aria-controls"]||n.props.controls||this.props["aria-controls"]||this.props.controls;if(Ie(e,["MenuItem"]))return Y("li",{role:"none"},ye(e,{controls:r,children:e.props.children,disabled:p||e.props.disabled,onFocus:this.handleMenuItemFocus,onBlur:this.handleMenuItemBlur,onSelect:this.handleMenuItemSelect,onMouseOver:this.handleMenuItemMouseOver,tabIndex:o?0:-1}));if(Ie(e,["MenuItemGroup"]))return Y("li",{role:"none"},ye(e,{label:e.props.label,controls:r,disabled:p||e.props.disabled,onFocus:this.handleMenuItemFocus,onBlur:this.handleMenuItemBlur,onSelect:this.handleMenuItemSelect,onMouseOver:this.handleMenuItemMouseOver,isTabbable:o}));if(Ie(e,["Menu"])){const t=p||e.props.disabled;return Y("li",{role:"none"},ye(e,{type:"flyout",controls:r,disabled:t,onSelect:this.handleMenuItemSelect,placement:"end top",offsetX:-5,offsetY:5,withArrow:!1,onToggle:this.handleSubMenuToggle,onDismiss:this.handleSubMenuDismiss,trigger:Y(eE,{onMouseOver:this.handleMenuItemMouseOver,onFocus:this.handleMenuItemFocus,onBlur:this.handleMenuItemBlur,tabIndex:o?0:-1,type:"flyout",disabled:t,renderLabelInfo:e.props.renderLabelInfo},e.props.title||e.props.label)}))}}))}renderMenu(){var e;const o=this.props,p=o.disabled,t=o.label,n=o.trigger,r=o.onKeyUp,c=this.props["aria-labelledby"],s=this.props["aria-controls"];return Y(FI.Provider,{value:{removeMenuItem:this.removeMenuItem,registerMenuItem:this.registerMenuItem}},Y("ul",{role:"menu","aria-label":t,tabIndex:0,css:null===(e=this.props.styles)||void 0===e?void 0:e.menu,"aria-labelledby":c||(n?this._labelId:void 0),"aria-controls":s,"aria-disabled":p?"true":void 0,onKeyDown:this.handleMenuKeyDown,onKeyUp:r,ref:this.handleRef},this.renderChildren()))}render(){const e=this.props,o=e.show,p=e.defaultShow,t=e.placement,n=e.withArrow,r=e.trigger,c=e.mountNode,s=e.popoverRef,l=e.disabled,i=e.onDismiss,a=e.onFocus,M=e.onMouseOver,b=e.positionContainerDisplay,z=e.offsetX,d=e.offsetY;return r?Y(He,{isShowingContent:o,defaultIsShowingContent:p,onHideContent:(e,{documentClick:o})=>{"function"==typeof i&&i(e,o),this.handleToggle(!1)},onShowContent:()=>this.handleToggle(!0),mountNode:c,placement:t,withArrow:n,id:this._id,on:["click"],shouldContainFocus:!0,shouldReturnFocus:!0,onFocus:a,onMouseOver:M,positionContainerDisplay:b,offsetX:z,offsetY:d,elementRef:e=>{this.ref=e},ref:e=>{this._popover=e,"function"==typeof s&&s(e)},renderTrigger:ye(r,{ref:e=>{this._trigger=e},"aria-haspopup":!0,id:this._labelId,onMouseOver:this.handleTriggerMouseOver,onKeyDown:this.handleTriggerKeyDown,disabled:r.props.disabled||l})},this.renderMenu()):this.renderMenu()}},OE.displayName="Menu",OE.componentId="Menu",OE.propTypes=ME,OE.allowedProps=["children","label","disabled","trigger","placement","defaultShow","show","onToggle","onSelect","onDismiss","onFocus","onMouseOver","onKeyDown","onKeyUp","menuRef","popoverRef","mountNode","constrain","shouldHideOnSelect","shouldFocusTriggerOnClose","positionContainerDisplay","type","id","withArrow","offsetX","offsetY","maxHeight","renderLabelInfo"],OE.defaultProps={label:null,disabled:!1,trigger:null,placement:"bottom center",defaultShow:!1,mountNode:null,constrain:"window",shouldHideOnSelect:!0,shouldFocusTriggerOnClose:!0,withArrow:!0,offsetX:0,offsetY:0},OE.Item=eE,OE.Group=aE,OE.Separator=nE,OE.contextType=FI,dE=OE))||dE)||dE)||dE);const AE={textAlign:E.oneOf(["start","center","end"]),renderLabel:E.oneOfType([E.func,E.node]),renderValue:E.oneOfType([E.func,E.node]),isGroupChild:E.bool},uE=["textAlign","renderLabel","renderValue","isGroupChild"];var fE,mE,qE;let RE=(fE=_(((e,o)=>{const p=o.textAlign;return{metric:{label:"metric",display:"flex",flexDirection:"column-reverse",boxSizing:"border-box",padding:e.padding,fontFamily:e.fontFamily,textAlign:p},label:{label:"metric__label",fontSize:e.labelFontSize,color:e.labelColor},value:{label:"metric__value",fontWeight:e.valueFontWeight,fontSize:e.valueFontSize,color:e.valueColor}}}),(e=>{var o,p;const t=e.colors,n=e.spacing,r=e.typography,c=e.key,s={canvas:{valueColor:e["ic-brand-font-color-dark"],labelColor:e["ic-brand-font-color-dark"]}};return{...{padding:`0 ${null==n?void 0:n.xSmall}`,fontFamily:null==r?void 0:r.fontFamily,valueColor:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.grey125125,valueFontSize:null==r?void 0:r.fontSizeXLarge,valueFontWeight:null==r?void 0:r.fontWeightBold,labelColor:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.grey125125,labelFontSize:null==r?void 0:r.fontSizeXSmall},...s[c]}})),fE(mE=U()(((qE=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){var e,o,p;const t=this.props;t.textAlign;const n=t.renderLabel,r=t.renderValue,c=t.isGroupChild,s=P(t,uE);return Y("div",Object.assign({},Z(s),{role:c?"row":void 0,css:null===(e=this.props.styles)||void 0===e?void 0:e.metric,ref:this.handleRef}),Y("div",{role:c?"rowheader":void 0,css:null===(o=this.props.styles)||void 0===o?void 0:o.label},$(n)),Y("div",{role:c?"gridcell":void 0,css:null===(p=this.props.styles)||void 0===p?void 0:p.value},$(r)))}}).displayName="Metric",qE.componentId="Metric",qE.propTypes=AE,qE.allowedProps=["textAlign","renderLabel","renderValue","isGroupChild"],qE.defaultProps={textAlign:"center",isGroupChild:!1},mE=qE))||mE)||mE);const WE={children:Le.oneOf([RE])};var vE,gE,yE;let LE=(vE=_((e=>({metricGroup:{label:"metricGroup",boxSizing:"border-box",display:"flex",flexWrap:"wrap",alignItems:"flex-start",justifyContent:"space-around",lineHeight:e.lineHeight}})),(e=>{const o=e.typography;return{...{lineHeight:null==o?void 0:o.lineHeightCondensed}}})),vE(gE=U()(((yE=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}renderChildren(){return u.Children.map(this.props.children,(e=>ye(e,{isGroupChild:!0})))}render(){var e;return Y("div",Object.assign({},Z(this.props),{css:null===(e=this.props.styles)||void 0===e?void 0:e.metricGroup,role:"grid","aria-readonly":"true",ref:this.handleRef}),this.renderChildren())}}).displayName="MetricGroup",yE.componentId="MetricGroup",yE.propTypes=WE,yE.allowedProps=["children"],yE.defaultProps={children:null},gE=yE))||gE)||gE);const NE={children:E.node,open:E.bool,onOpen:E.func,onClose:E.func,mountNode:E.oneOfType([_e,E.func]),insertAt:E.oneOf(["bottom","top"]),label:E.string.isRequired,onDismiss:E.func,defaultFocusElement:E.oneOfType([E.element,E.func]),contentElement:E.oneOfType([E.element,E.func]),shouldContainFocus:E.bool,shouldReturnFocus:E.bool,shouldCloseOnDocumentClick:E.bool,shouldCloseOnEscape:E.bool,transition:Ke,in:E.bool,unmountOnExit:E.bool,transitionOnMount:E.bool,transitionEnter:E.bool,transitionExit:E.bool,onEnter:E.func,onEntering:E.func,onEntered:E.func,onExit:E.func,onExiting:E.func,onExited:E.func};var BE,wE;let CE=U()((wE=class e extends u.Component{constructor(e){super(e),this._timeouts=[],this._DOMNode=null,this._isMounted=!1,this.ref=null,this.handleRef=e=>{this.ref=e},this.handlePortalOpen=e=>{this.DOMNode=e,this._timeouts.push(setTimeout((()=>{this._isMounted&&this.setState({open:!0})})))},this.handleTransitionExited=e=>{this.setState({open:!1,transitioning:!1})},this.state={open:e.open,transitioning:!1}}componentDidMount(){this._isMounted=!0}componentDidUpdate(e){e.open&&!this.props.open&&this.setState({transitioning:!!e.transition})}componentWillUnmount(){this._isMounted=!1,this._timeouts.forEach((e=>clearTimeout(e)))}get DOMNode(){return this._DOMNode}set DOMNode(e){this._DOMNode=e}renderTransition(e){return f.createElement(ge,Object.assign({},te(this.props,ge.allowedProps),{in:this.props.open,transitionOnMount:!0,unmountOnExit:!0,type:this.props.transition,onExited:Ce(this.handleTransitionExited,this.props.onExited)}),e)}render(){let o=f.createElement(Fe,Object.assign({},pe(this.props,e.allowedProps),te(this.props,Fe.allowedProps),{defaultFocusElement:this.props.defaultFocusElement,open:this.state.open,elementRef:this.handleRef}),this.props.children);return this.props.transition&&(o=this.renderTransition(o)),f.createElement(Ue,Object.assign({},te(this.props,Ue.allowedProps),{open:this.props.open||this.state.transitioning,onOpen:Ce(this.handlePortalOpen,this.props.onOpen)}),o)}},wE.displayName="Overlay",wE.allowedProps=["children","open","onOpen","onClose","mountNode","insertAt","label","onDismiss","defaultFocusElement","contentElement","shouldReturnFocus","shouldCloseOnDocumentClick","shouldCloseOnEscape","transition","in","unmountOnExit","transitionOnMount","transitionEnter","transitionExit","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],wE.propTypes=NE,wE.defaultProps={open:!1,insertAt:"bottom",shouldContainFocus:!1,shouldReturnFocus:!1,shouldCloseOnDocumentClick:!1,shouldCloseOnEscape:!0,in:!1,unmountOnExit:!1,transitionOnMount:!1,transitionEnter:!0,transitionExit:!0},BE=wE))||BE;const TE={children:E.node,variant:E.oneOf(["default","inverse"]),spacing:E.oneOf(["default","compact"])},SE=["children"];var xE,IE,EE;let PE=(xE=_(((e,o,p)=>{const t=o.variant,n=o.spacing,r=p.withCloseButton,c={default:{padding:e.padding,paddingInlineStart:e.padding,paddingInlineEnd:r?`calc(${e.padding} * 2 + 1em)`:e.padding},compact:{padding:e.paddingCompact,paddingInlineStart:e.paddingCompact,paddingInlineEnd:r?`calc(${e.paddingCompact} * 2 + 1em)`:e.paddingCompact}},s="inverse"===t?{background:e.inverseBackground,borderBottomColor:e.inverseBorderColor}:{};return{modalHeader:{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit",label:"modalHeader",boxSizing:"border-box",flex:"0 0 auto",background:e.background,borderBottomWidth:"0.0625rem",borderBottomStyle:"solid",borderBottomColor:e.borderColor,...c[n],...s}}}),(e=>{var o,p,t,n;const r=e.colors,c=e.spacing;return{...{background:null==r||null===(o=r.contrasts)||void 0===o?void 0:o.white1010,borderColor:null==r||null===(p=r.contrasts)||void 0===p?void 0:p.grey1214,padding:null==c?void 0:c.medium,paddingCompact:null==c?void 0:c.small,inverseBackground:null==r||null===(t=r.contrasts)||void 0===t?void 0:t.grey125125,inverseBorderColor:null==r||null===(n=r.contrasts)||void 0===n?void 0:n.grey125125}}})),xE(IE=U()(((EE=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e},this.makeStyleProps=()=>({withCloseButton:this.usesCloseButton})}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps())}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps())}get usesCloseButton(){let e=!1;return f.Children.forEach(this.props.children,(o=>{o&&Ie(o,[zT])&&(e=!0)})),e}render(){var e;const o=this.props,p=o.children,t=P(o,SE);return Y("div",Object.assign({css:null===(e=this.props.styles)||void 0===e?void 0:e.modalHeader},Z(t),{ref:this.handleRef}),p)}}).displayName="ModalHeader",EE.componentId="Modal.Header",EE.propTypes=TE,EE.allowedProps=["children","variant","spacing"],EE.defaultProps={variant:"default",spacing:"default"},IE=EE))||IE)||IE);const XE={children:E.node,padding:D.spacing,elementRef:E.func,as:E.elementType,variant:E.oneOf(["default","inverse"]),overflow:E.oneOf(["scroll","fit"])},HE=["as","elementRef","overflow","variant","padding","children"];var ZE,VE,kE;let DE=(ZE=_(((e,o)=>({modalBody:{label:"modalBody",boxSizing:"border-box",flex:"1 1 auto",overflowY:"auto","&:focus":{outline:"none"},..."inverse"===o.variant?{background:e.inverseBackground}:{}}})),(e=>{var o;const p=e.colors;return{inverseBackground:null==p||null===(o=p.contrasts)||void 0===o?void 0:o.grey100100}})),ZE(VE=U()((kE=class e extends u.Component{constructor(e){super(e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.state={isFirefox:!1}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o);const p=this.ref&&de(this.ref),t=!(!p||!Array.prototype.slice.call(p).join("").match(/(?:-moz-)/));t&&this.setState({isFirefox:t})}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){var o;const p=this.props,t=p.as;p.elementRef;const n=p.overflow;p.variant;const r=p.padding,c=p.children,s=P(p,HE),l=J.omitViewProps(pe(s,e.allowedProps),e),i="fit"===n;return Y(J,Object.assign({},l,{display:"block",width:i?"100%":void 0,height:i?"100%":void 0,elementRef:this.handleRef,as:t,css:null===(o=this.props.styles)||void 0===o?void 0:o.modalBody,padding:r},this.state.isFirefox&&{tabIndex:-1}),c)}},kE.displayName="ModalBody",kE.componentId="Modal.Body",kE.propTypes=XE,kE.allowedProps=["children","padding","elementRef","as","variant","overflow"],kE.defaultProps={padding:"medium",as:"div",variant:"default"},VE=kE))||VE)||VE);const _E={children:E.node,variant:E.oneOf(["default","inverse"])},jE=["children"];var FE,UE,YE;let GE=(FE=_(((e,o)=>{const p="inverse"===o.variant?{background:e.inverseBackground,borderTop:`${e.borderWidth} solid ${e.inverseBorderColor}`}:{background:e.background,borderTop:`${e.borderWidth} solid ${e.borderColor}`};return{modalFooter:{label:"modalFooter",flex:"0 0 auto",boxSizing:"border-box",padding:e.padding,borderBottomRightRadius:e.borderRadius,borderBottomLeftRadius:e.borderRadius,display:"flex",justifyContent:"flex-end",...p}}}),(e=>{var o,p,t,n;const r=e.colors,c=e.spacing,s=e.borders;return{...{background:null==r||null===(o=r.contrasts)||void 0===o?void 0:o.grey1111,borderColor:null==r||null===(p=r.contrasts)||void 0===p?void 0:p.grey1214,borderWidth:null==s?void 0:s.widthSmall,borderRadius:null==s?void 0:s.radiusMedium,padding:null==c?void 0:c.small,inverseBackground:null==r||null===(t=r.contrasts)||void 0===t?void 0:t.grey100100,inverseBorderColor:null==r||null===(n=r.contrasts)||void 0===n?void 0:n.grey100100}}})),FE(UE=U()(((YE=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){var e;const o=this.props,p=o.children,t=P(o,jE);return Y("div",Object.assign({css:null===(e=this.props.styles)||void 0===e?void 0:e.modalFooter},Z(t),{ref:this.handleRef}),p)}}).displayName="ModalFooter",YE.componentId="Modal.Footer",YE.propTypes=_E,YE.allowedProps=["children","variant"],YE.defaultProps={variant:"default"},UE=YE))||UE)||UE);const $E={label:E.string.isRequired,children:E.node,as:E.elementType,size:E.oneOf(["auto","small","medium","large","fullscreen"]),variant:E.oneOf(["default","inverse"]),open:E.bool,defaultFocusElement:E.oneOfType([E.element,E.func]),shouldReturnFocus:E.bool,shouldCloseOnDocumentClick:E.bool,onOpen:E.func,onClose:E.func,onDismiss:E.func,contentRef:E.func,mountNode:E.oneOfType([_e,E.func]),insertAt:E.oneOf(["bottom","top"]),liveRegion:E.oneOfType([_e,E.arrayOf(_e),E.func]),transition:Ke,onEnter:E.func,onEntering:E.func,onEntered:E.func,onExit:E.func,onExiting:E.func,onExited:E.func,constrain:E.oneOf(["window","parent"]),overflow:E.oneOf(["scroll","fit"])},KE=["open","onOpen","onClose","mountNode","insertAt","transition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","constrain","overflow"];var QE,JE,eP;let oP=(QE=_(((e,o)=>{const p=o.size,t=o.variant,n={maxWidth:"95%",maxHeight:"95%",..."fit"===o.overflow&&{transform:"translateY(2.5%)"}},r={auto:{flex:"0 1 auto",minWidth:e.autoMinWidth,...n},small:{flex:`0 1 ${e.smallMaxWidth}`,...n},medium:{flex:`0 1 ${e.mediumMaxWidth}`,...n},large:{flex:`0 1 ${e.largeMaxWidth}`,...n},fullscreen:{flex:1,width:"100%",height:"100%",boxShadow:"none",border:"none",borderRadius:0}},c="inverse"===t?{background:e.inverseBackground,color:e.inverseTextColor}:{background:e.background,color:e.textColor};return{modal:{label:"modal",fontFamily:e.fontFamily,display:"flex",minWidth:"1px",flexDirection:"column",position:"relative",boxSizing:"border-box",boxShadow:e.boxShadow,border:`0.0625rem solid ${e.borderColor}`,borderRadius:e.borderRadius,...r[p],...c},constrainContext:{label:"modal__constrainContext",display:"block",position:"relative",width:"100%",height:"100%"}}}),(e=>{var o,p,t,n,r;const c=e.colors,s=e.typography,l=e.borders,i=e.breakpoints,a=e.shadows,M=e.stacking;return{...{fontFamily:null==s?void 0:s.fontFamily,textColor:null==c||null===(o=c.contrasts)||void 0===o?void 0:o.grey125125,background:null==c||null===(p=c.contrasts)||void 0===p?void 0:p.white1010,borderColor:null==c||null===(t=c.contrasts)||void 0===t?void 0:t.grey1424,borderRadius:null==l?void 0:l.radiusMedium,inverseBackground:null==c||null===(n=c.contrasts)||void 0===n?void 0:n.grey100100,inverseTextColor:null==c||null===(r=c.contrasts)||void 0===r?void 0:r.white1010,autoMinWidth:null==i?void 0:i.xSmall,smallMaxWidth:null==i?void 0:i.small,mediumMaxWidth:null==i?void 0:i.medium,largeMaxWidth:null==i?void 0:i.large,boxShadow:null==a?void 0:a.depth3,zIndex:null==M?void 0:M.topmost}}})),QE(JE=U()((eP=class extends u.Component{constructor(e){var o;super(e),this._DOMNode=null,this._content=null,this.ref=null,this.handleRef=e=>{this.ref=e},this.handlePortalOpen=e=>{this.DOMNode=e},this.handleTransitionComplete=()=>{this.setState({transitioning:!1})},this.contentRef=e=>{this._content=e,"function"==typeof this.props.contentRef&&this.props.contentRef(e)},this.state={transitioning:!1,open:null!==(o=e.open)&&void 0!==o&&o}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(e){var o,p;this.props.open!==e.open&&this.setState({transitioning:!0,open:!!this.props.open}),null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p)}get defaultFocusElement(){return this.props.defaultFocusElement}get DOMNode(){return this._DOMNode}set DOMNode(e){this._DOMNode=e}get maskPlacement(){return"fit"===this.props.overflow?"stretch":"center"}renderChildren(){const e=this.props,o=e.children,p=e.variant,t=e.overflow;return u.Children.map(o,(e=>{var o;if(e)return u.isValidElement(e)?ye(e,{variant:p,overflow:(null==e||null===(o=e.props)||void 0===o?void 0:o.overflow)||t}):e}))}renderDialog(e){const o=this.props,p=o.onDismiss,t=o.label,n=o.shouldCloseOnDocumentClick,r=o.shouldReturnFocus,c=o.liveRegion,s=o.size,l=o.constrain,i=o.as,a=o.styles,M="fullscreen"===s,b=Y(Fe,Object.assign({},Z(e),{as:i,open:!0,label:t,defaultFocusElement:this.defaultFocusElement,shouldCloseOnDocumentClick:n,shouldCloseOnEscape:!0,shouldContainFocus:!0,shouldReturnFocus:r,liveRegion:c,onDismiss:p,css:null==a?void 0:a.modal,ref:this.contentRef}),this.renderChildren());return Y(Qe,{placement:this.maskPlacement,fullscreen:"window"===l,themeOverride:M?{borderRadius:"0em",borderWidth:"0em"}:{}},b)}render(){var e;const o=this.props,p=o.open,t=o.onOpen,n=o.onClose,r=o.mountNode,c=o.insertAt,s=o.transition,l=o.onEnter,i=o.onEntering,a=o.onEntered,M=o.onExit,b=o.onExiting,z=o.onExited,d=o.constrain;o.overflow;const O=P(o,KE),h=this.state.open||this.state.transitioning;return Y(Ue,{mountNode:r,insertAt:c,open:h,onOpen:this.handlePortalOpen},Y(ge,{in:p,transitionOnMount:!0,type:s,onEnter:l,onEntering:i,onEntered:Ce(this.handleTransitionComplete,a,t),onExit:M,onExiting:b,onExited:Ce(this.handleTransitionComplete,z,n)},"parent"===d?Y("span",{css:null===(e=this.props.styles)||void 0===e?void 0:e.constrainContext},this.renderDialog(O)):this.renderDialog(O)))}},eP.displayName="Modal",eP.componentId="Modal",eP.propTypes=$E,eP.allowedProps=["label","children","as","size","variant","open","defaultFocusElement","shouldReturnFocus","shouldCloseOnDocumentClick","onOpen","onClose","onDismiss","contentRef","mountNode","insertAt","liveRegion","transition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","constrain","overflow"],eP.defaultProps={open:!1,size:"auto",variant:"default",transition:"fade",insertAt:"bottom",shouldCloseOnDocumentClick:!0,shouldReturnFocus:!0,constrain:"window",overflow:"scroll"},eP.Header=PE,eP.Body=DE,eP.Footer=GE,JE=eP))||JE)||JE);const pP={renderLabel:E.oneOfType([E.node,E.string,E.func]).isRequired,renderAfter:E.oneOfType([E.node,E.func]),renderIcon:E.oneOfType([E.node,E.func]),href:E.string,onClick:E.func,isSelected:E.bool,elementRef:E.func,as:E.elementType,cursor:E.string,isDisabled:E.bool};var tP,nP,rP;let cP=(tP=_(((e,o)=>{const p=o.isSelected,t=o.isDisabled,n={appearance:"none",overflow:"visible",direction:"inherit",margin:"0",textDecoration:"none",userSelect:"none",touchAction:"manipulation",background:"transparent",border:"none",outline:"none",lineHeight:e.height,padding:`0 ${e.padding}`,alignItems:"flex-start","&:hover":{textDecoration:"underline",textDecorationColor:e.textColor},...t&&{pointerEvents:"none",opacity:.5}};return{item:{label:"item",...n,"&:is(a), &:is(button)":n,"&:-webkit-any(a), &:-webkit-any(button)":n},label:{label:"item__label",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontFamily:e.fontFamily,fontSize:e.fontSize,fontWeight:e.fontWeight,color:e.textColor,...p&&{color:e.textColorSelected,textDecoration:"underline"}}}}),(e=>{var o,p,t;const n=e.colors,r=e.spacing,c=e.typography;return{...{fontFamily:null==c?void 0:c.fontFamily,fontSize:"1.125rem",fontWeight:null==c?void 0:c.fontWeightBold,textColor:null==n||null===(o=n.contrasts)||void 0===o?void 0:o.blue4570,textColorSelected:null==n||null===(p=n.contrasts)||void 0===p?void 0:p.grey125125,height:"2.25rem",padding:null==r?void 0:r.small,backgroundColor:null==n||null===(t=n.contrasts)||void 0===t?void 0:t.white1010}}})),tP(nP=U()((rP=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.handleClick=e=>{const o=this.props,p=o.isDisabled,t=o.onClick;p?(e.preventDefault(),e.stopPropagation()):"function"==typeof t&&t(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){var o,p;const t=X(e,this.props),n=this.props,r=n.renderIcon,c=n.renderLabel,s=n.href,l=n.renderAfter,i=n.cursor,a=n.isDisabled,M=$(r),b=$(c),z=Ie(b,[Ae]);return M&&Q(z,"[AppNav] If an icon is used, the label text should be wrapped in ."),Y(J,Object.assign({},Z(this.props),{as:t,href:s,onClick:this.handleClick,disabled:a,elementRef:this.handleRef,display:"flex",position:"relative",borderRadius:"medium",cursor:a?"not-allowed":i,css:null===(o=this.props.styles)||void 0===o?void 0:o.item}),M,z?b:Y("span",{css:null===(p=this.props.styles)||void 0===p?void 0:p.label},b),l&&$(l))}},rP.displayName="Item",rP.componentId="AppNav.Item",rP.allowedProps=["renderLabel","renderAfter","renderIcon","href","onClick","isSelected","elementRef","as","cursor","isDisabled"],rP.propTypes=pP,rP.defaultProps={children:null,isSelected:!1,cursor:"pointer",isDisabled:!1},nP=rP))||nP)||nP);const sP={screenReaderLabel:E.string.isRequired,children:Le.oneOf([cP]),debounce:E.number,renderBeforeItems:E.oneOfType([E.node,E.func]),renderAfterItems:E.oneOfType([E.node,E.func]),margin:D.spacing,elementRef:E.func,renderTruncateLabel:E.oneOfType([E.node,E.func]),onUpdate:E.func,visibleItemsCount:E.number};var lP,iP,aP;let MP=(lP=_((e=>({appNav:{label:"appNav",fontFamily:e.fontFamily,borderBottom:`${e.borderWidth} ${e.borderStyle} ${e.borderColor}`},alignCenter:{alignItems:"center"},list:{label:"appNav__list",height:e.height,flexGrow:1,flexShrink:1,flexBasis:"0",minWidth:"0.0625rem",paddingInlineStart:e.horizontalMargin},horizontalMargin:e.horizontalMargin.toString(),menuTriggerWidth:e.menuTriggerWidth.toString()})),(e=>{var o;const p=e.colors,t=e.borders,n=e.spacing,r=e.typography;return{...{fontFamily:null==r?void 0:r.fontFamily,height:"3.75rem",borderColor:null==p||null===(o=p.contrasts)||void 0===o?void 0:o.grey1214,borderStyle:null==t?void 0:t.style,borderWidth:null==t?void 0:t.widthSmall,horizontalMargin:null==n?void 0:n.xxSmall,menuTriggerWidth:"7.5rem"}}})),lP(iP=U()((aP=class e extends u.Component{constructor(...e){super(...e),this.state={isMeasuring:!1},this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}renderMenu(o){return Y(hE,{trigger:Y(e.Item,{renderLabel:$(this.props.renderTruncateLabel)})},o.map(((e,o)=>Y(hE.Item,{href:e.props.href?e.props.href:void 0,onClick:e.props.onClick&&!e.props.href?e.props.onClick:void 0,key:o},$(e.props.renderLabel)))))}render(){const o=this.props,p=o.visibleItemsCount,t=o.screenReaderLabel,n=o.margin,r=o.debounce,c=o.styles,s=J.omitViewProps(pe(this.props,e.allowedProps),e),l=$(this.props.renderBeforeItems),i=$(this.props.renderAfterItems),a=l||i;return Y(J,Object.assign({},s,{as:"nav",css:[null==c?void 0:c.appNav,a?null==c?void 0:c.alignCenter:""],margin:n,display:a?"flex":"block",elementRef:this.handleRef}),l&&Y("span",null,l),Y(Je,{visibleItemsCount:p,debounce:r,onUpdate:this.props.onUpdate,renderHiddenItemMenu:e=>this.renderMenu(e),itemSpacing:null==c?void 0:c.horizontalMargin,fixMenuTriggerWidth:null==c?void 0:c.menuTriggerWidth,css:null==c?void 0:c.list,"aria-label":$(t)},this.props.children),i&&Y("span",null,i))}},aP.displayName="AppNav",aP.componentId="AppNav",aP.allowedProps=["screenReaderLabel","children","debounce","renderBeforeItems","renderAfterItems","margin","elementRef","renderTruncateLabel","onUpdate","visibleItemsCount"],aP.propTypes=sP,aP.defaultProps={children:null,debounce:300,margin:"0",renderTruncateLabel:()=>"More",visibleItemsCount:0},aP.Item=cP,iP=aP))||iP)||iP);const bP={renderLabel:E.oneOfType([E.node,E.func]).isRequired,id:E.string,interaction:E.oneOf(["enabled","disabled","readonly"]),messages:E.arrayOf(t.message),placeholder:E.string,isRequired:E.bool,showArrows:E.bool,size:E.oneOf(["medium","large"]),value:E.oneOfType([E.string,E.number]),width:E.string,display:E.oneOf(["inline-block","block"]),inputRef:E.func,onFocus:E.func,onBlur:E.func,onChange:E.func,onDecrement:E.func,onIncrement:E.func,onKeyDown:E.func,inputMode:E.oneOf(["numeric","decimal","tel"]),textAlign:E.oneOf(["start","center"])};var zP,dP,OP,hP,AP,uP;let fP=(zP=K(),dP=_(((e,o,p)=>{const t=o.size,n=o.textAlign,r=p.interaction,c=p.hasFocus,s=p.invalid,l="disabled"===r?{cursor:"not-allowed",pointerEvents:"none",opacity:.5}:{},i=c?{opacity:1,transform:"scale(1)"}:{},a=s?{borderColor:e.errorOutlineColor}:{},M=s?{borderColor:e.errorBorderColor}:{},b={all:"initial",textAlign:n,direction:"inherit",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",appearance:"none",lineHeight:1,margin:"0",flex:1,minWidth:"0.0625rem",boxSizing:"border-box",fontFamily:"inherit",fontSize:"inherit",fontWeight:e.fontWeight,color:e.color,background:e.background,padding:e.padding,textyAlign:n,"&::placeholder":{color:e.placeholderColor}};return{numberInput:{label:"numberInput"},arrowContainer:{label:"numberInput_arrowContainer",flex:`0 0 ${e.arrowsContainerWidth}`,display:"flex",flexDirection:"column",...l},arrow:{label:"numberInput_arrow",cursor:"pointer",userSelect:"none",textAlign:"center",flex:1,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.arrowsBackgroundColor,borderTop:"none",borderInlineEnd:"none",borderInlineStart:`${e.borderWidth} ${e.borderStyle} ${e.arrowsBorderColor}`,borderBottom:`${e.borderWidth} ${e.borderStyle} ${e.arrowsBorderColor}`,color:e.arrowsColor,"&:last-child":{borderBottom:"none"},"&:hover":{backgroundColor:e.arrowsHoverBackgroundColor},"&:active":{boxShadow:e.arrowsActiveBoxShadow}},inputWidth:{label:"numberInput_inputWidth",display:"block",position:"relative","&::before":{content:'""',pointerEvents:"none",boxSizing:"border-box",display:"block",position:"absolute",top:"-0.25rem",bottom:"-0.25rem",left:"-0.25rem",right:"-0.25rem",border:`${e.focusOutlineWidth} ${e.focusOutlineStyle} ${e.focusOutlineColor}`,borderRadius:`calc(${e.borderRadius} * 1.5)`,transition:"all 0.2s",opacity:0,transform:"scale(0.95)",...i,...a}},inputContainer:{label:"numberInput_inputContainer",display:"flex",margin:"0",boxSizing:"border-box",transition:"all 0.2s",overflow:"hidden",fontFamily:e.fontFamily,border:`${e.borderWidth} ${e.borderStyle} ${e.borderColor}`,borderRadius:e.borderRadius,...l,...M,..."medium"===t?{fontSize:e.mediumFontSize,height:e.mediumHeight}:{fontSize:e.largeFontSize,height:e.largeHeight}},input:{label:"numberInput_input",...b,"&:is(input)[type]":b,"&:-webkit-any(input)[type]":b,"&::-webkit-inner-spin-button":{display:"none"},"&::-webkit-outer-spin-button":{display:"none"},'&:is(input)[type="number"]':{MozAppearance:"textfield"}}}}),(e=>{var o,p,t,n,r,c,s,l,i,a,M,b;const z=e.colors,d=e.spacing,O=e.borders,h=e.typography,A=e.forms,u=e.key,f={canvas:{color:e["ic-brand-font-color-dark"],arrowsColor:e["ic-brand-font-color-dark"],focusOutlineColor:e["ic-brand-primary"]}};return{...{fontFamily:null==h?void 0:h.fontFamily,fontWeight:null==h?void 0:h.fontWeightNormal,borderWidth:null==O?void 0:O.widthSmall,borderStyle:null==O?void 0:O.style,borderColor:null==z||null===(o=z.contrasts)||void 0===o?void 0:o.grey1214,borderRadius:null==O?void 0:O.radiusMedium,color:null==z||null===(p=z.contrasts)||void 0===p?void 0:p.grey125125,background:null==z||null===(t=z.contrasts)||void 0===t?void 0:t.white1010,padding:`0 ${null==d?void 0:d.small}`,arrowsContainerWidth:"2rem",arrowsColor:null==z||null===(n=z.contrasts)||void 0===n?void 0:n.grey125125,arrowsBackgroundColor:null==z||null===(r=z.contrasts)||void 0===r?void 0:r.grey1111,arrowsHoverBackgroundColor:null==z||null===(c=z.contrasts)||void 0===c?void 0:c.grey1214,arrowsBorderColor:null==z||null===(s=z.contrasts)||void 0===s?void 0:s.grey1214,arrowsActiveBoxShadow:`inset 0 0 3px 1px ${null==z||null===(l=z.contrasts)||void 0===l?void 0:l.grey1214}`,focusOutlineWidth:null==O?void 0:O.widthMedium,focusOutlineStyle:null==O?void 0:O.style,focusOutlineColor:null==z||null===(i=z.contrasts)||void 0===i?void 0:i.blue4570,errorBorderColor:null==z||null===(a=z.contrasts)||void 0===a?void 0:a.red4570,errorOutlineColor:null==z||null===(M=z.contrasts)||void 0===M?void 0:M.red4570,placeholderColor:null==z||null===(b=z.contrasts)||void 0===b?void 0:b.grey4570,mediumFontSize:null==h?void 0:h.fontSizeMedium,mediumHeight:null==A?void 0:A.inputHeightMedium,largeFontSize:null==h?void 0:h.fontSizeLarge,largeHeight:null==A?void 0:A.inputHeightLarge},...f[u]}})),zP(OP=dP(OP=U()((hP=class e extends u.Component{constructor(...e){super(...e),this.state={hasFocus:!1},this.ref=null,this._input=null,this._id=void 0,this.handleRef=e=>{this.ref=e},this.handleInputRef=e=>{this._input=e,"function"==typeof this.props.inputRef&&this.props.inputRef(e)},this.handleFocus=e=>{this.setState({hasFocus:!0}),"function"==typeof this.props.onFocus&&this.props.onFocus(e)},this.handleBlur=e=>{this.setState({hasFocus:!1}),"function"==typeof this.props.onBlur&&this.props.onBlur(e)},this.handleChange=e=>{"function"==typeof this.props.onChange&&this.props.onChange(e,e.target.value)},this.handleKeyDown=e=>{const o=this.props,p=o.onKeyDown,t=o.onDecrement,n=o.onIncrement;"function"==typeof p&&p(e),e.keyCode===ve.codes.down?(e.preventDefault(),"function"==typeof t&&t(e)):e.keyCode===ve.codes.up&&(e.preventDefault(),"function"==typeof n&&n(e))},this.handleClickUpArrow=e=>{this.arrowClicked(e,this.props.onIncrement)},this.handleClickDownArrow=e=>{this.arrowClicked(e,this.props.onDecrement)}}get id(){return this.props.id?this.props.id:(this._id||(this._id=this.props.deterministicId()),this._id)}get invalid(){return!!this.props.messages&&this.props.messages.some((e=>"error"===e.type))}get interaction(){return fe({props:this.props})}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleVariables)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleVariables)}get makeStyleVariables(){return{interaction:this.interaction,hasFocus:this.state.hasFocus,invalid:this.invalid}}arrowClicked(e,o){const p=this.interaction;var t;(e.preventDefault(),"enabled"===p)&&(null===(t=this._input)||void 0===t||t.focus(),"function"==typeof o&&o(e))}renderArrows(){var e,o,p;return Y("span",{css:null===(e=this.props.styles)||void 0===e?void 0:e.arrowContainer},Y("button",{"aria-hidden":!0,css:null===(o=this.props.styles)||void 0===o?void 0:o.arrow,onMouseDown:this.handleClickUpArrow,tabIndex:-1,type:"button"},AP||(AP=Y(d,null))),Y("button",{"aria-hidden":!0,css:null===(p=this.props.styles)||void 0===p?void 0:p.arrow,onMouseDown:this.handleClickDownArrow,tabIndex:-1,type:"button"},uP||(uP=Y(z,null))))}render(){var o,p,t;const n=this.props,r=n.renderLabel,c=n.display,s=n.placeholder,l=n.isRequired,i=n.showArrows,a=n.value,M=n.width,b=this.interaction;return Y(A,Object.assign({},te(this.props,A.allowedProps),{label:$(r),inline:"inline-block"===c,id:this.id,elementRef:this.handleRef}),Y("span",{css:null===(o=this.props.styles)||void 0===o?void 0:o.inputWidth,style:M?{width:M}:void 0},Y("span",{css:null===(p=this.props.styles)||void 0===p?void 0:p.inputContainer},Y("input",Object.assign({},pe(this.props,[...A.allowedProps,...e.allowedProps]),{css:null===(t=this.props.styles)||void 0===t?void 0:t.input,"aria-invalid":this.invalid?"true":void 0,id:this.id,type:"number",inputMode:this.props.inputMode,placeholder:s,ref:this.handleInputRef,required:l,value:a,disabled:"disabled"===b,readOnly:"readonly"===b,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,onKeyDown:this.handleKeyDown})),i?this.renderArrows():null)))}},hP.displayName="NumberInput",hP.componentId="NumberInput",hP.allowedProps=["renderLabel","id","interaction","messages","placeholder","isRequired","showArrows","size","value","width","display","inputRef","onFocus","onBlur","onChange","onDecrement","onIncrement","onKeyDown","inputMode","textAlign"],hP.propTypes=bP,hP.defaultProps={interaction:void 0,messages:[],isRequired:!1,showArrows:!0,size:"medium",display:"block",textAlign:"start",inputMode:"numeric"},OP=hP))||OP)||OP)||OP);const mP=u.createContext({history:[],navigateToPreviousPage:()=>{}}),qP={children:E.oneOfType([E.func,E.node]),defaultFocusElement:E.oneOfType([E.element,E.func]),padding:D.spacing,textAlign:E.oneOf(["start","center","end"])},RP=["children"];class WP extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}get _content(){return this.ref}get defaultFocusElement(){let e=this.props.defaultFocusElement;if("function"==typeof e&&(e=e()),e&&(e=ze(e)),!e){const o=eo(this.ref);e=o&&o[0]}return Q(e&&!!e.focus,"[Page] A default focusable element is required or focus will be lost."),e}get focusable(){const e=this.defaultFocusElement;return!!e&&"function"==typeof e.focus}focus(){this.focusable&&this.defaultFocusElement.focus()}render(){const e=this.props,o=e.children,p=P(e,RP);return f.createElement(mP.Consumer,null,(({history:e,navigateToPreviousPage:t})=>f.createElement(J,{as:"div",padding:p.padding,textAlign:p.textAlign,elementRef:this.handleRef},o&&"function"==typeof o?o(e,t):o)))}}WP.displayName="Page",WP.componentId="Pages.Page",WP.allowedProps=["children","defaultFocusElement","padding","textAlign"],WP.propTypes=qP,WP.defaultProps={defaultFocusElement:null,padding:"small",textAlign:"start",children:null},WP.contextTypes={history:E.array,navigateToPreviousPage:E.func};const vP={children:Le.oneOf([WP]),defaultPageIndex:E.number,activePageIndex:Se(E.number,"onPageIndexChange","defaultPageIndex"),onPageIndexChange:E.func,margin:D.spacing};var gP,yP,LP,NP;let BP=(gP=K(),yP=_((e=>({pages:{fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,background:e.background,display:"block"}})),(e=>{var o,p;const t=e.colors,n=e.typography;return{fontSize:null==n?void 0:n.fontSizeMedium,fontFamily:null==n?void 0:n.fontFamily,fontWeight:null==n?void 0:n.fontWeightNormal,color:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.grey125125,background:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.white1010}})),gP(LP=yP((NP=class extends u.Component{get _contentElement(){return this.ref}constructor(e){super(e),this._timeouts=[],this._activePage=null,this._contentId=void 0,this.ref=null,this.handleRef=e=>{this.ref=e},this.handleBackButtonClick=()=>{var e,o;const p=[...this.state.history],t=p.pop(),n=p[p.length-1];this.setState({history:p}),null===(e=(o=this.props).onPageIndexChange)||void 0===e||e.call(o,n||0,t)},this.state={history:["number"==typeof e.defaultPageIndex?e.defaultPageIndex:e.activePageIndex]},this._contentId=e.deterministicId()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;const p=this.props.activePageIndex,t=this.state.history;"number"!=typeof p||0!==t.length&&p===t[t.length-1]||this.setState({history:[...t,p]}),this._timeouts.push(setTimeout((()=>{!this.focused&&this.focus()}),0)),null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentWillUnmount(){this._timeouts.forEach(clearTimeout)}get focused(){return $e(this.ref)}focus(){this._timeouts.push(setTimeout((()=>{const e=this._activePage;if(e&&e.focusable)e.focus();else{const e=eo(this.ref),o=e&&e[0];o&&o.focus()}})))}get activePage(){const e=this.props,o=e.activePageIndex,p=e.children,t=f.Children.toArray(p),n=o{this._activePage=e}}):null}render(){var e;const o=this.activePage;return o?Y(mP.Provider,{value:{history:this.state.history,navigateToPreviousPage:()=>{this.handleBackButtonClick()}}},Y(J,{as:"div",id:this._contentId,css:null===(e=this.props.styles)||void 0===e?void 0:e.pages,margin:this.props.margin,role:"region",elementRef:this.handleRef},o)):null}},NP.displayName="Pages",NP.componentId="Pages",NP.allowedProps=["children","defaultPageIndex","activePageIndex","onPageIndexChange","margin"],NP.propTypes=vP,NP.defaultProps={activePageIndex:0},NP.Page=WP,LP=NP))||LP)||LP);const wP={children:E.node.isRequired,current:E.bool,onClick:E.func};var CP,TP;let SP=U()((TP=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}render(){const o=this.props.current?["onClick","href"]:[],p=pe(this.props,e.allowedProps,o);return f.createElement(me,Object.assign({color:"primary",withBackground:this.props.current,withBorder:this.props.current},p,{"aria-current":this.props.current?"page":void 0,elementRef:this.handleRef}),this.props.children)}},TP.displayName="PaginationButton",TP.componentId="Pagination.Page",TP.propTypes=wP,TP.allowedProps=["children","current"],TP.defaultProps={current:!1},CP=TP))||CP;const xP={direction:E.oneOf(["first","prev","next","last"]),label:E.string.isRequired,buttonRef:E.func,onClick:E.func},IP=["label","direction","buttonRef"];var EP,PP;let XP=U()(((PP=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}get margin(){switch(this.props.direction){case"first":return"0 xx-small 0 0";case"last":return"0 0 0 xx-small";default:return}}get Icon(){switch(this.props.direction){case"first":return jg;case"prev":return Be;case"next":return we;case"last":return _g;default:return null}}render(){const e=this.props,o=e.label,p=e.direction,t=e.buttonRef,n=P(e,IP);return f.createElement(We,{elementRef:this.handleRef,on:["hover","focus"],renderTip:f.createElement(Gr,null,o)},f.createElement(ao,Object.assign({},n,{size:"small",withBackground:!1,withBorder:!1,screenReaderLabel:o,rel:n.href||n.to?p:void 0,elementRef:t,margin:this.margin}),this.Icon))}}).displayName="PaginationArrowButton",PP.componentId="Pagination.Navigation",PP.allowedProps=["direction","label","buttonRef"],PP.propTypes=xP,PP.defaultProps={},EP=PP))||EP;const HP={numberOfPages:E.number.isRequired,currentPageIndex:E.number.isRequired,onChange:E.func.isRequired,screenReaderLabel:E.func.isRequired,label:E.func,disabled:E.bool,inputRef:E.func};var ZP,VP,kP;let DP=(ZP=_((e=>({paginationPageInput:{label:"paginationPageInput",display:"inline-flex",alignItems:"center",margin:`0 ${e.inputSpacing}`},numberInput:{label:"paginationPageInput__input",width:e.inputWidth},inputLabel:{label:"paginationPageInput__inputLabel",marginInlineStart:e.inputSpacing,whiteSpace:"nowrap"}})),(e=>({...{inputSpacing:e.spacing.xSmall,inputWidth:"4.5rem"}}))),ZP(VP=U()(((kP=class extends u.Component{constructor(e){super(e),this.ref=null,this.handleRef=e=>{this.ref=e},this.handleInputRef=e=>{"function"==typeof this.props.inputRef&&this.props.inputRef(e)},this.handleChange=(e,o)=>{let p=o;o.length>0&&isNaN(o.slice(-1))&&(p=o.slice(0,-1)),this.setState({number:p?Number(p):this.MIN,value:p})},this.handleDecrement=e=>{this.setNewPage(e,Math.floor(this.currentPage-1))},this.handleIncrement=e=>{this.setNewPage(e,Math.floor(this.currentPage+1))},this.handleBlur=e=>{Math.round(this.state.number)!==this.currentPage&&this.setNewPage(e,Math.round(this.state.number))},this.state=this.initialState}get currentPage(){return this.props.currentPageIndex+1}get initialState(){return{number:this.currentPage,value:`${this.currentPage}`}}get MIN(){return 1}get MAX(){return this.props.numberOfPages}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(e){var o,p;null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p),this.props.currentPageIndex!==e.currentPageIndex&&this.resetInitialState()}resetInitialState(){this.setState(this.initialState)}handleKeyDown(e){if("enter"===e.key.toLowerCase()){const o=this.state,p=o.value,t=o.number;if(""===p||isNaN(p))return void this.resetInitialState();this.setNewPage(e,t)}}getNumberWithinRange(e){return ethis.MAX?this.MAX:e}setNewPage(e,o){const p=this.getNumberWithinRange(o);this.setState({number:p,value:`${p}`}),this.props.onChange(e,p-1)}renderLabel(){const e=this.props,o=e.label,p=e.numberOfPages,t=e.styles;return"function"==typeof o&&o(p)?Y("span",{css:null==t?void 0:t.inputLabel},o(p)):null}renderScreenReaderLabel(){const e=this.props,o=e.screenReaderLabel,p=e.numberOfPages;return Y(Ae,null,o(this.currentPage,p))}render(){const e=this.props,o=e.styles,p=e.disabled;return Y("span",{css:null==o?void 0:o.paginationPageInput,ref:this.handleRef},Y("span",{css:null==o?void 0:o.numberInput},Y(fP,{renderLabel:this.renderScreenReaderLabel(),onBlur:this.handleBlur,onChange:this.handleChange,onDecrement:this.handleDecrement,onIncrement:this.handleIncrement,onKeyDown:this.handleKeyDown.bind(this),interaction:p?"disabled":"enabled",showArrows:!1,value:this.state.value,width:"100%",textAlign:"center",inputRef:this.handleInputRef})),this.renderLabel())}}).displayName="PaginationPageInput",kP.componentId="Pagination.PageInput",kP.propTypes=HP,kP.allowedProps=["numberOfPages","currentPageIndex","onChange","screenReaderLabel","label","disabled","inputRef"],kP.defaultProps={disabled:!1},VP=kP))||VP)||VP);const _P={children:Le.oneOf([SP]),disabled:E.bool,withFirstAndLastButton:E.bool,showDisabledButtons:E.bool,label:E.node,labelNext:E.string,labelPrev:E.string,labelFirst:E.string,labelLast:E.string,labelNumberInput:E.func,screenReaderLabelNumberInput:E.func,variant:E.oneOf(["full","compact","input"]),margin:D.spacing,as:E.elementType,elementRef:E.func,inputRef:E.func,shouldHandleFocus:E.bool,totalPageNumber:E.number,currentPage:E.number,siblingCount:E.number,boundaryCount:E.number,onPageChange:E.func,renderPageIndicator:E.func,ellipsis:E.node};var jP,FP,UP,YP;const GP=e=>{const o=e.children;return o?Array.isArray(o)?o:[o]:[]};function $P(e){return e.children?"compact"===e.variant&&GP(e).length>5:"compact"===e.variant&&e.totalPageNumber>5}let KP=K()(jP=_((()=>({pagination:{label:"pagination",textAlign:"center"},pages:{label:"pagination__pages",display:"inline-flex",alignItems:"center"}})),null)(jP=U()((FP=class e extends u.Component{constructor(o){super(o),this._labelId=void 0,this._firstButton=null,this._prevButton=null,this._nextButton=null,this._lastButton=null,this.ref=null,this.currentPageRef=null,this.handleElementRef=e=>{this.ref=e,e&&"function"==typeof this.props.elementRef&&this.props.elementRef(e)},this.handleInputRef=e=>{"function"==typeof this.props.inputRef&&this.props.inputRef(e)},this.renderDefaultPageInput=()=>{const e=this.props,o=e.currentPage,p=e.totalPageNumber;return Y(DP,{numberOfPages:p,currentPageIndex:o-1,onChange:(e,p)=>{var t,n;return null===(t=(n=this.props).onPageChange)||void 0===t?void 0:t.call(n,p+1,o)},screenReaderLabel:this.props.screenReaderLabelNumberInput,label:this.props.labelNumberInput,disabled:this.props.disabled,inputRef:this.handleInputRef})},this.handleNavigation=(e,o)=>{const p=this.props.onPageChange;"function"==typeof p&&p(e,o)},this.renderPagesInInterval=(o,p,t)=>{if(p-o>1e3)throw new Error("Pagination: too many pages (more than 1000)");const n=[];for(let s=o;s<=p;s++){var r,c;n.push(Y(e.Page,{ref:e=>s===t?this.currentPageRef=e:null,key:s,onClick:()=>this.handleNavigation(s,t),current:s===t},null===(r=(c=this.props).renderPageIndicator)||void 0===r?void 0:r.call(c,s,t)))}return n},this.renderDefaultPages=()=>{const e=this.props,o=e.ellipsis,p=e.currentPage,t=e.totalPageNumber,n=e.siblingCount,r=e.boundaryCount,c=e.variant,s=[];if(t<=2*r||t<=1+n+r||"full"===c)return this.renderPagesInInterval(1,t,p);if(p>r+n+1){if(s.push(this.renderPagesInInterval(1,r,p)),s.push(o),p-n>t-r+1)return s.push(this.renderPagesInInterval(t-r+1,t,p)),s;s.push(this.renderPagesInInterval(p-n,p,p))}else s.push(this.renderPagesInInterval(1,Math.max(p,r),p));return p{if(!this.withFirstAndLastButton&&("first"===e||"last"===e))return null;if(!$P(this.props)&&!this.inputMode)return null;const o=this.props,p=o.totalPageNumber,t=o.currentPage,n=this.getArrowVariant(e,t-1,p),r=n.label,c=n.shouldEnableIcon,s=n.handleButtonRef,l=this.props.disabled||!c;return c||this.showDisabledButtons?Y(XP,{direction:e,"data-direction":e,label:r,onClick:()=>{"first"===e&&this.handleNavigation(1,t),"prev"===e&&this.handleNavigation(Math.max(t-1,1),t),"next"===e&&this.handleNavigation(Math.min(t+1,p),t),"last"===e&&this.handleNavigation(p,t)},disabled:l,buttonRef:s}):null},this._labelId=o.deterministicId()}get _root(){return this.ref}get inputMode(){return"input"===this.props.variant}get childPages(){return GP(this.props)}get withFirstAndLastButton(){return this.inputMode||this.props.withFirstAndLastButton}get showDisabledButtons(){return this.inputMode||this.props.showDisabledButtons}getSnapshotBeforeUpdate(){const e=oo();return e===this._firstButton||e===this._prevButton||e===this._nextButton||e===this._lastButton?{lastFocusedButton:e}:{lastFocusedButton:void 0}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(e,o,p){var t,n,r,c,s;(null===(t=(n=this.props).makeStyles)||void 0===t||t.call(n),this.props.currentPage!==e.currentPage&&document.activeElement!==this._firstButton&&document.activeElement!==this._prevButton&&document.activeElement!==this._nextButton&&document.activeElement!==this._lastButton)&&(null===(r=this.currentPageRef)||void 0===r||null===(c=r.ref)||void 0===c||null===(s=c.focus)||void 0===s||s.call(c));this.props.shouldHandleFocus&&($P(e)||$P(this.props))&&this.focusElementAfterUpdate(p)}focusElementAfterUpdate(e){const o=e.lastFocusedButton;if(o){var p;const e=eo(this.ref),t=o.dataset.direction;let n=o;e.includes(n)||("first"!==t&&"prev"!==t||(n=e[0]),"next"!==t&&"last"!==t||(n=e[e.length-1])),null===(p=n)||void 0===p||p.focus()}}get compactView(){return $P(this.props)}transferDisabledPropToChildren(e){return e&&this.props.disabled?f.Children.map(e,(e=>f.cloneElement(e,{disabled:this.props.disabled}))):e}renderLabel(){const e="full"===this.props.variant?"inline-block":"block",o=Ge(this.props.label);return Y(J,{as:"span",padding:o?"small":"0",display:o?e:"auto",id:this._labelId},this.props.label)}renderPageInput(e){return this.props.children?Y(DP,{numberOfPages:this.childPages.length,currentPageIndex:e,onChange:this.handleInputChange.bind(this),screenReaderLabel:this.props.screenReaderLabelNumberInput,label:this.props.labelNumberInput,disabled:this.props.disabled,inputRef:this.handleInputRef}):this.renderDefaultPageInput()}handleInputChange(e,o){var p,t;null===(p=(t=this.childPages[o].props).onClick)||void 0===p||p.call(t,e)}renderPages(e){if(!this.props.children)return this.renderDefaultPages();const o=this.childPages;let p=o;if(this.compactView){const t=0,n=o.length-1,r=Math.min(n-3,Math.max(e-1,t)),c=Math.min(e+4,n);p=o.slice(r,c);const s=o[t],l=o[n];r-t>1&&p.unshift(UP||(UP=Y("span",{key:"first","aria-hidden":"true"},"…"))),r-t>0&&p.unshift(s),n-c+1>1&&p.push(YP||(YP=Y("span",{key:"last","aria-hidden":"true"},"…"))),n-c+1>0&&p.push(l)}return Y(J,{display:"inline-block"},this.transferDisabledPropToChildren(p))}getArrowVariant(e,o,p){switch(e){case"first":return{pageIndex:0,label:this.props.labelFirst||"First Page",shouldEnableIcon:o>1,handleButtonRef:e=>{this._firstButton=e}};case"prev":return{pageIndex:o-1,label:this.props.labelPrev||"Previous Page",shouldEnableIcon:o>0,handleButtonRef:e=>{this._prevButton=e}};case"next":return{pageIndex:o+1,label:this.props.labelNext||"Next Page",shouldEnableIcon:o{this._nextButton=e}};case"last":return{pageIndex:p-1,label:this.props.labelLast||"Last Page",shouldEnableIcon:o{this._lastButton=e}}}}renderArrowButton(e,o){var p,t;if(!this.props.children)return this.renderDefaultArrowButton(e);const n=this.childPages;if(!$P(this.props)&&!this.inputMode)return null;if(!this.withFirstAndLastButton&&("first"===e||"last"===e))return null;const r=this.getArrowVariant(e,o,n.length),c=r.pageIndex,s=r.label,l=r.shouldEnableIcon,i=r.handleButtonRef,a=n[c],M=(null==a||null===(p=a.props)||void 0===p?void 0:p.disabled)||this.props.disabled||!l,b=null==a||null===(t=a.props)||void 0===t?void 0:t.onClick;return l||this.showDisabledButtons?Y(XP,{direction:e,"data-direction":e,label:s,onClick:b,disabled:M,buttonRef:i}):null}render(){var o,p;const t=(n=this.childPages,r=e=>e&&e.props&&e.props.current,Number(Object.keys(n).find((e=>r(n[Number(e)])))));var n,r;const c=J.omitViewProps(pe(this.props,e.allowedProps),e);return Y(J,Object.assign({},c,{role:"navigation",as:this.props.as,elementRef:this.handleElementRef,margin:this.props.margin,css:null===(o=this.props.styles)||void 0===o?void 0:o.pagination,"aria-labelledby":this.props.label?this._labelId:void 0}),this.props.label&&this.renderLabel(),Y(J,{display:"inline-block",css:null===(p=this.props.styles)||void 0===p?void 0:p.pages},this.renderArrowButton("first",t),this.renderArrowButton("prev",t),this.inputMode?this.renderPageInput(t):this.renderPages(t),this.renderArrowButton("next",t),this.renderArrowButton("last",t)))}},FP.displayName="Pagination",FP.componentId="Pagination",FP.propTypes=_P,FP.allowedProps=["children","disabled","withFirstAndLastButton","showDisabledButtons","label","labelNext","labelPrev","labelFirst","labelLast","labelNumberInput","screenReaderLabelNumberInput","variant","margin","as","elementRef","inputRef","shouldHandleFocus","totalPageNumber","currentPage","onPageChange","siblingCount","boundaryCount","renderPageIndicator","ellipsis"],FP.defaultProps={disabled:!1,withFirstAndLastButton:!1,showDisabledButtons:!1,variant:"full",as:"div",labelNumberInput:e=>`of ${e}`,screenReaderLabelNumberInput:(e,o)=>`Select page (${e} of ${o})`,shouldHandleFocus:!0,totalPageNumber:0,currentPage:1,siblingCount:1,boundaryCount:1,ellipsis:"...",renderPageIndicator:e=>e},FP.Page=SP,FP.Navigation=XP,jP=FP))||jP)||jP)||jP;const QP={screenReaderLabel:E.string.isRequired,size:E.oneOf(["x-small","small","medium","large"]),valueMax:E.number,valueNow:E.number,formatScreenReaderValue:E.func,renderValue:E.oneOfType([E.func,E.node]),color:E.oneOf(["primary","primary-inverse"]),meterColor:E.oneOfType([E.func,E.oneOf(["info","warning","danger","alert","success","brand"])]),shouldAnimate:E.bool,margin:D.spacing,elementRef:E.func,as:E.elementType},JP=["renderValue","formatScreenReaderValue","valueNow","valueMax","screenReaderLabel","size","color","meterColor","styles"];var eX,oX,pX;let tX=(eX=_(((e,o)=>{const p=o.valueNow,t=void 0===p?0:p,n=o.valueMax,r=void 0===n?100:n,c=o.size,s=o.color,l=o.meterColor,i=o.shouldAnimate,a="function"==typeof l?l({valueNow:t,valueMax:r}):l,M=(t>r?r:t<0?0:t)/r*100+"%",b={"x-small":{track:{height:e.xSmallHeight},value:{fontSize:e.xSmallValueFontSize}},small:{track:{height:e.smallHeight},value:{fontSize:e.smallValueFontSize}},medium:{track:{height:e.mediumHeight},value:{fontSize:e.mediumValueFontSize}},large:{track:{height:e.largeHeight},value:{fontSize:e.largeValueFontSize}}},z={primary:{trackLayout:{background:e.trackColor},trackBorder:{borderBottomColor:e.trackBottomBorderColor}},"primary-inverse":{trackLayout:{background:e.trackColorInverse},trackBorder:{borderBottomColor:e.trackBottomBorderColorInverse}}},d={primary:{brand:{background:e.meterColorBrand},info:{background:e.meterColorInfo},success:{background:e.meterColorSuccess},danger:{background:e.meterColorDanger},warning:{background:e.meterColorWarning},alert:{background:e.meterColorAlert}},"primary-inverse":{brand:{background:e.meterColorBrandInverse},info:{background:e.meterColorInfoInverse},success:{background:e.meterColorSuccessInverse},danger:{background:e.meterColorDangerInverse},warning:{background:e.meterColorWarningInverse},alert:{background:e.meterColorAlertInverse}}};return{progressBar:{label:"progressBar",display:"flex",alignItems:"center",fontFamily:e.fontFamily,fontWeight:e.fontWeight,lineHeight:e.lineHeight,fontSize:e.fontSize},trackLayout:{label:"progressBar__trackLayout",position:"relative",flex:1,...z[s].trackLayout},track:{label:"progressBar__track",display:"block",boxSizing:"border-box",width:"100%",borderBottomWidth:e.trackBottomBorderWidth,borderBottomStyle:"solid",background:"transparent",...b[c].track,...z[s].trackBorder},trackValue:{label:"progressBar__trackValue",display:"block",boxSizing:"border-box",height:"100%",width:M,maxWidth:"100%",...i&&{transition:"all 0.5s"},...a&&d[s][a]},value:{label:"progressBar__value",lineHeight:1,boxSizing:"border-box",paddingInlineStart:e.valuePadding,flex:"0 0 5.625rem",...b[c].value},htmlProgress:{label:"progressBar__htmlProgress",display:"block",position:"absolute",top:"0",left:"0",width:"100%",height:"100%",boxSizing:"border-box",zIndex:-1,opacity:0}}}),(e=>{var o,p,t,n,r,c,s,l,i,a,M,b,z,d,O,h,A,u,f,m,q;const R=e.borders,W=e.colors,v=e.spacing,g=e.typography,y=e.key,L={canvas:{meterColorBrand:e["ic-brand-primary"]},"canvas-high-contrast":{meterColorBrandInverse:null==W||null===(o=W.contrasts)||void 0===o?void 0:o.white1010,meterColorSuccessInverse:null==W||null===(p=W.contrasts)||void 0===p?void 0:p.white1010,meterColorInfoInverse:null==W||null===(t=W.contrasts)||void 0===t?void 0:t.white1010,meterColorAlertInverse:null==W||null===(n=W.contrasts)||void 0===n?void 0:n.white1010,meterColorWarningInverse:null==W||null===(r=W.contrasts)||void 0===r?void 0:r.white1010,meterColorDangerInverse:null==W||null===(c=W.contrasts)||void 0===c?void 0:c.white1010}};return{...{fontFamily:null==g?void 0:g.fontFamily,fontWeight:null==g?void 0:g.fontWeightNormal,lineHeight:null==g?void 0:g.lineHeightCondensed,fontSize:null==g?void 0:g.fontSizeMedium,xSmallHeight:null==v?void 0:v.xSmall,xSmallValueFontSize:null==g?void 0:g.fontSizeXSmall,smallHeight:"1.125rem",smallValueFontSize:null==g?void 0:g.fontSizeXSmall,mediumHeight:null==v?void 0:v.medium,mediumValueFontSize:null==g?void 0:g.fontSizeSmall,largeHeight:null==v?void 0:v.large,largeValueFontSize:null==g?void 0:g.fontSizeMedium,valuePadding:`${null==v?void 0:v.xxSmall}`,meterColorBrand:null==W||null===(s=W.contrasts)||void 0===s?void 0:s.blue4570,meterColorBrandInverse:null==W||null===(l=W.contrasts)||void 0===l?void 0:l.blue4570,meterColorInfo:null==W||null===(i=W.contrasts)||void 0===i?void 0:i.blue4570,meterColorInfoInverse:null==W||null===(a=W.contrasts)||void 0===a?void 0:a.blue4570,meterColorSuccess:null==W||null===(M=W.contrasts)||void 0===M?void 0:M.green4570,meterColorSuccessInverse:null==W||null===(b=W.contrasts)||void 0===b?void 0:b.green4570,meterColorDanger:null==W||null===(z=W.contrasts)||void 0===z?void 0:z.red4570,meterColorDangerInverse:null==W||null===(d=W.contrasts)||void 0===d?void 0:d.red4570,meterColorAlert:null==W||null===(O=W.contrasts)||void 0===O?void 0:O.blue4570,meterColorAlertInverse:null==W||null===(h=W.contrasts)||void 0===h?void 0:h.blue4570,meterColorWarning:null==W||null===(A=W.contrasts)||void 0===A?void 0:A.orange4570,meterColorWarningInverse:null==W||null===(u=W.contrasts)||void 0===u?void 0:u.orange4570,meterBorderWidthInverse:null==R?void 0:R.widthSmall,meterBorderColorInverse:"transparent",trackColor:null==W||null===(f=W.contrasts)||void 0===f?void 0:f.white1010,trackColorInverse:"transparent",trackBottomBorderWidth:null==R?void 0:R.widthSmall,trackBottomBorderColor:null==W||null===(m=W.contrasts)||void 0===m?void 0:m.grey1214,trackBottomBorderColorInverse:null==W||null===(q=W.contrasts)||void 0===q?void 0:q.white1010},...L[y]}})),eX(oX=U()(((pX=class extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}render(){const e=this.props,o=e.renderValue,p=e.formatScreenReaderValue,t=e.valueNow,n=e.valueMax,r=e.screenReaderLabel;e.size,e.color,e.meterColor;const c=e.styles,s=P(e,JP),l=`${r} ${"function"==typeof p?p({valueNow:t,valueMax:n}):void 0}`,i=$(o,{valueNow:t,valueMax:n});return Y(J,Object.assign({},Z(s),{as:this.props.as,css:null==c?void 0:c.progressBar,margin:this.props.margin,elementRef:this.handleRef}),Y("span",{css:null==c?void 0:c.trackLayout},Y("progress",{css:null==c?void 0:c.htmlProgress,max:n,value:t,"aria-valuetext":l}),Y("span",{css:null==c?void 0:c.track,role:"presentation","aria-hidden":"true"},Y("span",{css:null==c?void 0:c.trackValue}))),i&&Y("span",{css:null==c?void 0:c.value,"aria-hidden":"true"},i))}}).displayName="ProgressBar",pX.componentId="ProgressBar",pX.allowedProps=["screenReaderLabel","size","valueMax","valueNow","formatScreenReaderValue","renderValue","color","meterColor","shouldAnimate","margin","elementRef","as"],pX.propTypes=QP,pX.defaultProps={formatScreenReaderValue:({valueNow:e,valueMax:o})=>`${e} / ${o}`,size:"medium",valueMax:100,valueNow:0,as:"div",color:"primary",shouldAnimate:!1,meterColor:({valueNow:e,valueMax:o})=>e/o>=1?"success":"brand"},oX=pX))||oX)||oX);const nX=1,rX=1.8,cX=2.75,sX=3.5,lX=3,iX=5,aX=7,MX=9,bX=.185,zX=.5,dX=.625,OX=.875,hX=.0625,AX=nX-bX/2+hX,uX=rX-zX/2+hX,fX=cX-dX/2+hX,mX=sX-OX/2+hX,qX=function(e){return(2*Math.PI*e).toFixed(3)},RX=function(e){return e/2},WX={screenReaderLabel:E.string.isRequired,size:E.oneOf(["x-small","small","medium","large"]),valueMax:E.number,valueNow:E.number,formatScreenReaderValue:E.func,renderValue:E.oneOfType([E.func,E.node]),color:E.oneOf(["primary","primary-inverse"]),meterColor:E.oneOfType([E.func,E.oneOf(["info","warning","danger","alert","success","brand"])]),margin:D.spacing,elementRef:E.func,as:E.elementType,shouldAnimateOnMount:E.bool,animationDelay:E.number},vX=["color","renderValue","formatScreenReaderValue","meterColor","valueNow","valueMax","screenReaderLabel","size","styles"];var gX,yX,LX;let NX=(gX=_(((e,o,p)=>{const t=o.size,n=o.color,r=o.meterColor,c=o.valueNow,s=void 0===c?0:c,l=o.valueMax,i=void 0===l?100:l,a=p.shouldAnimateOnMount,M="function"==typeof r?r({valueNow:s,valueMax:i}):r,b={"x-small":{progressCircle:{width:e.xSmallSize,height:e.xSmallSize},circle:{width:e.xSmallSize,height:e.xSmallSize},value:{padding:"0.5rem"},border:{transformOrigin:`${e.xSmallTransform} ${e.xSmallTransform}`},track:{transformOrigin:`${e.xSmallTransform} ${e.xSmallTransform}`,strokeWidth:e.xSmallStrokeWidth},meter:{strokeWidth:e.xSmallStrokeWidth,strokeDasharray:e.xSmallCircumference,...a&&{strokeDashoffset:`${e.xSmallCircumference} !important`}}},small:{progressCircle:{width:e.smallSize,height:e.smallSize},circle:{width:e.smallSize,height:e.smallSize},value:{},border:{transformOrigin:`${e.smallTransform} ${e.smallTransform}`},track:{transformOrigin:`${e.smallTransform} ${e.smallTransform}`,strokeWidth:e.smallStrokeWidth},meter:{strokeWidth:e.smallStrokeWidth,strokeDasharray:e.smallCircumference,...a&&{strokeDashoffset:`${e.smallCircumference} !important`}}},medium:{progressCircle:{width:e.mediumSize,height:e.mediumSize},circle:{width:e.mediumSize,height:e.mediumSize},value:{},border:{transformOrigin:`${e.mediumTransform} ${e.mediumTransform}`},track:{transformOrigin:`${e.mediumTransform} ${e.mediumTransform}`,strokeWidth:e.mediumStrokeWidth},meter:{strokeWidth:e.mediumStrokeWidth,strokeDasharray:e.mediumCircumference,...a&&{strokeDashoffset:`${e.mediumCircumference} !important`}}},large:{progressCircle:{width:e.largeSize,height:e.largeSize},circle:{width:e.largeSize,height:e.largeSize},value:{},border:{transformOrigin:`${e.largeTransform} ${e.largeTransform}`},track:{transformOrigin:`${e.largeTransform} ${e.largeTransform}`,strokeWidth:e.largeStrokeWidth},meter:{strokeWidth:e.largeStrokeWidth,strokeDasharray:e.largeCircumference,...a&&{strokeDashoffset:`${e.largeCircumference} !important`}}}},z={primary:{track:{stroke:e.trackColor},value:{color:e.color},border:{stroke:e.trackBorderColor}},"primary-inverse":{track:{stroke:e.trackColorInverse},value:{color:e.colorInverse},border:{stroke:e.trackBorderColorInverse}}},d={primary:{brand:{stroke:e.meterColorBrand},info:{stroke:e.meterColorInfo},warning:{stroke:e.meterColorWarning},danger:{stroke:e.meterColorDanger},alert:{stroke:e.meterColorAlert},success:{stroke:e.meterColorSuccess}},"primary-inverse":{brand:{stroke:e.meterColorBrandInverse},info:{stroke:e.meterColorInfoInverse},warning:{stroke:e.meterColorWarningInverse},danger:{stroke:e.meterColorDangerInverse},alert:{stroke:e.meterColorAlertInverse},success:{stroke:e.meterColorSuccessInverse}}};return{progressCircle:{label:"progressCircle",display:"inline-block",verticalAlign:"middle",position:"relative",overflow:"hidden",fontSize:"1rem",fontFamily:e.fontFamily,fontWeight:e.fontWeight,lineHeight:e.lineHeight,...b[t].progressCircle},center:{label:"progressCircle__center",transition:"all 0.5s",transitionDelay:"1s",display:"block",position:"absolute",transform:"translate3d(0, 0, 0)",top:0,left:0,height:"100%",width:"100%",borderRadius:"50%",...a&&{opacity:0,transform:"translate3d(0, 10%, 0)"}},value:{label:"progressCircle__value",boxSizing:"border-box",wordWrap:"break-word",textAlign:"center",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",padding:"1.5rem",width:"100%",height:"100%",lineHeight:1,...b[t].value,...z[n].value},circle:{label:"progressCircle__circle",transform:"rotate(-90deg)",display:"block",position:"absolute",top:0,left:0,...b[t].circle},track:{label:"progressCircle__track",fill:"none",opacity:1,transition:"all 0.5s",transitionDelay:"0.2s",transform:"translate3d(0, 0, 0)",...b[t].track,...z[n].track,...a&&{opacity:0,transform:"translate3d(0, 0, 0)"}},border:{label:"progressCircle__border",fill:"none",opacity:1,transition:"all 0.5s",transform:"translate3d(0, 0, 0) scale(1)",...b[t].border,...z[n].border,...a&&{opacity:0,transform:"translate3d(0, 0, 0) scale(0.75)"}},meter:{label:"progressCircle__meter",fill:"none",transition:"stroke-dashoffset 1s",transform:"translate3d(0, 0, 0)",...b[t].meter,...M&&d[n][M],...a&&{opacity:0}},radii:(()=>{const o="x-small"===t?"xSmall":t;return{radius:e[`${o}Radius`],borderOffsetRadius:e[`${o}BorderOffset`]}})(),dashOffset:(()=>{if(s{var o,p,t,n,r,c,s,l,i,a,M,b,z,d,O,h,A,u,f,m,q,R,W;const v=e.colors,g=e.typography,y=e.key,L={canvas:{color:e["ic-brand-font-color-dark"],meterColorBrand:e["ic-brand-primary"]},"canvas-high-contrast":{meterColorBrandInverse:null==v||null===(o=v.contrasts)||void 0===o?void 0:o.white1010,meterColorSuccessInverse:null==v||null===(p=v.contrasts)||void 0===p?void 0:p.white1010,meterColorInfoInverse:null==v||null===(t=v.contrasts)||void 0===t?void 0:t.white1010,meterColorAlertInverse:null==v||null===(n=v.contrasts)||void 0===n?void 0:n.white1010,meterColorWarningInverse:null==v||null===(r=v.contrasts)||void 0===r?void 0:r.white1010,meterColorDangerInverse:null==v||null===(c=v.contrasts)||void 0===c?void 0:c.white1010}};return{...{fontFamily:null==g?void 0:g.fontFamily,fontWeight:null==g?void 0:g.fontWeightNormal,lineHeight:null==g?void 0:g.lineHeightCondensed,xSmallSize:`${lX}em`,xSmallRadius:`${nX}em`,xSmallCircumference:`${qX(nX)}em`,xSmallTransform:`${RX(lX)}em`,xSmallStrokeWidth:`${bX}em`,xSmallBorderOffset:`${AX}em`,smallSize:`${iX}em`,smallRadius:`${rX}em`,smallCircumference:`${qX(rX)}em`,smallTransform:`${RX(iX)}em`,smallStrokeWidth:`${zX}em`,smallBorderOffset:`${uX}em`,mediumSize:`${aX}em`,mediumRadius:`${cX}em`,mediumCircumference:`${qX(cX)}em`,mediumTransform:`${RX(aX)}em`,mediumStrokeWidth:`${dX}em`,mediumBorderOffset:`${fX}em`,largeSize:`${MX}em`,largeRadius:`${sX}em`,largeCircumference:`${qX(sX)}em`,largeTransform:`${RX(MX)}em`,largeStrokeWidth:`${OX}em`,largeBorderOffset:`${mX}em`,color:null==v||null===(s=v.contrasts)||void 0===s?void 0:s.grey125125,colorInverse:null==v||null===(l=v.contrasts)||void 0===l?void 0:l.white1010,trackColor:null==v||null===(i=v.contrasts)||void 0===i?void 0:i.white1010,trackColorInverse:"transparent",trackBorderColor:null==v||null===(a=v.contrasts)||void 0===a?void 0:a.grey125125,trackBorderColorInverse:null==v||null===(M=v.contrasts)||void 0===M?void 0:M.white1010,meterColorBrand:null==v||null===(b=v.contrasts)||void 0===b?void 0:b.blue4570,meterColorBrandInverse:null==v||null===(z=v.contrasts)||void 0===z?void 0:z.blue4570,meterColorInfo:null==v||null===(d=v.contrasts)||void 0===d?void 0:d.blue4570,meterColorInfoInverse:null==v||null===(O=v.contrasts)||void 0===O?void 0:O.blue4570,meterColorSuccess:null==v||null===(h=v.contrasts)||void 0===h?void 0:h.green4570,meterColorSuccessInverse:null==v||null===(A=v.contrasts)||void 0===A?void 0:A.green4570,meterColorDanger:null==v||null===(u=v.contrasts)||void 0===u?void 0:u.red4570,meterColorDangerInverse:null==v||null===(f=v.contrasts)||void 0===f?void 0:f.red4570,meterColorAlert:null==v||null===(m=v.contrasts)||void 0===m?void 0:m.blue4570,meterColorAlertInverse:null==v||null===(q=v.contrasts)||void 0===q?void 0:q.blue4570,meterColorWarning:null==v||null===(R=v.contrasts)||void 0===R?void 0:R.orange4570,meterColorWarningInverse:null==v||null===(W=v.contrasts)||void 0===W?void 0:W.orange4570},...L[y]}})),gX(yX=U()(((LX=class extends u.Component{constructor(e){super(e),this._timeouts=[],this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.state={shouldAnimateOnMount:e.shouldAnimateOnMount}}get makeStylesVariables(){return{shouldAnimateOnMount:this.state.shouldAnimateOnMount}}componentDidMount(){var e,o;this.state.shouldAnimateOnMount&&this._timeouts.push(setTimeout((()=>{this.setState({shouldAnimateOnMount:!1})}),this.props.animationDelay||500)),null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStylesVariables)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStylesVariables)}componentWillUnmount(){this._timeouts.forEach((e=>clearTimeout(e)))}render(){var e,o,p;const t=this.props;t.color;const n=t.renderValue,r=t.formatScreenReaderValue;t.meterColor;const c=t.valueNow,s=t.valueMax,l=t.screenReaderLabel;t.size;const i=t.styles,a=P(t,vX),M=`${l} ${"function"==typeof r?r({valueNow:c,valueMax:s}):void 0}`,b=$(n,{valueNow:c,valueMax:s}),z={strokeDashoffset:`${null==i?void 0:i.dashOffset}em`};return Y(J,Object.assign({},Z(a),{as:this.props.as,elementRef:this.handleRef,css:null==i?void 0:i.progressCircle,margin:this.props.margin}),Y(Ae,null,Y("progress",{max:s,value:c,"aria-valuetext":M})),b&&Y("span",{css:null==i?void 0:i.center,"aria-hidden":"true"},Y("span",{css:null==i?void 0:i.value},b)),Y("svg",{css:null==i?void 0:i.circle,role:"presentation",focusable:"false"},Y("circle",{css:null==i?void 0:i.track,role:"presentation",cx:"50%",cy:"50%",r:null==i||null===(e=i.radii)||void 0===e?void 0:e.radius}),Y("circle",{css:null==i?void 0:i.border,role:"presentation",cx:"50%",cy:"50%",r:null==i||null===(o=i.radii)||void 0===o?void 0:o.borderOffsetRadius}),Y("circle",{css:null==i?void 0:i.meter,role:"presentation",style:z,cx:"50%",cy:"50%",r:null==i||null===(p=i.radii)||void 0===p?void 0:p.radius})))}}).displayName="ProgressCircle",LX.componentId="ProgressCircle",LX.allowedProps=["screenReaderLabel","size","valueMax","valueNow","formatScreenReaderValue","renderValue","color","meterColor","margin","elementRef","as","shouldAnimateOnMount","animationDelay"],LX.propTypes=WX,LX.defaultProps={formatScreenReaderValue:({valueNow:e,valueMax:o})=>`${e} / ${o}`,size:"medium",valueMax:100,valueNow:0,as:"div",color:"primary",shouldAnimateOnMount:!1,meterColor:({valueNow:e,valueMax:o})=>e/o>=1?"success":"brand"},yX=LX))||yX)||yX);const BX={min:E.number.isRequired,max:E.number.isRequired,defaultValue:E.number,value:Se(E.number),onChange:E.func,messages:E.arrayOf(t.message),size:E.oneOf(["small","medium","large"]),layout:E.oneOf(["stacked","inline"]),id:E.string,label:E.node.isRequired,displayValue:E.bool,step:E.number,formatValue:E.func,inline:E.bool,disabled:E.bool,readOnly:E.bool,thumbVariant:Mo.deprecatePropValues(E.oneOf(["deprecated","accessible"]),["deprecated"],"The `deprecated` variant is not fully accessible and will be removed in V9. The connected theme variables will be removed as well: `handleShadowColor`, `handleFocusOutlineColor`, `handleFocusOutlineWidth`. Please use the `accessible` variant.")};var wX,CX,TX,SX;let xX=(wX=K(),CX=_(((e,o)=>{const p=o.size,t=o.thumbVariant,n={small:{fontSize:e.valueSmallFontSize,padding:e.valueSmallPadding,lineHeight:e.valueSmallLineHeight},medium:{fontSize:e.valueMediumFontSize,padding:e.valueMediumPadding,lineHeight:e.valueMediumLineHeight},large:{fontSize:e.valueLargeFontSize,padding:e.valueLargePadding,lineHeight:e.valueLargeLineHeight}},r={borderRadius:"0.312em",borderColor:"transparent",color:"transparent",cursor:"pointer",background:e.trackBackground,height:`calc(${e.handleSize} / 2)`},c=`calc(${e.handleSize} + (${e.handleBorderSize} * 2))`,s={deprecated:{width:e.handleSize,height:e.handleSize,boxShadow:`0 0.0625rem 0 ${e.handleShadowColor}`},accessible:{width:c,height:c,borderWidth:e.handleBorderSize,borderColor:e.handleBorderColor,borderStyle:"solid",boxSizing:"border-box",boxShadow:e.handleShadow}},l={appearance:"none",borderRadius:"50%",cursor:"pointer",transition:"all 0.15s ease-in-out",background:e.handleBackground,...s[t],"&:hover":{background:e.handleHoverBackground}},i={deprecated:{marginTop:`calc(-1 * ${e.handleSize} / 4)`},accessible:{marginTop:`calc(-1 * ${c} / 4)`}},a={deprecated:{background:e.handleFocusBackground,boxShadow:`0 0.0625rem 0 ${e.handleShadowColor}, 0 0 0 ${e.handleFocusOutlineWidth} ${e.handleFocusOutlineColor}`},accessible:{background:e.handleFocusBackground,boxShadow:e.handleShadow+", "+`inset 0 0 0 ${e.handleFocusInset} ${e.handleFocusBackground}, `+`inset 0 0 0 calc(${e.handleFocusInset} + ${e.handleFocusRingSize}) ${e.handleFocusRingColor}`}};return{rangeInput:{label:"rangeInput",display:"flex",justifyContent:"center",alignItems:"center",minWidth:e.minWidth},rangeInputInput:{label:"rangeInput__input",all:"initial",flex:"auto",boxSizing:"border-box",appearance:"none",width:"100%",outline:"none",margin:0,"&::-webkit-slider-thumb":{...l,...i[t]},"&::-moz-range-thumb":l,"&:focus, &:active":{outline:"none","&::-webkit-slider-thumb":a[t],"&::-moz-range-thumb":a[t]},"&::-moz-focus-inner, &::-moz-focus-outer":{border:0,outline:"none"},"&::-webkit-slider-runnable-track":r,"&::-moz-range-track":r,'[dir="rtl"] &':{direction:"rtl"}},rangeInputInputValue:{label:"rangeInput__value",all:"initial",boxSizing:"border-box",display:"block",color:"inherit",fontFamily:e.valueFontFamily,fontWeight:e.valueFontWeight,textAlign:"center",...n[p]}}}),(e=>{var o,p,t,n,r,c,s,l,i;const a=e.colors,M=e.borders,b=e.typography,z=e.spacing,d=e.forms,O=e.key,h={canvas:{handleBackground:e["ic-brand-primary"],handleHoverBackground:e["ic-brand-primary"],handleFocusBackground:e["ic-brand-primary"],handleShadowColor:po(e["ic-brand-primary"],15),handleFocusOutlineColor:to(e["ic-brand-primary"],40)}};return{...{minWidth:"12.5rem",handleSize:"1.5rem",handleBackground:null==a||null===(o=a.contrasts)||void 0===o?void 0:o.blue4570,handleBorderColor:null==a||null===(p=a.contrasts)||void 0===p?void 0:p.white1010,handleBorderSize:null==M?void 0:M.widthMedium,handleShadow:"0 0.0625rem 0.125rem rgba(0, 0, 0, .2), 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.1)",handleFocusInset:null==M?void 0:M.widthSmall,handleFocusRingSize:null==M?void 0:M.widthMedium,handleFocusRingColor:null==a||null===(t=a.contrasts)||void 0===t?void 0:t.white1010,handleFocusBackground:null==a||null===(n=a.contrasts)||void 0===n?void 0:n.blue4570,handleHoverBackground:null==a||null===(r=a.contrasts)||void 0===r?void 0:r.blue4570,handleShadowColor:po(null==a||null===(c=a.contrasts)||void 0===c?void 0:c.blue5782,10),handleFocusOutlineColor:to(null==a||null===(s=a.contrasts)||void 0===s?void 0:s.blue4570,40),handleFocusOutlineWidth:"0.75em",trackBackground:null==a||null===(l=a.contrasts)||void 0===l?void 0:l.grey4570,valueColor:null==a||null===(i=a.contrasts)||void 0===i?void 0:i.white1010,valueFontFamily:null==b?void 0:b.fontFamily,valueFontWeight:null==b?void 0:b.fontWeightNormal,valueSmallFontSize:null==b?void 0:b.fontSizeSmall,valueSmallPadding:`0 ${null==z?void 0:z.xSmall}`,valueSmallLineHeight:null==d?void 0:d.inputHeightSmall,valueMediumFontSize:null==b?void 0:b.fontSizeMedium,valueMediumPadding:`0 ${null==z?void 0:z.small}`,valueMediumLineHeight:null==d?void 0:d.inputHeightMedium,valueLargeFontSize:null==b?void 0:b.fontSizeLarge,valueLargePadding:`0 ${null==z?void 0:z.medium}`,valueLargeLineHeight:null==d?void 0:d.inputHeightLarge},...h[O]}})),wX(TX=CX(TX=U()((SX=class e extends u.Component{constructor(e){super(e),this.ref=null,this._input=null,this._inputListener=null,this._changeListener=null,this.defaultId=void 0,this.handleRef=e=>{this.ref=e},this.handleChange=e=>{const o=this.props,p=o.onChange;void 0===o.value&&this.setState({value:e.target.value}),"function"==typeof p&&p(e.target.value)},this.noopChange=()=>{},void 0===e.value&&(this.state={value:e.defaultValue}),this.defaultId=e.deterministicId()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o),null!==this._input&&(this._inputListener=Pe(this._input,"input",this.handleChange),this._changeListener=Pe(this._input,"change",this.handleChange))}componentWillUnmount(){var e,o;this._input&&(null===(e=this._inputListener)||void 0===e||e.remove(),null===(o=this._changeListener)||void 0===o||o.remove())}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}get value(){const e=void 0===this.props.value?this.state.value:this.props.value;return"string"==typeof e?parseInt(e):e}get invalid(){return this.props.messages&&this.props.messages.findIndex((e=>"error"===e.type))>=0}get id(){return this.props.id||this.defaultId}renderValue(){if(this.props.displayValue){var o;if(!this.value)return ce(!1,"RangeInput should have a `value` or `defaultValue` set for the value to be displayed. If no value has to be displayed, set `displayValue={false}`."),null;const p={[e.outputLocatorAttribute]:this.id};return Y(no,{background:"inverse",placement:"end center"},Y("div",Object.assign({},p,{css:null===(o=this.props.styles)||void 0===o?void 0:o.rangeInputInputValue}),this.props.formatValue(this.value,this.props.max)))}return null}render(){var o,p;const t=this.props,n=t.formatValue,r=t.disabled,c=t.readOnly,s=pe(this.props,e.allowedProps);return Y(A,Object.assign({},te(this.props,A.allowedProps),{label:this.props.label,id:this.id,elementRef:this.handleRef}),Y("div",{css:null===(o=this.props.styles)||void 0===o?void 0:o.rangeInput},Y("input",Object.assign({css:null===(p=this.props.styles)||void 0===p?void 0:p.rangeInputInput,ref:e=>{this._input=e},type:"range",id:this.id,min:this.props.min,max:this.props.max,step:this.props.step,value:this.value,onChange:this.noopChange,"aria-valuetext":n(this.value,this.props.max)},s,{disabled:r||c,"aria-disabled":r||c?"true":void 0})),this.renderValue()))}},SX.displayName="RangeInput",SX.componentId="RangeInput",SX.outputLocatorAttribute="data-range-output",SX.allowedProps=["min","max","defaultValue","value","onChange","messages","size","layout","id","label","displayValue","step","formatValue","inline","disabled","readOnly","thumbVariant"],SX.propTypes=BX,SX.defaultProps={step:1,formatValue:e=>e,max:0,min:0,inline:!1,size:"medium",layout:"stacked",displayValue:!0,disabled:!1,readOnly:!1,thumbVariant:"deprecated"},TX=SX))||TX)||TX)||TX);const IX={animationDelay:E.number,animateFill:E.bool,filled:E.bool,size:E.oneOf(["small","medium","large"])};var EX,PX,XX;let HX=(EX=_(((e,o,p)=>{const t=o.size,n=p.filled,r={small:{fontSize:e.smallIconFontSize},medium:{fontSize:e.mediumIconFontSize},large:{fontSize:e.largeIconFontSize}};return{ratingIcon:{label:"ratingIcon",display:"inline-block",verticalAlign:"bottom",margin:`0 ${e.iconMargin}`,lineHeight:1,"&:first-of-type":{marginLeft:0},"&:last-of-type":{marginRight:0}},icon:{label:"ratingIcon__icon",display:"inline-block",verticalAlign:"bottom",...r[t],color:n?e.iconFilledColor:e.iconEmptyColor}}}),(e=>{var o,p;const t=e.colors,n=e.typography,r=e.spacing,c=e.key,s={canvas:{iconEmptyColor:e["ic-brand-primary"],iconFilledColor:e["ic-brand-primary"]}};return{...{iconMargin:null==r?void 0:r.xxxSmall,iconEmptyColor:null==t||null===(o=t.contrasts)||void 0===o?void 0:o.blue4570,iconFilledColor:null==t||null===(p=t.contrasts)||void 0===p?void 0:p.blue4570,smallIconFontSize:null==n?void 0:n.fontSizeMedium,mediumIconFontSize:null==n?void 0:n.fontSizeLarge,largeIconFontSize:null==n?void 0:n.fontSizeXXLarge},...s[c]}})),EX(((XX=class extends u.Component{constructor(e){super(e),this.ref=null,this._timeouts=[],this._animation=void 0,this.makeStyleProps=()=>({filled:this.state.filled}),this.fill=()=>{this._animation=Ye((()=>{this.setState({filled:!0})}))},this.state={filled:e.filled&&!e.animateFill}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,this.makeStyleProps()),this.props.animateFill&&this._timeouts.push(setTimeout(this.fill,this.props.animationDelay))}componentDidUpdate(e){var o,p;this.props.animateFill&&this.props.filled&&this.props.filled!==e.filled&&this.fill(),null===(o=(p=this.props).makeStyles)||void 0===o||o.call(p,this.makeStyleProps())}componentWillUnmount(){this._animation&&this._animation.cancel(),this._timeouts.forEach((e=>clearTimeout(e)))}render(){var e,o,p;const t=this.props.animateFill,n=this.state.filled?Gw:Yw;return Y("span",{css:null===(e=this.props.styles)||void 0===e?void 0:e.ratingIcon,ref:e=>{this.ref=e}},Y("span",null,this.state.filled&&t?Y(ge,{in:!0,transitionOnMount:!0,type:"scale"},Y(n,{css:null===(o=this.props.styles)||void 0===o?void 0:o.icon})):Y(n,{css:null===(p=this.props.styles)||void 0===p?void 0:p.icon})))}}).displayName="RatingIcon",XX.componentId="Rating.Icon",XX.allowedProps=["animationDelay","animateFill","filled","size"],XX.propTypes=IX,XX.defaultProps={animationDelay:200,animateFill:!1,filled:!1,size:"medium"},PX=XX))||PX);const ZX={label:E.string.isRequired,formatValueText:E.func,iconCount:E.oneOf([3,5]),size:E.oneOf(["small","medium","large"]),valueMax:E.number,valueNow:E.number,animateFill:E.bool,margin:D.spacing};var VX,kX;let DX=_((()=>({rating:{label:"rating",lineHeight:1}})),null)(VX=U()((kX=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}get filled(){const e=this.props,o=e.valueNow,p=e.iconCount,t=e.valueMax,n=t&&t>0?t:p,r=Math.round(o*p/n);return r>p?p:r}get empty(){return this.props.iconCount-this.filled}render(){var o;const p=this.props,t=p.iconCount,n=p.animateFill,r=p.size,c=p.margin,s=p.label,l=p.formatValueText,i=s+" "+(null==l?void 0:l(this.filled,t)),a=J.omitViewProps(pe(this.props,e.allowedProps),e);return Y(J,Object.assign({},a,{css:null===(o=this.props.styles)||void 0===o?void 0:o.rating,margin:c,display:"inline-block",elementRef:this.handleRef}),Y(Ae,null,i),[...Array(this.filled)].map(((e,o)=>Y(HX,{key:o+1,filled:!0,animateFill:n,animationDelay:n?200*(o+1):void 0,size:r}))),[...Array(this.empty)].map(((e,o)=>Y(HX,{key:o+1,size:r}))))}},kX.displayName="Rating",kX.componentId="Rating",kX.allowedProps=["label","formatValueText","iconCount","size","valueMax","valueNow","animateFill","margin"],kX.propTypes=ZX,kX.defaultProps={animateFill:!1,formatValueText:(e,o)=>`${e} / ${o}`,iconCount:3,size:"medium",valueNow:0},kX.Icon=HX,VX=kX))||VX)||VX;const _X={elementRef:E.func,icon:E.node.isRequired,label:E.node.isRequired,as:E.elementType,href:E.string,onClick:E.func,selected:E.bool,minimized:E.bool};var jX,FX,UX;let YX=(jX=_(((e,o)=>{const p=o.selected;return{navigationItem:{label:"navigationItem",fontFamily:e.fontFamily,fontWeight:e.fontWeight,display:"block",width:"100%",textAlign:"center",padding:e.contentPadding,cursor:"pointer",border:"none",boxSizing:"border-box",textDecoration:e.linkTextDecoration,overflowWrap:"break-word",wordWrap:"break-word",hyphens:"auto",...p?{backgroundColor:e.selectedBackgroundColor,fill:e.selectedIconColor,color:e.selectedFontColor,"&:active, &:hover":{backgroundColor:e.selectedBackgroundColor,color:e.selectedFontColor,textDecoration:e.linkTextDecoration},"&:focus":{backgroundColor:e.selectedBackgroundColor,boxShadow:`${e.selectedOuterFocusOutline}, ${e.selectedInnerFocusOutline}`,outline:"none"}}:{backgroundColor:e.backgroundColor,color:e.fontColor,"&:active":{backgroundColor:e.hoverBackgroundColor},"&:hover":{transition:"background-color .3s",backgroundColor:"rgba(0, 0, 0, 0.2)",color:e.fontColor,textDecoration:e.linkTextDecoration},"&:focus":{backgroundColor:e.hoverBackgroundColor,boxShadow:`${e.outerFocusOutline}, ${e.innerFocusOutline}`,outline:"none"}}},icon:{label:"navigationItem__icon",fontSize:e.iconSize,fill:e.iconColor},label:{label:"navigationItem__label",fontSize:e.fontSize,lineHeight:e.lineHeight}}}),(e=>{var o,p,t,n,r,c,s,l,i,a;const M=e.colors,b=e.spacing,z=e.typography,d=e.key,O={canvas:{fontColor:e["ic-brand-global-nav-menu-item__text-color"],iconColor:e["ic-brand-global-nav-ic-icon-svg-fill"],hoverBackgroundColor:e["ic-global-nav-link-hover"],selectedFontColor:e["ic-brand-global-nav-menu-item__text-color--active"],selectedIconColor:e["ic-brand-global-nav-ic-icon-svg-fill--active"]},"canvas-high-contrast":{linkTextDecoration:"underline"}};return{...{fontSize:null==z?void 0:z.fontSizeSmall,fontFamily:null==z?void 0:z.fontFamily,fontWeight:null==z?void 0:z.fontWeightNormal,fontColor:null==M||null===(o=M.contrasts)||void 0===o?void 0:o.white1010,iconSize:"1.625rem",iconColor:null==M||null===(p=M.contrasts)||void 0===p?void 0:p.white1010,lineHeight:null==z?void 0:z.lineHeight,backgroundColor:"transparent",linkTextDecoration:"none",hoverBackgroundColor:null==M||null===(t=M.contrasts)||void 0===t?void 0:t.grey125125,outerFocusOutline:`inset 0 0 0 0.125rem ${null==M||null===(n=M.contrasts)||void 0===n?void 0:n.grey4570}`,innerFocusOutline:`inset 0 0 0 0.25rem ${null===(r=M.contrasts)||void 0===r?void 0:r.white1010}`,selectedFontColor:null==M||null===(c=M.contrasts)||void 0===c?void 0:c.blue4570,selectedIconColor:null==M||null===(s=M.contrasts)||void 0===s?void 0:s.blue4570,selectedBackgroundColor:null==M||null===(l=M.contrasts)||void 0===l?void 0:l.white1010,selectedOuterFocusOutline:`inset 0 0 0 0.125rem ${null===(i=M.contrasts)||void 0===i?void 0:i.white1010}`,selectedInnerFocusOutline:`inset 0 0 0 0.25rem ${null===(a=M.contrasts)||void 0===a?void 0:a.blue4570}`,contentPadding:null==b?void 0:b.xxSmall},...O[d]}})),jX(FX=U()((UX=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,{minimized:this.props.minimized})}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,{minimized:this.props.minimized})}renderLink(o){var p,t,n;const r=X(e,this.props),c=this.props,s=c.href,l=c.onClick,i=c.icon,a=c.label,M=pe(this.props,e.allowedProps);return Y(r,Object.assign({},M,{href:s,onClick:l,ref:o?this.handleRef:void 0,css:null===(p=this.props.styles)||void 0===p?void 0:p.navigationItem,"aria-label":this.props.minimized?a:void 0}),Y("div",{css:null===(t=this.props.styles)||void 0===t?void 0:t.icon,"aria-hidden":"true"},i),this.props.minimized?null:Y("div",{css:null===(n=this.props.styles)||void 0===n?void 0:n.label},a))}render(){const e=this.props,o=e.minimized,p=e.label,t=o&&Ge(p),n=this.renderLink(!t);return t?Y(We,{renderTip:p,placement:"end",elementRef:this.handleRef},n):n}},UX.displayName="SideNavBarItem",UX.componentId="SideNavBar.Item",UX.allowedProps=["elementRef","icon","label","as","href","onClick","selected","minimized"],UX.propTypes=_X,UX.defaultProps={as:"a",selected:!1,minimized:!1},FX=UX))||FX)||FX);const GX={children:Le.oneOf([YX]),minimized:Se(E.bool,"onMinimized","defaultMinimized"),defaultMinimized:E.bool,onMinimized:E.func,label:E.string.isRequired,toggleLabel:E.shape({expandedLabel:E.string,minimizedLabel:E.string}).isRequired,href:E.string,onClick:E.func};var $X,KX,QX;const JX=({minimized:e})=>({minimized:!e});let eH=($X=_(((e,o,p)=>{const t=p.minimized;return{navigation:{label:"navigation",color:e.fontColor,backgroundColor:e.backgroundColor,boxSizing:"border-box",display:"flex",flexDirection:"column",width:e.width,height:"100%",overflowY:"auto",...t?{width:e.minimizedWidth}:{}},list:{label:"navigation__list",padding:0,margin:0},content:{label:"navigation__content",listStyleType:"none",margin:"0",padding:"0",flex:"1 0 auto"},toggleIcon:{fill:e.fill,margin:"0 auto",transform:"translate3d(0, 0, 0)",transition:`all ${e.toggleTransition}`,...t?{transform:"rotate3d(0, 1, 0, -180deg)"}:{}}}}),(e=>{var o,p,t,n,r;const c=e.colors,s=e.spacing,l=e.borders,i=e.transitions,a=e.key,M={canvas:{backgroundColor:e["ic-brand-global-nav-bgd"],fontColor:e["ic-brand-global-nav-menu-item__text-color"],fill:e["ic-brand-global-nav-ic-icon-svg-fill"]}};return{...{fontColor:null==c||null===(o=c.contrasts)||void 0===o?void 0:o.white1010,backgroundColor:null==c||null===(p=c.contrasts)||void 0===p?void 0:p.grey100100,width:"5.25rem",minimizedWidth:"3.375rem",fill:null==c||null===(t=c.contrasts)||void 0===t?void 0:t.white1010,focusOutlineInnerWidth:null==l?void 0:l.widthMedium,focusOutlineOuterWidth:null==l?void 0:l.widthSmall,focusOutlineInnerColor:null==c||null===(n=c.contrasts)||void 0===n?void 0:n.blue4570,focusOutlineOuterColor:null==c||null===(r=c.contrasts)||void 0===r?void 0:r.white1010,marginBottom:null==s?void 0:s.small,toggleTransition:null==i?void 0:i.duration},...M[a]}})),$X(KX=U()((QX=class e extends u.Component{constructor(e){super(e),this.ref=null,this.handleNavToggle=e=>{this.isControlled()||this.setState(JX),"function"==typeof this.props.onMinimized&&this.props.onMinimized(e,!this.minimized)},this.state={minimized:this.isControlled(e)?!!e.minimized:!!e.defaultMinimized}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,{minimized:this.minimized})}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o,{minimized:this.minimized})}get minimized(){return this.isControlled()?!!this.props.minimized:!!this.state.minimized}isControlled(e=this.props){return"boolean"==typeof e.minimized}renderChildren(){return u.Children.map(this.props.children,(e=>{var o;const p=ye(e,{minimized:this.state.minimized});return Y("li",{css:null===(o=this.props.styles)||void 0===o?void 0:o.list},p)}))}toggleMessage(){return this.state.minimized?this.props.toggleLabel.minimizedLabel:this.props.toggleLabel.expandedLabel}render(){var o,p,t;const n=this.props.label,r=pe(this.props,e.allowedProps,["minimized"]);return Y("nav",Object.assign({},r,{css:null===(o=this.props.styles)||void 0===o?void 0:o.navigation,"aria-label":n,ref:e=>{this.ref=e}}),Y("ul",{css:null===(p=this.props.styles)||void 0===p?void 0:p.content},this.renderChildren()),Y(YX,{"aria-expanded":!this.minimized,onClick:this.handleNavToggle,icon:Y(PR,{css:null===(t=this.props.styles)||void 0===t?void 0:t.toggleIcon,inline:!1}),label:Y(Ae,null,this.toggleMessage())}))}},QX.displayName="SideNavBar",QX.componentId="SideNavBar",QX.allowedProps=["children","minimized","defaultMinimized","onMinimized","label","toggleLabel","href","onClick"],QX.propTypes=GX,QX.defaultProps={children:null,defaultMinimized:!1,onClick:function(e){}},QX.Item=YX,KX=QX))||KX)||KX);const oH={className:E.string,text:E.oneOfType([E.string,E.node]).isRequired,title:E.string,disabled:E.bool,readOnly:E.bool,dismissible:E.bool,margin:D.spacing,onClick:E.func,elementRef:E.func,size:E.oneOf(["small","medium","large"]),variant:E.oneOf(["default","inline"])};var pH,tH,nH;let rH=(pH=_(((e,o)=>{const p=o.variant,t=o.size,n=o.dismissible,r=o.onClick,c=o.disabled,s=!!r,l={small:{tag:{padding:e.paddingSmall,fontSize:e.fontSizeSmall},text:{lineHeight:`calc(${e.heightSmall} - (${e.defaultBorderWidth} * 2))`},icon:{fontSize:"0.75rem"}},medium:{tag:{padding:e.padding,fontSize:`calc(${e.fontSizeMedium} - 0.0625rem)`},text:{lineHeight:`calc(${e.heightMedium} - (${e.defaultBorderWidth} * 2))`},icon:{fontSize:"0.875rem"}},large:{tag:{padding:e.padding,fontSize:`calc(${e.fontSizeLarge} - 0.0625rem)`},text:{lineHeight:`calc(${e.heightLarge} - (${e.defaultBorderWidth} * 2))`},icon:{fontSize:"1rem"}}},i=s?{tag:{touchAction:"manipulation",outline:"none",position:"relative",overflow:"visible",transition:`background-color ${e.transitionTiming}`,...!n&&{cursor:"pointer"},"&:focus":{"&::before":{opacity:1,transform:"scale(1)"}},...c&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5}},tagBefore:{content:'""',boxSizing:"border-box",border:`${e.focusOutlineWidth} ${e.focusOutlineStyle} ${e.focusOutlineColor}`,position:"absolute",top:"-0.3125rem",bottom:"-0.3125rem",left:"-0.3125rem",right:"-0.3125rem",opacity:0,transform:"scale(0.9)",transition:`all ${e.transitionTiming}`,pointerEvents:"none"}}:{},a={default:{tag:{backgroundColor:e.defaultBackground,border:`${e.defaultBorderWidth} ${e.defaultBorderStyle} ${e.defaultBorderColor}`,borderRadius:e.defaultBorderRadius,color:e.defaultColor,...s&&{"&:hover":{backgroundColor:e.defaultBackgroundHover}}},tagBefore:{...s&&{borderRadius:e.defaultBorderRadius}}},inline:{tag:{backgroundColor:e.inlineBackground,border:`${e.inlineBorderWidth} ${e.inlineBorderStyle} ${e.inlineBorderColor}`,borderRadius:e.inlineBorderRadius,color:e.inlineColor,cursor:"text",margin:"0 0.1875rem 0.1875rem",...s&&{"&:hover":{backgroundColor:e.inlineBackgroundHover}}},tagBefore:{...s&&{borderRadius:`calc(${e.inlineBorderRadius} * 1.5)`}}}},M={default:{...n&&{color:e.defaultIconColor,'[class$="-tag"]:hover > &':{color:e.defaultIconHoverColor}}},inline:{...n&&{backgroundColor:e.inlineIconColor,borderRadius:"50%",color:e.inlineBackground,fontSize:"0.75rem",padding:"0.25rem",position:"absolute",insetInlineEnd:0,insetInlineStart:"auto",top:0,transform:"translate(40%, -40%)",'[class$="-tag"]:hover > &':{backgroundColor:e.inlineIconHoverColor},'[dir="rtl"] &':{transform:"translate(-40%, -40%)"}}}};return{tag:{label:"tag",boxSizing:"border-box",fontFamily:e.fontFamily,display:"inline-flex",alignItems:"center",textAlign:"center",verticalAlign:"middle",userSelect:"none",...l[t].tag,...i.tag,...a[p].tag,"&::before":{...i.tagBefore,...a[p].tagBefore}},text:{label:"tag__text",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:e.maxWidth,...l[t].text},icon:{label:"tag__icon",marginInlineStart:e.iconMargin,marginInlineEnd:0,transition:`all ${e.transitionTiming}`,cursor:"pointer",...l[t].icon,...M[p]}}}),(e=>{var o,p,t,n,r,c,s,l,i,a,M,b,z,d,O;const h=e.borders,A=e.colors,u=e.forms,f=e.spacing,m=e.typography,q=e.key,R={"canvas-high-contrast":{defaultBackground:null==A||null===(o=A.contrasts)||void 0===o?void 0:o.white1010,defaultBorderColor:null==A||null===(p=A.contrasts)||void 0===p?void 0:p.grey125125},canvas:{focusOutlineColor:e["ic-brand-primary"],defaultIconColor:e["ic-brand-font-color-dark"],defaultIconHoverColor:e["ic-brand-primary"],defaultColor:e["ic-brand-font-color-dark"]}};return{...{fontFamily:m.fontFamily,heightSmall:"1.3125rem",heightMedium:u.inputHeightSmall,heightLarge:u.inputHeightMedium,fontSizeSmall:m.fontSizeXSmall,fontSizeMedium:m.fontSizeSmall,fontSizeLarge:m.fontSizeMedium,padding:`0 ${f.xSmall}`,paddingSmall:`0 ${f.xSmall}`,focusOutlineColor:null==A||null===(t=A.contrasts)||void 0===t?void 0:t.blue4570,focusOutlineWidth:h.widthMedium,focusOutlineStyle:h.style,maxWidth:"10rem",iconMargin:f.xSmall,transitionTiming:"0.2s",defaultBackgroundHover:null==A||null===(n=A.contrasts)||void 0===n?void 0:n.grey1214,defaultBackground:null==A||null===(r=A.contrasts)||void 0===r?void 0:r.grey1111,defaultBorderColor:null==A||null===(c=A.contrasts)||void 0===c?void 0:c.grey1214,defaultBorderRadius:"999rem",defaultBorderStyle:h.style,defaultBorderWidth:h.widthSmall,defaultColor:null==A||null===(s=A.contrasts)||void 0===s?void 0:s.grey125125,defaultIconColor:null==A||null===(l=A.contrasts)||void 0===l?void 0:l.grey125125,defaultIconHoverColor:null==A||null===(i=A.contrasts)||void 0===i?void 0:i.blue4570,inlineBackgroundHover:null==A||null===(a=A.contrasts)||void 0===a?void 0:a.grey1111,inlineBackground:null==A||null===(M=A.contrasts)||void 0===M?void 0:M.white1010,inlineBorderColor:null==A||null===(b=A.contrasts)||void 0===b?void 0:b.grey4570,inlineBorderRadius:h.radiusMedium,inlineBorderStyle:h.style,inlineBorderWidth:h.widthSmall,inlineColor:null==A||null===(z=A.contrasts)||void 0===z?void 0:z.grey125125,inlineIconColor:null==A||null===(d=A.contrasts)||void 0===d?void 0:d.grey4570,inlineIconHoverColor:null==A||null===(O=A.contrasts)||void 0===O?void 0:O.blue4570},...R[q]}})),pH(tH=U()((nH=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this.focus=()=>{this.ref&&this.ref.focus()},this.handleClick=e=>{const o=this.props,p=o.disabled,t=o.readOnly,n=o.onClick;p||t?(e.preventDefault(),e.stopPropagation()):"function"==typeof n&&n(e)},this.handleRef=e=>{this.ref=e,"function"==typeof this.props.elementRef&&this.props.elementRef(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}get focused(){return xe(this.ref)}render(){const o=this.props,p=o.className,t=o.dismissible,n=o.disabled,r=o.readOnly,c=o.text,s=o.title,l=o.onClick,i=o.margin,a=o.styles,M=J.omitViewProps(pe(this.props,e.allowedProps),e);return Y(J,Object.assign({},M,{elementRef:this.handleRef,css:null==a?void 0:a.tag,className:p,as:l?"button":"span",margin:i,type:l?"button":void 0,onClick:null!=l?l:this.handleClick,disabled:n||r,display:void 0,title:s||("string"==typeof c?c:void 0)}),Y("span",{css:null==a?void 0:a.text},c),l&&t?Y(ro,{css:null==a?void 0:a.icon}):null)}},nH.displayName="Tag",nH.componentId="Tag",nH.allowedProps=["className","text","title","disabled","readOnly","dismissible","margin","onClick","elementRef","size","variant"],nH.propTypes=oH,nH.defaultProps={size:"medium",dismissible:!1,variant:"default",disabled:!1,readOnly:!1},tH=nH))||tH)||tH);const cH={label:E.node.isRequired,id:E.string,size:E.oneOf(["small","medium","large"]),layout:E.oneOf(["stacked","inline"]),autoGrow:E.bool,resize:E.oneOf(["none","both","horizontal","vertical"]),width:E.string,height:E.string,maxHeight:E.oneOfType([E.number,E.string]),messages:E.arrayOf(t.message),inline:E.bool,placeholder:E.string,disabled:E.bool,readOnly:E.bool,required:E.bool,textareaRef:E.func,defaultValue:E.string,value:Se(E.string),onChange:E.func};var sH,lH,iH,aH;let MH=(sH=K(),lH=_(((e,o)=>{const p=o.disabled,t=o.size,n={small:{fontSize:e.smallFontSize},medium:{fontSize:e.mediumFontSize},large:{fontSize:e.largeFontSize}};return{textArea:{label:"textArea",all:"initial",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",appearance:"none",height:"auto",margin:0,width:"100%",display:"block",boxSizing:"border-box",padding:e.padding,fontFamily:e.fontFamily,fontWeight:e.fontWeight,borderWidth:e.borderWidth,borderStyle:e.borderStyle,borderTopColor:e.borderTopColor,borderRightColor:e.borderRightColor,borderBottomColor:e.borderBottomColor,borderLeftColor:e.borderLeftColor,borderRadius:e.borderRadius,color:e.color,background:e.background,whiteSpace:"pre-wrap",wordWrap:"break-word",textAlign:"start",...n[t],"&:focus + [class$=-textArea__outline]":{transform:"scale(1)",opacity:1},"&[aria-invalid], &[aria-invalid]:focus, &[aria-invalid]:focus + [class$=-textArea__outline]":{borderColor:e.errorBorderColor},"&::placeholder":{color:e.placeholderColor},...p&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5}},textAreaLayout:{label:"textArea__layout",position:"relative"},textAreaOutline:{label:"textArea__outline",pointerEvents:"none",position:"absolute",display:"block",boxSizing:"border-box",top:"-0.25rem",bottom:"-0.25rem",left:"-0.25rem",right:"-0.25rem",border:`${e.focusOutlineWidth} ${e.focusOutlineStyle} ${e.focusOutlineColor}`,borderRadius:`calc(${e.borderRadius} * 1.5)`,transition:"all 0.2s",opacity:0,transform:"scale(0.95)"}}}),(e=>{var o,p,t,n,r,c,s,l,i,a;const M=e.colors,b=e.typography,z=e.borders,d=e.spacing,O=e.forms,h=e.key,A={canvas:{color:e["ic-brand-font-color-dark"],focusOutlineColor:e["ic-brand-primary"]}};return{...{fontFamily:null==b?void 0:b.fontFamily,fontWeight:null==b?void 0:b.fontWeightNormal,color:null==M||null===(o=M.contrasts)||void 0===o?void 0:o.grey125125,background:null==M||null===(p=M.contrasts)||void 0===p?void 0:p.white1010,borderWidth:null==z?void 0:z.widthSmall,borderStyle:null==z?void 0:z.style,borderTopColor:null==M||null===(t=M.contrasts)||void 0===t?void 0:t.grey1214,borderRightColor:null==M||null===(n=M.contrasts)||void 0===n?void 0:n.grey1214,borderBottomColor:null==M||null===(r=M.contrasts)||void 0===r?void 0:r.grey1214,borderLeftColor:null==M||null===(c=M.contrasts)||void 0===c?void 0:c.grey1214,borderRadius:null==z?void 0:z.radiusMedium,padding:null==d?void 0:d.small,focusOutlineColor:null==M||null===(s=M.contrasts)||void 0===s?void 0:s.blue4570,focusOutlineWidth:null==z?void 0:z.widthMedium,focusOutlineStyle:null==z?void 0:z.style,errorBorderColor:null==M||null===(l=M.contrasts)||void 0===l?void 0:l.red4570,errorOutlineColor:null==M||null===(i=M.contrasts)||void 0===i?void 0:i.red4570,placeholderColor:null==M||null===(a=M.contrasts)||void 0===a?void 0:a.grey4570,smallFontSize:null==b?void 0:b.fontSizeSmall,smallHeight:null==O?void 0:O.inputHeightSmall,mediumFontSize:null==b?void 0:b.fontSizeMedium,mediumHeight:null==O?void 0:O.inputHeightMedium,largeFontSize:null==b?void 0:b.fontSizeLarge,largeHeight:null==O?void 0:O.inputHeightLarge},...A[h]}})),sH(iH=lH(iH=U()((aH=class e extends u.Component{constructor(e){super(e),this._listener=void 0,this._request=void 0,this._defaultId=void 0,this._textareaResizeListener=void 0,this._debounced=void 0,this._textarea=null,this._container=null,this._height=void 0,this._manuallyResized=!1,this._highlightRef=null,this.myObserver=null,this.resizeTimeout=void 0,this.ref=null,this._textareaResize=()=>{const e=this._textarea.style.height;""!==e&&e!==this._height&&(this._manuallyResized=!0,this._textarea.style.overflowY="auto",this._container.style.minHeight=e)},this.grow=()=>{if(!this._textarea||this._manuallyResized)return;const e=this._textarea.offsetHeight-this._textarea.clientHeight;let o="";this._textarea.style.height="auto",this._textarea.style.overflowY="hidden",o=this._textarea.scrollHeight+e+"px";const p=this.props.maxHeight?Ee(this.props.maxHeight,this._container):void 0;this.props.maxHeight&&void 0!==p&&this._textarea.scrollHeight>p?this._textarea.style.overflowY="auto":this.props.height&&(""===this._textarea.value?o=this.props.height:Ee(this.props.height,this._container)>this._textarea.scrollHeight&&(this._textarea.style.overflowY="auto",o=this.props.height));void 0!==p&&Ee(o)>p||(this._container.style.minHeight=o),this._height=o,this._textarea.style.height=o},this.handleChange=e=>{const o=this.props,p=o.onChange,t=o.value,n=o.disabled,r=o.readOnly;n||r?e.preventDefault():(void 0===t&&this.autoGrow(),"function"==typeof p&&p(e))},this.handleContainerRef=e=>{this._container=e},this._defaultId=e.deterministicId(),"undefined"==typeof window&&(global.ResizeObserver=class{observe(){}unobserve(){}disconnect(){}})}componentDidMount(){var e,o;this.myObserver=new ResizeObserver((e=>{for(const o of e)if(this._highlightRef){const e=window.getComputedStyle(o.target);this._highlightRef.style.transition="none",this._highlightRef.style.width=`calc(${e.width}px + 2.125rem)`,this._highlightRef.style.height=`calc(${e.height}px + 2.125rem)`,clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{this._highlightRef&&(this._highlightRef.style.transition="all 0.2s")}),500)}})),this.autoGrow(),null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;this.autoGrow(),null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentWillUnmount(){this._listener&&this._listener.remove(),this._textareaResizeListener&&this._textareaResizeListener.disconnect(),this._request&&this._request.cancel(),this._debounced&&this._debounced.cancel(),this.myObserver&&this.myObserver.disconnect()}autoGrow(){if(this.props.autoGrow){if(this._debounced||(this._debounced=De(this.grow,200,{leading:!1,trailing:!0})),this._listener||(this._listener=Pe(window,"resize",this._debounced)),this._textarea&&!this._textareaResizeListener){const e=ke(this._textarea).height;this._textareaResizeListener=new ResizeObserver((o=>{for(const p of o){const o=p.contentRect.height;e!==o&&this._textareaResize()}})),this._textareaResizeListener.observe(this._textarea)}this._request=Ye(this.grow)}}focus(){this._textarea.focus()}get minHeight(){return this._textarea.style.minHeight}get invalid(){return this.props.messages&&this.props.messages.findIndex((e=>"error"===e.type))>=0}get id(){return this.props.id||this._defaultId}get focused(){return xe(this._textarea)}get value(){return this._textarea.value}render(){var o,p,t;const n=this.props,r=n.autoGrow,c=n.placeholder,s=n.value,l=n.defaultValue,i=n.disabled,a=n.readOnly,M=n.required,b=n.width,z=n.height,d=n.maxHeight,O=n.textareaRef,h=n.resize,u=pe(this.props,e.allowedProps),f={width:b,resize:h,height:r?void 0:z,maxHeight:d},m=Y("textarea",Object.assign({},u,{value:s,defaultValue:l,placeholder:c,ref:e=>{var o;e&&(null===(o=this.myObserver)||void 0===o||o.observe(e));this._textarea=e,"function"==typeof O&&O(e)},style:f,id:this.id,required:M,"aria-required":M,"aria-invalid":this.invalid?"true":void 0,disabled:i||a,css:null===(o=this.props.styles)||void 0===o?void 0:o.textArea,onChange:this.handleChange}));return Y(A,Object.assign({},te(this.props,A.allowedProps),{label:this.props.label,vAlign:"top",id:this.id,elementRef:e=>{this.ref=e}}),Y("div",{css:null===(p=this.props.styles)||void 0===p?void 0:p.textAreaLayout,style:{width:b,maxHeight:d},ref:this.handleContainerRef},m,i||a?null:Y("span",{css:null===(t=this.props.styles)||void 0===t?void 0:t.textAreaOutline,"aria-hidden":"true",ref:e=>this._highlightRef=e})))}},aH.displayName="TextArea",aH.componentId="TextArea",aH.allowedProps=["label","id","size","layout","autoGrow","resize","width","height","maxHeight","messages","inline","placeholder","disabled","readOnly","required","textareaRef","defaultValue","value","onChange"],aH.propTypes=cH,aH.defaultProps={size:"medium",autoGrow:!0,resize:"none",inline:!1,messages:[],disabled:!1,readOnly:!1,layout:"stacked",required:!1},iH=aH))||iH)||iH)||iH);const bH={children:E.node.isRequired,summary:E.node.isRequired,toggleLabel:E.oneOfType([E.node,E.func]).isRequired,as:E.elementType,elementRef:E.func,size:E.oneOf(["small","medium","large"]),expanded:Se(E.bool,"onToggle","defaultExpanded"),defaultExpanded:E.bool,onToggle:E.func,icon:E.oneOfType([E.node,E.func]),iconExpanded:E.oneOfType([E.node,E.func]),transition:E.bool,border:E.bool};var zH,dH;let OH=U()((dH=class e extends u.Component{constructor(...e){super(...e),this.ref=null,this._button=null,this._shouldTransition=!1,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.handleButtonRef=e=>{this._button=e}}get focused(){return xe(this._button)}focus(){var e;null===(e=this._button)||void 0===e||e.focus()}componentDidMount(){this._shouldTransition=!0}renderIcon(e){const o=e?this.props.iconExpanded:this.props.icon;return o?$(o):null}renderToggle(e,o){const p=this.props,t=p.toggleLabel,n=p.size;let r;r="function"==typeof t?t(o):t;const c={...e};return f.createElement(ao,Object.assign({},c,{withBackground:!1,withBorder:!1,size:"large"===n?"medium":"small",elementRef:this.handleButtonRef,screenReaderLabel:r}),this.renderIcon(o))}renderDetails(e){return f.createElement(J,Object.assign({},e,{display:"block",borderWidth:"small none none none"}),this.props.transition&&this._shouldTransition?f.createElement(ge,{transitionOnMount:!0,in:!0,type:"fade"},this.props.children):this.props.children)}render(){const o=X(e,this.props);return f.createElement(io,te(this.props,io.allowedProps),(({expanded:p,getToggleProps:t,getDetailsProps:n})=>f.createElement(J,Object.assign({},pe(this.props,e.allowedProps),{borderWidth:this.props.border?"small":"none",as:o,elementRef:this.handleRef,display:"block",borderRadius:"medium",background:"primary"}),f.createElement(NI,{padding:"small"===this.props.size?"x-small":"small small small x-small"},f.createElement(NI.Item,null,this.renderToggle(t(),p)),f.createElement(NI.Item,{shouldGrow:!0,shouldShrink:!0,padding:"0 0 0 x-small"},this.props.summary)),p?this.renderDetails(n()):f.createElement("span",n()))))}},dH.displayName="ToggleGroup",dH.componentId="ToggleGroup",dH.allowedProps=["children","summary","toggleLabel","as","elementRef","size","expanded","defaultExpanded","onToggle","icon","iconExpanded","transition","border"],dH.propTypes=bH,dH.defaultProps={size:"medium",icon:we,iconExpanded:co,defaultExpanded:!1,transition:!0,as:"span",border:!0},zH=dH))||zH;const hH=oe` 50% { opacity: 0.5; transform: translate3d(2%, 0, 0); diff --git a/assets/index-DM7MZwnz.js b/assets/index-C-ITlPCi.js similarity index 99% rename from assets/index-DM7MZwnz.js rename to assets/index-C-ITlPCi.js index a1b1ae5..3cf1c35 100644 --- a/assets/index-DM7MZwnz.js +++ b/assets/index-C-ITlPCi.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CrryxQyl.js","assets/index-CqQFZXZA.css"])))=>i.map(i=>d[i]); -import{R as t,_ as e,W as i,r as n,y as s,i as r,v as o,w as a,U as l,t as h,X as c,k as u,l as f,p as d,o as O}from"./index-CrryxQyl.js";import{T as p,I as m,e as g}from"./index-C6-OLeBB.js";import{a as b,I as v}from"./index-B8c3q9fI.js";import{f as w,M as S,S as y}from"./RenderTopNavBar-BTvx9fvK.js";class x{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,i){[t,e]=R(this,t,e);let n=[];return this.decompose(0,t,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(e,this.length,n,1),k.from(n,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=R(this,t,e);let i=[];return this.decompose(t,e,i,0),k.from(i,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),n=new Z(this),s=new Z(t);for(let r=e,o=e;;){if(n.next(r),s.next(r),r=0,n.lineBreak!=s.lineBreak||n.done!=s.done||n.value!=s.value)return!1;if(o+=n.value.length,n.done||o>=i)return!0}}iter(t=1){return new Z(this,t)}iterRange(t,e=this.length){return new C(this,t,e)}iterLines(t,e){let i;if(null==t)i=this.iter();else{null==e&&(e=this.lines+1);let n=this.line(t).from;i=this.iterRange(n,Math.max(n,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new T(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new Q(t):k.from(Q.split(t,[])):x.empty}}class Q extends x{constructor(t,e=function(t){let e=-1;for(let i of t)e+=i.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,n){for(let s=0;;s++){let r=this.text[s],o=n+r.length;if((e?i:o)>=t)return new A(n,o,i,r);n=o+1,i++}}decompose(t,e,i,n){let s=t<=0&&e>=this.length?this:new Q($(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&n){let t=i.pop(),e=P(s.text,t.text.slice(),0,s.length);if(e.length<=32)i.push(new Q(e,t.length+s.length));else{let t=e.length>>1;i.push(new Q(e.slice(0,t)),new Q(e.slice(t)))}}else i.push(s)}replace(t,e,i){if(!(i instanceof Q))return super.replace(t,e,i);[t,e]=R(this,t,e);let n=P(this.text,P(i.text,$(this.text,0,t)),e),s=this.length+i.length-(e-t);return n.length<=32?new Q(n,s):k.from(Q.split(n,[]),s)}sliceString(t,e=this.length,i="\n"){[t,e]=R(this,t,e);let n="";for(let s=0,r=0;s<=e&&rt&&r&&(n+=i),ts&&(n+=o.slice(Math.max(0,t-s),e-s)),s=a+1}return n}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],n=-1;for(let s of t)i.push(s),n+=s.length+1,32==i.length&&(e.push(new Q(i,n)),i=[],n=-1);return n>-1&&e.push(new Q(i,n)),e}}class k extends x{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let i of t)this.lines+=i.lines}lineInner(t,e,i,n){for(let s=0;;s++){let r=this.children[s],o=n+r.length,a=i+r.lines-1;if((e?a:o)>=t)return r.lineInner(t,e,i,n);n=o+1,i=a+1}}decompose(t,e,i,n){for(let s=0,r=0;r<=e&&s=r){let s=n&((r<=t?1:0)|(a>=e?2:0));r>=t&&a<=e&&!s?i.push(o):o.decompose(t-r,e-r,i,s)}r=a+1}}replace(t,e,i){if([t,e]=R(this,t,e),i.lines=s&&e<=o){let a=r.replace(t-s,e-s,i),l=this.lines-r.lines+a.lines;if(a.lines>4&&a.lines>l>>6){let s=this.children.slice();return s[n]=a,new k(s,this.length-(e-t)+i.length)}return super.replace(s,o,a)}s=o+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i="\n"){[t,e]=R(this,t,e);let n="";for(let s=0,r=0;st&&s&&(n+=i),tr&&(n+=o.sliceString(t-r,e-r,i)),r=a+1}return n}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof k))return 0;let i=0,[n,s,r,o]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;n+=e,s+=e){if(n==r||s==o)return i;let a=this.children[n],l=t.children[s];if(a!=l)return i+a.scanIdentical(l,e);i+=a.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let i=0;for(let f of t)i+=f.lines;if(i<32){let i=[];for(let e of t)e.flatten(i);return new Q(i,e)}let n=Math.max(32,i>>5),s=n<<1,r=n>>1,o=[],a=0,l=-1,h=[];function c(t){let e;if(t.lines>s&&t instanceof k)for(let i of t.children)c(i);else t.lines>r&&(a>r||!a)?(u(),o.push(t)):t instanceof Q&&a&&(e=h[h.length-1])instanceof Q&&t.lines+e.lines<=32?(a+=t.lines,l+=t.length+1,h[h.length-1]=new Q(e.text.concat(t.text),e.length+1+t.length)):(a+t.lines>n&&u(),a+=t.lines,l+=t.length+1,h.push(t))}function u(){0!=a&&(o.push(1==h.length?h[0]:k.from(h,l)),l=-1,a=h.length=0)}for(let f of t)c(f);return u(),1==o.length?o[0]:new k(o,e)}}function P(t,e,i=0,n=1e9){for(let s=0,r=0,o=!0;r=i&&(l>n&&(a=a.slice(0,n-s)),s0?1:(t instanceof Q?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,n=this.nodes[i],s=this.offsets[i],r=s>>1,o=n instanceof Q?n.text.length:n.children.length;if(r==(e>0?o:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&s)==(e>0?0:1)){if(this.offsets[i]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(n instanceof Q){let s=n.text[r+(e<0?-1:0)];if(this.offsets[i]+=e,s.length>Math.max(0,t))return this.value=0==t?s:e>0?s.slice(t):s.slice(0,s.length-t),this;t-=s.length}else{let s=n.children[r+(e<0?-1:0)];t>s.length?(t-=s.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(s),this.offsets.push(e>0?1:(s instanceof Q?s.text.length:s.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class C{constructor(t,e,i){this.value="",this.done=!1,this.cursor=new Z(t,e>i?-1:1),this.pos=e>i?t.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:n}=this.cursor.next(t);return this.pos+=(n.length+t)*e,this.value=n.length<=i?n:e<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class T{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:i,value:n}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(x.prototype[Symbol.iterator]=function(){return this.iter()},Z.prototype[Symbol.iterator]=C.prototype[Symbol.iterator]=T.prototype[Symbol.iterator]=function(){return this});let A=class{constructor(t,e,i,n){this.from=t,this.to=e,this.number=i,this.text=n}get length(){return this.to-this.from}};function R(t,e,i){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,i))]}let M="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t=>t?parseInt(t,36):1));for(let yw=1;ywt)return M[e-1]<=t;return!1}function q(t){return t>=127462&&t<=127487}function V(t,e,i=!0,n=!0){return(i?E:z)(t,e,n)}function E(t,e,i){if(e==t.length)return e;e&&Y(t.charCodeAt(e))&&L(t.charCodeAt(e-1))&&e--;let n=_(t,e);for(e+=j(n);e=0&&q(_(t,n));)i++,n-=2;if(i%2==0)break;e+=2}}}return e}function z(t,e,i){for(;e>0;){let n=E(t,e-2,i);if(n=56320&&t<57344}function L(t){return t>=55296&&t<56320}function _(t,e){let i=t.charCodeAt(e);if(!L(i)||e+1==t.length)return i;let n=t.charCodeAt(e+1);return Y(n)?n-56320+(i-55296<<10)+65536:i}function D(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function j(t){return t<65536?1:2}const B=/\r\n?|\n/;var W=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(W||(W={}));class I{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;et)return s+(t-n);s+=o}else{if(i!=W.Simple&&l>=t&&(i==W.TrackDel&&nt||i==W.TrackBefore&&nt))return null;if(l>t||l==t&&e<0&&!o)return t==n||e<0?s:s+a;s+=a}n=l}if(t>n)throw new RangeError(`Position ${t} is out of range for changeset of length ${n}`);return s}touchesRange(t,e=t){for(let i=0,n=0;i=0&&n<=e&&s>=t)return!(ne)||"cover";n=s}return!1}toString(){let t="";for(let e=0;e=0?":"+n:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new I(t)}static create(t){return new I(t)}}class G extends I{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return H(this,((e,i,n,s,r)=>t=t.replace(n,n+(i-e),r)),!1),t}mapDesc(t,e=!1){return F(this,t,e,!0)}invert(t){let e=this.sections.slice(),i=[];for(let n=0,s=0;n=0){e[n]=o,e[n+1]=r;let a=n>>1;for(;i.length0&&N(i,e,s.text),s.forward(t),o+=t}let l=t[r++];for(;o>1].toJSON()))}return t}static of(t,e,i){let n=[],s=[],r=0,o=null;function a(t=!1){if(!t&&!n.length)return;ro||t<0||o>e)throw new RangeError(`Invalid change range ${t} to ${o} (in doc of length ${e})`);let c=h?"string"==typeof h?x.of(h.split(i||B)):h:x.empty,u=c.length;if(t==o&&0==u)return;tr&&U(n,t-r,-1),U(n,o-t,u),N(s,n,c),r=o}}(t),a(!o),o}static empty(t){return new G(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],i=[];for(let n=0;ne&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==s.length)e.push(s[0],0);else{for(;i.length=0&&i<=0&&i==t[s+1]?t[s]+=e:0==e&&0==t[s]?t[s+1]+=i:n?(t[s]+=e,t[s+1]+=i):t.push(e,i)}function N(t,e,i){if(0==i.length)return;let n=e.length-2>>1;if(n>1])),!(i||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(s,h,r,c,u),s=h,r=c}}}function F(t,e,i,n=!1){let s=[],r=n?[]:null,o=new J(t),a=new J(e);for(let l=-1;;)if(-1==o.ins&&-1==a.ins){let t=Math.min(o.len,a.len);U(s,t,-1),o.forward(t),a.forward(t)}else if(a.ins>=0&&(o.ins<0||l==o.i||0==o.off&&(a.len=0&&l=0)){if(o.done&&a.done)return r?G.createSet(s,r):I.create(s);throw new Error("Mismatched change set lengths")}{let t=0,e=o.len;for(;e;)if(-1==a.ins){let i=Math.min(e,a.len);t+=i,e-=i,a.forward(i)}else{if(!(0==a.ins&&a.lent||o.ins>=0&&o.len>t)&&(a||n.length>e),r.forward2(t),o.forward(t)}}else U(n,0,o.ins,a),s&&N(s,n,o.text),o.next()}}class J{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i>1;return e>=t.length?x.empty:t[e]}textBit(t){let{inserted:e}=this.set,i=this.i-2>>1;return i>=e.length&&!t?x.empty:e[i].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class tt{constructor(t,e,i){this.from=t,this.to=e,this.flags=i}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let i,n;return this.empty?i=n=t.mapPos(this.from,e):(i=t.mapPos(this.from,1),n=t.mapPos(this.to,-1)),i==this.from&&n==this.to?this:new tt(i,n,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return et.range(t,e);let i=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return et.range(this.anchor,i)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return et.range(t.anchor,t.head)}static create(t,e,i){return new tt(t,e,i)}}class et{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:et.create(this.ranges.map((i=>i.map(t,e))),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let i=0;it.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new et(t.ranges.map((t=>tt.fromJSON(t))),t.main)}static single(t,e=t){return new et([et.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let i=0,n=0;nt?8:0)|s)}static normalized(t,e=0){let i=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(i);for(let n=1;ni.head?et.range(o,r):et.range(r,o))}}return new et(t,e)}}function it(t,e){for(let i of t.ranges)if(i.to>e)throw new RangeError("Selection points outside of document")}let nt=0;class st{constructor(t,e,i,n,s){this.combine=t,this.compareInput=e,this.compare=i,this.isStatic=n,this.id=nt++,this.default=t([]),this.extensions="function"==typeof s?s(this):s}get reader(){return this}static define(t={}){return new st(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:rt),!!t.static,t.enables)}of(t){return new ot([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new ot(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new ot(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(i=>e(i.field(t))))}}function rt(t,e){return t==e||t.length==e.length&&t.every(((t,i)=>t===e[i]))}class ot{constructor(t,e,i,n){this.dependencies=t,this.facet=e,this.type=i,this.value=n,this.id=nt++}dynamicSlot(t){var e;let i=this.value,n=this.facet.compareInput,s=this.id,r=t[s]>>1,o=2==this.type,a=!1,l=!1,h=[];for(let c of this.dependencies)"doc"==c?a=!0:"selection"==c?l=!0:1&(null!==(e=t[c.id])&&void 0!==e?e:1)||h.push(t[c.id]);return{create:t=>(t.values[r]=i(t),1),update(t,e){if(a&&e.docChanged||l&&(e.docChanged||e.selection)||lt(t,h)){let e=i(t);if(o?!at(e,t.values[r],n):!n(e,t.values[r]))return t.values[r]=e,1}return 0},reconfigure:(t,e)=>{let a,l=e.config.address[s];if(null!=l){let s=xt(e,l);if(this.dependencies.every((i=>i instanceof st?e.facet(i)===t.facet(i):!(i instanceof ut)||e.field(i,!1)==t.field(i,!1)))||(o?at(a=i(t),s,n):n(a=i(t),s)))return t.values[r]=s,0}else a=i(t);return t.values[r]=a,1}}}}function at(t,e,i){if(t.length!=e.length)return!1;for(let n=0;nt[e.id])),s=i.map((t=>t.type)),r=n.filter((t=>!(1&t))),o=t[e.id]>>1;function a(t){let i=[];for(let e=0;et===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(ct).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,i)=>{let n=t.values[e],s=this.updateF(n,i);return this.compareF(n,s)?0:(t.values[e]=s,1)},reconfigure:(t,i)=>null!=i.config.address[this.id]?(t.values[e]=i.field(this),0):(t.values[e]=this.create(t),1)}}init(t){return[this,ct.of({field:this,create:t})]}get extension(){return this}}const ft=4,dt=3,Ot=2,pt=1;function mt(t){return e=>new bt(e,t)}const gt={highest:mt(0),high:mt(pt),default:mt(Ot),low:mt(dt),lowest:mt(ft)};class bt{constructor(t,e){this.inner=t,this.prec=e}}class vt{of(t){return new wt(this,t)}reconfigure(t){return vt.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class wt{constructor(t,e){this.compartment=t,this.inner=e}}class St{constructor(t,e,i,n,s,r){for(this.base=t,this.compartments=e,this.dynamicSlots=i,this.address=n,this.staticValues=s,this.facets=r,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(t,e,i){let n=[],s=Object.create(null),r=new Map;for(let u of function(t,e,i){let n=[[],[],[],[],[]],s=new Map;function r(t,o){let a=s.get(t);if(null!=a){if(a<=o)return;let e=n[a].indexOf(t);e>-1&&n[a].splice(e,1),t instanceof wt&&i.delete(t.compartment)}if(s.set(t,o),Array.isArray(t))for(let e of t)r(e,o);else if(t instanceof wt){if(i.has(t.compartment))throw new RangeError("Duplicate use of compartment in extensions");let n=e.get(t.compartment)||t.inner;i.set(t.compartment,n),r(n,o)}else if(t instanceof bt)r(t.inner,t.prec);else if(t instanceof ut)n[o].push(t),t.provides&&r(t.provides,o);else if(t instanceof ot)n[o].push(t),t.facet.extensions&&r(t.facet.extensions,Ot);else{let e=t.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(e,o)}}return r(t,Ot),n.reduce(((t,e)=>t.concat(e)))}(t,e,r))u instanceof ut?n.push(u):(s[u.facet.id]||(s[u.facet.id]=[])).push(u);let o=Object.create(null),a=[],l=[];for(let u of n)o[u.id]=l.length<<1,l.push((t=>u.slot(t)));let h=null==i?void 0:i.config.facets;for(let u in s){let t=s[u],e=t[0].facet,n=h&&h[u]||[];if(t.every((t=>0==t.type)))if(o[e.id]=a.length<<1|1,rt(n,t))a.push(i.facet(e));else{let n=e.combine(t.map((t=>t.value)));a.push(i&&e.compare(n,i.facet(e))?i.facet(e):n)}else{for(let e of t)0==e.type?(o[e.id]=a.length<<1|1,a.push(e.value)):(o[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));o[e.id]=l.length<<1,l.push((i=>ht(i,e,t)))}}let c=l.map((t=>t(o)));return new St(t,r,c,o,a,s)}}function yt(t,e){if(1&e)return 2;let i=e>>1,n=t.status[i];if(4==n)throw new Error("Cyclic dependency between fields and/or facets");if(2&n)return n;t.status[i]=4;let s=t.computeSlot(t,t.config.dynamicSlots[i]);return t.status[i]=2|s}function xt(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const Qt=st.define(),kt=st.define({combine:t=>t.some((t=>t)),static:!0}),Pt=st.define({combine:t=>t.length?t[0]:void 0,static:!0}),$t=st.define(),Zt=st.define(),Ct=st.define(),Tt=st.define({combine:t=>!!t.length&&t[0]});class At{constructor(t,e){this.type=t,this.value=e}static define(){return new Rt}}class Rt{of(t){return new At(this,t)}}class Mt{constructor(t){this.map=t}of(t){return new Xt(this,t)}}class Xt{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new Xt(this.type,e)}is(t){return this.type==t}static define(t={}){return new Mt(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let i=[];for(let n of t){let t=n.map(e);t&&i.push(t)}return i}}Xt.reconfigure=Xt.define(),Xt.appendConfig=Xt.define();class qt{constructor(t,e,i,n,s,r){this.startState=t,this.changes=e,this.selection=i,this.effects=n,this.annotations=s,this.scrollIntoView=r,this._doc=null,this._state=null,i&&it(i,e.newLength),s.some((t=>t.type==qt.time))||(this.annotations=s.concat(qt.time.of(Date.now())))}static create(t,e,i,n,s,r){return new qt(t,e,i,n,s,r)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(qt.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function Vt(t,e){let i=[];for(let n=0,s=0;;){let r,o;if(n=t[n]))r=t[n++],o=t[n++];else{if(!(s=0;s--){let r=i[s](t);r&&Object.keys(r).length&&(n=Et(n,zt(e,r,t.changes.newLength),!0))}return n==t?t:qt.create(e,t.changes,t.selection,n.effects,n.annotations,n.scrollIntoView)}(i?function(t){let e=t.startState,i=!0;for(let s of e.facet($t)){let e=s(t);if(!1===e){i=!1;break}Array.isArray(e)&&(i=!0===i?e:Vt(i,e))}if(!0!==i){let n,s;if(!1===i)s=t.changes.invertedDesc,n=G.empty(e.doc.length);else{let e=t.changes.filter(i);n=e.changes,s=e.filtered.mapDesc(e.changes).invertedDesc}t=qt.create(e,n,t.selection&&t.selection.map(s),Xt.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let n=e.facet(Zt);for(let s=n.length-1;s>=0;s--){let i=n[s](t);t=i instanceof qt?i:Array.isArray(i)&&1==i.length&&i[0]instanceof qt?i[0]:Yt(e,_t(i),!1)}return t}(s):s)}qt.time=At.define(),qt.userEvent=At.define(),qt.addToHistory=At.define(),qt.remote=At.define();const Lt=[];function _t(t){return null==t?Lt:Array.isArray(t)?t:[t]}var Dt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Dt||(Dt={}));const jt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Bt;try{Bt=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(Sw){}function Wt(t){return e=>{if(!/\S/.test(e))return Dt.Space;if(function(t){if(Bt)return Bt.test(t);for(let e=0;e"€"&&(i.toUpperCase()!=i.toLowerCase()||jt.test(i)))return!0}return!1}(e))return Dt.Word;for(let i=0;i-1)return Dt.Word;return Dt.Other}}class It{constructor(t,e,i,n,s,r){this.config=t,this.doc=e,this.selection=i,this.values=n,this.status=t.statusTemplate.slice(),this.computeSlot=s,r&&(r._state=this);for(let o=0;os.set(e,t))),i=null),s.set(o.value.compartment,o.value.extension)):o.is(Xt.reconfigure)?(i=null,n=o.value):o.is(Xt.appendConfig)&&(i=null,n=_t(n).concat(o.value));if(i)e=t.startState.values.slice();else{i=St.resolve(n,s,this),e=new It(i,this.doc,this.selection,i.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values}let r=t.startState.facet(kt)?t.newSelection:t.newSelection.asSingle();new It(i,t.newDoc,r,e,((e,i)=>i.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:et.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,i=t(e.ranges[0]),n=this.changes(i.changes),s=[i.range],r=_t(i.effects);for(let o=1;oe.spec.fromJSON(r,t))))}return It.create({doc:t.doc,selection:et.fromJSON(t.selection),extensions:e.extensions?n.concat([e.extensions]):n})}static create(t={}){let e=St.resolve(t.extensions||[],new Map),i=t.doc instanceof x?t.doc:x.of((t.doc||"").split(e.staticFacet(It.lineSeparator)||B)),n=t.selection?t.selection instanceof et?t.selection:et.single(t.selection.anchor,t.selection.head):et.single(0);return it(n,i.length),e.staticFacet(kt)||(n=n.asSingle()),new It(e,i,n,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(It.tabSize)}get lineBreak(){return this.facet(It.lineSeparator)||"\n"}get readOnly(){return this.facet(Tt)}phrase(t,...e){for(let i of this.facet(It.phrases))if(Object.prototype.hasOwnProperty.call(i,t)){t=i[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,((t,i)=>{if("$"==i)return"$";let n=+(i||1);return!n||n>e.length?t:e[n-1]}))),t}languageDataAt(t,e,i=-1){let n=[];for(let s of this.facet(Qt))for(let r of s(this,e,i))Object.prototype.hasOwnProperty.call(r,t)&&n.push(r[t]);return n}charCategorizer(t){return Wt(this.languageDataAt("wordChars",t).join(""))}wordAt(t){let{text:e,from:i,length:n}=this.doc.lineAt(t),s=this.charCategorizer(t),r=t-i,o=t-i;for(;r>0;){let t=V(e,r,!1);if(s(e.slice(t,r))!=Dt.Word)break;r=t}for(;ot.length?t[0]:4}),It.lineSeparator=Pt,It.readOnly=Tt,It.phrases=st.define({compare(t,e){let i=Object.keys(t),n=Object.keys(e);return i.length==n.length&&i.every((i=>t[i]==e[i]))}}),It.languageData=Qt,It.changeFilter=$t,It.transactionFilter=Zt,It.transactionExtender=Ct,vt.reconfigure=Xt.define();class Ut{eq(t){return this==t}range(t,e=t){return Nt.create(t,e,this)}}Ut.prototype.startSide=Ut.prototype.endSide=0,Ut.prototype.point=!1,Ut.prototype.mapMode=W.TrackDel;let Nt=class t{constructor(t,e,i){this.from=t,this.to=e,this.value=i}static create(e,i,n){return new t(e,i,n)}};function Ht(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Ft{constructor(t,e,i,n){this.from=t,this.to=e,this.value=i,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(t,e,i,n=0){let s=i?this.to:this.from;for(let r=n,o=s.length;;){if(r==o)return r;let n=r+o>>1,a=s[n]-t||(i?this.value[n].endSide:this.value[n].startSide)-e;if(n==r)return a>=0?r:o;a>=0?o=n:r=n+1}}between(t,e,i,n){for(let s=this.findIndex(e,-1e9,!0),r=this.findIndex(i,1e9,!1,s);sh||l==h&&c.startSide>0&&c.endSide<=0)continue;(h-l||c.endSide-c.startSide)<0||(r<0&&(r=l),c.point&&(o=Math.max(o,h-l)),i.push(c),n.push(l-r),s.push(h-r))}return{mapped:i.length?new Ft(n,s,i,o):null,pos:r}}}class Kt{constructor(t,e,i,n){this.chunkPos=t,this.chunk=e,this.nextLayer=i,this.maxPoint=n}static create(t,e,i,n){return new Kt(t,e,i,n)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:i=!1,filterFrom:n=0,filterTo:s=this.length}=t,r=t.filter;if(0==e.length&&!r)return this;if(i&&(e=e.slice().sort(Ht)),this.isEmpty)return e.length?Kt.of(e):this;let o=new ee(this,null,-1).goto(0),a=0,l=[],h=new Jt;for(;o.value||a=0){let t=e[a++];h.addInner(t.from,t.to,t.value)||l.push(t)}else 1==o.rangeIndex&&o.chunkIndexthis.chunkEnd(o.chunkIndex)||so.to||s=s&&t<=s+r.length&&!1===r.between(s,t-s,e-s,i))return}this.nextLayer.between(t,e,i)}}iter(t=0){return ie.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return ie.from(t).goto(e)}static compare(t,e,i,n,s=-1){let r=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),o=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),a=te(r,o,i),l=new se(r,a,s),h=new se(o,a,s);i.iterGaps(((t,e,i)=>re(l,t,h,e,i,n))),i.empty&&0==i.length&&re(l,0,h,0,0,n)}static eq(t,e,i=0,n){null==n&&(n=999999999);let s=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),r=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(s.length!=r.length)return!1;if(!s.length)return!0;let o=te(s,r),a=new se(s,o,0).goto(i),l=new se(r,o,0).goto(i);for(;;){if(a.to!=l.to||!oe(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>n)return!0;a.next(),l.next()}}static spans(t,e,i,n,s=-1){let r=new se(t,null,s).goto(e),o=e,a=r.openStart;for(;;){let t=Math.min(r.to,i);if(r.point){let i=r.activeForPoint(r.to),s=r.pointFromo&&(n.span(o,t,r.active,a),a=r.openEnd(t));if(r.to>i)return a+(r.point&&r.to>i?1:0);o=r.to,r.next()}}static of(t,e=!1){let i=new Jt;for(let n of t instanceof Nt?[t]:e?function(t){if(t.length>1)for(let e=t[0],i=1;i0)return t.slice().sort(Ht);e=n}return t}(t):t)i.add(n.from,n.to,n.value);return i.finish()}static join(t){if(!t.length)return Kt.empty;let e=t[t.length-1];for(let i=t.length-2;i>=0;i--)for(let n=t[i];n!=Kt.empty;n=n.nextLayer)e=new Kt(n.chunkPos,n.chunk,e,Math.max(n.maxPoint,e.maxPoint));return e}}Kt.empty=new Kt([],[],null,-1),Kt.empty.nextLayer=Kt.empty;class Jt{finishChunk(t){this.chunks.push(new Ft(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,i){this.addInner(t,e,i)||(this.nextLayer||(this.nextLayer=new Jt)).add(t,e,i)}addInner(t,e,i){let n=t-this.lastTo||i.startSide-this.last.endSide;if(n<=0&&(t-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(n<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=t,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+t,this.lastTo=e.to[i]+t,!0}finish(){return this.finishInner(Kt.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=Kt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function te(t,e,i){let n=new Map;for(let r of t)for(let t=0;t=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&n.push(new ee(r,e,i,s));return 1==n.length?n[0]:new ie(n)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let i of this.heap)i.goto(t,e);for(let i=this.heap.length>>1;i>=0;i--)ne(this.heap,i);return this.next(),this}forward(t,e){for(let i of this.heap)i.forward(t,e);for(let i=this.heap.length>>1;i>=0;i--)ne(this.heap,i);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),ne(this.heap,0)}}}function ne(t,e){for(let i=t[e];;){let n=1+(e<<1);if(n>=t.length)break;let s=t[n];if(n+1=0&&(s=t[n+1],n++),i.compare(s)<0)break;t[n]=i,t[e]=s,e=n}}class se{constructor(t,e,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=ie.from(t,e,i)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){ae(this.active,t),ae(this.activeTo,t),ae(this.activeRank,t),this.minActive=he(this.active,this.activeTo)}addActive(t){let e=0,{value:i,to:n,rank:s}=this.cursor;for(;e0;)e++;le(this.active,e,i),le(this.activeTo,e,n),le(this.activeRank,e,s),t&&le(t,e,this.cursor.from),this.minActive=he(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let n=this.minActive;if(n>-1&&(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)<0){if(this.activeTo[n]>t){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),i&&ae(i,n)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from=0&&i[e]=0&&!(this.activeRank[i]t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}openEnd(t){let e=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)e++;return e}}function re(t,e,i,n,s,r){t.goto(e),i.goto(n);let o=n+s,a=n,l=n-e;for(;;){let e=t.to+l-i.to||t.endSide-i.endSide,n=e<0?t.to+l:i.to,s=Math.min(n,o);if(t.point||i.point?t.point&&i.point&&(t.point==i.point||t.point.eq(i.point))&&oe(t.activeForPoint(t.to),i.activeForPoint(i.to))||r.comparePoint(a,s,t.point,i.point):s>a&&!oe(t.active,i.active)&&r.compareRange(a,s,t.active,i.active),n>o)break;a=n,e<=0&&t.next(),e>=0&&i.next()}}function oe(t,e){if(t.length!=e.length)return!1;for(let i=0;i=e;n--)t[n+1]=t[n];t[e]=i}function he(t,e){let i=-1,n=1e9;for(let s=0;s=e)return s;if(s==t.length)break;r+=9==t.charCodeAt(s)?i-r%i:1,s=V(t,s)}return!0===n?-1:t.length}const fe="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),de="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class pe{constructor(t,e){this.rules=[];let{finish:i}=e||{};function n(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function s(t,e,r,o){let a=[],l=/^@(\w+)\b/.exec(t[0]),h=l&&"keyframes"==l[1];if(l&&null==e)return r.push(t[0]+";");for(let i in e){let o=e[i];if(/&/.test(i))s(i.split(/,\s*/).map((e=>t.map((t=>e.replace(/&/,t))))).reduce(((t,e)=>t.concat(e))),o,r);else if(o&&"object"==typeof o){if(!l)throw new RangeError("The value of a property ("+i+") should be a primitive value.");s(n(i),o,a,h)}else null!=o&&a.push(i.replace(/_.*/,"").replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))+": "+o+";")}(a.length||h)&&r.push((!i||l||o?t:t.map(i)).join(", ")+" {"+a.join(" ")+"}")}for(let r in t)s(n(r),t[r],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=Oe[fe]||1;return Oe[fe]=t+1,"ͼ"+t.toString(36)}static mount(t,e,i){let n=t[de],s=i&&i.nonce;n?s&&n.setNonce(s):n=new ge(t,s),n.mount(Array.isArray(e)?e:[e],t)}}let me=new Map;class ge{constructor(t,e){let i=t.ownerDocument||t,n=i.defaultView;if(!t.head&&t.adoptedStyleSheets&&n.CSSStyleSheet){let e=me.get(i);if(e)return t[de]=e;this.sheet=new n.CSSStyleSheet,me.set(i,this)}else this.styleTag=i.createElement("style"),e&&this.styleTag.setAttribute("nonce",e);this.modules=[],t[de]=this}mount(t,e){let i=this.sheet,n=0,s=0;for(let r=0;r-1&&(this.modules.splice(o,1),s--,o=-1),-1==o){if(this.modules.splice(s++,0,e),i)for(let t=0;t",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},we="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Se="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ye=0;ye<10;ye++)be[48+ye]=be[96+ye]=String(ye);for(ye=1;ye<=24;ye++)be[ye+111]="F"+ye;for(ye=65;ye<=90;ye++)be[ye]=String.fromCharCode(ye+32),ve[ye]=String.fromCharCode(ye);for(var xe in be)ve.hasOwnProperty(xe)||(ve[xe]=be[xe]);function Qe(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function ke(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function Pe(t,e){if(!e.anchorNode)return!1;try{return ke(t,e.anchorNode)}catch(Sw){return!1}}function $e(t){return 3==t.nodeType?Le(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function Ze(t,e,i,n){return!!i&&(Ae(t,e,i,n,-1)||Ae(t,e,i,n,1))}function Ce(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function Te(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function Ae(t,e,i,n,s){for(;;){if(t==i&&e==n)return!0;if(e==(s<0?0:Re(t))){if("DIV"==t.nodeName)return!1;let i=t.parentNode;if(!i||1!=i.nodeType)return!1;e=Ce(t)+(s<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(s<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=s<0?Re(t):0}}}function Re(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Me(t,e){let i=e?t.left:t.right;return{left:i,right:i,top:t.top,bottom:t.bottom}}function Xe(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function qe(t,e){let i=e.width/t.offsetWidth,n=e.height/t.offsetHeight;return(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.width-t.offsetWidth)<1)&&(i=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-t.offsetHeight)<1)&&(n=1),{scaleX:i,scaleY:n}}class Ve{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:i}=t;this.set(e,Math.min(t.anchorOffset,e?Re(e):0),i,Math.min(t.focusOffset,i?Re(i):0))}set(t,e,i,n){this.anchorNode=t,this.anchorOffset=e,this.focusNode=i,this.focusOffset=n}}let Ee,ze=null;function Ye(t){if(t.setActive)return t.setActive();if(ze)return t.focus(ze);let e=[];for(let i=t;i&&(e.push(i,i.scrollTop,i.scrollLeft),i!=i.ownerDocument);i=i.parentNode);if(t.focus(null==ze?{get preventScroll(){return ze={preventScroll:!0},!0}}:void 0),!ze){ze=!1;for(let t=0;tMath.max(1,t.scrollHeight-t.clientHeight-4)}function Be(t,e){for(let i=t,n=e;;){if(3==i.nodeType&&n>0)return{node:i,offset:n};if(1==i.nodeType&&n>0){if("false"==i.contentEditable)return null;i=i.childNodes[n-1],n=Re(i)}else{if(!i.parentNode||Te(i))return null;n=Ce(i),i=i.parentNode}}}function We(t,e){for(let i=t,n=e;;){if(3==i.nodeType&&ne)return i.domBoundsAround(t,e,l);if(c>=t&&-1==n&&(n=a,s=l),l>e&&i.dom.parentNode==this.dom){r=a,o=h;break}h=c,l=c+i.breakAfter}return{from:s,to:o<0?i+this.length:o,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:r=0?this.children[r].dom:null}}markDirty(t=!1){this.flags|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.flags|=2),1&e.flags)return;e.flags|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,7&this.flags&&this.markParentsDirty(!0))}setDOM(t){this.dom!=t&&(this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this)}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,i=Ge){this.markDirty();for(let n=t;nthis.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Fe(t,e,i,n,s,r,o,a,l){let{children:h}=t,c=h.length?h[e]:null,u=r.length?r[r.length-1]:null,f=u?u.breakAfter:o;if(!(e==n&&c&&!o&&!f&&r.length<2&&c.merge(i,s,r.length?u:null,0==i,a,l))){if(n0&&(!o&&r.length&&c.merge(i,c.length,r[0],!1,a,0)?c.breakAfter=r.shift().breakAfter:(i2);var ci={mac:hi||/Mac/.test(Je.platform),windows:/Win/.test(Je.platform),linux:/Linux|X11/.test(Je.platform),ie:si,ie_version:ii?ti.documentMode||6:ni?+ni[1]:ei?+ei[1]:0,gecko:ri,gecko_version:ri?+(/Firefox\/(\d+)/.exec(Je.userAgent)||[0,0])[1]:0,chrome:!!oi,chrome_version:oi?+oi[1]:0,ios:hi,android:/Android\b/.test(Je.userAgent),webkit:ai,safari:li,webkit_version:ai?+(/\bAppleWebKit\/(\d+)/.exec(Je.userAgent)||[0,0])[1]:0,tabSize:null!=ti.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class ui extends Ue{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,i){return!(8&this.flags||i&&(!(i instanceof ui)||this.length-(e-t)+i.length>256||8&i.flags))&&(this.text=this.text.slice(0,t)+(i?i.text:"")+this.text.slice(e),this.markDirty(),!0)}split(t){let e=new ui(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e.flags|=8&this.flags,e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new Ie(this.dom,t)}domBoundsAround(t,e,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return function(t,e,i){let n=t.nodeValue.length;e>n&&(e=n);let s=e,r=e,o=0;0==e&&i<0||e==n&&i>=0?ci.chrome||ci.gecko||(e?(s--,o=1):r=0)?0:a.length-1];ci.safari&&!o&&0==l.width&&(l=Array.prototype.find.call(a,(t=>t.width))||l);return o?Me(l,o<0):l||null}(this.dom,t,e)}}class fi extends Ue{constructor(t,e=[],i=0){super(),this.mark=t,this.children=e,this.length=i;for(let n of e)n.setParent(this)}setAttrs(t){if(De(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}canReuseDOM(t){return super.canReuseDOM(t)&&!(8&(this.flags|t.flags))}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.flags|=6)}sync(t,e){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t,e)}merge(t,e,i,n,s,r){return(!i||!(!(i instanceof fi&&i.mark.eq(this.mark))||t&&s<=0||et&&e.push(i=t&&(n=s),i=r,s++}let r=this.length-t;return this.length=t,n>-1&&(this.children.length=n,this.markDirty()),new fi(this.mark,e,r)}domAtPos(t){return pi(this,t)}coordsAt(t,e){return gi(this,t,e)}}class di extends Ue{static create(t,e,i){return new di(t,e,i)}constructor(t,e,i){super(),this.widget=t,this.length=e,this.side=i,this.prevWidget=null}split(t){let e=di.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(t,e,i,n,s,r){return!(i&&(!(i instanceof di&&this.widget.compare(i.widget))||t>0&&s<=0||e0)?Ie.before(this.dom):Ie.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,e){let i=this.widget.coordsAt(this.dom,t,e);if(i)return i;let n=this.dom.getClientRects(),s=null;if(!n.length)return null;let r=this.side?this.side<0:t>0;for(let o=r?n.length-1:0;s=n[o],!(t>0?0==o:o==n.length-1||s.top0?Ie.before(this.dom):Ie.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){return this.dom.getBoundingClientRect()}get overrideDOMText(){return x.empty}get isHidden(){return!0}}function pi(t,e){let i=t.dom,{children:n}=t,s=0;for(let r=0;sr&&e0;r--){let t=n[r-1];if(t.dom.parentNode==i)return t.domAtPos(t.length)}for(let r=s;r0&&e instanceof fi&&s.length&&(n=s[s.length-1])instanceof fi&&n.mark.eq(e.mark)?mi(n,e.children[0],i-1):(s.push(e),e.setParent(t)),t.length+=e.length}function gi(t,e,i){let n=null,s=-1,r=null,o=-1;!function t(e,a){for(let l=0,h=0;l=a&&(c.children.length?t(c,a-h):(!r||r.isHidden&&i>0)&&(u>a||h==u&&c.getSide()>0)?(r=c,o=a-h):(h-1?1:0)!=s.length-(i&&s.indexOf(i)>-1?1:0))return!1;for(let r of n)if(r!=i&&(-1==s.indexOf(r)||t[r]!==e[r]))return!1;return!0}function Si(t,e,i){let n=!1;if(e)for(let s in e)i&&s in i||(n=!0,"style"==s?t.style.cssText="":t.removeAttribute(s));if(i)for(let s in i)e&&e[s]==i[s]||(n=!0,"style"==s?t.style.cssText=i[s]:t.setAttribute(s,i[s]));return n}function yi(t){let e=Object.create(null);for(let i=0;i0?3e8:-4e8:e>0?1e8:-1e8,new Zi(t,e,e,i,t.widget||null,!1)}static replace(t){let e,i,n=!!t.block;if(t.isBlockGap)e=-5e8,i=4e8;else{let{start:s,end:r}=Ci(t,n);e=(s?n?-3e8:-1:5e8)-1,i=1+(r?n?2e8:1:-6e8)}return new Zi(t,e,i,n,t.widget||null,!0)}static line(t){return new $i(t)}static set(t,e=!1){return Kt.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}ki.none=Kt.empty;class Pi extends ki{constructor(t){let{start:e,end:i}=Ci(t);super(e?-1:5e8,i?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){var e,i;return this==t||t instanceof Pi&&this.tagName==t.tagName&&(this.class||(null===(e=this.attrs)||void 0===e?void 0:e.class))==(t.class||(null===(i=t.attrs)||void 0===i?void 0:i.class))&&wi(this.attrs,t.attrs,"class")}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}Pi.prototype.point=!1;class $i extends ki{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof $i&&this.spec.class==t.spec.class&&wi(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}$i.prototype.mapMode=W.TrackBefore,$i.prototype.point=!0;class Zi extends ki{constructor(t,e,i,n,s,r){super(e,i,s,t),this.block=n,this.isReplace=r,this.mapMode=n?e<=0?W.TrackBefore:W.TrackAfter:W.TrackDel}get type(){return this.startSide!=this.endSide?Qi.WidgetRange:this.startSide<=0?Qi.WidgetBefore:Qi.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof Zi&&(e=this.widget,i=t.widget,e==i||!!(e&&i&&e.compare(i)))&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide;var e,i}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function Ci(t,e=!1){let{inclusiveStart:i,inclusiveEnd:n}=t;return null==i&&(i=t.inclusive),null==n&&(n=t.inclusive),{start:null!=i?i:e,end:null!=n?n:e}}function Ti(t,e,i,n=0){let s=i.length-1;s>=0&&i[s]+n>=t?i[s]=Math.max(i[s],e):i.push(t,e)}Zi.prototype.point=!0;class Ai extends Ue{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,i,n,s,r){if(i){if(!(i instanceof Ai))return!1;this.dom||i.transferDOM(this)}return n&&this.setDeco(i?i.attrs:null),Ke(this,t,e,i?i.children.slice():[],s,r),!0}split(t){let e=new Ai;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i:i,off:n}=this.childPos(t);n&&(e.append(this.children[i].split(n),0),this.children[i].merge(n,this.children[i].length,null,!1,0,0),i++);for(let s=i;s0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){wi(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){mi(this,t,e)}addLineDeco(t){let e=t.spec.attributes,i=t.spec.class;e&&(this.attrs=bi(e,this.attrs||{})),i&&(this.attrs=bi({class:i},this.attrs||{}))}domAtPos(t){return pi(this,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.flags|=6)}sync(t,e){var i;this.dom?4&this.flags&&(De(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(Si(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t,e);let n=this.dom.lastChild;for(;n&&Ue.get(n)instanceof fi;)n=n.lastChild;if(!(n&&this.length&&("BR"==n.nodeName||0!=(null===(i=Ue.get(n))||void 0===i?void 0:i.isEditable)||ci.ios&&this.children.some((t=>t instanceof ui))))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t,e=0;for(let i of this.children){if(!(i instanceof ui)||/[^ -~]/.test(i.text))return null;let n=$e(i.dom);if(1!=n.length)return null;e+=n[0].width,t=n[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(t,e){let i=gi(this,t,e);if(!this.children.length&&i&&this.parent){let{heightOracle:t}=this.parent.view.viewState,e=i.bottom-i.top;if(Math.abs(e-t.lineHeight)<2&&t.textHeight=e){if(s instanceof Ai)return s;if(r>e)break}n=r+s.breakAfter}return null}}class Ri extends Ue{constructor(t,e,i){super(),this.widget=t,this.length=e,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(t,e,i,n,s,r){return!(i&&(!(i instanceof Ri&&this.widget.compare(i.widget))||t>0&&s<=0||e0)}}class Mi extends xi{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Xi{constructor(t,e,i,n){this.doc=t,this.pos=e,this.end=i,this.disallowBlockEffectsFor=n,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=e}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof Ri&&t.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Ai),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(qi(new Oi(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||t&&this.content.length&&this.content[this.content.length-1]instanceof Ri||this.getLine()}buildText(t,e,i){for(;t>0;){if(this.textOff==this.text.length){let{value:e,lineBreak:i,done:n}=this.cursor.next(this.skip);if(this.skip=0,n)throw new Error("Ran out of text content when drawing inline views");if(i){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}this.text=e,this.textOff=0}let n=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(e.length-i)),this.getLine().append(qi(new ui(this.text.slice(this.textOff,this.textOff+n)),e),i),this.atCursorPos=!0,this.textOff+=n,t-=n,i=0}}span(t,e,i,n){this.buildText(e-t,i,n),this.pos=e,this.openStart<0&&(this.openStart=n)}point(t,e,i,n,s,r){if(this.disallowBlockEffectsFor[r]&&i instanceof Zi){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let o=e-t;if(i instanceof Zi)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Ri(i.widget||Vi.block,o,i));else{let r=di.create(i.widget||Vi.inline,o,o?0:i.startSide),a=this.atCursorPos&&!r.isEditable&&s<=n.length&&(t0),l=!r.isEditable&&(tn.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||a||r.isEditable||(this.pendingBuffer=0),this.flushBuffer(n),a&&(h.append(qi(new Oi(1),n),s),s=n.length+Math.max(0,s-n.length)),h.append(qi(r,n),s),this.atCursorPos=l,this.pendingBuffer=l?tn.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=n.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);o&&(this.textOff+o<=this.text.length?this.textOff+=o:(this.skip+=o-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=s)}static build(t,e,i,n,s){let r=new Xi(t,e,i,s);return r.openEnd=Kt.spans(n,e,i,r),r.openStart<0&&(r.openStart=r.openEnd),r.finish(r.openEnd),r}}function qi(t,e){for(let i of e)t=new fi(i,[t],t.length);return t}class Vi extends xi{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Vi.inline=new Vi("span"),Vi.block=new Vi("div");var Ei=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Ei||(Ei={}));const zi=Ei.LTR,Yi=Ei.RTL;function Li(t){let e=[];for(let i=0;i=e){if(o.level==i)return r;(s<0||(0!=n?n<0?o.frome:t[s].level>o.level))&&(s=r)}}if(s<0)throw new RangeError("Index out of range");return s}}function Ui(t,e){if(t.length!=e.length)return!1;for(let i=0;il&&o.push(new Gi(l,O.from,f)),Fi(t,O.direction==zi!=!(f%2)?n+1:n,s,O.inner,O.from,O.to,o),l=O.to}d=O.to}else{if(d==i||(e?Ni[d]!=a:Ni[d]==a))break;d++}u?Hi(t,l,d,n+1,s,u,o):le;){let i=!0,c=!1;if(!h||l>r[h-1].to){let t=Ni[l-1];t!=a&&(i=!1,c=16==t)}let u=i||1!=a?null:[],f=i?n:n+1,d=l;t:for(;;)if(h&&d==r[h-1].to){if(c)break t;let O=r[--h];if(!i)for(let t=O.from,i=h;;){if(t==e)break t;if(!i||r[i-1].to!=t){if(Ni[t-1]==a)break t;break}t=r[--i].from}if(u)u.push(O);else{O.to=0;t-=3)if(Bi[t+1]==-i){let e=Bi[t+2],i=2&e?s:4&e?1&e?r:s:0;i&&(Ni[o]=Ni[Bi[t]]=i),a=t;break}}else{if(189==Bi.length)break;Bi[a++]=o,Bi[a++]=e,Bi[a++]=l}else if(2==(n=Ni[o])||1==n){let t=n==s;l=t?0:1;for(let e=a-3;e>=0;e-=3){let i=Bi[e+2];if(2&i)break;if(t)Bi[e+2]|=2;else{if(4&i)break;Bi[e+2]|=4}}}}}(t,s,r,n,a),function(t,e,i,n){for(let s=0,r=n;s<=i.length;s++){let o=s?i[s-1].to:t,a=sl;)e==r&&(e=i[--n].from,r=n?i[n-1].to:t),Ni[--e]=c;l=o}else r=o,l++}}}(s,r,n,a),Hi(t,s,r,e,i,n,o)}function Ki(t){return[new Gi(0,t,0)]}let Ji="";function tn(t,e,i,n,s){var r;let o=n.head-t.from,a=Gi.find(e,o,null!==(r=n.bidiLevel)&&void 0!==r?r:-1,n.assoc),l=e[a],h=l.side(s,i);if(o==h){let t=a+=s?1:-1;if(t<0||t>=e.length)return null;l=e[a=t],o=l.side(!s,i),h=l.side(s,i)}let c=V(t.text,o,l.forward(s,i));(cl.to)&&(c=h),Ji=t.text.slice(Math.min(o,c),Math.max(o,c));let u=a==(s?e.length-1:0)?null:e[a+(s?1:-1)];return u&&c==h&&u.level+(s?0:1)t.some((t=>t))}),dn=st.define({combine:t=>t.some((t=>t))}),On=st.define();class pn{constructor(t,e="nearest",i="nearest",n=5,s=5,r=!1){this.range=t,this.y=e,this.x=i,this.yMargin=n,this.xMargin=s,this.isSnapshot=r}map(t){return t.empty?this:new pn(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new pn(et.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const mn=Xt.define({map:(t,e)=>t.map(e)}),gn=Xt.define();function bn(t,e,i){let n=t.facet(on);n.length?n[0](e):window.onerror?window.onerror(String(e),i,void 0,void 0,e):i?console.error(i+":",e):console.error(e)}const vn=st.define({combine:t=>!t.length||t[0]});let wn=0;const Sn=st.define();class yn{constructor(t,e,i,n,s){this.id=t,this.create=e,this.domEventHandlers=i,this.domEventObservers=n,this.extension=s(this)}static define(t,e){const{eventHandlers:i,eventObservers:n,provide:s,decorations:r}=e||{};return new yn(wn++,t,i,n,(t=>{let e=[Sn.of(t)];return r&&e.push(Pn.of((e=>{let i=e.plugin(t);return i?r(i):ki.none}))),s&&e.push(s(t)),e}))}static fromClass(t,e){return yn.define((e=>new t(e)),e)}}class xn{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(bn(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(Sw){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(e){bn(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(i){bn(t.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Qn=st.define(),kn=st.define(),Pn=st.define(),$n=st.define(),Zn=st.define(),Cn=st.define();function Tn(t,e){let i=t.state.facet(Cn);if(!i.length)return i;let n=i.map((e=>e instanceof Function?e(t):e)),s=[];return Kt.spans(n,e.from,e.to,{point(){},span(t,i,n,r){let o=t-e.from,a=i-e.from,l=s;for(let s=n.length-1;s>=0;s--,r--){let t,i=n[s].spec.bidiIsolate;if(null==i&&(i=en(e.text,o,a)),r>0&&l.length&&(t=l[l.length-1]).to==o&&t.direction==i)t.to=a,l=t.inner;else{let t={from:o,to:a,direction:i,inner:[]};l.push(t),l=t.inner}}}}),s}const An=st.define();function Rn(t){let e=0,i=0,n=0,s=0;for(let r of t.state.facet(An)){let o=r(t);o&&(null!=o.left&&(e=Math.max(e,o.left)),null!=o.right&&(i=Math.max(i,o.right)),null!=o.top&&(n=Math.max(n,o.top)),null!=o.bottom&&(s=Math.max(s,o.bottom)))}return{left:e,right:i,top:n,bottom:s}}const Mn=st.define();class Xn{constructor(t,e,i,n){this.fromA=t,this.toA=e,this.fromB=i,this.toB=n}join(t){return new Xn(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,i=this;for(;e>0;e--){let n=t[e-1];if(!(n.fromA>i.toA)){if(n.toAh)break;s+=2}if(!a)return i;new Xn(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),r=a.toA,o=a.toB}}}class qn{constructor(t,e,i){this.view=t,this.state=e,this.transactions=i,this.flags=0,this.startState=t.state,this.changes=G.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let n=[];this.changes.iterChangedRanges(((t,e,i,s)=>n.push(new Xn(t,e,i,s)))),this.changedRanges=n}static create(t,e,i){return new qn(t,e,i)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class Vn extends Ue{get length(){return this.view.state.doc.length}constructor(t){super(),this.view=t,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=ki.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new Ai],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Xn(0,0,0,t.state.doc.length)],0,null)}update(t){var e;let i=t.changedRanges;this.minWidth>0&&i.length&&(i.every((({fromA:t,toA:e})=>ethis.minWidthTo))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(e=this.domChanged)||void 0===e?void 0:e.newSel)?n=this.domChanged.newSel.head:function(t,e){let i=!1;e&&t.iterChangedRanges(((t,n)=>{te.from&&(i=!0)}));return i}(t.changes,this.hasComposition)||t.selectionSet||(n=t.state.selection.main.head));let s=n>-1?function(t,e,i){let n=En(t,i);if(!n)return null;let{node:s,from:r,to:o}=n,a=s.nodeValue;if(/[\n\r]/.test(a))return null;if(t.state.doc.sliceString(n.from,n.to)!=a)return null;let l=e.invertedDesc,h=new Xn(l.mapPos(r),l.mapPos(o),r,o),c=[];for(let u=s.parentNode;;u=u.parentNode){let e=Ue.get(u);if(e instanceof fi)c.push({node:u,deco:e.mark});else{if(e instanceof Ai||"DIV"==u.nodeName&&u.parentNode==t.contentDOM)return{range:h,text:s,marks:c,line:u};if(u==t.contentDOM)return null;c.push({node:u,deco:new Pi({inclusive:!0,attributes:yi(u),tagName:u.tagName.toLowerCase()})})}}}(this.view,t.changes,n):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:e,to:n}=this.hasComposition;i=new Xn(e,n,t.changes.mapPos(e,-1),t.changes.mapPos(n,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(ci.ie||ci.chrome)&&!s&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let r=function(t,e,i){let n=new zn;return Kt.compare(t,e,i,n),n.changes}(this.decorations,this.updateDeco(),t.changes);return i=Xn.extendWithRanges(i,r),!!(7&this.flags||0!=i.length)&&(this.updateInner(i,t.startState.doc.length,s),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,i);let{observer:n}=this.view;n.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let t=ci.chrome||ci.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,t),this.flags&=-8,t&&(t.written||n.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((t=>t.flags&=-9));let s=[];if(this.view.viewport.from||this.view.viewport.to=0?n[r]:null;if(!t)break;let e,o,a,l,{fromA:h,toA:c,fromB:u,toB:f}=t;if(i&&i.range.fromBu){let t=Xi.build(this.view.state.doc,u,i.range.fromB,this.decorations,this.dynamicDecorationMap),n=Xi.build(this.view.state.doc,i.range.toB,f,this.decorations,this.dynamicDecorationMap);o=t.breakAtStart,a=t.openStart,l=n.openEnd;let s=this.compositionView(i);n.breakAtStart?s.breakAfter=1:n.content.length&&s.merge(s.length,s.length,n.content[0],!1,n.openStart,0)&&(s.breakAfter=n.content[0].breakAfter,n.content.shift()),t.content.length&&s.merge(0,0,t.content[t.content.length-1],!0,0,t.openEnd)&&t.content.pop(),e=t.content.concat(s).concat(n.content)}else({content:e,breakAtStart:o,openStart:a,openEnd:l}=Xi.build(this.view.state.doc,u,f,this.decorations,this.dynamicDecorationMap));let{i:d,off:O}=s.findPos(c,1),{i:p,off:m}=s.findPos(h,-1);Fe(this,p,m,d,O,e,o,a,l)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(t){this.editContextFormatting=this.editContextFormatting.map(t.changes);for(let e of t.transactions)for(let t of e.effects)t.is(gn)&&(this.editContextFormatting=t.value)}compositionView(t){let e=new ui(t.text.nodeValue);e.flags|=8;for(let{deco:n}of t.marks)e=new fi(n,[e],e.length);let i=new Ai;return i.append(e,0),i}fixCompositionDOM(t){let e=(t,e)=>{e.flags|=8|(e.children.some((t=>7&t.flags))?1:0),this.markedForComposition.add(e);let i=Ue.get(t);i&&i!=e&&(i.dom=null),e.setDOM(t)},i=this.childPos(t.range.fromB,1),n=this.children[i.i];e(t.line,n);for(let s=t.marks.length-1;s>=-1;s--)i=n.childPos(i.off,1),n=n.children[i.i],e(s>=0?t.marks[s].node:t.text,n)}updateSelection(t=!1,e=!1){!t&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let i=this.view.root.activeElement,n=i==this.dom,s=!n&&Pe(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(n||e||s))return;let r=this.forceSelection;this.forceSelection=!1;let o=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(o.anchor)),l=o.empty?a:this.moveToLine(this.domAtPos(o.head));if(ci.gecko&&o.empty&&!this.hasComposition&&(1==(h=a).node.nodeType&&h.node.firstChild&&(0==h.offset||"false"==h.node.childNodes[h.offset-1].contentEditable)&&(h.offset==h.node.childNodes.length||"false"==h.node.childNodes[h.offset].contentEditable))){let t=document.createTextNode("");this.view.observer.ignore((()=>a.node.insertBefore(t,a.node.childNodes[a.offset]||null))),a=l=new Ie(t,0),r=!0}var h;let c=this.view.observer.selectionRange;!r&&c.focusNode&&(Ze(a.node,a.offset,c.anchorNode,c.anchorOffset)&&Ze(l.node,l.offset,c.focusNode,c.focusOffset)||this.suppressWidgetCursorChange(c,o))||(this.view.observer.ignore((()=>{ci.android&&ci.chrome&&this.dom.contains(c.focusNode)&&function(t,e){for(let i=t;i&&i!=e;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=Qe(this.view.root);if(t)if(o.empty){if(ci.gecko){let t=(e=a.node,n=a.offset,1!=e.nodeType?0:(n&&"false"==e.childNodes[n-1].contentEditable?1:0)|(no.head&&([a,l]=[l,a]),e.setEnd(l.node,l.offset),e.setStart(a.node,a.offset),t.removeAllRanges(),t.addRange(e)}else;var e,n;s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())})),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new Ie(c.anchorNode,c.anchorOffset),this.impreciseHead=l.precise?null:new Ie(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(t,e){return this.hasComposition&&e.empty&&Ze(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==e.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,i=Qe(t.root),{anchorNode:n,anchorOffset:s}=t.observer.selectionRange;if(!(i&&e.empty&&e.assoc&&i.modify))return;let r=Ai.find(this,e.head);if(!r)return;let o=r.posAtStart;if(e.head==o||e.head==o+r.length)return;let a=this.coordsAt(e.head,-1),l=this.coordsAt(e.head,1);if(!a||!l||a.bottom>l.top)return;let h=this.domAtPos(e.head+e.assoc);i.collapse(h.node,h.offset),i.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let c=t.observer.selectionRange;t.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=e.from&&i.collapse(n,s)}moveToLine(t){let e,i=this.dom;if(t.node!=i)return t;for(let n=t.offset;!e&&n=0;n--){let t=Ue.get(i.childNodes[n]);t instanceof Ai&&(e=t.domAtPos(t.length))}return e?new Ie(e.node,e.offset,!0):t}nearest(t){for(let e=t;e;){let t=Ue.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let i=this.nearest(t);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(t,e)+i.posAtStart}domAtPos(t){let{i:e,off:i}=this.childCursor().findPos(t,-1);for(;e=0;r--){let o=this.children[r],a=s-o.breakAfter,l=a-o.length;if(at||o.covers(1))&&(!i||o instanceof Ai&&!(i instanceof Ai&&e>=0)))i=o,n=l;else if(i&&l==t&&a==t&&o instanceof Ri&&Math.abs(e)<2){if(o.deco.startSide<0)break;r&&(i=null)}s=l}return i?i.coordsAt(t-n,e):null}coordsForChar(t){let{i:e,off:i}=this.childPos(t,1),n=this.children[e];if(!(n instanceof Ai))return null;for(;n.children.length;){let{i:t,off:e}=n.childPos(i,1);for(;;t++){if(t==n.children.length)return null;if((n=n.children[t]).length)break}i=e}if(!(n instanceof ui))return null;let s=V(n.text,i);if(s==i)return null;let r=Le(n.dom,i,s).getClientRects();for(let o=0;oMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,a=this.view.textDirection==Ei.LTR;for(let l=0,h=0;hn)break;if(l>=i){let i=t.dom.getBoundingClientRect();if(e.push(i.height),r){let e=t.dom.lastChild,n=e?$e(e):[];if(n.length){let t=n[n.length-1],e=a?t.right-i.left:i.right-t.left;e>o&&(o=e,this.minWidth=s,this.minWidthFrom=l,this.minWidthTo=c)}}}l=c+t.breakAfter}return e}textDirectionAt(t){let{i:e}=this.childPos(t,1);return"rtl"==getComputedStyle(this.children[e].dom).direction?Ei.RTL:Ei.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Ai){let t=s.measureTextSize();if(t)return t}let t,e,i,n=document.createElement("div");return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(n);let s=$e(n.firstChild)[0];t=n.getBoundingClientRect().height,e=s?s.width/27:7,i=s?s.height:t,n.remove()})),{lineHeight:t,charWidth:e,textHeight:i}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new He(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let i=0,n=0;;n++){let s=n==e.viewports.length?null:e.viewports[n],r=s?s.from-1:this.length;if(r>i){let n=(e.lineBlockAt(r).bottom-e.lineBlockAt(i).top)/this.view.scaleY;t.push(ki.replace({widget:new Mi(n),block:!0,inclusive:!0,isBlockGap:!0}).range(i,r))}if(!s)break;i=s.to+1}return ki.set(t)}updateDeco(){let t=1,e=this.view.state.facet(Pn).map((e=>(this.dynamicDecorationMap[t++]="function"==typeof e)?e(this.view):e)),i=!1,n=this.view.state.facet($n).map(((t,e)=>{let n="function"==typeof t;return n&&(i=!0),n?t(this.view):t}));for(n.length&&(this.dynamicDecorationMap[t++]=i,e.push(Kt.join(n))),this.decorations=[this.editContextFormatting,...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];ti.anchor?-1:1);if(!n)return;!i.empty&&(e=this.coordsAt(i.anchor,i.anchor>i.head?-1:1))&&(n={left:Math.min(n.left,e.left),top:Math.min(n.top,e.top),right:Math.max(n.right,e.right),bottom:Math.max(n.bottom,e.bottom)});let s=Rn(this.view),r={left:n.left-s.left,top:n.top-s.top,right:n.right+s.right,bottom:n.bottom+s.bottom},{offsetWidth:o,offsetHeight:a}=this.view.scrollDOM;!function(t,e,i,n,s,r,o,a){let l=t.ownerDocument,h=l.defaultView||window;for(let c=t,u=!1;c&&!u;)if(1==c.nodeType){let t,f=c==l.body,d=1,O=1;if(f)t=Xe(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(u=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let e=c.getBoundingClientRect();({scaleX:d,scaleY:O}=qe(c,e)),t={left:e.left,right:e.left+c.clientWidth*d,top:e.top,bottom:e.top+c.clientHeight*O}}let p=0,m=0;if("nearest"==s)e.top0&&e.bottom>t.bottom+m&&(m=e.bottom-t.bottom+m+o)):e.bottom>t.bottom&&(m=e.bottom-t.bottom+o,i<0&&e.top-m0&&e.right>t.right+p&&(p=e.right-t.right+p+r)):e.right>t.right&&(p=e.right-t.right+r,i<0&&e.leftt?e.left-t:Math.max(0,t-e.right)}function Ln(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function _n(t,e){return t.tope.top+1}function Dn(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Bn(t,e,i){let n,s,r,o,a,l,h,c,u=!1;for(let d=t.firstChild;d;d=d.nextSibling){let t=$e(d);for(let f=0;fm||o==m&&r>p){n=d,s=O,r=p,o=m;let a=m?i0?f0)}0==p?i>O.bottom&&(!h||h.bottomO.top)&&(l=d,c=O):h&&_n(h,O)?h=jn(h,O.bottom):c&&_n(c,O)&&(c=Dn(c,O.top))}}if(h&&h.bottom>=i?(n=a,s=h):c&&c.top<=i&&(n=l,s=c),!n)return{node:t,offset:0};let f=Math.max(s.left,Math.min(s.right,e));return 3==n.nodeType?Wn(n,f,i):u&&"false"!=n.contentEditable?Bn(n,f,i):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,n)+(e>=(s.left+s.right)/2?1:0)}}function Wn(t,e,i){let n=t.nodeValue.length,s=-1,r=1e9,o=0;for(let a=0;ai?h.top-i:i-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&c=(h.left+h.right)/2,n=i;if(ci.chrome||ci.gecko){Le(t,a).getBoundingClientRect().left==h.right&&(n=!i)}if(c<=0)return{node:t,offset:a+(n?1:0)};s=a+(n?1:0),r=c}}}return{node:t,offset:s>-1?s:o>0?t.nodeValue.length:0}}function In(t,e,i,n=-1){var s,r;let o,a=t.contentDOM.getBoundingClientRect(),l=a.top+t.viewState.paddingTop,{docHeight:h}=t.viewState,{x:c,y:u}=e,f=u-l;if(f<0)return 0;if(f>h)return t.state.doc.length;for(let w=t.viewState.heightOracle.textHeight/2,S=!1;o=t.elementAtHeight(f),o.type!=Qi.Text;)for(;f=n>0?o.bottom+w:o.top-w,!(f>=0&&f<=h);){if(S)return i?null:0;S=!0,n=-n}u=l+f;let d=o.from;if(dt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:i?null:Gn(t,a,o,c,u);let O=t.dom.ownerDocument,p=t.root.elementFromPoint?t.root:O,m=p.elementFromPoint(c,u);m&&!t.contentDOM.contains(m)&&(m=null),m||(c=Math.max(a.left+1,Math.min(a.right-1,c)),m=p.elementFromPoint(c,u),m&&!t.contentDOM.contains(m)&&(m=null));let g,b=-1;if(m&&0!=(null===(s=t.docView.nearest(m))||void 0===s?void 0:s.isEditable)){if(O.caretPositionFromPoint){let t=O.caretPositionFromPoint(c,u);t&&({offsetNode:g,offset:b}=t)}else if(O.caretRangeFromPoint){let e=O.caretRangeFromPoint(c,u);e&&(({startContainer:g,startOffset:b}=e),(!t.contentDOM.contains(g)||ci.safari&&function(t,e,i){let n;if(3!=t.nodeType||e!=(n=t.nodeValue.length))return!1;for(let s=t.nextSibling;s;s=s.nextSibling)if(1!=s.nodeType||"BR"!=s.nodeName)return!1;return Le(t,n-1,n).getBoundingClientRect().left>i}(g,b,c)||ci.chrome&&function(t,e,i){if(0!=e)return!1;for(let s=t;;){let t=s.parentNode;if(!t||1!=t.nodeType||t.firstChild!=s)return!1;if(t.classList.contains("cm-line"))break;s=t}let n=1==t.nodeType?t.getBoundingClientRect():Le(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return i-n.left>5}(g,b,c))&&(g=void 0))}g&&(b=Math.min(Re(g),b))}if(!g||!t.docView.dom.contains(g)){let e=Ai.find(t.docView,d);if(!e)return f>o.top+o.height/2?o.to:o.from;({node:g,offset:b}=Bn(e.dom,c,u))}let v=t.docView.nearest(g);if(!v)return null;if(v.isWidget&&1==(null===(r=v.dom)||void 0===r?void 0:r.nodeType)){let t=v.dom.getBoundingClientRect();return e.y1.5*t.defaultLineHeight){let e=t.viewState.heightOracle.textHeight;r+=Math.floor((s-i.top-.5*(t.defaultLineHeight-e))/e)*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(i.from,i.to);return i.from+ue(o,r,t.state.tabSize)}function Un(t,e){let i=t.lineBlockAt(e);if(Array.isArray(i.type))for(let n of i.type)if(n.to>e||n.to==e&&(n.to==i.to||n.type==Qi.Text))return n;return i}function Nn(t,e,i,n){let s=t.state.doc.lineAt(e.head),r=t.bidiSpans(s),o=t.textDirectionAt(s.from);for(let a=e,l=null;;){let e=tn(s,r,o,a,i),h=Ji;if(!e){if(s.number==(i?t.state.doc.lines:1))return a;h="\n",s=t.state.doc.line(s.number+(i?1:-1)),r=t.bidiSpans(s),e=t.visualLineSide(s,!i)}if(l){if(!l(h))return a}else{if(!n)return e;l=n(h)}a=e}}function Hn(t,e,i){for(;;){let n=0;for(let s of t)s.between(e-1,e+1,((t,s,r)=>{if(e>t&&ee(t))),i.from,e.head>i.from?-1:1);return n==i.from?i:et.cursor(n,nt)&&this.lineBreak(),n=s}return this.findPointBefore(i,e),this}readTextNode(t){let e=t.nodeValue;for(let i of this.points)i.node==t&&(i.pos=this.text.length+Math.min(i.offset,e.length));for(let i=0,n=this.lineSeparator?null:/\r\n?|\n/g;;){let s,r=-1,o=1;if(this.lineSeparator?(r=e.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(s=n.exec(e))&&(r=s.index,o=s[0].length),this.append(e.slice(i,r<0?e.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=o-1);i=r+o}}readNode(t){if(t.cmIgnore)return;let e=Ue.get(t),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(t,i.length);for(let t=i.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==e&&(i.pos=this.text.length)}findPointInside(t,e){for(let i of this.points)(3==t.nodeType?i.node==t:t.contains(i.node))&&(i.pos=this.text.length+(ts(t,i.node,i.offset)?e:0))}}function ts(t,e,i){for(;;){if(!e||i-1;let{impreciseHead:s,impreciseAnchor:r}=t.docView;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,i,0))){let e=s||r?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:r}=t.observer.selectionRange;i&&(e.push(new es(i,n)),s==i&&r==n||e.push(new es(s,r)));return e}(t),i=new Jn(e,t.state);i.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=i.text,this.newSel=function(t,e){if(0==t.length)return null;let i=t[0].pos,n=2==t.length?t[1].pos:i;return i>-1&&n>-1?et.single(i+e,n+e):null}(e,this.bounds.from)}else{let e=t.observer.selectionRange,i=s&&s.node==e.focusNode&&s.offset==e.focusOffset||!ke(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),n=r&&r.node==e.anchorNode&&r.offset==e.anchorOffset||!ke(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset),o=t.viewport;if((ci.ios||ci.chrome)&&t.state.selection.main.empty&&i!=n&&(o.from>0||o.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:n,to:o}=e.bounds,a=s.from,l=null;(8===r||ci.android&&e.text.length0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if("end"==n){i-=o+Math.max(0,r-Math.min(o,a))-r}if(o=o?r-i:0,a=r+(a-o),o=r}else if(a=a?r-i:0,o=r+(o-a),a=r}return{from:r,toA:o,toB:a}}(t.state.doc.sliceString(n,o,Kn),e.text,a-n,l);h&&(ci.chrome&&13==r&&h.toB==h.from+2&&e.text.slice(h.from,h.toB)==Kn+Kn&&h.toB--,i={from:n+h.from,to:n+h.toA,insert:x.of(e.text.slice(h.from,h.toB).split(Kn))})}else n&&(!t.hasFocus&&t.state.facet(vn)||n.main.eq(s))&&(n=null);if(!i&&!n)return!1;if(!i&&e.typeOver&&!s.empty&&n&&n.main.empty?i={from:s.from,to:s.to,insert:t.state.doc.slice(s.from,s.to)}:i&&i.from>=s.from&&i.to<=s.to&&(i.from!=s.from||i.to!=s.to)&&s.to-s.from-(i.to-i.from)<=4?i={from:s.from,to:s.to,insert:t.state.doc.slice(s.from,i.from).append(i.insert).append(t.state.doc.slice(i.to,s.to))}:(ci.mac||ci.android)&&i&&i.from==i.to&&i.from==s.head-1&&/^\. ?$/.test(i.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(n&&2==i.insert.length&&(n=et.single(n.main.anchor-1,n.main.head-1)),i={from:s.from,to:s.to,insert:x.of([" "])}):ci.chrome&&i&&i.from==i.to&&i.from==s.head&&"\n "==i.insert.toString()&&t.lineWrapping&&(n&&(n=et.single(n.main.anchor-1,n.main.head-1)),i={from:s.from,to:s.to,insert:x.of([" "])}),i)return ss(t,i,n,r);if(n&&!n.main.eq(s)){let e=!1,i="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),i=t.inputState.lastSelectionOrigin),t.dispatch({selection:n,scrollIntoView:e,userEvent:i}),!0}return!1}function ss(t,e,i,n=-1){if(ci.ios&&t.inputState.flushIOSKey(e))return!0;let s=t.state.selection.main;if(ci.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&" "==t.state.sliceDoc(e.from,s.from))&&1==e.insert.length&&2==e.insert.lines&&_e(t.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&0==e.insert.length||8==n&&e.insert.lengths.head)&&_e(t.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&0==e.insert.length&&_e(t.contentDOM,"Delete",46)))return!0;let r,o=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a=()=>r||(r=function(t,e,i){let n,s=t.state,r=s.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let i=r.frome.to?s.sliceDoc(e.to,r.to):"";n=s.replaceSelection(t.state.toText(i+e.insert.sliceString(0,void 0,t.state.lineBreak)+o))}else{let o=s.changes(e),a=i&&i.main.to<=o.newLength?i.main:void 0;if(s.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let l,h=t.state.sliceDoc(e.from,e.to),c=i&&En(t,i.main.head);if(c){let t=e.insert.length-(e.to-e.from);l={from:c.from,to:c.to-t}}else l=t.state.doc.lineAt(r.head);let u=r.to-e.to,f=r.to-r.from;n=s.changeByRange((i=>{if(i.from==r.from&&i.to==r.to)return{changes:o,range:a||i.map(o)};let n=i.to-u,c=n-h.length;if(i.to-i.from!=f||t.state.sliceDoc(c,n)!=h||i.to>=l.from&&i.from<=l.to)return{range:i};let d=s.changes({from:c,to:n,insert:e.insert}),O=i.to-r.to;return{changes:d,range:a?et.range(Math.max(0,a.anchor+O),Math.max(0,a.head+O)):i.map(d)}}))}else n={changes:o,selection:a&&s.selection.replaceRange(a)}}let o="input.type";(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,o+=".compose",t.inputState.compositionFirstChange&&(o+=".start",t.inputState.compositionFirstChange=!1));return s.update(n,{userEvent:o,scrollIntoView:!0})}(t,e,i));return t.state.facet(ln).some((i=>i(t,e.from,e.to,o,a)))||t.dispatch(a()),!0}class rs{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,ci.safari&&t.contentDOM.addEventListener("input",(()=>null)),ci.gecko&&function(t){Rs.has(t)||(Rs.add(t),t.addEventListener("copy",(()=>{})),t.addEventListener("cut",(()=>{})))}(t.contentDOM.ownerDocument)}handleEvent(t){(function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let i,n=e.target;n!=t.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(i=Ue.get(n))&&i.ignoreEvent(e))return!1;return!0})(this.view,t)&&!this.ignoreDuringComposition(t)&&("keydown"==t.type&&this.keydown(t)||this.runHandlers(t.type,t))}runHandlers(t,e){let i=this.handlers[t];if(i){for(let t of i.observers)t(this.view,e);for(let t of i.handlers){if(e.defaultPrevented)break;if(t(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=as(t),i=this.handlers,n=this.view.contentDOM;for(let s in e)if("scroll"!=s){let t=!e[s].handlers.length,r=i[s];r&&t!=!r.handlers.length&&(n.removeEventListener(s,this.handleEvent),r=null),r||n.addEventListener(s,this.handleEvent,{passive:t})}for(let s in i)"scroll"==s||e[s]||n.removeEventListener(s,this.handleEvent);this.handlers=e}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=t.keyCode&&cs.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),ci.android&&ci.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;let e;return!ci.ios||t.synthetic||t.altKey||t.metaKey||!((e=ls.find((e=>e.keyCode==t.keyCode)))&&!t.ctrlKey||hs.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(229!=t.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=e||t,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&(!("Enter"==e.key&&t&&t.from0||!!(ci.safari&&!ci.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function os(t,e){return(i,n)=>{try{return e.call(t,n,i)}catch(s){bn(i.state,s)}}}function as(t){let e=Object.create(null);function i(t){return e[t]||(e[t]={observers:[],handlers:[]})}for(let n of t){let t=n.spec;if(t&&t.domEventHandlers)for(let e in t.domEventHandlers){let s=t.domEventHandlers[e];s&&i(e).handlers.push(os(n.value,s))}if(t&&t.domEventObservers)for(let e in t.domEventObservers){let s=t.domEventObservers[e];s&&i(e).observers.push(os(n.value,s))}}for(let n in ds)i(n).handlers.push(ds[n]);for(let n in Os)i(n).observers.push(Os[n]);return e}const ls=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],hs="dthko",cs=[16,17,18,20,91,92,224,225];function us(t){return.7*Math.max(0,t)+8}class fs{constructor(t,e,i,n){this.view=t,this.startEvent=e,this.style=i,this.mustSelect=n,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParents=function(t){let e,i,n=t.ownerDocument;for(let s=t.parentNode;s&&!(s==n.body||e&&i);)if(1==s.nodeType)!i&&s.scrollHeight>s.clientHeight&&(i=s),!e&&s.scrollWidth>s.clientWidth&&(e=s),s=s.assignedSlot||s.parentNode;else{if(11!=s.nodeType)break;s=s.host}return{x:e,y:i}}(t.contentDOM),this.atoms=t.state.facet(Zn).map((e=>e(t)));let s=t.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(It.allowMultipleSelections)&&function(t,e){let i=t.state.facet(nn);return i.length?i[0](e):ci.mac?e.metaKey:e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:i}=t.state.selection;if(i.empty)return!1;let n=Qe(t.root);if(!n||0==n.rangeCount)return!0;let s=n.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&t.top<=e.clientY&&t.bottom>=e.clientY)return!0}return!1}(t,e)||1!=Ps(e))&&null}start(t){!1===this.dragging&&this.select(t)}move(t){if(0==t.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(e=this.startEvent,i=t,Math.max(Math.abs(e.clientX-i.clientX),Math.abs(e.clientY-i.clientY))<10))return;var e,i;this.select(this.lastEvent=t);let n=0,s=0,r=0,o=0,a=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:l}=this.scrollParents.y.getBoundingClientRect());let h=Rn(this.view);t.clientX-h.left<=r+6?n=-us(r-t.clientX):t.clientX+h.right>=a-6&&(n=us(t.clientX-a)),t.clientY-h.top<=o+6?s=-us(o-t.clientY):t.clientY+h.bottom>=l-6&&(s=us(t.clientY-l)),this.setScrollSpeed(n,s)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e},t||e?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:e}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),e&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=e,e=0),(t||e)&&this.view.win.scrollBy(t,e),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(t){let e=null;for(let i=0;it.isUserEvent("input.type")))?this.destroy():this.style.update(t)&&setTimeout((()=>this.select(this.lastEvent)),20)}}const ds=Object.create(null),Os=Object.create(null),ps=ci.ie&&ci.ie_version<15||ci.ios&&ci.webkit_version<604;function ms(t,e,i){for(let n of t.facet(e))i=n(i,t);return i}function gs(t,e){e=ms(t.state,cn,e);let i,{state:n}=t,s=1,r=n.toText(e),o=r.lines==n.selection.ranges.length;if(null!=Zs&&n.selection.ranges.every((t=>t.empty))&&Zs==r.toString()){let t=-1;i=n.changeByRange((i=>{let a=n.doc.lineAt(i.from);if(a.from==t)return{range:i};t=a.from;let l=n.toText((o?r.line(s++).text:e)+n.lineBreak);return{changes:{from:a.from,insert:l},range:et.cursor(i.from+l.length)}}))}else i=o?n.changeByRange((t=>{let e=r.line(s++);return{changes:{from:t.from,to:t.to,insert:e.text},range:et.cursor(t.from+e.length)}})):n.replaceSelection(r);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}function bs(t,e,i,n){if(1==n)return et.cursor(e,i);if(2==n)return function(t,e,i=1){let n=t.charCategorizer(e),s=t.doc.lineAt(e),r=e-s.from;if(0==s.length)return et.cursor(e);0==r?i=1:r==s.length&&(i=-1);let o=r,a=r;i<0?o=V(s.text,r,!1):a=V(s.text,r);let l=n(s.text.slice(o,a));for(;o>0;){let t=V(s.text,o,!1);if(n(s.text.slice(t,o))!=l)break;o=t}for(;a{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},ds.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),27==e.keyCode&&0!=t.inputState.tabFocusMode&&(t.inputState.tabFocusMode=Date.now()+2e3),!1),Os.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},Os.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},ds.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let i=null;for(let n of t.state.facet(rn))if(i=n(t,e),i)break;if(i||0!=e.button||(i=function(t,e){let i=Ss(t,e),n=Ps(e),s=t.state.selection;return{update(t){t.docChanged&&(i.pos=t.changes.mapPos(i.pos),s=s.map(t.changes))},get(e,r,o){let a,l=Ss(t,e),h=bs(t,l.pos,l.bias,n);if(i.pos!=l.pos&&!r){let e=bs(t,i.pos,i.bias,n),s=Math.min(e.from,h.from),r=Math.max(e.to,h.to);h=s1&&(a=function(t,e){for(let i=0;i=e)return et.create(t.ranges.slice(0,i).concat(t.ranges.slice(i+1)),t.mainIndex==i?0:t.mainIndex-(t.mainIndex>i?1:0))}return null}(s,l.pos))?a:o?s.addRange(h):et.create([h])}}}(t,e)),i){let n=!t.hasFocus;t.inputState.startMouseSelection(new fs(t,e,i,n)),n&&t.observer.ignore((()=>{Ye(t.contentDOM);let e=t.root.activeElement;e&&!e.contains(t.contentDOM)&&e.blur()}));let s=t.inputState.mouseSelection;if(s)return s.start(e),!1===s.dragging}return!1};let vs=(t,e,i)=>e>=i.top&&e<=i.bottom&&t>=i.left&&t<=i.right;function ws(t,e,i,n){let s=Ai.find(t.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(0==r)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&vs(i,n,o))return-1;let a=s.coordsAt(r,1);return a&&vs(i,n,a)?1:o&&o.bottom>=n?-1:1}function Ss(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:i,bias:ws(t,i,e.clientX,e.clientY)}}const ys=ci.ie&&ci.ie_version<=11;let xs=null,Qs=0,ks=0;function Ps(t){if(!ys)return t.detail;let e=xs,i=ks;return xs=t,ks=Date.now(),Qs=!e||i>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Qs+1)%3:1}function $s(t,e,i,n){if(!(i=ms(t.state,cn,i)))return;let s=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=t.inputState,o=n&&r&&function(t,e){let i=t.state.facet(sn);return i.length?i[0](e):ci.mac?!e.altKey:!e.ctrlKey}(t,e)?{from:r.from,to:r.to}:null,a={from:s,insert:i},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(s,-1),head:l.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}ds.dragstart=(t,e)=>{let{selection:{main:i}}=t.state;if(e.target.draggable){let n=t.docView.nearest(e.target);if(n&&n.isWidget){let t=n.posAtStart,e=t+n.length;(t>=i.to||e<=i.from)&&(i=et.range(t,e))}}let{inputState:n}=t;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=i,e.dataTransfer&&(e.dataTransfer.setData("Text",ms(t.state,un,t.state.sliceDoc(i.from,i.to))),e.dataTransfer.effectAllowed="copyMove"),!1},ds.dragend=t=>(t.inputState.draggedContent=null,!1),ds.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let i=e.dataTransfer.files;if(i&&i.length){let n=Array(i.length),s=0,r=()=>{++s==i.length&&$s(t,e,n.filter((t=>null!=t)).join(t.state.lineBreak),!1)};for(let t=0;t{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(n[t]=e.result),r()},e.readAsText(i[t])}return!0}{let i=e.dataTransfer.getData("Text");if(i)return $s(t,e,i,!0),!0}return!1},ds.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let i=ps?null:e.clipboardData;return i?(gs(t,i.getData("text/plain")||i.getData("text/uri-list")),!0):(function(t){let e=t.dom.parentNode;if(!e)return;let i=e.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout((()=>{t.focus(),i.remove(),gs(t,i.value)}),50)}(t),!1)};let Zs=null;ds.copy=ds.cut=(t,e)=>{let{text:i,ranges:n,linewise:s}=function(t){let e=[],i=[],n=!1;for(let s of t.selection.ranges)s.empty||(e.push(t.sliceDoc(s.from,s.to)),i.push(s));if(!e.length){let s=-1;for(let{from:n}of t.selection.ranges){let r=t.doc.lineAt(n);r.number>s&&(e.push(r.text),i.push({from:r.from,to:Math.min(t.doc.length,r.to+1)})),s=r.number}n=!0}return{text:ms(t,un,e.join(t.lineBreak)),ranges:i,linewise:n}}(t.state);if(!i&&!s)return!1;Zs=s?i:null,"cut"!=e.type||t.state.readOnly||t.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let r=ps?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",i),!0):(function(t,e){let i=t.dom.parentNode;if(!i)return;let n=i.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout((()=>{n.remove(),t.focus()}),50)}(t,i),!1)};const Cs=At.define();function Ts(t,e){let i=[];for(let n of t.facet(hn)){let s=n(t,e);s&&i.push(s)}return i?t.update({effects:i,annotations:Cs.of(!0)}):null}function As(t){setTimeout((()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let i=Ts(t.state,e);i?t.dispatch(i):t.update([])}}),10)}Os.focus=t=>{t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),As(t)},Os.blur=t=>{t.observer.clearSelectionRange(),As(t)},Os.compositionstart=Os.compositionupdate=t=>{t.observer.editContext||(null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))},Os.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,ci.chrome&&ci.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then((()=>t.observer.flush())):setTimeout((()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])}),50))},Os.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},ds.beforeinput=(t,e)=>{var i,n;if("insertReplacementText"==e.inputType&&t.observer.editContext){let n=null===(i=e.dataTransfer)||void 0===i?void 0:i.getData("text/plain"),s=e.getTargetRanges();if(n&&s.length){let e=s[0],i=t.posAtDOM(e.startContainer,e.startOffset),r=t.posAtDOM(e.endContainer,e.endOffset);return ss(t,{from:i,to:r,insert:t.state.toText(n)},null),!0}}let s;if(ci.chrome&&ci.android&&(s=ls.find((t=>t.inputType==e.inputType)))&&(t.observer.delayAndroidKey(s.key,s.keyCode),"Backspace"==s.key||"Delete"==s.key)){let e=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout((()=>{var i;((null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}return ci.ios&&"deleteContentForward"==e.inputType&&t.observer.flushSoon(),ci.safari&&"insertText"==e.inputType&&t.inputState.composing>=0&&setTimeout((()=>Os.compositionend(t,e)),20),!1};const Rs=new Set;const Ms=["pre-wrap","normal","pre-line","break-spaces"];let Xs=!1;function qs(){Xs=!1}class Vs{constructor(t){this.lineWrapping=t,this.doc=x.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,e){let i=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((e-t-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(t){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return Ms.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=!1;for(let i=0;i-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=e,this.charWidth=i,this.textHeight=n,this.lineLength=s,a){this.heightSamples={};for(let t=0;t0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>Ls&&(Xs=!0),this.height=t)}replace(t,e,i){return _s.of(i)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,i,n){let s=this,r=i.doc;for(let o=n.length-1;o>=0;o--){let{fromA:a,toA:l,fromB:h,toB:c}=n[o],u=s.lineAt(a,Ys.ByPosNoHeight,i.setDoc(e),0,0),f=u.to>=l?u:s.lineAt(l,Ys.ByPosNoHeight,i,0,0);for(c+=f.to-l,l=f.to;o>0&&u.from<=n[o-1].toA;)a=n[o-1].fromA,h=n[o-1].fromB,o--,a2*s){let s=t[e-1];s.break?t.splice(--e,1,s.left,null,s.right):t.splice(--e,1,s.left,s.right),i+=1+s.break,n-=s.size}else{if(!(s>2*n))break;{let e=t[i];e.break?t.splice(i,1,e.left,null,e.right):t.splice(i,1,e.left,e.right),i+=2+e.break,s-=e.size}}else if(n=s&&r(this.blockAt(0,i,n,s))}updateHeight(t,e=0,i=!1,n){return n&&n.from<=e&&n.more&&this.setHeight(n.heights[n.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Bs extends js{constructor(t,e){super(t,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(t,e,i,n){return new zs(n,this.length,i,this.height,this.breaks)}replace(t,e,i){let n=i[0];return 1==i.length&&(n instanceof Bs||n instanceof Ws&&4&n.flags)&&Math.abs(this.length-n.length)<10?(n instanceof Ws?n=new Bs(n.length,this.height):n.height=this.height,this.outdated||(n.outdated=!1),n):_s.of(i)}updateHeight(t,e=0,i=!1,n){return n&&n.from<=e&&n.more?this.setHeight(n.heights[n.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Ws extends _s{constructor(t){super(t,0)}heightMetrics(t,e){let i,n=t.doc.lineAt(e).number,s=t.doc.lineAt(e+this.length).number,r=s-n+1,o=0;if(t.lineWrapping){let e=Math.min(this.height,t.lineHeight*r);i=e/r,this.length>r+1&&(o=(this.height-e)/(this.length-r-1))}else i=this.height/r;return{firstLine:n,lastLine:s,perLine:i,perChar:o}}blockAt(t,e,i,n){let{firstLine:s,lastLine:r,perLine:o,perChar:a}=this.heightMetrics(e,n);if(e.lineWrapping){let s=n+(t0){let t=i[i.length-1];t instanceof Ws?i[i.length-1]=new Ws(t.length+n):i.push(null,new Ws(n-1))}if(t>0){let e=i[0];e instanceof Ws?i[0]=new Ws(t+e.length):i.unshift(new Ws(t-1),null)}return _s.of(i)}decomposeLeft(t,e){e.push(new Ws(t-1),null)}decomposeRight(t,e){e.push(null,new Ws(this.length-t-1))}updateHeight(t,e=0,i=!1,n){let s=e+this.length;if(n&&n.from<=e+this.length&&n.more){let i=[],r=Math.max(e,n.from),o=-1;for(n.from>e&&i.push(new Ws(n.from-e-1).updateHeight(t,e));r<=s&&n.more;){let e=t.doc.lineAt(r).length;i.length&&i.push(null);let s=n.heights[n.index++];-1==o?o=s:Math.abs(s-o)>=Ls&&(o=-2);let a=new Bs(e,s);a.outdated=!1,i.push(a),r+=e+1}r<=s&&i.push(null,new Ws(s-r).updateHeight(t,r));let a=_s.of(i);return(o<0||Math.abs(a.height-this.height)>=Ls||Math.abs(o-this.heightMetrics(t,e).perLine)>=Ls)&&(Xs=!0),Ds(this,a)}return(i||this.outdated)&&(this.setHeight(t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class Is extends _s{constructor(t,e,i){super(t.length+e+i.length,t.height+i.height,e|(t.outdated||i.outdated?2:0)),this.left=t,this.right=i,this.size=t.size+i.size}get break(){return 1&this.flags}blockAt(t,e,i,n){let s=i+this.left.height;return to))return l;let h=e==Ys.ByPosNoHeight?Ys.ByPosNoHeight:Ys.ByPos;return a?l.join(this.right.lineAt(o,h,i,r,o)):this.left.lineAt(o,h,i,n,s).join(l)}forEachLine(t,e,i,n,s,r){let o=n+this.left.height,a=s+this.left.length+this.break;if(this.break)t=a&&this.right.forEachLine(t,e,i,o,a,r);else{let l=this.lineAt(a,Ys.ByPos,i,n,s);t=t&&l.from<=e&&r(l),e>l.to&&this.right.forEachLine(l.to+1,e,i,o,a,r)}}replace(t,e,i){let n=this.left.length+this.break;if(ethis.left.length)return this.balanced(this.left,this.right.replace(t-n,e-n,i));let s=[];t>0&&this.decomposeLeft(t,s);let r=s.length;for(let o of i)s.push(o);if(t>0&&Gs(s,r-1),e=i&&e.push(null)),t>i&&this.right.decomposeLeft(t-i,e)}decomposeRight(t,e){let i=this.left.length,n=i+this.break;if(t>=n)return this.right.decomposeRight(t-n,e);t2*e.size||e.size>2*t.size?_s.of(this.break?[t,null,e]:[t,e]):(this.left=Ds(this.left,t),this.right=Ds(this.right,e),this.setHeight(t.height+e.height),this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,i=!1,n){let{left:s,right:r}=this,o=e+s.length+this.break,a=null;return n&&n.from<=e+s.length&&n.more?a=s=s.updateHeight(t,e,i,n):s.updateHeight(t,e,i),n&&n.from<=o+r.length&&n.more?a=r=r.updateHeight(t,o,i,n):r.updateHeight(t,o,i),a?this.balanced(s,r):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Gs(t,e){let i,n;null==t[e]&&(i=t[e-1])instanceof Ws&&(n=t[e+1])instanceof Ws&&t.splice(e-1,3,new Ws(i.length+1+n.length))}class Us{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Bs?i.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new Bs(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,i){if(t=5)&&this.addLineDeco(n,s,r)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTot&&this.nodes.push(new Bs(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let i=new Ws(e-t);return this.oracle.doc.lineAt(t).to==e&&(i.flags|=4),i}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Bs)return t;let e=new Bs(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine();let e=t.deco;e&&e.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,e&&e.endSide>0&&(this.covering=t)}addLineDeco(t,e,i){let n=this.ensureLine();n.length+=i,n.collapsed+=i,n.widgetHeight=Math.max(n.widgetHeight,t),n.breaks+=e,this.writtenTo=this.pos=this.pos+i}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof Bs||this.isCovered?(this.writtenToe.clientHeight||e.scrollWidth>e.clientWidth)&&"visible"!=i.overflow){let i=e.getBoundingClientRect();r=Math.max(r,i.left),o=Math.min(o,i.right),a=Math.max(a,i.top),l=Math.min(h==t.parentNode?s.innerHeight:l,i.bottom)}h="absolute"==i.position||"fixed"==i.position?e.offsetParent:e.parentNode}else{if(11!=h.nodeType)break;h=h.host}return{left:r-i.left,right:Math.max(r,o)-i.left,top:a-(i.top+e),bottom:Math.max(a,l)-(i.top+e)}}function Fs(t,e){let i=t.getBoundingClientRect();return{left:0,right:i.right-i.left,top:e,bottom:i.bottom-(i.top+e)}}class Ks{constructor(t,e,i,n){this.from=t,this.to=e,this.size=i,this.displaySize=n}static same(t,e){if(t.length!=e.length)return!1;for(let i=0;i"function"!=typeof t&&"cm-lineWrapping"==t.class));this.heightOracle=new Vs(e),this.stateDeco=t.facet(Pn).filter((t=>"function"!=typeof t)),this.heightMap=_s.empty().applyChanges(this.stateDeco,x.empty,this.heightOracle.setDoc(t.doc),[new Xn(0,0,0,t.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ki.set(this.lineGaps.map((t=>t.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let i=0;i<=1;i++){let n=i?e.head:e.anchor;if(!t.some((({from:t,to:e})=>n>=t&&n<=e))){let{from:e,to:i}=this.lineBlockAt(n);t.push(new er(e,i))}}return this.viewports=t.sort(((t,e)=>t.from-e.from)),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?sr:new rr(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(t=>{this.viewportLines.push(or(t,this.scaler))}))}update(t,e=null){this.state=t.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Pn).filter((t=>"function"!=typeof t));let n=t.changedRanges,s=Xn.extendWithRanges(n,function(t,e,i){let n=new Ns;return Kt.compare(t,e,i,n,0),n.changes}(i,this.stateDeco,t?t.changes:G.empty(this.state.doc.length))),r=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);qs(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=r||Xs)&&(t.flags|=2),o?(this.scrollAnchorPos=t.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=s.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));let l=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,t.flags|=this.updateForViewport(),(l||!t.changes.empty||2&t.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(dn)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,i=window.getComputedStyle(e),n=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?Ei.RTL:Ei.LTR;let r=this.heightOracle.mustRefreshForWrapping(s),o=e.getBoundingClientRect(),a=r||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let l=0,h=0;if(o.width&&o.height){let{scaleX:t,scaleY:i}=qe(e,o);(t>.005&&Math.abs(this.scaleX-t)>.005||i>.005&&Math.abs(this.scaleY-i)>.005)&&(this.scaleX=t,this.scaleY=i,l|=8,r=a=!0)}let c=(parseInt(i.paddingTop)||0)*this.scaleY,u=(parseInt(i.paddingBottom)||0)*this.scaleY;this.paddingTop==c&&this.paddingBottom==u||(this.paddingTop=c,this.paddingBottom=u,l|=10),this.editorWidth!=t.scrollDOM.clientWidth&&(n.lineWrapping&&(a=!0),this.editorWidth=t.scrollDOM.clientWidth,l|=8);let f=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=f&&(this.scrollAnchorHeight=-1,this.scrollTop=f),this.scrolledToBottom=je(t.scrollDOM);let d=(this.printing?Fs:Hs)(e,this.paddingTop),O=d.top-this.pixelViewport.top,p=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;let m=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(m!=this.inView&&(this.inView=m,m&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let g=o.width;if(this.contentDOMWidth==g&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=o.width,this.editorHeight=t.scrollDOM.clientHeight,l|=8),a){let e=t.docView.measureVisibleLineHeights(this.viewport);if(n.mustRefreshForHeights(e)&&(r=!0),r||n.lineWrapping&&Math.abs(g-this.contentDOMWidth)>n.charWidth){let{lineHeight:i,charWidth:o,textHeight:a}=t.docView.measureTextSize();r=i>0&&n.refresh(s,i,o,a,g/o,e),r&&(t.docView.minWidth=0,l|=8)}O>0&&p>0?h=Math.max(O,p):O<0&&p<0&&(h=Math.min(O,p)),qs();for(let i of this.viewports){let s=i.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(i);this.heightMap=(r?_s.empty().applyChanges(this.stateDeco,x.empty,this.heightOracle,[new Xn(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(n,0,r,new Es(i.from,s))}Xs&&(l|=2)}let b=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return b&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(h,this.scrollTarget),l|=this.updateForViewport()),(2&l||b)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(r?[]:this.lineGaps,t)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let i=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),n=this.heightMap,s=this.heightOracle,{visibleTop:r,visibleBottom:o}=this,a=new er(n.lineAt(r-1e3*i,Ys.ByHeight,s,0,0).from,n.lineAt(o+1e3*(1-i),Ys.ByHeight,s,0,0).to);if(e){let{head:t}=e.range;if(ta.to){let i,r=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),o=n.lineAt(t,Ys.ByPos,s,0,0);i="center"==e.y?(o.top+o.bottom)/2-r/2:"start"==e.y||"nearest"==e.y&&t=o+Math.max(10,Math.min(i,250)))&&n>r-2e3&&s>1,r=n<<1;if(this.defaultTextDirection!=Ei.LTR&&!i)return[];let o=[],a=(n,r,l,h)=>{if(r-nn&&tt.from>=l.from&&t.to<=l.to&&Math.abs(t.from-n)t.frome))));if(!f){if(rt.from<=r&&t.to>=r))){let t=e.moveToLineBoundary(et.cursor(r),!1,!0).head;t>n&&(r=t)}let t=this.gapSize(l,n,r,h);f=new Ks(n,r,t,i||t<2e6?t:2e6)}o.push(f)},l=e=>{if(e.lengths&&(n.push({from:s,to:t}),r+=t-s),s=e}},20),s2e6)for(let n of t)n.from>=e.from&&n.frome.from&&a(e.from,o,e,s),lt.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let e=[];Kt.spans(t,this.viewport.from,this.viewport.to,{span(t,i){e.push({from:t,to:i})},point(){}},20);let i=e.length!=this.visibleRanges.length||this.visibleRanges.some(((t,i)=>t.from!=e[i].from||t.to!=e[i].to));return this.visibleRanges=e,i?4:0}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to>=t))||or(this.heightMap.lineAt(t,Ys.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((e=>e.top<=t&&e.bottom>=t))||or(this.heightMap.lineAt(this.scaler.fromDOM(t),Ys.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let e=this.lineBlockAtHeight(t+8);return e.from>=this.viewport.from||this.viewportLines[0].top-t>200?e:this.viewportLines[0]}elementAtHeight(t){return or(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class er{constructor(t,e){this.from=t,this.to=e}}function ir({total:t,ranges:e},i){if(i<=0)return e[0].from;if(i>=1)return e[e.length-1].to;let n=Math.floor(t*i);for(let s=0;;s++){let{from:t,to:i}=e[s],r=i-t;if(n<=r)return t+n;n-=r}}function nr(t,e){let i=0;for(let{from:n,to:s}of t.ranges){if(e<=s){i+=e-n;break}i+=s-n}return i/t.total}const sr={toDOM:t=>t,fromDOM:t=>t,scale:1,eq(t){return t==this}};class rr{constructor(t,e,i){let n=0,s=0,r=0;this.viewports=i.map((({from:i,to:s})=>{let r=e.lineAt(i,Ys.ByPos,t,0,0).top,o=e.lineAt(s,Ys.ByPos,t,0,0).bottom;return n+=o-r,{from:i,to:s,top:r,bottom:o,domTop:0,domBottom:0}})),this.scale=(7e6-n)/(e.height-n);for(let o of this.viewports)o.domTop=r+(o.top-s)*this.scale,r=o.domBottom=o.domTop+(o.bottom-o.top),s=o.bottom}toDOM(t){for(let e=0,i=0,n=0;;e++){let s=ee.from==t.viewports[i].from&&e.to==t.viewports[i].to)))}}function or(t,e){if(1==e.scale)return t;let i=e.toDOM(t.top),n=e.toDOM(t.bottom);return new zs(t.from,t.length,i,n-i,Array.isArray(t._content)?t._content.map((t=>or(t,e))):t._content)}const ar=st.define({combine:t=>t.join(" ")}),lr=st.define({combine:t=>t.indexOf(!0)>-1}),hr=pe.newName(),cr=pe.newName(),ur=pe.newName(),fr={"&light":"."+cr,"&dark":"."+ur};function dr(t,e,i){return new pe(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,(e=>{if("&"==e)return t;if(!i||!i[e])throw new RangeError(`Unsupported selector: ${e}`);return i[e]})):t+" "+e})}const Or=dr("."+hr,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},fr),pr={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},mr=ci.ie&&ci.ie_version<=11;class gr{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new Ve,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);(ci.ie&&ci.ie_version<=11||ci.ios&&t.composing)&&e.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),!window.EditContext||!1===t.constructor.EDIT_CONTEXT||ci.chrome&&ci.chrome_version<126||(this.editContext=new wr(t),t.state.facet(vn)&&(t.contentDOM.editContext=this.editContext.editContext)),mr&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var t;(null===(t=this.view.docView)||void 0===t?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(t){("change"!=t.type&&t.type||t.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,i)=>e!=t[i])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,n=this.selectionRange;if(i.state.facet(vn)?i.root.activeElement!=this.dom:!Pe(this.dom,n))return;let s=n.anchorNode&&i.docView.nearest(n.anchorNode);s&&s.ignoreEvent(t)?e||(this.selectionChanged=!1):(ci.ie&&ci.ie_version<=11||ci.android&&ci.chrome)&&!i.state.selection.main.empty&&n.focusNode&&Ze(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,e=Qe(t.root);if(!e)return!1;let i=ci.safari&&11==t.root.nodeType&&t.root.activeElement==this.dom&&function(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return vr(t,i)}let i=null;function n(t){t.preventDefault(),t.stopImmediatePropagation(),i=t.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),i?vr(t,i):null}(this.view,e)||e;if(!i||this.selectionRange.eq(i))return!1;let n=Pe(this.dom,i);return n&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime{let t=this.delayedAndroidKey;if(t){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=t.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&t.force&&_e(this.dom,t.key,t.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let e=-1,i=-1,n=!1;for(let s of t){let t=this.readMutation(s);t&&(t.typeOver&&(n=!0),-1==e?({from:e,to:i}=t):(e=Math.min(t.from,e),i=Math.max(t.to,i)))}return{from:e,to:i,typeOver:n}}readChange(){let{from:t,to:e,typeOver:i}=this.processRecords(),n=this.selectionChanged&&Pe(this.dom,this.selectionRange);if(t<0&&!n)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new is(this.view,t,e,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let e=this.readChange();if(!e)return this.view.requestMeasure(),!1;let i=this.view.state,n=ns(this.view,e);return this.view.state==i&&(e.domChanged||e.newSel&&!e.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),n}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.flags|=4),"childList"==t.type){let i=br(e,t.previousSibling||t.target.previousSibling,-1),n=br(e,t.nextSibling||t.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:n?e.posBefore(n):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(vn)!=t.state.facet(vn)&&(t.view.contentDOM.editContext=t.state.facet(vn)?this.editContext.editContext:null))}destroy(){var t,e,i;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect();for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function br(t,e,i){for(;e;){let n=Ue.get(e);if(n&&n.parent==t)return n;let s=e.parentNode;e=s!=t.dom?s:i>0?e.nextSibling:e.previousSibling}return null}function vr(t,e){let i=e.startContainer,n=e.startOffset,s=e.endContainer,r=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor);return Ze(o.node,o.offset,s,r)&&([i,n,s,r]=[s,r,i,n]),{anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:r}}class wr{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(t.state);let e=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=e=>{let{anchor:i}=t.state.selection.main,n={from:this.toEditorPos(e.updateRangeStart),to:this.toEditorPos(e.updateRangeEnd),insert:x.of(e.text.split("\n"))};n.from==this.from&&ithis.to&&(n.to=i),(n.from!=n.to||n.insert.length)&&(this.pendingContextChange=n,t.state.readOnly||ss(t,n,et.single(this.toEditorPos(e.selectionStart),this.toEditorPos(e.selectionEnd))),this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state)))},this.handlers.characterboundsupdate=i=>{let n=[],s=null;for(let e=this.toEditorPos(i.rangeStart),r=this.toEditorPos(i.rangeEnd);e{let i=[];for(let t of e.getTextFormats()){let e=t.underlineStyle,n=t.underlineThickness;if("None"!=e&&"None"!=n){let s=`text-decoration: underline ${"Dashed"==e?"dashed ":"Squiggle"==e?"wavy ":""}${"Thin"==n?1:2}px`;i.push(ki.mark({attributes:{style:s}}).range(this.toEditorPos(t.rangeStart),this.toEditorPos(t.rangeEnd)))}}t.dispatch({effects:gn.of(ki.set(i))})},this.handlers.compositionstart=()=>{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{t.inputState.composing=-1,t.inputState.compositionFirstChange=null};for(let i in this.handlers)e.addEventListener(i,this.handlers[i]);this.measureReq={read:t=>{this.editContext.updateControlBounds(t.contentDOM.getBoundingClientRect());let e=Qe(t.root);e&&e.rangeCount&&this.editContext.updateSelectionBounds(e.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let e=0,i=!1,n=this.pendingContextChange;return t.changes.iterChanges(((s,r,o,a,l)=>{if(i)return;let h=l.length-(r-s);if(n&&r>=n.to){if(n.from==s&&n.to==r&&n.insert.eq(l))return n=this.pendingContextChange=null,e+=h,void(this.to+=h);n=null,this.revertPending(t.state)}if(s+=e,(r+=e)<=this.from)this.from+=h,this.to+=h;else if(sthis.to||this.to-this.from+l.length>3e4)return void(i=!0);this.editContext.updateText(this.toContextPos(s),this.toContextPos(r),l.toString()),this.to+=h}e+=h})),n&&!i&&this.revertPending(t.state),!i}update(t){let e=this.pendingContextChange;this.applyEdits(t)&&this.rangeIsValid(t.state)?(t.docChanged||t.selectionSet||e)&&this.setSelection(t.state):(this.pendingContextChange=null,this.resetRange(t.state),this.editContext.updateText(0,this.editContext.text.length,t.state.doc.sliceString(this.from,this.to)),this.setSelection(t.state)),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:e}=t.selection.main;this.from=Math.max(0,e-1e4),this.to=Math.min(t.doc.length,e+1e4)}revertPending(t){let e=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(e.from),this.toContextPos(e.from+e.insert.length),t.doc.sliceString(e.from,e.to))}setSelection(t){let{main:e}=t.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,e.anchor))),n=this.toContextPos(e.head);this.editContext.selectionStart==i&&this.editContext.selectionEnd==n||this.editContext.updateSelection(i,n)}rangeIsValid(t){let{head:e}=t.selection.main;return!(this.from>0&&e-this.from<500||this.to3e4)}toEditorPos(t){return t+this.from}toContextPos(t){return t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class Sr{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var e;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:i}=t;this.dispatchTransactions=t.dispatchTransactions||i&&(t=>t.forEach((t=>i(t,this))))||(t=>this.update(t)),this.dispatch=this.dispatch.bind(this),this._root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new tr(t.state||It.create(t)),t.scrollTo&&t.scrollTo.is(mn)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Sn).map((t=>new xn(t)));for(let n of this.plugins)n.update(this);this.observer=new gr(this),this.inputState=new rs(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Vn(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(e=document.fonts)||void 0===e?void 0:e.ready)&&document.fonts.ready.then((()=>this.requestMeasure()))}dispatch(...t){let e=1==t.length&&t[0]instanceof qt?t:1==t.length&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(e,this)}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,i=!1,n=!1,s=this.state;for(let f of t){if(f.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=f.state}if(this.destroyed)return void(this.viewState.state=s);let r=this.hasFocus,o=0,a=null;t.some((t=>t.annotation(Cs)))?(this.inputState.notifiedFocused=r,o=1):r!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=r,a=Ts(s,r),a||(o=1));let l=this.observer.delayedAndroidKey,h=null;if(l?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(h=null)):this.observer.clear(),s.facet(It.phrases)!=this.state.facet(It.phrases))return this.setState(s);e=qn.create(this,s,t),e.flags|=o;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(c&&(c=c.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;c=new pn(t.empty?t:et.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(mn)&&(c=t.value.clip(this.state))}this.viewState.update(e,c),this.bidiCache=Qr.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),i=this.docView.update(e),this.state.facet(Mn)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(i,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(e.startState.facet(ar)!=e.state.facet(ar)&&(this.viewState.mustMeasureContent=!0),(i||n||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),i&&this.docViewUpdate(),!e.empty)for(let f of this.state.facet(an))try{f(e)}catch(u){bn(this.state,u,"update listener")}(a||h)&&Promise.resolve().then((()=>{a&&this.state==a.startState&&this.dispatch(a),h&&!ns(this,h)&&l.force&&_e(this.contentDOM,l.key,l.keyCode)}))}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new tr(t),this.plugins=t.facet(Sn).map((t=>new xn(t))),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView.destroy(),this.docView=new Vn(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(Sn),i=t.state.facet(Sn);if(e!=i){let n=[];for(let s of i){let i=e.indexOf(s);if(i<0)n.push(new xn(s));else{let e=this.plugins[i];e.mustUpdate=t,n.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=n,this.pluginMap.clear()}else for(let n of this.plugins)n.mustUpdate=t;for(let n=0;n-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();let e=null,i=this.scrollDOM,n=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:r}=this.viewState;Math.abs(n-this.viewState.scrollTop)>1&&(r=-1),this.viewState.scrollAnchorHeight=-1;try{for(let t=0;;t++){if(r<0)if(je(i))s=-1,r=this.viewState.heightMap.height;else{let t=this.viewState.scrollAnchorAt(n);s=t.from,r=t.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let l=[];4&a||([this.measureRequests,l]=[l,this.measureRequests]);let h=l.map((t=>{try{return t.read(this)}catch(e){return bn(this.state,e),xr}})),c=qn.create(this,this.state,[]),u=!1;c.flags|=a,e?e.flags|=a:e=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),u=this.docView.update(c),u&&this.docViewUpdate());for(let t=0;t1||t<-1){n+=t,i.scrollTop=n/this.scaleY,r=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let a of this.state.facet(an))a(e)}get themeClasses(){return hr+" "+(this.state.facet(lr)?ur:cr)+" "+this.state.facet(ar)}updateAttrs(){let t=kr(this,Qn,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(vn)?"true":"false",class:"cm-content",style:`${ci.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),kr(this,kn,e);let i=this.observer.ignore((()=>{let i=Si(this.contentDOM,this.contentAttrs,e),n=Si(this.dom,this.editorAttrs,t);return i||n}));return this.editorAttrs=t,this.contentAttrs=e,i}showAnnouncements(t){let e=!0;for(let i of t)for(let t of i.effects)if(t.is(Sr.announce)){e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(Mn);let t=this.state.facet(Sr.cspNonce);pe.mount(this.root,this.styleModules.concat(Or).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),t){if(this.measureRequests.indexOf(t)>-1)return;if(null!=t.key)for(let e=0;ee.spec==t))||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,i){return Fn(this,t,Nn(this,t,e,i))}moveByGroup(t,e){return Fn(this,t,Nn(this,t,e,(e=>function(t,e,i){let n=t.state.charCategorizer(e),s=n(i);return t=>{let e=n(t);return s==Dt.Space&&(s=e),s==e}}(this,t.head,e))))}visualLineSide(t,e){let i=this.bidiSpans(t),n=this.textDirectionAt(t.from),s=i[e?i.length-1:0];return et.cursor(s.side(e,n)+t.from,s.forward(!e,n)?1:-1)}moveToLineBoundary(t,e,i=!0){return function(t,e,i,n){let s=Un(t,e.head),r=n&&s.type==Qi.Text&&(t.lineWrapping||s.widgetLineBreaks)?t.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head):null;if(r){let e=t.dom.getBoundingClientRect(),n=t.textDirectionAt(s.from),o=t.posAtCoords({x:i==(n==Ei.LTR)?e.right-1:e.left+1,y:(r.top+r.bottom)/2});if(null!=o)return et.cursor(o,i?-1:1)}return et.cursor(i?s.to:s.from,i?-1:1)}(this,t,e,i)}moveVertically(t,e,i){return Fn(this,t,function(t,e,i,n){let s=e.head,r=i?1:-1;if(s==(i?t.state.doc.length:0))return et.cursor(s,e.assoc);let o,a=e.goalColumn,l=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(s,e.assoc||-1),c=t.documentTop;if(h)null==a&&(a=h.left-l.left),o=r<0?h.top:h.bottom;else{let e=t.viewState.lineBlockAt(s);null==a&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(s-e.from))),o=(r<0?e.top:e.bottom)+c}let u=l.left+a,f=null!=n?n:t.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let e=o+(f+d)*r,i=In(t,{x:u,y:e},!1,r);if(el.bottom||(r<0?is)){let n=t.docView.coordsForChar(i),s=!n||e0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(fn)||tthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>yr)return Ki(t.length);let e,i=this.textDirectionAt(t.from);for(let s of this.bidiCache)if(s.from==t.from&&s.dir==i&&(s.fresh||Ui(s.isolates,e=Tn(this,t))))return s.order;e||(e=Tn(this,t));let n=function(t,e,i){if(!t)return[new Gi(0,0,e==Yi?1:0)];if(e==zi&&!i.length&&!Ii.test(t))return Ki(t.length);if(i.length)for(;t.length>Ni.length;)Ni[Ni.length]=256;let n=[],s=e==zi?0:1;return Fi(t,s,s,i,0,t.length,n),n}(t.text,i,e);return this.bidiCache.push(new Qr(t.from,t.to,i,e,!0,n)),n}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||ci.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{Ye(this.contentDOM),this.docView.updateSelection()}))}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((9==t.nodeType?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return mn.of(new pn("number"==typeof t?et.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:e}=this.scrollDOM,i=this.viewState.scrollAnchorAt(t);return mn.of(new pn(et.cursor(i.from),"start","start",i.top-t,e,!0))}setTabFocusMode(t){null==t?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof t?this.inputState.tabFocusMode=t?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return yn.define((()=>({})),{eventHandlers:t})}static domEventObservers(t){return yn.define((()=>({})),{eventObservers:t})}static theme(t,e){let i=pe.newName(),n=[ar.of(i),Mn.of(dr(`.${i}`,t))];return e&&e.dark&&n.push(lr.of(!0)),n}static baseTheme(t){return gt.lowest(Mn.of(dr("."+hr,t,fr)))}static findFromDOM(t){var e;let i=t.querySelector(".cm-content"),n=i&&Ue.get(i)||Ue.get(t);return(null===(e=null==n?void 0:n.rootView)||void 0===e?void 0:e.view)||null}}Sr.styleModule=Mn,Sr.inputHandler=ln,Sr.clipboardInputFilter=cn,Sr.clipboardOutputFilter=un,Sr.scrollHandler=On,Sr.focusChangeEffect=hn,Sr.perLineTextDirection=fn,Sr.exceptionSink=on,Sr.updateListener=an,Sr.editable=vn,Sr.mouseSelectionStyle=rn,Sr.dragMovesSelection=sn,Sr.clickAddsSelectionRange=nn,Sr.decorations=Pn,Sr.outerDecorations=$n,Sr.atomicRanges=Zn,Sr.bidiIsolatedRanges=Cn,Sr.scrollMargins=An,Sr.darkTheme=lr,Sr.cspNonce=st.define({combine:t=>t.length?t[0]:""}),Sr.contentAttributes=kn,Sr.editorAttributes=Qn,Sr.lineWrapping=Sr.contentAttributes.of({class:"cm-lineWrapping"}),Sr.announce=Xt.define();const yr=4096,xr={};class Qr{constructor(t,e,i,n,s,r){this.from=t,this.to=e,this.dir=i,this.isolates=n,this.fresh=s,this.order=r}static update(t,e){if(e.empty&&!t.some((t=>t.fresh)))return t;let i=[],n=t.length?t[t.length-1].dir:Ei.LTR;for(let s=Math.max(0,t.length-10);s=0;s--){let e=n[s],r="function"==typeof e?e(t):e;r&&bi(r,i)}return i}const Pr=ci.mac?"mac":ci.windows?"win":ci.linux?"linux":"key";function $r(t,e,i){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==i&&e.shiftKey&&(t="Shift-"+t),t}const Zr=gt.default(Sr.domEventHandlers({keydown:(t,e)=>qr(Ar(e.state),t,e,"editor")})),Cr=st.define({enables:Zr}),Tr=new WeakMap;function Ar(t){let e=t.facet(Cr),i=Tr.get(e);return i||Tr.set(e,i=function(t,e=Pr){let i=Object.create(null),n=Object.create(null),s=(t,e)=>{let i=n[t];if(null==i)n[t]=e;else if(i!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},r=(t,n,r,o,a)=>{var l,h;let c=i[t]||(i[t]=Object.create(null)),u=n.split(/ (?!$)/).map((t=>function(t,e){const i=t.split(/-(?!$)/);let n,s,r,o,a=i[i.length-1];"Space"==a&&(a=" ");for(let l=0;l{let n=Rr={view:e,prefix:i,scope:t};return setTimeout((()=>{Rr==n&&(Rr=null)}),Mr),!0}]})}let f=u.join(" ");s(f,!1);let d=c[f]||(c[f]={preventDefault:!1,stopPropagation:!1,run:(null===(h=null===(l=c._any)||void 0===l?void 0:l.run)||void 0===h?void 0:h.slice())||[]});r&&d.run.push(r),o&&(d.preventDefault=!0),a&&(d.stopPropagation=!0)};for(let o of t){let t=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let e of t){let t=i[e]||(i[e]=Object.create(null));t._any||(t._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:n}=o;for(let e in t)t[e].run.push((t=>n(t,Xr)))}let n=o[e]||o.key;if(n)for(let e of t)r(e,n,o.run,o.preventDefault,o.stopPropagation),o.shift&&r(e,"Shift-"+n,o.shift,o.preventDefault,o.stopPropagation)}return i}(e.reduce(((t,e)=>t.concat(e)),[]))),i}let Rr=null;const Mr=4e3;let Xr=null;function qr(t,e,i,n){Xr=e;let s=function(t){var e=!(we&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Se&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?ve:be)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(e),r=j(_(s,0))==s.length&&" "!=s,o="",a=!1,l=!1,h=!1;Rr&&Rr.view==i&&Rr.scope==n&&(o=Rr.prefix+" ",cs.indexOf(e.keyCode)<0&&(l=!0,Rr=null));let c,u,f=new Set,d=t=>{if(t){for(let e of t.run)if(!f.has(e)&&(f.add(e),e(i)))return t.stopPropagation&&(h=!0),!0;t.preventDefault&&(t.stopPropagation&&(h=!0),l=!0)}return!1},O=t[n];return O&&(d(O[o+$r(s,e,!r)])?a=!0:r&&(e.altKey||e.metaKey||e.ctrlKey)&&!(ci.windows&&e.ctrlKey&&e.altKey)&&(c=be[e.keyCode])&&c!=s?(d(O[o+$r(c,e,!0)])||e.shiftKey&&(u=ve[e.keyCode])!=s&&u!=c&&d(O[o+$r(u,e,!1)]))&&(a=!0):r&&e.shiftKey&&d(O[o+$r(s,e,!0)])&&(a=!0),!a&&d(O._any)&&(a=!0)),l&&(a=!0),a&&h&&e.stopPropagation(),Xr=null,a}class Vr{constructor(t,e,i,n,s){this.className=t,this.left=e,this.top=i,this.width=n,this.height=s}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,e){return e.className==this.className&&(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",null!=this.width&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,i){if(i.empty){let n=t.coordsAtPos(i.head,i.assoc||1);if(!n)return[];let s=Er(t);return[new Vr(e,n.left-s.left,n.top-s.top,null,n.bottom-n.top)]}return function(t,e,i){if(i.to<=t.viewport.from||i.from>=t.viewport.to)return[];let n=Math.max(i.from,t.viewport.from),s=Math.min(i.to,t.viewport.to),r=t.textDirection==Ei.LTR,o=t.contentDOM,a=o.getBoundingClientRect(),l=Er(t),h=o.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),u=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),f=a.right-(c?parseInt(c.paddingRight):0),d=Un(t,n),O=Un(t,s),p=d.type==Qi.Text?d:null,m=O.type==Qi.Text?O:null;p&&(t.lineWrapping||d.widgetLineBreaks)&&(p=zr(t,n,1,p));m&&(t.lineWrapping||O.widgetLineBreaks)&&(m=zr(t,s,-1,m));if(p&&m&&p.from==m.from&&p.to==m.to)return b(v(i.from,i.to,p));{let e=p?v(i.from,null,p):w(d,!1),n=m?v(null,i.to,m):w(O,!0),s=[];return(p||d).to<(m||O).from-(p&&m?1:0)||d.widgetLineBreaks>1&&e.bottom+t.defaultLineHeight/2h&&r.from=s)break;a>n&&l(Math.max(t,n),null==e&&t<=h,Math.min(a,s),null==i&&a>=c,o.dir)}if(n=r.to+1,n>=s)break}return 0==a.length&&l(h,null==e,c,null==i,t.textDirection),{top:s,bottom:o,horizontal:a}}function w(t,e){let i=a.top+(e?t.top:t.bottom);return{top:i,bottom:i,horizontal:[]}}}(t,e,i)}}function Er(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Ei.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function zr(t,e,i,n){let s=t.coordsAtPos(e,2*i);if(!s)return n;let r=t.dom.getBoundingClientRect(),o=(s.top+s.bottom)/2,a=t.posAtCoords({x:r.left+1,y:o}),l=t.posAtCoords({x:r.right-1,y:o});return null==a||null==l?n:{from:Math.max(n.from,Math.min(a,l)),to:Math.min(n.to,Math.max(a,l))}}class Yr{constructor(t,e){this.view=t,this.layer=e,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,t)}update(t){t.startState.facet(Lr)!=t.state.facet(Lr)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){!1!==this.layer.updateOnDocViewUpdate&&t.requestMeasure(this.measureReq)}setOrder(t){let e=0,i=t.facet(Lr);for(;e{return i=t,n=this.drawn[e],!(i.constructor==n.constructor&&i.eq(n));var i,n}))){let e=this.dom.firstChild,i=0;for(let n of t)n.update&&e&&n.constructor&&this.drawn[i].constructor&&n.update(e,this.drawn[i])?(e=e.nextSibling,i++):this.dom.insertBefore(n.draw(),e);for(;e;){let t=e.nextSibling;e.remove(),e=t}this.drawn=t}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Lr=st.define();function _r(t){return[yn.define((e=>new Yr(e,t))),Lr.of(t)]}const Dr=!ci.ios,jr=st.define({combine:t=>Gt(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function Br(t={}){return[jr.of(t),Ir,Ur,Hr,dn.of(!0)]}function Wr(t){return t.startState.facet(jr)!=t.state.facet(jr)}const Ir=_r({above:!0,markers(t){let{state:e}=t,i=e.facet(jr),n=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty?!r||Dr:i.drawRangeCursor){let e=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",i=s.empty?s:et.cursor(s.head,s.head>s.anchor?-1:1);for(let s of Vr.forRange(t,e,i))n.push(s)}}return n},update(t,e){t.transactions.some((t=>t.selection))&&(e.style.animationName="cm-blink"==e.style.animationName?"cm-blink2":"cm-blink");let i=Wr(t);return i&&Gr(t.state,e),t.docChanged||t.selectionSet||i},mount(t,e){Gr(e.state,t)},class:"cm-cursorLayer"});function Gr(t,e){e.style.animationDuration=t.facet(jr).cursorBlinkRate+"ms"}const Ur=_r({above:!1,markers:t=>t.state.selection.ranges.map((e=>e.empty?[]:Vr.forRange(t,"cm-selectionBackground",e))).reduce(((t,e)=>t.concat(e))),update:(t,e)=>t.docChanged||t.selectionSet||t.viewportChanged||Wr(t),class:"cm-selectionLayer"}),Nr={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Dr&&(Nr[".cm-line"].caretColor=Nr[".cm-content"].caretColor="transparent !important");const Hr=gt.highest(Sr.theme(Nr)),Fr=Xt.define({map:(t,e)=>null==t?null:e.mapPos(t)}),Kr=ut.define({create:()=>null,update:(t,e)=>(null!=t&&(t=e.changes.mapPos(t)),e.effects.reduce(((t,e)=>e.is(Fr)?e.value:t),t))}),Jr=yn.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let i=t.state.field(Kr);null==i?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Kr)!=i||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Kr),i=null!=e&&t.coordsAtPos(e);if(!i)return null;let n=t.scrollDOM.getBoundingClientRect();return{left:i.left-n.left+t.scrollDOM.scrollLeft*t.scaleX,top:i.top-n.top+t.scrollDOM.scrollTop*t.scaleY,height:i.bottom-i.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:i}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/i+"px",this.cursor.style.height=t.height/i+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Kr)!=t&&this.view.dispatch({effects:Fr.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function to(t,e,i,n,s){e.lastIndex=0;for(let r,o=t.iterRange(i,n),a=i;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;r=e.exec(o.value);)s(a+r.index,r)}class eo{constructor(t){const{regexp:e,decoration:i,decorate:n,boundary:s,maxLength:r=1e3}=t;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,n)this.addMatch=(t,e,i,s)=>n(s,i,i+t[0].length,t,e);else if("function"==typeof i)this.addMatch=(t,e,n,s)=>{let r=i(t,e,n);r&&s(n,n+t[0].length,r)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(t,e,n,s)=>s(n,n+t[0].length,i)}this.boundary=s,this.maxLength=r}createDeco(t){let e=new Jt,i=e.add.bind(e);for(let{from:n,to:s}of function(t,e){let i=t.visibleRanges;if(1==i.length&&i[0].from==t.viewport.from&&i[0].to==t.viewport.to)return i;let n=[];for(let{from:s,to:r}of i)s=Math.max(t.state.doc.lineAt(s).from,s-e),r=Math.min(t.state.doc.lineAt(r).to,r+e),n.length&&n[n.length-1].to>=s?n[n.length-1].to=r:n.push({from:s,to:r});return n}(t,this.maxLength))to(t.state.doc,this.regexp,n,s,((e,n)=>this.addMatch(n,t,e,i)));return e.finish()}updateDeco(t,e){let i=1e9,n=-1;return t.docChanged&&t.changes.iterChanges(((e,s,r,o)=>{o>t.view.viewport.from&&r1e3?this.createDeco(t.view):n>-1?this.updateRange(t.view,e.map(t.changes),i,n):e}updateRange(t,e,i,n){for(let s of t.visibleRanges){let r=Math.max(s.from,i),o=Math.min(s.to,n);if(o>r){let i=t.state.doc.lineAt(r),n=i.toi.from;r--)if(this.boundary.test(i.text[r-1-i.from])){a=r;break}for(;oc.push(i.range(t,e));if(i==n)for(this.regexp.lastIndex=a-i.from;(h=this.regexp.exec(i.text))&&h.indexthis.addMatch(i,t,e,u)));e=e.update({filterFrom:a,filterTo:l,filter:(t,e)=>tl,add:c})}}return e}}const io=null!=/x/.unicode?"gu":"g",no=new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\ufeff-]",io),so={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let ro=null;const oo=st.define({combine(t){let e=Gt(t,{render:null,specialChars:no,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==ro&&"undefined"!=typeof document&&document.body){let e=document.body.style;ro=null!=(null!==(t=e.tabSize)&&void 0!==t?t:e.MozTabSize)}return ro||!1}())&&(e.specialChars=new RegExp("\t|"+e.specialChars.source,io)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,io)),e}});function ao(t={}){return[oo.of(t),lo||(lo=yn.fromClass(class{constructor(t){this.view=t,this.decorations=ki.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(oo)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new eo({regexp:t.specialChars,decoration:(e,i,n)=>{let{doc:s}=i.state,r=_(e[0],0);if(9==r){let t=s.lineAt(n),e=i.state.tabSize,r=ce(t.text,e,n-t.from);return ki.replace({widget:new co((e-r%e)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=ki.replace({widget:new ho(t,r)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(oo);t.startState.facet(oo)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))]}let lo=null;class ho extends xi{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){let e=function(t){return t>=32?"•":10==t?"␤":String.fromCharCode(9216+t)}(this.code),i=t.state.phrase("Control character")+" "+(so[this.code]||"0x"+this.code.toString(16)),n=this.options.render&&this.options.render(this.code,i,e);if(n)return n;let s=document.createElement("span");return s.textContent=e,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class co extends xi{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent="\t",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}const uo=ki.line({class:"cm-activeLine"}),fo=yn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,i=[];for(let n of t.state.selection.ranges){let s=t.lineBlockAt(n.head);s.from>e&&(i.push(uo.range(s.from)),e=s.from)}return ki.set(i)}},{decorations:t=>t.decorations}),Oo=2e3;function po(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),n=t.state.doc.lineAt(i),s=i-n.from,r=s>Oo?-1:s==n.length?function(t,e){let i=t.coordsAtPos(t.viewport.from);return i?Math.round(Math.abs((i.left-e)/t.defaultCharacterWidth)):-1}(t,e.clientX):ce(n.text,t.state.tabSize,i-n.from);return{line:n.number,col:r,off:s}}function mo(t,e){let i=po(t,e),n=t.state.selection;return i?{update(t){if(t.docChanged){let e=t.changes.mapPos(t.startState.doc.line(i.line).from),s=t.state.doc.lineAt(e);i={line:s.number,col:i.col,off:Math.min(i.off,s.length)},n=n.map(t.changes)}},get(e,s,r){let o=po(t,e);if(!o)return n;let a=function(t,e,i){let n=Math.min(e.line,i.line),s=Math.max(e.line,i.line),r=[];if(e.off>Oo||i.off>Oo||e.col<0||i.col<0){let o=Math.min(e.off,i.off),a=Math.max(e.off,i.off);for(let e=n;e<=s;e++){let i=t.doc.line(e);i.length<=a&&r.push(et.range(i.from+o,i.to+a))}}else{let o=Math.min(e.col,i.col),a=Math.max(e.col,i.col);for(let e=n;e<=s;e++){let i=t.doc.line(e),n=ue(i.text,o,t.tabSize,!0);if(n<0)r.push(et.cursor(i.to));else{let e=ue(i.text,a,t.tabSize);r.push(et.range(i.from+n,i.from+e))}}}return r}(t.state,i,o);return a.length?r?et.create(a.concat(n.ranges)):et.create(a):n}}:null}const go={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},bo={style:"cursor: crosshair"};function vo(t={}){let[e,i]=go[t.key||"Alt"],n=yn.fromClass(class{constructor(t){this.view=t,this.isDown=!1}set(t){this.isDown!=t&&(this.isDown=t,this.view.update([]))}},{eventObservers:{keydown(t){this.set(t.keyCode==e||i(t))},keyup(t){t.keyCode!=e&&i(t)||this.set(!1)},mousemove(t){this.set(i(t))}}});return[n,Sr.contentAttributes.of((t=>{var e;return(null===(e=t.plugin(n))||void 0===e?void 0:e.isDown)?bo:null}))]}const wo="-10000px";class So{constructor(t,e,i,n){this.facet=e,this.createTooltipView=i,this.removeTooltipView=n,this.input=t.state.facet(e),this.tooltips=this.input.filter((t=>t));let s=null;this.tooltipViews=this.tooltips.map((t=>s=i(t,s)))}update(t,e){var i;let n=t.state.facet(this.facet),s=n.filter((t=>t));if(n===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let r=[],o=e?[]:null;for(let a=0;ae[i]=t)),e.length=o.length),this.input=n,this.tooltips=s,this.tooltipViews=r,!0}}function yo(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const xo=st.define({combine:t=>{var e,i,n;return{position:ci.ios?"absolute":(null===(e=t.find((t=>t.position)))||void 0===e?void 0:e.position)||"fixed",parent:(null===(i=t.find((t=>t.parent)))||void 0===i?void 0:i.parent)||null,tooltipSpace:(null===(n=t.find((t=>t.tooltipSpace)))||void 0===n?void 0:n.tooltipSpace)||yo}}}),Qo=new WeakMap,ko=yn.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(xo);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver((()=>this.measureSoon())):null,this.manager=new So(t,Zo,((t,e)=>this.createTooltip(t,e)),(t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()})),this.above=this.manager.tooltips.map((t=>!!t.above)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let i=e||t.geometryChanged,n=t.state.facet(xo);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;i=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(t,e){let i=t.create(this.view),n=e?e.dom:null;if(i.dom.classList.add("cm-tooltip"),t.arrow&&!i.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",i.dom.appendChild(t)}return i.dom.style.position=this.position,i.dom.style.top=wo,i.dom.style.left="0px",this.container.insertBefore(i.dom,n),i.mount&&i.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(i.dom),i}destroy(){var t,e,i;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),null===(t=n.destroy)||void 0===t||t.call(n);this.parent&&this.container.remove(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),null===(i=this.intersectionObserver)||void 0===i||i.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,i=1,n=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if(ci.gecko)n=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==wo&&"0px"==t.style.left){let e=t.getBoundingClientRect();n=Math.abs(e.top+1e4)>1||Math.abs(e.left)>1}}if(n||"absolute"==this.position)if(this.parent){let t=this.parent.getBoundingClientRect();t.width&&t.height&&(e=t.width/this.parent.offsetWidth,i=t.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:i}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map(((t,e)=>{let i=this.manager.tooltipViews[e];return i.getCoords?i.getCoords(t.pos):this.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(xo).tooltipSpace(this.view),scaleX:e,scaleY:i,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let t of this.manager.tooltipViews)t.dom.style.position="absolute"}let{editor:i,space:n,scaleX:s,scaleY:r}=t,o=[];for(let a=0;a=Math.min(i.bottom,n.bottom)||u.rightMath.min(i.right,n.right)+.1){c.style.top=wo;continue}let d=l.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,O=d?7:0,p=f.right-f.left,m=null!==(e=Qo.get(h))&&void 0!==e?e:f.bottom-f.top,g=h.offset||$o,b=this.view.textDirection==Ei.LTR,v=f.width>n.right-n.left?b?n.left:n.right-f.width:b?Math.max(n.left,Math.min(u.left-(d?14:0)+g.x,n.right-p)):Math.min(Math.max(n.left,u.left-p+(d?14:0)-g.x),n.right-p),w=this.above[a];!l.strictSide&&(w?u.top-(f.bottom-f.top)-g.yn.bottom)&&w==n.bottom-u.bottom>u.top-n.top&&(w=this.above[a]=!w);let S=(w?u.top-n.top:n.bottom-u.bottom)-O;if(Sv&&t.topy&&(y=w?t.top-m-2-O:t.bottom+O+2);if("absolute"==this.position?(c.style.top=(y-t.parent.top)/r+"px",c.style.left=(v-t.parent.left)/s+"px"):(c.style.top=y/r+"px",c.style.left=v/s+"px"),d){let t=u.left+(b?g.x:-g.x)-(v+14-7);d.style.left=t/s+"px"}!0!==h.overlap&&o.push({left:v,top:y,right:x,bottom:y+m}),c.classList.toggle("cm-tooltip-above",w),c.classList.toggle("cm-tooltip-below",!w),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=wo}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Po=Sr.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),$o={x:0,y:0},Zo=st.define({enables:[ko,Po]}),Co=st.define({combine:t=>t.reduce(((t,e)=>t.concat(e)),[])});class To{static create(t){return new To(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new So(t,Co,((t,e)=>this.createHostedView(t,e)),(t=>t.dom.remove()))}createHostedView(t,e){let i=t.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,e?e.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(t){for(let e of this.manager.tooltipViews)e.mount&&e.mount(t);this.mounted=!0}positioned(t){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let e of this.manager.tooltipViews)null===(t=e.destroy)||void 0===t||t.call(e)}passProp(t){let e;for(let i of this.manager.tooltipViews){let n=i[t];if(void 0!==n)if(void 0===e)e=n;else if(e!==n)return}return e}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Ao=Zo.compute([Co],(t=>{let e=t.facet(Co);return 0===e.length?null:{pos:Math.min(...e.map((t=>t.pos))),end:Math.max(...e.map((t=>{var e;return null!==(e=t.end)&&void 0!==e?e:t.pos}))),create:To.create,above:e[0].above,arrow:e.some((t=>t.arrow))}}));class Ro{constructor(t,e,i,n,s){this.view=t,this.source=e,this.field=i,this.setHover=n,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;ti.bottom||e.xi.right+t.defaultCharacterWidth)return;let r=t.bidiSpans(t.state.doc.lineAt(n)).find((t=>t.from<=n&&t.to>=n)),o=r&&r.dir==Ei.RTL?-1:1;s=e.x{this.pending==e&&(this.pending=null,!i||Array.isArray(i)&&!i.length||t.dispatch({effects:this.setHover.of(Array.isArray(i)?i:[i])}))}),(e=>bn(t.state,e,"hover tooltip")))}else!r||Array.isArray(r)&&!r.length||t.dispatch({effects:this.setHover.of(Array.isArray(r)?r:[r])})}get tooltip(){let t=this.view.plugin(ko),e=t?t.manager.tooltips.findIndex((t=>t.create==To.create)):-1;return e>-1?t.manager.tooltipViews[e]:null}mousemove(t){var e,i;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:n,tooltip:s}=this;if(n.length&&s&&!function(t,e){let i,{left:n,right:s,top:r,bottom:o}=t.getBoundingClientRect();if(i=t.querySelector(".cm-tooltip-arrow")){let t=i.getBoundingClientRect();r=Math.min(t.top,r),o=Math.max(t.bottom,o)}return e.clientX>=n-Mo&&e.clientX<=s+Mo&&e.clientY>=r-Mo&&e.clientY<=o+Mo}(s.dom,t)||this.pending){let{pos:s}=n[0]||this.pending,r=null!==(i=null===(e=n[0])||void 0===e?void 0:e.end)&&void 0!==i?i:s;(s==r?this.view.posAtCoords(this.lastMove)==s:function(t,e,i,n,s){let r=t.scrollDOM.getBoundingClientRect(),o=t.documentTop+t.documentPadding.top+t.contentHeight;if(r.left>n||r.rights||Math.min(r.bottom,o)=e&&a<=i}(this.view,s,r,t.clientX,t.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:e}=this;if(e.length){let{tooltip:e}=this;e&&e.dom.contains(t.relatedTarget)?this.watchTooltipLeave(e.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let e=i=>{t.removeEventListener("mouseleave",e),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",e)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Mo=4;function Xo(t,e={}){let i=Xt.define(),n=ut.define({create:()=>[],update(t,n){if(t.length&&(e.hideOnChange&&(n.docChanged||n.selection)?t=[]:e.hideOn&&(t=t.filter((t=>!e.hideOn(n,t)))),n.docChanged)){let e=[];for(let i of t){let t=n.changes.mapPos(i.pos,-1,W.TrackDel);if(null!=t){let s=Object.assign(Object.create(null),i);s.pos=t,null!=s.end&&(s.end=n.changes.mapPos(s.end)),e.push(s)}}t=e}for(let e of n.effects)e.is(i)&&(t=e.value),e.is(Vo)&&(t=[]);return t},provide:t=>Co.from(t)});return{active:n,extension:[n,yn.define((s=>new Ro(s,t,n,i,e.hoverTime||300))),Ao]}}function qo(t,e){let i=t.plugin(ko);if(!i)return null;let n=i.manager.tooltips.indexOf(e);return n<0?null:i.manager.tooltipViews[n]}const Vo=Xt.define(),Eo=st.define({combine(t){let e,i;for(let n of t)e=e||n.topContainer,i=i||n.bottomContainer;return{topContainer:e,bottomContainer:i}}});function zo(t,e){let i=t.plugin(Yo),n=i?i.specs.indexOf(e):-1;return n>-1?i.panels[n]:null}const Yo=yn.fromClass(class{constructor(t){this.input=t.state.facet(Do),this.specs=this.input.filter((t=>t)),this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(Eo);this.top=new Lo(t,!0,e.topContainer),this.bottom=new Lo(t,!1,e.bottomContainer),this.top.sync(this.panels.filter((t=>t.top))),this.bottom.sync(this.panels.filter((t=>!t.top)));for(let i of this.panels)i.dom.classList.add("cm-panel"),i.mount&&i.mount()}update(t){let e=t.state.facet(Eo);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Lo(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Lo(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=t.state.facet(Do);if(i!=this.input){let e=i.filter((t=>t)),n=[],s=[],r=[],o=[];for(let i of e){let e,a=this.specs.indexOf(i);a<0?(e=i(t.view),o.push(e)):(e=this.panels[a],e.update&&e.update(t)),n.push(e),(e.top?s:r).push(e)}this.specs=e,this.panels=n,this.top.sync(s),this.bottom.sync(r);for(let t of o)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let n of this.panels)n.update&&n.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Sr.scrollMargins.of((e=>{let i=e.plugin(t);return i&&{top:i.top.scrollMargin(),bottom:i.bottom.scrollMargin()}}))});class Lo{constructor(t,e,i){this.view=t,this.top=e,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=_o(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=_o(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function _o(t){let e=t.nextSibling;return t.remove(),e}const Do=st.define({enables:Yo});class jo extends Ut{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}jo.prototype.elementClass="",jo.prototype.toDOM=void 0,jo.prototype.mapMode=W.TrackBefore,jo.prototype.startSide=jo.prototype.endSide=-1,jo.prototype.point=!0;const Bo=st.define(),Wo=st.define(),Io={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Kt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Go=st.define();function Uo(t){return[Ho(),Go.of(Object.assign(Object.assign({},Io),t))]}const No=st.define({combine:t=>t.some((t=>t))});function Ho(t){return[Fo]}const Fo=yn.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Go).map((e=>new ea(t,e)));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(No),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,i=t.view.viewport,n=Math.min(e.to,i.to)-Math.max(e.from,i.from);this.syncGutters(n<.8*(i.to-i.from))}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(No)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let i=Kt.iter(this.view.state.facet(Bo),this.view.viewport.from),n=[],s=this.gutters.map((t=>new ta(t,this.view.viewport,-this.view.documentPadding.top)));for(let r of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(r.type)){let t=!0;for(let e of r.type)if(e.type==Qi.Text&&t){Jo(i,n,e.from);for(let t of s)t.line(this.view,e,n);t=!1}else if(e.widget)for(let t of s)t.widget(this.view,e)}else if(r.type==Qi.Text){Jo(i,n,r.from);for(let t of s)t.line(this.view,r,n)}else if(r.widget)for(let t of s)t.widget(this.view,r);for(let r of s)r.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Go),i=t.state.facet(Go),n=t.docChanged||t.heightChanged||t.viewportChanged||!Kt.eq(t.startState.facet(Bo),t.state.facet(Bo),t.view.viewport.from,t.view.viewport.to);if(e==i)for(let s of this.gutters)s.update(t)&&(n=!0);else{n=!0;let s=[];for(let n of i){let i=e.indexOf(n);i<0?s.push(new ea(this.view,n)):(this.gutters[i].update(t),s.push(this.gutters[i]))}for(let t of this.gutters)t.dom.remove(),s.indexOf(t)<0&&t.destroy();for(let t of s)this.dom.appendChild(t.dom);this.gutters=s}return n}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>Sr.scrollMargins.of((e=>{let i=e.plugin(t);return i&&0!=i.gutters.length&&i.fixed?e.textDirection==Ei.LTR?{left:i.dom.offsetWidth*e.scaleX}:{right:i.dom.offsetWidth*e.scaleX}:null}))});function Ko(t){return Array.isArray(t)?t:[t]}function Jo(t,e,i){for(;t.value&&t.from<=i;)t.from==i&&e.push(t.value),t.next()}class ta{constructor(t,e,i){this.gutter=t,this.height=i,this.i=0,this.cursor=Kt.iter(t.markers,e.from)}addElement(t,e,i){let{gutter:n}=this,s=(e.top-this.height)/t.scaleY,r=e.height/t.scaleY;if(this.i==n.elements.length){let e=new ia(t,r,s,i);n.elements.push(e),n.dom.appendChild(e.dom)}else n.elements[this.i].update(t,r,s,i);this.height=e.bottom,this.i++}line(t,e,i){let n=[];Jo(this.cursor,n,e.from),i.length&&(n=n.concat(i));let s=this.gutter.config.lineMarker(t,e,n);s&&n.unshift(s);let r=this.gutter;(0!=n.length||r.config.renderEmptyElements)&&this.addElement(t,e,n)}widget(t,e){let i=this.gutter.config.widgetMarker(t,e.widget,e),n=i?[i]:null;for(let s of t.state.facet(Wo)){let i=s(t,e.widget,e);i&&(n||(n=[])).push(i)}n&&this.addElement(t,e,n)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class ea{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in e.domEventHandlers)this.dom.addEventListener(i,(n=>{let s,r=n.target;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let t=r.getBoundingClientRect();s=(t.top+t.bottom)/2}else s=n.clientY;let o=t.lineBlockAtHeight(s-t.documentTop);e.domEventHandlers[i](t,o,n)&&n.preventDefault()}));this.markers=Ko(e.markers(t)),e.initialSpacer&&(this.spacer=new ia(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=Ko(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let i=t.view.viewport;return!Kt.eq(this.markers,e,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class ia{constructor(t,e,i,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,e,i,n)}update(t,e,i,n){this.height!=e&&(this.height=e,this.dom.style.height=e+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let i=0;iGt(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let i=Object.assign({},t);for(let n in e){let t=i[n],s=e[n];i[n]=t?(e,i,n)=>t(e,i,n)||s(e,i,n):s}return i}})});class oa extends jo{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function aa(t,e){return t.state.facet(ra).formatNumber(e,t.state)}const la=Go.compute([ra],(t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(na),lineMarker:(t,e,i)=>i.some((t=>t.toDOM))?null:new oa(aa(t,t.state.doc.lineAt(e.from).number)),widgetMarker:(t,e,i)=>{for(let n of t.state.facet(sa)){let s=n(t,e,i);if(s)return s}return null},lineMarkerChange:t=>t.startState.facet(ra)!=t.state.facet(ra),initialSpacer:t=>new oa(aa(t,ha(t.state.doc.lines))),updateSpacer(t,e){let i=aa(e.view,ha(e.view.state.doc.lines));return i==t.number?t:new oa(i)},domEventHandlers:t.facet(ra).domEventHandlers})));function ha(t){let e=9;for(;e{let e=[],i=-1;for(let n of t.selection.ranges){let s=t.doc.lineAt(n.head).from;s>i&&(i=s,e.push(ca.range(s)))}return Kt.of(e)}));const fa=1024;let da=0;class Oa{constructor(t,e){this.from=t,this.to=e}}class pa{constructor(t={}){this.id=da++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=ba.match(t)),e=>{let i=t(e);return void 0===i?null:[this,i]}}}pa.closedBy=new pa({deserialize:t=>t.split(" ")}),pa.openedBy=new pa({deserialize:t=>t.split(" ")}),pa.group=new pa({deserialize:t=>t.split(" ")}),pa.isolate=new pa({deserialize:t=>{if(t&&"rtl"!=t&&"ltr"!=t&&"auto"!=t)throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}}),pa.contextHash=new pa({perNode:!0}),pa.lookAhead=new pa({perNode:!0}),pa.mounted=new pa({perNode:!0});class ma{constructor(t,e,i){this.tree=t,this.overlay=e,this.parser=i}static get(t){return t&&t.props&&t.props[pa.mounted.id]}}const ga=Object.create(null);class ba{constructor(t,e,i,n=0){this.name=t,this.props=e,this.id=i,this.flags=n}static define(t){let e=t.props&&t.props.length?Object.create(null):ga,i=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),n=new ba(t.name||"",e,t.id,i);if(t.props)for(let s of t.props)if(Array.isArray(s)||(s=s(n)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[s[0].id]=s[1]}return n}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(pa.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let i in t)for(let n of i.split(" "))e[n]=t[i];return t=>{for(let i=t.prop(pa.group),n=-1;n<(i?i.length:0);n++){let s=e[n<0?t.name:i[n]];if(s)return s}}}}ba.none=new ba("",Object.create(null),0,8);class va{constructor(t){this.types=t;for(let e=0;e=e){let o=new Ca(t.tree,t.overlay[0].from+r.from,-1,r);(s||(s=[n])).push($a(o,e,i,!1))}}return s?Xa(s):n}(this,t,e)}iterate(t){let{enter:e,leave:i,from:n=0,to:s=this.length}=t,r=t.mode||0,o=(r&ya.IncludeAnonymous)>0;for(let a=this.cursor(r|ya.IncludeAnonymous);;){let t=!1;if(a.from<=s&&a.to>=n&&(!o&&a.type.isAnonymous||!1!==e(a))){if(a.firstChild())continue;t=!0}for(;t&&i&&(o||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;t=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:La(ba.none,this.children,this.positions,0,this.children.length,0,this.length,((t,e,i)=>new xa(this.type,t,e,i,this.propValues)),t.makeTree||((t,e,i)=>new xa(ba.none,t,e,i)))}static build(t){return function(t){var e;let{buffer:i,nodeSet:n,maxBufferLength:s=fa,reused:r=[],minRepeatType:o=n.types.length}=t,a=Array.isArray(i)?new Qa(i,i.length):i,l=n.types,h=0,c=0;function u(t,e,i,b,v,w){let{id:S,start:y,end:x,size:Q}=a,k=c,P=h;for(;Q<0;){if(a.next(),-1==Q){let e=r[S];return i.push(e),void b.push(y-t)}if(-3==Q)return void(h=S);if(-4==Q)return void(c=S);throw new RangeError(`Unrecognized record size: ${Q}`)}let $,Z,C=l[S],T=y-t;if(x-y<=s&&(Z=m(a.pos-e,v))){let e=new Uint16Array(Z.size-Z.skip),i=a.pos-Z.size,s=e.length;for(;a.pos>i;)s=g(Z.start,e,s);$=new ka(e,x-Z.start,n),T=Z.start-t}else{let t=a.pos-Q;a.next();let e=[],i=[],n=S>=o?S:-1,r=0,l=x;for(;a.pos>t;)n>=0&&a.id==n&&a.size>=0?(a.end<=l-s&&(O(e,i,y,r,a.end,l,n,k,P),r=e.length,l=a.end),a.next()):w>2500?f(y,t,e,i):u(y,t,e,i,n,w+1);if(n>=0&&r>0&&r-1&&r>0){let t=d(C,P);$=La(C,e,i,0,e.length,0,x-y,t,t)}else $=p(C,e,i,x-y,k-x,P)}i.push($),b.push(T)}function f(t,e,i,r){let o=[],l=0,h=-1;for(;a.pos>e;){let{id:t,start:e,end:i,size:n}=a;if(n>4)a.next();else{if(h>-1&&e=0;t-=3)e[i++]=o[t],e[i++]=o[t+1]-s,e[i++]=o[t+2]-s,e[i++]=i;i.push(new ka(e,o[2]-s,n)),r.push(s-t)}}function d(t,e){return(i,n,s)=>{let r,o,a=0,l=i.length-1;if(l>=0&&(r=i[l])instanceof xa){if(!l&&r.type==t&&r.length==s)return r;(o=r.prop(pa.lookAhead))&&(a=n[l]+r.length+o)}return p(t,i,n,s,a,e)}}function O(t,e,i,s,r,o,a,l,h){let c=[],u=[];for(;t.length>s;)c.push(t.pop()),u.push(e.pop()+i-r);t.push(p(n.types[a],c,u,o-r,l-o,h)),e.push(r-i)}function p(t,e,i,n,s,r,o){if(r){let t=[pa.contextHash,r];o=o?[t].concat(o):[t]}if(s>25){let t=[pa.lookAhead,s];o=o?[t].concat(o):[t]}return new xa(t,e,i,n,o)}function m(t,e){let i=a.fork(),n=0,r=0,l=0,h=i.end-s,c={size:0,start:0,skip:0};t:for(let s=i.pos-t;i.pos>s;){let t=i.size;if(i.id==e&&t>=0){c.size=n,c.start=r,c.skip=l,l+=4,n+=4,i.next();continue}let a=i.pos-t;if(t<0||a=o?4:0,f=i.start;for(i.next();i.pos>a;){if(i.size<0){if(-3!=i.size)break t;u+=4}else i.id>=o&&(u+=4);i.next()}r=f,n+=t,l+=u}return(e<0||n==t)&&(c.size=n,c.start=r,c.skip=l),c.size>4?c:void 0}function g(t,e,i){let{id:n,start:s,end:r,size:l}=a;if(a.next(),l>=0&&n4){let n=a.pos-(l-4);for(;a.pos>n;)i=g(t,e,i)}e[--i]=o,e[--i]=r-t,e[--i]=s-t,e[--i]=n}else-3==l?h=n:-4==l&&(c=n);return i}let b=[],v=[];for(;a.pos>0;)u(t.start||0,t.bufferStart||0,b,v,-1,0);let w=null!==(e=t.length)&&void 0!==e?e:b.length?v[0]+b[0].length:0;return new xa(l[t.topID],b.reverse(),v.reverse(),w)}(t)}}xa.empty=new xa(ba.none,[],[],0);class Qa{constructor(t,e){this.buffer=t,this.index=e}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Qa(this.buffer,this.index)}}class ka{constructor(t,e,i){this.buffer=t,this.length=e,this.set=i}get type(){return ba.none}toString(){let t=[];for(let e=0;e0));a=r[a+3]);return o}slice(t,e,i){let n=this.buffer,s=new Uint16Array(e-t),r=0;for(let o=t,a=0;o=e&&ie;case 1:return i<=e&&n>e;case 2:return n>e;case 4:return!0}}function $a(t,e,i,n){for(var s;t.from==t.to||(i<1?t.from>=e:t.from>e)||(i>-1?t.to<=e:t.to0?o.length:-1;t!=l;t+=e){let l=o[t],h=a[t]+r.from;if(Pa(n,i,h,h+l.length))if(l instanceof ka){if(s&ya.ExcludeBuffers)continue;let o=l.findChild(0,l.buffer.length,e,i-h,n);if(o>-1)return new Ma(new Ra(r,l,t,h),null,o)}else if(s&ya.IncludeAnonymous||!l.type.isAnonymous||Ea(l)){let o;if(!(s&ya.IgnoreMounts)&&(o=ma.get(l))&&!o.overlay)return new Ca(o.tree,h,t,r);let a=new Ca(l,h,t,r);return s&ya.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(e<0?l.children.length-1:0,e,i,n)}}if(s&ya.IncludeAnonymous||!r.type.isAnonymous)return null;if(t=r.index>=0?r.index+e:e<0?-1:r._parent._tree.children.length,r=r._parent,!r)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,e,i=0){let n;if(!(i&ya.IgnoreOverlays)&&(n=ma.get(this._tree))&&n.overlay){let i=t-this.from;for(let{from:t,to:s}of n.overlay)if((e>0?t<=i:t=i:s>i))return new Ca(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,i)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Ta(t,e,i,n){let s=t.cursor(),r=[];if(!s.firstChild())return r;if(null!=i)for(let o=!1;!o;)if(o=s.type.is(i),!s.nextSibling())return r;for(;;){if(null!=n&&s.type.is(n))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return null==n?r:[]}}function Aa(t,e,i=e.length-1){for(let n=t;i>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[i]&&e[i]!=n.name)return!1;i--}}return!0}class Ra{constructor(t,e,i,n){this.parent=t,this.buffer=e,this.index=i,this.start=n}}class Ma extends Za{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,e,i){super(),this.context=t,this._parent=e,this.index=i,this.type=t.buffer.set.types[t.buffer.buffer[i]]}child(t,e,i){let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],t,e-this.context.start,i);return s<0?null:new Ma(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,i=0){if(i&ya.ExcludeBuffers)return null;let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return s<0?null:new Ma(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Ma(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new Ma(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],e=[],{buffer:i}=this.context,n=this.index+4,s=i.buffer[this.index+3];if(s>n){let r=i.buffer[this.index+1];t.push(i.slice(n,s,r)),e.push(0)}return new xa(this.type,t,e,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Xa(t){if(!t.length)return null;let e=0,i=t[0];for(let r=1;ri.from||n.to0){if(this.index-1)for(let n=e+t,s=t<0?-1:i._tree.children.length;n!=s;n+=t){let t=i._tree.children[n];if(this.mode&ya.IncludeAnonymous||t instanceof ka||!t.type.isAnonymous||Ea(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to=0;){for(let r=t;r;r=r._parent)if(r.index==n){if(n==this.index)return r;e=r,i=s+1;break t}n=this.stack[--s]}for(let n=i;n=0;s--){if(s<0)return Aa(this._tree,t,n);let r=i[e.buffer[this.stack[s]]];if(!r.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}}function Ea(t){return t.children.some((t=>t instanceof ka||!t.type.isAnonymous||Ea(t)))}const za=new WeakMap;function Ya(t,e){if(!t.isAnonymous||e instanceof ka||e.type!=t)return 1;let i=za.get(e);if(null==i){i=1;for(let n of e.children){if(n.type!=t||!(n instanceof xa)){i=1;break}i+=Ya(t,n)}za.set(e,i)}return i}function La(t,e,i,n,s,r,o,a,l){let h=0;for(let d=n;d=c)break;O+=e}if(h==s+1){if(O>c){let t=i[s];e(t.children,t.positions,0,t.children.length,n[s]+a);continue}u.push(i[s])}else{let e=n[h-1]+i[h-1].length-d;u.push(La(t,i,n,s,h,d,e,null,l))}f.push(d+a-r)}}(e,i,n,s,0),(a||l)(u,f,o)}class _a{constructor(){this.map=new WeakMap}setBuffer(t,e,i){let n=this.map.get(t);n||this.map.set(t,n=new Map),n.set(e,i)}getBuffer(t,e){let i=this.map.get(t);return i&&i.get(e)}set(t,e){t instanceof Ma?this.setBuffer(t.context.buffer,t.index,e):t instanceof Ca&&this.map.set(t.tree,e)}get(t){return t instanceof Ma?this.getBuffer(t.context.buffer,t.index):t instanceof Ca?this.map.get(t.tree):void 0}cursorSet(t,e){t.buffer?this.setBuffer(t.buffer.buffer,t.index,e):this.map.set(t.tree,e)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class Da{constructor(t,e,i,n,s=!1,r=!1){this.from=t,this.to=e,this.tree=i,this.offset=n,this.open=(s?1:0)|(r?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],i=!1){let n=[new Da(0,t.length,t,0,!1,i)];for(let s of e)s.to>t.length&&n.push(s);return n}static applyChanges(t,e,i=128){if(!e.length)return t;let n=[],s=1,r=t.length?t[0]:null;for(let o=0,a=0,l=0;;o++){let h=o=i)for(;r&&r.from=e.from||c<=e.to||l){let t=Math.max(e.from,a)-l,i=Math.min(e.to,c)-l;e=t>=i?null:new Da(t,i,e.tree,e.offset+l,o>0,!!h)}if(e&&n.push(e),r.to>c)break;r=snew Oa(t.from,t.to))):[new Oa(0,0)]:[new Oa(0,t.length)],this.createParse(t,e||[],i)}parse(t,e,i){let n=this.startParse(t,e,i);for(;;){let t=n.advance();if(t)return t}}}class Ba{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}function Wa(t){return(e,i,n,s)=>new Ha(e,t,i,n,s)}class Ia{constructor(t,e,i,n,s){this.parser=t,this.parse=e,this.overlay=i,this.target=n,this.from=s}}function Ga(t){if(!t.length||t.some((t=>t.from>=t.to)))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class Ua{constructor(t,e,i,n,s,r,o){this.parser=t,this.predicate=e,this.mounts=i,this.index=n,this.start=s,this.target=r,this.prev=o,this.depth=0,this.ranges=[]}}const Na=new pa({perNode:!0});class Ha{constructor(t,e,i,n,s){this.nest=e,this.input=i,this.fragments=n,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let t=this.baseParse.advance();if(!t)return null;if(this.baseParse=null,this.baseTree=t,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let t=this.baseTree;return null!=this.stoppedAt&&(t=new xa(t.type,t.children,t.positions,t.length,t.propValues.concat([[Na,this.stoppedAt]]))),t}let t=this.inner[this.innerDone],e=t.parse.advance();if(e){this.innerDone++;let i=Object.assign(Object.create(null),t.target.props);i[pa.mounted.id]=new ma(e,t.overlay,t.parser),t.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let e=this.innerDone;e=this.stoppedAt)a=!1;else if(t.hasNode(n)){if(e){let t=e.mounts.find((t=>t.frag.from<=n.from&&t.frag.to>=n.to&&t.mount.overlay));if(t)for(let i of t.mount.overlay){let s=i.from+t.pos,r=i.to+t.pos;s>=n.from&&r<=n.to&&!e.ranges.some((t=>t.froms))&&e.ranges.push({from:s,to:r})}}a=!1}else if(i&&(r=Fa(i.ranges,n.from,n.to)))a=2!=r;else if(!n.type.isAnonymous&&(s=this.nest(n,this.input))&&(n.fromnew Oa(t.from-n.from,t.to-n.from))):null,n.tree,t.length?t[0].from:n.from)),s.overlay?t.length&&(i={ranges:t,depth:0,prev:i}):a=!1}}else if(e&&(o=e.predicate(n))&&(!0===o&&(o=new Oa(n.from,n.to)),o.from=0&&e.ranges[t].to==o.from?e.ranges[t]={from:e.ranges[t].from,to:o.to}:e.ranges.push(o)}if(a&&n.firstChild())e&&e.depth++,i&&i.depth++;else for(;!n.nextSibling();){if(!n.parent())break t;if(e&&! --e.depth){let t=il(this.ranges,e.ranges);t.length&&(Ga(t),this.inner.splice(e.index,0,new Ia(e.parser,e.parser.startParse(this.input,sl(e.mounts,t),t),e.ranges.map((t=>new Oa(t.from-e.start,t.to-e.start))),e.target,t[0].from))),e=e.prev}i&&! --i.depth&&(i=i.prev)}}}}function Fa(t,e,i){for(let n of t){if(n.from>=i)break;if(n.to>e)return n.from<=e&&n.to>=i?2:1}return 0}function Ka(t,e,i,n,s,r){if(e=t&&e.enter(i,1,ya.IgnoreOverlays|ya.ExcludeBuffers)||e.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let e=this.cursor.tree;;){if(e==t.tree)return!0;if(!(e.children.length&&0==e.positions[0]&&e.children[0]instanceof xa))break;e=e.children[0]}return!1}}let el=class{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let i=this.curFrag=t[0];this.curTo=null!==(e=i.tree.prop(Na))&&void 0!==e?e:i.to,this.inner=new tl(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=e.tree.prop(Na))&&void 0!==t?t:e.to,this.inner=new tl(e.tree,-e.offset)}}findMounts(t,e){var i;let n=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let t=this.inner.cursor.node;t;t=t.parent){let s=null===(i=t.tree)||void 0===i?void 0:i.prop(pa.mounted);if(s&&s.parser==e)for(let e=this.fragI;e=t.to)break;i.tree==this.curFrag.tree&&n.push({frag:i,pos:t.from-i.offset,mount:s})}}}return n}};function il(t,e){let i=null,n=e;for(let s=1,r=0;s=a)break;t.to<=o||(i||(n=i=e.slice()),t.froma&&i.splice(r+1,0,new Oa(a,t.to))):t.to>a?i[r--]=new Oa(a,t.to):i.splice(r--,1))}}return n}function nl(t,e,i,n){let s=0,r=0,o=!1,a=!1,l=-1e9,h=[];for(;;){let c=s==t.length?1e9:o?t[s].to:t[s].from,u=r==e.length?1e9:a?e[r].to:e[r].from;if(o!=a){let t=Math.max(l,i),e=Math.min(c,u,n);tnew Oa(t.from+n,t.to+n))),a,l);for(let e=0,n=a;;e++){let a=e==o.length,h=a?l:o[e].from;if(h>n&&i.push(new Da(n,h,s.tree,-t,r.from>=n||r.openStart,r.to<=h||r.openEnd)),a)break;n=o[e].to}}else i.push(new Da(a,l,s.tree,-t,r.from>=t||r.openStart,r.to<=o||r.openEnd))}return i}let rl=0;class ol{constructor(t,e,i,n){this.name=t,this.set=e,this.base=i,this.modified=n,this.id=rl++}toString(){let{name:t}=this;for(let e of this.modified)e.name&&(t=`${e.name}(${t})`);return t}static define(t,e){let i="string"==typeof t?t:"?";if(t instanceof ol&&(e=t),null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let n=new ol(i,[],null,[]);if(n.set.push(n),e)for(let s of e.set)n.set.push(s);return n}static defineModifier(t){let e=new ll(t);return t=>t.modified.indexOf(e)>-1?t:ll.get(t.base||t,t.modified.concat(e).sort(((t,e)=>t.id-e.id)))}}let al=0;class ll{constructor(t){this.name=t,this.instances=[],this.id=al++}static get(t,e){if(!e.length)return t;let i=e[0].instances.find((i=>{return i.base==t&&(n=e,s=i.modified,n.length==s.length&&n.every(((t,e)=>t==s[e])));var n,s}));if(i)return i;let n=[],s=new ol(t.name,n,t,e);for(let o of e)o.instances.push(s);let r=function(t){let e=[[]];for(let i=0;ie.length-t.length))}(e);for(let o of t.set)if(!o.modified.length)for(let t of r)n.push(ll.get(o,t));return s}}function hl(t){let e=Object.create(null);for(let i in t){let n=t[i];Array.isArray(n)||(n=[n]);for(let t of i.split(" "))if(t){let i=[],s=2,r=t;for(let e=0;;){if("..."==r&&e>0&&e+3==t.length){s=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(r);if(!n)throw new RangeError("Invalid path: "+t);if(i.push("*"==n[0]?"":'"'==n[0][0]?JSON.parse(n[0]):n[0]),e+=n[0].length,e==t.length)break;let o=t[e++];if(e==t.length&&"!"==o){s=0;break}if("/"!=o)throw new RangeError("Invalid path: "+t);r=t.slice(e)}let o=i.length-1,a=i[o];if(!a)throw new RangeError("Invalid path: "+t);let l=new ul(n,s,o>0?i.slice(0,o):null);e[a]=l.sort(e[a])}}return cl.add(e)}const cl=new pa;class ul{constructor(t,e,i,n){this.tags=t,this.mode=e,this.context=i,this.next=n}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(t){return!t||t.depth{let e=s;for(let n of t)for(let t of n.set){let n=i[t.id];if(n){e=e?e+" "+n:n;break}}return e},scope:n}}function dl(t,e,i,n=0,s=t.length){let r=new Ol(n,Array.isArray(e)?e:[e],i);r.highlightRange(t.cursor(),n,s,"",r.highlighters),r.flush(s)}ul.empty=new ul([],2,null);class Ol{constructor(t,e,i){this.at=t,this.highlighters=e,this.span=i,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,i,n,s){let{type:r,from:o,to:a}=t;if(o>=i||a<=e)return;r.isTop&&(s=this.highlighters.filter((t=>!t.scope||t.scope(r))));let l=n,h=function(t){let e=t.type.prop(cl);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}(t)||ul.empty,c=function(t,e){let i=null;for(let n of t){let t=n.style(e);t&&(i=i?i+" "+t:t)}return i}(s,h.tags);if(c&&(l&&(l+=" "),l+=c,1==h.mode&&(n+=(n?" ":"")+c)),this.startSpan(Math.max(e,o),l),h.opaque)return;let u=t.tree&&t.tree.prop(pa.mounted);if(u&&u.overlay){let r=t.node.enter(u.overlay[0].from+o,1),h=this.highlighters.filter((t=>!t.scope||t.scope(u.tree.type))),c=t.firstChild();for(let f=0,d=o;;f++){let O=f=p)&&t.nextSibling()););if(!O||p>i)break;d=O.to+o,d>e&&(this.highlightRange(r.cursor(),Math.max(e,O.from+o),Math.min(i,d),"",h),this.startSpan(Math.min(i,d),l))}c&&t.parent()}else if(t.firstChild()){u&&(n="");do{if(!(t.to<=e)){if(t.from>=i)break;this.highlightRange(t,e,i,n,s),this.startSpan(Math.min(i,t.to),l)}}while(t.nextSibling());t.parent()}}}const pl=ol.define,ml=pl(),gl=pl(),bl=pl(gl),vl=pl(gl),wl=pl(),Sl=pl(wl),yl=pl(wl),xl=pl(),Ql=pl(xl),kl=pl(),Pl=pl(),$l=pl(),Zl=pl($l),Cl=pl(),Tl={comment:ml,lineComment:pl(ml),blockComment:pl(ml),docComment:pl(ml),name:gl,variableName:pl(gl),typeName:bl,tagName:pl(bl),propertyName:vl,attributeName:pl(vl),className:pl(gl),labelName:pl(gl),namespace:pl(gl),macroName:pl(gl),literal:wl,string:Sl,docString:pl(Sl),character:pl(Sl),attributeValue:pl(Sl),number:yl,integer:pl(yl),float:pl(yl),bool:pl(wl),regexp:pl(wl),escape:pl(wl),color:pl(wl),url:pl(wl),keyword:kl,self:pl(kl),null:pl(kl),atom:pl(kl),unit:pl(kl),modifier:pl(kl),operatorKeyword:pl(kl),controlKeyword:pl(kl),definitionKeyword:pl(kl),moduleKeyword:pl(kl),operator:Pl,derefOperator:pl(Pl),arithmeticOperator:pl(Pl),logicOperator:pl(Pl),bitwiseOperator:pl(Pl),compareOperator:pl(Pl),updateOperator:pl(Pl),definitionOperator:pl(Pl),typeOperator:pl(Pl),controlOperator:pl(Pl),punctuation:$l,separator:pl($l),bracket:Zl,angleBracket:pl(Zl),squareBracket:pl(Zl),paren:pl(Zl),brace:pl(Zl),content:xl,heading:Ql,heading1:pl(Ql),heading2:pl(Ql),heading3:pl(Ql),heading4:pl(Ql),heading5:pl(Ql),heading6:pl(Ql),contentSeparator:pl(xl),list:pl(xl),quote:pl(xl),emphasis:pl(xl),strong:pl(xl),link:pl(xl),monospace:pl(xl),strikethrough:pl(xl),inserted:pl(),deleted:pl(),changed:pl(),invalid:pl(),meta:Cl,documentMeta:pl(Cl),annotation:pl(Cl),processingInstruction:pl(Cl),definition:ol.defineModifier("definition"),constant:ol.defineModifier("constant"),function:ol.defineModifier("function"),standard:ol.defineModifier("standard"),local:ol.defineModifier("local"),special:ol.defineModifier("special")};for(let yw in Tl){let t=Tl[yw];t instanceof ol&&(t.name=yw)}var Al;fl([{tag:Tl.link,class:"tok-link"},{tag:Tl.heading,class:"tok-heading"},{tag:Tl.emphasis,class:"tok-emphasis"},{tag:Tl.strong,class:"tok-strong"},{tag:Tl.keyword,class:"tok-keyword"},{tag:Tl.atom,class:"tok-atom"},{tag:Tl.bool,class:"tok-bool"},{tag:Tl.url,class:"tok-url"},{tag:Tl.labelName,class:"tok-labelName"},{tag:Tl.inserted,class:"tok-inserted"},{tag:Tl.deleted,class:"tok-deleted"},{tag:Tl.literal,class:"tok-literal"},{tag:Tl.string,class:"tok-string"},{tag:Tl.number,class:"tok-number"},{tag:[Tl.regexp,Tl.escape,Tl.special(Tl.string)],class:"tok-string2"},{tag:Tl.variableName,class:"tok-variableName"},{tag:Tl.local(Tl.variableName),class:"tok-variableName tok-local"},{tag:Tl.definition(Tl.variableName),class:"tok-variableName tok-definition"},{tag:Tl.special(Tl.variableName),class:"tok-variableName2"},{tag:Tl.definition(Tl.propertyName),class:"tok-propertyName tok-definition"},{tag:Tl.typeName,class:"tok-typeName"},{tag:Tl.namespace,class:"tok-namespace"},{tag:Tl.className,class:"tok-className"},{tag:Tl.macroName,class:"tok-macroName"},{tag:Tl.propertyName,class:"tok-propertyName"},{tag:Tl.operator,class:"tok-operator"},{tag:Tl.comment,class:"tok-comment"},{tag:Tl.meta,class:"tok-meta"},{tag:Tl.invalid,class:"tok-invalid"},{tag:Tl.punctuation,class:"tok-punctuation"}]);const Rl=new pa;function Ml(t){return st.define({combine:t?e=>e.concat(t):void 0})}const Xl=new pa;class ql{constructor(t,e,i=[],n=""){this.data=t,this.name=n,It.prototype.hasOwnProperty("tree")||Object.defineProperty(It.prototype,"tree",{get(){return zl(this)}}),this.parser=e,this.extension=[Gl.of(this),It.languageData.of(((t,e,i)=>{let n=Vl(t,e,i),s=n.type.prop(Rl);if(!s)return[];let r=t.facet(s),o=n.type.prop(Xl);if(o){let s=n.resolve(e-n.from,i);for(let e of o)if(e.test(s,t)){let i=t.facet(e.facet);return"replace"==e.type?i:i.concat(r)}}return r}))].concat(i)}isActiveAt(t,e,i=-1){return Vl(t,e,i).type.prop(Rl)==this.data}findRegions(t){let e=t.facet(Gl);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let i=[],n=(t,e)=>{if(t.prop(Rl)==this.data)return void i.push({from:e,to:e+t.length});let s=t.prop(pa.mounted);if(s){if(s.tree.prop(Rl)==this.data){if(s.overlay)for(let t of s.overlay)i.push({from:t.from+e,to:t.to+e});else i.push({from:e,to:e+t.length});return}if(s.overlay){let t=i.length;if(n(s.tree,s.overlay[0].from+e),i.length>t)return}}for(let i=0;it.isTop?e:void 0))]}),t.name)}configure(t,e){return new El(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function zl(t){let e=t.field(ql.state,!1);return e?e.tree:xa.empty}class Yl{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let i=this.cursorPos-this.string.length;return t=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-i,e-i)}}let Ll=null;class _l{constructor(t,e,i=[],n,s,r,o,a){this.parser=t,this.state=e,this.fragments=i,this.tree=n,this.treeLen=s,this.viewport=r,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(t,e,i){return new _l(t,e,[],xa.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Yl(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=xa.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var i;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(Da.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=Ll;Ll=this;try{return t()}finally{Ll=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=Dl(t,e.from,e.to);return t}changes(t,e){let{fragments:i,tree:n,treeLen:s,viewport:r,skipped:o}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,i,n,s)=>e.push({fromA:t,toA:i,fromB:n,toB:s}))),i=Da.applyChanges(i,e),n=xa.empty,s=0,r={from:t.mapPos(r.from,-1),to:t.mapPos(r.to,1)},this.skipped.length){o=[];for(let e of this.skipped){let i=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);it.from&&(this.fragments=Dl(this.fragments,e,n),this.skipped.splice(i--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends ja{createParse(e,i,n){let s=n[0].from,r=n[n.length-1].to;return{parsedPos:s,advance(){let e=Ll;if(e){for(let t of n)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=r,new xa(ba.none,[],[],r-s)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return Ll}}function Dl(t,e,i){return Da.applyChanges(t,[{fromA:e,toA:i,fromB:e,toB:i}])}class jl{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),i=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new jl(e)}static init(t){let e=Math.min(3e3,t.doc.length),i=_l.create(t.facet(Gl).parser,t,{from:0,to:e});return i.work(20,e)||i.takeTree(),new jl(i)}}ql.state=ut.define({create:jl.init,update(t,e){for(let i of e.effects)if(i.is(ql.setState))return i.value;return e.startState.facet(Gl)!=e.state.facet(Gl)?jl.init(e.state):t.apply(e)}});let Bl=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(Bl=t=>{let e=-1,i=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(i):cancelIdleCallback(e)});const Wl="undefined"!=typeof navigator&&(null===(Al=navigator.scheduling)||void 0===Al?void 0:Al.isInputPending)?()=>navigator.scheduling.isInputPending():null,Il=yn.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(ql.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(ql.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=Bl(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEndn+1e3,a=s.context.work((()=>Wl&&Wl()||Date.now()>r),n+(o?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:ql.setState.of(new jl(s.context))})),this.chunkBudget>0&&(!a||o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>bn(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Gl=st.define({combine:t=>t.length?t[0]:null,enables:t=>[ql.state,Il,Sr.contentAttributes.compute([t],(e=>{let i=e.facet(t);return i&&i.name?{"data-language":i.name}:{}}))]});class Ul{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}class Nl{constructor(t,e,i,n,s,r=void 0){this.name=t,this.alias=e,this.extensions=i,this.filename=n,this.loadFunc=s,this.support=r,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then((t=>this.support=t),(t=>{throw this.loading=null,t})))}static of(t){let{load:e,support:i}=t;if(!e){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");e=()=>Promise.resolve(i)}return new Nl(t.name,(t.alias||[]).concat(t.name).map((t=>t.toLowerCase())),t.extensions||[],t.filename,e,i)}static matchFilename(t,e){for(let n of t)if(n.filename&&n.filename.test(e))return n;let i=/\.([^.]+)$/.exec(e);if(i)for(let n of t)if(n.extensions.indexOf(i[1])>-1)return n;return null}static matchLanguageName(t,e,i=!0){e=e.toLowerCase();for(let n of t)if(n.alias.some((t=>t==e)))return n;if(i)for(let n of t)for(let t of n.alias){let i=e.indexOf(t);if(i>-1&&(t.length>2||!/\w/.test(e[i-1])&&!/\w/.test(e[i+t.length])))return n}return null}}const Hl=st.define(),Fl=st.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some((t=>t!=e[0])))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Kl(t){let e=t.facet(Fl);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function Jl(t,e){let i="",n=t.tabSize,s=t.facet(Fl)[0];if("\t"==s){for(;e>=n;)i+="\t",e-=n;s=" "}for(let r=0;r=e?function(t,e,i){let n=e.resolveStack(i),s=n.node.enterUnfinishedNodesBefore(i);if(s!=n.node){let t=[];for(let e=s;e!=n.node;e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)n={node:t[e],next:n}}return sh(n,t,i)}(t,i,e):null}function eh(t,e,i){let n=Object.create(null),s=new ih(t,{overrideIndentation:t=>{var e;return null!==(e=n[t])&&void 0!==e?e:-1}}),r=[];for(let o=e;o<=i;){let e=t.doc.lineAt(o);o=e.to+1;let i=th(s,e.from);if(null==i)continue;/\S/.test(e.text)||(i=0);let a=/^\s*/.exec(e.text)[0],l=Jl(t,i);a!=l&&(n[e.from]=i,r.push({from:e.from,to:e.from+a.length,insert:l}))}return t.changes(r)}class ih{constructor(t,e={}){this.state=t,this.options=e,this.unit=Kl(t)}lineAt(t,e=1){let i=this.state.doc.lineAt(t),{simulateBreak:n,simulateDoubleBreak:s}=this.options;return null!=n&&n>=i.from&&n<=i.to?s&&n==t?{text:"",from:t}:(e<0?n-1&&(s+=r-this.countColumn(i,i.search(/\S|$/))),s}countColumn(t,e=t.length){return ce(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:i,from:n}=this.lineAt(t,e),s=this.options.overrideIndentation;if(s){let t=s(n);if(t>-1)return t}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const nh=new pa;function sh(t,e,i){for(let n=t;n;n=n.next){let t=rh(n.node);if(t)return t(ah.create(e,i,n))}return 0}function rh(t){let e=t.type.prop(nh);if(e)return e;let i,n=t.firstChild;if(n&&(i=n.type.prop(pa.closedBy))){let e=t.lastChild,n=e&&i.indexOf(e.name)>-1;return t=>ch(t,!0,1,void 0,n&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?oh:null}function oh(){return 0}class ah extends ih{constructor(t,e,i){super(t.state,t.options),this.base=t,this.pos=e,this.context=i}get node(){return this.context.node}static create(t,e,i){return new ah(t,e,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let i=t.resolve(e.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(lh(i,t))break;e=this.state.doc.lineAt(i.from)}return this.lineIndent(e.from)}continue(){return sh(this.context.next,this.base,this.pos)}}function lh(t,e){for(let i=e;i;i=i.parent)if(t==i)return!0;return!1}function hh({closing:t,align:e=!0,units:i=1}){return n=>ch(n,e,i,t)}function ch(t,e,i,n,s){let r=t.textAfter,o=r.match(/^\s*/)[0].length,a=n&&r.slice(o,o+n.length)==n||s==t.pos+o,l=e?function(t){let e=t.node,i=e.childAfter(e.from),n=e.lastChild;if(!i)return null;let s=t.options.simulateBreak,r=t.state.doc.lineAt(i.from),o=null==s||s<=r.from?r.to:Math.min(r.to,s);for(let a=i.to;;){let t=e.childAfter(a);if(!t||t==n)return null;if(!t.type.isSkipped){if(t.from>=o)return null;let e=/^ */.exec(r.text.slice(i.to-r.from))[0].length;return{from:i.from,to:i.to+e}}a=t.to}}(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*i)}function uh({except:t,units:e=1}={}){return i=>{let n=t&&t.test(i.textAfter);return i.baseIndent+(n?0:e*i.unit)}}const fh=st.define(),dh=new pa;function Oh(t){let e=t.firstChild,i=t.lastChild;return e&&e.toi)continue;if(s&&o.from=e&&n.to>i&&(s=n)}}return s}(t,e,i)}function gh(t,e){let i=e.mapPos(t.from,1),n=e.mapPos(t.to,-1);return i>=n?void 0:{from:i,to:n}}const bh=Xt.define({map:gh}),vh=Xt.define({map:gh});function wh(t){let e=[];for(let{head:i}of t.state.selection.ranges)e.some((t=>t.from<=i&&t.to>=i))||e.push(t.lineBlockAt(i));return e}const Sh=ut.define({create:()=>ki.none,update(t,e){t=t.map(e.changes);for(let i of e.effects)if(i.is(bh)&&!xh(t,i.value.from,i.value.to)){let{preparePlaceholder:n}=e.state.facet(Zh),s=n?ki.replace({widget:new Rh(n(e.state,i.value))}):Ah;t=t.update({add:[s.range(i.value.from,i.value.to)]})}else i.is(vh)&&(t=t.update({filter:(t,e)=>i.value.from!=t||i.value.to!=e,filterFrom:i.value.from,filterTo:i.value.to}));if(e.selection){let i=!1,{head:n}=e.selection.main;t.between(n,n,((t,e)=>{tn&&(i=!0)})),i&&(t=t.update({filterFrom:n,filterTo:n,filter:(t,e)=>e<=n||t>=n}))}return t},provide:t=>Sr.decorations.from(t),toJSON(t,e){let i=[];return t.between(0,e.doc.length,((t,e)=>{i.push(t,e)})),i},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let i=0;i{(!s||s.from>t)&&(s={from:t,to:e})})),s}function xh(t,e,i){let n=!1;return t.between(e,e,((t,s)=>{t==e&&s==i&&(n=!0)})),n}function Qh(t,e){return t.field(Sh,!1)?e:e.concat(Xt.appendConfig.of(Ch()))}function kh(t,e,i=!0){let n=t.state.doc.lineAt(e.from).number,s=t.state.doc.lineAt(e.to).number;return Sr.announce.of(`${t.state.phrase(i?"Folded lines":"Unfolded lines")} ${n} ${t.state.phrase("to")} ${s}.`)}const Ph=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:t=>{for(let e of wh(t)){let i=mh(t.state,e.from,e.to);if(i)return t.dispatch({effects:Qh(t.state,[bh.of(i),kh(t,i)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:t=>{if(!t.state.field(Sh,!1))return!1;let e=[];for(let i of wh(t)){let n=yh(t.state,i.from,i.to);n&&e.push(vh.of(n),kh(t,n,!1))}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,i=[];for(let n=0;n{let e=t.state.field(Sh,!1);if(!e||!e.size)return!1;let i=[];return e.between(0,t.state.doc.length,((t,e)=>{i.push(vh.of({from:t,to:e}))})),t.dispatch({effects:i}),!0}}],$h={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Zh=st.define({combine:t=>Gt(t,$h)});function Ch(t){return[Sh,qh]}function Th(t,e){let{state:i}=t,n=i.facet(Zh),s=e=>{let i=t.lineBlockAt(t.posAtDOM(e.target)),n=yh(t.state,i.from,i.to);n&&t.dispatch({effects:vh.of(n)}),e.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(t,s,e);let r=document.createElement("span");return r.textContent=n.placeholderText,r.setAttribute("aria-label",i.phrase("folded code")),r.title=i.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}const Ah=ki.replace({widget:new class extends xi{toDOM(t){return Th(t,null)}}});class Rh extends xi{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return Th(t,this.value)}}const Mh={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Xh extends jo{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}const qh=Sr.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Vh{constructor(t,e){let i;function n(t){let e=pe.newName();return(i||(i=Object.create(null)))["."+e]=t,e}this.specs=t;const s="string"==typeof e.all?e.all:e.all?n(e.all):void 0,r=e.scope;this.scope=r instanceof ql?t=>t.prop(Rl)==r.data:r?t=>t==r:void 0,this.style=fl(t.map((t=>({tag:t.tag,class:t.class||n(Object.assign({},t,{tag:null}))}))),{all:s}).style,this.module=i?new pe(i):null,this.themeType=e.themeType}static define(t,e){return new Vh(t,e||{})}}const Eh=st.define(),zh=st.define({combine:t=>t.length?[t[0]]:null});function Yh(t){let e=t.facet(Eh);return e.length?e:t.facet(zh)}function Lh(t,e){let i,n=[Dh];return t instanceof Vh&&(t.module&&n.push(Sr.styleModule.of(t.module)),i=t.themeType),(null==e?void 0:e.fallback)?n.push(zh.of(t)):i?n.push(Eh.computeN([Sr.darkTheme],(e=>e.facet(Sr.darkTheme)==("dark"==i)?[t]:[]))):n.push(Eh.of(t)),n}class _h{constructor(t){this.markCache=Object.create(null),this.tree=zl(t.state),this.decorations=this.buildDeco(t,Yh(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=zl(t.state),i=Yh(t.state),n=i!=Yh(t.startState),{viewport:s}=t.view,r=t.changes.mapPos(this.decoratedTo,1);e.length=s.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=r):(e!=this.tree||t.viewportChanged||n)&&(this.tree=e,this.decorations=this.buildDeco(t.view,i),this.decoratedTo=s.to)}buildDeco(t,e){if(!e||!this.tree.length)return ki.none;let i=new Jt;for(let{from:n,to:s}of t.visibleRanges)dl(this.tree,e,((t,e,n)=>{i.add(t,e,this.markCache[n]||(this.markCache[n]=ki.mark({class:n})))}),n,s);return i.finish()}}const Dh=gt.high(yn.fromClass(_h,{decorations:t=>t.decorations})),jh=Vh.define([{tag:Tl.meta,color:"#404740"},{tag:Tl.link,textDecoration:"underline"},{tag:Tl.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Tl.emphasis,fontStyle:"italic"},{tag:Tl.strong,fontWeight:"bold"},{tag:Tl.strikethrough,textDecoration:"line-through"},{tag:Tl.keyword,color:"#708"},{tag:[Tl.atom,Tl.bool,Tl.url,Tl.contentSeparator,Tl.labelName],color:"#219"},{tag:[Tl.literal,Tl.inserted],color:"#164"},{tag:[Tl.string,Tl.deleted],color:"#a11"},{tag:[Tl.regexp,Tl.escape,Tl.special(Tl.string)],color:"#e40"},{tag:Tl.definition(Tl.variableName),color:"#00f"},{tag:Tl.local(Tl.variableName),color:"#30a"},{tag:[Tl.typeName,Tl.namespace],color:"#085"},{tag:Tl.className,color:"#167"},{tag:[Tl.special(Tl.variableName),Tl.macroName],color:"#256"},{tag:Tl.definition(Tl.propertyName),color:"#00c"},{tag:Tl.comment,color:"#940"},{tag:Tl.invalid,color:"#f00"}]),Bh=Sr.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Wh="()[]{}",Ih=st.define({combine:t=>Gt(t,{afterCursor:!0,brackets:Wh,maxScanDistance:1e4,renderMatch:Nh})}),Gh=ki.mark({class:"cm-matchingBracket"}),Uh=ki.mark({class:"cm-nonmatchingBracket"});function Nh(t){let e=[],i=t.matched?Gh:Uh;return e.push(i.range(t.start.from,t.start.to)),t.end&&e.push(i.range(t.end.from,t.end.to)),e}const Hh=ut.define({create:()=>ki.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let i=[],n=e.state.facet(Ih);for(let s of e.state.selection.ranges){if(!s.empty)continue;let t=ic(e.state,s.head,-1,n)||s.head>0&&ic(e.state,s.head-1,1,n)||n.afterCursor&&(ic(e.state,s.head,1,n)||s.headSr.decorations.from(t)}),Fh=[Hh,Bh];function Kh(t={}){return[Ih.of(t),Fh]}const Jh=new pa;function tc(t,e,i){let n=t.prop(e<0?pa.openedBy:pa.closedBy);if(n)return n;if(1==t.name.length){let n=i.indexOf(t.name);if(n>-1&&n%2==(e<0?1:0))return[i[n+e]]}return null}function ec(t){let e=t.type.prop(Jh);return e?e(t.node):t}function ic(t,e,i,n={}){let s=n.maxScanDistance||1e4,r=n.brackets||Wh,o=zl(t),a=o.resolveInner(e,i);for(let l=a;l;l=l.parent){let n=tc(l.type,i,r);if(n&&l.from0?e>=s.from&&es.from&&e<=s.to))return nc(t,e,i,l,s,n,r)}}return function(t,e,i,n,s,r,o){let a=i<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=o.indexOf(a);if(l<0||l%2==0!=i>0)return null;let h={from:i<0?e-1:e,to:i>0?e+1:e},c=t.doc.iterRange(e,i>0?t.doc.length:0),u=0;for(let f=0;!c.next().done&&f<=r;){let t=c.value;i<0&&(f+=t.length);let r=e+f*i;for(let e=i>0?0:t.length-1,a=i>0?t.length:-1;e!=a;e+=i){let a=o.indexOf(t[e]);if(!(a<0||n.resolveInner(r+e,1).type!=s))if(a%2==0==i>0)u++;else{if(1==u)return{start:h,end:{from:r+e,to:r+e+1},matched:a>>1==l>>1};u--}}i>0&&(f+=t.length)}return c.done?{start:h,matched:!1}:null}(t,e,i,o,a.type,s,r)}function nc(t,e,i,n,s,r,o){let a=n.parent,l={from:s.from,to:s.to},h=0,c=null==a?void 0:a.cursor();if(c&&(i<0?c.childBefore(n.from):c.childAfter(n.to)))do{if(i<0?c.to<=n.from:c.from>=n.to){if(0==h&&r.indexOf(c.type.name)>-1&&c.from=this.string.length}sol(){return 0==this.pos}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pose}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPosi?t.toLowerCase():t;return n(this.string.substr(this.pos,t.length))==n(t)?(!1!==e&&(this.pos+=t.length),!0):null}{let i=this.string.slice(this.pos).match(t);return i&&i.index>0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}}function oc(t){if("object"!=typeof t)return t;let e={};for(let i in t){let n=t[i];e[i]=n instanceof Array?n.slice():n}return e}const ac=new WeakMap;class lc extends ql{constructor(t){let e,i=Ml(t.languageData),n={name:(s=t).name||"",token:s.token,blankLine:s.blankLine||(()=>{}),startState:s.startState||(()=>!0),copyState:s.copyState||oc,indent:s.indent||(()=>null),languageData:s.languageData||{},tokenTable:s.tokenTable||dc};var s;super(i,new class extends ja{createParse(t,i,n){return new uc(e,t,i,n)}},[Hl.of(((t,e)=>this.getIndent(t,e)))],t.name),this.topNode=function(t){let e=ba.define({id:Oc.length,name:"Document",props:[Rl.add((()=>t))],top:!0});return Oc.push(e),e}(i),e=this,this.streamParser=n,this.stateAfter=new pa({perNode:!0}),this.tokenTable=t.tokenTable?new vc(n.tokenTable):wc}static define(t){return new lc(t)}getIndent(t,e){let i,n=zl(t.state),s=n.resolve(e);for(;s&&s.type!=this.topNode;)s=s.parent;if(!s)return null;let{overrideIndentation:r}=t.options;r&&(i=ac.get(t.state),null!=i&&i1e4)return null;for(;o=n&&i+e.length<=s&&e.prop(t.stateAfter);if(r)return{state:t.streamParser.copyState(r),pos:i+e.length};for(let o=e.children.length-1;o>=0;o--){let r=e.children[o],a=i+e.positions[o],l=r instanceof xa&&a=e.length)return e;s||e.type!=t.topNode||(s=!0);for(let r=e.children.length-1;r>=0;r--){let o,a=e.positions[r],l=e.children[r];if(ai&&hc(t,s.tree,0-s.offset,i,r);if(o&&(e=cc(t,s.tree,i+s.offset,o.pos+s.offset,!1)))return{state:o.state,tree:e}}return{state:t.streamParser.startState(n?Kl(n):4),tree:xa.empty}}(t,i,r,null==s?void 0:s.state);this.state=o,this.parsedPos=this.chunkStart=r+a.length;for(let l=0;l=e?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,e),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let e=this.input.chunk(t);if(this.input.lineChunks)"\n"==e&&(e="");else{let t=e.indexOf("\n");t>-1&&(e=e.slice(0,t))}return t+e.length<=this.to?e:e.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,e=this.lineAfter(t),i=t+e.length;for(let n=this.rangeIndex;;){let t=this.ranges[n].to;if(t>=i)break;if(e=e.slice(0,t-(i-e.length)),n++,n==this.ranges.length)break;let s=this.ranges[n].from,r=this.lineAfter(s);e+=r,i=s+r.length}return{line:e,end:i}}skipGapsTo(t,e,i){for(;;){let n=this.ranges[this.rangeIndex].to,s=t+e;if(i>0?n>s:n>=s)break;e+=this.ranges[++this.rangeIndex].from-n}return e}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){e+=s=this.skipGapsTo(e,s,1);let t=this.chunk.length;i+=s=this.skipGapsTo(i,s,-1),n+=this.chunk.length-t}return this.chunk.push(t,e,i,n),s}parseLine(t){let{line:e,end:i}=this.nextLine(),n=0,{streamParser:s}=this.lang,r=new rc(e,t?t.state.tabSize:4,t?Kl(t.state):2);if(r.eol())s.blankLine(this.state,r.indentUnit);else for(;!r.eol();){let t=fc(s.token,r,this.state);if(t&&(n=this.emitToken(this.lang.tokenTable.resolve(t),this.parsedPos+r.start,this.parsedPos+r.pos,4,n)),r.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPose.start)return n}throw new Error("Stream parser failed to advance stream.")}const dc=Object.create(null),Oc=[ba.none],pc=new va(Oc),mc=[],gc=Object.create(null),bc=Object.create(null);for(let[yw,xw]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])bc[yw]=yc(dc,xw);class vc{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),bc)}resolve(t){return t?this.table[t]||(this.table[t]=yc(this.extra,t)):0}}const wc=new vc(dc);function Sc(t,e){mc.indexOf(t)>-1||(mc.push(t),console.warn(e))}function yc(t,e){let i=[];for(let a of e.split(" ")){let e=[];for(let i of a.split(".")){let n=t[i]||Tl[i];n?"function"==typeof n?e.length?e=e.map(n):Sc(i,`Modifier ${i} used at start of tag`):e.length?Sc(i,`Tag ${i} used as modifier`):e=Array.isArray(n)?n:[n]:Sc(i,`Unknown highlighting tag ${i}`)}for(let t of e)i.push(t)}if(!i.length)return 0;let n=e.replace(/ /g,"_"),s=n+" "+i.map((t=>t.id)),r=gc[s];if(r)return r.id;let o=gc[s]=ba.define({id:Oc.length,name:n,props:[hl({[n]:i})]});return Oc.push(o),o.id}Ei.RTL,Ei.LTR;class xc{constructor(t,e,i,n){this.state=t,this.pos=e,this.explicit=i,this.view=n,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let e=zl(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),n=e.text.slice(i-e.from,this.pos-e.from),s=n.search(Zc(t,!1));return s<0?null:{from:i+s,to:this.pos,text:n.slice(s)}}get aborted(){return null==this.abortListeners}addEventListener(t,e,i){"abort"==t&&this.abortListeners&&(this.abortListeners.push(e),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function Qc(t){let e=Object.keys(t).join(""),i=/\w/.test(e);return i&&(e=e.replace(/\w/g,"")),`[${i?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function kc(t){let e=t.map((t=>"string"==typeof t?{label:t}:t)),[i,n]=e.every((t=>/^\w+$/.test(t.label)))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),i=Object.create(null);for(let{label:s}of t){e[s[0]]=!0;for(let t=1;t{let s=t.matchBefore(n);return s||t.explicit?{from:s?s.from:t.pos,options:e,validFor:i}:null}}class Pc{constructor(t,e,i,n){this.completion=t,this.source=e,this.match=i,this.score=n}}function $c(t){return t.selection.main.from}function Zc(t,e){var i;let{source:n}=t,s=e&&"^"!=n[0],r="$"!=n[n.length-1];return s||r?new RegExp(`${s?"^":""}(?:${n})${r?"$":""}`,null!==(i=t.flags)&&void 0!==i?i:t.ignoreCase?"i":""):t}const Cc=At.define();const Tc=new WeakMap;function Ac(t){if(!Array.isArray(t))return t;let e=Tc.get(t);return e||Tc.set(t,e=kc(t)),e}const Rc=Xt.define(),Mc=Xt.define();class Xc{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e=48&&n<=57||n>=97&&n<=122?2:n>=65&&n<=90?1:0:(l=D(n))!=l.toLowerCase()?1:l!=l.toUpperCase()?2:0;(!g||1==b&&p||0==v&&0!=b)&&(e[c]==n||i[c]==n&&(u=!0)?r[c++]=g:r.length&&(m=!1)),v=b,g+=j(n)}return c==a&&0==r[0]&&m?this.result((u?-200:0)-100,r,t):f==a&&0==d?this.ret(-200-t.length+(O==t.length?0:-100),[0,O]):o>-1?this.ret(-700-t.length,[o,o+this.pattern.length]):f==a?this.ret(-900-t.length,[d,O]):c==a?this.result((u?-200:0)-100-700+(m?0:-1100),r,t):2==e.length?null:this.result((n[0]?-700:0)-200-1100,n,t)}result(t,e,i){let n=[],s=0;for(let r of e){let t=r+(this.astral?j(_(i,r)):1);s&&n[s-1]==r?n[s-1]=t:(n[s++]=r,n[s++]=t)}return this.ret(t-i.length,n)}}class qc{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.lengthGt(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:zc,filterStrict:!1,compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>i=>Ec(t(i),e(i)),optionClass:(t,e)=>i=>Ec(t(i),e(i)),addToOptions:(t,e)=>t.concat(e),filterStrict:(t,e)=>t||e})});function Ec(t,e){return t?e?t+" "+e:t:e}function zc(t,e,i,n,s,r){let o,a,l=t.textDirection==Ei.RTL,h=l,c=!1,u="top",f=e.left-s.left,d=s.right-e.right,O=n.right-n.left,p=n.bottom-n.top;if(h&&f=p||t>e.top?o=i.bottom-e.top:(u="bottom",o=e.bottom-i.top)}return{style:`${u}: ${o/((e.bottom-e.top)/r.offsetHeight)}px; max-width: ${a/((e.right-e.left)/r.offsetWidth)}px`,class:"cm-completionInfo-"+(c?l?"left-narrow":"right-narrow":h?"left":"right")}}function Yc(t,e,i){if(t<=i)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/i);return{from:t*i,to:(t+1)*i}}let n=Math.floor((t-e)/i);return{from:t-(n+1)*i,to:t-n*i}}class Lc{constructor(t,e,i){this.view=t,this.stateField=e,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let n=t.state.field(e),{options:s,selected:r}=n.open,o=t.state.facet(Vc);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map((t=>"cm-completionIcon-"+t))),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,i,n){let s=document.createElement("span");s.className="cm-completionLabel";let r=t.displayLabel||t.label,o=0;for(let a=0;ao&&s.appendChild(document.createTextNode(r.slice(o,t)));let i=s.appendChild(document.createElement("span"));i.appendChild(document.createTextNode(r.slice(t,e))),i.className="cm-completionMatchedText",o=e}return ot.position-e.position)).map((t=>t.render))}(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Yc(s.length,r,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",(i=>{let{options:n}=t.state.field(e).open;for(let e,s=i.target;s&&s!=this.dom;s=s.parentNode)if("LI"==s.nodeName&&(e=/-(\d+)$/.exec(s.id))&&+e[1]{let i=t.state.field(this.stateField,!1);i&&i.tooltip&&t.state.facet(Vc).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:Mc.of(null)})})),this.showOptions(s,n.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(t){var e;let i=t.state.field(this.stateField),n=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),i!=n){let{options:s,selected:r,disabled:o}=i.open;n.open&&n.open.options==s||(this.range=Yc(s.length,r,t.state.facet(Vc).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),o!=(null===(e=n.open)||void 0===e?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected=this.range.to)&&(this.range=Yc(e.options.length,e.selected,this.view.state.facet(Vc).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:i}=e.options[e.selected],{info:n}=i;if(!n)return;let s="string"==typeof n?document.createTextNode(n):n(i);if(!s)return;"then"in s?s.then((e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,i)})).catch((t=>bn(this.view.state,t,"completion info"))):this.addInfoPane(s,i)}}addInfoPane(t,e){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",null!=t.nodeType)i.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:n}=t;i.appendChild(e),this.infoDestroy=n||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let e=null;for(let i=this.list.firstChild,n=this.range.from;i;i=i.nextSibling,n++)"LI"==i.nodeName&&i.id?n==t?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected"):n--;return e&&function(t,e){let i=t.getBoundingClientRect(),n=e.getBoundingClientRect(),s=i.height/t.offsetHeight;n.topi.bottom&&(t.scrollTop+=(n.bottom-i.bottom)/s)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),n=t.getBoundingClientRect(),s=this.space;if(!s){let t=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:t.innerWidth,bottom:t.innerHeight}}return n.top>Math.min(s.bottom,e.bottom)-10||n.bottomi.from||0==i.from))if(s=t,"string"!=typeof l&&l.header)n.appendChild(l.header(l));else{n.appendChild(document.createElement("completion-section")).textContent=t}}const h=n.appendChild(document.createElement("li"));h.id=e+"-"+r,h.setAttribute("role","option");let c=this.optionClass(o);c&&(h.className=c);for(let t of this.optionContent){let e=t(o,this.view.state,this.view,a);e&&h.appendChild(e)}}return i.from&&n.classList.add("cm-completionListIncompleteTop"),i.tonew Lc(i,t,e)}function Dc(t){return 100*(t.boost||0)+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}class jc{constructor(t,e,i,n,s,r){this.options=t,this.attrs=e,this.tooltip=i,this.timestamp=n,this.selected=s,this.disabled=r}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new jc(this.options,Gc(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,i,n,s,r){if(n&&!r&&t.some((t=>1==t.state)))return n.setDisabled();let o=function(t,e){let i=[],n=null,s=t=>{i.push(t);let{section:e}=t.completion;if(e){n||(n=[]);let t="string"==typeof e?e:e.name;n.some((e=>e.name==t))||n.push("string"==typeof e?{name:t}:e)}},r=e.facet(Vc);for(let h of t)if(h.hasResult()){let t=h.result.getMatch;if(!1===h.result.filter)for(let e of h.result.options)s(new Pc(e,h.source,t?t(e):[],1e9-i.length));else{let i,n=e.sliceDoc(h.from,h.to),o=r.filterStrict?new qc(n):new Xc(n);for(let e of h.result.options)if(i=o.match(e.label)){let n=e.displayLabel?t?t(e,i.matched):[]:i.matched;s(new Pc(e,h.source,n,i.score+(e.boost||0)))}}}if(n){let t=Object.create(null),e=0,s=(t,e)=>{var i,n;return(null!==(i=t.rank)&&void 0!==i?i:1e9)-(null!==(n=e.rank)&&void 0!==n?n:1e9)||(t.namee.score-t.score||l(t.completion,e.completion)))){let t=h.completion;!a||a.label!=t.label||a.detail!=t.detail||null!=a.type&&null!=t.type&&a.type!=t.type||a.apply!=t.apply||a.boost!=t.boost?o.push(h):Dc(h.completion)>Dc(a)&&(o[o.length-1]=h),a=h.completion}return o}(t,e);if(!o.length)return n&&t.some((t=>1==t.state))?n.setDisabled():null;let a=e.facet(Vc).selectOnOpen?0:-1;if(n&&n.selected!=a&&-1!=n.selected){let t=n.options[n.selected].completion;for(let e=0;ee.hasResult()?Math.min(t,e.from):t),1e8),create:iu,above:s.aboveCursor},n?n.timestamp:Date.now(),a,!1)}map(t){return new jc(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new jc(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Bc{constructor(t,e,i){this.active=t,this.id=e,this.open=i}static start(){return new Bc(Uc,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,i=e.facet(Vc),n=(i.override||e.languageDataAt("autocomplete",$c(e)).map(Ac)).map((e=>(this.active.find((t=>t.source==e))||new Hc(e,this.active.some((t=>0!=t.state))?1:0)).update(t,i)));n.length==this.active.length&&n.every(((t,e)=>t==this.active[e]))&&(n=this.active);let s=this.open,r=t.effects.some((t=>t.is(Kc)));s&&t.docChanged&&(s=s.map(t.changes)),t.selection||n.some((e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to)))||!function(t,e){if(t==e)return!0;for(let i=0,n=0;;){for(;i1==t.state))&&(s=null),!s&&n.every((t=>1!=t.state))&&n.some((t=>t.hasResult()))&&(n=n.map((t=>t.hasResult()?new Hc(t.source,0):t)));for(let o of t.effects)o.is(Jc)&&(s=s&&s.setSelected(o.value,this.id));return n==this.active&&s==this.open?this:new Bc(n,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Wc:Ic}}const Wc={"aria-autocomplete":"list"},Ic={};function Gc(t,e){let i={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(i["aria-activedescendant"]=t+"-"+e),i}const Uc=[];function Nc(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(Cc);if(i&&e.activateOnCompletion(i))return 12}let i=t.isUserEvent("input.type");return i&&e.activateOnTyping?5:i?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class Hc{constructor(t,e,i=-1){this.source=t,this.state=e,this.explicitPos=i}hasResult(){return!1}update(t,e){let i=Nc(t,e),n=this;(8&i||16&i&&this.touches(t))&&(n=new Hc(n.source,0)),4&i&&0==n.state&&(n=new Hc(this.source,1)),n=n.updateFor(t,i);for(let s of t.effects)if(s.is(Rc))n=new Hc(n.source,1,s.value?$c(t.state):-1);else if(s.is(Mc))n=new Hc(n.source,0);else if(s.is(Kc))for(let t of s.value)t.source==n.source&&(n=t);return n}updateFor(t,e){return this.map(t.changes)}map(t){return t.empty||this.explicitPos<0?this:new Hc(this.source,this.state,t.mapPos(this.explicitPos))}touches(t){return t.changes.touchesRange($c(t.state))}}class Fc extends Hc{constructor(t,e,i,n,s){super(t,2,e),this.result=i,this.from=n,this.to=s}hasResult(){return!0}updateFor(t,e){var i;if(!(3&e))return this.map(t.changes);let n=this.result;n.map&&!t.changes.empty&&(n=n.map(n,t.changes));let s=t.changes.mapPos(this.from),r=t.changes.mapPos(this.to,1),o=$c(t.state);if((this.explicitPos<0?o<=s:or||!n||2&e&&$c(t.startState)==this.from)return new Hc(this.source,4&e?1:0);let a=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos);return function(t,e,i,n){if(!t)return!1;let s=e.sliceDoc(i,n);return"function"==typeof t?t(s,i,n,e):Zc(t,!0).test(s)}(n.validFor,t.state,s,r)?new Fc(this.source,a,n,s,r):n.update&&(n=n.update(n,s,r,new xc(t.state,o,a>=0)))?new Fc(this.source,a,n,n.from,null!==(i=n.to)&&void 0!==i?i:$c(t.state)):new Hc(this.source,1,a)}map(t){if(t.empty)return this;return(this.result.map?this.result.map(this.result,t):this.result)?new Fc(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new Hc(this.source,0)}touches(t){return t.changes.touchesRange(this.from,this.to)}}const Kc=Xt.define({map:(t,e)=>t.map((t=>t.map(e)))}),Jc=Xt.define(),tu=ut.define({create:()=>Bc.start(),update:(t,e)=>t.update(e),provide:t=>[Zo.from(t,(t=>t.tooltip)),Sr.contentAttributes.from(t,(t=>t.attrs))]});function eu(t,e){const i=e.completion.apply||e.completion.label;let n=t.state.field(tu).active.find((t=>t.source==e.source));return n instanceof Fc&&("string"==typeof i?t.dispatch(Object.assign(Object.assign({},function(t,e,i,n){let{main:s}=t.selection,r=i-s.from,o=n-s.from;return Object.assign(Object.assign({},t.changeByRange((a=>{if(a!=s&&i!=n&&t.sliceDoc(a.from+r,a.from+o)!=t.sliceDoc(i,n))return{range:a};let l=t.toText(e);return{changes:{from:a.from+r,to:n==s.from?a.to:a.from+o,insert:l},range:et.cursor(a.from+r+l.length)}}))),{scrollIntoView:!0,userEvent:"input.complete"})}(t.state,i,n.from,n.to)),{annotations:Cc.of(e.completion)})):i(t,e.completion,n.from,n.to),!0)}const iu=_c(tu,eu);function nu(t,e="option"){return i=>{let n=i.state.field(tu,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp-1?n.open.selected+r*(t?1:-1):t?0:o-1;return a<0?a="page"==e?0:o-1:a>=o&&(a="page"==e?o-1:0),i.dispatch({effects:Jc.of(a)}),!0}}const su=t=>!!t.state.field(tu,!1)&&(t.dispatch({effects:Rc.of(!0)}),!0);class ru{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const ou=yn.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(tu).active)1==e.state&&this.startQuery(e)}update(t){let e=t.state.field(tu),i=t.state.facet(Vc);if(!t.selectionSet&&!t.docChanged&&t.startState.field(tu)==e)return;let n=t.transactions.some((t=>{let e=Nc(t,i);return 8&e||(t.selection||t.docChanged)&&!(3&e)}));for(let o=0;o50&&Date.now()-e.time>1e3){for(let t of e.context.abortListeners)try{t()}catch(r){bn(this.view.state,r)}e.context.abortListeners=null,this.running.splice(o--,1)}else e.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some((t=>t.effects.some((t=>t.is(Rc)))))&&(this.pendingStart=!0);let s=this.pendingStart?50:i.activateOnTypingDelay;if(this.debounceUpdate=e.active.some((t=>1==t.state&&!this.running.some((e=>e.active.source==t.source))))?setTimeout((()=>this.startUpdate()),s):-1,0!=this.composing)for(let o of t.transactions)o.isUserEvent("input.type")?this.composing=2:2==this.composing&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(tu);for(let i of e.active)1!=i.state||this.running.some((t=>t.active.source==i.source))||this.startQuery(i);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(Vc).updateSyncTime))}startQuery(t){let{state:e}=this.view,i=$c(e),n=new xc(e,i,t.explicitPos==i,this.view),s=new ru(t,n);this.running.push(s),Promise.resolve(t.source(n)).then((t=>{s.context.aborted||(s.done=t||null,this.scheduleAccept())}),(t=>{this.view.dispatch({effects:Mc.of(null)}),bn(this.view.state,t)}))}scheduleAccept(){this.running.every((t=>void 0!==t.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(Vc).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],i=this.view.state.facet(Vc),n=this.view.state.field(tu);for(let s=0;st.source==r.active.source));if(o&&1==o.state)if(null==r.done){let t=new Hc(r.active.source,0);for(let e of r.updates)t=t.update(e,i);1!=t.state&&e.push(t)}else this.startQuery(o)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:Kc.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(tu,!1);if(e&&e.tooltip&&this.view.state.facet(Vc).closeOnBlur){let i=e.open&&qo(this.view,e.open.tooltip);i&&i.dom.contains(t.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:Mc.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:Rc.of(!1)})),20),this.composing=0}}}),au="object"==typeof navigator&&/Win/.test(navigator.platform),lu=gt.highest(Sr.domEventHandlers({keydown(t,e){let i=e.state.field(tu,!1);if(!i||!i.open||i.open.disabled||i.open.selected<0||t.key.length>1||t.ctrlKey&&(!au||!t.altKey)||t.metaKey)return!1;let n=i.open.options[i.open.selected],s=i.active.find((t=>t.source==n.source)),r=n.completion.commitCharacters||s.result.commitCharacters;return r&&r.indexOf(t.key)>-1&&eu(e,n),!1}})),hu=Sr.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class cu{constructor(t,e,i,n){this.field=t,this.line=e,this.from=i,this.to=n}}class uu{constructor(t,e,i){this.field=t,this.from=e,this.to=i}map(t){let e=t.mapPos(this.from,-1,W.TrackDel),i=t.mapPos(this.to,1,W.TrackDel);return null==e||null==i?null:new uu(this.field,e,i)}}class fu{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let i=[],n=[e],s=t.doc.lineAt(e),r=/^\s*/.exec(s.text)[0];for(let a of this.lines){if(i.length){let i=r,s=/^\t*/.exec(a)[0].length;for(let e=0;enew uu(t.field,n[t.line]+t.from,n[t.line]+t.to)));return{text:i,ranges:o}}static parse(t){let e,i=[],n=[],s=[];for(let r of t.split(/\r\n?|\n/)){for(;e=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(r);){let t=e[1]?+e[1]:null,o=e[2]||e[3]||"",a=-1,l=o.replace(/\\[{}]/g,(t=>t[1]));for(let e=0;e=a&&t.field++}s.push(new cu(a,n.length,e.index,e.index+l.length)),r=r.slice(0,e.index)+o+r.slice(e.index+e[0].length)}r=r.replace(/\\([{}])/g,((t,e,i)=>{for(let r of s)r.line==n.length&&r.from>i&&(r.from--,r.to--);return e})),n.push(r)}return new fu(n,s)}}let du=ki.widget({widget:new class extends xi{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Ou=ki.mark({class:"cm-snippetField"});class pu{constructor(t,e){this.ranges=t,this.active=e,this.deco=ki.set(t.map((t=>(t.from==t.to?du:Ou).range(t.from,t.to))))}map(t){let e=[];for(let i of this.ranges){let n=i.map(t);if(!n)return null;e.push(n)}return new pu(e,this.active)}selectionInsideField(t){return t.ranges.every((t=>this.ranges.some((e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))))}}const mu=Xt.define({map:(t,e)=>t&&t.map(e)}),gu=Xt.define(),bu=ut.define({create:()=>null,update(t,e){for(let i of e.effects){if(i.is(mu))return i.value;if(i.is(gu)&&t)return new pu(t.ranges,i.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Sr.decorations.from(t,(t=>t?t.deco:ki.none))});function vu(t,e){return et.create(t.filter((t=>t.field==e)).map((t=>et.range(t.from,t.to))))}function wu(t){let e=fu.parse(t);return(t,i,n,s)=>{let{text:r,ranges:o}=e.instantiate(t.state,n),a={changes:{from:n,to:s,insert:x.of(r)},scrollIntoView:!0,annotations:i?[Cc.of(i),qt.userEvent.of("input.complete")]:void 0};if(o.length&&(a.selection=vu(o,0)),o.some((t=>t.field>0))){let e=new pu(o,0),i=a.effects=[mu.of(e)];void 0===t.state.field(bu,!1)&&i.push(Xt.appendConfig.of([bu,Qu,Pu,hu]))}t.dispatch(t.state.update(a))}}function Su(t){return({state:e,dispatch:i})=>{let n=e.field(bu,!1);if(!n||t<0&&0==n.active)return!1;let s=n.active+t,r=t>0&&!n.ranges.some((e=>e.field==s+t));return i(e.update({selection:vu(n.ranges,s),effects:mu.of(r?null:new pu(n.ranges,s)),scrollIntoView:!0})),!0}}const yu=[{key:"Tab",run:Su(1),shift:Su(-1)},{key:"Escape",run:({state:t,dispatch:e})=>!!t.field(bu,!1)&&(e(t.update({effects:mu.of(null)})),!0)}],xu=st.define({combine:t=>t.length?t[0]:yu}),Qu=gt.highest(Cr.compute([xu],(t=>t.facet(xu))));function ku(t,e){return Object.assign(Object.assign({},e),{apply:wu(t)})}const Pu=Sr.domEventHandlers({mousedown(t,e){let i,n=e.state.field(bu,!1);if(!n||null==(i=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let s=n.ranges.find((t=>t.from<=i&&t.to>=i));return!(!s||s.field==n.active)&&(e.dispatch({selection:vu(n.ranges,s.field),effects:mu.of(n.ranges.some((t=>t.field>s.field))?new pu(n.ranges,s.field):null),scrollIntoView:!0}),!0)}}),$u={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Zu=Xt.define({map(t,e){let i=e.mapPos(t,-1,W.TrackAfter);return null==i?void 0:i}}),Cu=new class extends Ut{};Cu.startSide=1,Cu.endSide=-1;const Tu=ut.define({create:()=>Kt.empty,update(t,e){if(t=t.map(e.changes),e.selection){let i=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=i.from&&t<=i.to})}for(let i of e.effects)i.is(Zu)&&(t=t.update({add:[Cu.range(i.value,i.value+1)]}));return t}});const Au="()[]{}<>";function Ru(t){for(let e=0;e<8;e+=2)if(Au.charCodeAt(e)==t)return Au.charAt(e+1);return D(t<128?t:t+1)}function Mu(t,e){return t.languageDataAt("closeBrackets",e)[0]||$u}const Xu="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),qu=Sr.inputHandler.of(((t,e,i,n)=>{if((Xu?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let s=t.state.selection.main;if(n.length>2||2==n.length&&1==j(_(n,0))||e!=s.from||i!=s.to)return!1;let r=function(t,e){let i=Mu(t,t.selection.main.head),n=i.brackets||$u.brackets;for(let s of n){let r=Ru(_(s,0));if(e==s)return r==s?_u(t,s,n.indexOf(s+s+s)>-1,i):Yu(t,s,r,i.before||$u.before);if(e==r&&Eu(t,t.selection.main.from))return Lu(t,s,r)}return null}(t.state,n);return!!r&&(t.dispatch(r),!0)})),Vu=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=Mu(t,t.selection.main.head).brackets||$u.brackets,n=null,s=t.changeByRange((e=>{if(e.empty){let n=function(t,e){let i=t.sliceString(e-2,e);return j(_(i,0))==i.length?i:i.slice(1)}(t.doc,e.head);for(let s of i)if(s==n&&zu(t.doc,e.head)==Ru(_(s,0)))return{changes:{from:e.head-s.length,to:e.head+s.length},range:et.cursor(e.head-s.length)}}return{range:n=e}}));return n||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!n}}];function Eu(t,e){let i=!1;return t.field(Tu).between(0,t.doc.length,(t=>{t==e&&(i=!0)})),i}function zu(t,e){let i=t.sliceString(e,e+2);return i.slice(0,j(_(i,0)))}function Yu(t,e,i,n){let s=null,r=t.changeByRange((r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:i,from:r.to}],effects:Zu.of(r.to+e.length),range:et.range(r.anchor+e.length,r.head+e.length)};let o=zu(t.doc,r.head);return!o||/\s/.test(o)||n.indexOf(o)>-1?{changes:{insert:e+i,from:r.head},effects:Zu.of(r.head+e.length),range:et.cursor(r.head+e.length)}:{range:s=r}}));return s?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Lu(t,e,i){let n=null,s=t.changeByRange((e=>e.empty&&zu(t.doc,e.head)==i?{changes:{from:e.head,to:e.head+i.length,insert:i},range:et.cursor(e.head+i.length)}:n={range:e}));return n?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function _u(t,e,i,n){let s=n.stringPrefixes||$u.stringPrefixes,r=null,o=t.changeByRange((n=>{if(!n.empty)return{changes:[{insert:e,from:n.from},{insert:e,from:n.to}],effects:Zu.of(n.to+e.length),range:et.range(n.anchor+e.length,n.head+e.length)};let o,a=n.head,l=zu(t.doc,a);if(l==e){if(Du(t,a))return{changes:{insert:e+e,from:a},effects:Zu.of(a+e.length),range:et.cursor(a+e.length)};if(Eu(t,a)){let n=i&&t.sliceDoc(a,a+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+n.length,insert:n},range:et.cursor(a+n.length)}}}else{if(i&&t.sliceDoc(a-2*e.length,a)==e+e&&(o=ju(t,a-2*e.length,s))>-1&&Du(t,o))return{changes:{insert:e+e+e+e,from:a},effects:Zu.of(a+e.length),range:et.cursor(a+e.length)};if(t.charCategorizer(a)(l)!=Dt.Word&&ju(t,a,s)>-1&&!function(t,e,i,n){let s=zl(t).resolveInner(e,-1),r=n.reduce(((t,e)=>Math.max(t,e.length)),0);for(let o=0;o<5;o++){let o=t.sliceDoc(s.from,Math.min(s.to,s.from+i.length+r)),a=o.indexOf(i);if(!a||a>-1&&n.indexOf(o.slice(0,a))>-1){let e=s.firstChild;for(;e&&e.from==s.from&&e.to-e.from>i.length+a;){if(t.sliceDoc(e.to-i.length,e.to)==i)return!1;e=e.firstChild}return!0}let l=s.to==e&&s.parent;if(!l)break;s=l}return!1}(t,a,e,s))return{changes:{insert:e+e,from:a},effects:Zu.of(a+e.length),range:et.cursor(a+e.length)}}return{range:r=n}}));return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Du(t,e){let i=zl(t).resolveInner(e+1);return i.parent&&i.from==e}function ju(t,e,i){let n=t.charCategorizer(e);if(n(t.sliceDoc(e-1,e))!=Dt.Word)return e;for(let s of i){let i=e-s.length;if(t.sliceDoc(i,e)==s&&n(t.sliceDoc(i-1,i))!=Dt.Word)return i}return-1}function Bu(t={}){return[lu,tu,Vc.of(t),ou,Iu,hu]}const Wu=[{key:"Ctrl-Space",run:su},{mac:"Alt-`",run:su},{key:"Escape",run:t=>{let e=t.state.field(tu,!1);return!(!e||!e.active.some((t=>0!=t.state)))&&(t.dispatch({effects:Mc.of(null)}),!0)}},{key:"ArrowDown",run:nu(!0)},{key:"ArrowUp",run:nu(!1)},{key:"PageDown",run:nu(!0,"page")},{key:"PageUp",run:nu(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field(tu,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.facet(Vc).defaultKeymap?[Wu]:[])));function Gu(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,i=arguments[1];if(i&&"object"==typeof i&&null==i.nodeType&&!Array.isArray(i)){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var s=i[n];"string"==typeof s?t.setAttribute(n,s):null!=s&&(t[n]=s)}e++}for(;et.normalize("NFKD"):t=>t;class Hu{constructor(t,e,i=0,n=t.length,s,r){this.test=r,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(i,n),this.bufferStart=i,this.normalize=s?t=>s(Nu(t)):Nu,this.query=this.normalize(e)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return _(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=D(t),i=this.bufferStart+this.bufferPos;this.bufferPos+=j(t);let n=this.normalize(e);if(n.length)for(let s=0,r=i;;s++){let t=n.charCodeAt(s),o=this.match(t,r,this.bufferPos+this.bufferStart);if(s==n.length-1){if(o)return this.value=o,this;break}r==i&&sthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let i=this.curLineStart+e.index,n=i+e[0].length;if(this.matchPos=sf(this.text,n+(i==n?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,n,e)))return this.value={from:i,to:n,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||n.to<=e){let n=new ef(e,t.sliceString(e,i));return tf.set(t,n),n}if(n.from==e&&n.to==i)return n;let{text:s,from:r}=n;return r>e&&(s=t.sliceString(e,r)+s,r=e),n.to=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,i=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,i,e)))return this.value={from:t,to:i,match:e},this.matchPos=sf(this.text,i+(t==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=ef.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function sf(t,e){if(e>=t.length)return e;let i,n=t.lineAt(e);for(;e=56320&&i<57344;)e++;return e}function rf(t){let e=Gu("input",{class:"cm-textfield",name:"line",value:String(t.state.doc.lineAt(t.state.selection.main.head).number)});function i(){let i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!i)return;let{state:n}=t,s=n.doc.lineAt(n.selection.main.head),[,r,o,a,l]=i,h=a?+a.slice(1):0,c=o?+o:s.number;if(o&&l){let t=c/100;r&&(t=t*("-"==r?-1:1)+s.number/n.doc.lines),c=Math.round(n.doc.lines*t)}else o&&r&&(c=c*("-"==r?-1:1)+s.number);let u=n.doc.line(Math.max(1,Math.min(n.doc.lines,c))),f=et.cursor(u.from+Math.max(0,Math.min(h,u.length)));t.dispatch({effects:[of.of(!1),Sr.scrollIntoView(f.from,{y:"center"})],selection:f}),t.focus()}return{dom:Gu("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:of.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),i())},onsubmit:t=>{t.preventDefault(),i()}},Gu("label",t.state.phrase("Go to line"),": ",e)," ",Gu("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}"undefined"!=typeof Symbol&&(Ju.prototype[Symbol.iterator]=nf.prototype[Symbol.iterator]=function(){return this});const of=Xt.define(),af=ut.define({create:()=>!0,update(t,e){for(let i of e.effects)i.is(of)&&(t=i.value);return t},provide:t=>Do.from(t,(t=>t?rf:null))}),lf=Sr.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),hf={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},cf=st.define({combine:t=>Gt(t,hf,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})});const uf=ki.mark({class:"cm-selectionMatch"}),ff=ki.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function df(t,e,i,n){return!(0!=i&&t(e.sliceDoc(i-1,i))==Dt.Word||n!=e.doc.length&&t(e.sliceDoc(n,n+1))==Dt.Word)}const Of=yn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(cf),{state:i}=t,n=i.selection;if(n.ranges.length>1)return ki.none;let s,r=n.main,o=null;if(r.empty){if(!e.highlightWordAroundCursor)return ki.none;let t=i.wordAt(r.head);if(!t)return ki.none;o=i.charCategorizer(r.head),s=i.sliceDoc(t.from,t.to)}else{let t=r.to-r.from;if(t200)return ki.none;if(e.wholeWords){if(s=i.sliceDoc(r.from,r.to),o=i.charCategorizer(r.head),!df(o,i,r.from,r.to)||!function(t,e,i,n){return t(e.sliceDoc(i,i+1))==Dt.Word&&t(e.sliceDoc(n-1,n))==Dt.Word}(o,i,r.from,r.to))return ki.none}else if(s=i.sliceDoc(r.from,r.to),!s)return ki.none}let a=[];for(let l of t.visibleRanges){let t=new Hu(i.doc,s,l.from,l.to);for(;!t.next().done;){let{from:n,to:s}=t.value;if((!o||df(o,i,n,s))&&(r.empty&&n<=r.from&&s>=r.to?a.push(ff.range(n,s)):(n>=r.to||s<=r.from)&&a.push(uf.range(n,s)),a.length>e.maxMatches))return ki.none}}return ki.set(a)}},{decorations:t=>t.decorations}),pf=Sr.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const mf=st.define({combine:t=>Gt(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new Wf(t),scrollToMatch:t=>Sr.scrollIntoView(t)})});class gf{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,Ku),!0}catch(Al){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,((t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"))}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new Qf(this):new wf(this)}getCursor(t,e=0,i){let n=t.doc?t:It.create({doc:t});return null==i&&(i=n.doc.length),this.regexp?Sf(this,n,e,i):vf(this,n,e,i)}}class bf{constructor(t){this.spec=t}}function vf(t,e,i,n){return new Hu(e.doc,t.unquoted,i,n,t.caseSensitive?void 0:t=>t.toLowerCase(),t.wholeWord?function(t,e){return(i,n,s,r)=>((r>i||r+s.length=e)return null;n.push(i.value)}return n}highlight(t,e,i,n){let s=vf(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,t.doc.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}function Sf(t,e,i,n){return new Ju(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(s=e.charCategorizer(e.selection.main.head),(t,e,i)=>!i[0].length||(s(yf(i.input,i.index))!=Dt.Word||s(xf(i.input,i.index))!=Dt.Word)&&(s(xf(i.input,i.index+i[0].length))!=Dt.Word||s(yf(i.input,i.index+i[0].length))!=Dt.Word)):void 0},i,n);var s}function yf(t,e){return t.slice(V(t,e,!1),e)}function xf(t,e){return t.slice(e,V(t,e))}class Qf extends bf{nextMatch(t,e,i){let n=Sf(this.spec,t,i,t.doc.length).next();return n.done&&(n=Sf(this.spec,t,0,e).next()),n.done?null:n.value}prevMatchInRange(t,e,i){for(let n=1;;n++){let s=Math.max(e,i-1e4*n),r=Sf(this.spec,t,s,i),o=null;for(;!r.next().done;)o=r.value;if(o&&(s==e||o.from>s+10))return o;if(s==e)return null}}prevMatch(t,e,i){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,i,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,((e,i)=>"$"==i?"$":"&"==i?t.match[0]:"0"!=i&&+i=e)return null;n.push(i.value)}return n}highlight(t,e,i,n){let s=Sf(this.spec,t,Math.max(0,e-250),Math.min(i+250,t.doc.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}const kf=Xt.define(),Pf=Xt.define(),$f=ut.define({create:t=>new Zf(Yf(t).create(),null),update(t,e){for(let i of e.effects)i.is(kf)?t=new Zf(i.value.create(),t.panel):i.is(Pf)&&(t=new Zf(t.query,i.value?zf:null));return t},provide:t=>Do.from(t,(t=>t.panel))});class Zf{constructor(t,e){this.query=t,this.panel=e}}const Cf=ki.mark({class:"cm-searchMatch"}),Tf=ki.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Af=yn.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field($f))}update(t){let e=t.state.field($f);(e!=t.startState.field($f)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return ki.none;let{view:i}=this,n=new Jt;for(let s=0,r=i.visibleRanges,o=r.length;sr[s+1].from-500;)a=r[++s].to;t.highlight(i.state,e,a,((t,e)=>{let s=i.state.selection.ranges.some((i=>i.from==t&&i.to==e));n.add(t,e,s?Tf:Cf)}))}return n.finish()}},{decorations:t=>t.decorations});function Rf(t){return e=>{let i=e.state.field($f,!1);return i&&i.query.spec.valid?t(e,i):Df(e)}}const Mf=Rf(((t,{query:e})=>{let{to:i}=t.state.selection.main,n=e.nextMatch(t.state,i,i);if(!n)return!1;let s=et.single(n.from,n.to),r=t.state.facet(mf);return t.dispatch({selection:s,effects:[Nf(t,n),r.scrollToMatch(s.main,t)],userEvent:"select.search"}),_f(t),!0})),Xf=Rf(((t,{query:e})=>{let{state:i}=t,{from:n}=i.selection.main,s=e.prevMatch(i,n,n);if(!s)return!1;let r=et.single(s.from,s.to),o=t.state.facet(mf);return t.dispatch({selection:r,effects:[Nf(t,s),o.scrollToMatch(r.main,t)],userEvent:"select.search"}),_f(t),!0})),qf=Rf(((t,{query:e})=>{let i=e.matchAll(t.state,1e3);return!(!i||!i.length)&&(t.dispatch({selection:et.create(i.map((t=>et.range(t.from,t.to)))),userEvent:"select.search.matches"}),!0)})),Vf=Rf(((t,{query:e})=>{let{state:i}=t,{from:n,to:s}=i.selection.main;if(i.readOnly)return!1;let r=e.nextMatch(i,n,n);if(!r)return!1;let o,a,l=[],h=[];if(r.from==n&&r.to==s&&(a=i.toText(e.getReplacement(r)),l.push({from:r.from,to:r.to,insert:a}),r=e.nextMatch(i,r.from,r.to),h.push(Sr.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(n).number)+"."))),r){let e=0==l.length||l[0].from>=r.to?0:r.to-r.from-a.length;o=et.single(r.from-e,r.to-e),h.push(Nf(t,r)),h.push(i.facet(mf).scrollToMatch(o.main,t))}return t.dispatch({changes:l,selection:o,effects:h,userEvent:"input.replace"}),!0})),Ef=Rf(((t,{query:e})=>{if(t.state.readOnly)return!1;let i=e.matchAll(t.state,1e9).map((t=>{let{from:i,to:n}=t;return{from:i,to:n,insert:e.getReplacement(t)}}));if(!i.length)return!1;let n=t.state.phrase("replaced $ matches",i.length)+".";return t.dispatch({changes:i,effects:Sr.announce.of(n),userEvent:"input.replace.all"}),!0}));function zf(t){return t.state.facet(mf).createPanel(t)}function Yf(t,e){var i,n,s,r,o;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let h=t.facet(mf);return new gf({search:(null!==(i=null==e?void 0:e.literal)&&void 0!==i?i:h.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(n=null==e?void 0:e.caseSensitive)&&void 0!==n?n:h.caseSensitive,literal:null!==(s=null==e?void 0:e.literal)&&void 0!==s?s:h.literal,regexp:null!==(r=null==e?void 0:e.regexp)&&void 0!==r?r:h.regexp,wholeWord:null!==(o=null==e?void 0:e.wholeWord)&&void 0!==o?o:h.wholeWord})}function Lf(t){let e=zo(t,zf);return e&&e.dom.querySelector("[main-field]")}function _f(t){let e=Lf(t);e&&e==t.root.activeElement&&e.select()}const Df=t=>{let e=t.state.field($f,!1);if(e&&e.panel){let i=Lf(t);if(i&&i!=t.root.activeElement){let n=Yf(t.state,e.query.spec);n.valid&&t.dispatch({effects:kf.of(n)}),i.focus(),i.select()}}else t.dispatch({effects:[Pf.of(!0),e?kf.of(Yf(t.state,e.query.spec)):Xt.appendConfig.of(Ff)]});return!0},jf=t=>{let e=t.state.field($f,!1);if(!e||!e.panel)return!1;let i=zo(t,zf);return i&&i.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Pf.of(!1)}),!0},Bf=[{key:"Mod-f",run:Df,scope:"editor search-panel"},{key:"F3",run:Mf,shift:Xf,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Mf,shift:Xf,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:jf,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let i=t.selection;if(i.ranges.length>1||i.main.empty)return!1;let{from:n,to:s}=i.main,r=[],o=0;for(let a=new Hu(t.doc,t.sliceDoc(n,s));!a.next().done;){if(r.length>1e3)return!1;a.value.from==n&&(o=r.length),r.push(et.range(a.value.from,a.value.to))}return e(t.update({selection:et.create(r,o),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:t=>{let e=zo(t,rf);if(!e){let i=[of.of(!0)];null==t.state.field(af,!1)&&i.push(Xt.appendConfig.of([af,lf])),t.dispatch({effects:i}),e=zo(t,rf)}return e&&e.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:i}=t.selection;if(i.some((t=>t.from===t.to)))return(({state:t,dispatch:e})=>{let{selection:i}=t,n=et.create(i.ranges.map((e=>t.wordAt(e.head)||et.cursor(e.head))),i.mainIndex);return!n.eq(i)&&(e(t.update({selection:n})),!0)})({state:t,dispatch:e});let n=t.sliceDoc(i[0].from,i[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=n)))return!1;let s=function(t,e){let{main:i,ranges:n}=t.selection,s=t.wordAt(i.head),r=s&&s.from==i.from&&s.to==i.to;for(let o=!1,a=new Hu(t.doc,e,n[n.length-1].to);;){if(a.next(),!a.done){if(o&&n.some((t=>t.from==a.value.from)))continue;if(r){let e=t.wordAt(a.value.from);if(!e||e.from!=a.value.from||e.to!=a.value.to)continue}return a.value}if(o)return null;a=new Hu(t.doc,e,0,Math.max(0,n[n.length-1].from-1)),o=!0}}(t,n);return!!s&&(e(t.update({selection:t.selection.addRange(et.range(s.from,s.to),!1),effects:Sr.scrollIntoView(s.to)})),!0)},preventDefault:!0}];let Wf=class{constructor(t){this.view=t;let e=this.query=t.state.field($f).query.spec;function i(t,e,i){return Gu("button",{class:"cm-button",name:t,onclick:e,type:"button"},i)}this.commit=this.commit.bind(this),this.searchField=Gu("input",{value:e.search,placeholder:If(t,"Find"),"aria-label":If(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Gu("input",{value:e.replace,placeholder:If(t,"Replace"),"aria-label":If(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Gu("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=Gu("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=Gu("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=Gu("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,i("next",(()=>Mf(t)),[If(t,"next")]),i("prev",(()=>Xf(t)),[If(t,"previous")]),i("select",(()=>qf(t)),[If(t,"all")]),Gu("label",null,[this.caseField,If(t,"match case")]),Gu("label",null,[this.reField,If(t,"regexp")]),Gu("label",null,[this.wordField,If(t,"by word")]),...t.state.readOnly?[]:[Gu("br"),this.replaceField,i("replace",(()=>Vf(t)),[If(t,"replace")]),i("replaceAll",(()=>Ef(t)),[If(t,"replace all")])],Gu("button",{name:"close",onclick:()=>jf(t),"aria-label":If(t,"close"),type:"button"},["×"])])}commit(){let t=new gf({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:kf.of(t)}))}keydown(t){var e,i,n;e=this.view,i=t,n="search-panel",qr(Ar(e.state),i,e,n)?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?Xf:Mf)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),Vf(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(kf)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(mf).top}};function If(t,e){return t.state.phrase(e)}const Gf=30,Uf=/[\s\.,:;?!]/;function Nf(t,{from:e,to:i}){let n=t.state.doc.lineAt(e),s=t.state.doc.lineAt(i).to,r=Math.max(n.from,e-Gf),o=Math.min(s,i+Gf),a=t.state.sliceDoc(r,o);if(r!=n.from)for(let l=0;la.length-Gf;l--)if(!Uf.test(a[l-1])&&Uf.test(a[l])){a=a.slice(0,l);break}return Sr.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${n.number}.`)}const Hf=Sr.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Ff=[$f,gt.low(Af),Hf];function Kf(t,e){return({state:i,dispatch:n})=>{if(i.readOnly)return!1;let s=t(e,i);return!!s&&(n(i.update(s)),!0)}}const Jf=Kf(rd,0),td=Kf(sd,0),ed=Kf(((t,e)=>sd(t,e,function(t){let e=[];for(let i of t.selection.ranges){let n=t.doc.lineAt(i.from),s=i.to<=n.to?n:t.doc.lineAt(i.to);s.from>n.from&&s.from==i.to&&(s=i.to==n.to+1?n:t.doc.lineAt(i.to-1));let r=e.length-1;r>=0&&e[r].to>n.from?e[r].to=s.to:e.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:s.to})}return e}(e))),0);function id(t,e){let i=t.languageDataAt("commentTokens",e);return i.length?i[0]:{}}const nd=50;function sd(t,e,i=e.selection.ranges){let n=i.map((t=>id(e,t.from).block));if(!n.every((t=>t)))return null;let s=i.map(((t,i)=>function(t,{open:e,close:i},n,s){let r,o,a=t.sliceDoc(n-nd,n),l=t.sliceDoc(s,s+nd),h=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(l)[0].length,u=a.length-h;if(a.slice(u-e.length,u)==e&&l.slice(c,c+i.length)==i)return{open:{pos:n-h,margin:h&&1},close:{pos:s+c,margin:c&&1}};s-n<=2*nd?r=o=t.sliceDoc(n,s):(r=t.sliceDoc(n,n+nd),o=t.sliceDoc(s-nd,s));let f=/^\s*/.exec(r)[0].length,d=/\s*$/.exec(o)[0].length,O=o.length-d-i.length;return r.slice(f,f+e.length)==e&&o.slice(O,O+i.length)==i?{open:{pos:n+f+e.length,margin:/\s/.test(r.charAt(f+e.length))?1:0},close:{pos:s-d-i.length,margin:/\s/.test(o.charAt(O-1))?1:0}}:null}(e,n[i],t.from,t.to)));if(2!=t&&!s.every((t=>t)))return{changes:e.changes(i.map(((t,e)=>s[e]?[]:[{from:t.from,insert:n[e].open+" "},{from:t.to,insert:" "+n[e].close}])))};if(1!=t&&s.some((t=>t))){let t=[];for(let e,i=0;is&&(r==o||o>l.from)){s=l.from;let t=/^\s*/.exec(l.text)[0].length,e=t==l.length,r=l.text.slice(t,t+a.length)==a?t:-1;tt.comment<0&&(!t.empty||t.single)))){let t=[];for(let{line:e,token:s,indent:r,empty:o,single:a}of n)!a&&o||t.push({from:e.from+r,insert:s+" "});let i=e.changes(t);return{changes:i,selection:e.selection.map(i,1)}}if(1!=t&&n.some((t=>t.comment>=0))){let t=[];for(let{line:e,comment:i,token:s}of n)if(i>=0){let n=e.from+i,r=n+s.length;" "==e.text[r-e.from]&&r++,t.push({from:n,to:r})}return{changes:t}}return null}const od=At.define(),ad=At.define(),ld=st.define(),hd=st.define({combine:t=>Gt(t,{minDepth:100,newGroupDelay:500,joinToEvent:(t,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,e)=>(i,n)=>t(i,n)||e(i,n)})}),cd=ut.define({create:()=>$d.empty,update(t,e){let i=e.state.facet(hd),n=e.annotation(od);if(n){let s=gd.fromTransaction(e,n.selection),r=n.side,o=0==r?t.undone:t.done;return o=s?bd(o,o.length,i.minDepth,s):yd(o,e.startState.selection),new $d(0==r?n.rest:o,0==r?o:n.rest)}let s=e.annotation(ad);if("full"!=s&&"before"!=s||(t=t.isolate()),!1===e.annotation(qt.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let r=gd.fromTransaction(e),o=e.annotation(qt.time),a=e.annotation(qt.userEvent);return r?t=t.addChanges(r,o,a,i,e):e.selection&&(t=t.addSelection(e.startState.selection,o,a,i.newGroupDelay)),"full"!=s&&"after"!=s||(t=t.isolate()),t},toJSON:t=>({done:t.done.map((t=>t.toJSON())),undone:t.undone.map((t=>t.toJSON()))}),fromJSON:t=>new $d(t.done.map(gd.fromJSON),t.undone.map(gd.fromJSON))});function ud(t={}){return[cd,hd.of(t),Sr.domEventHandlers({beforeinput(t,e){let i="historyUndo"==t.inputType?dd:"historyRedo"==t.inputType?Od:null;return!!i&&(t.preventDefault(),i(e))}})]}function fd(t,e){return function({state:i,dispatch:n}){if(!e&&i.readOnly)return!1;let s=i.field(cd,!1);if(!s)return!1;let r=s.pop(t,i,e);return!!r&&(n(r),!0)}}const dd=fd(0,!1),Od=fd(1,!1),pd=fd(0,!0),md=fd(1,!0);class gd{constructor(t,e,i,n,s){this.changes=t,this.effects=e,this.mapped=i,this.startSelection=n,this.selectionsAfter=s}setSelAfter(t){return new gd(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,i;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map((t=>t.toJSON()))}}static fromJSON(t){return new gd(t.changes&&G.fromJSON(t.changes),[],t.mapped&&I.fromJSON(t.mapped),t.startSelection&&et.fromJSON(t.startSelection),t.selectionsAfter.map(et.fromJSON))}static fromTransaction(t,e){let i=wd;for(let n of t.startState.facet(ld)){let e=n(t);e.length&&(i=i.concat(e))}return!i.length&&t.changes.empty?null:new gd(t.changes.invert(t.startState.doc),i,void 0,e||t.startState.selection,wd)}static selection(t){return new gd(void 0,wd,void 0,void 0,t)}}function bd(t,e,i,n){let s=e+1>i+20?e-i-1:0,r=t.slice(s,e);return r.push(n),r}function vd(t,e){return t.length?e.length?t.concat(e):t:e}const wd=[],Sd=200;function yd(t,e){if(t.length){let i=t[t.length-1],n=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-Sd));return n.length&&n[n.length-1].eq(e)?t:(n.push(e),bd(t,t.length-1,1e9,i.setSelAfter(n)))}return[gd.selection([e])]}function xd(t){let e=t[t.length-1],i=t.slice();return i[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),i}function Qd(t,e){if(!t.length)return t;let i=t.length,n=wd;for(;i;){let s=kd(t[i-1],e,n);if(s.changes&&!s.changes.empty||s.effects.length){let e=t.slice(0,i);return e[i-1]=s,e}e=s.mapped,i--,n=s.selectionsAfter}return n.length?[gd.selection(n)]:wd}function kd(t,e,i){let n=vd(t.selectionsAfter.length?t.selectionsAfter.map((t=>t.map(e))):wd,i);if(!t.changes)return gd.selection(n);let s=t.changes.map(e),r=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(r):r;return new gd(s,Xt.mapEffects(t.effects,e),o,t.startSelection.map(r),n)}const Pd=/^(input\.type|delete)($|\.)/;class $d{constructor(t,e,i=0,n=void 0){this.done=t,this.undone=e,this.prevTime=i,this.prevUserEvent=n}isolate(){return this.prevTime?new $d(this.done,this.undone):this}addChanges(t,e,i,n,s){let r=this.done,o=r[r.length-1];return r=o&&o.changes&&!o.changes.empty&&t.changes&&(!i||Pd.test(i))&&(!o.selectionsAfter.length&&e-this.prevTimei.push(t,e))),e.iterChangedRanges(((t,e,s,r)=>{for(let o=0;o=t&&s<=e&&(n=!0)}})),n}(o.changes,t.changes))||"input.type.compose"==i)?bd(r,r.length-1,n.minDepth,new gd(t.changes.compose(o.changes),vd(Xt.mapEffects(t.effects,o.changes),o.effects),o.mapped,o.startSelection,wd)):bd(r,r.length,n.minDepth,t),new $d(r,wd,e,i)}addSelection(t,e,i,n){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:wd;return s.length>0&&e-this.prevTimet.empty!=o.ranges[e].empty)).length)?this:new $d(yd(this.done,t),this.undone,e,i);var r,o}addMapping(t){return new $d(Qd(this.done,t),Qd(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,i){let n=0==t?this.done:this.undone;if(0==n.length)return null;let s=n[n.length-1],r=s.selectionsAfter[0]||e.selection;if(i&&s.selectionsAfter.length)return e.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:od.of({side:t,rest:xd(n),selection:r}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let i=1==n.length?wd:n.slice(0,n.length-1);return s.mapped&&(i=Qd(i,s.mapped)),e.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:od.of({side:t,rest:i,selection:r}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}$d.empty=new $d(wd,wd);const Zd=[{key:"Mod-z",run:dd,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Od,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Od,preventDefault:!0},{key:"Mod-u",run:pd,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:md,preventDefault:!0}];function Cd(t,e){return et.create(t.ranges.map(e),t.mainIndex)}function Td(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Ad({state:t,dispatch:e},i){let n=Cd(t.selection,i);return!n.eq(t.selection,!0)&&(e(Td(t,n)),!0)}function Rd(t,e){return et.cursor(e?t.to:t.from)}function Md(t,e){return Ad(t,(i=>i.empty?t.moveByChar(i,e):Rd(i,e)))}function Xd(t){return t.textDirectionAt(t.state.selection.main.head)==Ei.LTR}const qd=t=>Md(t,!Xd(t)),Vd=t=>Md(t,Xd(t));function Ed(t,e){return Ad(t,(i=>i.empty?t.moveByGroup(i,e):Rd(i,e)))}const zd=t=>Ed(t,!Xd(t)),Yd=t=>Ed(t,Xd(t));function Ld(t,e,i){if(e.type.prop(i))return!0;let n=e.to-e.from;return n&&(n>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function _d(t,e,i){let n,s,r=zl(t).resolveInner(e.head),o=i?pa.closedBy:pa.openedBy;for(let a=e.head;;){let e=i?r.childAfter(a):r.childBefore(a);if(!e)break;Ld(t,e,o)?r=e:a=i?e.to:e.from}return s=r.type.prop(o)&&(n=i?ic(t,r.from,1):ic(t,r.to,-1))&&n.matched?i?n.end.to:n.end.from:i?r.to:r.from,et.cursor(s,i?-1:1)}const Dd=t=>Ad(t,(e=>_d(t.state,e,!Xd(t)))),jd=t=>Ad(t,(e=>_d(t.state,e,Xd(t))));function Bd(t,e){return Ad(t,(i=>{if(!i.empty)return Rd(i,e);let n=t.moveVertically(i,e);return n.head!=i.head?n:t.moveToLineBoundary(i,e)}))}const Wd=t=>Bd(t,!1),Id=t=>Bd(t,!0);function Gd(t){let e,i=t.scrollDOM.clientHeighti.empty?t.moveVertically(i,e,n.height):Rd(i,e)));if(r.eq(s.selection))return!1;if(n.selfScroll){let e=t.coordsAtPos(s.selection.main.head),o=t.scrollDOM.getBoundingClientRect(),a=o.top+n.marginTop,l=o.bottom-n.marginBottom;e&&e.top>a&&e.bottomUd(t,!1),Hd=t=>Ud(t,!0);function Fd(t,e,i){let n=t.lineBlockAt(e.head),s=t.moveToLineBoundary(e,i);if(s.head==e.head&&s.head!=(i?n.to:n.from)&&(s=t.moveToLineBoundary(e,i,!1)),!i&&s.head==n.from&&n.length){let i=/^\s*/.exec(t.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;i&&e.head!=n.from+i&&(s=et.cursor(n.from+i))}return s}const Kd=t=>Ad(t,(e=>Fd(t,e,!0))),Jd=t=>Ad(t,(e=>Fd(t,e,!1))),tO=t=>Ad(t,(e=>Fd(t,e,!Xd(t)))),eO=t=>Ad(t,(e=>Fd(t,e,Xd(t))));function iO(t,e){let i=Cd(t.state.selection,(t=>{let i=e(t);return et.range(t.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)}));return!i.eq(t.state.selection)&&(t.dispatch(Td(t.state,i)),!0)}function nO(t,e){return iO(t,(i=>t.moveByChar(i,e)))}const sO=t=>nO(t,!Xd(t)),rO=t=>nO(t,Xd(t));function oO(t,e){return iO(t,(i=>t.moveByGroup(i,e)))}const aO=t=>oO(t,!Xd(t)),lO=t=>oO(t,Xd(t)),hO=t=>iO(t,(e=>_d(t.state,e,!Xd(t)))),cO=t=>iO(t,(e=>_d(t.state,e,Xd(t))));function uO(t,e){return iO(t,(i=>t.moveVertically(i,e)))}const fO=t=>uO(t,!1),dO=t=>uO(t,!0);function OO(t,e){return iO(t,(i=>t.moveVertically(i,e,Gd(t).height)))}const pO=t=>OO(t,!1),mO=t=>OO(t,!0),gO=t=>iO(t,(e=>Fd(t,e,!0))),bO=t=>iO(t,(e=>Fd(t,e,!1))),vO=t=>iO(t,(e=>Fd(t,e,!Xd(t)))),wO=t=>iO(t,(e=>Fd(t,e,Xd(t)))),SO=({state:t,dispatch:e})=>(e(Td(t,{anchor:0})),!0),yO=({state:t,dispatch:e})=>(e(Td(t,{anchor:t.doc.length})),!0),xO=({state:t,dispatch:e})=>(e(Td(t,{anchor:t.selection.main.anchor,head:0})),!0),QO=({state:t,dispatch:e})=>(e(Td(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function kO(t,e){if(t.state.readOnly)return!1;let i="delete.selection",{state:n}=t,s=n.changeByRange((n=>{let{from:s,to:r}=n;if(s==r){let o=e(n);os&&(i="delete.forward",o=PO(t,o,!0)),s=Math.min(s,o),r=Math.max(r,o)}else s=PO(t,s,!1),r=PO(t,r,!0);return s==r?{range:n}:{changes:{from:s,to:r},range:et.cursor(s,se(t))))n.between(e,e,((t,n)=>{te&&(e=i?n:t)}));return e}const $O=(t,e,i)=>kO(t,(n=>{let s,r,o=n.from,{state:a}=t,l=a.doc.lineAt(o);if(i&&!e&&o>l.from&&o$O(t,!1,!0),CO=t=>$O(t,!0,!1),TO=(t,e)=>kO(t,(i=>{let n=i.head,{state:s}=t,r=s.doc.lineAt(n),o=s.charCategorizer(n);for(let t=null;;){if(n==(e?r.to:r.from)){n==i.head&&r.number!=(e?s.doc.lines:1)&&(n+=e?1:-1);break}let a=V(r.text,n-r.from,e)+r.from,l=r.text.slice(Math.min(n,a)-r.from,Math.max(n,a)-r.from),h=o(l);if(null!=t&&h!=t)break;" "==l&&n==i.head||(t=h),n=a}return n})),AO=t=>TO(t,!1),RO=t=>TO(t,!0),MO=t=>kO(t,(e=>{let i=t.lineBlockAt(e.head).to;return e.head=s.number){let t=e[e.length-1];t.to=r.to,t.ranges.push(n)}else e.push({from:s.from,to:r.to,ranges:[n]});i=r.number+1}return e}function qO(t,e,i){if(t.readOnly)return!1;let n=[],s=[];for(let r of XO(t)){if(i?r.to==t.doc.length:0==r.from)continue;let e=t.doc.lineAt(i?r.to+1:r.from-1),o=e.length+1;if(i){n.push({from:r.to,to:e.to},{from:r.from,insert:e.text+t.lineBreak});for(let e of r.ranges)s.push(et.range(Math.min(t.doc.length,e.anchor+o),Math.min(t.doc.length,e.head+o)))}else{n.push({from:e.from,to:r.from},{from:r.to,insert:t.lineBreak+e.text});for(let t of r.ranges)s.push(et.range(t.anchor-o,t.head-o))}}return!!n.length&&(e(t.update({changes:n,scrollIntoView:!0,selection:et.create(s,t.selection.mainIndex),userEvent:"move.line"})),!0)}function VO(t,e,i){if(t.readOnly)return!1;let n=[];for(let s of XO(t))i?n.push({from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}):n.push({from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)});return e(t.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const EO=zO(!1);function zO(t){return({state:e,dispatch:i})=>{if(e.readOnly)return!1;let n=e.changeByRange((i=>{let{from:n,to:s}=i,r=e.doc.lineAt(n),o=!t&&n==s&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let i,n=zl(t).resolveInner(e),s=n.childBefore(e),r=n.childAfter(e);return s&&r&&s.to<=e&&r.from>=e&&(i=s.type.prop(pa.closedBy))&&i.indexOf(r.name)>-1&&t.doc.lineAt(s.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(s.to,r.from))?{from:s.to,to:r.from}:null}(e,n);t&&(n=s=(s<=r.to?r:e.doc.lineAt(s)).to);let a=new ih(e,{simulateBreak:n,simulateDoubleBreak:!!o}),l=th(a,n);for(null==l&&(l=ce(/^\s*/.exec(e.doc.lineAt(n).text)[0],e.tabSize));sr.from&&n{let s=[];for(let o=n.from;o<=n.to;){let r=t.doc.lineAt(o);r.number>i&&(n.empty||n.to>r.from)&&(e(r,s,n),i=r.number),o=r.to+1}let r=t.changes(s);return{changes:s,range:et.range(r.mapPos(n.anchor,1),r.mapPos(n.head,1))}}))}const LO=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=Object.create(null),n=new ih(t,{overrideIndentation:t=>{let e=i[t];return null==e?-1:e}}),s=YO(t,((e,s,r)=>{let o=th(n,e.from);if(null==o)return;/\S/.test(e.text)||(o=0);let a=/^\s*/.exec(e.text)[0],l=Jl(t,o);(a!=l||r.from!t.readOnly&&(e(t.update(YO(t,((e,i)=>{i.push({from:e.from,insert:t.facet(Fl)})})),{userEvent:"input.indent"})),!0),DO=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(YO(t,((e,i)=>{let n=/^\s*/.exec(e.text)[0];if(!n)return;let s=ce(n,t.tabSize),r=0,o=Jl(t,Math.max(0,s-Kl(t)));for(;rqO(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>VO(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>qO(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>VO(t,e,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let i=t.selection,n=null;return i.ranges.length>1?n=et.create([i.main]):i.main.empty||(n=et.create([et.cursor(i.main.head)])),!!n&&(e(Td(t,n)),!0)}},{key:"Mod-Enter",run:zO(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let i=XO(t).map((({from:e,to:i})=>et.range(e,Math.min(i+1,t.doc.length))));return e(t.update({selection:et.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let i=Cd(t.selection,(e=>{let i=zl(t),n=i.resolveStack(e.from,1);if(e.empty){let t=i.resolveStack(e.from,-1);t.node.from>=n.node.from&&t.node.to<=n.node.to&&(n=t)}for(let t=n;t;t=t.next){let{node:i}=t;if((i.from=e.to||i.to>e.to&&i.from<=e.from)&&t.next)return et.range(i.to,i.from)}return e}));return!i.eq(t.selection)&&(e(Td(t,i)),!0)},preventDefault:!0},{key:"Mod-[",run:DO},{key:"Mod-]",run:_O},{key:"Mod-Alt-\\",run:LO},{key:"Shift-Mod-k",run:t=>{if(t.state.readOnly)return!1;let{state:e}=t,i=e.changes(XO(e).map((({from:t,to:i})=>(t>0?t--:i{let i;if(t.lineWrapping){let n=t.lineBlockAt(e.head),s=t.coordsAtPos(e.head,e.assoc||1);s&&(i=n.bottom+t.documentTop-s.bottom+t.defaultLineHeight/2)}return t.moveVertically(e,!0,i)})).map(i);return t.dispatch({changes:i,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>function(t,e){let i=!1,n=Cd(t.selection,(e=>{let n=ic(t,e.head,-1)||ic(t,e.head,1)||e.head>0&&ic(t,e.head-1,1)||e.head{let{state:e}=t,i=e.doc.lineAt(e.selection.main.from),n=id(t.state,i.from);return n.line?Jf(t):!!n.block&&ed(t)}},{key:"Alt-A",run:td},{key:"Ctrl-m",mac:"Shift-Alt-m",run:t=>(t.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:qd,shift:sO,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:zd,shift:aO,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:tO,shift:vO,preventDefault:!0},{key:"ArrowRight",run:Vd,shift:rO,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Yd,shift:lO,preventDefault:!0},{mac:"Cmd-ArrowRight",run:eO,shift:wO,preventDefault:!0},{key:"ArrowUp",run:Wd,shift:fO,preventDefault:!0},{mac:"Cmd-ArrowUp",run:SO,shift:xO},{mac:"Ctrl-ArrowUp",run:Nd,shift:pO},{key:"ArrowDown",run:Id,shift:dO,preventDefault:!0},{mac:"Cmd-ArrowDown",run:yO,shift:QO},{mac:"Ctrl-ArrowDown",run:Hd,shift:mO},{key:"PageUp",run:Nd,shift:pO},{key:"PageDown",run:Hd,shift:mO},{key:"Home",run:Jd,shift:bO,preventDefault:!0},{key:"Mod-Home",run:SO,shift:xO},{key:"End",run:Kd,shift:gO,preventDefault:!0},{key:"Mod-End",run:yO,shift:QO},{key:"Enter",run:EO,shift:EO},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:ZO,shift:ZO},{key:"Delete",run:CO},{key:"Mod-Backspace",mac:"Alt-Backspace",run:AO},{key:"Mod-Delete",mac:"Alt-Delete",run:RO},{mac:"Mod-Backspace",run:t=>kO(t,(e=>{let i=t.moveToLineBoundary(e,!1).head;return e.head>i?i:Math.max(0,e.head-1)}))},{mac:"Mod-Delete",run:t=>kO(t,(e=>{let i=t.moveToLineBoundary(e,!0).head;return e.headAd(t,(e=>et.cursor(t.lineBlockAt(e.head).from,1))),shift:t=>iO(t,(e=>et.cursor(t.lineBlockAt(e.head).from)))},{key:"Ctrl-e",run:t=>Ad(t,(e=>et.cursor(t.lineBlockAt(e.head).to,-1))),shift:t=>iO(t,(e=>et.cursor(t.lineBlockAt(e.head).to)))},{key:"Ctrl-d",run:CO},{key:"Ctrl-h",run:ZO},{key:"Ctrl-k",run:MO},{key:"Ctrl-Alt-h",run:AO},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:x.of(["",""])},range:et.cursor(t.from)})));return e(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let i=e.from,n=t.doc.lineAt(i),s=i==n.from?i-1:V(n.text,i-n.from,!1)+n.from,r=i==n.to?i+1:V(n.text,i-n.from,!0)+n.from;return{changes:{from:s,to:r,insert:t.doc.slice(i,r).append(t.doc.slice(s,i))},range:et.cursor(r)}}));return!i.changes.empty&&(e(t.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:Hd}].map((t=>({mac:t.key,run:t.run,shift:t.shift}))))),BO={key:"Tab",run:_O,shift:DO};class WO{constructor(t,e,i){this.from=t,this.to=e,this.diagnostic=i}}class IO{constructor(t,e,i){this.diagnostics=t,this.panel=e,this.selected=i}static init(t,e,i){let n=t,s=i.facet(np).markerFilter;s&&(n=s(n,i));let r=ki.set(n.map((t=>t.from==t.to||t.from==t.to-1&&i.doc.lineAt(t.from).to==t.from?ki.widget({widget:new op(t),diagnostic:t}).range(t.from):ki.mark({attributes:{class:"cm-lintRange cm-lintRange-"+t.severity+(t.markClass?" "+t.markClass:"")},diagnostic:t}).range(t.from,t.to))),!0);return new IO(r,e,GO(r))}}function GO(t,e=null,i=0){let n=null;return t.between(i,1e9,((t,i,{spec:s})=>{if(!e||s.diagnostic==e)return n=new WO(t,i,s.diagnostic),!1})),n}const UO=Xt.define(),NO=Xt.define(),HO=Xt.define(),FO=ut.define({create:()=>new IO(ki.none,null,null),update(t,e){if(e.docChanged&&t.diagnostics.size){let i=t.diagnostics.map(e.changes),n=null,s=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);n=GO(i,t.selected.diagnostic,s)||GO(i,null,s)}!i.size&&s&&e.state.facet(np).autoPanel&&(s=null),t=new IO(i,s,n)}for(let i of e.effects)if(i.is(UO)){let n=e.state.facet(np).autoPanel?i.value.length?lp.open:null:t.panel;t=IO.init(i.value,n,e.state)}else i.is(NO)?t=new IO(t.diagnostics,i.value?lp.open:null,t.selected):i.is(HO)&&(t=new IO(t.diagnostics,t.panel,i.value));return t},provide:t=>[Do.from(t,(t=>t.panel)),Sr.decorations.from(t,(t=>t.diagnostics))]}),KO=ki.mark({class:"cm-lintRange cm-lintRange-active"});function JO(t,e,i){let{diagnostics:n}=t.state.field(FO),s=[],r=2e8,o=0;n.between(e-(i<0?1:0),e+(i>0?1:0),((t,n,{spec:a})=>{e>=t&&e<=n&&(t==n||(e>t||i>0)&&(e({dom:tp(t,s)})}:null}function tp(t,e){return Gu("ul",{class:"cm-tooltip-lint"},e.map((e=>rp(t,e,!1))))}const ep=t=>{let e=t.state.field(FO,!1);return!(!e||!e.panel)&&(t.dispatch({effects:NO.of(!1)}),!0)},ip=[{key:"Mod-Shift-m",run:t=>{let e=t.state.field(FO,!1);var i,n;e&&e.panel||t.dispatch({effects:(i=t.state,n=[NO.of(!0)],i.field(FO,!1)?n:n.concat(Xt.appendConfig.of(up)))});let s=zo(t,lp.open);return s&&s.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field(FO,!1);if(!e)return!1;let i=t.state.selection.main,n=e.diagnostics.iter(i.to+1);return!(!n.value&&(n=e.diagnostics.iter(0),!n.value||n.from==i.from&&n.to==i.to))&&(t.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),!0)}}],np=st.define({combine:t=>Object.assign({sources:t.map((t=>t.source)).filter((t=>null!=t))},Gt(t.map((t=>t.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(t,e)=>t?e?i=>t(i)||e(i):t:e}))});function sp(t){let e=[];if(t)t:for(let{name:i}of t){for(let t=0;tt.toLowerCase()==n.toLowerCase()))){e.push(n);continue t}}e.push("")}return e}function rp(t,e,i){var n;let s=i?sp(e.actions):[];return Gu("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Gu("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),null===(n=e.actions)||void 0===n?void 0:n.map(((i,n)=>{let r=!1,o=n=>{if(n.preventDefault(),r)return;r=!0;let s=GO(t.state.field(FO).diagnostics,e);s&&i.apply(t,s.from,s.to)},{name:a}=i,l=s[n]?a.indexOf(s[n]):-1,h=l<0?a:[a.slice(0,l),Gu("u",a.slice(l,l+1)),a.slice(l+1)];return Gu("button",{type:"button",class:"cm-diagnosticAction",onclick:o,onmousedown:o,"aria-label":` Action: ${a}${l<0?"":` (access key "${s[n]})"`}.`},h)})),e.source&&Gu("div",{class:"cm-diagnosticSource"},e.source))}class op extends xi{constructor(t){super(),this.diagnostic=t}eq(t){return t.diagnostic==this.diagnostic}toDOM(){return Gu("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class ap{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=rp(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class lp{constructor(t){this.view=t,this.items=[];this.list=Gu("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:e=>{if(27==e.keyCode)ep(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:i}=this.items[this.selectedIndex],n=sp(i.actions);for(let s=0;s{for(let e=0;eep(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(FO).selected;if(!t)return-1;for(let e=0;e{let a,l=-1;for(let e=i;ei&&(this.items.splice(i,l-i),n=!0)),e&&a.diagnostic==e.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),s=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),i++}));i({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{let i=e.height/this.list.offsetHeight;t.tope.bottom&&(this.list.scrollTop+=(t.bottom-e.bottom)/i)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),n&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;t!=i.dom;)e();t=i.dom.nextSibling}else this.list.insertBefore(i.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=GO(this.view.state.field(FO).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:HO.of(e)})}static open(t){return new lp(t)}}function hp(t){return function(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}(``,'width="6" height="3"')}const cp=Sr.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:hp("#d11")},".cm-lintRange-warning":{backgroundImage:hp("orange")},".cm-lintRange-info":{backgroundImage:hp("#999")},".cm-lintRange-hint":{backgroundImage:hp("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),up=[FO,Sr.decorations.compute([FO],(t=>{let{selected:e,panel:i}=t.field(FO);return e&&i&&e.from!=e.to?ki.set([KO.range(e.from,e.to)]):ki.none})),Xo(JO,{hideOn:function(t,e){let i=e.pos,n=e.end||i,s=t.state.facet(np).hideOn(t,i,n);if(null!=s)return s;let r=t.startState.doc.lineAt(e.pos);return!(!t.effects.some((t=>t.is(UO)))&&!t.changes.touchesRange(r.from,Math.max(r.to,n)))}}),cp];var fp={};class dp{constructor(t,e,i,n,s,r,o,a,l,h=0,c){this.p=t,this.stack=e,this.state=i,this.reducePos=n,this.pos=s,this.score=r,this.buffer=o,this.bufferBase=a,this.curContext=l,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter(((t,e)=>e%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,i=0){let n=t.parser.context;return new dp(t,[],e,i,i,0,[],0,n?new Op(n,n.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let i=t>>19,n=65535&t,{parser:s}=this.p,r=this.reducePos=2e3&&!(null===(e=this.p.parser.nodeSet.types[n])||void 0===e?void 0:e.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=h):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(n,l)}storeNode(t,e,i,n=4,s=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==t.buffer[n-4]&&t.buffer[n-1]>-1){if(e==i)return;if(t.buffer[n-2]>=e)return void(t.buffer[n-2]=i)}}if(s&&this.pos!=i){let s=this.buffer.length;if(s>0&&0!=this.buffer[s-4]){let t=!1;for(let e=s;e>0&&this.buffer[e-2]>i;e-=4)if(this.buffer[e-1]>=0){t=!0;break}if(t)for(;s>0&&this.buffer[s-2]>i;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,n>4&&(n-=4)}this.buffer[s]=t,this.buffer[s+1]=e,this.buffer[s+2]=i,this.buffer[s+3]=n}else this.buffer.push(t,e,i,n)}shift(t,e,i,n){if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=n,this.shiftContext(e,i),e<=this.p.parser.maxNode&&this.buffer.push(e,i,n,4);else{let s=t,{parser:r}=this.p;(n>this.pos||e<=r.maxNode)&&(this.pos=n,r.stateFlag(s,1)||(this.reducePos=n)),this.pushState(s,i),this.shiftContext(e,i),e<=r.maxNode&&this.buffer.push(e,i,n,4)}}apply(t,e,i,n){65536&t?this.reduce(t):this.shift(t,e,i,n)}useNode(t,e){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=t)&&(this.p.reused.push(t),i++);let n=this.pos;this.reducePos=this.pos=n+t.length,this.pushState(e,n),this.buffer.push(i,n,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let i=t.buffer.slice(e),n=t.bufferBase+e;for(;t&&n==t.bufferBase;)t=t.parent;return new dp(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,n,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let i=t<=this.p.parser.maxNode;i&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new pp(this);;){let i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==i)return!1;if(!(65536&i))return!0;e.reduce(i)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let n,s=0;s1&e&&t==n))||i.push(e[t],n)}e=i}let i=[];for(let n=0;n>19,n=65535&e,s=this.stack.length-3*i;if(s<0||t.getGoto(this.stack[s],n,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],i=(n,s)=>{if(!e.includes(n))return e.push(n),t.allActions(n,(e=>{if(393216&e);else if(65536&e){let i=(e>>19)-s;if(i>1){let n=65535&e,s=this.stack.length-3*i;if(s>=0&&t.getGoto(this.stack[s],n,!1)>=0)return i<<19|65536|n}}else{let t=i(e,s+1);if(null!=t)return t}}))};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Op{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class pp{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,i=t>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);let n=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=n}}class mp{constructor(t,e,i){this.stack=t,this.pos=e,this.index=i,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new mp(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new mp(this.stack,this.pos,this.index)}}function gp(t,e=Uint16Array){if("string"!=typeof t)return t;let i=null;for(let n=0,s=0;n=92&&e--,e>=34&&e--;let s=e-32;if(s>=46&&(s-=46,i=!0),r+=s,i)break;r*=46}i?i[s++]=r:i=new e(r)}return i}class bp{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const vp=new bp;class wp{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=vp,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let i=this.range,n=this.rangeIndex,s=this.pos+t;for(;si.to:s>=i.to;){if(n==this.ranges.length-1)return null;let t=this.ranges[++n];s+=t.from-i.to,i=t}return s}clipPos(t){if(t>=this.range.from&&tt)return Math.max(t,e.from);return this.end}peek(t){let e,i,n=this.chunkOff+t;if(n>=0&&n=this.chunk2Pos&&en.to&&(this.chunk2=this.chunk2.slice(0,n.to-e)),i=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),i}acceptToken(t,e=0){let i=e?this.resolveOffset(e,-1):this.pos;if(null==i||i=this.chunk2Pos&&this.posthis.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=vp,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let i="";for(let n of this.ranges){if(n.from>=e)break;n.to>t&&(i+=this.input.read(Math.max(n.from,t),Math.min(n.to,e)))}return i}}class Sp{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:i}=e.p;Qp(this.data,t,e,this.id,i.data,i.tokenPrecTable)}}Sp.prototype.contextual=Sp.prototype.fallback=Sp.prototype.extend=!1;class yp{constructor(t,e,i){this.precTable=e,this.elseToken=i,this.data="string"==typeof t?gp(t):t}token(t,e){let i=t.pos,n=0;for(;;){let i=t.next<0,s=t.resolveOffset(1,1);if(Qp(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(null==this.elseToken)return;if(i||n++,null==s)break;t.reset(s,t.token)}n&&(t.reset(i,t.token),t.acceptToken(this.elseToken,n))}}yp.prototype.contextual=Sp.prototype.fallback=Sp.prototype.extend=!1;class xp{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function Qp(t,e,i,n,s,r){let o=0,a=1<0){let i=t[u];if(l.allows(i)&&(-1==e.token.value||e.token.value==i||Pp(i,e.token.value,s,r))){e.acceptToken(i);break}}let n=e.next,h=0,c=t[o+2];if(!(e.next<0&&c>h&&65535==t[i+3*c-3])){for(;h>1,r=i+s+(s<<1),a=t[r],l=t[r+1]||65536;if(n=l)){o=t[r+2],e.advance();continue t}h=s+1}}break}o=t[i+3*c-1]}}function kp(t,e,i){for(let n,s=e;65535!=(n=t[s]);s++)if(n==i)return s-e;return-1}function Pp(t,e,i,n){let s=kp(i,n,e);return s<0||kp(i,n,t)e)&&!n.type.isError)return i<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(t.length,Math.max(n.from+1,e+25));if(i<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return i<0?0:t.length}}let Tp=class{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?Cp(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?Cp(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(tt)return this.nextStart=r,null;if(s instanceof xa){if(r==t){if(r=Math.max(this.safeFrom,t)&&(this.trees.push(s),this.start.push(r),this.index.push(0))}else this.index[e]++,this.nextStart=r+s.length}}};class Ap{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map((t=>new bp))}getActions(t){let e=0,i=null,{parser:n}=t.p,{tokenizers:s}=n,r=n.stateSlot(t.state,3),o=t.curContext?t.curContext.hash:0,a=0;for(let l=0;lh.end+25&&(a=Math.max(h.lookAhead,a)),0!=h.value)){let s=e;if(h.extended>-1&&(e=this.addActions(t,h.extended,h.end,e)),e=this.addActions(t,h.value,h.end,e),!n.extend&&(i=h,e>s))break}}for(;this.actions.length>e;)this.actions.pop();return a&&t.setLookAhead(a),i||t.pos!=this.stream.end||(i=new bp,i.value=t.p.parser.eofTerm,i.start=i.end=t.pos,e=this.addActions(t,i.value,i.end,e)),this.mainToken=i,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new bp,{pos:i,p:n}=t;return e.start=i,e.end=Math.min(i+1,n.stream.end),e.value=i==n.stream.end?n.parser.eofTerm:0,e}updateCachedToken(t,e,i){let n=this.stream.clipPos(i.pos);if(e.token(this.stream.reset(n,t),i),t.value>-1){let{parser:e}=i.p;for(let n=0;n=0&&i.p.parser.dialect.allows(s>>1)){1&s?t.extended=s>>1:t.value=s>>1;break}}}else t.value=0,t.end=this.stream.clipPos(n+1)}putAction(t,e,i,n){for(let s=0;s4*t.bufferLength?new Tp(i,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,i=this.stacks,n=this.minStackPos,s=this.stacks=[];if(this.bigReductionCount>300&&1==i.length){let[t]=i;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;rn)s.push(o);else{if(this.advanceStack(o,s,i))continue;{t||(t=[],e=[]),t.push(o);let i=this.tokens.getMainToken(o);e.push(i.value,i.end)}}break}}if(!s.length){let e=t&&function(t){let e=null;for(let i of t){let t=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=t&&i.pos>t)&&i.p.parser.stateFlag(i.state,2)&&(!e||e.scorethis.stoppedAt?t[0]:this.runRecovery(t,e,s);if(i)return $p&&console.log("Force-finish "+this.stackID(i)),this.stackToTree(i.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(s.length>t)for(s.sort(((t,e)=>e.score-t.score));s.length>t;)s.pop();s.some((t=>t.reducePos>n))&&this.recovering--}else if(s.length>1){t:for(let t=0;t500&&n.buffer.length>500){if(!((e.score-n.score||e.buffer.length-n.buffer.length)>0)){s.splice(t--,1);continue t}s.splice(i--,1)}}}s.length>12&&s.splice(12,s.length-12)}this.minStackPos=s[0].pos;for(let r=1;r ":"";if(null!=this.stoppedAt&&n>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,i=e?t.curContext.hash:0;for(let o=this.fragments.nodeAt(n);o;){let n=this.parser.nodeSet.types[o.type.id]==o.type?s.getGoto(t.state,o.type.id):-1;if(n>-1&&o.length&&(!e||(o.prop(pa.contextHash)||0)==i))return t.useNode(o,n),$p&&console.log(r+this.stackID(t)+` (via reuse of ${s.getName(o.type.id)})`),!0;if(!(o instanceof xa)||0==o.children.length||o.positions[0]>0)break;let a=o.children[0];if(!(a instanceof xa&&0==o.positions[0]))break;o=a}}let o=s.stateSlot(t.state,4);if(o>0)return t.reduce(o),$p&&console.log(r+this.stackID(t)+` (via always-reduce ${s.getName(65535&o)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let a=this.tokens.getActions(t);for(let l=0;ln?e.push(f):i.push(f)}return!1}advanceFully(t,e){let i=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>i)return Mp(t,e),!0}}runRecovery(t,e,i){let n=null,s=!1;for(let r=0;r ":"";if(o.deadEnd){if(s)continue;if(s=!0,o.restart(),$p&&console.log(h+this.stackID(o)+" (restarted)"),this.advanceFully(o,i))continue}let c=o.split(),u=h;for(let t=0;c.forceReduce()&&t<10;t++){if($p&&console.log(u+this.stackID(c)+" (via force-reduce)"),this.advanceFully(c,i))break;$p&&(u=this.stackID(c)+" -> ")}for(let t of o.recoverByInsert(a))$p&&console.log(h+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,i);this.stream.end>o.pos?(l==o.pos&&(l++,a=0),o.recoverByDelete(a,l),$p&&console.log(h+this.stackID(o)+` (via recover-delete ${this.parser.getName(a)})`),Mp(o,i)):(!n||n.scoret;class Vp{constructor(t){this.start=t.start,this.shift=t.shift||qp,this.reduce=t.reduce||qp,this.reuse=t.reuse||qp,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class Ep extends ja{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let o=0;ot.topRules[e][1])),n=[];for(let o=0;o=0)s(i,t,o[e++]);else{let n=o[e+-i];for(let r=-i;r>0;r--)s(o[e++],t,n);e++}}}this.nodeSet=new va(e.map(((e,s)=>ba.define({name:s>=this.minRepeatTerm?void 0:e,id:s,props:n[s],top:i.indexOf(s)>-1,error:0==s,skipped:t.skippedNodes&&t.skippedNodes.indexOf(s)>-1})))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=fa;let r=gp(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;o"number"==typeof t?new Sp(r,t):t)),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,i){let n=new Rp(this,t,e,i);for(let s of this.wrappers)n=s(n,t,e,i);return n}getGoto(t,e,i=!1){let n=this.goto;if(e>=n[0])return-1;for(let s=n[e+1];;){let e=n[s++],r=1&e,o=n[s++];if(r&&i)return o;for(let i=s+(e>>1);s0}validAction(t,e){return!!this.allActions(t,(t=>t==e||null))}allActions(t,e){let i=this.stateSlot(t,4),n=i?e(i):void 0;for(let s=this.stateSlot(t,1);null==n;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=zp(this.data,s+2)}n=e(zp(this.data,s+1))}return n}nextStates(t){let e=[];for(let i=this.stateSlot(t,1);;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=zp(this.data,i+2)}if(!(1&this.data[i+2])){let t=this.data[i+1];e.some(((e,i)=>1&i&&e==t))||e.push(this.data[i],t)}}return e}configure(t){let e=Object.assign(Object.create(Ep.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let i=this.topRules[t.top];if(!i)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=i}return t.tokenizers&&(e.tokenizers=this.tokenizers.map((e=>{let i=t.tokenizers.find((t=>t.from==e));return i?i.to:e}))),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map(((i,n)=>{let s=t.specializers.find((t=>t.from==i.external));if(!s)return i;let r=Object.assign(Object.assign({},i),{external:s.to});return e.specializers[n]=Yp(r),r}))),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),i=e.map((()=>!1));if(t)for(let s of t.split(" ")){let t=e.indexOf(s);t>=0&&(i[t]=!0)}let n=null;for(let s=0;st.external(i,n)<<1|e}return t.get}const Lp=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],_p=new Vp({start:!1,shift:(t,e)=>5==e||6==e||316==e?t:317==e,strict:!1}),Dp=new xp(((t,e)=>{let{next:i}=t;(125==i||-1==i||e.context)&&t.acceptToken(314)}),{contextual:!0,fallback:!0}),jp=new xp(((t,e)=>{let i,{next:n}=t;Lp.indexOf(n)>-1||(47!=n||47!=(i=t.peek(1))&&42!=i)&&(125==n||59==n||-1==n||e.context||t.acceptToken(312))}),{contextual:!0}),Bp=new xp(((t,e)=>{91!=t.next||e.context||t.acceptToken(313)}),{contextual:!0}),Wp=new xp(((t,e)=>{let{next:i}=t;if(43==i||45==i){if(t.advance(),i==t.next){t.advance();let i=!e.context&&e.canShift(1);t.acceptToken(i?1:2)}}else 63==i&&46==t.peek(1)&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(3))}),{contextual:!0});function Ip(t,e){return t>=65&&t<=90||t>=97&&t<=122||95==t||t>=192||!e&&t>=48&&t<=57}const Gp=new xp(((t,e)=>{if(60!=t.next||!e.dialectEnabled(0))return;if(t.advance(),47==t.next)return;let i=0;for(;Lp.indexOf(t.next)>-1;)t.advance(),i++;if(Ip(t.next,!0)){for(t.advance(),i++;Ip(t.next,!1);)t.advance(),i++;for(;Lp.indexOf(t.next)>-1;)t.advance(),i++;if(44==t.next)return;for(let e=0;;e++){if(7==e){if(!Ip(t.next,!0))return;break}if(t.next!="extends".charCodeAt(e))break;t.advance(),i++}}t.acceptToken(4,-i)})),Up=hl({"get set async static":Tl.modifier,"for while do if else switch try catch finally return throw break continue default case":Tl.controlKeyword,"in of await yield void typeof delete instanceof":Tl.operatorKeyword,"let var const using function class extends":Tl.definitionKeyword,"import export from":Tl.moduleKeyword,"with debugger as new":Tl.keyword,TemplateString:Tl.special(Tl.string),super:Tl.atom,BooleanLiteral:Tl.bool,this:Tl.self,null:Tl.null,Star:Tl.modifier,VariableName:Tl.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Tl.function(Tl.variableName),VariableDefinition:Tl.definition(Tl.variableName),Label:Tl.labelName,PropertyName:Tl.propertyName,PrivatePropertyName:Tl.special(Tl.propertyName),"CallExpression/MemberExpression/PropertyName":Tl.function(Tl.propertyName),"FunctionDeclaration/VariableDefinition":Tl.function(Tl.definition(Tl.variableName)),"ClassDeclaration/VariableDefinition":Tl.definition(Tl.className),PropertyDefinition:Tl.definition(Tl.propertyName),PrivatePropertyDefinition:Tl.definition(Tl.special(Tl.propertyName)),UpdateOp:Tl.updateOperator,"LineComment Hashbang":Tl.lineComment,BlockComment:Tl.blockComment,Number:Tl.number,String:Tl.string,Escape:Tl.escape,ArithOp:Tl.arithmeticOperator,LogicOp:Tl.logicOperator,BitOp:Tl.bitwiseOperator,CompareOp:Tl.compareOperator,RegExp:Tl.regexp,Equals:Tl.definitionOperator,Arrow:Tl.function(Tl.punctuation),": Spread":Tl.punctuation,"( )":Tl.paren,"[ ]":Tl.squareBracket,"{ }":Tl.brace,"InterpolationStart InterpolationEnd":Tl.special(Tl.brace),".":Tl.derefOperator,", ;":Tl.separator,"@":Tl.meta,TypeName:Tl.typeName,TypeDefinition:Tl.definition(Tl.typeName),"type enum interface implements namespace module declare":Tl.definitionKeyword,"abstract global Privacy readonly override":Tl.modifier,"is keyof unique infer":Tl.operatorKeyword,JSXAttributeValue:Tl.attributeValue,JSXText:Tl.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Tl.angleBracket,"JSXIdentifier JSXNameSpacedName":Tl.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Tl.attributeName,"JSXBuiltin/JSXIdentifier":Tl.standard(Tl.tagName)}),Np={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},Hp={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},Fp={__proto__:null,"<":187},Kp=Ep.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO'#JoO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#FzO9RQ`O'#FyOOQ!0Lf'#Jo'#JoOOQ!0Lb'#Jn'#JnO9WQ`O'#GtOOQ['#K['#K[O9cQ`O'#IUO9hQ!0LrO'#IVOOQ['#J['#J[OOQ['#IZ'#IZQ`QlOOQ`QlOOO9pQ!L^O'#DsO9wQlO'#D{O:OQlO'#D}O9^Q`O'#GpO:VQMhO'#CoO:eQ`O'#EkO:pQ`O'#EvO:uQMhO'#FdO;dQ`O'#GpOOQO'#K]'#K]O;iQ`O'#K]O;wQ`O'#GxO;wQ`O'#GyO;wQ`O'#G{O9^Q`O'#HOOVQ`O'#CeO>gQ`O'#H_O>oQ`O'#HeO>oQ`O'#HgO`QlO'#HiO>oQ`O'#HkO>oQ`O'#HnO>tQ`O'#HtO>yQ!0LsO'#HzO%[QlO'#H|O?UQ!0LsO'#IOO?aQ!0LsO'#IQO9hQ!0LrO'#ISO?lQ!0MxO'#CiO@nQpO'#DiQOQ`OOO%[QlO'#D}OAUQ`O'#EQO:VQMhO'#EkOAaQ`O'#EkOAlQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Dn'#DnOOQ!0Lb'#Jr'#JrO%[QlO'#JrOOQO'#Ju'#JuOOQO'#Id'#IdOBlQpO'#EdOOQ!0Lb'#Ec'#EcOOQ!0Lb'#Jy'#JyOChQ!0MSO'#EdOCrQpO'#ETOOQO'#Jt'#JtODWQpO'#JuOEeQpO'#ETOCrQpO'#EdPErO&2DjO'#CbPOOO)CDy)CDyOOOO'#I['#I[OE}O#tO,59UOOQ!0Lh,59U,59UOOOO'#I]'#I]OF]O&jO,59UOFkQ!L^O'#D`OOOO'#I_'#I_OFrO#@ItO,59xOOQ!0Lf,59x,59xOGQQlO'#I`OGeQ`O'#JpOIdQ!fO'#JpO+}QlO'#JpOIkQ`O,5:OOJRQ`O'#EmOJ`Q`O'#KPOJkQ`O'#KOOJkQ`O'#KOOJsQ`O,5;ZOJxQ`O'#J}OOQ!0Ln,5:Z,5:ZOKPQlO,5:ZOL}Q!0MxO,5:cOMnQ`O,5:kONXQ!0LrO'#J|ON`Q`O'#J{O9WQ`O'#J{ONtQ`O'#J{ON|Q`O,5;YO! RQ`O'#J{O!#WQ!fO'#JoOOQ!0Lh'#Ci'#CiO%[QlO'#EPO!#vQ!fO,5:pOOQS'#Jv'#JvOOQO-EpOOQ['#Jd'#JdOOQ[,5>q,5>qOOQ[-E[Q!0MxO,5:gO%[QlO,5:gO!@rQ!0MxO,5:iOOQO,5@w,5@wO!AcQMhO,5=[O!AqQ!0LrO'#JeO9RQ`O'#JeO!BSQ!0LrO,59ZO!B_QpO,59ZO!BgQMhO,59ZO:VQMhO,59ZO!BrQ`O,5;WO!BzQ`O'#H^O!C`Q`O'#KaO%[QlO,5;|O!9fQpO,5tQ`O'#HTO9^Q`O'#HVO!DwQ`O'#HVO:VQMhO'#HXO!D|Q`O'#HXOOQ[,5=m,5=mO!ERQ`O'#HYO!EdQ`O'#CoO!EiQ`O,59PO!EsQ`O,59PO!GxQlO,59POOQ[,59P,59PO!HYQ!0LrO,59PO%[QlO,59PO!JeQlO'#HaOOQ['#Hb'#HbOOQ['#Hc'#HcO`QlO,5=yO!J{Q`O,5=yO`QlO,5>PO`QlO,5>RO!KQQ`O,5>TO`QlO,5>VO!KVQ`O,5>YO!K[QlO,5>`OOQ[,5>f,5>fO%[QlO,5>fO9hQ!0LrO,5>hOOQ[,5>j,5>jO# fQ`O,5>jOOQ[,5>l,5>lO# fQ`O,5>lOOQ[,5>n,5>nO#!SQpO'#D[O%[QlO'#JrO#!uQpO'#JrO##PQpO'#DjO##bQpO'#DjO#%sQlO'#DjO#%zQ`O'#JqO#&SQ`O,5:TO#&XQ`O'#EqO#&gQ`O'#KQO#&oQ`O,5;[O#&tQpO'#DjO#'RQpO'#ESOOQ!0Lf,5:l,5:lO%[QlO,5:lO#'YQ`O,5:lO>tQ`O,5;VO!B_QpO,5;VO!BgQMhO,5;VO:VQMhO,5;VO#'bQ`O,5@^O#'gQ07dO,5:pOOQO-EzO+}QlO,5>zOOQO,5?Q,5?QO#*oQlO'#I`OOQO-E<^-E<^O#*|Q`O,5@[O#+UQ!fO,5@[O#+]Q`O,5@jOOQ!0Lf1G/j1G/jO%[QlO,5@kO#+eQ`O'#IfOOQO-EoQ`O1G3oO$4WQlO1G3qO$8[QlO'#HpOOQ[1G3t1G3tO$8iQ`O'#HvO>tQ`O'#HxOOQ[1G3z1G3zO$8qQlO1G3zO9hQ!0LrO1G4QOOQ[1G4S1G4SOOQ!0Lb'#G]'#G]O9hQ!0LrO1G4UO9hQ!0LrO1G4WO$tQ`O,5:UO!(vQlO,5:UO!B_QpO,5:UO$<}Q?MtO,5:UOOQO,5;],5;]O$=XQpO'#IaO$=oQ`O,5@]OOQ!0Lf1G/o1G/oO$=wQpO'#IgO$>RQ`O,5@lOOQ!0Lb1G0v1G0vO##bQpO,5:UOOQO'#Ic'#IcO$>ZQpO,5:nOOQ!0Ln,5:n,5:nO#']Q`O1G0WOOQ!0Lf1G0W1G0WO%[QlO1G0WOOQ!0Lf1G0q1G0qO>tQ`O1G0qO!B_QpO1G0qO!BgQMhO1G0qOOQ!0Lb1G5x1G5xO!BSQ!0LrO1G0ZOOQO1G0j1G0jO%[QlO1G0jO$>bQ!0LrO1G0jO$>mQ!0LrO1G0jO!B_QpO1G0ZOCrQpO1G0ZO$>{Q!0LrO1G0jOOQO1G0Z1G0ZO$?aQ!0MxO1G0jPOOO-EzO$?}Q`O1G5vO$@VQ`O1G6UO$@_Q!fO1G6VO9WQ`O,5?QO$@iQ!0MxO1G6SO%[QlO1G6SO$@yQ!0LrO1G6SO$A[Q`O1G6RO$A[Q`O1G6RO9WQ`O1G6RO$AdQ`O,5?TO9WQ`O,5?TOOQO,5?T,5?TO$AxQ`O,5?TO$)QQ`O,5?TOOQO-E[OOQ[,5>[,5>[O%[QlO'#HqO%<{Q`O'#HsOOQ[,5>b,5>bO9WQ`O,5>bOOQ[,5>d,5>dOOQ[7+)f7+)fOOQ[7+)l7+)lOOQ[7+)p7+)pOOQ[7+)r7+)rO%=QQpO1G5xO%=lQ?MtO1G0wO%=vQ`O1G0wOOQO1G/p1G/pO%>RQ?MtO1G/pO>tQ`O1G/pO!(vQlO'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQ`O7+&]O!B_QpO7+&]OOQO7+%u7+%uO$?aQ!0MxO7+&UOOQO7+&U7+&UO%[QlO7+&UO%>]Q!0LrO7+&UO!BSQ!0LrO7+%uO!B_QpO7+%uO%>hQ!0LrO7+&UO%>vQ!0MxO7++nO%[QlO7++nO%?WQ`O7++mO%?WQ`O7++mOOQO1G4o1G4oO9WQ`O1G4oO%?`Q`O1G4oOOQS7+%z7+%zO#']Q`O<|O%[QlO,5>|OOQO-E<`-E<`O%KlQ`O1G5yOOQ!0Lf<]OOQ[,5>_,5>_O&;hQ`O1G3|O9WQ`O7+&cO!(vQlO7+&cOOQO7+%[7+%[O&;mQ?MtO1G6VO>tQ`O7+%[OOQ!0Lf<tQ`O<tQ`O7+)hO'+dQ`O<{AN>{O%[QlOAN?[OOQO<{Oh%VOk+bO![']O%f+aO~O!d+dOa(XX![(XX'v(XX!Y(XX~Oa%lO![XO'v%lO~Oh%VO!i%cO~Oh%VO!i%cO(P%eO~O!d#vO#h(uO~Ob+oO%g+pO(P+lO(RTO(UUO!Z)UP~O!Y+qO`)TX~O[+uO~O`+vO~O![%}O(P%eO(Q!lO`)TP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(P#nO(RTO(UUO!Z)SP~Oe%{O~O%g!QO(P&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(RTO(UUO(]VO(k[O(ziO~O![!eO!r!gO$V!kO(P!dO~P!E{O`,cOa%lO'v%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!HeO!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(P&ha(R&ha(U&ha(]&ha(k&ha(z&ha!Z&ha&a&hab&ha&f&ha~O(P,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# kO!d-OO#],}Oh(fX!Y#eX!Z#eX!d(fX!i(fX~O!Y(fX!Z(fX~P#!^Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(RTO(UUO(a!mO~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(RTO(UUO(]VO(k[O(z=dO~O(P{Og'XX!Y'XX~P!+oO!Y.xOg(la~OSfO![3vO$c3wO~O!Z3{O~Os3|O~P#.uOa$lq!Y$lq'v$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9}O!V4OO~P!&fO!P4PO~O}){O'u)|O(v%POk'ea(u'ea!Y'ea#]'ea~Og'ea#}'ea~P%+ZO}){O'u)|Ok'ga(u'ga(v'ga!Y'ga#]'ga~Og'ga#}'ga~P%+|O(n$YO~P#.uO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(PU#>[#>|#?`#?f#?l#?z#@a#BQ#B`#Bg#C}#D]#Ey#FX#F_#Fe#Fk#Fu#F{#GR#G]#Go#GuPPPPPPPPPPP#G{PPPPPPP#Hp#Kw#Ma#Mh#MpPPP$%OP$%X$(Q$.k$.n$.q$/p$/s$/z$0SP$0Y$0]P$0y$0}$1u$3T$3Y$3pPP$3u$3{$4PP$4S$4W$4[$5W$5o$6W$6[$6_$6b$6h$6k$6o$6sR!|RoqOXst!Z#d%k&o&q&r&t,l,q1}2QY!vQ']-^1b5iQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*g$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0S*mQ1l,^R < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:_p,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[Up],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Sp(V!b'x0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(T#S$h&j'y0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Sp(V!b'y0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(R':f$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(V!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Sp(V!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(V!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(SpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(SpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Sp(V!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(V!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(V!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(V!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(V!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(V!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-v$?V_!Z(CdsBr$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Sp(V!b'x0/l$[#t(P,2j(a$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[jp,Bp,Wp,Gp,2,3,4,5,6,7,8,9,10,11,12,13,14,Dp,new yp("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new yp("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:t=>Np[t]||-1},{term:339,get:t=>Hp[t]||-1},{term:92,get:t=>Fp[t]||-1}],tokenPrec:15004}),Jp=[ku("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),ku("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),ku("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),ku("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),ku("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),ku("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),ku("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),ku("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),ku("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),ku('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),ku('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],tm=Jp.concat([ku("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),ku("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),ku("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),em=new _a,im=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function nm(t){return(e,i)=>{let n=e.node.getChild("VariableDefinition");return n&&i(n,t),!0}}const sm=["FunctionDeclaration"],rm={FunctionDeclaration:nm("function"),ClassDeclaration:nm("class"),ClassExpression:()=>!0,EnumDeclaration:nm("constant"),TypeAliasDeclaration:nm("type"),NamespaceDeclaration:nm("namespace"),VariableDefinition(t,e){t.matchContext(sm)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function om(t,e){let i=em.get(e);if(i)return i;let n=[],s=!0;function r(e,i){let s=t.sliceString(e.from,e.to);n.push({label:s,type:i})}return e.cursor(ya.IncludeAnonymous).iterate((e=>{if(s)s=!1;else if(e.name){let t=rm[e.name];if(t&&t(e,r)||im.has(e.name))return!1}else if(e.to-e.from>8192){for(let i of om(t,e.node))n.push(i);return!1}})),em.set(e,n),n}const am=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,lm=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function hm(t){let e=zl(t.state).resolveInner(t.pos,-1);if(lm.indexOf(e.name)>-1)return null;let i="VariableName"==e.name||e.to-e.from<20&&am.test(t.state.sliceDoc(e.from,e.to));if(!i&&!t.explicit)return null;let n=[];for(let s=e;s;s=s.parent)im.has(s.name)&&(n=n.concat(om(t.state.doc,s)));return{options:n,from:i?e.from:t.pos,validFor:am}}const cm=El.define({name:"javascript",parser:Kp.configure({props:[nh.add({IfStatement:uh({except:/^\s*({|else\b)/}),TryStatement:uh({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:t=>t.baseIndent,SwitchBody:t=>{let e=t.textAfter,i=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return t.baseIndent+(i?0:n?1:2)*t.unit},Block:hh({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":uh({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag":t=>t.column(t.node.from)+t.unit}),dh.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Oh,BlockComment:t=>({from:t.from+2,to:t.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),um={test:t=>/^JSX/.test(t.name),facet:Ml({commentTokens:{block:{open:"{/*",close:"*/}"}}})},fm=cm.configure({dialect:"ts"},"typescript"),dm=cm.configure({dialect:"jsx",props:[Xl.add((t=>t.isTop?[um]:void 0))]}),Om=cm.configure({dialect:"jsx ts",props:[Xl.add((t=>t.isTop?[um]:void 0))]},"typescript");let pm=t=>({label:t,type:"keyword"});const mm="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(pm),gm=mm.concat(["declare","implements","private","protected","public"].map(pm));function bm(t={}){let e=t.jsx?t.typescript?Om:dm:t.typescript?fm:cm,i=t.typescript?tm.concat(gm):Jp.concat(mm);return new Ul(e,[cm.data.of({autocomplete:(n=lm,s=kc(i),t=>{for(let e=zl(t.state).resolveInner(t.pos,-1);e;e=e.parent){if(n.indexOf(e.name)>-1)return null;if(e.type.isTop)break}return s(t)})}),cm.data.of({autocomplete:hm}),t.jsx?Sm:[]]);var n,s}function vm(t,e,i=t.length){for(let n=null==e?void 0:e.firstChild;n;n=n.nextSibling)if("JSXIdentifier"==n.name||"JSXBuiltin"==n.name||"JSXNamespacedName"==n.name||"JSXMemberExpression"==n.name)return t.sliceString(n.from,Math.min(n.to,i));return""}const wm="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),Sm=Sr.inputHandler.of(((t,e,i,n,s)=>{if((wm?t.composing:t.compositionStarted)||t.state.readOnly||e!=i||">"!=n&&"/"!=n||!cm.isActiveAt(t.state,e,-1))return!1;let r=s(),{state:o}=r,a=o.changeByRange((t=>{var e;let i,{head:s}=t,r=zl(o).resolveInner(s-1,-1);if("JSXStartTag"==r.name&&(r=r.parent),o.doc.sliceString(s-1,s)!=n||"JSXAttributeValue"==r.name&&r.to>s);else{if(">"==n&&"JSXFragmentTag"==r.name)return{range:t,changes:{from:s,insert:""}};if("/"==n&&"JSXStartCloseTag"==r.name){let t=r.parent,n=t.parent;if(n&&t.from==s-2&&((i=vm(o.doc,n.firstChild,s))||"JSXFragmentTag"==(null===(e=n.firstChild)||void 0===e?void 0:e.name))){let t=`${i}>`;return{range:et.cursor(s+t.length,-1),changes:{from:s,insert:t}}}}else if(">"==n){let e=function(t){for(;;){if("JSXOpenTag"==t.name||"JSXSelfClosingTag"==t.name||"JSXFragmentTag"==t.name)return t;if("JSXEscape"==t.name||!t.parent)return null;t=t.parent}}(r);if(e&&"JSXOpenTag"==e.name&&!/^\/?>|^<\//.test(o.doc.sliceString(s,s+2))&&(i=vm(o.doc,e,s)))return{range:t,changes:{from:s,insert:``}}}}return{range:t}}));return!a.changes.empty&&(t.dispatch([r,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)})),ym={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},xm={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Qm={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function km(t){return 9==t||10==t||13==t||32==t}let Pm=null,$m=null,Zm=0;function Cm(t,e){let i=t.pos+e;if(Zm==i&&$m==t)return Pm;let n=t.peek(e);for(;km(n);)n=t.peek(++e);let s="";for(;45==(r=n)||46==r||58==r||r>=65&&r<=90||95==r||r>=97&&r<=122||r>=161;)s+=String.fromCharCode(n),n=t.peek(++e);var r;return $m=t,Zm=i,Pm=s?s.toLowerCase():n==Tm||n==Am?void 0:null}const Tm=63,Am=33;function Rm(t,e){this.name=t,this.parent=e}const Mm=[6,10,7,8,9],Xm=new Vp({start:null,shift:(t,e,i,n)=>Mm.indexOf(e)>-1?new Rm(Cm(n,1)||"",t):t,reduce:(t,e)=>20==e&&t?t.parent:t,reuse(t,e,i,n){let s=e.type.id;return 6==s||36==s?new Rm(Cm(n,1)||"",t):t},strict:!1}),qm=new xp(((t,e)=>{if(60!=t.next)return void(t.next<0&&e.context&&t.acceptToken(57));t.advance();let i=47==t.next;i&&t.advance();let n=Cm(t,0);if(void 0===n)return;if(!n)return t.acceptToken(i?14:6);let s=e.context?e.context.name:null;if(i){if(n==s)return t.acceptToken(11);if(s&&xm[s])return t.acceptToken(57,-2);if(e.dialectEnabled(0))return t.acceptToken(12);for(let t=e.context;t;t=t.parent)if(t.name==n)return;t.acceptToken(13)}else{if("script"==n)return t.acceptToken(7);if("style"==n)return t.acceptToken(8);if("textarea"==n)return t.acceptToken(9);if(ym.hasOwnProperty(n))return t.acceptToken(10);s&&Qm[s]&&Qm[s][n]?t.acceptToken(57,-1):t.acceptToken(6)}}),{contextual:!0}),Vm=new xp((t=>{for(let e=0,i=0;;i++){if(t.next<0){i&&t.acceptToken(58);break}if(45==t.next)e++;else{if(62==t.next&&e>=2){i>=3&&t.acceptToken(58,-2);break}e=0}t.advance()}}));const Em=new xp(((t,e)=>{if(47==t.next&&62==t.peek(1)){let i=e.dialectEnabled(1)||function(t){for(;t;t=t.parent)if("svg"==t.name||"math"==t.name)return!0;return!1}(e.context);t.acceptToken(i?5:4,2)}else 62==t.next&&t.acceptToken(4,1)}));function zm(t,e,i){let n=2+t.length;return new xp((s=>{for(let r=0,o=0,a=0;;a++){if(s.next<0){a&&s.acceptToken(e);break}if(0==r&&60==s.next||1==r&&47==s.next||r>=2&&ro?s.acceptToken(e,-o):s.acceptToken(i,-(o-2));break}if((10==s.next||13==s.next)&&a){s.acceptToken(e,1);break}r=o=0}else o++;s.advance()}}))}const Ym=zm("script",54,1),Lm=zm("style",55,2),_m=zm("textarea",56,3),Dm=hl({"Text RawText":Tl.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":Tl.angleBracket,TagName:Tl.tagName,"MismatchedCloseTag/TagName":[Tl.tagName,Tl.invalid],AttributeName:Tl.attributeName,"AttributeValue UnquotedAttributeValue":Tl.attributeValue,Is:Tl.definitionOperator,"EntityReference CharacterReference":Tl.character,Comment:Tl.blockComment,ProcessingInst:Tl.processingInstruction,DoctypeDecl:Tl.documentMeta}),jm=Ep.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'pO$fO,59oOOO`,59o,59oO'xQ#|O,59qO'}Q#|O,59rOOO`-E7W-E7WO(SQ&rO'#CsOOQW'#DZ'#DZO(bQ&rO1G.wOOOa1G.w1G.wOOO`1G/Y1G/YO(mQ&rO1G/QOOOb1G/Q1G/QO(xQ&rO1G/TOOOd1G/T1G/TO)TQ&rO1G/WOOO`1G/W1G/WO)`Q&rO1G/YOOOa-E7[-E7[O)kQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)pQ#tO'#C|OOOd-E7^-E7^O)uQ#tO'#DPOOO`-E7_-E7_O)zQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O*PQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOO`7+$t7+$tOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rO*[Q#|O,59eO*aQ#|O,59hO*fQ#|O,59kOOO`1G/X1G/XO*kO7[O'#CvO*|OMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O+_O7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+pOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:",]~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OT}OhyO~OS!POT}OhyO~OS!ROT}OhyO~OS!TOT}OhyO~OS}OT}OhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Xm,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[Dm],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TakWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOb!R!RAwP;=`<%lAY!ZBRYkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbhSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbhSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXhSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYlhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_khS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_X`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!a`!cpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!a`!cp!dPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!a`!cpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!a`!cpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!a`!cpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!a`!cpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!a`!cpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!a`!cpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!a`!cpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!cpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO{PP!-nP;=`<%l!-Sq!-xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!a`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!a`!cpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!a`!cpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!a`!cpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!a`!cpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!a`!cpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let a=t.type.id;if(28==a)return Im(t,e,i);if(31==a)return Im(t,e,n);if(34==a)return Im(t,e,s);if(20==a&&r.length){let i,n=t.node,s=n.firstChild,o=s&&Wm(s,e);if(o)for(let t of r)if(t.tag==o&&(!t.attrs||t.attrs(i||(i=Bm(s,e))))){let e=n.lastChild,i=37==e.type.id?e.from:n.to;if(i>s.to)return{parser:t.parser,overlay:[{from:s.to,to:i}]}}}if(o&&23==a){let i,n=t.node;if(i=n.firstChild){let t=o[e.read(i.from,i.to)];if(t)for(let i of t){if(i.tagName&&i.tagName!=Wm(n.parent,e))continue;let t=n.lastChild;if(26==t.type.id){let e=t.from+1,n=t.lastChild,s=t.to-(n&&n.isError?0:1);if(s>e)return{parser:i.parser,overlay:[{from:e,to:s}]}}else if(27==t.type.id)return{parser:i.parser,overlay:[{from:t.from,to:t.to}]}}}}return null}))}const Um=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function Nm(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function Hm(t){return t>=48&&t<=57}const Fm=new xp(((t,e)=>{for(let i=!1,n=0,s=0;;s++){let{next:r}=t;if(Nm(r)||45==r||95==r||i&&Hm(r))!i&&(45!=r||s>0)&&(i=!0),n===s&&45==r&&n++,t.advance();else{if(92!=r||10==t.peek(1)){i&&t.acceptToken(40==r?100:2==n&&e.canShift(2)?2:101);break}t.advance(),t.next>-1&&t.advance(),i=!0}}})),Km=new xp((t=>{if(Um.includes(t.peek(-1))){let{next:e}=t;(Nm(e)||95==e||35==e||46==e||91==e||58==e&&Nm(t.peek(1))||45==e||38==e)&&t.acceptToken(99)}})),Jm=new xp((t=>{if(!Um.includes(t.peek(-1))){let{next:e}=t;if(37==e&&(t.advance(),t.acceptToken(1)),Nm(e)){do{t.advance()}while(Nm(t.next)||Hm(t.next));t.acceptToken(1)}}})),tg=hl({"AtKeyword import charset namespace keyframes media supports":Tl.definitionKeyword,"from to selector":Tl.keyword,NamespaceName:Tl.namespace,KeyframeName:Tl.labelName,KeyframeRangeName:Tl.operatorKeyword,TagName:Tl.tagName,ClassName:Tl.className,PseudoClassName:Tl.constant(Tl.className),IdName:Tl.labelName,"FeatureName PropertyName":Tl.propertyName,AttributeName:Tl.attributeName,NumberLiteral:Tl.number,KeywordQuery:Tl.keyword,UnaryQueryOp:Tl.operatorKeyword,"CallTag ValueName":Tl.atom,VariableName:Tl.variableName,Callee:Tl.operatorKeyword,Unit:Tl.unit,"UniversalSelector NestingSelector":Tl.definitionOperator,MatchOp:Tl.compareOperator,"ChildOp SiblingOp, LogicOp":Tl.logicOperator,BinOp:Tl.arithmeticOperator,Important:Tl.modifier,Comment:Tl.blockComment,ColorLiteral:Tl.color,"ParenthesizedContent StringLiteral":Tl.string,":":Tl.punctuation,"PseudoOp #":Tl.derefOperator,"; ,":Tl.separator,"( )":Tl.paren,"[ ]":Tl.squareBracket,"{ }":Tl.brace}),eg={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:138},ig={__proto__:null,"@import":118,"@media":142,"@charset":146,"@namespace":150,"@keyframes":156,"@supports":168},ng={__proto__:null,not:132,only:132},sg=Ep.deserialize({version:14,states:":jQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DTO$vQ[O'#DWOOQP'#Em'#EmO${QdO'#DgO%jQ[O'#DtO${QdO'#DvO%{Q[O'#DxO&WQ[O'#D{O&`Q[O'#ERO&nQ[O'#ETOOQS'#El'#ElOOQS'#EW'#EWQYQ[OOO&uQXO'#CdO'jQWO'#DcO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@[)C@[OOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E[O({QWO,58{O)TQ[O,59SO$qQ[O,59oO$vQ[O,59rO(aQ[O,59uO(aQ[O,59wO(aQ[O,59xO)`Q[O'#DbOOQS,58{,58{OOQP'#Ck'#CkOOQO'#DR'#DROOQP,59S,59SO)gQWO,59SO)lQWO,59SOOQP'#DV'#DVOOQP,59o,59oOOQO'#DX'#DXO)qQ`O,59rOOQS'#Cp'#CpO${QdO'#CqO)yQvO'#CsO+ZQtO,5:ROOQO'#Cx'#CxO)lQWO'#CwO+oQWO'#CyO+tQ[O'#DOOOQS'#Ep'#EpOOQO'#Dj'#DjO+|Q[O'#DqO,[QWO'#EtO&`Q[O'#DoO,jQWO'#DrOOQO'#Eu'#EuO)OQWO,5:`O,oQpO,5:bOOQS'#Dz'#DzO,wQWO,5:dO,|Q[O,5:dOOQO'#D}'#D}O-UQWO,5:gO-ZQWO,5:mO-cQWO,5:oOOQS-E8U-E8UO-kQdO,59}O-{Q[O'#E^O.YQWO,5;_O.YQWO,5;_POOO'#EV'#EVP.eO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO/[QXO,5:vOOQO-E8Y-E8YOOQS1G.g1G.gOOQP1G.n1G.nO)gQWO1G.nO)lQWO1G.nOOQP1G/Z1G/ZO/iQ`O1G/^O0SQXO1G/aO0jQXO1G/cO1QQXO1G/dO1hQWO,59|O1mQ[O'#DSO1tQdO'#CoOOQP1G/^1G/^O${QdO1G/^O1{QpO,59]OOQS,59_,59_O${QdO,59aO2TQWO1G/mOOQS,59c,59cO2YQ!bO,59eOOQS'#DP'#DPOOQS'#EY'#EYO2eQ[O,59jOOQS,59j,59jO2mQWO'#DjO2xQWO,5:VO2}QWO,5:]O&`Q[O,5:XO&`Q[O'#E_O3VQWO,5;`O3bQWO,5:ZO(aQ[O,5:^OOQS1G/z1G/zOOQS1G/|1G/|OOQS1G0O1G0OO3sQWO1G0OO3xQdO'#EOOOQS1G0R1G0ROOQS1G0X1G0XOOQS1G0Z1G0ZO4TQtO1G/iOOQO1G/i1G/iOOQO,5:x,5:xO4kQ[O,5:xOOQO-E8[-E8[O4xQWO1G0yPOOO-E8T-E8TPOOO1G.e1G.eOOQP7+$Y7+$YOOQP7+$x7+$xO${QdO7+$xOOQS1G/h1G/hO5TQXO'#ErO5[QWO,59nO5aQtO'#EXO6XQdO'#EoO6cQWO,59ZO6hQpO7+$xOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%X7+%XOOQS1G/P1G/PO6pQWO1G/POOQS-E8W-E8WOOQS1G/U1G/UO${QdO1G/qOOQO1G/w1G/wOOQO1G/s1G/sO6uQWO,5:yOOQO-E8]-E8]O7TQXO1G/xOOQS7+%j7+%jO7[QYO'#CsOOQO'#EQ'#EQO7gQ`O'#EPOOQO'#EP'#EPO7rQWO'#E`O7zQdO,5:jOOQS,5:j,5:jO8VQtO'#E]O${QdO'#E]O9WQdO7+%TOOQO7+%T7+%TOOQO1G0d1G0dO9kQpO<OAN>OO;]QdO,5:uOOQO-E8X-E8XOOQO<T![;'S%^;'S;=`%o<%lO%^l;TUo`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYo`#e[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[o`#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSt^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWjWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VU#bQOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSo`#[~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU]QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!Y^Oy%^z;'S%^;'S;=`%o<%lO%^dCoS|SOy%^z;'S%^;'S;=`%o<%lO%^bDQU!OQOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS!OQo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[![Qo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSq^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSp^Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!bQo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!TUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!S^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!RQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[Km,Jm,Fm,1,2,3,4,new yp("m~RRYZ[z{a~~g~aO#^~~dP!P!Qg~lO#_~~",28,105)],topRules:{StyleSheet:[0,4],Styles:[1,86]},specialized:[{term:100,get:t=>eg[t]||-1},{term:58,get:t=>ig[t]||-1},{term:101,get:t=>ng[t]||-1}],tokenPrec:1219});let rg=null;function og(){if(!rg&&"object"==typeof document&&document.body){let{style:t}=document.body,e=[],i=new Set;for(let n in t)"cssText"!=n&&"cssFloat"!=n&&"string"==typeof t[n]&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))),i.has(n)||(e.push(n),i.add(n)));rg=e.sort().map((t=>({type:"property",label:t})))}return rg||[]}const ag=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map((t=>({type:"class",label:t}))),lg=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map((t=>({type:"keyword",label:t}))).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((t=>({type:"constant",label:t})))),hg=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((t=>({type:"type",label:t}))),cg=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map((t=>({type:"keyword",label:t}))),ug=/^(\w[\w-]*|-\w[\w-]*|)$/,fg=/^-(-[\w-]*)?$/;const dg=new _a,Og=["Declaration"];function pg(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function mg(t,e,i){if(e.to-e.from>4096){let n=dg.get(e);if(n)return n;let s=[],r=new Set,o=e.cursor(ya.IncludeAnonymous);if(o.firstChild())do{for(let e of mg(t,o.node,i))r.has(e.label)||(r.add(e.label),s.push(e))}while(o.nextSibling());return dg.set(e,s),s}{let n=[],s=new Set;return e.cursor().iterate((e=>{var r;if(i(e)&&e.matchContext(Og)&&":"==(null===(r=e.node.nextSibling)||void 0===r?void 0:r.name)){let i=t.sliceString(e.from,e.to);s.has(i)||(s.add(i),n.push({label:i,type:"variable"}))}})),n}}const gg=t=>e=>{let{state:i,pos:n}=e,s=zl(i).resolveInner(n,-1),r=s.type.isError&&s.from==s.to-1&&"-"==i.doc.sliceString(s.from,s.to);if("PropertyName"==s.name||(r||"TagName"==s.name)&&/^(Block|Styles)$/.test(s.resolve(s.to).name))return{from:s.from,options:og(),validFor:ug};if("ValueName"==s.name)return{from:s.from,options:lg,validFor:ug};if("PseudoClassName"==s.name)return{from:s.from,options:ag,validFor:ug};if(t(s)||(e.explicit||r)&&function(t,e){var i;if(("("==t.name||t.type.isError)&&(t=t.parent||t),"ArgList"!=t.name)return!1;let n=null===(i=t.parent)||void 0===i?void 0:i.firstChild;return"Callee"==(null==n?void 0:n.name)&&"var"==e.sliceString(n.from,n.to)}(s,i.doc))return{from:t(s)||r?s.from:n,options:mg(i.doc,pg(s),t),validFor:fg};if("TagName"==s.name){for(let{parent:t}=s;t;t=t.parent)if("Block"==t.name)return{from:s.from,options:og(),validFor:ug};return{from:s.from,options:hg,validFor:ug}}if("AtKeyword"==s.name)return{from:s.from,options:cg,validFor:ug};if(!e.explicit)return null;let o=s.resolve(n),a=o.childBefore(n);return a&&":"==a.name&&"PseudoClassSelector"==o.name?{from:n,options:ag,validFor:ug}:a&&":"==a.name&&"Declaration"==o.name||"ArgList"==o.name?{from:n,options:lg,validFor:ug}:"Block"==o.name||"Styles"==o.name?{from:n,options:og(),validFor:ug}:null},bg=gg((t=>"VariableName"==t.name)),vg=El.define({name:"css",parser:sg.configure({props:[nh.add({Declaration:uh()}),dh.add({"Block KeyframeList":Oh})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function wg(){return new Ul(vg,vg.data.of({autocomplete:bg}))}const Sg=["_blank","_self","_top","_parent"],yg=["ascii","utf-8","utf-16","latin1","latin1"],xg=["get","post","put","delete"],Qg=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],kg=["true","false"],Pg={},$g={a:{attrs:{href:null,ping:null,type:null,media:null,target:Sg,hreflang:null}},abbr:Pg,address:Pg,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Pg,aside:Pg,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Pg,base:{attrs:{href:null,target:Sg}},bdi:Pg,bdo:Pg,blockquote:{attrs:{cite:null}},body:Pg,br:Pg,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Qg,formmethod:xg,formnovalidate:["novalidate"],formtarget:Sg,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Pg,center:Pg,cite:Pg,code:Pg,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Pg,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Pg,div:Pg,dl:Pg,dt:Pg,em:Pg,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Pg,figure:Pg,footer:Pg,form:{attrs:{action:null,name:null,"accept-charset":yg,autocomplete:["on","off"],enctype:Qg,method:xg,novalidate:["novalidate"],target:Sg}},h1:Pg,h2:Pg,h3:Pg,h4:Pg,h5:Pg,h6:Pg,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Pg,hgroup:Pg,hr:Pg,html:{attrs:{manifest:null}},i:Pg,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Qg,formmethod:xg,formnovalidate:["novalidate"],formtarget:Sg,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Pg,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Pg,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Pg,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:yg,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Pg,noscript:Pg,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Pg,param:{attrs:{name:null,value:null}},pre:Pg,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Pg,rt:Pg,ruby:Pg,samp:Pg,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:yg}},section:Pg,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Pg,source:{attrs:{src:null,type:null,media:null}},span:Pg,strong:Pg,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Pg,summary:Pg,sup:Pg,table:Pg,tbody:Pg,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Pg,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Pg,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Pg,time:{attrs:{datetime:null}},title:Pg,tr:Pg,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Pg,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Pg},Zg={accesskey:null,class:null,contenteditable:kg,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:kg,autocorrect:kg,autocapitalize:kg,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":kg,"aria-autocomplete":["inline","list","both","none"],"aria-busy":kg,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":kg,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":kg,"aria-hidden":kg,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":kg,"aria-multiselectable":kg,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":kg,"aria-relevant":null,"aria-required":kg,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Cg="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((t=>"on"+t));for(let yw of Cg)Zg[yw]=null;class Tg{constructor(t,e){this.tags=Object.assign(Object.assign({},$g),t),this.globalAttrs=Object.assign(Object.assign({},Zg),e),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function Ag(t,e,i=t.length){if(!e)return"";let n=e.firstChild,s=n&&n.getChild("TagName");return s?t.sliceString(s.from,Math.min(s.to,i)):""}function Rg(t,e=!1){for(;t;t=t.parent)if("Element"==t.name){if(!e)return t;e=!1}return null}function Mg(t,e,i){let n=i.tags[Ag(t,Rg(e))];return(null==n?void 0:n.children)||i.allTags}function Xg(t,e){let i=[];for(let n=Rg(e);n&&!n.type.isTop;n=Rg(n.parent)){let s=Ag(t,n);if(s&&"CloseTag"==n.lastChild.name)break;s&&i.indexOf(s)<0&&("EndTag"==e.name||e.from>=n.firstChild.to)&&i.push(s)}return i}Tg.default=new Tg;const qg=/^[:\-\.\w\u00b7-\uffff]*$/;function Vg(t,e,i,n,s){let r=/\s*>/.test(t.sliceDoc(s,s+5))?"":">",o=Rg(i,!0);return{from:n,to:s,options:Mg(t.doc,o,e).map((t=>({label:t,type:"type"}))).concat(Xg(t.doc,i).map(((t,e)=>({label:"/"+t,apply:"/"+t+r,type:"type",boost:99-e})))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Eg(t,e,i,n){let s=/\s*>/.test(t.sliceDoc(n,n+5))?"":">";return{from:i,to:n,options:Xg(t.doc,e).map(((t,e)=>({label:t,apply:t+s,type:"type",boost:99-e}))),validFor:qg}}function zg(t,e){let{state:i,pos:n}=e,s=zl(i).resolveInner(n,-1),r=s.resolve(n);for(let o,a=n;r==s&&(o=s.childBefore(a));){let t=o.lastChild;if(!t||!t.type.isError||t.from({label:t,type:"property"}))),validFor:qg}}(i,t,s,"AttributeName"==s.name?s.from:n,n):"Is"==s.name||"AttributeValue"==s.name||"UnquotedAttributeValue"==s.name?function(t,e,i,n,s){var r;let o,a=null===(r=i.parent)||void 0===r?void 0:r.getChild("AttributeName"),l=[];if(a){let r=t.sliceDoc(a.from,a.to),h=e.globalAttrs[r];if(!h){let n=Rg(i),s=n?e.tags[Ag(t.doc,n)]:null;h=(null==s?void 0:s.attrs)&&s.attrs[r]}if(h){let e=t.sliceDoc(n,s).toLowerCase(),i='"',r='"';/^['"]/.test(e)?(o='"'==e[0]?/^[^"]*$/:/^[^']*$/,i="",r=t.sliceDoc(s,s+1)==e[0]?"":e[0],e=e.slice(1),n++):o=/^[^\s<>='"]*$/;for(let t of h)l.push({label:t,apply:i+t+r,type:"constant"})}}return{from:n,to:s,options:l,validFor:o}}(i,t,s,"Is"==s.name?n:s.from,n):!e.explicit||"Element"!=r.name&&"Text"!=r.name&&"Document"!=r.name?null:function(t,e,i,n){let s=[],r=0;for(let o of Mg(t.doc,i,e))s.push({label:"<"+o,type:"type"});for(let o of Xg(t.doc,i))s.push({label:"",type:"type",boost:99-r++});return{from:n,to:n,options:s,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(i,t,s,n)}function Yg(t){let{extraTags:e,extraGlobalAttributes:i}=t,n=i||e?new Tg(e,i):Tg.default;return t=>zg(n,t)}const Lg=cm.parser.configure({top:"SingleExpression"}),_g=[{tag:"script",attrs:t=>"text/typescript"==t.type||"ts"==t.lang,parser:fm.parser},{tag:"script",attrs:t=>"text/babel"==t.type||"text/jsx"==t.type,parser:dm.parser},{tag:"script",attrs:t=>"text/typescript-jsx"==t.type,parser:Om.parser},{tag:"script",attrs:t=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type),parser:Lg},{tag:"script",attrs:t=>!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type),parser:cm.parser},{tag:"style",attrs:t=>(!t.lang||"css"==t.lang)&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type)),parser:vg.parser}],Dg=[{name:"style",parser:vg.parser.configure({top:"Styles"})}].concat(Cg.map((t=>({name:t,parser:cm.parser})))),jg=El.define({name:"html",parser:jm.configure({props:[nh.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag":t=>t.column(t.node.from)+t.unit,Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].lengtht.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Bg=jg.configure({wrap:Gm(_g,Dg)});function Wg(t={}){let e,i="";!1===t.matchClosingTags&&(i="noMatch"),!0===t.selfClosingTags&&(i=(i?i+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(e=Gm((t.nestedLanguages||[]).concat(_g),(t.nestedAttributes||[]).concat(Dg)));let n=e?jg.configure({wrap:e,dialect:i}):i?Bg.configure({dialect:i}):Bg;return new Ul(n,[Bg.data.of({autocomplete:Yg(t)}),!1!==t.autoCloseTags?Gg:[],bm().support,wg().support])}const Ig=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),Gg=Sr.inputHandler.of(((t,e,i,n,s)=>{if(t.composing||t.state.readOnly||e!=i||">"!=n&&"/"!=n||!Bg.isActiveAt(t.state,e,-1))return!1;let r=s(),{state:o}=r,a=o.changeByRange((t=>{var e,i,s;let r,a=o.doc.sliceString(t.from-1,t.to)==n,{head:l}=t,h=zl(o).resolveInner(l,-1);if(a&&">"==n&&"EndTag"==h.name){let n=h.parent;if("CloseTag"!=(null===(i=null===(e=n.parent)||void 0===e?void 0:e.lastChild)||void 0===i?void 0:i.name)&&(r=Ag(o.doc,n.parent,l))&&!Ig.has(r)){return{range:t,changes:{from:l,to:l+(">"===o.doc.sliceString(l,l+1)?1:0),insert:``}}}}else if(a&&"/"==n&&"IncompleteCloseTag"==h.name){let t=h.parent;if(h.from==l-2&&"CloseTag"!=(null===(s=t.lastChild)||void 0===s?void 0:s.name)&&(r=Ag(o.doc,t,l))&&!Ig.has(r)){let t=l+(">"===o.doc.sliceString(l,l+1)?1:0),e=`${r}>`;return{range:et.cursor(l+e.length,-1),changes:{from:l,to:t,insert:e}}}}return{range:t}}));return!a.changes.empty&&(t.dispatch([r,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}));class Ug{static create(t,e,i,n,s){return new Ug(t,e,i,n+(n<<8)+t+(e<<4)|0,s,[],[])}constructor(t,e,i,n,s,r,o){this.type=t,this.value=e,this.from=i,this.hash=n,this.end=s,this.children=r,this.positions=o,this.hashProp=[[pa.contextHash,n]]}addChild(t,e){t.prop(pa.contextHash)!=this.hash&&(t=new xa(t.type,t.children,t.positions,t.length,this.hashProp)),this.children.push(t),this.positions.push(e)}toTree(t,e=this.end){let i=this.children.length-1;return i>=0&&(e=Math.max(e,this.positions[i]+this.children[i].length+this.from)),new xa(t.types[this.type],this.children,this.positions,e-this.from).balance({makeTree:(t,e,i)=>new xa(ba.none,t,e,i,this.hashProp)})}}var Ng;!function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"}(Ng||(Ng={}));class Hg{constructor(t,e){this.start=t,this.content=e,this.marks=[],this.parsers=[]}}class Fg{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let t=this.skipSpace(this.basePos);this.indent=this.countIndent(t,this.pos,this.indent),this.pos=t,this.next=t==this.text.length?-1:this.text.charCodeAt(t)}skipSpace(t){return eb(this.text,t)}reset(t){for(this.text=t,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(t){this.basePos=t,this.baseIndent=this.countIndent(t,this.pos,this.indent)}moveBaseColumn(t){this.baseIndent=t,this.basePos=this.findColumn(t)}addMarker(t){this.markers.push(t)}countIndent(t,e=0,i=0){for(let n=e;n=e.stack[i.depth+1].value+i.baseIndent)return!0;if(i.indent>=i.baseIndent+4)return!1;let n=(t.type==Ng.OrderedList?lb:ab)(i,e,!1);return n>0&&(t.type!=Ng.BulletList||rb(i,e,!1)<0)&&i.text.charCodeAt(i.pos+n-1)==t.value}const Jg={[Ng.Blockquote]:(t,e,i)=>62==i.next&&(i.markers.push(Vb(Ng.QuoteMark,e.lineStart+i.pos,e.lineStart+i.pos+1)),i.moveBase(i.pos+(tb(i.text.charCodeAt(i.pos+1))?2:1)),t.end=e.lineStart+i.text.length,!0),[Ng.ListItem]:(t,e,i)=>!(i.indent-1)&&(i.moveBaseColumn(i.baseIndent+t.value),!0),[Ng.OrderedList]:Kg,[Ng.BulletList]:Kg,[Ng.Document]:()=>!0};function tb(t){return 32==t||9==t||10==t||13==t}function eb(t,e=0){for(;ei&&tb(t.charCodeAt(e-1));)e--;return e}function nb(t){if(96!=t.next&&126!=t.next)return-1;let e=t.pos+1;for(;e-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(yb.SetextHeading)>-1||n<3?-1:1}function ob(t,e){for(let i=t.stack.length-1;i>=0;i--)if(t.stack[i].type==e)return!0;return!1}function ab(t,e,i){return 45!=t.next&&43!=t.next&&42!=t.next||t.pos!=t.text.length-1&&!tb(t.text.charCodeAt(t.pos+1))||!(!i||ob(e,Ng.BulletList)||t.skipSpace(t.pos+2)=48&&s<=57;){if(n++,n==t.text.length)return-1;s=t.text.charCodeAt(n)}return n==t.pos||n>t.pos+9||46!=s&&41!=s||nt.pos+1||49!=t.next)?-1:n+1-t.pos}function hb(t){if(35!=t.next)return-1;let e=t.pos+1;for(;e6?-1:i}function cb(t){if(45!=t.next&&61!=t.next||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e/,db=/\?>/,Ob=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*/i.exec(n);if(r)return t.append(Vb(Ng.Comment,i,i+1+r[0].length));let o=/^\?[^]*?\?>/.exec(n);if(o)return t.append(Vb(Ng.ProcessingInstruction,i,i+1+o[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(n);return a?t.append(Vb(Ng.HTMLTag,i,i+1+a[0].length)):-1},Emphasis(t,e,i){if(95!=e&&42!=e)return-1;let n=i+1;for(;t.char(n)==e;)n++;let s=t.slice(i-1,i),r=t.slice(n,n+1),o=jb.test(s),a=jb.test(r),l=/\s|^$/.test(s),h=/\s|^$/.test(r),c=!h&&(!a||l||o),u=!l&&(!o||h||a),f=c&&(42==e||!u||o),d=u&&(42==e||!c||a);return t.append(new _b(95==e?Eb:zb,i,n,(f?1:0)|(d?2:0)))},HardBreak(t,e,i){if(92==e&&10==t.char(i+1))return t.append(Vb(Ng.HardBreak,i,i+2));if(32==e){let e=i+1;for(;32==t.char(e);)e++;if(10==t.char(e)&&e>=i+2)return t.append(Vb(Ng.HardBreak,i,e+1))}return-1},Link:(t,e,i)=>91==e?t.append(new _b(Yb,i,i+1,1)):-1,Image:(t,e,i)=>33==e&&91==t.char(i+1)?t.append(new _b(Lb,i,i+2,1)):-1,LinkEnd(t,e,i){if(93!=e)return-1;for(let n=t.parts.length-1;n>=0;n--){let e=t.parts[n];if(e instanceof _b&&(e.type==Yb||e.type==Lb)){if(!e.side||t.skipSpace(e.to)==i&&!/[(\[]/.test(t.slice(i+1,i+2)))return t.parts[n]=null,-1;let s=t.takeContent(n),r=t.parts[n]=Wb(t,s,e.type==Yb?Ng.Link:Ng.Image,e.from,i+1);if(e.type==Yb)for(let e=0;ee?Vb(Ng.URL,e+i,s+i):s==t.length&&null}}function Gb(t,e,i){let n=t.charCodeAt(e);if(39!=n&&34!=n&&40!=n)return!1;let s=40==n?41:n;for(let r=e+1,o=!1;r=this.end?-1:this.text.charCodeAt(t-this.offset)}get end(){return this.offset+this.text.length}slice(t,e){return this.text.slice(t-this.offset,e-this.offset)}append(t){return this.parts.push(t),t.to}addDelimiter(t,e,i,n,s){return this.append(new _b(t,e,i,(n?1:0)|(s?2:0)))}get hasOpenLink(){for(let t=this.parts.length-1;t>=0;t--){let e=this.parts[t];if(e instanceof _b&&(e.type==Yb||e.type==Lb))return!0}return!1}addElement(t){return this.append(t)}resolveMarkers(t){for(let i=t;i=t;o--){let t=this.parts[o];if(t instanceof _b&&1&t.side&&t.type==e.type&&!(s&&(1&e.side||2&t.side)&&(t.to-t.from+r)%3==0&&((t.to-t.from)%3||r%3))){n=t;break}}if(!n)continue;let a=e.type.resolve,l=[],h=n.from,c=e.to;if(s){let t=Math.min(2,n.to-n.from,r);h=n.to-t,c=e.from+t,a=1==t?"Emphasis":"StrongEmphasis"}n.type.mark&&l.push(this.elt(n.type.mark,h,n.to));for(let t=o+1;t=0;e--){let i=this.parts[e];if(i instanceof _b&&i.type==t)return e}return null}takeContent(t){let e=this.resolveMarkers(t);return this.parts.length=t,e}skipSpace(t){return eb(this.text,t-this.offset)+this.offset}elt(t,e,i,n){return"string"==typeof t?Vb(this.parser.getNodeType(t),e,i,n):new qb(t,e)}}function Hb(t,e){if(!e.length)return t;if(!t.length)return e;let i=t.slice(),n=0;for(let s of e){for(;n(t?t-1:0))return!1;if(this.fragmentEnd<0){let t=this.fragment.to;for(;t>0&&"\n"!=this.input.read(t-1,t);)t--;this.fragmentEnd=t?t-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let n=t+this.fragment.offset;for(;i.to<=n;)if(!i.parent())return!1;for(;;){if(i.from>=n)return this.fragment.from<=e;if(!i.childAfter(n))return!1}}matches(t){let e=this.cursor.tree;return e&&e.prop(pa.contextHash)==t}takeNodes(t){let e=this.cursor,i=this.fragment.offset,n=this.fragmentEnd-(this.fragment.openEnd?1:0),s=t.absoluteLineStart,r=s,o=t.block.children.length,a=r,l=o;for(;;){if(e.to-i>n){if(e.type.isAnonymous&&e.firstChild())continue;break}let s=Jb(e.from-i,t.ranges);if(e.to-i<=t.ranges[t.rangeI].to)t.addNode(e.tree,s);else{let i=new xa(t.parser.nodeSet.types[Ng.Paragraph],[],[],0,t.block.hashProp);t.reusePlaceholders.set(i,e.tree),t.addNode(i,s)}if(e.type.is("Block")&&(Fb.indexOf(e.type.id)<0?(r=e.to-i,o=t.block.children.length):(r=a,o=l,a=e.to-i,l=t.block.children.length)),!e.nextSibling())break}for(;t.block.children.length>o;)t.block.children.pop(),t.block.positions.pop();return r-s}}function Jb(t,e){let i=t;for(let n=1;nbb[t])),Object.keys(bb).map((t=>yb[t])),Object.keys(bb),xb,Jg,Object.keys(Bb).map((t=>Bb[t])),Object.keys(Bb),[]);function iv(t,e,i){let n=[];for(let s=t.firstChild,r=e;;s=s.nextSibling){let t=s?s.from:i;if(t>r&&n.push({from:r,to:t}),!s)break;r=s.to}return n}const nv={resolve:"Strikethrough",mark:"StrikethroughMark"},sv={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":Tl.strikethrough}},{name:"StrikethroughMark",style:Tl.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,i){if(126!=e||126!=t.char(i+1)||126==t.char(i+2))return-1;let n=t.slice(i-1,i),s=t.slice(i+2,i+3),r=/\s|^$/.test(n),o=/\s|^$/.test(s),a=jb.test(n),l=jb.test(s);return t.addDelimiter(nv,i,i+2,!o&&(!l||r||a),!r&&(!a||o||l))},after:"Emphasis"}]};function rv(t,e,i=0,n,s=0){let r=0,o=!0,a=-1,l=-1,h=!1,c=()=>{n.push(t.elt("TableCell",s+a,s+l,t.parser.parseInline(e.slice(a,l),s+a)))};for(let u=i;u-1)&&r++,o=!1,n&&(a>-1&&c(),n.push(t.elt("TableDelimiter",u+s,u+s+1))),a=l=-1),h=!h&&92==i}return a>-1&&(r++,n&&c()),r}function ov(t,e){for(let i=e;iov(e.content,0)?new lv:null,endLeaf(t,e,i){if(i.parsers.some((t=>t instanceof lv))||!ov(e.text,e.basePos))return!1;let n=t.scanLine(t.absoluteLineEnd+1).text;return av.test(n)&&rv(t,e.text,e.basePos)==rv(t,n,e.basePos)},before:"SetextHeading"}]};class cv{nextLine(){return!1}finish(t,e){return t.addLeafElement(e,t.elt("Task",e.start,e.start+e.content.length,[t.elt("TaskMarker",e.start,e.start+3),...t.parser.parseInline(e.content.slice(3),e.start+3)])),!0}}const uv={defineNodes:[{name:"Task",block:!0,style:Tl.list},{name:"TaskMarker",style:Tl.atom}],parseBlock:[{name:"TaskList",leaf:(t,e)=>/^\[[ xX]\][ \t]/.test(e.content)&&"ListItem"==t.parentType().name?new cv:null,after:"SetextHeading"}]},fv=/(www\.)|(https?:\/\/)|([\w.+-]{,100}@)|(mailto:|xmpp:)/gy,dv=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Ov=/[\w-]+\.[\w-]+($|\/)/,pv=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,mv=/\/[a-zA-Z\d@.]+/gy;function gv(t,e,i,n){let s=0;for(let r=e;r-1)return-1;let n=e+i[0].length;for(;;){let i,s=t[n-1];if(/[?!.,:*_~]/.test(s)||")"==s&&gv(t,e,n,")")>gv(t,e,n,"("))n--;else{if(";"!=s||!(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,n))))break;n=e+i.index}}return n}(t.text,n+s[0].length),r>-1&&t.hasOpenLink){r=n+/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(n,r))[0].length}}else s[3]?r=bv(t.text,n):(r=bv(t.text,n+s[0].length),r>-1&&"xmpp:"==s[0]&&(mv.lastIndex=r,s=mv.exec(t.text),s&&(r=s.index+s[0].length)));return r<0?-1:(t.addElement(t.elt("URL",i,r+t.offset)),r+t.offset)}}]}];function wv(t,e,i){return(n,s,r)=>{if(s!=t||n.char(r+1)==t)return-1;let o=[n.elt(i,r,r+1)];for(let a=r+1;a!t.is("Block")||t.is("Document")||null!=$v(t)||function(t){return"OrderedList"==t.name||"BulletList"==t.name}(t)?void 0:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to}))),kv.add($v),nh.add({Document:()=>null}),Rl.add({Document:Qv})]});function $v(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function Zv(t,e){let i=t;for(;;){let t,n=i.nextSibling;if(!n||null!=(t=$v(n.type))&&t<=e)break;i=n}return i.to}const Cv=fh.of(((t,e,i)=>{for(let n=zl(t).resolveInner(i,-1);n&&!(n.fromi)return{from:i,to:e}}return null}));function Tv(t){return new ql(Qv,t,[Cv],"markdown")}const Av=Tv(Pv),Rv=Tv(Pv.configure([vv,yv,Sv,xv,{props:[dh.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]));class Mv{constructor(t,e,i,n,s,r,o){this.node=t,this.from=e,this.to=i,this.spaceBefore=n,this.spaceAfter=s,this.type=r,this.item=o}blank(t,e=!0){let i=this.spaceBefore+("Blockquote"==this.node.name?">":"");if(null!=t){for(;i.length0;n--)i+=" ";return i+(e?this.spaceAfter:"")}marker(t,e){let i="OrderedList"==this.node.name?String(+qv(this.item,t)[2]+e):"";return this.spaceBefore+i+this.type+this.spaceAfter}}function Xv(t,e){let i=[];for(let s=t;s;s=s.parent)"ListItem"!=s.name&&"Blockquote"!=s.name&&"FencedCode"!=s.name||i.push(s);let n=[];for(let s=i.length-1;s>=0;s--){let t,r=i[s],o=e.lineAt(r.from),a=r.from-o.from;if("FencedCode"==r.name)n.push(new Mv(r,a,a,"","","",null));else if("Blockquote"==r.name&&(t=/^ *>( ?)/.exec(o.text.slice(a))))n.push(new Mv(r,a,a+t[0].length,"",t[1],">",null));else if("ListItem"==r.name&&"OrderedList"==r.parent.name&&(t=/^( *)\d+([.)])( *)/.exec(o.text.slice(a)))){let e=t[3],i=t[0].length;e.length>=4&&(e=e.slice(0,e.length-4),i-=4),n.push(new Mv(r.parent,a,a+i,t[1],e,t[2],r))}else if("ListItem"==r.name&&"BulletList"==r.parent.name&&(t=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(a)))){let e=t[4],i=t[0].length;e.length>4&&(e=e.slice(0,e.length-4),i-=4);let s=t[2];t[3]&&(s+=t[3].replace(/[xX]/," ")),n.push(new Mv(r.parent,a,a+i,t[1],e,s,r))}}return n}function qv(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function Vv(t,e,i,n=0){for(let s=-1,r=t;;){if("ListItem"==r.name){let t=qv(r,e),o=+t[2];if(s>=0){if(o!=s+1)return;i.push({from:r.from+t[1].length,to:r.from+t[0].length,insert:String(s+2+n)})}s=o}let t=r.nextSibling;if(!t)break;r=t}}function Ev(t,e){let i=/^[ \t]*/.exec(t)[0].length;if(!i||"\t"!=e.facet(Fl))return t;let n="";for(let s=ce(t,4,i);s>0;)s>=4?(n+="\t",s-=4):(n+=" ",s--);return n+t.slice(i)}function zv(t){return"QuoteMark"==t.name||"ListMark"==t.name}function Yv(t,e,i){let n="";for(let s=0,r=t.length-2;s<=r;s++)n+=t[s].blank(s{let i=zl(t),{doc:n}=t,s=null,r=t.changeByRange((e=>{if(!e.empty||!Rv.isActiveAt(t,e.from,0))return s={range:e};let r=e.from,o=n.lineAt(r),a=Xv(i.resolveInner(r,-1),n);for(;a.length&&a[a.length-1].from>r-o.from;)a.pop();if(!a.length)return s={range:e};let l=a[a.length-1];if(l.to-l.spaceAfter.length>r-o.from)return s={range:e};let h=r>=l.to-l.spaceAfter.length&&!/\S/.test(o.text.slice(l.to));if(l.item&&h){let e=l.node.firstChild,i=l.node.getChild("ListItem","ListItem");if(e.to>=r||i&&i.to0&&!/[^\s>]/.test(n.lineAt(o.from-1).text)){let t,e=a.length>1?a[a.length-2]:null,i="";e&&e.item?(t=o.from+e.from,i=e.marker(n,1)):t=o.from+(e?e.to:0);let s=[{from:t,to:r,insert:i}];return"OrderedList"==l.node.name&&Vv(l.item,n,s,-2),e&&"OrderedList"==e.node.name&&Vv(e.item,n,s),{range:et.cursor(t+i.length),changes:s}}{let e=Yv(a,t,o);return{range:et.cursor(r+e.length+1),changes:{from:o.from,insert:e+t.lineBreak}}}}if("Blockquote"==l.node.name&&h&&o.from){let i=n.lineAt(o.from-1),s=/>\s*$/.exec(i.text);if(s&&s.index==l.from){let n=t.changes([{from:i.from+s.index,to:i.to},{from:o.from+l.from,to:o.to}]);return{range:e.map(n),changes:n}}}let c=[];"OrderedList"==l.node.name&&Vv(l.item,n,c);let u=l.item&&l.item.from]*/.exec(o.text)[0].length>=l.to)for(let t=0,i=a.length-1;t<=i;t++)f+=t!=i||u?a[t].blank(to.from&&/\s/.test(o.text.charAt(d-o.from-1));)d--;return f=Ev(f,t),function(t,e){if("OrderedList"!=t.name&&"BulletList"!=t.name)return!1;let i=t.firstChild,n=t.getChild("ListItem","ListItem");if(!n)return!1;let s=e.lineAt(i.to),r=e.lineAt(n.from),o=/^[\s>]*$/.test(s.text);return s.number+(o?0:1){let i=zl(t),n=null,s=t.changeByRange((e=>{let s=e.from,{doc:r}=t;if(e.empty&&Rv.isActiveAt(t,e.from)){let e=r.lineAt(s),n=Xv(function(t,e){let i=t.resolveInner(e,-1),n=e;zv(i)&&(n=i.from,i=i.parent);for(let s;s=i.childBefore(n);)if(zv(s))n=s.from;else{if("OrderedList"!=s.name&&"BulletList"!=s.name)break;i=s.lastChild,n=i.to}return i}(i,s),r);if(n.length){let i=n[n.length-1],r=i.to-i.spaceAfter.length+(i.spaceAfter?1:0);if(s-e.from>r&&!/\S/.test(e.text.slice(r,s-e.from)))return{range:et.cursor(e.from+r),changes:{from:e.from+r,to:s}};if(s-e.from==r&&(!i.item||e.from<=i.item.from||!/\S/.test(e.text.slice(0,i.to)))){let n=e.from+i.from;if(i.item&&i.node.from{if(t&&u){let e=null;if(t=/\S*/.exec(t)[0],e="function"==typeof u?u(t):Nl.matchLanguageName(u,t,!0),e instanceof Nl)return e.support?e.support.language.parser:_l.getSkippingParser(e.load());if(e)return e.parser}return f?f.parser:null}):void 0;var u,f;l.push(function(t){let{codeParser:e,htmlParser:i}=t,n=Wa(((t,n)=>{let s=t.type.id;if(!e||s!=Ng.CodeBlock&&s!=Ng.FencedCode){if(i&&(s==Ng.HTMLBlock||s==Ng.HTMLTag))return{parser:i,overlay:iv(t.node,t.from,t.to)}}else{let i="";if(s==Ng.FencedCode){let e=t.node.getChild(Ng.CodeInfo);e&&(i=n.read(e.from,e.to))}let r=e(i);if(r)return{parser:r,overlay:t=>t.type.id==Ng.CodeText}}return null}));return{wrap:n}}({codeParser:c,htmlParser:o.language.parser})),n&&h.push(gt.high(Cr.of(Lv)));let d=Tv(s.configure(l));return r&&h.push(d.data.of({autocomplete:jv})),new Ul(d,h)}function jv(t){let{state:e,pos:i}=t,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(i-25,i));if(!n)return null;let s=zl(e).resolveInner(i,-1);for(;s&&!s.type.isTop;){if("CodeBlock"==s.name||"FencedCode"==s.name||"ProcessingInstructionBlock"==s.name||"CommentBlock"==s.name||"Link"==s.name||"Image"==s.name)return null;s=s.parent}return{from:i-n[0].length,to:i,options:Wv(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let Bv=null;function Wv(){if(Bv)return Bv;let t=(e=new xc(It.create({extensions:_v}),0,!0),zg(Tg.default,e));var e;return Bv=t?t.options:[]}const Iv=hl({String:Tl.string,Number:Tl.number,"True False":Tl.bool,PropertyName:Tl.propertyName,Null:Tl.null,",":Tl.separator,"[ ]":Tl.squareBracket,"{ }":Tl.brace}),Gv=Ep.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[Iv],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),Uv=El.define({name:"json",parser:Gv.configure({props:[nh.add({Object:uh({except:/^\s*\}/}),Array:uh({except:/^\s*\]/})}),dh.add({"Object Array":Oh})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});var Nv={};function Hv(t,e){for(var i=0;i1&&t.eat("$");var i=t.next();return/['"({]/.test(i)?(e.tokens[0]=ew(i,"("==i?"quote":"{"==i?"def":"string"),sw(t,e)):(/\d/.test(i)||t.eatWhile(/\w/),e.tokens.shift(),"def")};function sw(t,e){return(e.tokens[0]||tw)(t,e)}const rw={name:"shell",startState:function(){return{tokens:[]}},token:function(t,e){return sw(t,e)},languageData:{autocomplete:Fv.concat(Kv,Jv),closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}};var ow=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i");const aw={name:"yaml",token:function(t,e){var i=t.peek(),n=e.escaped;if(e.escaped=!1,"#"==i&&(0==t.pos||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment";if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(e.literal&&t.indentation()>e.keyCol)return t.skipToEnd(),"string";if(e.literal&&(e.literal=!1),t.sol()){if(e.keyCol=0,e.pair=!1,e.pairStart=!1,t.match("---"))return"def";if(t.match("..."))return"def";if(t.match(/^\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==i?e.inlinePairs++:"}"==i?e.inlinePairs--:"["==i?e.inlineList++:e.inlineList--,"meta";if(e.inlineList>0&&!n&&","==i)return t.next(),"meta";if(e.inlinePairs>0&&!n&&","==i)return e.keyCol=0,e.pair=!1,e.pairStart=!1,t.next(),"meta";if(e.pairStart){if(t.match(/^\s*(\||\>)\s*/))return e.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable";if(0==e.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(e.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(ow))return"keyword"}return!e.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(e.pair=!0,e.keyCol=t.indentation(),"atom"):e.pair&&t.match(/^:\s*/)?(e.pairStart=!0,"meta"):(e.pairStart=!1,e.escaped="\\"==i,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:"#"}}};var lw,hw,cw;function uw({view:e,searchConfig:i}){const r=n.useState(""),o=s(r,2),a=o[0],l=o[1],h=t=>{e.dispatch({effects:kf.of(new gf({search:t}))})},c=()=>{h(a),Mf(e)},u=()=>{h(a),Xf(e)};return t.createElement(p,{renderLabel:"",inputRef:t=>{setTimeout((()=>null==t?void 0:t.focus()),0)},size:"small",display:"inline-block",width:"20rem",placeholder:i.placeholder,onChange:(t,e)=>{l(e),h(e)},onKeyDown:t=>{"Enter"===t.key&&(t.shiftKey?u():c())},onKeyUp:t=>{"Escape"===t.key&&jf(e)},renderBeforeInput:lw||(lw=t.createElement(b,{size:"x-small"})),renderAfterInput:t.createElement("span",null,t.createElement(v,{size:"small",withBorder:!1,withBackground:!1,onClick:c,screenReaderLabel:i.nextResultLabel},hw||(hw=t.createElement(m,null))),t.createElement(v,{size:"small",withBorder:!1,withBackground:!1,onClick:u,screenReaderLabel:i.prevResultLabel},cw||(cw=t.createElement(g,null))))})}function fw(n){return n?function(t){return t?[mf.of(t),Ff]:Ff}({createPanel:s=>{var r;const o=document.createElement("div");o.style.padding="8px";return Number(t.version.split(".")[0])>=18?e((()=>import("./index-CrryxQyl.js").then((t=>t.c))),__vite__mapDeps([0,1])).then((e=>{e.createRoot(o).render(r||(r=t.createElement(uw,{view:s,searchConfig:n})))})).catch((t=>{})):i.render(t.createElement(uw,{view:s,searchConfig:n}),o),{dom:o}}}):[]}const dw=[{key:"ArrowLeft",run:Vd,shift:rO,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Yd,shift:lO},{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:jd,shift:cO},{mac:"Cmd-ArrowLeft",run:eO,shift:wO},{key:"Home",run:Kd,shift:gO},{key:"ArrowRight",run:qd,shift:sO,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:zd,shift:aO},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Dd,shift:hO},{mac:"Cmd-ArrowRight",run:tO,shift:vO},{key:"End",run:Jd,shift:bO},{key:"Delete",run:ZO},{key:"Mod-Delete",mac:"Alt-Delete",run:AO},{key:"Backspace",run:CO,shift:CO},{key:"Mod-Backspace",mac:"Alt-Backspace",run:RO},{mac:"Mod-Delete",run:t=>kO(t,(e=>{let i=t.lineBlockAt(e.head).from;return e.head>i?i:Math.max(0,e.head-1)}))},{mac:"Mod-Backspace",run:MO}],Ow={label:r.string.isRequired,language:r.oneOf(["sh","js","json","javascript","jsx","shell","css","html","markdown","yaml","yml","bash"]),readOnly:r.bool,editable:r.bool,lineNumbers:r.bool,foldGutter:r.bool,highlightActiveLineGutter:r.bool,highlightActiveLine:r.bool,lineWrapping:r.bool,autofocus:r.bool,spellcheck:r.bool,direction:r.oneOf(["ltr","rtl"]),rtlMoveVisually:r.bool,indentOnLoad:r.bool,indentWithTab:r.bool,indentUnit:r.string,defaultValue:r.string,value:w(r.string,"onChange","defaultValue"),onChange:r.func,onFocus:r.func,onBlur:r.func,attachment:r.oneOf(["bottom","top"]),height:r.string,width:r.string,elementRef:r.func,containerRef:r.func,searchConfig:r.object},pw=["label","styles"];var mw,gw,bw,vw;let ww=(mw=o(),gw=a(((t,e)=>{const i=e.attachment,n={top:{borderBottomLeftRadius:0,borderBottomRightRadius:0},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0}},s=1.4375;return{codeEditor:{label:"codeEditor",position:"relative",boxSizing:"border-box",height:e.height||"auto",width:e.width},label:{label:"label",height:"100%",width:"100%"},codeEditorContainer:{label:"codeEditorContainer",height:"100%",width:"100%",borderColor:null==t?void 0:t.borderColor,borderStyle:"solid",borderWidth:null==t?void 0:t.borderWidth,borderRadius:t.borderRadius,marginBottom:"1rem",...i&&{...{top:{marginBottom:0,marginTop:"0.25rem"},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0,marginBottom:"0.25rem"}}[i],...n[i]}},theme:{"&":{overflow:"hidden",background:t.background,fontFamily:t.fontFamily,fontSize:t.fontSize,color:t.color,border:0,height:"100%",width:"100%",minHeight:"1.4375rem",lineHeight:s,borderRadius:t.borderRadius,...i&&{...n[i]}},"&.cm-editor.cm-focused":{outline:`${null==t?void 0:t.borderWidth} solid ${null==t?void 0:t.focusBorderColor}`},".cm-content":{padding:`${t.verticalPadding} 0`},".cm-scroller":{fontFamily:t.fontFamily,lineHeight:1.4375},".cm-gutters":{background:t.gutterBackground,borderColor:t.borderColor},".cm-line":{padding:`0 ${t.horizontalPadding}`},".cm-selectionBackground":{background:"transparent"},".cm-focused .cm-selectionBackground":{background:"#d7d4f0"},".cm-placeholder":{color:"#707070"}},highlightStyle:[{tag:Tl.link,textDecoration:"underline"},{tag:Tl.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Tl.emphasis,fontStyle:"italic"},{tag:Tl.strong,fontWeight:"bold"},{tag:Tl.strikethrough,textDecoration:"line-through"},{tag:Tl.keyword,color:"#708"},{tag:[Tl.atom,Tl.bool,Tl.url,Tl.contentSeparator,Tl.labelName],color:"#219"},{tag:[Tl.literal,Tl.inserted],color:"#164"},{tag:[Tl.string,Tl.deleted],color:"#a11"},{tag:Tl.definition(Tl.variableName),color:"#00f"},{tag:Tl.local(Tl.variableName),color:"#30a"},{tag:Tl.className,color:"#167"},{tag:[Tl.special(Tl.variableName),Tl.macroName],color:"#256"},{tag:Tl.definition(Tl.propertyName),color:"#00c"},{tag:Tl.comment,color:"#940"},{tag:Tl.meta,color:"#757075"},{tag:[Tl.regexp,Tl.escape,Tl.special(Tl.string)],color:"#d13b00"},{tag:[Tl.typeName,Tl.namespace],color:"#008051"},{tag:Tl.invalid,color:"#e60000"}]}}),(t=>{var e,i,n,s,r;const o=t.colors,a=t.borders,l=t.typography,h=t.spacing;return{...{fontFamily:null==l?void 0:l.fontFamilyMonospace,fontSize:null==l?void 0:l.fontSizeSmall,background:null==o||null===(e=o.contrasts)||void 0===e?void 0:e.white1010,color:null==o||null===(i=o.contrasts)||void 0===i?void 0:i.grey125125,gutterBackground:null==o||null===(n=o.contrasts)||void 0===n?void 0:n.grey1111,borderWidth:null==a?void 0:a.widthSmall,borderColor:null==o||null===(s=o.contrasts)||void 0===s?void 0:s.grey1214,borderRadius:null==a?void 0:a.radiusMedium,focusBorderColor:null==o||null===(r=o.contrasts)||void 0===r?void 0:r.blue4570,horizontalPadding:null==h?void 0:h.xSmall,verticalPadding:null==h?void 0:h.xxSmall}}})),mw(bw=gw(bw=l()(bw=h()((vw=class t extends n.Component{addAnimationFrame(t){"function"==typeof t&&this._raf.push(S(t))}cancelAnimationFrames(){this._raf.forEach((t=>t.cancel())),this._raf=[]}focus(){this.addAnimationFrame((()=>{var t;null===(t=this._editorView)||void 0===t||t.focus()}))}get hasFocus(){var t;return null===(t=this._editorView)||void 0===t?void 0:t.hasFocus}selectAll(){this._editorView&&this.addAnimationFrame((()=>{var t;this.dispatchViewSelection({anchor:0,head:null===(t=this.currentDocValue)||void 0===t?void 0:t.length})}))}deselectAll(){this._editorView&&this.addAnimationFrame((()=>{this.dispatchViewSelection({anchor:0,head:0})}))}indentCurrentSelection(){this.addAnimationFrame((()=>{this._editorView&&LO({state:this._editorView.state,dispatch:t=>{var e;null===(e=this._editorView)||void 0===e||e.update([t])}})}))}indentAll(){this.addAnimationFrame((()=>{this._editorView&&this.currentDocValue&&this.indentCodeRange(0,this.currentDocValue.length)}))}indentCodeRange(t,e){this.addAnimationFrame((()=>{this._editorView&&this.currentDocValue&&this.dispatchViewChanges({changes:eh(this._editorView.state,t,e)})}))}dispatchViewEffects(t){this._editorView&&t&&this._editorView.dispatch({effects:t})}dispatchViewChanges({changes:t,selection:e,userEvent:i}){this._editorView&&t&&this._editorView.dispatch({changes:t,...e?{selection:e}:void 0,...i?{userEvent:i}:void 0})}dispatchViewSelection(t){this._editorView&&t&&this._editorView.dispatch({selection:t})}get currentDocValue(){var t;return null===(t=this._editorView)||void 0===t?void 0:t.state.doc}get isControlled(){return"string"==typeof this.props.value}constructor(t){super(t),this._id=void 0,this.ref=null,this._containerRef=void 0,this._editorView=void 0,this._raf=[],this._newSelectionAfterValueChange=void 0,this.handleRef=t=>{const e=this.props.elementRef;this.ref=t,"function"==typeof e&&e(t)},this.handleContainerRef=t=>{const e=this.props.containerRef;this._containerRef=t||void 0,"function"==typeof e&&e(t)},this._id=t.deterministicId()}componentDidMount(){var t,e;const i=this.props,n=i.value,s=i.defaultValue,r=i.autofocus,o=i.indentOnLoad;null===(t=(e=this.props).makeStyles)||void 0===t||t.call(e);const a=It.create({doc:n||s,extensions:this.extensions});this._editorView=new Sr({state:a,parent:this._containerRef}),r&&this.focus(),o&&this.indentAll()}componentWillUnmount(){var t;null===(t=this._editorView)||void 0===t||t.destroy(),this.cancelAnimationFrames()}componentDidUpdate(t){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i),this._editorView&&(this.props.value!==t.value&&this.refreshEditorValue(),this.shouldUpdateExtensions(t)&&this.refreshExtensions())}shouldUpdateExtensions(t){const e=["styles","themeOverride","language","readOnly","editable","lineNumbers","highlightActiveLineGutter","foldGutter","lineWrapping","autofocus","spellcheck","direction","dir","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","highlightActiveLine","attachment"];for(const i of e)if(!c(this.props[i],t[i]))return!0;return!1}get direction(){return this.props.direction||this.props.dir}get extensions(){const t=[...this.baseExtensions,this.languageExtension,this.onChangeExtension,this.focusListenerExtension,this.announceLineNumberExtension];return this.themeExtension&&t.push(this.themeExtension),this.props.lineNumbers&&t.push(function(t={}){return[ra.of(t),Ho(),la]}()),this.props.highlightActiveLine&&t.push(fo),this.props.highlightActiveLineGutter&&t.push(ua),this.props.foldGutter&&t.push(function(t={}){let e=Object.assign(Object.assign({},Mh),t),i=new Xh(e,!0),n=new Xh(e,!1),s=yn.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(Gl)!=t.state.facet(Gl)||t.startState.field(Sh,!1)!=t.state.field(Sh,!1)||zl(t.startState)!=zl(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new Jt;for(let s of t.viewportLineBlocks){let r=yh(t.state,s.from,s.to)?n:mh(t.state,s.from,s.to)?i:null;r&&e.add(s.from,s.from,r)}return e.finish()}}),{domEventHandlers:r}=e;return[s,Uo({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(s))||void 0===e?void 0:e.markers)||Kt.empty},initialSpacer:()=>new Xh(e,!1),domEventHandlers:Object.assign(Object.assign({},r),{click:(t,e,i)=>{if(r.click&&r.click(t,e,i))return!0;let n=yh(t.state,e.from,e.to);if(n)return t.dispatch({effects:vh.of(n)}),!0;let s=mh(t.state,e.from,e.to);return!!s&&(t.dispatch({effects:bh.of(s)}),!0)}})}),Ch()]}()),this.props.lineWrapping&&t.push(Sr.lineWrapping),!1===this.props.editable&&t.push(Sr.editable.of(!1)),this.props.readOnly&&t.push(It.readOnly.of(!0)),this.props.spellcheck&&t.push(Sr.contentAttributes.of({spellcheck:"true"})),this.direction&&t.push(Sr.contentAttributes.of({dir:this.direction})),this.props.indentUnit&&t.push(Fl.of(this.props.indentUnit)),t}get baseExtensions(){return[ao(),ud(),Br(),[Kr,Jr],It.allowMultipleSelections.of(!0),Lh(jh,{fallback:!0}),Kh(),[qu,Tu],Bu(),Sr.mouseSelectionStyle.of(((t,e)=>{return(i=e).altKey&&0==i.button?mo(t,e):null;var i})),vo(),[pf,Of],It.transactionFilter.of((t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let i=t.newDoc,{head:n}=t.newSelection.main,s=i.lineAt(n);if(n>s.from+200)return t;let r=i.sliceString(s.from,n);if(!e.some((t=>t.test(r))))return t;let{state:o}=t,a=-1,l=[];for(let{head:h}of o.selection.ranges){let t=o.doc.lineAt(h);if(t.from==a)continue;a=t.from;let e=th(o,t.from);if(null==e)continue;let i=/^\s*/.exec(t.text)[0],n=Jl(o,e);i!=n&&l.push({from:t.from,to:t.from+i.length,insert:n})}return l.length?[t,{changes:l,sequential:!0}]:t})),fw(this.props.searchConfig),Cr.of(this.keymaps)]}get keymaps(){const t=[...Vu,...this.commandKeybinding,...Zd,...Ph,...Wu,...ip,...this.props.searchConfig?Bf:[]];return this.props.indentWithTab&&t.push(BO),t}get commandKeybinding(){const t=this.props.rtlMoveVisually;if("rtl"===this.direction&&!t){const t=dw.map((t=>t.key?t.key:t.mac?t.mac:t));return[...jO.filter((e=>e.key?t.indexOf(e.key)<0:!!e.mac&&t.indexOf(e.mac)<0)),...dw]}return jO}get themeExtension(){const t=this.props.styles;if(null==t||!t.theme||!t.highlightStyle)return;return[Sr.theme(null==t?void 0:t.theme),Lh(Vh.define(null==t?void 0:t.highlightStyle))]}get languageExtension(){switch(this.props.language){case"json":return new Ul(Uv);case"js":case"jsx":case"javascript":default:return bm({jsx:!0,typescript:!0});case"html":return Wg({matchClosingTags:!0,autoCloseTags:!0});case"css":return wg();case"markdown":return Dv();case"sh":case"shell":case"bash":return lc.define(rw);case"yml":case"yaml":return lc.define(aw)}}callOnChangeHandler(t){const e=this.props,i=e.onChange,n=e.value;this.addAnimationFrame((()=>{"function"==typeof i&&t!==n&&i(t)}))}get onChangeExtension(){return It.changeFilter.of((t=>{if(!this._editorView)return!1;if(t.docChanged){const e=t.newDoc.toString();if(this.isControlled)return e===this.props.value||(this._newSelectionAfterValueChange=t.selection,this.cancelAnimationFrames(),this.callOnChangeHandler(e),!1);this.callOnChangeHandler(e)}return!0}))}get focusListenerExtension(){const t=this.props,e=t.onFocus,i=t.onBlur;return Sr.updateListener.of((t=>{t.focusChanged&&this._editorView&&(this.hasFocus?"function"==typeof e&&e():"function"==typeof i&&i())}))}get announceLineNumberExtension(){return It.transactionExtender.of((t=>{const e=t.selection,i=t.startState.selection.main;if(e&&e.main.empty&&i.empty){const n=t.startState.doc.lineAt(i.head),s=t.newDoc.lineAt(e.main.head);if(n.number!=s.number)return{effects:Sr.announce.of(t.startState.phrase("line ")+s.number+".")}}return null}))}refreshExtensions(){this.dispatchViewEffects(Xt.reconfigure.of(this.extensions))}refreshEditorValue(){if(!this._editorView)return;const t=this.props.value,e=this._editorView.state.doc.toString();if(void 0!==t&&e!==t){let i;const n=t.length-e.length;1===n?i="input.type":-1===n&&(i="delete.backward"),this.dispatchViewChanges({changes:{from:0,to:e.length,insert:t||""},selection:this._newSelectionAfterValueChange,userEvent:i}),this._newSelectionAfterValueChange=void 0}this.props.indentOnLoad&&this.indentAll()}render(){const e=this.props,i=e.label,n=e.styles,s=u(e,pw);return f("div",Object.assign({ref:this.handleRef,css:null==n?void 0:n.codeEditor},d(O(s,t.allowedProps))),f("label",{css:null==n?void 0:n.label,htmlFor:this._id},f(y,null,i),f("div",{ref:this.handleContainerRef,css:null==n?void 0:n.codeEditorContainer})))}},vw.displayName="SourceCodeEditor",vw.componentId="SourceCodeEditor",vw.propTypes=Ow,vw.allowedProps=["label","language","readOnly","editable","lineNumbers","foldGutter","highlightActiveLineGutter","highlightActiveLine","lineWrapping","autofocus","spellcheck","direction","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","defaultValue","value","onChange","onFocus","onBlur","attachment","height","width","elementRef","containerRef","searchConfig"],vw.defaultProps={language:"jsx",readOnly:!1,editable:!0,lineNumbers:!1,foldGutter:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1,lineWrapping:!1,autofocus:!1,spellcheck:!1,rtlMoveVisually:!0,indentOnLoad:!1,indentWithTab:!1,defaultValue:"",height:"auto"},bw=vw))||bw)||bw)||bw)||bw);export{ww as S}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DxmLT0bY.js","assets/index-CqQFZXZA.css"])))=>i.map(i=>d[i]); +import{R as t,_ as e,W as i,r as n,y as s,i as r,v as o,w as a,U as l,t as h,X as c,k as u,l as f,p as d,o as O}from"./index-DxmLT0bY.js";import{T as p,I as m,e as g}from"./index-CmNFgSR4.js";import{a as b,I as v}from"./index-CaYtQ08a.js";import{f as w,M as S,S as y}from"./RenderTopNavBar-BObK9Y19.js";class x{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,i){[t,e]=R(this,t,e);let n=[];return this.decompose(0,t,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(e,this.length,n,1),k.from(n,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=R(this,t,e);let i=[];return this.decompose(t,e,i,0),k.from(i,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),n=new Z(this),s=new Z(t);for(let r=e,o=e;;){if(n.next(r),s.next(r),r=0,n.lineBreak!=s.lineBreak||n.done!=s.done||n.value!=s.value)return!1;if(o+=n.value.length,n.done||o>=i)return!0}}iter(t=1){return new Z(this,t)}iterRange(t,e=this.length){return new C(this,t,e)}iterLines(t,e){let i;if(null==t)i=this.iter();else{null==e&&(e=this.lines+1);let n=this.line(t).from;i=this.iterRange(n,Math.max(n,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new T(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new Q(t):k.from(Q.split(t,[])):x.empty}}class Q extends x{constructor(t,e=function(t){let e=-1;for(let i of t)e+=i.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,n){for(let s=0;;s++){let r=this.text[s],o=n+r.length;if((e?i:o)>=t)return new A(n,o,i,r);n=o+1,i++}}decompose(t,e,i,n){let s=t<=0&&e>=this.length?this:new Q($(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&n){let t=i.pop(),e=P(s.text,t.text.slice(),0,s.length);if(e.length<=32)i.push(new Q(e,t.length+s.length));else{let t=e.length>>1;i.push(new Q(e.slice(0,t)),new Q(e.slice(t)))}}else i.push(s)}replace(t,e,i){if(!(i instanceof Q))return super.replace(t,e,i);[t,e]=R(this,t,e);let n=P(this.text,P(i.text,$(this.text,0,t)),e),s=this.length+i.length-(e-t);return n.length<=32?new Q(n,s):k.from(Q.split(n,[]),s)}sliceString(t,e=this.length,i="\n"){[t,e]=R(this,t,e);let n="";for(let s=0,r=0;s<=e&&rt&&r&&(n+=i),ts&&(n+=o.slice(Math.max(0,t-s),e-s)),s=a+1}return n}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],n=-1;for(let s of t)i.push(s),n+=s.length+1,32==i.length&&(e.push(new Q(i,n)),i=[],n=-1);return n>-1&&e.push(new Q(i,n)),e}}class k extends x{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let i of t)this.lines+=i.lines}lineInner(t,e,i,n){for(let s=0;;s++){let r=this.children[s],o=n+r.length,a=i+r.lines-1;if((e?a:o)>=t)return r.lineInner(t,e,i,n);n=o+1,i=a+1}}decompose(t,e,i,n){for(let s=0,r=0;r<=e&&s=r){let s=n&((r<=t?1:0)|(a>=e?2:0));r>=t&&a<=e&&!s?i.push(o):o.decompose(t-r,e-r,i,s)}r=a+1}}replace(t,e,i){if([t,e]=R(this,t,e),i.lines=s&&e<=o){let a=r.replace(t-s,e-s,i),l=this.lines-r.lines+a.lines;if(a.lines>4&&a.lines>l>>6){let s=this.children.slice();return s[n]=a,new k(s,this.length-(e-t)+i.length)}return super.replace(s,o,a)}s=o+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i="\n"){[t,e]=R(this,t,e);let n="";for(let s=0,r=0;st&&s&&(n+=i),tr&&(n+=o.sliceString(t-r,e-r,i)),r=a+1}return n}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof k))return 0;let i=0,[n,s,r,o]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;n+=e,s+=e){if(n==r||s==o)return i;let a=this.children[n],l=t.children[s];if(a!=l)return i+a.scanIdentical(l,e);i+=a.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let i=0;for(let f of t)i+=f.lines;if(i<32){let i=[];for(let e of t)e.flatten(i);return new Q(i,e)}let n=Math.max(32,i>>5),s=n<<1,r=n>>1,o=[],a=0,l=-1,h=[];function c(t){let e;if(t.lines>s&&t instanceof k)for(let i of t.children)c(i);else t.lines>r&&(a>r||!a)?(u(),o.push(t)):t instanceof Q&&a&&(e=h[h.length-1])instanceof Q&&t.lines+e.lines<=32?(a+=t.lines,l+=t.length+1,h[h.length-1]=new Q(e.text.concat(t.text),e.length+1+t.length)):(a+t.lines>n&&u(),a+=t.lines,l+=t.length+1,h.push(t))}function u(){0!=a&&(o.push(1==h.length?h[0]:k.from(h,l)),l=-1,a=h.length=0)}for(let f of t)c(f);return u(),1==o.length?o[0]:new k(o,e)}}function P(t,e,i=0,n=1e9){for(let s=0,r=0,o=!0;r=i&&(l>n&&(a=a.slice(0,n-s)),s0?1:(t instanceof Q?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,n=this.nodes[i],s=this.offsets[i],r=s>>1,o=n instanceof Q?n.text.length:n.children.length;if(r==(e>0?o:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&s)==(e>0?0:1)){if(this.offsets[i]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(n instanceof Q){let s=n.text[r+(e<0?-1:0)];if(this.offsets[i]+=e,s.length>Math.max(0,t))return this.value=0==t?s:e>0?s.slice(t):s.slice(0,s.length-t),this;t-=s.length}else{let s=n.children[r+(e<0?-1:0)];t>s.length?(t-=s.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(s),this.offsets.push(e>0?1:(s instanceof Q?s.text.length:s.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class C{constructor(t,e,i){this.value="",this.done=!1,this.cursor=new Z(t,e>i?-1:1),this.pos=e>i?t.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:n}=this.cursor.next(t);return this.pos+=(n.length+t)*e,this.value=n.length<=i?n:e<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class T{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:i,value:n}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(x.prototype[Symbol.iterator]=function(){return this.iter()},Z.prototype[Symbol.iterator]=C.prototype[Symbol.iterator]=T.prototype[Symbol.iterator]=function(){return this});let A=class{constructor(t,e,i,n){this.from=t,this.to=e,this.number=i,this.text=n}get length(){return this.to-this.from}};function R(t,e,i){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,i))]}let M="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t=>t?parseInt(t,36):1));for(let yw=1;ywt)return M[e-1]<=t;return!1}function q(t){return t>=127462&&t<=127487}function V(t,e,i=!0,n=!0){return(i?E:z)(t,e,n)}function E(t,e,i){if(e==t.length)return e;e&&Y(t.charCodeAt(e))&&L(t.charCodeAt(e-1))&&e--;let n=_(t,e);for(e+=j(n);e=0&&q(_(t,n));)i++,n-=2;if(i%2==0)break;e+=2}}}return e}function z(t,e,i){for(;e>0;){let n=E(t,e-2,i);if(n=56320&&t<57344}function L(t){return t>=55296&&t<56320}function _(t,e){let i=t.charCodeAt(e);if(!L(i)||e+1==t.length)return i;let n=t.charCodeAt(e+1);return Y(n)?n-56320+(i-55296<<10)+65536:i}function D(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function j(t){return t<65536?1:2}const B=/\r\n?|\n/;var W=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(W||(W={}));class I{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;et)return s+(t-n);s+=o}else{if(i!=W.Simple&&l>=t&&(i==W.TrackDel&&nt||i==W.TrackBefore&&nt))return null;if(l>t||l==t&&e<0&&!o)return t==n||e<0?s:s+a;s+=a}n=l}if(t>n)throw new RangeError(`Position ${t} is out of range for changeset of length ${n}`);return s}touchesRange(t,e=t){for(let i=0,n=0;i=0&&n<=e&&s>=t)return!(ne)||"cover";n=s}return!1}toString(){let t="";for(let e=0;e=0?":"+n:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new I(t)}static create(t){return new I(t)}}class G extends I{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return H(this,((e,i,n,s,r)=>t=t.replace(n,n+(i-e),r)),!1),t}mapDesc(t,e=!1){return F(this,t,e,!0)}invert(t){let e=this.sections.slice(),i=[];for(let n=0,s=0;n=0){e[n]=o,e[n+1]=r;let a=n>>1;for(;i.length0&&N(i,e,s.text),s.forward(t),o+=t}let l=t[r++];for(;o>1].toJSON()))}return t}static of(t,e,i){let n=[],s=[],r=0,o=null;function a(t=!1){if(!t&&!n.length)return;ro||t<0||o>e)throw new RangeError(`Invalid change range ${t} to ${o} (in doc of length ${e})`);let c=h?"string"==typeof h?x.of(h.split(i||B)):h:x.empty,u=c.length;if(t==o&&0==u)return;tr&&U(n,t-r,-1),U(n,o-t,u),N(s,n,c),r=o}}(t),a(!o),o}static empty(t){return new G(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],i=[];for(let n=0;ne&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==s.length)e.push(s[0],0);else{for(;i.length=0&&i<=0&&i==t[s+1]?t[s]+=e:0==e&&0==t[s]?t[s+1]+=i:n?(t[s]+=e,t[s+1]+=i):t.push(e,i)}function N(t,e,i){if(0==i.length)return;let n=e.length-2>>1;if(n>1])),!(i||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(s,h,r,c,u),s=h,r=c}}}function F(t,e,i,n=!1){let s=[],r=n?[]:null,o=new J(t),a=new J(e);for(let l=-1;;)if(-1==o.ins&&-1==a.ins){let t=Math.min(o.len,a.len);U(s,t,-1),o.forward(t),a.forward(t)}else if(a.ins>=0&&(o.ins<0||l==o.i||0==o.off&&(a.len=0&&l=0)){if(o.done&&a.done)return r?G.createSet(s,r):I.create(s);throw new Error("Mismatched change set lengths")}{let t=0,e=o.len;for(;e;)if(-1==a.ins){let i=Math.min(e,a.len);t+=i,e-=i,a.forward(i)}else{if(!(0==a.ins&&a.lent||o.ins>=0&&o.len>t)&&(a||n.length>e),r.forward2(t),o.forward(t)}}else U(n,0,o.ins,a),s&&N(s,n,o.text),o.next()}}class J{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i>1;return e>=t.length?x.empty:t[e]}textBit(t){let{inserted:e}=this.set,i=this.i-2>>1;return i>=e.length&&!t?x.empty:e[i].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class tt{constructor(t,e,i){this.from=t,this.to=e,this.flags=i}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let i,n;return this.empty?i=n=t.mapPos(this.from,e):(i=t.mapPos(this.from,1),n=t.mapPos(this.to,-1)),i==this.from&&n==this.to?this:new tt(i,n,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return et.range(t,e);let i=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return et.range(this.anchor,i)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return et.range(t.anchor,t.head)}static create(t,e,i){return new tt(t,e,i)}}class et{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:et.create(this.ranges.map((i=>i.map(t,e))),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let i=0;it.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new et(t.ranges.map((t=>tt.fromJSON(t))),t.main)}static single(t,e=t){return new et([et.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let i=0,n=0;nt?8:0)|s)}static normalized(t,e=0){let i=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(i);for(let n=1;ni.head?et.range(o,r):et.range(r,o))}}return new et(t,e)}}function it(t,e){for(let i of t.ranges)if(i.to>e)throw new RangeError("Selection points outside of document")}let nt=0;class st{constructor(t,e,i,n,s){this.combine=t,this.compareInput=e,this.compare=i,this.isStatic=n,this.id=nt++,this.default=t([]),this.extensions="function"==typeof s?s(this):s}get reader(){return this}static define(t={}){return new st(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:rt),!!t.static,t.enables)}of(t){return new ot([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new ot(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new ot(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(i=>e(i.field(t))))}}function rt(t,e){return t==e||t.length==e.length&&t.every(((t,i)=>t===e[i]))}class ot{constructor(t,e,i,n){this.dependencies=t,this.facet=e,this.type=i,this.value=n,this.id=nt++}dynamicSlot(t){var e;let i=this.value,n=this.facet.compareInput,s=this.id,r=t[s]>>1,o=2==this.type,a=!1,l=!1,h=[];for(let c of this.dependencies)"doc"==c?a=!0:"selection"==c?l=!0:1&(null!==(e=t[c.id])&&void 0!==e?e:1)||h.push(t[c.id]);return{create:t=>(t.values[r]=i(t),1),update(t,e){if(a&&e.docChanged||l&&(e.docChanged||e.selection)||lt(t,h)){let e=i(t);if(o?!at(e,t.values[r],n):!n(e,t.values[r]))return t.values[r]=e,1}return 0},reconfigure:(t,e)=>{let a,l=e.config.address[s];if(null!=l){let s=xt(e,l);if(this.dependencies.every((i=>i instanceof st?e.facet(i)===t.facet(i):!(i instanceof ut)||e.field(i,!1)==t.field(i,!1)))||(o?at(a=i(t),s,n):n(a=i(t),s)))return t.values[r]=s,0}else a=i(t);return t.values[r]=a,1}}}}function at(t,e,i){if(t.length!=e.length)return!1;for(let n=0;nt[e.id])),s=i.map((t=>t.type)),r=n.filter((t=>!(1&t))),o=t[e.id]>>1;function a(t){let i=[];for(let e=0;et===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(ct).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,i)=>{let n=t.values[e],s=this.updateF(n,i);return this.compareF(n,s)?0:(t.values[e]=s,1)},reconfigure:(t,i)=>null!=i.config.address[this.id]?(t.values[e]=i.field(this),0):(t.values[e]=this.create(t),1)}}init(t){return[this,ct.of({field:this,create:t})]}get extension(){return this}}const ft=4,dt=3,Ot=2,pt=1;function mt(t){return e=>new bt(e,t)}const gt={highest:mt(0),high:mt(pt),default:mt(Ot),low:mt(dt),lowest:mt(ft)};class bt{constructor(t,e){this.inner=t,this.prec=e}}class vt{of(t){return new wt(this,t)}reconfigure(t){return vt.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class wt{constructor(t,e){this.compartment=t,this.inner=e}}class St{constructor(t,e,i,n,s,r){for(this.base=t,this.compartments=e,this.dynamicSlots=i,this.address=n,this.staticValues=s,this.facets=r,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(t,e,i){let n=[],s=Object.create(null),r=new Map;for(let u of function(t,e,i){let n=[[],[],[],[],[]],s=new Map;function r(t,o){let a=s.get(t);if(null!=a){if(a<=o)return;let e=n[a].indexOf(t);e>-1&&n[a].splice(e,1),t instanceof wt&&i.delete(t.compartment)}if(s.set(t,o),Array.isArray(t))for(let e of t)r(e,o);else if(t instanceof wt){if(i.has(t.compartment))throw new RangeError("Duplicate use of compartment in extensions");let n=e.get(t.compartment)||t.inner;i.set(t.compartment,n),r(n,o)}else if(t instanceof bt)r(t.inner,t.prec);else if(t instanceof ut)n[o].push(t),t.provides&&r(t.provides,o);else if(t instanceof ot)n[o].push(t),t.facet.extensions&&r(t.facet.extensions,Ot);else{let e=t.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(e,o)}}return r(t,Ot),n.reduce(((t,e)=>t.concat(e)))}(t,e,r))u instanceof ut?n.push(u):(s[u.facet.id]||(s[u.facet.id]=[])).push(u);let o=Object.create(null),a=[],l=[];for(let u of n)o[u.id]=l.length<<1,l.push((t=>u.slot(t)));let h=null==i?void 0:i.config.facets;for(let u in s){let t=s[u],e=t[0].facet,n=h&&h[u]||[];if(t.every((t=>0==t.type)))if(o[e.id]=a.length<<1|1,rt(n,t))a.push(i.facet(e));else{let n=e.combine(t.map((t=>t.value)));a.push(i&&e.compare(n,i.facet(e))?i.facet(e):n)}else{for(let e of t)0==e.type?(o[e.id]=a.length<<1|1,a.push(e.value)):(o[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));o[e.id]=l.length<<1,l.push((i=>ht(i,e,t)))}}let c=l.map((t=>t(o)));return new St(t,r,c,o,a,s)}}function yt(t,e){if(1&e)return 2;let i=e>>1,n=t.status[i];if(4==n)throw new Error("Cyclic dependency between fields and/or facets");if(2&n)return n;t.status[i]=4;let s=t.computeSlot(t,t.config.dynamicSlots[i]);return t.status[i]=2|s}function xt(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const Qt=st.define(),kt=st.define({combine:t=>t.some((t=>t)),static:!0}),Pt=st.define({combine:t=>t.length?t[0]:void 0,static:!0}),$t=st.define(),Zt=st.define(),Ct=st.define(),Tt=st.define({combine:t=>!!t.length&&t[0]});class At{constructor(t,e){this.type=t,this.value=e}static define(){return new Rt}}class Rt{of(t){return new At(this,t)}}class Mt{constructor(t){this.map=t}of(t){return new Xt(this,t)}}class Xt{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new Xt(this.type,e)}is(t){return this.type==t}static define(t={}){return new Mt(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let i=[];for(let n of t){let t=n.map(e);t&&i.push(t)}return i}}Xt.reconfigure=Xt.define(),Xt.appendConfig=Xt.define();class qt{constructor(t,e,i,n,s,r){this.startState=t,this.changes=e,this.selection=i,this.effects=n,this.annotations=s,this.scrollIntoView=r,this._doc=null,this._state=null,i&&it(i,e.newLength),s.some((t=>t.type==qt.time))||(this.annotations=s.concat(qt.time.of(Date.now())))}static create(t,e,i,n,s,r){return new qt(t,e,i,n,s,r)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(qt.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function Vt(t,e){let i=[];for(let n=0,s=0;;){let r,o;if(n=t[n]))r=t[n++],o=t[n++];else{if(!(s=0;s--){let r=i[s](t);r&&Object.keys(r).length&&(n=Et(n,zt(e,r,t.changes.newLength),!0))}return n==t?t:qt.create(e,t.changes,t.selection,n.effects,n.annotations,n.scrollIntoView)}(i?function(t){let e=t.startState,i=!0;for(let s of e.facet($t)){let e=s(t);if(!1===e){i=!1;break}Array.isArray(e)&&(i=!0===i?e:Vt(i,e))}if(!0!==i){let n,s;if(!1===i)s=t.changes.invertedDesc,n=G.empty(e.doc.length);else{let e=t.changes.filter(i);n=e.changes,s=e.filtered.mapDesc(e.changes).invertedDesc}t=qt.create(e,n,t.selection&&t.selection.map(s),Xt.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let n=e.facet(Zt);for(let s=n.length-1;s>=0;s--){let i=n[s](t);t=i instanceof qt?i:Array.isArray(i)&&1==i.length&&i[0]instanceof qt?i[0]:Yt(e,_t(i),!1)}return t}(s):s)}qt.time=At.define(),qt.userEvent=At.define(),qt.addToHistory=At.define(),qt.remote=At.define();const Lt=[];function _t(t){return null==t?Lt:Array.isArray(t)?t:[t]}var Dt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Dt||(Dt={}));const jt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Bt;try{Bt=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(Sw){}function Wt(t){return e=>{if(!/\S/.test(e))return Dt.Space;if(function(t){if(Bt)return Bt.test(t);for(let e=0;e"€"&&(i.toUpperCase()!=i.toLowerCase()||jt.test(i)))return!0}return!1}(e))return Dt.Word;for(let i=0;i-1)return Dt.Word;return Dt.Other}}class It{constructor(t,e,i,n,s,r){this.config=t,this.doc=e,this.selection=i,this.values=n,this.status=t.statusTemplate.slice(),this.computeSlot=s,r&&(r._state=this);for(let o=0;os.set(e,t))),i=null),s.set(o.value.compartment,o.value.extension)):o.is(Xt.reconfigure)?(i=null,n=o.value):o.is(Xt.appendConfig)&&(i=null,n=_t(n).concat(o.value));if(i)e=t.startState.values.slice();else{i=St.resolve(n,s,this),e=new It(i,this.doc,this.selection,i.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values}let r=t.startState.facet(kt)?t.newSelection:t.newSelection.asSingle();new It(i,t.newDoc,r,e,((e,i)=>i.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:et.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,i=t(e.ranges[0]),n=this.changes(i.changes),s=[i.range],r=_t(i.effects);for(let o=1;oe.spec.fromJSON(r,t))))}return It.create({doc:t.doc,selection:et.fromJSON(t.selection),extensions:e.extensions?n.concat([e.extensions]):n})}static create(t={}){let e=St.resolve(t.extensions||[],new Map),i=t.doc instanceof x?t.doc:x.of((t.doc||"").split(e.staticFacet(It.lineSeparator)||B)),n=t.selection?t.selection instanceof et?t.selection:et.single(t.selection.anchor,t.selection.head):et.single(0);return it(n,i.length),e.staticFacet(kt)||(n=n.asSingle()),new It(e,i,n,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(It.tabSize)}get lineBreak(){return this.facet(It.lineSeparator)||"\n"}get readOnly(){return this.facet(Tt)}phrase(t,...e){for(let i of this.facet(It.phrases))if(Object.prototype.hasOwnProperty.call(i,t)){t=i[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,((t,i)=>{if("$"==i)return"$";let n=+(i||1);return!n||n>e.length?t:e[n-1]}))),t}languageDataAt(t,e,i=-1){let n=[];for(let s of this.facet(Qt))for(let r of s(this,e,i))Object.prototype.hasOwnProperty.call(r,t)&&n.push(r[t]);return n}charCategorizer(t){return Wt(this.languageDataAt("wordChars",t).join(""))}wordAt(t){let{text:e,from:i,length:n}=this.doc.lineAt(t),s=this.charCategorizer(t),r=t-i,o=t-i;for(;r>0;){let t=V(e,r,!1);if(s(e.slice(t,r))!=Dt.Word)break;r=t}for(;ot.length?t[0]:4}),It.lineSeparator=Pt,It.readOnly=Tt,It.phrases=st.define({compare(t,e){let i=Object.keys(t),n=Object.keys(e);return i.length==n.length&&i.every((i=>t[i]==e[i]))}}),It.languageData=Qt,It.changeFilter=$t,It.transactionFilter=Zt,It.transactionExtender=Ct,vt.reconfigure=Xt.define();class Ut{eq(t){return this==t}range(t,e=t){return Nt.create(t,e,this)}}Ut.prototype.startSide=Ut.prototype.endSide=0,Ut.prototype.point=!1,Ut.prototype.mapMode=W.TrackDel;let Nt=class t{constructor(t,e,i){this.from=t,this.to=e,this.value=i}static create(e,i,n){return new t(e,i,n)}};function Ht(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Ft{constructor(t,e,i,n){this.from=t,this.to=e,this.value=i,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(t,e,i,n=0){let s=i?this.to:this.from;for(let r=n,o=s.length;;){if(r==o)return r;let n=r+o>>1,a=s[n]-t||(i?this.value[n].endSide:this.value[n].startSide)-e;if(n==r)return a>=0?r:o;a>=0?o=n:r=n+1}}between(t,e,i,n){for(let s=this.findIndex(e,-1e9,!0),r=this.findIndex(i,1e9,!1,s);sh||l==h&&c.startSide>0&&c.endSide<=0)continue;(h-l||c.endSide-c.startSide)<0||(r<0&&(r=l),c.point&&(o=Math.max(o,h-l)),i.push(c),n.push(l-r),s.push(h-r))}return{mapped:i.length?new Ft(n,s,i,o):null,pos:r}}}class Kt{constructor(t,e,i,n){this.chunkPos=t,this.chunk=e,this.nextLayer=i,this.maxPoint=n}static create(t,e,i,n){return new Kt(t,e,i,n)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:i=!1,filterFrom:n=0,filterTo:s=this.length}=t,r=t.filter;if(0==e.length&&!r)return this;if(i&&(e=e.slice().sort(Ht)),this.isEmpty)return e.length?Kt.of(e):this;let o=new ee(this,null,-1).goto(0),a=0,l=[],h=new Jt;for(;o.value||a=0){let t=e[a++];h.addInner(t.from,t.to,t.value)||l.push(t)}else 1==o.rangeIndex&&o.chunkIndexthis.chunkEnd(o.chunkIndex)||so.to||s=s&&t<=s+r.length&&!1===r.between(s,t-s,e-s,i))return}this.nextLayer.between(t,e,i)}}iter(t=0){return ie.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return ie.from(t).goto(e)}static compare(t,e,i,n,s=-1){let r=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),o=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),a=te(r,o,i),l=new se(r,a,s),h=new se(o,a,s);i.iterGaps(((t,e,i)=>re(l,t,h,e,i,n))),i.empty&&0==i.length&&re(l,0,h,0,0,n)}static eq(t,e,i=0,n){null==n&&(n=999999999);let s=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),r=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(s.length!=r.length)return!1;if(!s.length)return!0;let o=te(s,r),a=new se(s,o,0).goto(i),l=new se(r,o,0).goto(i);for(;;){if(a.to!=l.to||!oe(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>n)return!0;a.next(),l.next()}}static spans(t,e,i,n,s=-1){let r=new se(t,null,s).goto(e),o=e,a=r.openStart;for(;;){let t=Math.min(r.to,i);if(r.point){let i=r.activeForPoint(r.to),s=r.pointFromo&&(n.span(o,t,r.active,a),a=r.openEnd(t));if(r.to>i)return a+(r.point&&r.to>i?1:0);o=r.to,r.next()}}static of(t,e=!1){let i=new Jt;for(let n of t instanceof Nt?[t]:e?function(t){if(t.length>1)for(let e=t[0],i=1;i0)return t.slice().sort(Ht);e=n}return t}(t):t)i.add(n.from,n.to,n.value);return i.finish()}static join(t){if(!t.length)return Kt.empty;let e=t[t.length-1];for(let i=t.length-2;i>=0;i--)for(let n=t[i];n!=Kt.empty;n=n.nextLayer)e=new Kt(n.chunkPos,n.chunk,e,Math.max(n.maxPoint,e.maxPoint));return e}}Kt.empty=new Kt([],[],null,-1),Kt.empty.nextLayer=Kt.empty;class Jt{finishChunk(t){this.chunks.push(new Ft(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,i){this.addInner(t,e,i)||(this.nextLayer||(this.nextLayer=new Jt)).add(t,e,i)}addInner(t,e,i){let n=t-this.lastTo||i.startSide-this.last.endSide;if(n<=0&&(t-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(n<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=t,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+t,this.lastTo=e.to[i]+t,!0}finish(){return this.finishInner(Kt.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=Kt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function te(t,e,i){let n=new Map;for(let r of t)for(let t=0;t=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&n.push(new ee(r,e,i,s));return 1==n.length?n[0]:new ie(n)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let i of this.heap)i.goto(t,e);for(let i=this.heap.length>>1;i>=0;i--)ne(this.heap,i);return this.next(),this}forward(t,e){for(let i of this.heap)i.forward(t,e);for(let i=this.heap.length>>1;i>=0;i--)ne(this.heap,i);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),ne(this.heap,0)}}}function ne(t,e){for(let i=t[e];;){let n=1+(e<<1);if(n>=t.length)break;let s=t[n];if(n+1=0&&(s=t[n+1],n++),i.compare(s)<0)break;t[n]=i,t[e]=s,e=n}}class se{constructor(t,e,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=ie.from(t,e,i)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){ae(this.active,t),ae(this.activeTo,t),ae(this.activeRank,t),this.minActive=he(this.active,this.activeTo)}addActive(t){let e=0,{value:i,to:n,rank:s}=this.cursor;for(;e0;)e++;le(this.active,e,i),le(this.activeTo,e,n),le(this.activeRank,e,s),t&&le(t,e,this.cursor.from),this.minActive=he(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let n=this.minActive;if(n>-1&&(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)<0){if(this.activeTo[n]>t){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),i&&ae(i,n)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from=0&&i[e]=0&&!(this.activeRank[i]t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}openEnd(t){let e=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)e++;return e}}function re(t,e,i,n,s,r){t.goto(e),i.goto(n);let o=n+s,a=n,l=n-e;for(;;){let e=t.to+l-i.to||t.endSide-i.endSide,n=e<0?t.to+l:i.to,s=Math.min(n,o);if(t.point||i.point?t.point&&i.point&&(t.point==i.point||t.point.eq(i.point))&&oe(t.activeForPoint(t.to),i.activeForPoint(i.to))||r.comparePoint(a,s,t.point,i.point):s>a&&!oe(t.active,i.active)&&r.compareRange(a,s,t.active,i.active),n>o)break;a=n,e<=0&&t.next(),e>=0&&i.next()}}function oe(t,e){if(t.length!=e.length)return!1;for(let i=0;i=e;n--)t[n+1]=t[n];t[e]=i}function he(t,e){let i=-1,n=1e9;for(let s=0;s=e)return s;if(s==t.length)break;r+=9==t.charCodeAt(s)?i-r%i:1,s=V(t,s)}return!0===n?-1:t.length}const fe="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),de="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class pe{constructor(t,e){this.rules=[];let{finish:i}=e||{};function n(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function s(t,e,r,o){let a=[],l=/^@(\w+)\b/.exec(t[0]),h=l&&"keyframes"==l[1];if(l&&null==e)return r.push(t[0]+";");for(let i in e){let o=e[i];if(/&/.test(i))s(i.split(/,\s*/).map((e=>t.map((t=>e.replace(/&/,t))))).reduce(((t,e)=>t.concat(e))),o,r);else if(o&&"object"==typeof o){if(!l)throw new RangeError("The value of a property ("+i+") should be a primitive value.");s(n(i),o,a,h)}else null!=o&&a.push(i.replace(/_.*/,"").replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))+": "+o+";")}(a.length||h)&&r.push((!i||l||o?t:t.map(i)).join(", ")+" {"+a.join(" ")+"}")}for(let r in t)s(n(r),t[r],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=Oe[fe]||1;return Oe[fe]=t+1,"ͼ"+t.toString(36)}static mount(t,e,i){let n=t[de],s=i&&i.nonce;n?s&&n.setNonce(s):n=new ge(t,s),n.mount(Array.isArray(e)?e:[e],t)}}let me=new Map;class ge{constructor(t,e){let i=t.ownerDocument||t,n=i.defaultView;if(!t.head&&t.adoptedStyleSheets&&n.CSSStyleSheet){let e=me.get(i);if(e)return t[de]=e;this.sheet=new n.CSSStyleSheet,me.set(i,this)}else this.styleTag=i.createElement("style"),e&&this.styleTag.setAttribute("nonce",e);this.modules=[],t[de]=this}mount(t,e){let i=this.sheet,n=0,s=0;for(let r=0;r-1&&(this.modules.splice(o,1),s--,o=-1),-1==o){if(this.modules.splice(s++,0,e),i)for(let t=0;t",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},we="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Se="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ye=0;ye<10;ye++)be[48+ye]=be[96+ye]=String(ye);for(ye=1;ye<=24;ye++)be[ye+111]="F"+ye;for(ye=65;ye<=90;ye++)be[ye]=String.fromCharCode(ye+32),ve[ye]=String.fromCharCode(ye);for(var xe in be)ve.hasOwnProperty(xe)||(ve[xe]=be[xe]);function Qe(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function ke(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function Pe(t,e){if(!e.anchorNode)return!1;try{return ke(t,e.anchorNode)}catch(Sw){return!1}}function $e(t){return 3==t.nodeType?Le(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function Ze(t,e,i,n){return!!i&&(Ae(t,e,i,n,-1)||Ae(t,e,i,n,1))}function Ce(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function Te(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function Ae(t,e,i,n,s){for(;;){if(t==i&&e==n)return!0;if(e==(s<0?0:Re(t))){if("DIV"==t.nodeName)return!1;let i=t.parentNode;if(!i||1!=i.nodeType)return!1;e=Ce(t)+(s<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(s<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=s<0?Re(t):0}}}function Re(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Me(t,e){let i=e?t.left:t.right;return{left:i,right:i,top:t.top,bottom:t.bottom}}function Xe(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function qe(t,e){let i=e.width/t.offsetWidth,n=e.height/t.offsetHeight;return(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.width-t.offsetWidth)<1)&&(i=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-t.offsetHeight)<1)&&(n=1),{scaleX:i,scaleY:n}}class Ve{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:i}=t;this.set(e,Math.min(t.anchorOffset,e?Re(e):0),i,Math.min(t.focusOffset,i?Re(i):0))}set(t,e,i,n){this.anchorNode=t,this.anchorOffset=e,this.focusNode=i,this.focusOffset=n}}let Ee,ze=null;function Ye(t){if(t.setActive)return t.setActive();if(ze)return t.focus(ze);let e=[];for(let i=t;i&&(e.push(i,i.scrollTop,i.scrollLeft),i!=i.ownerDocument);i=i.parentNode);if(t.focus(null==ze?{get preventScroll(){return ze={preventScroll:!0},!0}}:void 0),!ze){ze=!1;for(let t=0;tMath.max(1,t.scrollHeight-t.clientHeight-4)}function Be(t,e){for(let i=t,n=e;;){if(3==i.nodeType&&n>0)return{node:i,offset:n};if(1==i.nodeType&&n>0){if("false"==i.contentEditable)return null;i=i.childNodes[n-1],n=Re(i)}else{if(!i.parentNode||Te(i))return null;n=Ce(i),i=i.parentNode}}}function We(t,e){for(let i=t,n=e;;){if(3==i.nodeType&&ne)return i.domBoundsAround(t,e,l);if(c>=t&&-1==n&&(n=a,s=l),l>e&&i.dom.parentNode==this.dom){r=a,o=h;break}h=c,l=c+i.breakAfter}return{from:s,to:o<0?i+this.length:o,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:r=0?this.children[r].dom:null}}markDirty(t=!1){this.flags|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.flags|=2),1&e.flags)return;e.flags|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,7&this.flags&&this.markParentsDirty(!0))}setDOM(t){this.dom!=t&&(this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this)}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,i=Ge){this.markDirty();for(let n=t;nthis.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Fe(t,e,i,n,s,r,o,a,l){let{children:h}=t,c=h.length?h[e]:null,u=r.length?r[r.length-1]:null,f=u?u.breakAfter:o;if(!(e==n&&c&&!o&&!f&&r.length<2&&c.merge(i,s,r.length?u:null,0==i,a,l))){if(n0&&(!o&&r.length&&c.merge(i,c.length,r[0],!1,a,0)?c.breakAfter=r.shift().breakAfter:(i2);var ci={mac:hi||/Mac/.test(Je.platform),windows:/Win/.test(Je.platform),linux:/Linux|X11/.test(Je.platform),ie:si,ie_version:ii?ti.documentMode||6:ni?+ni[1]:ei?+ei[1]:0,gecko:ri,gecko_version:ri?+(/Firefox\/(\d+)/.exec(Je.userAgent)||[0,0])[1]:0,chrome:!!oi,chrome_version:oi?+oi[1]:0,ios:hi,android:/Android\b/.test(Je.userAgent),webkit:ai,safari:li,webkit_version:ai?+(/\bAppleWebKit\/(\d+)/.exec(Je.userAgent)||[0,0])[1]:0,tabSize:null!=ti.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class ui extends Ue{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,i){return!(8&this.flags||i&&(!(i instanceof ui)||this.length-(e-t)+i.length>256||8&i.flags))&&(this.text=this.text.slice(0,t)+(i?i.text:"")+this.text.slice(e),this.markDirty(),!0)}split(t){let e=new ui(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e.flags|=8&this.flags,e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new Ie(this.dom,t)}domBoundsAround(t,e,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return function(t,e,i){let n=t.nodeValue.length;e>n&&(e=n);let s=e,r=e,o=0;0==e&&i<0||e==n&&i>=0?ci.chrome||ci.gecko||(e?(s--,o=1):r=0)?0:a.length-1];ci.safari&&!o&&0==l.width&&(l=Array.prototype.find.call(a,(t=>t.width))||l);return o?Me(l,o<0):l||null}(this.dom,t,e)}}class fi extends Ue{constructor(t,e=[],i=0){super(),this.mark=t,this.children=e,this.length=i;for(let n of e)n.setParent(this)}setAttrs(t){if(De(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}canReuseDOM(t){return super.canReuseDOM(t)&&!(8&(this.flags|t.flags))}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.flags|=6)}sync(t,e){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t,e)}merge(t,e,i,n,s,r){return(!i||!(!(i instanceof fi&&i.mark.eq(this.mark))||t&&s<=0||et&&e.push(i=t&&(n=s),i=r,s++}let r=this.length-t;return this.length=t,n>-1&&(this.children.length=n,this.markDirty()),new fi(this.mark,e,r)}domAtPos(t){return pi(this,t)}coordsAt(t,e){return gi(this,t,e)}}class di extends Ue{static create(t,e,i){return new di(t,e,i)}constructor(t,e,i){super(),this.widget=t,this.length=e,this.side=i,this.prevWidget=null}split(t){let e=di.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(t,e,i,n,s,r){return!(i&&(!(i instanceof di&&this.widget.compare(i.widget))||t>0&&s<=0||e0)?Ie.before(this.dom):Ie.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,e){let i=this.widget.coordsAt(this.dom,t,e);if(i)return i;let n=this.dom.getClientRects(),s=null;if(!n.length)return null;let r=this.side?this.side<0:t>0;for(let o=r?n.length-1:0;s=n[o],!(t>0?0==o:o==n.length-1||s.top0?Ie.before(this.dom):Ie.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){return this.dom.getBoundingClientRect()}get overrideDOMText(){return x.empty}get isHidden(){return!0}}function pi(t,e){let i=t.dom,{children:n}=t,s=0;for(let r=0;sr&&e0;r--){let t=n[r-1];if(t.dom.parentNode==i)return t.domAtPos(t.length)}for(let r=s;r0&&e instanceof fi&&s.length&&(n=s[s.length-1])instanceof fi&&n.mark.eq(e.mark)?mi(n,e.children[0],i-1):(s.push(e),e.setParent(t)),t.length+=e.length}function gi(t,e,i){let n=null,s=-1,r=null,o=-1;!function t(e,a){for(let l=0,h=0;l=a&&(c.children.length?t(c,a-h):(!r||r.isHidden&&i>0)&&(u>a||h==u&&c.getSide()>0)?(r=c,o=a-h):(h-1?1:0)!=s.length-(i&&s.indexOf(i)>-1?1:0))return!1;for(let r of n)if(r!=i&&(-1==s.indexOf(r)||t[r]!==e[r]))return!1;return!0}function Si(t,e,i){let n=!1;if(e)for(let s in e)i&&s in i||(n=!0,"style"==s?t.style.cssText="":t.removeAttribute(s));if(i)for(let s in i)e&&e[s]==i[s]||(n=!0,"style"==s?t.style.cssText=i[s]:t.setAttribute(s,i[s]));return n}function yi(t){let e=Object.create(null);for(let i=0;i0?3e8:-4e8:e>0?1e8:-1e8,new Zi(t,e,e,i,t.widget||null,!1)}static replace(t){let e,i,n=!!t.block;if(t.isBlockGap)e=-5e8,i=4e8;else{let{start:s,end:r}=Ci(t,n);e=(s?n?-3e8:-1:5e8)-1,i=1+(r?n?2e8:1:-6e8)}return new Zi(t,e,i,n,t.widget||null,!0)}static line(t){return new $i(t)}static set(t,e=!1){return Kt.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}ki.none=Kt.empty;class Pi extends ki{constructor(t){let{start:e,end:i}=Ci(t);super(e?-1:5e8,i?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){var e,i;return this==t||t instanceof Pi&&this.tagName==t.tagName&&(this.class||(null===(e=this.attrs)||void 0===e?void 0:e.class))==(t.class||(null===(i=t.attrs)||void 0===i?void 0:i.class))&&wi(this.attrs,t.attrs,"class")}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}Pi.prototype.point=!1;class $i extends ki{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof $i&&this.spec.class==t.spec.class&&wi(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}$i.prototype.mapMode=W.TrackBefore,$i.prototype.point=!0;class Zi extends ki{constructor(t,e,i,n,s,r){super(e,i,s,t),this.block=n,this.isReplace=r,this.mapMode=n?e<=0?W.TrackBefore:W.TrackAfter:W.TrackDel}get type(){return this.startSide!=this.endSide?Qi.WidgetRange:this.startSide<=0?Qi.WidgetBefore:Qi.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof Zi&&(e=this.widget,i=t.widget,e==i||!!(e&&i&&e.compare(i)))&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide;var e,i}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function Ci(t,e=!1){let{inclusiveStart:i,inclusiveEnd:n}=t;return null==i&&(i=t.inclusive),null==n&&(n=t.inclusive),{start:null!=i?i:e,end:null!=n?n:e}}function Ti(t,e,i,n=0){let s=i.length-1;s>=0&&i[s]+n>=t?i[s]=Math.max(i[s],e):i.push(t,e)}Zi.prototype.point=!0;class Ai extends Ue{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,i,n,s,r){if(i){if(!(i instanceof Ai))return!1;this.dom||i.transferDOM(this)}return n&&this.setDeco(i?i.attrs:null),Ke(this,t,e,i?i.children.slice():[],s,r),!0}split(t){let e=new Ai;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i:i,off:n}=this.childPos(t);n&&(e.append(this.children[i].split(n),0),this.children[i].merge(n,this.children[i].length,null,!1,0,0),i++);for(let s=i;s0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){wi(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){mi(this,t,e)}addLineDeco(t){let e=t.spec.attributes,i=t.spec.class;e&&(this.attrs=bi(e,this.attrs||{})),i&&(this.attrs=bi({class:i},this.attrs||{}))}domAtPos(t){return pi(this,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.flags|=6)}sync(t,e){var i;this.dom?4&this.flags&&(De(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(Si(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t,e);let n=this.dom.lastChild;for(;n&&Ue.get(n)instanceof fi;)n=n.lastChild;if(!(n&&this.length&&("BR"==n.nodeName||0!=(null===(i=Ue.get(n))||void 0===i?void 0:i.isEditable)||ci.ios&&this.children.some((t=>t instanceof ui))))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t,e=0;for(let i of this.children){if(!(i instanceof ui)||/[^ -~]/.test(i.text))return null;let n=$e(i.dom);if(1!=n.length)return null;e+=n[0].width,t=n[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(t,e){let i=gi(this,t,e);if(!this.children.length&&i&&this.parent){let{heightOracle:t}=this.parent.view.viewState,e=i.bottom-i.top;if(Math.abs(e-t.lineHeight)<2&&t.textHeight=e){if(s instanceof Ai)return s;if(r>e)break}n=r+s.breakAfter}return null}}class Ri extends Ue{constructor(t,e,i){super(),this.widget=t,this.length=e,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(t,e,i,n,s,r){return!(i&&(!(i instanceof Ri&&this.widget.compare(i.widget))||t>0&&s<=0||e0)}}class Mi extends xi{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Xi{constructor(t,e,i,n){this.doc=t,this.pos=e,this.end=i,this.disallowBlockEffectsFor=n,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=e}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof Ri&&t.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Ai),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(qi(new Oi(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||t&&this.content.length&&this.content[this.content.length-1]instanceof Ri||this.getLine()}buildText(t,e,i){for(;t>0;){if(this.textOff==this.text.length){let{value:e,lineBreak:i,done:n}=this.cursor.next(this.skip);if(this.skip=0,n)throw new Error("Ran out of text content when drawing inline views");if(i){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}this.text=e,this.textOff=0}let n=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(e.length-i)),this.getLine().append(qi(new ui(this.text.slice(this.textOff,this.textOff+n)),e),i),this.atCursorPos=!0,this.textOff+=n,t-=n,i=0}}span(t,e,i,n){this.buildText(e-t,i,n),this.pos=e,this.openStart<0&&(this.openStart=n)}point(t,e,i,n,s,r){if(this.disallowBlockEffectsFor[r]&&i instanceof Zi){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let o=e-t;if(i instanceof Zi)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Ri(i.widget||Vi.block,o,i));else{let r=di.create(i.widget||Vi.inline,o,o?0:i.startSide),a=this.atCursorPos&&!r.isEditable&&s<=n.length&&(t0),l=!r.isEditable&&(tn.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||a||r.isEditable||(this.pendingBuffer=0),this.flushBuffer(n),a&&(h.append(qi(new Oi(1),n),s),s=n.length+Math.max(0,s-n.length)),h.append(qi(r,n),s),this.atCursorPos=l,this.pendingBuffer=l?tn.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=n.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);o&&(this.textOff+o<=this.text.length?this.textOff+=o:(this.skip+=o-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=s)}static build(t,e,i,n,s){let r=new Xi(t,e,i,s);return r.openEnd=Kt.spans(n,e,i,r),r.openStart<0&&(r.openStart=r.openEnd),r.finish(r.openEnd),r}}function qi(t,e){for(let i of e)t=new fi(i,[t],t.length);return t}class Vi extends xi{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Vi.inline=new Vi("span"),Vi.block=new Vi("div");var Ei=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Ei||(Ei={}));const zi=Ei.LTR,Yi=Ei.RTL;function Li(t){let e=[];for(let i=0;i=e){if(o.level==i)return r;(s<0||(0!=n?n<0?o.frome:t[s].level>o.level))&&(s=r)}}if(s<0)throw new RangeError("Index out of range");return s}}function Ui(t,e){if(t.length!=e.length)return!1;for(let i=0;il&&o.push(new Gi(l,O.from,f)),Fi(t,O.direction==zi!=!(f%2)?n+1:n,s,O.inner,O.from,O.to,o),l=O.to}d=O.to}else{if(d==i||(e?Ni[d]!=a:Ni[d]==a))break;d++}u?Hi(t,l,d,n+1,s,u,o):le;){let i=!0,c=!1;if(!h||l>r[h-1].to){let t=Ni[l-1];t!=a&&(i=!1,c=16==t)}let u=i||1!=a?null:[],f=i?n:n+1,d=l;t:for(;;)if(h&&d==r[h-1].to){if(c)break t;let O=r[--h];if(!i)for(let t=O.from,i=h;;){if(t==e)break t;if(!i||r[i-1].to!=t){if(Ni[t-1]==a)break t;break}t=r[--i].from}if(u)u.push(O);else{O.to=0;t-=3)if(Bi[t+1]==-i){let e=Bi[t+2],i=2&e?s:4&e?1&e?r:s:0;i&&(Ni[o]=Ni[Bi[t]]=i),a=t;break}}else{if(189==Bi.length)break;Bi[a++]=o,Bi[a++]=e,Bi[a++]=l}else if(2==(n=Ni[o])||1==n){let t=n==s;l=t?0:1;for(let e=a-3;e>=0;e-=3){let i=Bi[e+2];if(2&i)break;if(t)Bi[e+2]|=2;else{if(4&i)break;Bi[e+2]|=4}}}}}(t,s,r,n,a),function(t,e,i,n){for(let s=0,r=n;s<=i.length;s++){let o=s?i[s-1].to:t,a=sl;)e==r&&(e=i[--n].from,r=n?i[n-1].to:t),Ni[--e]=c;l=o}else r=o,l++}}}(s,r,n,a),Hi(t,s,r,e,i,n,o)}function Ki(t){return[new Gi(0,t,0)]}let Ji="";function tn(t,e,i,n,s){var r;let o=n.head-t.from,a=Gi.find(e,o,null!==(r=n.bidiLevel)&&void 0!==r?r:-1,n.assoc),l=e[a],h=l.side(s,i);if(o==h){let t=a+=s?1:-1;if(t<0||t>=e.length)return null;l=e[a=t],o=l.side(!s,i),h=l.side(s,i)}let c=V(t.text,o,l.forward(s,i));(cl.to)&&(c=h),Ji=t.text.slice(Math.min(o,c),Math.max(o,c));let u=a==(s?e.length-1:0)?null:e[a+(s?1:-1)];return u&&c==h&&u.level+(s?0:1)t.some((t=>t))}),dn=st.define({combine:t=>t.some((t=>t))}),On=st.define();class pn{constructor(t,e="nearest",i="nearest",n=5,s=5,r=!1){this.range=t,this.y=e,this.x=i,this.yMargin=n,this.xMargin=s,this.isSnapshot=r}map(t){return t.empty?this:new pn(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new pn(et.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const mn=Xt.define({map:(t,e)=>t.map(e)}),gn=Xt.define();function bn(t,e,i){let n=t.facet(on);n.length?n[0](e):window.onerror?window.onerror(String(e),i,void 0,void 0,e):i?console.error(i+":",e):console.error(e)}const vn=st.define({combine:t=>!t.length||t[0]});let wn=0;const Sn=st.define();class yn{constructor(t,e,i,n,s){this.id=t,this.create=e,this.domEventHandlers=i,this.domEventObservers=n,this.extension=s(this)}static define(t,e){const{eventHandlers:i,eventObservers:n,provide:s,decorations:r}=e||{};return new yn(wn++,t,i,n,(t=>{let e=[Sn.of(t)];return r&&e.push(Pn.of((e=>{let i=e.plugin(t);return i?r(i):ki.none}))),s&&e.push(s(t)),e}))}static fromClass(t,e){return yn.define((e=>new t(e)),e)}}class xn{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(bn(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(Sw){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(e){bn(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(i){bn(t.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Qn=st.define(),kn=st.define(),Pn=st.define(),$n=st.define(),Zn=st.define(),Cn=st.define();function Tn(t,e){let i=t.state.facet(Cn);if(!i.length)return i;let n=i.map((e=>e instanceof Function?e(t):e)),s=[];return Kt.spans(n,e.from,e.to,{point(){},span(t,i,n,r){let o=t-e.from,a=i-e.from,l=s;for(let s=n.length-1;s>=0;s--,r--){let t,i=n[s].spec.bidiIsolate;if(null==i&&(i=en(e.text,o,a)),r>0&&l.length&&(t=l[l.length-1]).to==o&&t.direction==i)t.to=a,l=t.inner;else{let t={from:o,to:a,direction:i,inner:[]};l.push(t),l=t.inner}}}}),s}const An=st.define();function Rn(t){let e=0,i=0,n=0,s=0;for(let r of t.state.facet(An)){let o=r(t);o&&(null!=o.left&&(e=Math.max(e,o.left)),null!=o.right&&(i=Math.max(i,o.right)),null!=o.top&&(n=Math.max(n,o.top)),null!=o.bottom&&(s=Math.max(s,o.bottom)))}return{left:e,right:i,top:n,bottom:s}}const Mn=st.define();class Xn{constructor(t,e,i,n){this.fromA=t,this.toA=e,this.fromB=i,this.toB=n}join(t){return new Xn(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,i=this;for(;e>0;e--){let n=t[e-1];if(!(n.fromA>i.toA)){if(n.toAh)break;s+=2}if(!a)return i;new Xn(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),r=a.toA,o=a.toB}}}class qn{constructor(t,e,i){this.view=t,this.state=e,this.transactions=i,this.flags=0,this.startState=t.state,this.changes=G.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let n=[];this.changes.iterChangedRanges(((t,e,i,s)=>n.push(new Xn(t,e,i,s)))),this.changedRanges=n}static create(t,e,i){return new qn(t,e,i)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class Vn extends Ue{get length(){return this.view.state.doc.length}constructor(t){super(),this.view=t,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=ki.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new Ai],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Xn(0,0,0,t.state.doc.length)],0,null)}update(t){var e;let i=t.changedRanges;this.minWidth>0&&i.length&&(i.every((({fromA:t,toA:e})=>ethis.minWidthTo))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(e=this.domChanged)||void 0===e?void 0:e.newSel)?n=this.domChanged.newSel.head:function(t,e){let i=!1;e&&t.iterChangedRanges(((t,n)=>{te.from&&(i=!0)}));return i}(t.changes,this.hasComposition)||t.selectionSet||(n=t.state.selection.main.head));let s=n>-1?function(t,e,i){let n=En(t,i);if(!n)return null;let{node:s,from:r,to:o}=n,a=s.nodeValue;if(/[\n\r]/.test(a))return null;if(t.state.doc.sliceString(n.from,n.to)!=a)return null;let l=e.invertedDesc,h=new Xn(l.mapPos(r),l.mapPos(o),r,o),c=[];for(let u=s.parentNode;;u=u.parentNode){let e=Ue.get(u);if(e instanceof fi)c.push({node:u,deco:e.mark});else{if(e instanceof Ai||"DIV"==u.nodeName&&u.parentNode==t.contentDOM)return{range:h,text:s,marks:c,line:u};if(u==t.contentDOM)return null;c.push({node:u,deco:new Pi({inclusive:!0,attributes:yi(u),tagName:u.tagName.toLowerCase()})})}}}(this.view,t.changes,n):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:e,to:n}=this.hasComposition;i=new Xn(e,n,t.changes.mapPos(e,-1),t.changes.mapPos(n,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(ci.ie||ci.chrome)&&!s&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let r=function(t,e,i){let n=new zn;return Kt.compare(t,e,i,n),n.changes}(this.decorations,this.updateDeco(),t.changes);return i=Xn.extendWithRanges(i,r),!!(7&this.flags||0!=i.length)&&(this.updateInner(i,t.startState.doc.length,s),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,i);let{observer:n}=this.view;n.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let t=ci.chrome||ci.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,t),this.flags&=-8,t&&(t.written||n.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((t=>t.flags&=-9));let s=[];if(this.view.viewport.from||this.view.viewport.to=0?n[r]:null;if(!t)break;let e,o,a,l,{fromA:h,toA:c,fromB:u,toB:f}=t;if(i&&i.range.fromBu){let t=Xi.build(this.view.state.doc,u,i.range.fromB,this.decorations,this.dynamicDecorationMap),n=Xi.build(this.view.state.doc,i.range.toB,f,this.decorations,this.dynamicDecorationMap);o=t.breakAtStart,a=t.openStart,l=n.openEnd;let s=this.compositionView(i);n.breakAtStart?s.breakAfter=1:n.content.length&&s.merge(s.length,s.length,n.content[0],!1,n.openStart,0)&&(s.breakAfter=n.content[0].breakAfter,n.content.shift()),t.content.length&&s.merge(0,0,t.content[t.content.length-1],!0,0,t.openEnd)&&t.content.pop(),e=t.content.concat(s).concat(n.content)}else({content:e,breakAtStart:o,openStart:a,openEnd:l}=Xi.build(this.view.state.doc,u,f,this.decorations,this.dynamicDecorationMap));let{i:d,off:O}=s.findPos(c,1),{i:p,off:m}=s.findPos(h,-1);Fe(this,p,m,d,O,e,o,a,l)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(t){this.editContextFormatting=this.editContextFormatting.map(t.changes);for(let e of t.transactions)for(let t of e.effects)t.is(gn)&&(this.editContextFormatting=t.value)}compositionView(t){let e=new ui(t.text.nodeValue);e.flags|=8;for(let{deco:n}of t.marks)e=new fi(n,[e],e.length);let i=new Ai;return i.append(e,0),i}fixCompositionDOM(t){let e=(t,e)=>{e.flags|=8|(e.children.some((t=>7&t.flags))?1:0),this.markedForComposition.add(e);let i=Ue.get(t);i&&i!=e&&(i.dom=null),e.setDOM(t)},i=this.childPos(t.range.fromB,1),n=this.children[i.i];e(t.line,n);for(let s=t.marks.length-1;s>=-1;s--)i=n.childPos(i.off,1),n=n.children[i.i],e(s>=0?t.marks[s].node:t.text,n)}updateSelection(t=!1,e=!1){!t&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let i=this.view.root.activeElement,n=i==this.dom,s=!n&&Pe(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(n||e||s))return;let r=this.forceSelection;this.forceSelection=!1;let o=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(o.anchor)),l=o.empty?a:this.moveToLine(this.domAtPos(o.head));if(ci.gecko&&o.empty&&!this.hasComposition&&(1==(h=a).node.nodeType&&h.node.firstChild&&(0==h.offset||"false"==h.node.childNodes[h.offset-1].contentEditable)&&(h.offset==h.node.childNodes.length||"false"==h.node.childNodes[h.offset].contentEditable))){let t=document.createTextNode("");this.view.observer.ignore((()=>a.node.insertBefore(t,a.node.childNodes[a.offset]||null))),a=l=new Ie(t,0),r=!0}var h;let c=this.view.observer.selectionRange;!r&&c.focusNode&&(Ze(a.node,a.offset,c.anchorNode,c.anchorOffset)&&Ze(l.node,l.offset,c.focusNode,c.focusOffset)||this.suppressWidgetCursorChange(c,o))||(this.view.observer.ignore((()=>{ci.android&&ci.chrome&&this.dom.contains(c.focusNode)&&function(t,e){for(let i=t;i&&i!=e;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=Qe(this.view.root);if(t)if(o.empty){if(ci.gecko){let t=(e=a.node,n=a.offset,1!=e.nodeType?0:(n&&"false"==e.childNodes[n-1].contentEditable?1:0)|(no.head&&([a,l]=[l,a]),e.setEnd(l.node,l.offset),e.setStart(a.node,a.offset),t.removeAllRanges(),t.addRange(e)}else;var e,n;s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())})),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new Ie(c.anchorNode,c.anchorOffset),this.impreciseHead=l.precise?null:new Ie(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(t,e){return this.hasComposition&&e.empty&&Ze(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==e.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,i=Qe(t.root),{anchorNode:n,anchorOffset:s}=t.observer.selectionRange;if(!(i&&e.empty&&e.assoc&&i.modify))return;let r=Ai.find(this,e.head);if(!r)return;let o=r.posAtStart;if(e.head==o||e.head==o+r.length)return;let a=this.coordsAt(e.head,-1),l=this.coordsAt(e.head,1);if(!a||!l||a.bottom>l.top)return;let h=this.domAtPos(e.head+e.assoc);i.collapse(h.node,h.offset),i.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let c=t.observer.selectionRange;t.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=e.from&&i.collapse(n,s)}moveToLine(t){let e,i=this.dom;if(t.node!=i)return t;for(let n=t.offset;!e&&n=0;n--){let t=Ue.get(i.childNodes[n]);t instanceof Ai&&(e=t.domAtPos(t.length))}return e?new Ie(e.node,e.offset,!0):t}nearest(t){for(let e=t;e;){let t=Ue.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let i=this.nearest(t);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(t,e)+i.posAtStart}domAtPos(t){let{i:e,off:i}=this.childCursor().findPos(t,-1);for(;e=0;r--){let o=this.children[r],a=s-o.breakAfter,l=a-o.length;if(at||o.covers(1))&&(!i||o instanceof Ai&&!(i instanceof Ai&&e>=0)))i=o,n=l;else if(i&&l==t&&a==t&&o instanceof Ri&&Math.abs(e)<2){if(o.deco.startSide<0)break;r&&(i=null)}s=l}return i?i.coordsAt(t-n,e):null}coordsForChar(t){let{i:e,off:i}=this.childPos(t,1),n=this.children[e];if(!(n instanceof Ai))return null;for(;n.children.length;){let{i:t,off:e}=n.childPos(i,1);for(;;t++){if(t==n.children.length)return null;if((n=n.children[t]).length)break}i=e}if(!(n instanceof ui))return null;let s=V(n.text,i);if(s==i)return null;let r=Le(n.dom,i,s).getClientRects();for(let o=0;oMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,a=this.view.textDirection==Ei.LTR;for(let l=0,h=0;hn)break;if(l>=i){let i=t.dom.getBoundingClientRect();if(e.push(i.height),r){let e=t.dom.lastChild,n=e?$e(e):[];if(n.length){let t=n[n.length-1],e=a?t.right-i.left:i.right-t.left;e>o&&(o=e,this.minWidth=s,this.minWidthFrom=l,this.minWidthTo=c)}}}l=c+t.breakAfter}return e}textDirectionAt(t){let{i:e}=this.childPos(t,1);return"rtl"==getComputedStyle(this.children[e].dom).direction?Ei.RTL:Ei.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Ai){let t=s.measureTextSize();if(t)return t}let t,e,i,n=document.createElement("div");return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(n);let s=$e(n.firstChild)[0];t=n.getBoundingClientRect().height,e=s?s.width/27:7,i=s?s.height:t,n.remove()})),{lineHeight:t,charWidth:e,textHeight:i}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new He(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let i=0,n=0;;n++){let s=n==e.viewports.length?null:e.viewports[n],r=s?s.from-1:this.length;if(r>i){let n=(e.lineBlockAt(r).bottom-e.lineBlockAt(i).top)/this.view.scaleY;t.push(ki.replace({widget:new Mi(n),block:!0,inclusive:!0,isBlockGap:!0}).range(i,r))}if(!s)break;i=s.to+1}return ki.set(t)}updateDeco(){let t=1,e=this.view.state.facet(Pn).map((e=>(this.dynamicDecorationMap[t++]="function"==typeof e)?e(this.view):e)),i=!1,n=this.view.state.facet($n).map(((t,e)=>{let n="function"==typeof t;return n&&(i=!0),n?t(this.view):t}));for(n.length&&(this.dynamicDecorationMap[t++]=i,e.push(Kt.join(n))),this.decorations=[this.editContextFormatting,...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];ti.anchor?-1:1);if(!n)return;!i.empty&&(e=this.coordsAt(i.anchor,i.anchor>i.head?-1:1))&&(n={left:Math.min(n.left,e.left),top:Math.min(n.top,e.top),right:Math.max(n.right,e.right),bottom:Math.max(n.bottom,e.bottom)});let s=Rn(this.view),r={left:n.left-s.left,top:n.top-s.top,right:n.right+s.right,bottom:n.bottom+s.bottom},{offsetWidth:o,offsetHeight:a}=this.view.scrollDOM;!function(t,e,i,n,s,r,o,a){let l=t.ownerDocument,h=l.defaultView||window;for(let c=t,u=!1;c&&!u;)if(1==c.nodeType){let t,f=c==l.body,d=1,O=1;if(f)t=Xe(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(u=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let e=c.getBoundingClientRect();({scaleX:d,scaleY:O}=qe(c,e)),t={left:e.left,right:e.left+c.clientWidth*d,top:e.top,bottom:e.top+c.clientHeight*O}}let p=0,m=0;if("nearest"==s)e.top0&&e.bottom>t.bottom+m&&(m=e.bottom-t.bottom+m+o)):e.bottom>t.bottom&&(m=e.bottom-t.bottom+o,i<0&&e.top-m0&&e.right>t.right+p&&(p=e.right-t.right+p+r)):e.right>t.right&&(p=e.right-t.right+r,i<0&&e.leftt?e.left-t:Math.max(0,t-e.right)}function Ln(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function _n(t,e){return t.tope.top+1}function Dn(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Bn(t,e,i){let n,s,r,o,a,l,h,c,u=!1;for(let d=t.firstChild;d;d=d.nextSibling){let t=$e(d);for(let f=0;fm||o==m&&r>p){n=d,s=O,r=p,o=m;let a=m?i0?f0)}0==p?i>O.bottom&&(!h||h.bottomO.top)&&(l=d,c=O):h&&_n(h,O)?h=jn(h,O.bottom):c&&_n(c,O)&&(c=Dn(c,O.top))}}if(h&&h.bottom>=i?(n=a,s=h):c&&c.top<=i&&(n=l,s=c),!n)return{node:t,offset:0};let f=Math.max(s.left,Math.min(s.right,e));return 3==n.nodeType?Wn(n,f,i):u&&"false"!=n.contentEditable?Bn(n,f,i):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,n)+(e>=(s.left+s.right)/2?1:0)}}function Wn(t,e,i){let n=t.nodeValue.length,s=-1,r=1e9,o=0;for(let a=0;ai?h.top-i:i-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&c=(h.left+h.right)/2,n=i;if(ci.chrome||ci.gecko){Le(t,a).getBoundingClientRect().left==h.right&&(n=!i)}if(c<=0)return{node:t,offset:a+(n?1:0)};s=a+(n?1:0),r=c}}}return{node:t,offset:s>-1?s:o>0?t.nodeValue.length:0}}function In(t,e,i,n=-1){var s,r;let o,a=t.contentDOM.getBoundingClientRect(),l=a.top+t.viewState.paddingTop,{docHeight:h}=t.viewState,{x:c,y:u}=e,f=u-l;if(f<0)return 0;if(f>h)return t.state.doc.length;for(let w=t.viewState.heightOracle.textHeight/2,S=!1;o=t.elementAtHeight(f),o.type!=Qi.Text;)for(;f=n>0?o.bottom+w:o.top-w,!(f>=0&&f<=h);){if(S)return i?null:0;S=!0,n=-n}u=l+f;let d=o.from;if(dt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:i?null:Gn(t,a,o,c,u);let O=t.dom.ownerDocument,p=t.root.elementFromPoint?t.root:O,m=p.elementFromPoint(c,u);m&&!t.contentDOM.contains(m)&&(m=null),m||(c=Math.max(a.left+1,Math.min(a.right-1,c)),m=p.elementFromPoint(c,u),m&&!t.contentDOM.contains(m)&&(m=null));let g,b=-1;if(m&&0!=(null===(s=t.docView.nearest(m))||void 0===s?void 0:s.isEditable)){if(O.caretPositionFromPoint){let t=O.caretPositionFromPoint(c,u);t&&({offsetNode:g,offset:b}=t)}else if(O.caretRangeFromPoint){let e=O.caretRangeFromPoint(c,u);e&&(({startContainer:g,startOffset:b}=e),(!t.contentDOM.contains(g)||ci.safari&&function(t,e,i){let n;if(3!=t.nodeType||e!=(n=t.nodeValue.length))return!1;for(let s=t.nextSibling;s;s=s.nextSibling)if(1!=s.nodeType||"BR"!=s.nodeName)return!1;return Le(t,n-1,n).getBoundingClientRect().left>i}(g,b,c)||ci.chrome&&function(t,e,i){if(0!=e)return!1;for(let s=t;;){let t=s.parentNode;if(!t||1!=t.nodeType||t.firstChild!=s)return!1;if(t.classList.contains("cm-line"))break;s=t}let n=1==t.nodeType?t.getBoundingClientRect():Le(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return i-n.left>5}(g,b,c))&&(g=void 0))}g&&(b=Math.min(Re(g),b))}if(!g||!t.docView.dom.contains(g)){let e=Ai.find(t.docView,d);if(!e)return f>o.top+o.height/2?o.to:o.from;({node:g,offset:b}=Bn(e.dom,c,u))}let v=t.docView.nearest(g);if(!v)return null;if(v.isWidget&&1==(null===(r=v.dom)||void 0===r?void 0:r.nodeType)){let t=v.dom.getBoundingClientRect();return e.y1.5*t.defaultLineHeight){let e=t.viewState.heightOracle.textHeight;r+=Math.floor((s-i.top-.5*(t.defaultLineHeight-e))/e)*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(i.from,i.to);return i.from+ue(o,r,t.state.tabSize)}function Un(t,e){let i=t.lineBlockAt(e);if(Array.isArray(i.type))for(let n of i.type)if(n.to>e||n.to==e&&(n.to==i.to||n.type==Qi.Text))return n;return i}function Nn(t,e,i,n){let s=t.state.doc.lineAt(e.head),r=t.bidiSpans(s),o=t.textDirectionAt(s.from);for(let a=e,l=null;;){let e=tn(s,r,o,a,i),h=Ji;if(!e){if(s.number==(i?t.state.doc.lines:1))return a;h="\n",s=t.state.doc.line(s.number+(i?1:-1)),r=t.bidiSpans(s),e=t.visualLineSide(s,!i)}if(l){if(!l(h))return a}else{if(!n)return e;l=n(h)}a=e}}function Hn(t,e,i){for(;;){let n=0;for(let s of t)s.between(e-1,e+1,((t,s,r)=>{if(e>t&&ee(t))),i.from,e.head>i.from?-1:1);return n==i.from?i:et.cursor(n,nt)&&this.lineBreak(),n=s}return this.findPointBefore(i,e),this}readTextNode(t){let e=t.nodeValue;for(let i of this.points)i.node==t&&(i.pos=this.text.length+Math.min(i.offset,e.length));for(let i=0,n=this.lineSeparator?null:/\r\n?|\n/g;;){let s,r=-1,o=1;if(this.lineSeparator?(r=e.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(s=n.exec(e))&&(r=s.index,o=s[0].length),this.append(e.slice(i,r<0?e.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=o-1);i=r+o}}readNode(t){if(t.cmIgnore)return;let e=Ue.get(t),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(t,i.length);for(let t=i.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==e&&(i.pos=this.text.length)}findPointInside(t,e){for(let i of this.points)(3==t.nodeType?i.node==t:t.contains(i.node))&&(i.pos=this.text.length+(ts(t,i.node,i.offset)?e:0))}}function ts(t,e,i){for(;;){if(!e||i-1;let{impreciseHead:s,impreciseAnchor:r}=t.docView;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,i,0))){let e=s||r?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:r}=t.observer.selectionRange;i&&(e.push(new es(i,n)),s==i&&r==n||e.push(new es(s,r)));return e}(t),i=new Jn(e,t.state);i.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=i.text,this.newSel=function(t,e){if(0==t.length)return null;let i=t[0].pos,n=2==t.length?t[1].pos:i;return i>-1&&n>-1?et.single(i+e,n+e):null}(e,this.bounds.from)}else{let e=t.observer.selectionRange,i=s&&s.node==e.focusNode&&s.offset==e.focusOffset||!ke(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),n=r&&r.node==e.anchorNode&&r.offset==e.anchorOffset||!ke(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset),o=t.viewport;if((ci.ios||ci.chrome)&&t.state.selection.main.empty&&i!=n&&(o.from>0||o.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:n,to:o}=e.bounds,a=s.from,l=null;(8===r||ci.android&&e.text.length0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if("end"==n){i-=o+Math.max(0,r-Math.min(o,a))-r}if(o=o?r-i:0,a=r+(a-o),o=r}else if(a=a?r-i:0,o=r+(o-a),a=r}return{from:r,toA:o,toB:a}}(t.state.doc.sliceString(n,o,Kn),e.text,a-n,l);h&&(ci.chrome&&13==r&&h.toB==h.from+2&&e.text.slice(h.from,h.toB)==Kn+Kn&&h.toB--,i={from:n+h.from,to:n+h.toA,insert:x.of(e.text.slice(h.from,h.toB).split(Kn))})}else n&&(!t.hasFocus&&t.state.facet(vn)||n.main.eq(s))&&(n=null);if(!i&&!n)return!1;if(!i&&e.typeOver&&!s.empty&&n&&n.main.empty?i={from:s.from,to:s.to,insert:t.state.doc.slice(s.from,s.to)}:i&&i.from>=s.from&&i.to<=s.to&&(i.from!=s.from||i.to!=s.to)&&s.to-s.from-(i.to-i.from)<=4?i={from:s.from,to:s.to,insert:t.state.doc.slice(s.from,i.from).append(i.insert).append(t.state.doc.slice(i.to,s.to))}:(ci.mac||ci.android)&&i&&i.from==i.to&&i.from==s.head-1&&/^\. ?$/.test(i.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(n&&2==i.insert.length&&(n=et.single(n.main.anchor-1,n.main.head-1)),i={from:s.from,to:s.to,insert:x.of([" "])}):ci.chrome&&i&&i.from==i.to&&i.from==s.head&&"\n "==i.insert.toString()&&t.lineWrapping&&(n&&(n=et.single(n.main.anchor-1,n.main.head-1)),i={from:s.from,to:s.to,insert:x.of([" "])}),i)return ss(t,i,n,r);if(n&&!n.main.eq(s)){let e=!1,i="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),i=t.inputState.lastSelectionOrigin),t.dispatch({selection:n,scrollIntoView:e,userEvent:i}),!0}return!1}function ss(t,e,i,n=-1){if(ci.ios&&t.inputState.flushIOSKey(e))return!0;let s=t.state.selection.main;if(ci.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&" "==t.state.sliceDoc(e.from,s.from))&&1==e.insert.length&&2==e.insert.lines&&_e(t.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&0==e.insert.length||8==n&&e.insert.lengths.head)&&_e(t.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&0==e.insert.length&&_e(t.contentDOM,"Delete",46)))return!0;let r,o=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a=()=>r||(r=function(t,e,i){let n,s=t.state,r=s.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let i=r.frome.to?s.sliceDoc(e.to,r.to):"";n=s.replaceSelection(t.state.toText(i+e.insert.sliceString(0,void 0,t.state.lineBreak)+o))}else{let o=s.changes(e),a=i&&i.main.to<=o.newLength?i.main:void 0;if(s.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let l,h=t.state.sliceDoc(e.from,e.to),c=i&&En(t,i.main.head);if(c){let t=e.insert.length-(e.to-e.from);l={from:c.from,to:c.to-t}}else l=t.state.doc.lineAt(r.head);let u=r.to-e.to,f=r.to-r.from;n=s.changeByRange((i=>{if(i.from==r.from&&i.to==r.to)return{changes:o,range:a||i.map(o)};let n=i.to-u,c=n-h.length;if(i.to-i.from!=f||t.state.sliceDoc(c,n)!=h||i.to>=l.from&&i.from<=l.to)return{range:i};let d=s.changes({from:c,to:n,insert:e.insert}),O=i.to-r.to;return{changes:d,range:a?et.range(Math.max(0,a.anchor+O),Math.max(0,a.head+O)):i.map(d)}}))}else n={changes:o,selection:a&&s.selection.replaceRange(a)}}let o="input.type";(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,o+=".compose",t.inputState.compositionFirstChange&&(o+=".start",t.inputState.compositionFirstChange=!1));return s.update(n,{userEvent:o,scrollIntoView:!0})}(t,e,i));return t.state.facet(ln).some((i=>i(t,e.from,e.to,o,a)))||t.dispatch(a()),!0}class rs{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,ci.safari&&t.contentDOM.addEventListener("input",(()=>null)),ci.gecko&&function(t){Rs.has(t)||(Rs.add(t),t.addEventListener("copy",(()=>{})),t.addEventListener("cut",(()=>{})))}(t.contentDOM.ownerDocument)}handleEvent(t){(function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let i,n=e.target;n!=t.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(i=Ue.get(n))&&i.ignoreEvent(e))return!1;return!0})(this.view,t)&&!this.ignoreDuringComposition(t)&&("keydown"==t.type&&this.keydown(t)||this.runHandlers(t.type,t))}runHandlers(t,e){let i=this.handlers[t];if(i){for(let t of i.observers)t(this.view,e);for(let t of i.handlers){if(e.defaultPrevented)break;if(t(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=as(t),i=this.handlers,n=this.view.contentDOM;for(let s in e)if("scroll"!=s){let t=!e[s].handlers.length,r=i[s];r&&t!=!r.handlers.length&&(n.removeEventListener(s,this.handleEvent),r=null),r||n.addEventListener(s,this.handleEvent,{passive:t})}for(let s in i)"scroll"==s||e[s]||n.removeEventListener(s,this.handleEvent);this.handlers=e}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=t.keyCode&&cs.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),ci.android&&ci.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;let e;return!ci.ios||t.synthetic||t.altKey||t.metaKey||!((e=ls.find((e=>e.keyCode==t.keyCode)))&&!t.ctrlKey||hs.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(229!=t.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=e||t,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&(!("Enter"==e.key&&t&&t.from0||!!(ci.safari&&!ci.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function os(t,e){return(i,n)=>{try{return e.call(t,n,i)}catch(s){bn(i.state,s)}}}function as(t){let e=Object.create(null);function i(t){return e[t]||(e[t]={observers:[],handlers:[]})}for(let n of t){let t=n.spec;if(t&&t.domEventHandlers)for(let e in t.domEventHandlers){let s=t.domEventHandlers[e];s&&i(e).handlers.push(os(n.value,s))}if(t&&t.domEventObservers)for(let e in t.domEventObservers){let s=t.domEventObservers[e];s&&i(e).observers.push(os(n.value,s))}}for(let n in ds)i(n).handlers.push(ds[n]);for(let n in Os)i(n).observers.push(Os[n]);return e}const ls=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],hs="dthko",cs=[16,17,18,20,91,92,224,225];function us(t){return.7*Math.max(0,t)+8}class fs{constructor(t,e,i,n){this.view=t,this.startEvent=e,this.style=i,this.mustSelect=n,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParents=function(t){let e,i,n=t.ownerDocument;for(let s=t.parentNode;s&&!(s==n.body||e&&i);)if(1==s.nodeType)!i&&s.scrollHeight>s.clientHeight&&(i=s),!e&&s.scrollWidth>s.clientWidth&&(e=s),s=s.assignedSlot||s.parentNode;else{if(11!=s.nodeType)break;s=s.host}return{x:e,y:i}}(t.contentDOM),this.atoms=t.state.facet(Zn).map((e=>e(t)));let s=t.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(It.allowMultipleSelections)&&function(t,e){let i=t.state.facet(nn);return i.length?i[0](e):ci.mac?e.metaKey:e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:i}=t.state.selection;if(i.empty)return!1;let n=Qe(t.root);if(!n||0==n.rangeCount)return!0;let s=n.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&t.top<=e.clientY&&t.bottom>=e.clientY)return!0}return!1}(t,e)||1!=Ps(e))&&null}start(t){!1===this.dragging&&this.select(t)}move(t){if(0==t.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(e=this.startEvent,i=t,Math.max(Math.abs(e.clientX-i.clientX),Math.abs(e.clientY-i.clientY))<10))return;var e,i;this.select(this.lastEvent=t);let n=0,s=0,r=0,o=0,a=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:l}=this.scrollParents.y.getBoundingClientRect());let h=Rn(this.view);t.clientX-h.left<=r+6?n=-us(r-t.clientX):t.clientX+h.right>=a-6&&(n=us(t.clientX-a)),t.clientY-h.top<=o+6?s=-us(o-t.clientY):t.clientY+h.bottom>=l-6&&(s=us(t.clientY-l)),this.setScrollSpeed(n,s)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e},t||e?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:e}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),e&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=e,e=0),(t||e)&&this.view.win.scrollBy(t,e),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(t){let e=null;for(let i=0;it.isUserEvent("input.type")))?this.destroy():this.style.update(t)&&setTimeout((()=>this.select(this.lastEvent)),20)}}const ds=Object.create(null),Os=Object.create(null),ps=ci.ie&&ci.ie_version<15||ci.ios&&ci.webkit_version<604;function ms(t,e,i){for(let n of t.facet(e))i=n(i,t);return i}function gs(t,e){e=ms(t.state,cn,e);let i,{state:n}=t,s=1,r=n.toText(e),o=r.lines==n.selection.ranges.length;if(null!=Zs&&n.selection.ranges.every((t=>t.empty))&&Zs==r.toString()){let t=-1;i=n.changeByRange((i=>{let a=n.doc.lineAt(i.from);if(a.from==t)return{range:i};t=a.from;let l=n.toText((o?r.line(s++).text:e)+n.lineBreak);return{changes:{from:a.from,insert:l},range:et.cursor(i.from+l.length)}}))}else i=o?n.changeByRange((t=>{let e=r.line(s++);return{changes:{from:t.from,to:t.to,insert:e.text},range:et.cursor(t.from+e.length)}})):n.replaceSelection(r);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}function bs(t,e,i,n){if(1==n)return et.cursor(e,i);if(2==n)return function(t,e,i=1){let n=t.charCategorizer(e),s=t.doc.lineAt(e),r=e-s.from;if(0==s.length)return et.cursor(e);0==r?i=1:r==s.length&&(i=-1);let o=r,a=r;i<0?o=V(s.text,r,!1):a=V(s.text,r);let l=n(s.text.slice(o,a));for(;o>0;){let t=V(s.text,o,!1);if(n(s.text.slice(t,o))!=l)break;o=t}for(;a{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},ds.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),27==e.keyCode&&0!=t.inputState.tabFocusMode&&(t.inputState.tabFocusMode=Date.now()+2e3),!1),Os.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},Os.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},ds.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let i=null;for(let n of t.state.facet(rn))if(i=n(t,e),i)break;if(i||0!=e.button||(i=function(t,e){let i=Ss(t,e),n=Ps(e),s=t.state.selection;return{update(t){t.docChanged&&(i.pos=t.changes.mapPos(i.pos),s=s.map(t.changes))},get(e,r,o){let a,l=Ss(t,e),h=bs(t,l.pos,l.bias,n);if(i.pos!=l.pos&&!r){let e=bs(t,i.pos,i.bias,n),s=Math.min(e.from,h.from),r=Math.max(e.to,h.to);h=s1&&(a=function(t,e){for(let i=0;i=e)return et.create(t.ranges.slice(0,i).concat(t.ranges.slice(i+1)),t.mainIndex==i?0:t.mainIndex-(t.mainIndex>i?1:0))}return null}(s,l.pos))?a:o?s.addRange(h):et.create([h])}}}(t,e)),i){let n=!t.hasFocus;t.inputState.startMouseSelection(new fs(t,e,i,n)),n&&t.observer.ignore((()=>{Ye(t.contentDOM);let e=t.root.activeElement;e&&!e.contains(t.contentDOM)&&e.blur()}));let s=t.inputState.mouseSelection;if(s)return s.start(e),!1===s.dragging}return!1};let vs=(t,e,i)=>e>=i.top&&e<=i.bottom&&t>=i.left&&t<=i.right;function ws(t,e,i,n){let s=Ai.find(t.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(0==r)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&vs(i,n,o))return-1;let a=s.coordsAt(r,1);return a&&vs(i,n,a)?1:o&&o.bottom>=n?-1:1}function Ss(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:i,bias:ws(t,i,e.clientX,e.clientY)}}const ys=ci.ie&&ci.ie_version<=11;let xs=null,Qs=0,ks=0;function Ps(t){if(!ys)return t.detail;let e=xs,i=ks;return xs=t,ks=Date.now(),Qs=!e||i>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Qs+1)%3:1}function $s(t,e,i,n){if(!(i=ms(t.state,cn,i)))return;let s=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=t.inputState,o=n&&r&&function(t,e){let i=t.state.facet(sn);return i.length?i[0](e):ci.mac?!e.altKey:!e.ctrlKey}(t,e)?{from:r.from,to:r.to}:null,a={from:s,insert:i},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(s,-1),head:l.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}ds.dragstart=(t,e)=>{let{selection:{main:i}}=t.state;if(e.target.draggable){let n=t.docView.nearest(e.target);if(n&&n.isWidget){let t=n.posAtStart,e=t+n.length;(t>=i.to||e<=i.from)&&(i=et.range(t,e))}}let{inputState:n}=t;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=i,e.dataTransfer&&(e.dataTransfer.setData("Text",ms(t.state,un,t.state.sliceDoc(i.from,i.to))),e.dataTransfer.effectAllowed="copyMove"),!1},ds.dragend=t=>(t.inputState.draggedContent=null,!1),ds.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let i=e.dataTransfer.files;if(i&&i.length){let n=Array(i.length),s=0,r=()=>{++s==i.length&&$s(t,e,n.filter((t=>null!=t)).join(t.state.lineBreak),!1)};for(let t=0;t{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(n[t]=e.result),r()},e.readAsText(i[t])}return!0}{let i=e.dataTransfer.getData("Text");if(i)return $s(t,e,i,!0),!0}return!1},ds.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let i=ps?null:e.clipboardData;return i?(gs(t,i.getData("text/plain")||i.getData("text/uri-list")),!0):(function(t){let e=t.dom.parentNode;if(!e)return;let i=e.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout((()=>{t.focus(),i.remove(),gs(t,i.value)}),50)}(t),!1)};let Zs=null;ds.copy=ds.cut=(t,e)=>{let{text:i,ranges:n,linewise:s}=function(t){let e=[],i=[],n=!1;for(let s of t.selection.ranges)s.empty||(e.push(t.sliceDoc(s.from,s.to)),i.push(s));if(!e.length){let s=-1;for(let{from:n}of t.selection.ranges){let r=t.doc.lineAt(n);r.number>s&&(e.push(r.text),i.push({from:r.from,to:Math.min(t.doc.length,r.to+1)})),s=r.number}n=!0}return{text:ms(t,un,e.join(t.lineBreak)),ranges:i,linewise:n}}(t.state);if(!i&&!s)return!1;Zs=s?i:null,"cut"!=e.type||t.state.readOnly||t.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let r=ps?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",i),!0):(function(t,e){let i=t.dom.parentNode;if(!i)return;let n=i.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout((()=>{n.remove(),t.focus()}),50)}(t,i),!1)};const Cs=At.define();function Ts(t,e){let i=[];for(let n of t.facet(hn)){let s=n(t,e);s&&i.push(s)}return i?t.update({effects:i,annotations:Cs.of(!0)}):null}function As(t){setTimeout((()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let i=Ts(t.state,e);i?t.dispatch(i):t.update([])}}),10)}Os.focus=t=>{t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),As(t)},Os.blur=t=>{t.observer.clearSelectionRange(),As(t)},Os.compositionstart=Os.compositionupdate=t=>{t.observer.editContext||(null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))},Os.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,ci.chrome&&ci.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then((()=>t.observer.flush())):setTimeout((()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])}),50))},Os.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},ds.beforeinput=(t,e)=>{var i,n;if("insertReplacementText"==e.inputType&&t.observer.editContext){let n=null===(i=e.dataTransfer)||void 0===i?void 0:i.getData("text/plain"),s=e.getTargetRanges();if(n&&s.length){let e=s[0],i=t.posAtDOM(e.startContainer,e.startOffset),r=t.posAtDOM(e.endContainer,e.endOffset);return ss(t,{from:i,to:r,insert:t.state.toText(n)},null),!0}}let s;if(ci.chrome&&ci.android&&(s=ls.find((t=>t.inputType==e.inputType)))&&(t.observer.delayAndroidKey(s.key,s.keyCode),"Backspace"==s.key||"Delete"==s.key)){let e=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout((()=>{var i;((null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}return ci.ios&&"deleteContentForward"==e.inputType&&t.observer.flushSoon(),ci.safari&&"insertText"==e.inputType&&t.inputState.composing>=0&&setTimeout((()=>Os.compositionend(t,e)),20),!1};const Rs=new Set;const Ms=["pre-wrap","normal","pre-line","break-spaces"];let Xs=!1;function qs(){Xs=!1}class Vs{constructor(t){this.lineWrapping=t,this.doc=x.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,e){let i=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((e-t-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(t){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return Ms.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=!1;for(let i=0;i-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=e,this.charWidth=i,this.textHeight=n,this.lineLength=s,a){this.heightSamples={};for(let t=0;t0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>Ls&&(Xs=!0),this.height=t)}replace(t,e,i){return _s.of(i)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,i,n){let s=this,r=i.doc;for(let o=n.length-1;o>=0;o--){let{fromA:a,toA:l,fromB:h,toB:c}=n[o],u=s.lineAt(a,Ys.ByPosNoHeight,i.setDoc(e),0,0),f=u.to>=l?u:s.lineAt(l,Ys.ByPosNoHeight,i,0,0);for(c+=f.to-l,l=f.to;o>0&&u.from<=n[o-1].toA;)a=n[o-1].fromA,h=n[o-1].fromB,o--,a2*s){let s=t[e-1];s.break?t.splice(--e,1,s.left,null,s.right):t.splice(--e,1,s.left,s.right),i+=1+s.break,n-=s.size}else{if(!(s>2*n))break;{let e=t[i];e.break?t.splice(i,1,e.left,null,e.right):t.splice(i,1,e.left,e.right),i+=2+e.break,s-=e.size}}else if(n=s&&r(this.blockAt(0,i,n,s))}updateHeight(t,e=0,i=!1,n){return n&&n.from<=e&&n.more&&this.setHeight(n.heights[n.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Bs extends js{constructor(t,e){super(t,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(t,e,i,n){return new zs(n,this.length,i,this.height,this.breaks)}replace(t,e,i){let n=i[0];return 1==i.length&&(n instanceof Bs||n instanceof Ws&&4&n.flags)&&Math.abs(this.length-n.length)<10?(n instanceof Ws?n=new Bs(n.length,this.height):n.height=this.height,this.outdated||(n.outdated=!1),n):_s.of(i)}updateHeight(t,e=0,i=!1,n){return n&&n.from<=e&&n.more?this.setHeight(n.heights[n.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Ws extends _s{constructor(t){super(t,0)}heightMetrics(t,e){let i,n=t.doc.lineAt(e).number,s=t.doc.lineAt(e+this.length).number,r=s-n+1,o=0;if(t.lineWrapping){let e=Math.min(this.height,t.lineHeight*r);i=e/r,this.length>r+1&&(o=(this.height-e)/(this.length-r-1))}else i=this.height/r;return{firstLine:n,lastLine:s,perLine:i,perChar:o}}blockAt(t,e,i,n){let{firstLine:s,lastLine:r,perLine:o,perChar:a}=this.heightMetrics(e,n);if(e.lineWrapping){let s=n+(t0){let t=i[i.length-1];t instanceof Ws?i[i.length-1]=new Ws(t.length+n):i.push(null,new Ws(n-1))}if(t>0){let e=i[0];e instanceof Ws?i[0]=new Ws(t+e.length):i.unshift(new Ws(t-1),null)}return _s.of(i)}decomposeLeft(t,e){e.push(new Ws(t-1),null)}decomposeRight(t,e){e.push(null,new Ws(this.length-t-1))}updateHeight(t,e=0,i=!1,n){let s=e+this.length;if(n&&n.from<=e+this.length&&n.more){let i=[],r=Math.max(e,n.from),o=-1;for(n.from>e&&i.push(new Ws(n.from-e-1).updateHeight(t,e));r<=s&&n.more;){let e=t.doc.lineAt(r).length;i.length&&i.push(null);let s=n.heights[n.index++];-1==o?o=s:Math.abs(s-o)>=Ls&&(o=-2);let a=new Bs(e,s);a.outdated=!1,i.push(a),r+=e+1}r<=s&&i.push(null,new Ws(s-r).updateHeight(t,r));let a=_s.of(i);return(o<0||Math.abs(a.height-this.height)>=Ls||Math.abs(o-this.heightMetrics(t,e).perLine)>=Ls)&&(Xs=!0),Ds(this,a)}return(i||this.outdated)&&(this.setHeight(t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class Is extends _s{constructor(t,e,i){super(t.length+e+i.length,t.height+i.height,e|(t.outdated||i.outdated?2:0)),this.left=t,this.right=i,this.size=t.size+i.size}get break(){return 1&this.flags}blockAt(t,e,i,n){let s=i+this.left.height;return to))return l;let h=e==Ys.ByPosNoHeight?Ys.ByPosNoHeight:Ys.ByPos;return a?l.join(this.right.lineAt(o,h,i,r,o)):this.left.lineAt(o,h,i,n,s).join(l)}forEachLine(t,e,i,n,s,r){let o=n+this.left.height,a=s+this.left.length+this.break;if(this.break)t=a&&this.right.forEachLine(t,e,i,o,a,r);else{let l=this.lineAt(a,Ys.ByPos,i,n,s);t=t&&l.from<=e&&r(l),e>l.to&&this.right.forEachLine(l.to+1,e,i,o,a,r)}}replace(t,e,i){let n=this.left.length+this.break;if(ethis.left.length)return this.balanced(this.left,this.right.replace(t-n,e-n,i));let s=[];t>0&&this.decomposeLeft(t,s);let r=s.length;for(let o of i)s.push(o);if(t>0&&Gs(s,r-1),e=i&&e.push(null)),t>i&&this.right.decomposeLeft(t-i,e)}decomposeRight(t,e){let i=this.left.length,n=i+this.break;if(t>=n)return this.right.decomposeRight(t-n,e);t2*e.size||e.size>2*t.size?_s.of(this.break?[t,null,e]:[t,e]):(this.left=Ds(this.left,t),this.right=Ds(this.right,e),this.setHeight(t.height+e.height),this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,i=!1,n){let{left:s,right:r}=this,o=e+s.length+this.break,a=null;return n&&n.from<=e+s.length&&n.more?a=s=s.updateHeight(t,e,i,n):s.updateHeight(t,e,i),n&&n.from<=o+r.length&&n.more?a=r=r.updateHeight(t,o,i,n):r.updateHeight(t,o,i),a?this.balanced(s,r):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Gs(t,e){let i,n;null==t[e]&&(i=t[e-1])instanceof Ws&&(n=t[e+1])instanceof Ws&&t.splice(e-1,3,new Ws(i.length+1+n.length))}class Us{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Bs?i.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new Bs(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,i){if(t=5)&&this.addLineDeco(n,s,r)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTot&&this.nodes.push(new Bs(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let i=new Ws(e-t);return this.oracle.doc.lineAt(t).to==e&&(i.flags|=4),i}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Bs)return t;let e=new Bs(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine();let e=t.deco;e&&e.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,e&&e.endSide>0&&(this.covering=t)}addLineDeco(t,e,i){let n=this.ensureLine();n.length+=i,n.collapsed+=i,n.widgetHeight=Math.max(n.widgetHeight,t),n.breaks+=e,this.writtenTo=this.pos=this.pos+i}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof Bs||this.isCovered?(this.writtenToe.clientHeight||e.scrollWidth>e.clientWidth)&&"visible"!=i.overflow){let i=e.getBoundingClientRect();r=Math.max(r,i.left),o=Math.min(o,i.right),a=Math.max(a,i.top),l=Math.min(h==t.parentNode?s.innerHeight:l,i.bottom)}h="absolute"==i.position||"fixed"==i.position?e.offsetParent:e.parentNode}else{if(11!=h.nodeType)break;h=h.host}return{left:r-i.left,right:Math.max(r,o)-i.left,top:a-(i.top+e),bottom:Math.max(a,l)-(i.top+e)}}function Fs(t,e){let i=t.getBoundingClientRect();return{left:0,right:i.right-i.left,top:e,bottom:i.bottom-(i.top+e)}}class Ks{constructor(t,e,i,n){this.from=t,this.to=e,this.size=i,this.displaySize=n}static same(t,e){if(t.length!=e.length)return!1;for(let i=0;i"function"!=typeof t&&"cm-lineWrapping"==t.class));this.heightOracle=new Vs(e),this.stateDeco=t.facet(Pn).filter((t=>"function"!=typeof t)),this.heightMap=_s.empty().applyChanges(this.stateDeco,x.empty,this.heightOracle.setDoc(t.doc),[new Xn(0,0,0,t.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ki.set(this.lineGaps.map((t=>t.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let i=0;i<=1;i++){let n=i?e.head:e.anchor;if(!t.some((({from:t,to:e})=>n>=t&&n<=e))){let{from:e,to:i}=this.lineBlockAt(n);t.push(new er(e,i))}}return this.viewports=t.sort(((t,e)=>t.from-e.from)),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?sr:new rr(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(t=>{this.viewportLines.push(or(t,this.scaler))}))}update(t,e=null){this.state=t.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Pn).filter((t=>"function"!=typeof t));let n=t.changedRanges,s=Xn.extendWithRanges(n,function(t,e,i){let n=new Ns;return Kt.compare(t,e,i,n,0),n.changes}(i,this.stateDeco,t?t.changes:G.empty(this.state.doc.length))),r=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);qs(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=r||Xs)&&(t.flags|=2),o?(this.scrollAnchorPos=t.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=s.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));let l=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,t.flags|=this.updateForViewport(),(l||!t.changes.empty||2&t.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(dn)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,i=window.getComputedStyle(e),n=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?Ei.RTL:Ei.LTR;let r=this.heightOracle.mustRefreshForWrapping(s),o=e.getBoundingClientRect(),a=r||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let l=0,h=0;if(o.width&&o.height){let{scaleX:t,scaleY:i}=qe(e,o);(t>.005&&Math.abs(this.scaleX-t)>.005||i>.005&&Math.abs(this.scaleY-i)>.005)&&(this.scaleX=t,this.scaleY=i,l|=8,r=a=!0)}let c=(parseInt(i.paddingTop)||0)*this.scaleY,u=(parseInt(i.paddingBottom)||0)*this.scaleY;this.paddingTop==c&&this.paddingBottom==u||(this.paddingTop=c,this.paddingBottom=u,l|=10),this.editorWidth!=t.scrollDOM.clientWidth&&(n.lineWrapping&&(a=!0),this.editorWidth=t.scrollDOM.clientWidth,l|=8);let f=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=f&&(this.scrollAnchorHeight=-1,this.scrollTop=f),this.scrolledToBottom=je(t.scrollDOM);let d=(this.printing?Fs:Hs)(e,this.paddingTop),O=d.top-this.pixelViewport.top,p=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;let m=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(m!=this.inView&&(this.inView=m,m&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let g=o.width;if(this.contentDOMWidth==g&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=o.width,this.editorHeight=t.scrollDOM.clientHeight,l|=8),a){let e=t.docView.measureVisibleLineHeights(this.viewport);if(n.mustRefreshForHeights(e)&&(r=!0),r||n.lineWrapping&&Math.abs(g-this.contentDOMWidth)>n.charWidth){let{lineHeight:i,charWidth:o,textHeight:a}=t.docView.measureTextSize();r=i>0&&n.refresh(s,i,o,a,g/o,e),r&&(t.docView.minWidth=0,l|=8)}O>0&&p>0?h=Math.max(O,p):O<0&&p<0&&(h=Math.min(O,p)),qs();for(let i of this.viewports){let s=i.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(i);this.heightMap=(r?_s.empty().applyChanges(this.stateDeco,x.empty,this.heightOracle,[new Xn(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(n,0,r,new Es(i.from,s))}Xs&&(l|=2)}let b=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return b&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(h,this.scrollTarget),l|=this.updateForViewport()),(2&l||b)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(r?[]:this.lineGaps,t)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let i=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),n=this.heightMap,s=this.heightOracle,{visibleTop:r,visibleBottom:o}=this,a=new er(n.lineAt(r-1e3*i,Ys.ByHeight,s,0,0).from,n.lineAt(o+1e3*(1-i),Ys.ByHeight,s,0,0).to);if(e){let{head:t}=e.range;if(ta.to){let i,r=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),o=n.lineAt(t,Ys.ByPos,s,0,0);i="center"==e.y?(o.top+o.bottom)/2-r/2:"start"==e.y||"nearest"==e.y&&t=o+Math.max(10,Math.min(i,250)))&&n>r-2e3&&s>1,r=n<<1;if(this.defaultTextDirection!=Ei.LTR&&!i)return[];let o=[],a=(n,r,l,h)=>{if(r-nn&&tt.from>=l.from&&t.to<=l.to&&Math.abs(t.from-n)t.frome))));if(!f){if(rt.from<=r&&t.to>=r))){let t=e.moveToLineBoundary(et.cursor(r),!1,!0).head;t>n&&(r=t)}let t=this.gapSize(l,n,r,h);f=new Ks(n,r,t,i||t<2e6?t:2e6)}o.push(f)},l=e=>{if(e.lengths&&(n.push({from:s,to:t}),r+=t-s),s=e}},20),s2e6)for(let n of t)n.from>=e.from&&n.frome.from&&a(e.from,o,e,s),lt.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let e=[];Kt.spans(t,this.viewport.from,this.viewport.to,{span(t,i){e.push({from:t,to:i})},point(){}},20);let i=e.length!=this.visibleRanges.length||this.visibleRanges.some(((t,i)=>t.from!=e[i].from||t.to!=e[i].to));return this.visibleRanges=e,i?4:0}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to>=t))||or(this.heightMap.lineAt(t,Ys.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((e=>e.top<=t&&e.bottom>=t))||or(this.heightMap.lineAt(this.scaler.fromDOM(t),Ys.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let e=this.lineBlockAtHeight(t+8);return e.from>=this.viewport.from||this.viewportLines[0].top-t>200?e:this.viewportLines[0]}elementAtHeight(t){return or(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class er{constructor(t,e){this.from=t,this.to=e}}function ir({total:t,ranges:e},i){if(i<=0)return e[0].from;if(i>=1)return e[e.length-1].to;let n=Math.floor(t*i);for(let s=0;;s++){let{from:t,to:i}=e[s],r=i-t;if(n<=r)return t+n;n-=r}}function nr(t,e){let i=0;for(let{from:n,to:s}of t.ranges){if(e<=s){i+=e-n;break}i+=s-n}return i/t.total}const sr={toDOM:t=>t,fromDOM:t=>t,scale:1,eq(t){return t==this}};class rr{constructor(t,e,i){let n=0,s=0,r=0;this.viewports=i.map((({from:i,to:s})=>{let r=e.lineAt(i,Ys.ByPos,t,0,0).top,o=e.lineAt(s,Ys.ByPos,t,0,0).bottom;return n+=o-r,{from:i,to:s,top:r,bottom:o,domTop:0,domBottom:0}})),this.scale=(7e6-n)/(e.height-n);for(let o of this.viewports)o.domTop=r+(o.top-s)*this.scale,r=o.domBottom=o.domTop+(o.bottom-o.top),s=o.bottom}toDOM(t){for(let e=0,i=0,n=0;;e++){let s=ee.from==t.viewports[i].from&&e.to==t.viewports[i].to)))}}function or(t,e){if(1==e.scale)return t;let i=e.toDOM(t.top),n=e.toDOM(t.bottom);return new zs(t.from,t.length,i,n-i,Array.isArray(t._content)?t._content.map((t=>or(t,e))):t._content)}const ar=st.define({combine:t=>t.join(" ")}),lr=st.define({combine:t=>t.indexOf(!0)>-1}),hr=pe.newName(),cr=pe.newName(),ur=pe.newName(),fr={"&light":"."+cr,"&dark":"."+ur};function dr(t,e,i){return new pe(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,(e=>{if("&"==e)return t;if(!i||!i[e])throw new RangeError(`Unsupported selector: ${e}`);return i[e]})):t+" "+e})}const Or=dr("."+hr,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},fr),pr={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},mr=ci.ie&&ci.ie_version<=11;class gr{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new Ve,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);(ci.ie&&ci.ie_version<=11||ci.ios&&t.composing)&&e.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),!window.EditContext||!1===t.constructor.EDIT_CONTEXT||ci.chrome&&ci.chrome_version<126||(this.editContext=new wr(t),t.state.facet(vn)&&(t.contentDOM.editContext=this.editContext.editContext)),mr&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var t;(null===(t=this.view.docView)||void 0===t?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(t){("change"!=t.type&&t.type||t.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,i)=>e!=t[i])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,n=this.selectionRange;if(i.state.facet(vn)?i.root.activeElement!=this.dom:!Pe(this.dom,n))return;let s=n.anchorNode&&i.docView.nearest(n.anchorNode);s&&s.ignoreEvent(t)?e||(this.selectionChanged=!1):(ci.ie&&ci.ie_version<=11||ci.android&&ci.chrome)&&!i.state.selection.main.empty&&n.focusNode&&Ze(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,e=Qe(t.root);if(!e)return!1;let i=ci.safari&&11==t.root.nodeType&&t.root.activeElement==this.dom&&function(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return vr(t,i)}let i=null;function n(t){t.preventDefault(),t.stopImmediatePropagation(),i=t.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),i?vr(t,i):null}(this.view,e)||e;if(!i||this.selectionRange.eq(i))return!1;let n=Pe(this.dom,i);return n&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime{let t=this.delayedAndroidKey;if(t){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=t.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&t.force&&_e(this.dom,t.key,t.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let e=-1,i=-1,n=!1;for(let s of t){let t=this.readMutation(s);t&&(t.typeOver&&(n=!0),-1==e?({from:e,to:i}=t):(e=Math.min(t.from,e),i=Math.max(t.to,i)))}return{from:e,to:i,typeOver:n}}readChange(){let{from:t,to:e,typeOver:i}=this.processRecords(),n=this.selectionChanged&&Pe(this.dom,this.selectionRange);if(t<0&&!n)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new is(this.view,t,e,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let e=this.readChange();if(!e)return this.view.requestMeasure(),!1;let i=this.view.state,n=ns(this.view,e);return this.view.state==i&&(e.domChanged||e.newSel&&!e.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),n}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.flags|=4),"childList"==t.type){let i=br(e,t.previousSibling||t.target.previousSibling,-1),n=br(e,t.nextSibling||t.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:n?e.posBefore(n):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(vn)!=t.state.facet(vn)&&(t.view.contentDOM.editContext=t.state.facet(vn)?this.editContext.editContext:null))}destroy(){var t,e,i;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect();for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function br(t,e,i){for(;e;){let n=Ue.get(e);if(n&&n.parent==t)return n;let s=e.parentNode;e=s!=t.dom?s:i>0?e.nextSibling:e.previousSibling}return null}function vr(t,e){let i=e.startContainer,n=e.startOffset,s=e.endContainer,r=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor);return Ze(o.node,o.offset,s,r)&&([i,n,s,r]=[s,r,i,n]),{anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:r}}class wr{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(t.state);let e=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=e=>{let{anchor:i}=t.state.selection.main,n={from:this.toEditorPos(e.updateRangeStart),to:this.toEditorPos(e.updateRangeEnd),insert:x.of(e.text.split("\n"))};n.from==this.from&&ithis.to&&(n.to=i),(n.from!=n.to||n.insert.length)&&(this.pendingContextChange=n,t.state.readOnly||ss(t,n,et.single(this.toEditorPos(e.selectionStart),this.toEditorPos(e.selectionEnd))),this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state)))},this.handlers.characterboundsupdate=i=>{let n=[],s=null;for(let e=this.toEditorPos(i.rangeStart),r=this.toEditorPos(i.rangeEnd);e{let i=[];for(let t of e.getTextFormats()){let e=t.underlineStyle,n=t.underlineThickness;if("None"!=e&&"None"!=n){let s=`text-decoration: underline ${"Dashed"==e?"dashed ":"Squiggle"==e?"wavy ":""}${"Thin"==n?1:2}px`;i.push(ki.mark({attributes:{style:s}}).range(this.toEditorPos(t.rangeStart),this.toEditorPos(t.rangeEnd)))}}t.dispatch({effects:gn.of(ki.set(i))})},this.handlers.compositionstart=()=>{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{t.inputState.composing=-1,t.inputState.compositionFirstChange=null};for(let i in this.handlers)e.addEventListener(i,this.handlers[i]);this.measureReq={read:t=>{this.editContext.updateControlBounds(t.contentDOM.getBoundingClientRect());let e=Qe(t.root);e&&e.rangeCount&&this.editContext.updateSelectionBounds(e.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let e=0,i=!1,n=this.pendingContextChange;return t.changes.iterChanges(((s,r,o,a,l)=>{if(i)return;let h=l.length-(r-s);if(n&&r>=n.to){if(n.from==s&&n.to==r&&n.insert.eq(l))return n=this.pendingContextChange=null,e+=h,void(this.to+=h);n=null,this.revertPending(t.state)}if(s+=e,(r+=e)<=this.from)this.from+=h,this.to+=h;else if(sthis.to||this.to-this.from+l.length>3e4)return void(i=!0);this.editContext.updateText(this.toContextPos(s),this.toContextPos(r),l.toString()),this.to+=h}e+=h})),n&&!i&&this.revertPending(t.state),!i}update(t){let e=this.pendingContextChange;this.applyEdits(t)&&this.rangeIsValid(t.state)?(t.docChanged||t.selectionSet||e)&&this.setSelection(t.state):(this.pendingContextChange=null,this.resetRange(t.state),this.editContext.updateText(0,this.editContext.text.length,t.state.doc.sliceString(this.from,this.to)),this.setSelection(t.state)),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:e}=t.selection.main;this.from=Math.max(0,e-1e4),this.to=Math.min(t.doc.length,e+1e4)}revertPending(t){let e=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(e.from),this.toContextPos(e.from+e.insert.length),t.doc.sliceString(e.from,e.to))}setSelection(t){let{main:e}=t.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,e.anchor))),n=this.toContextPos(e.head);this.editContext.selectionStart==i&&this.editContext.selectionEnd==n||this.editContext.updateSelection(i,n)}rangeIsValid(t){let{head:e}=t.selection.main;return!(this.from>0&&e-this.from<500||this.to3e4)}toEditorPos(t){return t+this.from}toContextPos(t){return t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class Sr{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var e;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:i}=t;this.dispatchTransactions=t.dispatchTransactions||i&&(t=>t.forEach((t=>i(t,this))))||(t=>this.update(t)),this.dispatch=this.dispatch.bind(this),this._root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new tr(t.state||It.create(t)),t.scrollTo&&t.scrollTo.is(mn)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Sn).map((t=>new xn(t)));for(let n of this.plugins)n.update(this);this.observer=new gr(this),this.inputState=new rs(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Vn(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(e=document.fonts)||void 0===e?void 0:e.ready)&&document.fonts.ready.then((()=>this.requestMeasure()))}dispatch(...t){let e=1==t.length&&t[0]instanceof qt?t:1==t.length&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(e,this)}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,i=!1,n=!1,s=this.state;for(let f of t){if(f.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=f.state}if(this.destroyed)return void(this.viewState.state=s);let r=this.hasFocus,o=0,a=null;t.some((t=>t.annotation(Cs)))?(this.inputState.notifiedFocused=r,o=1):r!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=r,a=Ts(s,r),a||(o=1));let l=this.observer.delayedAndroidKey,h=null;if(l?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(h=null)):this.observer.clear(),s.facet(It.phrases)!=this.state.facet(It.phrases))return this.setState(s);e=qn.create(this,s,t),e.flags|=o;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(c&&(c=c.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;c=new pn(t.empty?t:et.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(mn)&&(c=t.value.clip(this.state))}this.viewState.update(e,c),this.bidiCache=Qr.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),i=this.docView.update(e),this.state.facet(Mn)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(i,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(e.startState.facet(ar)!=e.state.facet(ar)&&(this.viewState.mustMeasureContent=!0),(i||n||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),i&&this.docViewUpdate(),!e.empty)for(let f of this.state.facet(an))try{f(e)}catch(u){bn(this.state,u,"update listener")}(a||h)&&Promise.resolve().then((()=>{a&&this.state==a.startState&&this.dispatch(a),h&&!ns(this,h)&&l.force&&_e(this.contentDOM,l.key,l.keyCode)}))}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new tr(t),this.plugins=t.facet(Sn).map((t=>new xn(t))),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView.destroy(),this.docView=new Vn(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(Sn),i=t.state.facet(Sn);if(e!=i){let n=[];for(let s of i){let i=e.indexOf(s);if(i<0)n.push(new xn(s));else{let e=this.plugins[i];e.mustUpdate=t,n.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=n,this.pluginMap.clear()}else for(let n of this.plugins)n.mustUpdate=t;for(let n=0;n-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();let e=null,i=this.scrollDOM,n=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:r}=this.viewState;Math.abs(n-this.viewState.scrollTop)>1&&(r=-1),this.viewState.scrollAnchorHeight=-1;try{for(let t=0;;t++){if(r<0)if(je(i))s=-1,r=this.viewState.heightMap.height;else{let t=this.viewState.scrollAnchorAt(n);s=t.from,r=t.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let l=[];4&a||([this.measureRequests,l]=[l,this.measureRequests]);let h=l.map((t=>{try{return t.read(this)}catch(e){return bn(this.state,e),xr}})),c=qn.create(this,this.state,[]),u=!1;c.flags|=a,e?e.flags|=a:e=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),u=this.docView.update(c),u&&this.docViewUpdate());for(let t=0;t1||t<-1){n+=t,i.scrollTop=n/this.scaleY,r=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let a of this.state.facet(an))a(e)}get themeClasses(){return hr+" "+(this.state.facet(lr)?ur:cr)+" "+this.state.facet(ar)}updateAttrs(){let t=kr(this,Qn,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(vn)?"true":"false",class:"cm-content",style:`${ci.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),kr(this,kn,e);let i=this.observer.ignore((()=>{let i=Si(this.contentDOM,this.contentAttrs,e),n=Si(this.dom,this.editorAttrs,t);return i||n}));return this.editorAttrs=t,this.contentAttrs=e,i}showAnnouncements(t){let e=!0;for(let i of t)for(let t of i.effects)if(t.is(Sr.announce)){e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(Mn);let t=this.state.facet(Sr.cspNonce);pe.mount(this.root,this.styleModules.concat(Or).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),t){if(this.measureRequests.indexOf(t)>-1)return;if(null!=t.key)for(let e=0;ee.spec==t))||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,i){return Fn(this,t,Nn(this,t,e,i))}moveByGroup(t,e){return Fn(this,t,Nn(this,t,e,(e=>function(t,e,i){let n=t.state.charCategorizer(e),s=n(i);return t=>{let e=n(t);return s==Dt.Space&&(s=e),s==e}}(this,t.head,e))))}visualLineSide(t,e){let i=this.bidiSpans(t),n=this.textDirectionAt(t.from),s=i[e?i.length-1:0];return et.cursor(s.side(e,n)+t.from,s.forward(!e,n)?1:-1)}moveToLineBoundary(t,e,i=!0){return function(t,e,i,n){let s=Un(t,e.head),r=n&&s.type==Qi.Text&&(t.lineWrapping||s.widgetLineBreaks)?t.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head):null;if(r){let e=t.dom.getBoundingClientRect(),n=t.textDirectionAt(s.from),o=t.posAtCoords({x:i==(n==Ei.LTR)?e.right-1:e.left+1,y:(r.top+r.bottom)/2});if(null!=o)return et.cursor(o,i?-1:1)}return et.cursor(i?s.to:s.from,i?-1:1)}(this,t,e,i)}moveVertically(t,e,i){return Fn(this,t,function(t,e,i,n){let s=e.head,r=i?1:-1;if(s==(i?t.state.doc.length:0))return et.cursor(s,e.assoc);let o,a=e.goalColumn,l=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(s,e.assoc||-1),c=t.documentTop;if(h)null==a&&(a=h.left-l.left),o=r<0?h.top:h.bottom;else{let e=t.viewState.lineBlockAt(s);null==a&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(s-e.from))),o=(r<0?e.top:e.bottom)+c}let u=l.left+a,f=null!=n?n:t.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let e=o+(f+d)*r,i=In(t,{x:u,y:e},!1,r);if(el.bottom||(r<0?is)){let n=t.docView.coordsForChar(i),s=!n||e0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(fn)||tthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>yr)return Ki(t.length);let e,i=this.textDirectionAt(t.from);for(let s of this.bidiCache)if(s.from==t.from&&s.dir==i&&(s.fresh||Ui(s.isolates,e=Tn(this,t))))return s.order;e||(e=Tn(this,t));let n=function(t,e,i){if(!t)return[new Gi(0,0,e==Yi?1:0)];if(e==zi&&!i.length&&!Ii.test(t))return Ki(t.length);if(i.length)for(;t.length>Ni.length;)Ni[Ni.length]=256;let n=[],s=e==zi?0:1;return Fi(t,s,s,i,0,t.length,n),n}(t.text,i,e);return this.bidiCache.push(new Qr(t.from,t.to,i,e,!0,n)),n}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||ci.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{Ye(this.contentDOM),this.docView.updateSelection()}))}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((9==t.nodeType?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return mn.of(new pn("number"==typeof t?et.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:e}=this.scrollDOM,i=this.viewState.scrollAnchorAt(t);return mn.of(new pn(et.cursor(i.from),"start","start",i.top-t,e,!0))}setTabFocusMode(t){null==t?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof t?this.inputState.tabFocusMode=t?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return yn.define((()=>({})),{eventHandlers:t})}static domEventObservers(t){return yn.define((()=>({})),{eventObservers:t})}static theme(t,e){let i=pe.newName(),n=[ar.of(i),Mn.of(dr(`.${i}`,t))];return e&&e.dark&&n.push(lr.of(!0)),n}static baseTheme(t){return gt.lowest(Mn.of(dr("."+hr,t,fr)))}static findFromDOM(t){var e;let i=t.querySelector(".cm-content"),n=i&&Ue.get(i)||Ue.get(t);return(null===(e=null==n?void 0:n.rootView)||void 0===e?void 0:e.view)||null}}Sr.styleModule=Mn,Sr.inputHandler=ln,Sr.clipboardInputFilter=cn,Sr.clipboardOutputFilter=un,Sr.scrollHandler=On,Sr.focusChangeEffect=hn,Sr.perLineTextDirection=fn,Sr.exceptionSink=on,Sr.updateListener=an,Sr.editable=vn,Sr.mouseSelectionStyle=rn,Sr.dragMovesSelection=sn,Sr.clickAddsSelectionRange=nn,Sr.decorations=Pn,Sr.outerDecorations=$n,Sr.atomicRanges=Zn,Sr.bidiIsolatedRanges=Cn,Sr.scrollMargins=An,Sr.darkTheme=lr,Sr.cspNonce=st.define({combine:t=>t.length?t[0]:""}),Sr.contentAttributes=kn,Sr.editorAttributes=Qn,Sr.lineWrapping=Sr.contentAttributes.of({class:"cm-lineWrapping"}),Sr.announce=Xt.define();const yr=4096,xr={};class Qr{constructor(t,e,i,n,s,r){this.from=t,this.to=e,this.dir=i,this.isolates=n,this.fresh=s,this.order=r}static update(t,e){if(e.empty&&!t.some((t=>t.fresh)))return t;let i=[],n=t.length?t[t.length-1].dir:Ei.LTR;for(let s=Math.max(0,t.length-10);s=0;s--){let e=n[s],r="function"==typeof e?e(t):e;r&&bi(r,i)}return i}const Pr=ci.mac?"mac":ci.windows?"win":ci.linux?"linux":"key";function $r(t,e,i){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==i&&e.shiftKey&&(t="Shift-"+t),t}const Zr=gt.default(Sr.domEventHandlers({keydown:(t,e)=>qr(Ar(e.state),t,e,"editor")})),Cr=st.define({enables:Zr}),Tr=new WeakMap;function Ar(t){let e=t.facet(Cr),i=Tr.get(e);return i||Tr.set(e,i=function(t,e=Pr){let i=Object.create(null),n=Object.create(null),s=(t,e)=>{let i=n[t];if(null==i)n[t]=e;else if(i!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},r=(t,n,r,o,a)=>{var l,h;let c=i[t]||(i[t]=Object.create(null)),u=n.split(/ (?!$)/).map((t=>function(t,e){const i=t.split(/-(?!$)/);let n,s,r,o,a=i[i.length-1];"Space"==a&&(a=" ");for(let l=0;l{let n=Rr={view:e,prefix:i,scope:t};return setTimeout((()=>{Rr==n&&(Rr=null)}),Mr),!0}]})}let f=u.join(" ");s(f,!1);let d=c[f]||(c[f]={preventDefault:!1,stopPropagation:!1,run:(null===(h=null===(l=c._any)||void 0===l?void 0:l.run)||void 0===h?void 0:h.slice())||[]});r&&d.run.push(r),o&&(d.preventDefault=!0),a&&(d.stopPropagation=!0)};for(let o of t){let t=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let e of t){let t=i[e]||(i[e]=Object.create(null));t._any||(t._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:n}=o;for(let e in t)t[e].run.push((t=>n(t,Xr)))}let n=o[e]||o.key;if(n)for(let e of t)r(e,n,o.run,o.preventDefault,o.stopPropagation),o.shift&&r(e,"Shift-"+n,o.shift,o.preventDefault,o.stopPropagation)}return i}(e.reduce(((t,e)=>t.concat(e)),[]))),i}let Rr=null;const Mr=4e3;let Xr=null;function qr(t,e,i,n){Xr=e;let s=function(t){var e=!(we&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Se&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?ve:be)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(e),r=j(_(s,0))==s.length&&" "!=s,o="",a=!1,l=!1,h=!1;Rr&&Rr.view==i&&Rr.scope==n&&(o=Rr.prefix+" ",cs.indexOf(e.keyCode)<0&&(l=!0,Rr=null));let c,u,f=new Set,d=t=>{if(t){for(let e of t.run)if(!f.has(e)&&(f.add(e),e(i)))return t.stopPropagation&&(h=!0),!0;t.preventDefault&&(t.stopPropagation&&(h=!0),l=!0)}return!1},O=t[n];return O&&(d(O[o+$r(s,e,!r)])?a=!0:r&&(e.altKey||e.metaKey||e.ctrlKey)&&!(ci.windows&&e.ctrlKey&&e.altKey)&&(c=be[e.keyCode])&&c!=s?(d(O[o+$r(c,e,!0)])||e.shiftKey&&(u=ve[e.keyCode])!=s&&u!=c&&d(O[o+$r(u,e,!1)]))&&(a=!0):r&&e.shiftKey&&d(O[o+$r(s,e,!0)])&&(a=!0),!a&&d(O._any)&&(a=!0)),l&&(a=!0),a&&h&&e.stopPropagation(),Xr=null,a}class Vr{constructor(t,e,i,n,s){this.className=t,this.left=e,this.top=i,this.width=n,this.height=s}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,e){return e.className==this.className&&(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",null!=this.width&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,i){if(i.empty){let n=t.coordsAtPos(i.head,i.assoc||1);if(!n)return[];let s=Er(t);return[new Vr(e,n.left-s.left,n.top-s.top,null,n.bottom-n.top)]}return function(t,e,i){if(i.to<=t.viewport.from||i.from>=t.viewport.to)return[];let n=Math.max(i.from,t.viewport.from),s=Math.min(i.to,t.viewport.to),r=t.textDirection==Ei.LTR,o=t.contentDOM,a=o.getBoundingClientRect(),l=Er(t),h=o.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),u=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),f=a.right-(c?parseInt(c.paddingRight):0),d=Un(t,n),O=Un(t,s),p=d.type==Qi.Text?d:null,m=O.type==Qi.Text?O:null;p&&(t.lineWrapping||d.widgetLineBreaks)&&(p=zr(t,n,1,p));m&&(t.lineWrapping||O.widgetLineBreaks)&&(m=zr(t,s,-1,m));if(p&&m&&p.from==m.from&&p.to==m.to)return b(v(i.from,i.to,p));{let e=p?v(i.from,null,p):w(d,!1),n=m?v(null,i.to,m):w(O,!0),s=[];return(p||d).to<(m||O).from-(p&&m?1:0)||d.widgetLineBreaks>1&&e.bottom+t.defaultLineHeight/2h&&r.from=s)break;a>n&&l(Math.max(t,n),null==e&&t<=h,Math.min(a,s),null==i&&a>=c,o.dir)}if(n=r.to+1,n>=s)break}return 0==a.length&&l(h,null==e,c,null==i,t.textDirection),{top:s,bottom:o,horizontal:a}}function w(t,e){let i=a.top+(e?t.top:t.bottom);return{top:i,bottom:i,horizontal:[]}}}(t,e,i)}}function Er(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Ei.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function zr(t,e,i,n){let s=t.coordsAtPos(e,2*i);if(!s)return n;let r=t.dom.getBoundingClientRect(),o=(s.top+s.bottom)/2,a=t.posAtCoords({x:r.left+1,y:o}),l=t.posAtCoords({x:r.right-1,y:o});return null==a||null==l?n:{from:Math.max(n.from,Math.min(a,l)),to:Math.min(n.to,Math.max(a,l))}}class Yr{constructor(t,e){this.view=t,this.layer=e,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,t)}update(t){t.startState.facet(Lr)!=t.state.facet(Lr)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){!1!==this.layer.updateOnDocViewUpdate&&t.requestMeasure(this.measureReq)}setOrder(t){let e=0,i=t.facet(Lr);for(;e{return i=t,n=this.drawn[e],!(i.constructor==n.constructor&&i.eq(n));var i,n}))){let e=this.dom.firstChild,i=0;for(let n of t)n.update&&e&&n.constructor&&this.drawn[i].constructor&&n.update(e,this.drawn[i])?(e=e.nextSibling,i++):this.dom.insertBefore(n.draw(),e);for(;e;){let t=e.nextSibling;e.remove(),e=t}this.drawn=t}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Lr=st.define();function _r(t){return[yn.define((e=>new Yr(e,t))),Lr.of(t)]}const Dr=!ci.ios,jr=st.define({combine:t=>Gt(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function Br(t={}){return[jr.of(t),Ir,Ur,Hr,dn.of(!0)]}function Wr(t){return t.startState.facet(jr)!=t.state.facet(jr)}const Ir=_r({above:!0,markers(t){let{state:e}=t,i=e.facet(jr),n=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty?!r||Dr:i.drawRangeCursor){let e=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",i=s.empty?s:et.cursor(s.head,s.head>s.anchor?-1:1);for(let s of Vr.forRange(t,e,i))n.push(s)}}return n},update(t,e){t.transactions.some((t=>t.selection))&&(e.style.animationName="cm-blink"==e.style.animationName?"cm-blink2":"cm-blink");let i=Wr(t);return i&&Gr(t.state,e),t.docChanged||t.selectionSet||i},mount(t,e){Gr(e.state,t)},class:"cm-cursorLayer"});function Gr(t,e){e.style.animationDuration=t.facet(jr).cursorBlinkRate+"ms"}const Ur=_r({above:!1,markers:t=>t.state.selection.ranges.map((e=>e.empty?[]:Vr.forRange(t,"cm-selectionBackground",e))).reduce(((t,e)=>t.concat(e))),update:(t,e)=>t.docChanged||t.selectionSet||t.viewportChanged||Wr(t),class:"cm-selectionLayer"}),Nr={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Dr&&(Nr[".cm-line"].caretColor=Nr[".cm-content"].caretColor="transparent !important");const Hr=gt.highest(Sr.theme(Nr)),Fr=Xt.define({map:(t,e)=>null==t?null:e.mapPos(t)}),Kr=ut.define({create:()=>null,update:(t,e)=>(null!=t&&(t=e.changes.mapPos(t)),e.effects.reduce(((t,e)=>e.is(Fr)?e.value:t),t))}),Jr=yn.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let i=t.state.field(Kr);null==i?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Kr)!=i||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Kr),i=null!=e&&t.coordsAtPos(e);if(!i)return null;let n=t.scrollDOM.getBoundingClientRect();return{left:i.left-n.left+t.scrollDOM.scrollLeft*t.scaleX,top:i.top-n.top+t.scrollDOM.scrollTop*t.scaleY,height:i.bottom-i.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:i}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/i+"px",this.cursor.style.height=t.height/i+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Kr)!=t&&this.view.dispatch({effects:Fr.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function to(t,e,i,n,s){e.lastIndex=0;for(let r,o=t.iterRange(i,n),a=i;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;r=e.exec(o.value);)s(a+r.index,r)}class eo{constructor(t){const{regexp:e,decoration:i,decorate:n,boundary:s,maxLength:r=1e3}=t;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,n)this.addMatch=(t,e,i,s)=>n(s,i,i+t[0].length,t,e);else if("function"==typeof i)this.addMatch=(t,e,n,s)=>{let r=i(t,e,n);r&&s(n,n+t[0].length,r)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(t,e,n,s)=>s(n,n+t[0].length,i)}this.boundary=s,this.maxLength=r}createDeco(t){let e=new Jt,i=e.add.bind(e);for(let{from:n,to:s}of function(t,e){let i=t.visibleRanges;if(1==i.length&&i[0].from==t.viewport.from&&i[0].to==t.viewport.to)return i;let n=[];for(let{from:s,to:r}of i)s=Math.max(t.state.doc.lineAt(s).from,s-e),r=Math.min(t.state.doc.lineAt(r).to,r+e),n.length&&n[n.length-1].to>=s?n[n.length-1].to=r:n.push({from:s,to:r});return n}(t,this.maxLength))to(t.state.doc,this.regexp,n,s,((e,n)=>this.addMatch(n,t,e,i)));return e.finish()}updateDeco(t,e){let i=1e9,n=-1;return t.docChanged&&t.changes.iterChanges(((e,s,r,o)=>{o>t.view.viewport.from&&r1e3?this.createDeco(t.view):n>-1?this.updateRange(t.view,e.map(t.changes),i,n):e}updateRange(t,e,i,n){for(let s of t.visibleRanges){let r=Math.max(s.from,i),o=Math.min(s.to,n);if(o>r){let i=t.state.doc.lineAt(r),n=i.toi.from;r--)if(this.boundary.test(i.text[r-1-i.from])){a=r;break}for(;oc.push(i.range(t,e));if(i==n)for(this.regexp.lastIndex=a-i.from;(h=this.regexp.exec(i.text))&&h.indexthis.addMatch(i,t,e,u)));e=e.update({filterFrom:a,filterTo:l,filter:(t,e)=>tl,add:c})}}return e}}const io=null!=/x/.unicode?"gu":"g",no=new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\ufeff-]",io),so={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let ro=null;const oo=st.define({combine(t){let e=Gt(t,{render:null,specialChars:no,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==ro&&"undefined"!=typeof document&&document.body){let e=document.body.style;ro=null!=(null!==(t=e.tabSize)&&void 0!==t?t:e.MozTabSize)}return ro||!1}())&&(e.specialChars=new RegExp("\t|"+e.specialChars.source,io)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,io)),e}});function ao(t={}){return[oo.of(t),lo||(lo=yn.fromClass(class{constructor(t){this.view=t,this.decorations=ki.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(oo)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new eo({regexp:t.specialChars,decoration:(e,i,n)=>{let{doc:s}=i.state,r=_(e[0],0);if(9==r){let t=s.lineAt(n),e=i.state.tabSize,r=ce(t.text,e,n-t.from);return ki.replace({widget:new co((e-r%e)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=ki.replace({widget:new ho(t,r)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(oo);t.startState.facet(oo)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))]}let lo=null;class ho extends xi{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){let e=function(t){return t>=32?"•":10==t?"␤":String.fromCharCode(9216+t)}(this.code),i=t.state.phrase("Control character")+" "+(so[this.code]||"0x"+this.code.toString(16)),n=this.options.render&&this.options.render(this.code,i,e);if(n)return n;let s=document.createElement("span");return s.textContent=e,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class co extends xi{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent="\t",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}const uo=ki.line({class:"cm-activeLine"}),fo=yn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,i=[];for(let n of t.state.selection.ranges){let s=t.lineBlockAt(n.head);s.from>e&&(i.push(uo.range(s.from)),e=s.from)}return ki.set(i)}},{decorations:t=>t.decorations}),Oo=2e3;function po(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),n=t.state.doc.lineAt(i),s=i-n.from,r=s>Oo?-1:s==n.length?function(t,e){let i=t.coordsAtPos(t.viewport.from);return i?Math.round(Math.abs((i.left-e)/t.defaultCharacterWidth)):-1}(t,e.clientX):ce(n.text,t.state.tabSize,i-n.from);return{line:n.number,col:r,off:s}}function mo(t,e){let i=po(t,e),n=t.state.selection;return i?{update(t){if(t.docChanged){let e=t.changes.mapPos(t.startState.doc.line(i.line).from),s=t.state.doc.lineAt(e);i={line:s.number,col:i.col,off:Math.min(i.off,s.length)},n=n.map(t.changes)}},get(e,s,r){let o=po(t,e);if(!o)return n;let a=function(t,e,i){let n=Math.min(e.line,i.line),s=Math.max(e.line,i.line),r=[];if(e.off>Oo||i.off>Oo||e.col<0||i.col<0){let o=Math.min(e.off,i.off),a=Math.max(e.off,i.off);for(let e=n;e<=s;e++){let i=t.doc.line(e);i.length<=a&&r.push(et.range(i.from+o,i.to+a))}}else{let o=Math.min(e.col,i.col),a=Math.max(e.col,i.col);for(let e=n;e<=s;e++){let i=t.doc.line(e),n=ue(i.text,o,t.tabSize,!0);if(n<0)r.push(et.cursor(i.to));else{let e=ue(i.text,a,t.tabSize);r.push(et.range(i.from+n,i.from+e))}}}return r}(t.state,i,o);return a.length?r?et.create(a.concat(n.ranges)):et.create(a):n}}:null}const go={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},bo={style:"cursor: crosshair"};function vo(t={}){let[e,i]=go[t.key||"Alt"],n=yn.fromClass(class{constructor(t){this.view=t,this.isDown=!1}set(t){this.isDown!=t&&(this.isDown=t,this.view.update([]))}},{eventObservers:{keydown(t){this.set(t.keyCode==e||i(t))},keyup(t){t.keyCode!=e&&i(t)||this.set(!1)},mousemove(t){this.set(i(t))}}});return[n,Sr.contentAttributes.of((t=>{var e;return(null===(e=t.plugin(n))||void 0===e?void 0:e.isDown)?bo:null}))]}const wo="-10000px";class So{constructor(t,e,i,n){this.facet=e,this.createTooltipView=i,this.removeTooltipView=n,this.input=t.state.facet(e),this.tooltips=this.input.filter((t=>t));let s=null;this.tooltipViews=this.tooltips.map((t=>s=i(t,s)))}update(t,e){var i;let n=t.state.facet(this.facet),s=n.filter((t=>t));if(n===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let r=[],o=e?[]:null;for(let a=0;ae[i]=t)),e.length=o.length),this.input=n,this.tooltips=s,this.tooltipViews=r,!0}}function yo(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const xo=st.define({combine:t=>{var e,i,n;return{position:ci.ios?"absolute":(null===(e=t.find((t=>t.position)))||void 0===e?void 0:e.position)||"fixed",parent:(null===(i=t.find((t=>t.parent)))||void 0===i?void 0:i.parent)||null,tooltipSpace:(null===(n=t.find((t=>t.tooltipSpace)))||void 0===n?void 0:n.tooltipSpace)||yo}}}),Qo=new WeakMap,ko=yn.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(xo);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver((()=>this.measureSoon())):null,this.manager=new So(t,Zo,((t,e)=>this.createTooltip(t,e)),(t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()})),this.above=this.manager.tooltips.map((t=>!!t.above)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let i=e||t.geometryChanged,n=t.state.facet(xo);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;i=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(t,e){let i=t.create(this.view),n=e?e.dom:null;if(i.dom.classList.add("cm-tooltip"),t.arrow&&!i.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",i.dom.appendChild(t)}return i.dom.style.position=this.position,i.dom.style.top=wo,i.dom.style.left="0px",this.container.insertBefore(i.dom,n),i.mount&&i.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(i.dom),i}destroy(){var t,e,i;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),null===(t=n.destroy)||void 0===t||t.call(n);this.parent&&this.container.remove(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),null===(i=this.intersectionObserver)||void 0===i||i.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,i=1,n=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if(ci.gecko)n=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==wo&&"0px"==t.style.left){let e=t.getBoundingClientRect();n=Math.abs(e.top+1e4)>1||Math.abs(e.left)>1}}if(n||"absolute"==this.position)if(this.parent){let t=this.parent.getBoundingClientRect();t.width&&t.height&&(e=t.width/this.parent.offsetWidth,i=t.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:i}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map(((t,e)=>{let i=this.manager.tooltipViews[e];return i.getCoords?i.getCoords(t.pos):this.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(xo).tooltipSpace(this.view),scaleX:e,scaleY:i,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let t of this.manager.tooltipViews)t.dom.style.position="absolute"}let{editor:i,space:n,scaleX:s,scaleY:r}=t,o=[];for(let a=0;a=Math.min(i.bottom,n.bottom)||u.rightMath.min(i.right,n.right)+.1){c.style.top=wo;continue}let d=l.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,O=d?7:0,p=f.right-f.left,m=null!==(e=Qo.get(h))&&void 0!==e?e:f.bottom-f.top,g=h.offset||$o,b=this.view.textDirection==Ei.LTR,v=f.width>n.right-n.left?b?n.left:n.right-f.width:b?Math.max(n.left,Math.min(u.left-(d?14:0)+g.x,n.right-p)):Math.min(Math.max(n.left,u.left-p+(d?14:0)-g.x),n.right-p),w=this.above[a];!l.strictSide&&(w?u.top-(f.bottom-f.top)-g.yn.bottom)&&w==n.bottom-u.bottom>u.top-n.top&&(w=this.above[a]=!w);let S=(w?u.top-n.top:n.bottom-u.bottom)-O;if(Sv&&t.topy&&(y=w?t.top-m-2-O:t.bottom+O+2);if("absolute"==this.position?(c.style.top=(y-t.parent.top)/r+"px",c.style.left=(v-t.parent.left)/s+"px"):(c.style.top=y/r+"px",c.style.left=v/s+"px"),d){let t=u.left+(b?g.x:-g.x)-(v+14-7);d.style.left=t/s+"px"}!0!==h.overlap&&o.push({left:v,top:y,right:x,bottom:y+m}),c.classList.toggle("cm-tooltip-above",w),c.classList.toggle("cm-tooltip-below",!w),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=wo}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Po=Sr.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),$o={x:0,y:0},Zo=st.define({enables:[ko,Po]}),Co=st.define({combine:t=>t.reduce(((t,e)=>t.concat(e)),[])});class To{static create(t){return new To(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new So(t,Co,((t,e)=>this.createHostedView(t,e)),(t=>t.dom.remove()))}createHostedView(t,e){let i=t.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,e?e.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(t){for(let e of this.manager.tooltipViews)e.mount&&e.mount(t);this.mounted=!0}positioned(t){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let e of this.manager.tooltipViews)null===(t=e.destroy)||void 0===t||t.call(e)}passProp(t){let e;for(let i of this.manager.tooltipViews){let n=i[t];if(void 0!==n)if(void 0===e)e=n;else if(e!==n)return}return e}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Ao=Zo.compute([Co],(t=>{let e=t.facet(Co);return 0===e.length?null:{pos:Math.min(...e.map((t=>t.pos))),end:Math.max(...e.map((t=>{var e;return null!==(e=t.end)&&void 0!==e?e:t.pos}))),create:To.create,above:e[0].above,arrow:e.some((t=>t.arrow))}}));class Ro{constructor(t,e,i,n,s){this.view=t,this.source=e,this.field=i,this.setHover=n,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;ti.bottom||e.xi.right+t.defaultCharacterWidth)return;let r=t.bidiSpans(t.state.doc.lineAt(n)).find((t=>t.from<=n&&t.to>=n)),o=r&&r.dir==Ei.RTL?-1:1;s=e.x{this.pending==e&&(this.pending=null,!i||Array.isArray(i)&&!i.length||t.dispatch({effects:this.setHover.of(Array.isArray(i)?i:[i])}))}),(e=>bn(t.state,e,"hover tooltip")))}else!r||Array.isArray(r)&&!r.length||t.dispatch({effects:this.setHover.of(Array.isArray(r)?r:[r])})}get tooltip(){let t=this.view.plugin(ko),e=t?t.manager.tooltips.findIndex((t=>t.create==To.create)):-1;return e>-1?t.manager.tooltipViews[e]:null}mousemove(t){var e,i;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:n,tooltip:s}=this;if(n.length&&s&&!function(t,e){let i,{left:n,right:s,top:r,bottom:o}=t.getBoundingClientRect();if(i=t.querySelector(".cm-tooltip-arrow")){let t=i.getBoundingClientRect();r=Math.min(t.top,r),o=Math.max(t.bottom,o)}return e.clientX>=n-Mo&&e.clientX<=s+Mo&&e.clientY>=r-Mo&&e.clientY<=o+Mo}(s.dom,t)||this.pending){let{pos:s}=n[0]||this.pending,r=null!==(i=null===(e=n[0])||void 0===e?void 0:e.end)&&void 0!==i?i:s;(s==r?this.view.posAtCoords(this.lastMove)==s:function(t,e,i,n,s){let r=t.scrollDOM.getBoundingClientRect(),o=t.documentTop+t.documentPadding.top+t.contentHeight;if(r.left>n||r.rights||Math.min(r.bottom,o)=e&&a<=i}(this.view,s,r,t.clientX,t.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:e}=this;if(e.length){let{tooltip:e}=this;e&&e.dom.contains(t.relatedTarget)?this.watchTooltipLeave(e.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let e=i=>{t.removeEventListener("mouseleave",e),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",e)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Mo=4;function Xo(t,e={}){let i=Xt.define(),n=ut.define({create:()=>[],update(t,n){if(t.length&&(e.hideOnChange&&(n.docChanged||n.selection)?t=[]:e.hideOn&&(t=t.filter((t=>!e.hideOn(n,t)))),n.docChanged)){let e=[];for(let i of t){let t=n.changes.mapPos(i.pos,-1,W.TrackDel);if(null!=t){let s=Object.assign(Object.create(null),i);s.pos=t,null!=s.end&&(s.end=n.changes.mapPos(s.end)),e.push(s)}}t=e}for(let e of n.effects)e.is(i)&&(t=e.value),e.is(Vo)&&(t=[]);return t},provide:t=>Co.from(t)});return{active:n,extension:[n,yn.define((s=>new Ro(s,t,n,i,e.hoverTime||300))),Ao]}}function qo(t,e){let i=t.plugin(ko);if(!i)return null;let n=i.manager.tooltips.indexOf(e);return n<0?null:i.manager.tooltipViews[n]}const Vo=Xt.define(),Eo=st.define({combine(t){let e,i;for(let n of t)e=e||n.topContainer,i=i||n.bottomContainer;return{topContainer:e,bottomContainer:i}}});function zo(t,e){let i=t.plugin(Yo),n=i?i.specs.indexOf(e):-1;return n>-1?i.panels[n]:null}const Yo=yn.fromClass(class{constructor(t){this.input=t.state.facet(Do),this.specs=this.input.filter((t=>t)),this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(Eo);this.top=new Lo(t,!0,e.topContainer),this.bottom=new Lo(t,!1,e.bottomContainer),this.top.sync(this.panels.filter((t=>t.top))),this.bottom.sync(this.panels.filter((t=>!t.top)));for(let i of this.panels)i.dom.classList.add("cm-panel"),i.mount&&i.mount()}update(t){let e=t.state.facet(Eo);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Lo(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Lo(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=t.state.facet(Do);if(i!=this.input){let e=i.filter((t=>t)),n=[],s=[],r=[],o=[];for(let i of e){let e,a=this.specs.indexOf(i);a<0?(e=i(t.view),o.push(e)):(e=this.panels[a],e.update&&e.update(t)),n.push(e),(e.top?s:r).push(e)}this.specs=e,this.panels=n,this.top.sync(s),this.bottom.sync(r);for(let t of o)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let n of this.panels)n.update&&n.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Sr.scrollMargins.of((e=>{let i=e.plugin(t);return i&&{top:i.top.scrollMargin(),bottom:i.bottom.scrollMargin()}}))});class Lo{constructor(t,e,i){this.view=t,this.top=e,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=_o(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=_o(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function _o(t){let e=t.nextSibling;return t.remove(),e}const Do=st.define({enables:Yo});class jo extends Ut{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}jo.prototype.elementClass="",jo.prototype.toDOM=void 0,jo.prototype.mapMode=W.TrackBefore,jo.prototype.startSide=jo.prototype.endSide=-1,jo.prototype.point=!0;const Bo=st.define(),Wo=st.define(),Io={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Kt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Go=st.define();function Uo(t){return[Ho(),Go.of(Object.assign(Object.assign({},Io),t))]}const No=st.define({combine:t=>t.some((t=>t))});function Ho(t){return[Fo]}const Fo=yn.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Go).map((e=>new ea(t,e)));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(No),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,i=t.view.viewport,n=Math.min(e.to,i.to)-Math.max(e.from,i.from);this.syncGutters(n<.8*(i.to-i.from))}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(No)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let i=Kt.iter(this.view.state.facet(Bo),this.view.viewport.from),n=[],s=this.gutters.map((t=>new ta(t,this.view.viewport,-this.view.documentPadding.top)));for(let r of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(r.type)){let t=!0;for(let e of r.type)if(e.type==Qi.Text&&t){Jo(i,n,e.from);for(let t of s)t.line(this.view,e,n);t=!1}else if(e.widget)for(let t of s)t.widget(this.view,e)}else if(r.type==Qi.Text){Jo(i,n,r.from);for(let t of s)t.line(this.view,r,n)}else if(r.widget)for(let t of s)t.widget(this.view,r);for(let r of s)r.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Go),i=t.state.facet(Go),n=t.docChanged||t.heightChanged||t.viewportChanged||!Kt.eq(t.startState.facet(Bo),t.state.facet(Bo),t.view.viewport.from,t.view.viewport.to);if(e==i)for(let s of this.gutters)s.update(t)&&(n=!0);else{n=!0;let s=[];for(let n of i){let i=e.indexOf(n);i<0?s.push(new ea(this.view,n)):(this.gutters[i].update(t),s.push(this.gutters[i]))}for(let t of this.gutters)t.dom.remove(),s.indexOf(t)<0&&t.destroy();for(let t of s)this.dom.appendChild(t.dom);this.gutters=s}return n}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>Sr.scrollMargins.of((e=>{let i=e.plugin(t);return i&&0!=i.gutters.length&&i.fixed?e.textDirection==Ei.LTR?{left:i.dom.offsetWidth*e.scaleX}:{right:i.dom.offsetWidth*e.scaleX}:null}))});function Ko(t){return Array.isArray(t)?t:[t]}function Jo(t,e,i){for(;t.value&&t.from<=i;)t.from==i&&e.push(t.value),t.next()}class ta{constructor(t,e,i){this.gutter=t,this.height=i,this.i=0,this.cursor=Kt.iter(t.markers,e.from)}addElement(t,e,i){let{gutter:n}=this,s=(e.top-this.height)/t.scaleY,r=e.height/t.scaleY;if(this.i==n.elements.length){let e=new ia(t,r,s,i);n.elements.push(e),n.dom.appendChild(e.dom)}else n.elements[this.i].update(t,r,s,i);this.height=e.bottom,this.i++}line(t,e,i){let n=[];Jo(this.cursor,n,e.from),i.length&&(n=n.concat(i));let s=this.gutter.config.lineMarker(t,e,n);s&&n.unshift(s);let r=this.gutter;(0!=n.length||r.config.renderEmptyElements)&&this.addElement(t,e,n)}widget(t,e){let i=this.gutter.config.widgetMarker(t,e.widget,e),n=i?[i]:null;for(let s of t.state.facet(Wo)){let i=s(t,e.widget,e);i&&(n||(n=[])).push(i)}n&&this.addElement(t,e,n)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class ea{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in e.domEventHandlers)this.dom.addEventListener(i,(n=>{let s,r=n.target;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let t=r.getBoundingClientRect();s=(t.top+t.bottom)/2}else s=n.clientY;let o=t.lineBlockAtHeight(s-t.documentTop);e.domEventHandlers[i](t,o,n)&&n.preventDefault()}));this.markers=Ko(e.markers(t)),e.initialSpacer&&(this.spacer=new ia(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=Ko(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let i=t.view.viewport;return!Kt.eq(this.markers,e,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class ia{constructor(t,e,i,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,e,i,n)}update(t,e,i,n){this.height!=e&&(this.height=e,this.dom.style.height=e+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let i=0;iGt(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let i=Object.assign({},t);for(let n in e){let t=i[n],s=e[n];i[n]=t?(e,i,n)=>t(e,i,n)||s(e,i,n):s}return i}})});class oa extends jo{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function aa(t,e){return t.state.facet(ra).formatNumber(e,t.state)}const la=Go.compute([ra],(t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(na),lineMarker:(t,e,i)=>i.some((t=>t.toDOM))?null:new oa(aa(t,t.state.doc.lineAt(e.from).number)),widgetMarker:(t,e,i)=>{for(let n of t.state.facet(sa)){let s=n(t,e,i);if(s)return s}return null},lineMarkerChange:t=>t.startState.facet(ra)!=t.state.facet(ra),initialSpacer:t=>new oa(aa(t,ha(t.state.doc.lines))),updateSpacer(t,e){let i=aa(e.view,ha(e.view.state.doc.lines));return i==t.number?t:new oa(i)},domEventHandlers:t.facet(ra).domEventHandlers})));function ha(t){let e=9;for(;e{let e=[],i=-1;for(let n of t.selection.ranges){let s=t.doc.lineAt(n.head).from;s>i&&(i=s,e.push(ca.range(s)))}return Kt.of(e)}));const fa=1024;let da=0;class Oa{constructor(t,e){this.from=t,this.to=e}}class pa{constructor(t={}){this.id=da++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=ba.match(t)),e=>{let i=t(e);return void 0===i?null:[this,i]}}}pa.closedBy=new pa({deserialize:t=>t.split(" ")}),pa.openedBy=new pa({deserialize:t=>t.split(" ")}),pa.group=new pa({deserialize:t=>t.split(" ")}),pa.isolate=new pa({deserialize:t=>{if(t&&"rtl"!=t&&"ltr"!=t&&"auto"!=t)throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}}),pa.contextHash=new pa({perNode:!0}),pa.lookAhead=new pa({perNode:!0}),pa.mounted=new pa({perNode:!0});class ma{constructor(t,e,i){this.tree=t,this.overlay=e,this.parser=i}static get(t){return t&&t.props&&t.props[pa.mounted.id]}}const ga=Object.create(null);class ba{constructor(t,e,i,n=0){this.name=t,this.props=e,this.id=i,this.flags=n}static define(t){let e=t.props&&t.props.length?Object.create(null):ga,i=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),n=new ba(t.name||"",e,t.id,i);if(t.props)for(let s of t.props)if(Array.isArray(s)||(s=s(n)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[s[0].id]=s[1]}return n}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(pa.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let i in t)for(let n of i.split(" "))e[n]=t[i];return t=>{for(let i=t.prop(pa.group),n=-1;n<(i?i.length:0);n++){let s=e[n<0?t.name:i[n]];if(s)return s}}}}ba.none=new ba("",Object.create(null),0,8);class va{constructor(t){this.types=t;for(let e=0;e=e){let o=new Ca(t.tree,t.overlay[0].from+r.from,-1,r);(s||(s=[n])).push($a(o,e,i,!1))}}return s?Xa(s):n}(this,t,e)}iterate(t){let{enter:e,leave:i,from:n=0,to:s=this.length}=t,r=t.mode||0,o=(r&ya.IncludeAnonymous)>0;for(let a=this.cursor(r|ya.IncludeAnonymous);;){let t=!1;if(a.from<=s&&a.to>=n&&(!o&&a.type.isAnonymous||!1!==e(a))){if(a.firstChild())continue;t=!0}for(;t&&i&&(o||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;t=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:La(ba.none,this.children,this.positions,0,this.children.length,0,this.length,((t,e,i)=>new xa(this.type,t,e,i,this.propValues)),t.makeTree||((t,e,i)=>new xa(ba.none,t,e,i)))}static build(t){return function(t){var e;let{buffer:i,nodeSet:n,maxBufferLength:s=fa,reused:r=[],minRepeatType:o=n.types.length}=t,a=Array.isArray(i)?new Qa(i,i.length):i,l=n.types,h=0,c=0;function u(t,e,i,b,v,w){let{id:S,start:y,end:x,size:Q}=a,k=c,P=h;for(;Q<0;){if(a.next(),-1==Q){let e=r[S];return i.push(e),void b.push(y-t)}if(-3==Q)return void(h=S);if(-4==Q)return void(c=S);throw new RangeError(`Unrecognized record size: ${Q}`)}let $,Z,C=l[S],T=y-t;if(x-y<=s&&(Z=m(a.pos-e,v))){let e=new Uint16Array(Z.size-Z.skip),i=a.pos-Z.size,s=e.length;for(;a.pos>i;)s=g(Z.start,e,s);$=new ka(e,x-Z.start,n),T=Z.start-t}else{let t=a.pos-Q;a.next();let e=[],i=[],n=S>=o?S:-1,r=0,l=x;for(;a.pos>t;)n>=0&&a.id==n&&a.size>=0?(a.end<=l-s&&(O(e,i,y,r,a.end,l,n,k,P),r=e.length,l=a.end),a.next()):w>2500?f(y,t,e,i):u(y,t,e,i,n,w+1);if(n>=0&&r>0&&r-1&&r>0){let t=d(C,P);$=La(C,e,i,0,e.length,0,x-y,t,t)}else $=p(C,e,i,x-y,k-x,P)}i.push($),b.push(T)}function f(t,e,i,r){let o=[],l=0,h=-1;for(;a.pos>e;){let{id:t,start:e,end:i,size:n}=a;if(n>4)a.next();else{if(h>-1&&e=0;t-=3)e[i++]=o[t],e[i++]=o[t+1]-s,e[i++]=o[t+2]-s,e[i++]=i;i.push(new ka(e,o[2]-s,n)),r.push(s-t)}}function d(t,e){return(i,n,s)=>{let r,o,a=0,l=i.length-1;if(l>=0&&(r=i[l])instanceof xa){if(!l&&r.type==t&&r.length==s)return r;(o=r.prop(pa.lookAhead))&&(a=n[l]+r.length+o)}return p(t,i,n,s,a,e)}}function O(t,e,i,s,r,o,a,l,h){let c=[],u=[];for(;t.length>s;)c.push(t.pop()),u.push(e.pop()+i-r);t.push(p(n.types[a],c,u,o-r,l-o,h)),e.push(r-i)}function p(t,e,i,n,s,r,o){if(r){let t=[pa.contextHash,r];o=o?[t].concat(o):[t]}if(s>25){let t=[pa.lookAhead,s];o=o?[t].concat(o):[t]}return new xa(t,e,i,n,o)}function m(t,e){let i=a.fork(),n=0,r=0,l=0,h=i.end-s,c={size:0,start:0,skip:0};t:for(let s=i.pos-t;i.pos>s;){let t=i.size;if(i.id==e&&t>=0){c.size=n,c.start=r,c.skip=l,l+=4,n+=4,i.next();continue}let a=i.pos-t;if(t<0||a=o?4:0,f=i.start;for(i.next();i.pos>a;){if(i.size<0){if(-3!=i.size)break t;u+=4}else i.id>=o&&(u+=4);i.next()}r=f,n+=t,l+=u}return(e<0||n==t)&&(c.size=n,c.start=r,c.skip=l),c.size>4?c:void 0}function g(t,e,i){let{id:n,start:s,end:r,size:l}=a;if(a.next(),l>=0&&n4){let n=a.pos-(l-4);for(;a.pos>n;)i=g(t,e,i)}e[--i]=o,e[--i]=r-t,e[--i]=s-t,e[--i]=n}else-3==l?h=n:-4==l&&(c=n);return i}let b=[],v=[];for(;a.pos>0;)u(t.start||0,t.bufferStart||0,b,v,-1,0);let w=null!==(e=t.length)&&void 0!==e?e:b.length?v[0]+b[0].length:0;return new xa(l[t.topID],b.reverse(),v.reverse(),w)}(t)}}xa.empty=new xa(ba.none,[],[],0);class Qa{constructor(t,e){this.buffer=t,this.index=e}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Qa(this.buffer,this.index)}}class ka{constructor(t,e,i){this.buffer=t,this.length=e,this.set=i}get type(){return ba.none}toString(){let t=[];for(let e=0;e0));a=r[a+3]);return o}slice(t,e,i){let n=this.buffer,s=new Uint16Array(e-t),r=0;for(let o=t,a=0;o=e&&ie;case 1:return i<=e&&n>e;case 2:return n>e;case 4:return!0}}function $a(t,e,i,n){for(var s;t.from==t.to||(i<1?t.from>=e:t.from>e)||(i>-1?t.to<=e:t.to0?o.length:-1;t!=l;t+=e){let l=o[t],h=a[t]+r.from;if(Pa(n,i,h,h+l.length))if(l instanceof ka){if(s&ya.ExcludeBuffers)continue;let o=l.findChild(0,l.buffer.length,e,i-h,n);if(o>-1)return new Ma(new Ra(r,l,t,h),null,o)}else if(s&ya.IncludeAnonymous||!l.type.isAnonymous||Ea(l)){let o;if(!(s&ya.IgnoreMounts)&&(o=ma.get(l))&&!o.overlay)return new Ca(o.tree,h,t,r);let a=new Ca(l,h,t,r);return s&ya.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(e<0?l.children.length-1:0,e,i,n)}}if(s&ya.IncludeAnonymous||!r.type.isAnonymous)return null;if(t=r.index>=0?r.index+e:e<0?-1:r._parent._tree.children.length,r=r._parent,!r)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,e,i=0){let n;if(!(i&ya.IgnoreOverlays)&&(n=ma.get(this._tree))&&n.overlay){let i=t-this.from;for(let{from:t,to:s}of n.overlay)if((e>0?t<=i:t=i:s>i))return new Ca(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,i)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Ta(t,e,i,n){let s=t.cursor(),r=[];if(!s.firstChild())return r;if(null!=i)for(let o=!1;!o;)if(o=s.type.is(i),!s.nextSibling())return r;for(;;){if(null!=n&&s.type.is(n))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return null==n?r:[]}}function Aa(t,e,i=e.length-1){for(let n=t;i>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[i]&&e[i]!=n.name)return!1;i--}}return!0}class Ra{constructor(t,e,i,n){this.parent=t,this.buffer=e,this.index=i,this.start=n}}class Ma extends Za{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,e,i){super(),this.context=t,this._parent=e,this.index=i,this.type=t.buffer.set.types[t.buffer.buffer[i]]}child(t,e,i){let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],t,e-this.context.start,i);return s<0?null:new Ma(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,i=0){if(i&ya.ExcludeBuffers)return null;let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return s<0?null:new Ma(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Ma(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new Ma(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],e=[],{buffer:i}=this.context,n=this.index+4,s=i.buffer[this.index+3];if(s>n){let r=i.buffer[this.index+1];t.push(i.slice(n,s,r)),e.push(0)}return new xa(this.type,t,e,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Xa(t){if(!t.length)return null;let e=0,i=t[0];for(let r=1;ri.from||n.to0){if(this.index-1)for(let n=e+t,s=t<0?-1:i._tree.children.length;n!=s;n+=t){let t=i._tree.children[n];if(this.mode&ya.IncludeAnonymous||t instanceof ka||!t.type.isAnonymous||Ea(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to=0;){for(let r=t;r;r=r._parent)if(r.index==n){if(n==this.index)return r;e=r,i=s+1;break t}n=this.stack[--s]}for(let n=i;n=0;s--){if(s<0)return Aa(this._tree,t,n);let r=i[e.buffer[this.stack[s]]];if(!r.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}}function Ea(t){return t.children.some((t=>t instanceof ka||!t.type.isAnonymous||Ea(t)))}const za=new WeakMap;function Ya(t,e){if(!t.isAnonymous||e instanceof ka||e.type!=t)return 1;let i=za.get(e);if(null==i){i=1;for(let n of e.children){if(n.type!=t||!(n instanceof xa)){i=1;break}i+=Ya(t,n)}za.set(e,i)}return i}function La(t,e,i,n,s,r,o,a,l){let h=0;for(let d=n;d=c)break;O+=e}if(h==s+1){if(O>c){let t=i[s];e(t.children,t.positions,0,t.children.length,n[s]+a);continue}u.push(i[s])}else{let e=n[h-1]+i[h-1].length-d;u.push(La(t,i,n,s,h,d,e,null,l))}f.push(d+a-r)}}(e,i,n,s,0),(a||l)(u,f,o)}class _a{constructor(){this.map=new WeakMap}setBuffer(t,e,i){let n=this.map.get(t);n||this.map.set(t,n=new Map),n.set(e,i)}getBuffer(t,e){let i=this.map.get(t);return i&&i.get(e)}set(t,e){t instanceof Ma?this.setBuffer(t.context.buffer,t.index,e):t instanceof Ca&&this.map.set(t.tree,e)}get(t){return t instanceof Ma?this.getBuffer(t.context.buffer,t.index):t instanceof Ca?this.map.get(t.tree):void 0}cursorSet(t,e){t.buffer?this.setBuffer(t.buffer.buffer,t.index,e):this.map.set(t.tree,e)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class Da{constructor(t,e,i,n,s=!1,r=!1){this.from=t,this.to=e,this.tree=i,this.offset=n,this.open=(s?1:0)|(r?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],i=!1){let n=[new Da(0,t.length,t,0,!1,i)];for(let s of e)s.to>t.length&&n.push(s);return n}static applyChanges(t,e,i=128){if(!e.length)return t;let n=[],s=1,r=t.length?t[0]:null;for(let o=0,a=0,l=0;;o++){let h=o=i)for(;r&&r.from=e.from||c<=e.to||l){let t=Math.max(e.from,a)-l,i=Math.min(e.to,c)-l;e=t>=i?null:new Da(t,i,e.tree,e.offset+l,o>0,!!h)}if(e&&n.push(e),r.to>c)break;r=snew Oa(t.from,t.to))):[new Oa(0,0)]:[new Oa(0,t.length)],this.createParse(t,e||[],i)}parse(t,e,i){let n=this.startParse(t,e,i);for(;;){let t=n.advance();if(t)return t}}}class Ba{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}function Wa(t){return(e,i,n,s)=>new Ha(e,t,i,n,s)}class Ia{constructor(t,e,i,n,s){this.parser=t,this.parse=e,this.overlay=i,this.target=n,this.from=s}}function Ga(t){if(!t.length||t.some((t=>t.from>=t.to)))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class Ua{constructor(t,e,i,n,s,r,o){this.parser=t,this.predicate=e,this.mounts=i,this.index=n,this.start=s,this.target=r,this.prev=o,this.depth=0,this.ranges=[]}}const Na=new pa({perNode:!0});class Ha{constructor(t,e,i,n,s){this.nest=e,this.input=i,this.fragments=n,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let t=this.baseParse.advance();if(!t)return null;if(this.baseParse=null,this.baseTree=t,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let t=this.baseTree;return null!=this.stoppedAt&&(t=new xa(t.type,t.children,t.positions,t.length,t.propValues.concat([[Na,this.stoppedAt]]))),t}let t=this.inner[this.innerDone],e=t.parse.advance();if(e){this.innerDone++;let i=Object.assign(Object.create(null),t.target.props);i[pa.mounted.id]=new ma(e,t.overlay,t.parser),t.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let e=this.innerDone;e=this.stoppedAt)a=!1;else if(t.hasNode(n)){if(e){let t=e.mounts.find((t=>t.frag.from<=n.from&&t.frag.to>=n.to&&t.mount.overlay));if(t)for(let i of t.mount.overlay){let s=i.from+t.pos,r=i.to+t.pos;s>=n.from&&r<=n.to&&!e.ranges.some((t=>t.froms))&&e.ranges.push({from:s,to:r})}}a=!1}else if(i&&(r=Fa(i.ranges,n.from,n.to)))a=2!=r;else if(!n.type.isAnonymous&&(s=this.nest(n,this.input))&&(n.fromnew Oa(t.from-n.from,t.to-n.from))):null,n.tree,t.length?t[0].from:n.from)),s.overlay?t.length&&(i={ranges:t,depth:0,prev:i}):a=!1}}else if(e&&(o=e.predicate(n))&&(!0===o&&(o=new Oa(n.from,n.to)),o.from=0&&e.ranges[t].to==o.from?e.ranges[t]={from:e.ranges[t].from,to:o.to}:e.ranges.push(o)}if(a&&n.firstChild())e&&e.depth++,i&&i.depth++;else for(;!n.nextSibling();){if(!n.parent())break t;if(e&&! --e.depth){let t=il(this.ranges,e.ranges);t.length&&(Ga(t),this.inner.splice(e.index,0,new Ia(e.parser,e.parser.startParse(this.input,sl(e.mounts,t),t),e.ranges.map((t=>new Oa(t.from-e.start,t.to-e.start))),e.target,t[0].from))),e=e.prev}i&&! --i.depth&&(i=i.prev)}}}}function Fa(t,e,i){for(let n of t){if(n.from>=i)break;if(n.to>e)return n.from<=e&&n.to>=i?2:1}return 0}function Ka(t,e,i,n,s,r){if(e=t&&e.enter(i,1,ya.IgnoreOverlays|ya.ExcludeBuffers)||e.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let e=this.cursor.tree;;){if(e==t.tree)return!0;if(!(e.children.length&&0==e.positions[0]&&e.children[0]instanceof xa))break;e=e.children[0]}return!1}}let el=class{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let i=this.curFrag=t[0];this.curTo=null!==(e=i.tree.prop(Na))&&void 0!==e?e:i.to,this.inner=new tl(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=e.tree.prop(Na))&&void 0!==t?t:e.to,this.inner=new tl(e.tree,-e.offset)}}findMounts(t,e){var i;let n=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let t=this.inner.cursor.node;t;t=t.parent){let s=null===(i=t.tree)||void 0===i?void 0:i.prop(pa.mounted);if(s&&s.parser==e)for(let e=this.fragI;e=t.to)break;i.tree==this.curFrag.tree&&n.push({frag:i,pos:t.from-i.offset,mount:s})}}}return n}};function il(t,e){let i=null,n=e;for(let s=1,r=0;s=a)break;t.to<=o||(i||(n=i=e.slice()),t.froma&&i.splice(r+1,0,new Oa(a,t.to))):t.to>a?i[r--]=new Oa(a,t.to):i.splice(r--,1))}}return n}function nl(t,e,i,n){let s=0,r=0,o=!1,a=!1,l=-1e9,h=[];for(;;){let c=s==t.length?1e9:o?t[s].to:t[s].from,u=r==e.length?1e9:a?e[r].to:e[r].from;if(o!=a){let t=Math.max(l,i),e=Math.min(c,u,n);tnew Oa(t.from+n,t.to+n))),a,l);for(let e=0,n=a;;e++){let a=e==o.length,h=a?l:o[e].from;if(h>n&&i.push(new Da(n,h,s.tree,-t,r.from>=n||r.openStart,r.to<=h||r.openEnd)),a)break;n=o[e].to}}else i.push(new Da(a,l,s.tree,-t,r.from>=t||r.openStart,r.to<=o||r.openEnd))}return i}let rl=0;class ol{constructor(t,e,i,n){this.name=t,this.set=e,this.base=i,this.modified=n,this.id=rl++}toString(){let{name:t}=this;for(let e of this.modified)e.name&&(t=`${e.name}(${t})`);return t}static define(t,e){let i="string"==typeof t?t:"?";if(t instanceof ol&&(e=t),null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let n=new ol(i,[],null,[]);if(n.set.push(n),e)for(let s of e.set)n.set.push(s);return n}static defineModifier(t){let e=new ll(t);return t=>t.modified.indexOf(e)>-1?t:ll.get(t.base||t,t.modified.concat(e).sort(((t,e)=>t.id-e.id)))}}let al=0;class ll{constructor(t){this.name=t,this.instances=[],this.id=al++}static get(t,e){if(!e.length)return t;let i=e[0].instances.find((i=>{return i.base==t&&(n=e,s=i.modified,n.length==s.length&&n.every(((t,e)=>t==s[e])));var n,s}));if(i)return i;let n=[],s=new ol(t.name,n,t,e);for(let o of e)o.instances.push(s);let r=function(t){let e=[[]];for(let i=0;ie.length-t.length))}(e);for(let o of t.set)if(!o.modified.length)for(let t of r)n.push(ll.get(o,t));return s}}function hl(t){let e=Object.create(null);for(let i in t){let n=t[i];Array.isArray(n)||(n=[n]);for(let t of i.split(" "))if(t){let i=[],s=2,r=t;for(let e=0;;){if("..."==r&&e>0&&e+3==t.length){s=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(r);if(!n)throw new RangeError("Invalid path: "+t);if(i.push("*"==n[0]?"":'"'==n[0][0]?JSON.parse(n[0]):n[0]),e+=n[0].length,e==t.length)break;let o=t[e++];if(e==t.length&&"!"==o){s=0;break}if("/"!=o)throw new RangeError("Invalid path: "+t);r=t.slice(e)}let o=i.length-1,a=i[o];if(!a)throw new RangeError("Invalid path: "+t);let l=new ul(n,s,o>0?i.slice(0,o):null);e[a]=l.sort(e[a])}}return cl.add(e)}const cl=new pa;class ul{constructor(t,e,i,n){this.tags=t,this.mode=e,this.context=i,this.next=n}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(t){return!t||t.depth{let e=s;for(let n of t)for(let t of n.set){let n=i[t.id];if(n){e=e?e+" "+n:n;break}}return e},scope:n}}function dl(t,e,i,n=0,s=t.length){let r=new Ol(n,Array.isArray(e)?e:[e],i);r.highlightRange(t.cursor(),n,s,"",r.highlighters),r.flush(s)}ul.empty=new ul([],2,null);class Ol{constructor(t,e,i){this.at=t,this.highlighters=e,this.span=i,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,i,n,s){let{type:r,from:o,to:a}=t;if(o>=i||a<=e)return;r.isTop&&(s=this.highlighters.filter((t=>!t.scope||t.scope(r))));let l=n,h=function(t){let e=t.type.prop(cl);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}(t)||ul.empty,c=function(t,e){let i=null;for(let n of t){let t=n.style(e);t&&(i=i?i+" "+t:t)}return i}(s,h.tags);if(c&&(l&&(l+=" "),l+=c,1==h.mode&&(n+=(n?" ":"")+c)),this.startSpan(Math.max(e,o),l),h.opaque)return;let u=t.tree&&t.tree.prop(pa.mounted);if(u&&u.overlay){let r=t.node.enter(u.overlay[0].from+o,1),h=this.highlighters.filter((t=>!t.scope||t.scope(u.tree.type))),c=t.firstChild();for(let f=0,d=o;;f++){let O=f=p)&&t.nextSibling()););if(!O||p>i)break;d=O.to+o,d>e&&(this.highlightRange(r.cursor(),Math.max(e,O.from+o),Math.min(i,d),"",h),this.startSpan(Math.min(i,d),l))}c&&t.parent()}else if(t.firstChild()){u&&(n="");do{if(!(t.to<=e)){if(t.from>=i)break;this.highlightRange(t,e,i,n,s),this.startSpan(Math.min(i,t.to),l)}}while(t.nextSibling());t.parent()}}}const pl=ol.define,ml=pl(),gl=pl(),bl=pl(gl),vl=pl(gl),wl=pl(),Sl=pl(wl),yl=pl(wl),xl=pl(),Ql=pl(xl),kl=pl(),Pl=pl(),$l=pl(),Zl=pl($l),Cl=pl(),Tl={comment:ml,lineComment:pl(ml),blockComment:pl(ml),docComment:pl(ml),name:gl,variableName:pl(gl),typeName:bl,tagName:pl(bl),propertyName:vl,attributeName:pl(vl),className:pl(gl),labelName:pl(gl),namespace:pl(gl),macroName:pl(gl),literal:wl,string:Sl,docString:pl(Sl),character:pl(Sl),attributeValue:pl(Sl),number:yl,integer:pl(yl),float:pl(yl),bool:pl(wl),regexp:pl(wl),escape:pl(wl),color:pl(wl),url:pl(wl),keyword:kl,self:pl(kl),null:pl(kl),atom:pl(kl),unit:pl(kl),modifier:pl(kl),operatorKeyword:pl(kl),controlKeyword:pl(kl),definitionKeyword:pl(kl),moduleKeyword:pl(kl),operator:Pl,derefOperator:pl(Pl),arithmeticOperator:pl(Pl),logicOperator:pl(Pl),bitwiseOperator:pl(Pl),compareOperator:pl(Pl),updateOperator:pl(Pl),definitionOperator:pl(Pl),typeOperator:pl(Pl),controlOperator:pl(Pl),punctuation:$l,separator:pl($l),bracket:Zl,angleBracket:pl(Zl),squareBracket:pl(Zl),paren:pl(Zl),brace:pl(Zl),content:xl,heading:Ql,heading1:pl(Ql),heading2:pl(Ql),heading3:pl(Ql),heading4:pl(Ql),heading5:pl(Ql),heading6:pl(Ql),contentSeparator:pl(xl),list:pl(xl),quote:pl(xl),emphasis:pl(xl),strong:pl(xl),link:pl(xl),monospace:pl(xl),strikethrough:pl(xl),inserted:pl(),deleted:pl(),changed:pl(),invalid:pl(),meta:Cl,documentMeta:pl(Cl),annotation:pl(Cl),processingInstruction:pl(Cl),definition:ol.defineModifier("definition"),constant:ol.defineModifier("constant"),function:ol.defineModifier("function"),standard:ol.defineModifier("standard"),local:ol.defineModifier("local"),special:ol.defineModifier("special")};for(let yw in Tl){let t=Tl[yw];t instanceof ol&&(t.name=yw)}var Al;fl([{tag:Tl.link,class:"tok-link"},{tag:Tl.heading,class:"tok-heading"},{tag:Tl.emphasis,class:"tok-emphasis"},{tag:Tl.strong,class:"tok-strong"},{tag:Tl.keyword,class:"tok-keyword"},{tag:Tl.atom,class:"tok-atom"},{tag:Tl.bool,class:"tok-bool"},{tag:Tl.url,class:"tok-url"},{tag:Tl.labelName,class:"tok-labelName"},{tag:Tl.inserted,class:"tok-inserted"},{tag:Tl.deleted,class:"tok-deleted"},{tag:Tl.literal,class:"tok-literal"},{tag:Tl.string,class:"tok-string"},{tag:Tl.number,class:"tok-number"},{tag:[Tl.regexp,Tl.escape,Tl.special(Tl.string)],class:"tok-string2"},{tag:Tl.variableName,class:"tok-variableName"},{tag:Tl.local(Tl.variableName),class:"tok-variableName tok-local"},{tag:Tl.definition(Tl.variableName),class:"tok-variableName tok-definition"},{tag:Tl.special(Tl.variableName),class:"tok-variableName2"},{tag:Tl.definition(Tl.propertyName),class:"tok-propertyName tok-definition"},{tag:Tl.typeName,class:"tok-typeName"},{tag:Tl.namespace,class:"tok-namespace"},{tag:Tl.className,class:"tok-className"},{tag:Tl.macroName,class:"tok-macroName"},{tag:Tl.propertyName,class:"tok-propertyName"},{tag:Tl.operator,class:"tok-operator"},{tag:Tl.comment,class:"tok-comment"},{tag:Tl.meta,class:"tok-meta"},{tag:Tl.invalid,class:"tok-invalid"},{tag:Tl.punctuation,class:"tok-punctuation"}]);const Rl=new pa;function Ml(t){return st.define({combine:t?e=>e.concat(t):void 0})}const Xl=new pa;class ql{constructor(t,e,i=[],n=""){this.data=t,this.name=n,It.prototype.hasOwnProperty("tree")||Object.defineProperty(It.prototype,"tree",{get(){return zl(this)}}),this.parser=e,this.extension=[Gl.of(this),It.languageData.of(((t,e,i)=>{let n=Vl(t,e,i),s=n.type.prop(Rl);if(!s)return[];let r=t.facet(s),o=n.type.prop(Xl);if(o){let s=n.resolve(e-n.from,i);for(let e of o)if(e.test(s,t)){let i=t.facet(e.facet);return"replace"==e.type?i:i.concat(r)}}return r}))].concat(i)}isActiveAt(t,e,i=-1){return Vl(t,e,i).type.prop(Rl)==this.data}findRegions(t){let e=t.facet(Gl);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let i=[],n=(t,e)=>{if(t.prop(Rl)==this.data)return void i.push({from:e,to:e+t.length});let s=t.prop(pa.mounted);if(s){if(s.tree.prop(Rl)==this.data){if(s.overlay)for(let t of s.overlay)i.push({from:t.from+e,to:t.to+e});else i.push({from:e,to:e+t.length});return}if(s.overlay){let t=i.length;if(n(s.tree,s.overlay[0].from+e),i.length>t)return}}for(let i=0;it.isTop?e:void 0))]}),t.name)}configure(t,e){return new El(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function zl(t){let e=t.field(ql.state,!1);return e?e.tree:xa.empty}class Yl{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let i=this.cursorPos-this.string.length;return t=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-i,e-i)}}let Ll=null;class _l{constructor(t,e,i=[],n,s,r,o,a){this.parser=t,this.state=e,this.fragments=i,this.tree=n,this.treeLen=s,this.viewport=r,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(t,e,i){return new _l(t,e,[],xa.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Yl(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=xa.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var i;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(Da.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=Ll;Ll=this;try{return t()}finally{Ll=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=Dl(t,e.from,e.to);return t}changes(t,e){let{fragments:i,tree:n,treeLen:s,viewport:r,skipped:o}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,i,n,s)=>e.push({fromA:t,toA:i,fromB:n,toB:s}))),i=Da.applyChanges(i,e),n=xa.empty,s=0,r={from:t.mapPos(r.from,-1),to:t.mapPos(r.to,1)},this.skipped.length){o=[];for(let e of this.skipped){let i=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);it.from&&(this.fragments=Dl(this.fragments,e,n),this.skipped.splice(i--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends ja{createParse(e,i,n){let s=n[0].from,r=n[n.length-1].to;return{parsedPos:s,advance(){let e=Ll;if(e){for(let t of n)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=r,new xa(ba.none,[],[],r-s)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return Ll}}function Dl(t,e,i){return Da.applyChanges(t,[{fromA:e,toA:i,fromB:e,toB:i}])}class jl{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),i=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new jl(e)}static init(t){let e=Math.min(3e3,t.doc.length),i=_l.create(t.facet(Gl).parser,t,{from:0,to:e});return i.work(20,e)||i.takeTree(),new jl(i)}}ql.state=ut.define({create:jl.init,update(t,e){for(let i of e.effects)if(i.is(ql.setState))return i.value;return e.startState.facet(Gl)!=e.state.facet(Gl)?jl.init(e.state):t.apply(e)}});let Bl=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(Bl=t=>{let e=-1,i=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(i):cancelIdleCallback(e)});const Wl="undefined"!=typeof navigator&&(null===(Al=navigator.scheduling)||void 0===Al?void 0:Al.isInputPending)?()=>navigator.scheduling.isInputPending():null,Il=yn.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(ql.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(ql.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=Bl(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEndn+1e3,a=s.context.work((()=>Wl&&Wl()||Date.now()>r),n+(o?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:ql.setState.of(new jl(s.context))})),this.chunkBudget>0&&(!a||o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>bn(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Gl=st.define({combine:t=>t.length?t[0]:null,enables:t=>[ql.state,Il,Sr.contentAttributes.compute([t],(e=>{let i=e.facet(t);return i&&i.name?{"data-language":i.name}:{}}))]});class Ul{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}class Nl{constructor(t,e,i,n,s,r=void 0){this.name=t,this.alias=e,this.extensions=i,this.filename=n,this.loadFunc=s,this.support=r,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then((t=>this.support=t),(t=>{throw this.loading=null,t})))}static of(t){let{load:e,support:i}=t;if(!e){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");e=()=>Promise.resolve(i)}return new Nl(t.name,(t.alias||[]).concat(t.name).map((t=>t.toLowerCase())),t.extensions||[],t.filename,e,i)}static matchFilename(t,e){for(let n of t)if(n.filename&&n.filename.test(e))return n;let i=/\.([^.]+)$/.exec(e);if(i)for(let n of t)if(n.extensions.indexOf(i[1])>-1)return n;return null}static matchLanguageName(t,e,i=!0){e=e.toLowerCase();for(let n of t)if(n.alias.some((t=>t==e)))return n;if(i)for(let n of t)for(let t of n.alias){let i=e.indexOf(t);if(i>-1&&(t.length>2||!/\w/.test(e[i-1])&&!/\w/.test(e[i+t.length])))return n}return null}}const Hl=st.define(),Fl=st.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some((t=>t!=e[0])))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Kl(t){let e=t.facet(Fl);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function Jl(t,e){let i="",n=t.tabSize,s=t.facet(Fl)[0];if("\t"==s){for(;e>=n;)i+="\t",e-=n;s=" "}for(let r=0;r=e?function(t,e,i){let n=e.resolveStack(i),s=n.node.enterUnfinishedNodesBefore(i);if(s!=n.node){let t=[];for(let e=s;e!=n.node;e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)n={node:t[e],next:n}}return sh(n,t,i)}(t,i,e):null}function eh(t,e,i){let n=Object.create(null),s=new ih(t,{overrideIndentation:t=>{var e;return null!==(e=n[t])&&void 0!==e?e:-1}}),r=[];for(let o=e;o<=i;){let e=t.doc.lineAt(o);o=e.to+1;let i=th(s,e.from);if(null==i)continue;/\S/.test(e.text)||(i=0);let a=/^\s*/.exec(e.text)[0],l=Jl(t,i);a!=l&&(n[e.from]=i,r.push({from:e.from,to:e.from+a.length,insert:l}))}return t.changes(r)}class ih{constructor(t,e={}){this.state=t,this.options=e,this.unit=Kl(t)}lineAt(t,e=1){let i=this.state.doc.lineAt(t),{simulateBreak:n,simulateDoubleBreak:s}=this.options;return null!=n&&n>=i.from&&n<=i.to?s&&n==t?{text:"",from:t}:(e<0?n-1&&(s+=r-this.countColumn(i,i.search(/\S|$/))),s}countColumn(t,e=t.length){return ce(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:i,from:n}=this.lineAt(t,e),s=this.options.overrideIndentation;if(s){let t=s(n);if(t>-1)return t}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const nh=new pa;function sh(t,e,i){for(let n=t;n;n=n.next){let t=rh(n.node);if(t)return t(ah.create(e,i,n))}return 0}function rh(t){let e=t.type.prop(nh);if(e)return e;let i,n=t.firstChild;if(n&&(i=n.type.prop(pa.closedBy))){let e=t.lastChild,n=e&&i.indexOf(e.name)>-1;return t=>ch(t,!0,1,void 0,n&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?oh:null}function oh(){return 0}class ah extends ih{constructor(t,e,i){super(t.state,t.options),this.base=t,this.pos=e,this.context=i}get node(){return this.context.node}static create(t,e,i){return new ah(t,e,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let i=t.resolve(e.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(lh(i,t))break;e=this.state.doc.lineAt(i.from)}return this.lineIndent(e.from)}continue(){return sh(this.context.next,this.base,this.pos)}}function lh(t,e){for(let i=e;i;i=i.parent)if(t==i)return!0;return!1}function hh({closing:t,align:e=!0,units:i=1}){return n=>ch(n,e,i,t)}function ch(t,e,i,n,s){let r=t.textAfter,o=r.match(/^\s*/)[0].length,a=n&&r.slice(o,o+n.length)==n||s==t.pos+o,l=e?function(t){let e=t.node,i=e.childAfter(e.from),n=e.lastChild;if(!i)return null;let s=t.options.simulateBreak,r=t.state.doc.lineAt(i.from),o=null==s||s<=r.from?r.to:Math.min(r.to,s);for(let a=i.to;;){let t=e.childAfter(a);if(!t||t==n)return null;if(!t.type.isSkipped){if(t.from>=o)return null;let e=/^ */.exec(r.text.slice(i.to-r.from))[0].length;return{from:i.from,to:i.to+e}}a=t.to}}(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*i)}function uh({except:t,units:e=1}={}){return i=>{let n=t&&t.test(i.textAfter);return i.baseIndent+(n?0:e*i.unit)}}const fh=st.define(),dh=new pa;function Oh(t){let e=t.firstChild,i=t.lastChild;return e&&e.toi)continue;if(s&&o.from=e&&n.to>i&&(s=n)}}return s}(t,e,i)}function gh(t,e){let i=e.mapPos(t.from,1),n=e.mapPos(t.to,-1);return i>=n?void 0:{from:i,to:n}}const bh=Xt.define({map:gh}),vh=Xt.define({map:gh});function wh(t){let e=[];for(let{head:i}of t.state.selection.ranges)e.some((t=>t.from<=i&&t.to>=i))||e.push(t.lineBlockAt(i));return e}const Sh=ut.define({create:()=>ki.none,update(t,e){t=t.map(e.changes);for(let i of e.effects)if(i.is(bh)&&!xh(t,i.value.from,i.value.to)){let{preparePlaceholder:n}=e.state.facet(Zh),s=n?ki.replace({widget:new Rh(n(e.state,i.value))}):Ah;t=t.update({add:[s.range(i.value.from,i.value.to)]})}else i.is(vh)&&(t=t.update({filter:(t,e)=>i.value.from!=t||i.value.to!=e,filterFrom:i.value.from,filterTo:i.value.to}));if(e.selection){let i=!1,{head:n}=e.selection.main;t.between(n,n,((t,e)=>{tn&&(i=!0)})),i&&(t=t.update({filterFrom:n,filterTo:n,filter:(t,e)=>e<=n||t>=n}))}return t},provide:t=>Sr.decorations.from(t),toJSON(t,e){let i=[];return t.between(0,e.doc.length,((t,e)=>{i.push(t,e)})),i},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let i=0;i{(!s||s.from>t)&&(s={from:t,to:e})})),s}function xh(t,e,i){let n=!1;return t.between(e,e,((t,s)=>{t==e&&s==i&&(n=!0)})),n}function Qh(t,e){return t.field(Sh,!1)?e:e.concat(Xt.appendConfig.of(Ch()))}function kh(t,e,i=!0){let n=t.state.doc.lineAt(e.from).number,s=t.state.doc.lineAt(e.to).number;return Sr.announce.of(`${t.state.phrase(i?"Folded lines":"Unfolded lines")} ${n} ${t.state.phrase("to")} ${s}.`)}const Ph=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:t=>{for(let e of wh(t)){let i=mh(t.state,e.from,e.to);if(i)return t.dispatch({effects:Qh(t.state,[bh.of(i),kh(t,i)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:t=>{if(!t.state.field(Sh,!1))return!1;let e=[];for(let i of wh(t)){let n=yh(t.state,i.from,i.to);n&&e.push(vh.of(n),kh(t,n,!1))}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,i=[];for(let n=0;n{let e=t.state.field(Sh,!1);if(!e||!e.size)return!1;let i=[];return e.between(0,t.state.doc.length,((t,e)=>{i.push(vh.of({from:t,to:e}))})),t.dispatch({effects:i}),!0}}],$h={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Zh=st.define({combine:t=>Gt(t,$h)});function Ch(t){return[Sh,qh]}function Th(t,e){let{state:i}=t,n=i.facet(Zh),s=e=>{let i=t.lineBlockAt(t.posAtDOM(e.target)),n=yh(t.state,i.from,i.to);n&&t.dispatch({effects:vh.of(n)}),e.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(t,s,e);let r=document.createElement("span");return r.textContent=n.placeholderText,r.setAttribute("aria-label",i.phrase("folded code")),r.title=i.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}const Ah=ki.replace({widget:new class extends xi{toDOM(t){return Th(t,null)}}});class Rh extends xi{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return Th(t,this.value)}}const Mh={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Xh extends jo{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}const qh=Sr.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Vh{constructor(t,e){let i;function n(t){let e=pe.newName();return(i||(i=Object.create(null)))["."+e]=t,e}this.specs=t;const s="string"==typeof e.all?e.all:e.all?n(e.all):void 0,r=e.scope;this.scope=r instanceof ql?t=>t.prop(Rl)==r.data:r?t=>t==r:void 0,this.style=fl(t.map((t=>({tag:t.tag,class:t.class||n(Object.assign({},t,{tag:null}))}))),{all:s}).style,this.module=i?new pe(i):null,this.themeType=e.themeType}static define(t,e){return new Vh(t,e||{})}}const Eh=st.define(),zh=st.define({combine:t=>t.length?[t[0]]:null});function Yh(t){let e=t.facet(Eh);return e.length?e:t.facet(zh)}function Lh(t,e){let i,n=[Dh];return t instanceof Vh&&(t.module&&n.push(Sr.styleModule.of(t.module)),i=t.themeType),(null==e?void 0:e.fallback)?n.push(zh.of(t)):i?n.push(Eh.computeN([Sr.darkTheme],(e=>e.facet(Sr.darkTheme)==("dark"==i)?[t]:[]))):n.push(Eh.of(t)),n}class _h{constructor(t){this.markCache=Object.create(null),this.tree=zl(t.state),this.decorations=this.buildDeco(t,Yh(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=zl(t.state),i=Yh(t.state),n=i!=Yh(t.startState),{viewport:s}=t.view,r=t.changes.mapPos(this.decoratedTo,1);e.length=s.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=r):(e!=this.tree||t.viewportChanged||n)&&(this.tree=e,this.decorations=this.buildDeco(t.view,i),this.decoratedTo=s.to)}buildDeco(t,e){if(!e||!this.tree.length)return ki.none;let i=new Jt;for(let{from:n,to:s}of t.visibleRanges)dl(this.tree,e,((t,e,n)=>{i.add(t,e,this.markCache[n]||(this.markCache[n]=ki.mark({class:n})))}),n,s);return i.finish()}}const Dh=gt.high(yn.fromClass(_h,{decorations:t=>t.decorations})),jh=Vh.define([{tag:Tl.meta,color:"#404740"},{tag:Tl.link,textDecoration:"underline"},{tag:Tl.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Tl.emphasis,fontStyle:"italic"},{tag:Tl.strong,fontWeight:"bold"},{tag:Tl.strikethrough,textDecoration:"line-through"},{tag:Tl.keyword,color:"#708"},{tag:[Tl.atom,Tl.bool,Tl.url,Tl.contentSeparator,Tl.labelName],color:"#219"},{tag:[Tl.literal,Tl.inserted],color:"#164"},{tag:[Tl.string,Tl.deleted],color:"#a11"},{tag:[Tl.regexp,Tl.escape,Tl.special(Tl.string)],color:"#e40"},{tag:Tl.definition(Tl.variableName),color:"#00f"},{tag:Tl.local(Tl.variableName),color:"#30a"},{tag:[Tl.typeName,Tl.namespace],color:"#085"},{tag:Tl.className,color:"#167"},{tag:[Tl.special(Tl.variableName),Tl.macroName],color:"#256"},{tag:Tl.definition(Tl.propertyName),color:"#00c"},{tag:Tl.comment,color:"#940"},{tag:Tl.invalid,color:"#f00"}]),Bh=Sr.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Wh="()[]{}",Ih=st.define({combine:t=>Gt(t,{afterCursor:!0,brackets:Wh,maxScanDistance:1e4,renderMatch:Nh})}),Gh=ki.mark({class:"cm-matchingBracket"}),Uh=ki.mark({class:"cm-nonmatchingBracket"});function Nh(t){let e=[],i=t.matched?Gh:Uh;return e.push(i.range(t.start.from,t.start.to)),t.end&&e.push(i.range(t.end.from,t.end.to)),e}const Hh=ut.define({create:()=>ki.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let i=[],n=e.state.facet(Ih);for(let s of e.state.selection.ranges){if(!s.empty)continue;let t=ic(e.state,s.head,-1,n)||s.head>0&&ic(e.state,s.head-1,1,n)||n.afterCursor&&(ic(e.state,s.head,1,n)||s.headSr.decorations.from(t)}),Fh=[Hh,Bh];function Kh(t={}){return[Ih.of(t),Fh]}const Jh=new pa;function tc(t,e,i){let n=t.prop(e<0?pa.openedBy:pa.closedBy);if(n)return n;if(1==t.name.length){let n=i.indexOf(t.name);if(n>-1&&n%2==(e<0?1:0))return[i[n+e]]}return null}function ec(t){let e=t.type.prop(Jh);return e?e(t.node):t}function ic(t,e,i,n={}){let s=n.maxScanDistance||1e4,r=n.brackets||Wh,o=zl(t),a=o.resolveInner(e,i);for(let l=a;l;l=l.parent){let n=tc(l.type,i,r);if(n&&l.from0?e>=s.from&&es.from&&e<=s.to))return nc(t,e,i,l,s,n,r)}}return function(t,e,i,n,s,r,o){let a=i<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=o.indexOf(a);if(l<0||l%2==0!=i>0)return null;let h={from:i<0?e-1:e,to:i>0?e+1:e},c=t.doc.iterRange(e,i>0?t.doc.length:0),u=0;for(let f=0;!c.next().done&&f<=r;){let t=c.value;i<0&&(f+=t.length);let r=e+f*i;for(let e=i>0?0:t.length-1,a=i>0?t.length:-1;e!=a;e+=i){let a=o.indexOf(t[e]);if(!(a<0||n.resolveInner(r+e,1).type!=s))if(a%2==0==i>0)u++;else{if(1==u)return{start:h,end:{from:r+e,to:r+e+1},matched:a>>1==l>>1};u--}}i>0&&(f+=t.length)}return c.done?{start:h,matched:!1}:null}(t,e,i,o,a.type,s,r)}function nc(t,e,i,n,s,r,o){let a=n.parent,l={from:s.from,to:s.to},h=0,c=null==a?void 0:a.cursor();if(c&&(i<0?c.childBefore(n.from):c.childAfter(n.to)))do{if(i<0?c.to<=n.from:c.from>=n.to){if(0==h&&r.indexOf(c.type.name)>-1&&c.from=this.string.length}sol(){return 0==this.pos}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pose}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPosi?t.toLowerCase():t;return n(this.string.substr(this.pos,t.length))==n(t)?(!1!==e&&(this.pos+=t.length),!0):null}{let i=this.string.slice(this.pos).match(t);return i&&i.index>0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}}function oc(t){if("object"!=typeof t)return t;let e={};for(let i in t){let n=t[i];e[i]=n instanceof Array?n.slice():n}return e}const ac=new WeakMap;class lc extends ql{constructor(t){let e,i=Ml(t.languageData),n={name:(s=t).name||"",token:s.token,blankLine:s.blankLine||(()=>{}),startState:s.startState||(()=>!0),copyState:s.copyState||oc,indent:s.indent||(()=>null),languageData:s.languageData||{},tokenTable:s.tokenTable||dc};var s;super(i,new class extends ja{createParse(t,i,n){return new uc(e,t,i,n)}},[Hl.of(((t,e)=>this.getIndent(t,e)))],t.name),this.topNode=function(t){let e=ba.define({id:Oc.length,name:"Document",props:[Rl.add((()=>t))],top:!0});return Oc.push(e),e}(i),e=this,this.streamParser=n,this.stateAfter=new pa({perNode:!0}),this.tokenTable=t.tokenTable?new vc(n.tokenTable):wc}static define(t){return new lc(t)}getIndent(t,e){let i,n=zl(t.state),s=n.resolve(e);for(;s&&s.type!=this.topNode;)s=s.parent;if(!s)return null;let{overrideIndentation:r}=t.options;r&&(i=ac.get(t.state),null!=i&&i1e4)return null;for(;o=n&&i+e.length<=s&&e.prop(t.stateAfter);if(r)return{state:t.streamParser.copyState(r),pos:i+e.length};for(let o=e.children.length-1;o>=0;o--){let r=e.children[o],a=i+e.positions[o],l=r instanceof xa&&a=e.length)return e;s||e.type!=t.topNode||(s=!0);for(let r=e.children.length-1;r>=0;r--){let o,a=e.positions[r],l=e.children[r];if(ai&&hc(t,s.tree,0-s.offset,i,r);if(o&&(e=cc(t,s.tree,i+s.offset,o.pos+s.offset,!1)))return{state:o.state,tree:e}}return{state:t.streamParser.startState(n?Kl(n):4),tree:xa.empty}}(t,i,r,null==s?void 0:s.state);this.state=o,this.parsedPos=this.chunkStart=r+a.length;for(let l=0;l=e?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,e),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let e=this.input.chunk(t);if(this.input.lineChunks)"\n"==e&&(e="");else{let t=e.indexOf("\n");t>-1&&(e=e.slice(0,t))}return t+e.length<=this.to?e:e.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,e=this.lineAfter(t),i=t+e.length;for(let n=this.rangeIndex;;){let t=this.ranges[n].to;if(t>=i)break;if(e=e.slice(0,t-(i-e.length)),n++,n==this.ranges.length)break;let s=this.ranges[n].from,r=this.lineAfter(s);e+=r,i=s+r.length}return{line:e,end:i}}skipGapsTo(t,e,i){for(;;){let n=this.ranges[this.rangeIndex].to,s=t+e;if(i>0?n>s:n>=s)break;e+=this.ranges[++this.rangeIndex].from-n}return e}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){e+=s=this.skipGapsTo(e,s,1);let t=this.chunk.length;i+=s=this.skipGapsTo(i,s,-1),n+=this.chunk.length-t}return this.chunk.push(t,e,i,n),s}parseLine(t){let{line:e,end:i}=this.nextLine(),n=0,{streamParser:s}=this.lang,r=new rc(e,t?t.state.tabSize:4,t?Kl(t.state):2);if(r.eol())s.blankLine(this.state,r.indentUnit);else for(;!r.eol();){let t=fc(s.token,r,this.state);if(t&&(n=this.emitToken(this.lang.tokenTable.resolve(t),this.parsedPos+r.start,this.parsedPos+r.pos,4,n)),r.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPose.start)return n}throw new Error("Stream parser failed to advance stream.")}const dc=Object.create(null),Oc=[ba.none],pc=new va(Oc),mc=[],gc=Object.create(null),bc=Object.create(null);for(let[yw,xw]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])bc[yw]=yc(dc,xw);class vc{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),bc)}resolve(t){return t?this.table[t]||(this.table[t]=yc(this.extra,t)):0}}const wc=new vc(dc);function Sc(t,e){mc.indexOf(t)>-1||(mc.push(t),console.warn(e))}function yc(t,e){let i=[];for(let a of e.split(" ")){let e=[];for(let i of a.split(".")){let n=t[i]||Tl[i];n?"function"==typeof n?e.length?e=e.map(n):Sc(i,`Modifier ${i} used at start of tag`):e.length?Sc(i,`Tag ${i} used as modifier`):e=Array.isArray(n)?n:[n]:Sc(i,`Unknown highlighting tag ${i}`)}for(let t of e)i.push(t)}if(!i.length)return 0;let n=e.replace(/ /g,"_"),s=n+" "+i.map((t=>t.id)),r=gc[s];if(r)return r.id;let o=gc[s]=ba.define({id:Oc.length,name:n,props:[hl({[n]:i})]});return Oc.push(o),o.id}Ei.RTL,Ei.LTR;class xc{constructor(t,e,i,n){this.state=t,this.pos=e,this.explicit=i,this.view=n,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let e=zl(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),n=e.text.slice(i-e.from,this.pos-e.from),s=n.search(Zc(t,!1));return s<0?null:{from:i+s,to:this.pos,text:n.slice(s)}}get aborted(){return null==this.abortListeners}addEventListener(t,e,i){"abort"==t&&this.abortListeners&&(this.abortListeners.push(e),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function Qc(t){let e=Object.keys(t).join(""),i=/\w/.test(e);return i&&(e=e.replace(/\w/g,"")),`[${i?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function kc(t){let e=t.map((t=>"string"==typeof t?{label:t}:t)),[i,n]=e.every((t=>/^\w+$/.test(t.label)))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),i=Object.create(null);for(let{label:s}of t){e[s[0]]=!0;for(let t=1;t{let s=t.matchBefore(n);return s||t.explicit?{from:s?s.from:t.pos,options:e,validFor:i}:null}}class Pc{constructor(t,e,i,n){this.completion=t,this.source=e,this.match=i,this.score=n}}function $c(t){return t.selection.main.from}function Zc(t,e){var i;let{source:n}=t,s=e&&"^"!=n[0],r="$"!=n[n.length-1];return s||r?new RegExp(`${s?"^":""}(?:${n})${r?"$":""}`,null!==(i=t.flags)&&void 0!==i?i:t.ignoreCase?"i":""):t}const Cc=At.define();const Tc=new WeakMap;function Ac(t){if(!Array.isArray(t))return t;let e=Tc.get(t);return e||Tc.set(t,e=kc(t)),e}const Rc=Xt.define(),Mc=Xt.define();class Xc{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e=48&&n<=57||n>=97&&n<=122?2:n>=65&&n<=90?1:0:(l=D(n))!=l.toLowerCase()?1:l!=l.toUpperCase()?2:0;(!g||1==b&&p||0==v&&0!=b)&&(e[c]==n||i[c]==n&&(u=!0)?r[c++]=g:r.length&&(m=!1)),v=b,g+=j(n)}return c==a&&0==r[0]&&m?this.result((u?-200:0)-100,r,t):f==a&&0==d?this.ret(-200-t.length+(O==t.length?0:-100),[0,O]):o>-1?this.ret(-700-t.length,[o,o+this.pattern.length]):f==a?this.ret(-900-t.length,[d,O]):c==a?this.result((u?-200:0)-100-700+(m?0:-1100),r,t):2==e.length?null:this.result((n[0]?-700:0)-200-1100,n,t)}result(t,e,i){let n=[],s=0;for(let r of e){let t=r+(this.astral?j(_(i,r)):1);s&&n[s-1]==r?n[s-1]=t:(n[s++]=r,n[s++]=t)}return this.ret(t-i.length,n)}}class qc{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.lengthGt(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:zc,filterStrict:!1,compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>i=>Ec(t(i),e(i)),optionClass:(t,e)=>i=>Ec(t(i),e(i)),addToOptions:(t,e)=>t.concat(e),filterStrict:(t,e)=>t||e})});function Ec(t,e){return t?e?t+" "+e:t:e}function zc(t,e,i,n,s,r){let o,a,l=t.textDirection==Ei.RTL,h=l,c=!1,u="top",f=e.left-s.left,d=s.right-e.right,O=n.right-n.left,p=n.bottom-n.top;if(h&&f=p||t>e.top?o=i.bottom-e.top:(u="bottom",o=e.bottom-i.top)}return{style:`${u}: ${o/((e.bottom-e.top)/r.offsetHeight)}px; max-width: ${a/((e.right-e.left)/r.offsetWidth)}px`,class:"cm-completionInfo-"+(c?l?"left-narrow":"right-narrow":h?"left":"right")}}function Yc(t,e,i){if(t<=i)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/i);return{from:t*i,to:(t+1)*i}}let n=Math.floor((t-e)/i);return{from:t-(n+1)*i,to:t-n*i}}class Lc{constructor(t,e,i){this.view=t,this.stateField=e,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let n=t.state.field(e),{options:s,selected:r}=n.open,o=t.state.facet(Vc);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map((t=>"cm-completionIcon-"+t))),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,i,n){let s=document.createElement("span");s.className="cm-completionLabel";let r=t.displayLabel||t.label,o=0;for(let a=0;ao&&s.appendChild(document.createTextNode(r.slice(o,t)));let i=s.appendChild(document.createElement("span"));i.appendChild(document.createTextNode(r.slice(t,e))),i.className="cm-completionMatchedText",o=e}return ot.position-e.position)).map((t=>t.render))}(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Yc(s.length,r,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",(i=>{let{options:n}=t.state.field(e).open;for(let e,s=i.target;s&&s!=this.dom;s=s.parentNode)if("LI"==s.nodeName&&(e=/-(\d+)$/.exec(s.id))&&+e[1]{let i=t.state.field(this.stateField,!1);i&&i.tooltip&&t.state.facet(Vc).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:Mc.of(null)})})),this.showOptions(s,n.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(t){var e;let i=t.state.field(this.stateField),n=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),i!=n){let{options:s,selected:r,disabled:o}=i.open;n.open&&n.open.options==s||(this.range=Yc(s.length,r,t.state.facet(Vc).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),o!=(null===(e=n.open)||void 0===e?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected=this.range.to)&&(this.range=Yc(e.options.length,e.selected,this.view.state.facet(Vc).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:i}=e.options[e.selected],{info:n}=i;if(!n)return;let s="string"==typeof n?document.createTextNode(n):n(i);if(!s)return;"then"in s?s.then((e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,i)})).catch((t=>bn(this.view.state,t,"completion info"))):this.addInfoPane(s,i)}}addInfoPane(t,e){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",null!=t.nodeType)i.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:n}=t;i.appendChild(e),this.infoDestroy=n||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let e=null;for(let i=this.list.firstChild,n=this.range.from;i;i=i.nextSibling,n++)"LI"==i.nodeName&&i.id?n==t?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected"):n--;return e&&function(t,e){let i=t.getBoundingClientRect(),n=e.getBoundingClientRect(),s=i.height/t.offsetHeight;n.topi.bottom&&(t.scrollTop+=(n.bottom-i.bottom)/s)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),n=t.getBoundingClientRect(),s=this.space;if(!s){let t=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:t.innerWidth,bottom:t.innerHeight}}return n.top>Math.min(s.bottom,e.bottom)-10||n.bottomi.from||0==i.from))if(s=t,"string"!=typeof l&&l.header)n.appendChild(l.header(l));else{n.appendChild(document.createElement("completion-section")).textContent=t}}const h=n.appendChild(document.createElement("li"));h.id=e+"-"+r,h.setAttribute("role","option");let c=this.optionClass(o);c&&(h.className=c);for(let t of this.optionContent){let e=t(o,this.view.state,this.view,a);e&&h.appendChild(e)}}return i.from&&n.classList.add("cm-completionListIncompleteTop"),i.tonew Lc(i,t,e)}function Dc(t){return 100*(t.boost||0)+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}class jc{constructor(t,e,i,n,s,r){this.options=t,this.attrs=e,this.tooltip=i,this.timestamp=n,this.selected=s,this.disabled=r}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new jc(this.options,Gc(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,i,n,s,r){if(n&&!r&&t.some((t=>1==t.state)))return n.setDisabled();let o=function(t,e){let i=[],n=null,s=t=>{i.push(t);let{section:e}=t.completion;if(e){n||(n=[]);let t="string"==typeof e?e:e.name;n.some((e=>e.name==t))||n.push("string"==typeof e?{name:t}:e)}},r=e.facet(Vc);for(let h of t)if(h.hasResult()){let t=h.result.getMatch;if(!1===h.result.filter)for(let e of h.result.options)s(new Pc(e,h.source,t?t(e):[],1e9-i.length));else{let i,n=e.sliceDoc(h.from,h.to),o=r.filterStrict?new qc(n):new Xc(n);for(let e of h.result.options)if(i=o.match(e.label)){let n=e.displayLabel?t?t(e,i.matched):[]:i.matched;s(new Pc(e,h.source,n,i.score+(e.boost||0)))}}}if(n){let t=Object.create(null),e=0,s=(t,e)=>{var i,n;return(null!==(i=t.rank)&&void 0!==i?i:1e9)-(null!==(n=e.rank)&&void 0!==n?n:1e9)||(t.namee.score-t.score||l(t.completion,e.completion)))){let t=h.completion;!a||a.label!=t.label||a.detail!=t.detail||null!=a.type&&null!=t.type&&a.type!=t.type||a.apply!=t.apply||a.boost!=t.boost?o.push(h):Dc(h.completion)>Dc(a)&&(o[o.length-1]=h),a=h.completion}return o}(t,e);if(!o.length)return n&&t.some((t=>1==t.state))?n.setDisabled():null;let a=e.facet(Vc).selectOnOpen?0:-1;if(n&&n.selected!=a&&-1!=n.selected){let t=n.options[n.selected].completion;for(let e=0;ee.hasResult()?Math.min(t,e.from):t),1e8),create:iu,above:s.aboveCursor},n?n.timestamp:Date.now(),a,!1)}map(t){return new jc(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new jc(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Bc{constructor(t,e,i){this.active=t,this.id=e,this.open=i}static start(){return new Bc(Uc,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,i=e.facet(Vc),n=(i.override||e.languageDataAt("autocomplete",$c(e)).map(Ac)).map((e=>(this.active.find((t=>t.source==e))||new Hc(e,this.active.some((t=>0!=t.state))?1:0)).update(t,i)));n.length==this.active.length&&n.every(((t,e)=>t==this.active[e]))&&(n=this.active);let s=this.open,r=t.effects.some((t=>t.is(Kc)));s&&t.docChanged&&(s=s.map(t.changes)),t.selection||n.some((e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to)))||!function(t,e){if(t==e)return!0;for(let i=0,n=0;;){for(;i1==t.state))&&(s=null),!s&&n.every((t=>1!=t.state))&&n.some((t=>t.hasResult()))&&(n=n.map((t=>t.hasResult()?new Hc(t.source,0):t)));for(let o of t.effects)o.is(Jc)&&(s=s&&s.setSelected(o.value,this.id));return n==this.active&&s==this.open?this:new Bc(n,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Wc:Ic}}const Wc={"aria-autocomplete":"list"},Ic={};function Gc(t,e){let i={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(i["aria-activedescendant"]=t+"-"+e),i}const Uc=[];function Nc(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(Cc);if(i&&e.activateOnCompletion(i))return 12}let i=t.isUserEvent("input.type");return i&&e.activateOnTyping?5:i?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class Hc{constructor(t,e,i=-1){this.source=t,this.state=e,this.explicitPos=i}hasResult(){return!1}update(t,e){let i=Nc(t,e),n=this;(8&i||16&i&&this.touches(t))&&(n=new Hc(n.source,0)),4&i&&0==n.state&&(n=new Hc(this.source,1)),n=n.updateFor(t,i);for(let s of t.effects)if(s.is(Rc))n=new Hc(n.source,1,s.value?$c(t.state):-1);else if(s.is(Mc))n=new Hc(n.source,0);else if(s.is(Kc))for(let t of s.value)t.source==n.source&&(n=t);return n}updateFor(t,e){return this.map(t.changes)}map(t){return t.empty||this.explicitPos<0?this:new Hc(this.source,this.state,t.mapPos(this.explicitPos))}touches(t){return t.changes.touchesRange($c(t.state))}}class Fc extends Hc{constructor(t,e,i,n,s){super(t,2,e),this.result=i,this.from=n,this.to=s}hasResult(){return!0}updateFor(t,e){var i;if(!(3&e))return this.map(t.changes);let n=this.result;n.map&&!t.changes.empty&&(n=n.map(n,t.changes));let s=t.changes.mapPos(this.from),r=t.changes.mapPos(this.to,1),o=$c(t.state);if((this.explicitPos<0?o<=s:or||!n||2&e&&$c(t.startState)==this.from)return new Hc(this.source,4&e?1:0);let a=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos);return function(t,e,i,n){if(!t)return!1;let s=e.sliceDoc(i,n);return"function"==typeof t?t(s,i,n,e):Zc(t,!0).test(s)}(n.validFor,t.state,s,r)?new Fc(this.source,a,n,s,r):n.update&&(n=n.update(n,s,r,new xc(t.state,o,a>=0)))?new Fc(this.source,a,n,n.from,null!==(i=n.to)&&void 0!==i?i:$c(t.state)):new Hc(this.source,1,a)}map(t){if(t.empty)return this;return(this.result.map?this.result.map(this.result,t):this.result)?new Fc(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new Hc(this.source,0)}touches(t){return t.changes.touchesRange(this.from,this.to)}}const Kc=Xt.define({map:(t,e)=>t.map((t=>t.map(e)))}),Jc=Xt.define(),tu=ut.define({create:()=>Bc.start(),update:(t,e)=>t.update(e),provide:t=>[Zo.from(t,(t=>t.tooltip)),Sr.contentAttributes.from(t,(t=>t.attrs))]});function eu(t,e){const i=e.completion.apply||e.completion.label;let n=t.state.field(tu).active.find((t=>t.source==e.source));return n instanceof Fc&&("string"==typeof i?t.dispatch(Object.assign(Object.assign({},function(t,e,i,n){let{main:s}=t.selection,r=i-s.from,o=n-s.from;return Object.assign(Object.assign({},t.changeByRange((a=>{if(a!=s&&i!=n&&t.sliceDoc(a.from+r,a.from+o)!=t.sliceDoc(i,n))return{range:a};let l=t.toText(e);return{changes:{from:a.from+r,to:n==s.from?a.to:a.from+o,insert:l},range:et.cursor(a.from+r+l.length)}}))),{scrollIntoView:!0,userEvent:"input.complete"})}(t.state,i,n.from,n.to)),{annotations:Cc.of(e.completion)})):i(t,e.completion,n.from,n.to),!0)}const iu=_c(tu,eu);function nu(t,e="option"){return i=>{let n=i.state.field(tu,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp-1?n.open.selected+r*(t?1:-1):t?0:o-1;return a<0?a="page"==e?0:o-1:a>=o&&(a="page"==e?o-1:0),i.dispatch({effects:Jc.of(a)}),!0}}const su=t=>!!t.state.field(tu,!1)&&(t.dispatch({effects:Rc.of(!0)}),!0);class ru{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const ou=yn.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(tu).active)1==e.state&&this.startQuery(e)}update(t){let e=t.state.field(tu),i=t.state.facet(Vc);if(!t.selectionSet&&!t.docChanged&&t.startState.field(tu)==e)return;let n=t.transactions.some((t=>{let e=Nc(t,i);return 8&e||(t.selection||t.docChanged)&&!(3&e)}));for(let o=0;o50&&Date.now()-e.time>1e3){for(let t of e.context.abortListeners)try{t()}catch(r){bn(this.view.state,r)}e.context.abortListeners=null,this.running.splice(o--,1)}else e.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some((t=>t.effects.some((t=>t.is(Rc)))))&&(this.pendingStart=!0);let s=this.pendingStart?50:i.activateOnTypingDelay;if(this.debounceUpdate=e.active.some((t=>1==t.state&&!this.running.some((e=>e.active.source==t.source))))?setTimeout((()=>this.startUpdate()),s):-1,0!=this.composing)for(let o of t.transactions)o.isUserEvent("input.type")?this.composing=2:2==this.composing&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(tu);for(let i of e.active)1!=i.state||this.running.some((t=>t.active.source==i.source))||this.startQuery(i);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(Vc).updateSyncTime))}startQuery(t){let{state:e}=this.view,i=$c(e),n=new xc(e,i,t.explicitPos==i,this.view),s=new ru(t,n);this.running.push(s),Promise.resolve(t.source(n)).then((t=>{s.context.aborted||(s.done=t||null,this.scheduleAccept())}),(t=>{this.view.dispatch({effects:Mc.of(null)}),bn(this.view.state,t)}))}scheduleAccept(){this.running.every((t=>void 0!==t.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(Vc).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],i=this.view.state.facet(Vc),n=this.view.state.field(tu);for(let s=0;st.source==r.active.source));if(o&&1==o.state)if(null==r.done){let t=new Hc(r.active.source,0);for(let e of r.updates)t=t.update(e,i);1!=t.state&&e.push(t)}else this.startQuery(o)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:Kc.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(tu,!1);if(e&&e.tooltip&&this.view.state.facet(Vc).closeOnBlur){let i=e.open&&qo(this.view,e.open.tooltip);i&&i.dom.contains(t.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:Mc.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:Rc.of(!1)})),20),this.composing=0}}}),au="object"==typeof navigator&&/Win/.test(navigator.platform),lu=gt.highest(Sr.domEventHandlers({keydown(t,e){let i=e.state.field(tu,!1);if(!i||!i.open||i.open.disabled||i.open.selected<0||t.key.length>1||t.ctrlKey&&(!au||!t.altKey)||t.metaKey)return!1;let n=i.open.options[i.open.selected],s=i.active.find((t=>t.source==n.source)),r=n.completion.commitCharacters||s.result.commitCharacters;return r&&r.indexOf(t.key)>-1&&eu(e,n),!1}})),hu=Sr.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class cu{constructor(t,e,i,n){this.field=t,this.line=e,this.from=i,this.to=n}}class uu{constructor(t,e,i){this.field=t,this.from=e,this.to=i}map(t){let e=t.mapPos(this.from,-1,W.TrackDel),i=t.mapPos(this.to,1,W.TrackDel);return null==e||null==i?null:new uu(this.field,e,i)}}class fu{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let i=[],n=[e],s=t.doc.lineAt(e),r=/^\s*/.exec(s.text)[0];for(let a of this.lines){if(i.length){let i=r,s=/^\t*/.exec(a)[0].length;for(let e=0;enew uu(t.field,n[t.line]+t.from,n[t.line]+t.to)));return{text:i,ranges:o}}static parse(t){let e,i=[],n=[],s=[];for(let r of t.split(/\r\n?|\n/)){for(;e=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(r);){let t=e[1]?+e[1]:null,o=e[2]||e[3]||"",a=-1,l=o.replace(/\\[{}]/g,(t=>t[1]));for(let e=0;e=a&&t.field++}s.push(new cu(a,n.length,e.index,e.index+l.length)),r=r.slice(0,e.index)+o+r.slice(e.index+e[0].length)}r=r.replace(/\\([{}])/g,((t,e,i)=>{for(let r of s)r.line==n.length&&r.from>i&&(r.from--,r.to--);return e})),n.push(r)}return new fu(n,s)}}let du=ki.widget({widget:new class extends xi{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Ou=ki.mark({class:"cm-snippetField"});class pu{constructor(t,e){this.ranges=t,this.active=e,this.deco=ki.set(t.map((t=>(t.from==t.to?du:Ou).range(t.from,t.to))))}map(t){let e=[];for(let i of this.ranges){let n=i.map(t);if(!n)return null;e.push(n)}return new pu(e,this.active)}selectionInsideField(t){return t.ranges.every((t=>this.ranges.some((e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))))}}const mu=Xt.define({map:(t,e)=>t&&t.map(e)}),gu=Xt.define(),bu=ut.define({create:()=>null,update(t,e){for(let i of e.effects){if(i.is(mu))return i.value;if(i.is(gu)&&t)return new pu(t.ranges,i.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Sr.decorations.from(t,(t=>t?t.deco:ki.none))});function vu(t,e){return et.create(t.filter((t=>t.field==e)).map((t=>et.range(t.from,t.to))))}function wu(t){let e=fu.parse(t);return(t,i,n,s)=>{let{text:r,ranges:o}=e.instantiate(t.state,n),a={changes:{from:n,to:s,insert:x.of(r)},scrollIntoView:!0,annotations:i?[Cc.of(i),qt.userEvent.of("input.complete")]:void 0};if(o.length&&(a.selection=vu(o,0)),o.some((t=>t.field>0))){let e=new pu(o,0),i=a.effects=[mu.of(e)];void 0===t.state.field(bu,!1)&&i.push(Xt.appendConfig.of([bu,Qu,Pu,hu]))}t.dispatch(t.state.update(a))}}function Su(t){return({state:e,dispatch:i})=>{let n=e.field(bu,!1);if(!n||t<0&&0==n.active)return!1;let s=n.active+t,r=t>0&&!n.ranges.some((e=>e.field==s+t));return i(e.update({selection:vu(n.ranges,s),effects:mu.of(r?null:new pu(n.ranges,s)),scrollIntoView:!0})),!0}}const yu=[{key:"Tab",run:Su(1),shift:Su(-1)},{key:"Escape",run:({state:t,dispatch:e})=>!!t.field(bu,!1)&&(e(t.update({effects:mu.of(null)})),!0)}],xu=st.define({combine:t=>t.length?t[0]:yu}),Qu=gt.highest(Cr.compute([xu],(t=>t.facet(xu))));function ku(t,e){return Object.assign(Object.assign({},e),{apply:wu(t)})}const Pu=Sr.domEventHandlers({mousedown(t,e){let i,n=e.state.field(bu,!1);if(!n||null==(i=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let s=n.ranges.find((t=>t.from<=i&&t.to>=i));return!(!s||s.field==n.active)&&(e.dispatch({selection:vu(n.ranges,s.field),effects:mu.of(n.ranges.some((t=>t.field>s.field))?new pu(n.ranges,s.field):null),scrollIntoView:!0}),!0)}}),$u={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Zu=Xt.define({map(t,e){let i=e.mapPos(t,-1,W.TrackAfter);return null==i?void 0:i}}),Cu=new class extends Ut{};Cu.startSide=1,Cu.endSide=-1;const Tu=ut.define({create:()=>Kt.empty,update(t,e){if(t=t.map(e.changes),e.selection){let i=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=i.from&&t<=i.to})}for(let i of e.effects)i.is(Zu)&&(t=t.update({add:[Cu.range(i.value,i.value+1)]}));return t}});const Au="()[]{}<>";function Ru(t){for(let e=0;e<8;e+=2)if(Au.charCodeAt(e)==t)return Au.charAt(e+1);return D(t<128?t:t+1)}function Mu(t,e){return t.languageDataAt("closeBrackets",e)[0]||$u}const Xu="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),qu=Sr.inputHandler.of(((t,e,i,n)=>{if((Xu?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let s=t.state.selection.main;if(n.length>2||2==n.length&&1==j(_(n,0))||e!=s.from||i!=s.to)return!1;let r=function(t,e){let i=Mu(t,t.selection.main.head),n=i.brackets||$u.brackets;for(let s of n){let r=Ru(_(s,0));if(e==s)return r==s?_u(t,s,n.indexOf(s+s+s)>-1,i):Yu(t,s,r,i.before||$u.before);if(e==r&&Eu(t,t.selection.main.from))return Lu(t,s,r)}return null}(t.state,n);return!!r&&(t.dispatch(r),!0)})),Vu=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=Mu(t,t.selection.main.head).brackets||$u.brackets,n=null,s=t.changeByRange((e=>{if(e.empty){let n=function(t,e){let i=t.sliceString(e-2,e);return j(_(i,0))==i.length?i:i.slice(1)}(t.doc,e.head);for(let s of i)if(s==n&&zu(t.doc,e.head)==Ru(_(s,0)))return{changes:{from:e.head-s.length,to:e.head+s.length},range:et.cursor(e.head-s.length)}}return{range:n=e}}));return n||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!n}}];function Eu(t,e){let i=!1;return t.field(Tu).between(0,t.doc.length,(t=>{t==e&&(i=!0)})),i}function zu(t,e){let i=t.sliceString(e,e+2);return i.slice(0,j(_(i,0)))}function Yu(t,e,i,n){let s=null,r=t.changeByRange((r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:i,from:r.to}],effects:Zu.of(r.to+e.length),range:et.range(r.anchor+e.length,r.head+e.length)};let o=zu(t.doc,r.head);return!o||/\s/.test(o)||n.indexOf(o)>-1?{changes:{insert:e+i,from:r.head},effects:Zu.of(r.head+e.length),range:et.cursor(r.head+e.length)}:{range:s=r}}));return s?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Lu(t,e,i){let n=null,s=t.changeByRange((e=>e.empty&&zu(t.doc,e.head)==i?{changes:{from:e.head,to:e.head+i.length,insert:i},range:et.cursor(e.head+i.length)}:n={range:e}));return n?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function _u(t,e,i,n){let s=n.stringPrefixes||$u.stringPrefixes,r=null,o=t.changeByRange((n=>{if(!n.empty)return{changes:[{insert:e,from:n.from},{insert:e,from:n.to}],effects:Zu.of(n.to+e.length),range:et.range(n.anchor+e.length,n.head+e.length)};let o,a=n.head,l=zu(t.doc,a);if(l==e){if(Du(t,a))return{changes:{insert:e+e,from:a},effects:Zu.of(a+e.length),range:et.cursor(a+e.length)};if(Eu(t,a)){let n=i&&t.sliceDoc(a,a+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+n.length,insert:n},range:et.cursor(a+n.length)}}}else{if(i&&t.sliceDoc(a-2*e.length,a)==e+e&&(o=ju(t,a-2*e.length,s))>-1&&Du(t,o))return{changes:{insert:e+e+e+e,from:a},effects:Zu.of(a+e.length),range:et.cursor(a+e.length)};if(t.charCategorizer(a)(l)!=Dt.Word&&ju(t,a,s)>-1&&!function(t,e,i,n){let s=zl(t).resolveInner(e,-1),r=n.reduce(((t,e)=>Math.max(t,e.length)),0);for(let o=0;o<5;o++){let o=t.sliceDoc(s.from,Math.min(s.to,s.from+i.length+r)),a=o.indexOf(i);if(!a||a>-1&&n.indexOf(o.slice(0,a))>-1){let e=s.firstChild;for(;e&&e.from==s.from&&e.to-e.from>i.length+a;){if(t.sliceDoc(e.to-i.length,e.to)==i)return!1;e=e.firstChild}return!0}let l=s.to==e&&s.parent;if(!l)break;s=l}return!1}(t,a,e,s))return{changes:{insert:e+e,from:a},effects:Zu.of(a+e.length),range:et.cursor(a+e.length)}}return{range:r=n}}));return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Du(t,e){let i=zl(t).resolveInner(e+1);return i.parent&&i.from==e}function ju(t,e,i){let n=t.charCategorizer(e);if(n(t.sliceDoc(e-1,e))!=Dt.Word)return e;for(let s of i){let i=e-s.length;if(t.sliceDoc(i,e)==s&&n(t.sliceDoc(i-1,i))!=Dt.Word)return i}return-1}function Bu(t={}){return[lu,tu,Vc.of(t),ou,Iu,hu]}const Wu=[{key:"Ctrl-Space",run:su},{mac:"Alt-`",run:su},{key:"Escape",run:t=>{let e=t.state.field(tu,!1);return!(!e||!e.active.some((t=>0!=t.state)))&&(t.dispatch({effects:Mc.of(null)}),!0)}},{key:"ArrowDown",run:nu(!0)},{key:"ArrowUp",run:nu(!1)},{key:"PageDown",run:nu(!0,"page")},{key:"PageUp",run:nu(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field(tu,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.facet(Vc).defaultKeymap?[Wu]:[])));function Gu(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,i=arguments[1];if(i&&"object"==typeof i&&null==i.nodeType&&!Array.isArray(i)){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var s=i[n];"string"==typeof s?t.setAttribute(n,s):null!=s&&(t[n]=s)}e++}for(;et.normalize("NFKD"):t=>t;class Hu{constructor(t,e,i=0,n=t.length,s,r){this.test=r,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(i,n),this.bufferStart=i,this.normalize=s?t=>s(Nu(t)):Nu,this.query=this.normalize(e)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return _(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=D(t),i=this.bufferStart+this.bufferPos;this.bufferPos+=j(t);let n=this.normalize(e);if(n.length)for(let s=0,r=i;;s++){let t=n.charCodeAt(s),o=this.match(t,r,this.bufferPos+this.bufferStart);if(s==n.length-1){if(o)return this.value=o,this;break}r==i&&sthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let i=this.curLineStart+e.index,n=i+e[0].length;if(this.matchPos=sf(this.text,n+(i==n?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,n,e)))return this.value={from:i,to:n,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||n.to<=e){let n=new ef(e,t.sliceString(e,i));return tf.set(t,n),n}if(n.from==e&&n.to==i)return n;let{text:s,from:r}=n;return r>e&&(s=t.sliceString(e,r)+s,r=e),n.to=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,i=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,i,e)))return this.value={from:t,to:i,match:e},this.matchPos=sf(this.text,i+(t==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=ef.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function sf(t,e){if(e>=t.length)return e;let i,n=t.lineAt(e);for(;e=56320&&i<57344;)e++;return e}function rf(t){let e=Gu("input",{class:"cm-textfield",name:"line",value:String(t.state.doc.lineAt(t.state.selection.main.head).number)});function i(){let i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!i)return;let{state:n}=t,s=n.doc.lineAt(n.selection.main.head),[,r,o,a,l]=i,h=a?+a.slice(1):0,c=o?+o:s.number;if(o&&l){let t=c/100;r&&(t=t*("-"==r?-1:1)+s.number/n.doc.lines),c=Math.round(n.doc.lines*t)}else o&&r&&(c=c*("-"==r?-1:1)+s.number);let u=n.doc.line(Math.max(1,Math.min(n.doc.lines,c))),f=et.cursor(u.from+Math.max(0,Math.min(h,u.length)));t.dispatch({effects:[of.of(!1),Sr.scrollIntoView(f.from,{y:"center"})],selection:f}),t.focus()}return{dom:Gu("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:of.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),i())},onsubmit:t=>{t.preventDefault(),i()}},Gu("label",t.state.phrase("Go to line"),": ",e)," ",Gu("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}"undefined"!=typeof Symbol&&(Ju.prototype[Symbol.iterator]=nf.prototype[Symbol.iterator]=function(){return this});const of=Xt.define(),af=ut.define({create:()=>!0,update(t,e){for(let i of e.effects)i.is(of)&&(t=i.value);return t},provide:t=>Do.from(t,(t=>t?rf:null))}),lf=Sr.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),hf={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},cf=st.define({combine:t=>Gt(t,hf,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})});const uf=ki.mark({class:"cm-selectionMatch"}),ff=ki.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function df(t,e,i,n){return!(0!=i&&t(e.sliceDoc(i-1,i))==Dt.Word||n!=e.doc.length&&t(e.sliceDoc(n,n+1))==Dt.Word)}const Of=yn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(cf),{state:i}=t,n=i.selection;if(n.ranges.length>1)return ki.none;let s,r=n.main,o=null;if(r.empty){if(!e.highlightWordAroundCursor)return ki.none;let t=i.wordAt(r.head);if(!t)return ki.none;o=i.charCategorizer(r.head),s=i.sliceDoc(t.from,t.to)}else{let t=r.to-r.from;if(t200)return ki.none;if(e.wholeWords){if(s=i.sliceDoc(r.from,r.to),o=i.charCategorizer(r.head),!df(o,i,r.from,r.to)||!function(t,e,i,n){return t(e.sliceDoc(i,i+1))==Dt.Word&&t(e.sliceDoc(n-1,n))==Dt.Word}(o,i,r.from,r.to))return ki.none}else if(s=i.sliceDoc(r.from,r.to),!s)return ki.none}let a=[];for(let l of t.visibleRanges){let t=new Hu(i.doc,s,l.from,l.to);for(;!t.next().done;){let{from:n,to:s}=t.value;if((!o||df(o,i,n,s))&&(r.empty&&n<=r.from&&s>=r.to?a.push(ff.range(n,s)):(n>=r.to||s<=r.from)&&a.push(uf.range(n,s)),a.length>e.maxMatches))return ki.none}}return ki.set(a)}},{decorations:t=>t.decorations}),pf=Sr.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const mf=st.define({combine:t=>Gt(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new Wf(t),scrollToMatch:t=>Sr.scrollIntoView(t)})});class gf{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,Ku),!0}catch(Al){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,((t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"))}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new Qf(this):new wf(this)}getCursor(t,e=0,i){let n=t.doc?t:It.create({doc:t});return null==i&&(i=n.doc.length),this.regexp?Sf(this,n,e,i):vf(this,n,e,i)}}class bf{constructor(t){this.spec=t}}function vf(t,e,i,n){return new Hu(e.doc,t.unquoted,i,n,t.caseSensitive?void 0:t=>t.toLowerCase(),t.wholeWord?function(t,e){return(i,n,s,r)=>((r>i||r+s.length=e)return null;n.push(i.value)}return n}highlight(t,e,i,n){let s=vf(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,t.doc.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}function Sf(t,e,i,n){return new Ju(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(s=e.charCategorizer(e.selection.main.head),(t,e,i)=>!i[0].length||(s(yf(i.input,i.index))!=Dt.Word||s(xf(i.input,i.index))!=Dt.Word)&&(s(xf(i.input,i.index+i[0].length))!=Dt.Word||s(yf(i.input,i.index+i[0].length))!=Dt.Word)):void 0},i,n);var s}function yf(t,e){return t.slice(V(t,e,!1),e)}function xf(t,e){return t.slice(e,V(t,e))}class Qf extends bf{nextMatch(t,e,i){let n=Sf(this.spec,t,i,t.doc.length).next();return n.done&&(n=Sf(this.spec,t,0,e).next()),n.done?null:n.value}prevMatchInRange(t,e,i){for(let n=1;;n++){let s=Math.max(e,i-1e4*n),r=Sf(this.spec,t,s,i),o=null;for(;!r.next().done;)o=r.value;if(o&&(s==e||o.from>s+10))return o;if(s==e)return null}}prevMatch(t,e,i){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,i,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,((e,i)=>"$"==i?"$":"&"==i?t.match[0]:"0"!=i&&+i=e)return null;n.push(i.value)}return n}highlight(t,e,i,n){let s=Sf(this.spec,t,Math.max(0,e-250),Math.min(i+250,t.doc.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}const kf=Xt.define(),Pf=Xt.define(),$f=ut.define({create:t=>new Zf(Yf(t).create(),null),update(t,e){for(let i of e.effects)i.is(kf)?t=new Zf(i.value.create(),t.panel):i.is(Pf)&&(t=new Zf(t.query,i.value?zf:null));return t},provide:t=>Do.from(t,(t=>t.panel))});class Zf{constructor(t,e){this.query=t,this.panel=e}}const Cf=ki.mark({class:"cm-searchMatch"}),Tf=ki.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Af=yn.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field($f))}update(t){let e=t.state.field($f);(e!=t.startState.field($f)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return ki.none;let{view:i}=this,n=new Jt;for(let s=0,r=i.visibleRanges,o=r.length;sr[s+1].from-500;)a=r[++s].to;t.highlight(i.state,e,a,((t,e)=>{let s=i.state.selection.ranges.some((i=>i.from==t&&i.to==e));n.add(t,e,s?Tf:Cf)}))}return n.finish()}},{decorations:t=>t.decorations});function Rf(t){return e=>{let i=e.state.field($f,!1);return i&&i.query.spec.valid?t(e,i):Df(e)}}const Mf=Rf(((t,{query:e})=>{let{to:i}=t.state.selection.main,n=e.nextMatch(t.state,i,i);if(!n)return!1;let s=et.single(n.from,n.to),r=t.state.facet(mf);return t.dispatch({selection:s,effects:[Nf(t,n),r.scrollToMatch(s.main,t)],userEvent:"select.search"}),_f(t),!0})),Xf=Rf(((t,{query:e})=>{let{state:i}=t,{from:n}=i.selection.main,s=e.prevMatch(i,n,n);if(!s)return!1;let r=et.single(s.from,s.to),o=t.state.facet(mf);return t.dispatch({selection:r,effects:[Nf(t,s),o.scrollToMatch(r.main,t)],userEvent:"select.search"}),_f(t),!0})),qf=Rf(((t,{query:e})=>{let i=e.matchAll(t.state,1e3);return!(!i||!i.length)&&(t.dispatch({selection:et.create(i.map((t=>et.range(t.from,t.to)))),userEvent:"select.search.matches"}),!0)})),Vf=Rf(((t,{query:e})=>{let{state:i}=t,{from:n,to:s}=i.selection.main;if(i.readOnly)return!1;let r=e.nextMatch(i,n,n);if(!r)return!1;let o,a,l=[],h=[];if(r.from==n&&r.to==s&&(a=i.toText(e.getReplacement(r)),l.push({from:r.from,to:r.to,insert:a}),r=e.nextMatch(i,r.from,r.to),h.push(Sr.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(n).number)+"."))),r){let e=0==l.length||l[0].from>=r.to?0:r.to-r.from-a.length;o=et.single(r.from-e,r.to-e),h.push(Nf(t,r)),h.push(i.facet(mf).scrollToMatch(o.main,t))}return t.dispatch({changes:l,selection:o,effects:h,userEvent:"input.replace"}),!0})),Ef=Rf(((t,{query:e})=>{if(t.state.readOnly)return!1;let i=e.matchAll(t.state,1e9).map((t=>{let{from:i,to:n}=t;return{from:i,to:n,insert:e.getReplacement(t)}}));if(!i.length)return!1;let n=t.state.phrase("replaced $ matches",i.length)+".";return t.dispatch({changes:i,effects:Sr.announce.of(n),userEvent:"input.replace.all"}),!0}));function zf(t){return t.state.facet(mf).createPanel(t)}function Yf(t,e){var i,n,s,r,o;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let h=t.facet(mf);return new gf({search:(null!==(i=null==e?void 0:e.literal)&&void 0!==i?i:h.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(n=null==e?void 0:e.caseSensitive)&&void 0!==n?n:h.caseSensitive,literal:null!==(s=null==e?void 0:e.literal)&&void 0!==s?s:h.literal,regexp:null!==(r=null==e?void 0:e.regexp)&&void 0!==r?r:h.regexp,wholeWord:null!==(o=null==e?void 0:e.wholeWord)&&void 0!==o?o:h.wholeWord})}function Lf(t){let e=zo(t,zf);return e&&e.dom.querySelector("[main-field]")}function _f(t){let e=Lf(t);e&&e==t.root.activeElement&&e.select()}const Df=t=>{let e=t.state.field($f,!1);if(e&&e.panel){let i=Lf(t);if(i&&i!=t.root.activeElement){let n=Yf(t.state,e.query.spec);n.valid&&t.dispatch({effects:kf.of(n)}),i.focus(),i.select()}}else t.dispatch({effects:[Pf.of(!0),e?kf.of(Yf(t.state,e.query.spec)):Xt.appendConfig.of(Ff)]});return!0},jf=t=>{let e=t.state.field($f,!1);if(!e||!e.panel)return!1;let i=zo(t,zf);return i&&i.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Pf.of(!1)}),!0},Bf=[{key:"Mod-f",run:Df,scope:"editor search-panel"},{key:"F3",run:Mf,shift:Xf,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Mf,shift:Xf,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:jf,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let i=t.selection;if(i.ranges.length>1||i.main.empty)return!1;let{from:n,to:s}=i.main,r=[],o=0;for(let a=new Hu(t.doc,t.sliceDoc(n,s));!a.next().done;){if(r.length>1e3)return!1;a.value.from==n&&(o=r.length),r.push(et.range(a.value.from,a.value.to))}return e(t.update({selection:et.create(r,o),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:t=>{let e=zo(t,rf);if(!e){let i=[of.of(!0)];null==t.state.field(af,!1)&&i.push(Xt.appendConfig.of([af,lf])),t.dispatch({effects:i}),e=zo(t,rf)}return e&&e.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:i}=t.selection;if(i.some((t=>t.from===t.to)))return(({state:t,dispatch:e})=>{let{selection:i}=t,n=et.create(i.ranges.map((e=>t.wordAt(e.head)||et.cursor(e.head))),i.mainIndex);return!n.eq(i)&&(e(t.update({selection:n})),!0)})({state:t,dispatch:e});let n=t.sliceDoc(i[0].from,i[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=n)))return!1;let s=function(t,e){let{main:i,ranges:n}=t.selection,s=t.wordAt(i.head),r=s&&s.from==i.from&&s.to==i.to;for(let o=!1,a=new Hu(t.doc,e,n[n.length-1].to);;){if(a.next(),!a.done){if(o&&n.some((t=>t.from==a.value.from)))continue;if(r){let e=t.wordAt(a.value.from);if(!e||e.from!=a.value.from||e.to!=a.value.to)continue}return a.value}if(o)return null;a=new Hu(t.doc,e,0,Math.max(0,n[n.length-1].from-1)),o=!0}}(t,n);return!!s&&(e(t.update({selection:t.selection.addRange(et.range(s.from,s.to),!1),effects:Sr.scrollIntoView(s.to)})),!0)},preventDefault:!0}];let Wf=class{constructor(t){this.view=t;let e=this.query=t.state.field($f).query.spec;function i(t,e,i){return Gu("button",{class:"cm-button",name:t,onclick:e,type:"button"},i)}this.commit=this.commit.bind(this),this.searchField=Gu("input",{value:e.search,placeholder:If(t,"Find"),"aria-label":If(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Gu("input",{value:e.replace,placeholder:If(t,"Replace"),"aria-label":If(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Gu("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=Gu("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=Gu("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=Gu("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,i("next",(()=>Mf(t)),[If(t,"next")]),i("prev",(()=>Xf(t)),[If(t,"previous")]),i("select",(()=>qf(t)),[If(t,"all")]),Gu("label",null,[this.caseField,If(t,"match case")]),Gu("label",null,[this.reField,If(t,"regexp")]),Gu("label",null,[this.wordField,If(t,"by word")]),...t.state.readOnly?[]:[Gu("br"),this.replaceField,i("replace",(()=>Vf(t)),[If(t,"replace")]),i("replaceAll",(()=>Ef(t)),[If(t,"replace all")])],Gu("button",{name:"close",onclick:()=>jf(t),"aria-label":If(t,"close"),type:"button"},["×"])])}commit(){let t=new gf({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:kf.of(t)}))}keydown(t){var e,i,n;e=this.view,i=t,n="search-panel",qr(Ar(e.state),i,e,n)?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?Xf:Mf)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),Vf(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(kf)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(mf).top}};function If(t,e){return t.state.phrase(e)}const Gf=30,Uf=/[\s\.,:;?!]/;function Nf(t,{from:e,to:i}){let n=t.state.doc.lineAt(e),s=t.state.doc.lineAt(i).to,r=Math.max(n.from,e-Gf),o=Math.min(s,i+Gf),a=t.state.sliceDoc(r,o);if(r!=n.from)for(let l=0;la.length-Gf;l--)if(!Uf.test(a[l-1])&&Uf.test(a[l])){a=a.slice(0,l);break}return Sr.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${n.number}.`)}const Hf=Sr.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Ff=[$f,gt.low(Af),Hf];function Kf(t,e){return({state:i,dispatch:n})=>{if(i.readOnly)return!1;let s=t(e,i);return!!s&&(n(i.update(s)),!0)}}const Jf=Kf(rd,0),td=Kf(sd,0),ed=Kf(((t,e)=>sd(t,e,function(t){let e=[];for(let i of t.selection.ranges){let n=t.doc.lineAt(i.from),s=i.to<=n.to?n:t.doc.lineAt(i.to);s.from>n.from&&s.from==i.to&&(s=i.to==n.to+1?n:t.doc.lineAt(i.to-1));let r=e.length-1;r>=0&&e[r].to>n.from?e[r].to=s.to:e.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:s.to})}return e}(e))),0);function id(t,e){let i=t.languageDataAt("commentTokens",e);return i.length?i[0]:{}}const nd=50;function sd(t,e,i=e.selection.ranges){let n=i.map((t=>id(e,t.from).block));if(!n.every((t=>t)))return null;let s=i.map(((t,i)=>function(t,{open:e,close:i},n,s){let r,o,a=t.sliceDoc(n-nd,n),l=t.sliceDoc(s,s+nd),h=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(l)[0].length,u=a.length-h;if(a.slice(u-e.length,u)==e&&l.slice(c,c+i.length)==i)return{open:{pos:n-h,margin:h&&1},close:{pos:s+c,margin:c&&1}};s-n<=2*nd?r=o=t.sliceDoc(n,s):(r=t.sliceDoc(n,n+nd),o=t.sliceDoc(s-nd,s));let f=/^\s*/.exec(r)[0].length,d=/\s*$/.exec(o)[0].length,O=o.length-d-i.length;return r.slice(f,f+e.length)==e&&o.slice(O,O+i.length)==i?{open:{pos:n+f+e.length,margin:/\s/.test(r.charAt(f+e.length))?1:0},close:{pos:s-d-i.length,margin:/\s/.test(o.charAt(O-1))?1:0}}:null}(e,n[i],t.from,t.to)));if(2!=t&&!s.every((t=>t)))return{changes:e.changes(i.map(((t,e)=>s[e]?[]:[{from:t.from,insert:n[e].open+" "},{from:t.to,insert:" "+n[e].close}])))};if(1!=t&&s.some((t=>t))){let t=[];for(let e,i=0;is&&(r==o||o>l.from)){s=l.from;let t=/^\s*/.exec(l.text)[0].length,e=t==l.length,r=l.text.slice(t,t+a.length)==a?t:-1;tt.comment<0&&(!t.empty||t.single)))){let t=[];for(let{line:e,token:s,indent:r,empty:o,single:a}of n)!a&&o||t.push({from:e.from+r,insert:s+" "});let i=e.changes(t);return{changes:i,selection:e.selection.map(i,1)}}if(1!=t&&n.some((t=>t.comment>=0))){let t=[];for(let{line:e,comment:i,token:s}of n)if(i>=0){let n=e.from+i,r=n+s.length;" "==e.text[r-e.from]&&r++,t.push({from:n,to:r})}return{changes:t}}return null}const od=At.define(),ad=At.define(),ld=st.define(),hd=st.define({combine:t=>Gt(t,{minDepth:100,newGroupDelay:500,joinToEvent:(t,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,e)=>(i,n)=>t(i,n)||e(i,n)})}),cd=ut.define({create:()=>$d.empty,update(t,e){let i=e.state.facet(hd),n=e.annotation(od);if(n){let s=gd.fromTransaction(e,n.selection),r=n.side,o=0==r?t.undone:t.done;return o=s?bd(o,o.length,i.minDepth,s):yd(o,e.startState.selection),new $d(0==r?n.rest:o,0==r?o:n.rest)}let s=e.annotation(ad);if("full"!=s&&"before"!=s||(t=t.isolate()),!1===e.annotation(qt.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let r=gd.fromTransaction(e),o=e.annotation(qt.time),a=e.annotation(qt.userEvent);return r?t=t.addChanges(r,o,a,i,e):e.selection&&(t=t.addSelection(e.startState.selection,o,a,i.newGroupDelay)),"full"!=s&&"after"!=s||(t=t.isolate()),t},toJSON:t=>({done:t.done.map((t=>t.toJSON())),undone:t.undone.map((t=>t.toJSON()))}),fromJSON:t=>new $d(t.done.map(gd.fromJSON),t.undone.map(gd.fromJSON))});function ud(t={}){return[cd,hd.of(t),Sr.domEventHandlers({beforeinput(t,e){let i="historyUndo"==t.inputType?dd:"historyRedo"==t.inputType?Od:null;return!!i&&(t.preventDefault(),i(e))}})]}function fd(t,e){return function({state:i,dispatch:n}){if(!e&&i.readOnly)return!1;let s=i.field(cd,!1);if(!s)return!1;let r=s.pop(t,i,e);return!!r&&(n(r),!0)}}const dd=fd(0,!1),Od=fd(1,!1),pd=fd(0,!0),md=fd(1,!0);class gd{constructor(t,e,i,n,s){this.changes=t,this.effects=e,this.mapped=i,this.startSelection=n,this.selectionsAfter=s}setSelAfter(t){return new gd(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,i;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map((t=>t.toJSON()))}}static fromJSON(t){return new gd(t.changes&&G.fromJSON(t.changes),[],t.mapped&&I.fromJSON(t.mapped),t.startSelection&&et.fromJSON(t.startSelection),t.selectionsAfter.map(et.fromJSON))}static fromTransaction(t,e){let i=wd;for(let n of t.startState.facet(ld)){let e=n(t);e.length&&(i=i.concat(e))}return!i.length&&t.changes.empty?null:new gd(t.changes.invert(t.startState.doc),i,void 0,e||t.startState.selection,wd)}static selection(t){return new gd(void 0,wd,void 0,void 0,t)}}function bd(t,e,i,n){let s=e+1>i+20?e-i-1:0,r=t.slice(s,e);return r.push(n),r}function vd(t,e){return t.length?e.length?t.concat(e):t:e}const wd=[],Sd=200;function yd(t,e){if(t.length){let i=t[t.length-1],n=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-Sd));return n.length&&n[n.length-1].eq(e)?t:(n.push(e),bd(t,t.length-1,1e9,i.setSelAfter(n)))}return[gd.selection([e])]}function xd(t){let e=t[t.length-1],i=t.slice();return i[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),i}function Qd(t,e){if(!t.length)return t;let i=t.length,n=wd;for(;i;){let s=kd(t[i-1],e,n);if(s.changes&&!s.changes.empty||s.effects.length){let e=t.slice(0,i);return e[i-1]=s,e}e=s.mapped,i--,n=s.selectionsAfter}return n.length?[gd.selection(n)]:wd}function kd(t,e,i){let n=vd(t.selectionsAfter.length?t.selectionsAfter.map((t=>t.map(e))):wd,i);if(!t.changes)return gd.selection(n);let s=t.changes.map(e),r=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(r):r;return new gd(s,Xt.mapEffects(t.effects,e),o,t.startSelection.map(r),n)}const Pd=/^(input\.type|delete)($|\.)/;class $d{constructor(t,e,i=0,n=void 0){this.done=t,this.undone=e,this.prevTime=i,this.prevUserEvent=n}isolate(){return this.prevTime?new $d(this.done,this.undone):this}addChanges(t,e,i,n,s){let r=this.done,o=r[r.length-1];return r=o&&o.changes&&!o.changes.empty&&t.changes&&(!i||Pd.test(i))&&(!o.selectionsAfter.length&&e-this.prevTimei.push(t,e))),e.iterChangedRanges(((t,e,s,r)=>{for(let o=0;o=t&&s<=e&&(n=!0)}})),n}(o.changes,t.changes))||"input.type.compose"==i)?bd(r,r.length-1,n.minDepth,new gd(t.changes.compose(o.changes),vd(Xt.mapEffects(t.effects,o.changes),o.effects),o.mapped,o.startSelection,wd)):bd(r,r.length,n.minDepth,t),new $d(r,wd,e,i)}addSelection(t,e,i,n){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:wd;return s.length>0&&e-this.prevTimet.empty!=o.ranges[e].empty)).length)?this:new $d(yd(this.done,t),this.undone,e,i);var r,o}addMapping(t){return new $d(Qd(this.done,t),Qd(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,i){let n=0==t?this.done:this.undone;if(0==n.length)return null;let s=n[n.length-1],r=s.selectionsAfter[0]||e.selection;if(i&&s.selectionsAfter.length)return e.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:od.of({side:t,rest:xd(n),selection:r}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let i=1==n.length?wd:n.slice(0,n.length-1);return s.mapped&&(i=Qd(i,s.mapped)),e.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:od.of({side:t,rest:i,selection:r}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}$d.empty=new $d(wd,wd);const Zd=[{key:"Mod-z",run:dd,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Od,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Od,preventDefault:!0},{key:"Mod-u",run:pd,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:md,preventDefault:!0}];function Cd(t,e){return et.create(t.ranges.map(e),t.mainIndex)}function Td(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Ad({state:t,dispatch:e},i){let n=Cd(t.selection,i);return!n.eq(t.selection,!0)&&(e(Td(t,n)),!0)}function Rd(t,e){return et.cursor(e?t.to:t.from)}function Md(t,e){return Ad(t,(i=>i.empty?t.moveByChar(i,e):Rd(i,e)))}function Xd(t){return t.textDirectionAt(t.state.selection.main.head)==Ei.LTR}const qd=t=>Md(t,!Xd(t)),Vd=t=>Md(t,Xd(t));function Ed(t,e){return Ad(t,(i=>i.empty?t.moveByGroup(i,e):Rd(i,e)))}const zd=t=>Ed(t,!Xd(t)),Yd=t=>Ed(t,Xd(t));function Ld(t,e,i){if(e.type.prop(i))return!0;let n=e.to-e.from;return n&&(n>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function _d(t,e,i){let n,s,r=zl(t).resolveInner(e.head),o=i?pa.closedBy:pa.openedBy;for(let a=e.head;;){let e=i?r.childAfter(a):r.childBefore(a);if(!e)break;Ld(t,e,o)?r=e:a=i?e.to:e.from}return s=r.type.prop(o)&&(n=i?ic(t,r.from,1):ic(t,r.to,-1))&&n.matched?i?n.end.to:n.end.from:i?r.to:r.from,et.cursor(s,i?-1:1)}const Dd=t=>Ad(t,(e=>_d(t.state,e,!Xd(t)))),jd=t=>Ad(t,(e=>_d(t.state,e,Xd(t))));function Bd(t,e){return Ad(t,(i=>{if(!i.empty)return Rd(i,e);let n=t.moveVertically(i,e);return n.head!=i.head?n:t.moveToLineBoundary(i,e)}))}const Wd=t=>Bd(t,!1),Id=t=>Bd(t,!0);function Gd(t){let e,i=t.scrollDOM.clientHeighti.empty?t.moveVertically(i,e,n.height):Rd(i,e)));if(r.eq(s.selection))return!1;if(n.selfScroll){let e=t.coordsAtPos(s.selection.main.head),o=t.scrollDOM.getBoundingClientRect(),a=o.top+n.marginTop,l=o.bottom-n.marginBottom;e&&e.top>a&&e.bottomUd(t,!1),Hd=t=>Ud(t,!0);function Fd(t,e,i){let n=t.lineBlockAt(e.head),s=t.moveToLineBoundary(e,i);if(s.head==e.head&&s.head!=(i?n.to:n.from)&&(s=t.moveToLineBoundary(e,i,!1)),!i&&s.head==n.from&&n.length){let i=/^\s*/.exec(t.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;i&&e.head!=n.from+i&&(s=et.cursor(n.from+i))}return s}const Kd=t=>Ad(t,(e=>Fd(t,e,!0))),Jd=t=>Ad(t,(e=>Fd(t,e,!1))),tO=t=>Ad(t,(e=>Fd(t,e,!Xd(t)))),eO=t=>Ad(t,(e=>Fd(t,e,Xd(t))));function iO(t,e){let i=Cd(t.state.selection,(t=>{let i=e(t);return et.range(t.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)}));return!i.eq(t.state.selection)&&(t.dispatch(Td(t.state,i)),!0)}function nO(t,e){return iO(t,(i=>t.moveByChar(i,e)))}const sO=t=>nO(t,!Xd(t)),rO=t=>nO(t,Xd(t));function oO(t,e){return iO(t,(i=>t.moveByGroup(i,e)))}const aO=t=>oO(t,!Xd(t)),lO=t=>oO(t,Xd(t)),hO=t=>iO(t,(e=>_d(t.state,e,!Xd(t)))),cO=t=>iO(t,(e=>_d(t.state,e,Xd(t))));function uO(t,e){return iO(t,(i=>t.moveVertically(i,e)))}const fO=t=>uO(t,!1),dO=t=>uO(t,!0);function OO(t,e){return iO(t,(i=>t.moveVertically(i,e,Gd(t).height)))}const pO=t=>OO(t,!1),mO=t=>OO(t,!0),gO=t=>iO(t,(e=>Fd(t,e,!0))),bO=t=>iO(t,(e=>Fd(t,e,!1))),vO=t=>iO(t,(e=>Fd(t,e,!Xd(t)))),wO=t=>iO(t,(e=>Fd(t,e,Xd(t)))),SO=({state:t,dispatch:e})=>(e(Td(t,{anchor:0})),!0),yO=({state:t,dispatch:e})=>(e(Td(t,{anchor:t.doc.length})),!0),xO=({state:t,dispatch:e})=>(e(Td(t,{anchor:t.selection.main.anchor,head:0})),!0),QO=({state:t,dispatch:e})=>(e(Td(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function kO(t,e){if(t.state.readOnly)return!1;let i="delete.selection",{state:n}=t,s=n.changeByRange((n=>{let{from:s,to:r}=n;if(s==r){let o=e(n);os&&(i="delete.forward",o=PO(t,o,!0)),s=Math.min(s,o),r=Math.max(r,o)}else s=PO(t,s,!1),r=PO(t,r,!0);return s==r?{range:n}:{changes:{from:s,to:r},range:et.cursor(s,se(t))))n.between(e,e,((t,n)=>{te&&(e=i?n:t)}));return e}const $O=(t,e,i)=>kO(t,(n=>{let s,r,o=n.from,{state:a}=t,l=a.doc.lineAt(o);if(i&&!e&&o>l.from&&o$O(t,!1,!0),CO=t=>$O(t,!0,!1),TO=(t,e)=>kO(t,(i=>{let n=i.head,{state:s}=t,r=s.doc.lineAt(n),o=s.charCategorizer(n);for(let t=null;;){if(n==(e?r.to:r.from)){n==i.head&&r.number!=(e?s.doc.lines:1)&&(n+=e?1:-1);break}let a=V(r.text,n-r.from,e)+r.from,l=r.text.slice(Math.min(n,a)-r.from,Math.max(n,a)-r.from),h=o(l);if(null!=t&&h!=t)break;" "==l&&n==i.head||(t=h),n=a}return n})),AO=t=>TO(t,!1),RO=t=>TO(t,!0),MO=t=>kO(t,(e=>{let i=t.lineBlockAt(e.head).to;return e.head=s.number){let t=e[e.length-1];t.to=r.to,t.ranges.push(n)}else e.push({from:s.from,to:r.to,ranges:[n]});i=r.number+1}return e}function qO(t,e,i){if(t.readOnly)return!1;let n=[],s=[];for(let r of XO(t)){if(i?r.to==t.doc.length:0==r.from)continue;let e=t.doc.lineAt(i?r.to+1:r.from-1),o=e.length+1;if(i){n.push({from:r.to,to:e.to},{from:r.from,insert:e.text+t.lineBreak});for(let e of r.ranges)s.push(et.range(Math.min(t.doc.length,e.anchor+o),Math.min(t.doc.length,e.head+o)))}else{n.push({from:e.from,to:r.from},{from:r.to,insert:t.lineBreak+e.text});for(let t of r.ranges)s.push(et.range(t.anchor-o,t.head-o))}}return!!n.length&&(e(t.update({changes:n,scrollIntoView:!0,selection:et.create(s,t.selection.mainIndex),userEvent:"move.line"})),!0)}function VO(t,e,i){if(t.readOnly)return!1;let n=[];for(let s of XO(t))i?n.push({from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}):n.push({from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)});return e(t.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const EO=zO(!1);function zO(t){return({state:e,dispatch:i})=>{if(e.readOnly)return!1;let n=e.changeByRange((i=>{let{from:n,to:s}=i,r=e.doc.lineAt(n),o=!t&&n==s&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let i,n=zl(t).resolveInner(e),s=n.childBefore(e),r=n.childAfter(e);return s&&r&&s.to<=e&&r.from>=e&&(i=s.type.prop(pa.closedBy))&&i.indexOf(r.name)>-1&&t.doc.lineAt(s.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(s.to,r.from))?{from:s.to,to:r.from}:null}(e,n);t&&(n=s=(s<=r.to?r:e.doc.lineAt(s)).to);let a=new ih(e,{simulateBreak:n,simulateDoubleBreak:!!o}),l=th(a,n);for(null==l&&(l=ce(/^\s*/.exec(e.doc.lineAt(n).text)[0],e.tabSize));sr.from&&n{let s=[];for(let o=n.from;o<=n.to;){let r=t.doc.lineAt(o);r.number>i&&(n.empty||n.to>r.from)&&(e(r,s,n),i=r.number),o=r.to+1}let r=t.changes(s);return{changes:s,range:et.range(r.mapPos(n.anchor,1),r.mapPos(n.head,1))}}))}const LO=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=Object.create(null),n=new ih(t,{overrideIndentation:t=>{let e=i[t];return null==e?-1:e}}),s=YO(t,((e,s,r)=>{let o=th(n,e.from);if(null==o)return;/\S/.test(e.text)||(o=0);let a=/^\s*/.exec(e.text)[0],l=Jl(t,o);(a!=l||r.from!t.readOnly&&(e(t.update(YO(t,((e,i)=>{i.push({from:e.from,insert:t.facet(Fl)})})),{userEvent:"input.indent"})),!0),DO=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(YO(t,((e,i)=>{let n=/^\s*/.exec(e.text)[0];if(!n)return;let s=ce(n,t.tabSize),r=0,o=Jl(t,Math.max(0,s-Kl(t)));for(;rqO(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>VO(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>qO(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>VO(t,e,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let i=t.selection,n=null;return i.ranges.length>1?n=et.create([i.main]):i.main.empty||(n=et.create([et.cursor(i.main.head)])),!!n&&(e(Td(t,n)),!0)}},{key:"Mod-Enter",run:zO(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let i=XO(t).map((({from:e,to:i})=>et.range(e,Math.min(i+1,t.doc.length))));return e(t.update({selection:et.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let i=Cd(t.selection,(e=>{let i=zl(t),n=i.resolveStack(e.from,1);if(e.empty){let t=i.resolveStack(e.from,-1);t.node.from>=n.node.from&&t.node.to<=n.node.to&&(n=t)}for(let t=n;t;t=t.next){let{node:i}=t;if((i.from=e.to||i.to>e.to&&i.from<=e.from)&&t.next)return et.range(i.to,i.from)}return e}));return!i.eq(t.selection)&&(e(Td(t,i)),!0)},preventDefault:!0},{key:"Mod-[",run:DO},{key:"Mod-]",run:_O},{key:"Mod-Alt-\\",run:LO},{key:"Shift-Mod-k",run:t=>{if(t.state.readOnly)return!1;let{state:e}=t,i=e.changes(XO(e).map((({from:t,to:i})=>(t>0?t--:i{let i;if(t.lineWrapping){let n=t.lineBlockAt(e.head),s=t.coordsAtPos(e.head,e.assoc||1);s&&(i=n.bottom+t.documentTop-s.bottom+t.defaultLineHeight/2)}return t.moveVertically(e,!0,i)})).map(i);return t.dispatch({changes:i,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>function(t,e){let i=!1,n=Cd(t.selection,(e=>{let n=ic(t,e.head,-1)||ic(t,e.head,1)||e.head>0&&ic(t,e.head-1,1)||e.head{let{state:e}=t,i=e.doc.lineAt(e.selection.main.from),n=id(t.state,i.from);return n.line?Jf(t):!!n.block&&ed(t)}},{key:"Alt-A",run:td},{key:"Ctrl-m",mac:"Shift-Alt-m",run:t=>(t.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:qd,shift:sO,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:zd,shift:aO,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:tO,shift:vO,preventDefault:!0},{key:"ArrowRight",run:Vd,shift:rO,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Yd,shift:lO,preventDefault:!0},{mac:"Cmd-ArrowRight",run:eO,shift:wO,preventDefault:!0},{key:"ArrowUp",run:Wd,shift:fO,preventDefault:!0},{mac:"Cmd-ArrowUp",run:SO,shift:xO},{mac:"Ctrl-ArrowUp",run:Nd,shift:pO},{key:"ArrowDown",run:Id,shift:dO,preventDefault:!0},{mac:"Cmd-ArrowDown",run:yO,shift:QO},{mac:"Ctrl-ArrowDown",run:Hd,shift:mO},{key:"PageUp",run:Nd,shift:pO},{key:"PageDown",run:Hd,shift:mO},{key:"Home",run:Jd,shift:bO,preventDefault:!0},{key:"Mod-Home",run:SO,shift:xO},{key:"End",run:Kd,shift:gO,preventDefault:!0},{key:"Mod-End",run:yO,shift:QO},{key:"Enter",run:EO,shift:EO},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:ZO,shift:ZO},{key:"Delete",run:CO},{key:"Mod-Backspace",mac:"Alt-Backspace",run:AO},{key:"Mod-Delete",mac:"Alt-Delete",run:RO},{mac:"Mod-Backspace",run:t=>kO(t,(e=>{let i=t.moveToLineBoundary(e,!1).head;return e.head>i?i:Math.max(0,e.head-1)}))},{mac:"Mod-Delete",run:t=>kO(t,(e=>{let i=t.moveToLineBoundary(e,!0).head;return e.headAd(t,(e=>et.cursor(t.lineBlockAt(e.head).from,1))),shift:t=>iO(t,(e=>et.cursor(t.lineBlockAt(e.head).from)))},{key:"Ctrl-e",run:t=>Ad(t,(e=>et.cursor(t.lineBlockAt(e.head).to,-1))),shift:t=>iO(t,(e=>et.cursor(t.lineBlockAt(e.head).to)))},{key:"Ctrl-d",run:CO},{key:"Ctrl-h",run:ZO},{key:"Ctrl-k",run:MO},{key:"Ctrl-Alt-h",run:AO},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:x.of(["",""])},range:et.cursor(t.from)})));return e(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let i=e.from,n=t.doc.lineAt(i),s=i==n.from?i-1:V(n.text,i-n.from,!1)+n.from,r=i==n.to?i+1:V(n.text,i-n.from,!0)+n.from;return{changes:{from:s,to:r,insert:t.doc.slice(i,r).append(t.doc.slice(s,i))},range:et.cursor(r)}}));return!i.changes.empty&&(e(t.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:Hd}].map((t=>({mac:t.key,run:t.run,shift:t.shift}))))),BO={key:"Tab",run:_O,shift:DO};class WO{constructor(t,e,i){this.from=t,this.to=e,this.diagnostic=i}}class IO{constructor(t,e,i){this.diagnostics=t,this.panel=e,this.selected=i}static init(t,e,i){let n=t,s=i.facet(np).markerFilter;s&&(n=s(n,i));let r=ki.set(n.map((t=>t.from==t.to||t.from==t.to-1&&i.doc.lineAt(t.from).to==t.from?ki.widget({widget:new op(t),diagnostic:t}).range(t.from):ki.mark({attributes:{class:"cm-lintRange cm-lintRange-"+t.severity+(t.markClass?" "+t.markClass:"")},diagnostic:t}).range(t.from,t.to))),!0);return new IO(r,e,GO(r))}}function GO(t,e=null,i=0){let n=null;return t.between(i,1e9,((t,i,{spec:s})=>{if(!e||s.diagnostic==e)return n=new WO(t,i,s.diagnostic),!1})),n}const UO=Xt.define(),NO=Xt.define(),HO=Xt.define(),FO=ut.define({create:()=>new IO(ki.none,null,null),update(t,e){if(e.docChanged&&t.diagnostics.size){let i=t.diagnostics.map(e.changes),n=null,s=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);n=GO(i,t.selected.diagnostic,s)||GO(i,null,s)}!i.size&&s&&e.state.facet(np).autoPanel&&(s=null),t=new IO(i,s,n)}for(let i of e.effects)if(i.is(UO)){let n=e.state.facet(np).autoPanel?i.value.length?lp.open:null:t.panel;t=IO.init(i.value,n,e.state)}else i.is(NO)?t=new IO(t.diagnostics,i.value?lp.open:null,t.selected):i.is(HO)&&(t=new IO(t.diagnostics,t.panel,i.value));return t},provide:t=>[Do.from(t,(t=>t.panel)),Sr.decorations.from(t,(t=>t.diagnostics))]}),KO=ki.mark({class:"cm-lintRange cm-lintRange-active"});function JO(t,e,i){let{diagnostics:n}=t.state.field(FO),s=[],r=2e8,o=0;n.between(e-(i<0?1:0),e+(i>0?1:0),((t,n,{spec:a})=>{e>=t&&e<=n&&(t==n||(e>t||i>0)&&(e({dom:tp(t,s)})}:null}function tp(t,e){return Gu("ul",{class:"cm-tooltip-lint"},e.map((e=>rp(t,e,!1))))}const ep=t=>{let e=t.state.field(FO,!1);return!(!e||!e.panel)&&(t.dispatch({effects:NO.of(!1)}),!0)},ip=[{key:"Mod-Shift-m",run:t=>{let e=t.state.field(FO,!1);var i,n;e&&e.panel||t.dispatch({effects:(i=t.state,n=[NO.of(!0)],i.field(FO,!1)?n:n.concat(Xt.appendConfig.of(up)))});let s=zo(t,lp.open);return s&&s.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field(FO,!1);if(!e)return!1;let i=t.state.selection.main,n=e.diagnostics.iter(i.to+1);return!(!n.value&&(n=e.diagnostics.iter(0),!n.value||n.from==i.from&&n.to==i.to))&&(t.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),!0)}}],np=st.define({combine:t=>Object.assign({sources:t.map((t=>t.source)).filter((t=>null!=t))},Gt(t.map((t=>t.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(t,e)=>t?e?i=>t(i)||e(i):t:e}))});function sp(t){let e=[];if(t)t:for(let{name:i}of t){for(let t=0;tt.toLowerCase()==n.toLowerCase()))){e.push(n);continue t}}e.push("")}return e}function rp(t,e,i){var n;let s=i?sp(e.actions):[];return Gu("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Gu("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),null===(n=e.actions)||void 0===n?void 0:n.map(((i,n)=>{let r=!1,o=n=>{if(n.preventDefault(),r)return;r=!0;let s=GO(t.state.field(FO).diagnostics,e);s&&i.apply(t,s.from,s.to)},{name:a}=i,l=s[n]?a.indexOf(s[n]):-1,h=l<0?a:[a.slice(0,l),Gu("u",a.slice(l,l+1)),a.slice(l+1)];return Gu("button",{type:"button",class:"cm-diagnosticAction",onclick:o,onmousedown:o,"aria-label":` Action: ${a}${l<0?"":` (access key "${s[n]})"`}.`},h)})),e.source&&Gu("div",{class:"cm-diagnosticSource"},e.source))}class op extends xi{constructor(t){super(),this.diagnostic=t}eq(t){return t.diagnostic==this.diagnostic}toDOM(){return Gu("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class ap{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=rp(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class lp{constructor(t){this.view=t,this.items=[];this.list=Gu("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:e=>{if(27==e.keyCode)ep(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:i}=this.items[this.selectedIndex],n=sp(i.actions);for(let s=0;s{for(let e=0;eep(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(FO).selected;if(!t)return-1;for(let e=0;e{let a,l=-1;for(let e=i;ei&&(this.items.splice(i,l-i),n=!0)),e&&a.diagnostic==e.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),s=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),i++}));i({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{let i=e.height/this.list.offsetHeight;t.tope.bottom&&(this.list.scrollTop+=(t.bottom-e.bottom)/i)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),n&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;t!=i.dom;)e();t=i.dom.nextSibling}else this.list.insertBefore(i.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=GO(this.view.state.field(FO).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:HO.of(e)})}static open(t){return new lp(t)}}function hp(t){return function(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}(``,'width="6" height="3"')}const cp=Sr.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:hp("#d11")},".cm-lintRange-warning":{backgroundImage:hp("orange")},".cm-lintRange-info":{backgroundImage:hp("#999")},".cm-lintRange-hint":{backgroundImage:hp("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),up=[FO,Sr.decorations.compute([FO],(t=>{let{selected:e,panel:i}=t.field(FO);return e&&i&&e.from!=e.to?ki.set([KO.range(e.from,e.to)]):ki.none})),Xo(JO,{hideOn:function(t,e){let i=e.pos,n=e.end||i,s=t.state.facet(np).hideOn(t,i,n);if(null!=s)return s;let r=t.startState.doc.lineAt(e.pos);return!(!t.effects.some((t=>t.is(UO)))&&!t.changes.touchesRange(r.from,Math.max(r.to,n)))}}),cp];var fp={};class dp{constructor(t,e,i,n,s,r,o,a,l,h=0,c){this.p=t,this.stack=e,this.state=i,this.reducePos=n,this.pos=s,this.score=r,this.buffer=o,this.bufferBase=a,this.curContext=l,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter(((t,e)=>e%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,i=0){let n=t.parser.context;return new dp(t,[],e,i,i,0,[],0,n?new Op(n,n.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let i=t>>19,n=65535&t,{parser:s}=this.p,r=this.reducePos=2e3&&!(null===(e=this.p.parser.nodeSet.types[n])||void 0===e?void 0:e.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=h):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(n,l)}storeNode(t,e,i,n=4,s=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==t.buffer[n-4]&&t.buffer[n-1]>-1){if(e==i)return;if(t.buffer[n-2]>=e)return void(t.buffer[n-2]=i)}}if(s&&this.pos!=i){let s=this.buffer.length;if(s>0&&0!=this.buffer[s-4]){let t=!1;for(let e=s;e>0&&this.buffer[e-2]>i;e-=4)if(this.buffer[e-1]>=0){t=!0;break}if(t)for(;s>0&&this.buffer[s-2]>i;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,n>4&&(n-=4)}this.buffer[s]=t,this.buffer[s+1]=e,this.buffer[s+2]=i,this.buffer[s+3]=n}else this.buffer.push(t,e,i,n)}shift(t,e,i,n){if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=n,this.shiftContext(e,i),e<=this.p.parser.maxNode&&this.buffer.push(e,i,n,4);else{let s=t,{parser:r}=this.p;(n>this.pos||e<=r.maxNode)&&(this.pos=n,r.stateFlag(s,1)||(this.reducePos=n)),this.pushState(s,i),this.shiftContext(e,i),e<=r.maxNode&&this.buffer.push(e,i,n,4)}}apply(t,e,i,n){65536&t?this.reduce(t):this.shift(t,e,i,n)}useNode(t,e){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=t)&&(this.p.reused.push(t),i++);let n=this.pos;this.reducePos=this.pos=n+t.length,this.pushState(e,n),this.buffer.push(i,n,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let i=t.buffer.slice(e),n=t.bufferBase+e;for(;t&&n==t.bufferBase;)t=t.parent;return new dp(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,n,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let i=t<=this.p.parser.maxNode;i&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new pp(this);;){let i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==i)return!1;if(!(65536&i))return!0;e.reduce(i)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let n,s=0;s1&e&&t==n))||i.push(e[t],n)}e=i}let i=[];for(let n=0;n>19,n=65535&e,s=this.stack.length-3*i;if(s<0||t.getGoto(this.stack[s],n,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],i=(n,s)=>{if(!e.includes(n))return e.push(n),t.allActions(n,(e=>{if(393216&e);else if(65536&e){let i=(e>>19)-s;if(i>1){let n=65535&e,s=this.stack.length-3*i;if(s>=0&&t.getGoto(this.stack[s],n,!1)>=0)return i<<19|65536|n}}else{let t=i(e,s+1);if(null!=t)return t}}))};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Op{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class pp{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,i=t>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);let n=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=n}}class mp{constructor(t,e,i){this.stack=t,this.pos=e,this.index=i,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new mp(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new mp(this.stack,this.pos,this.index)}}function gp(t,e=Uint16Array){if("string"!=typeof t)return t;let i=null;for(let n=0,s=0;n=92&&e--,e>=34&&e--;let s=e-32;if(s>=46&&(s-=46,i=!0),r+=s,i)break;r*=46}i?i[s++]=r:i=new e(r)}return i}class bp{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const vp=new bp;class wp{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=vp,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let i=this.range,n=this.rangeIndex,s=this.pos+t;for(;si.to:s>=i.to;){if(n==this.ranges.length-1)return null;let t=this.ranges[++n];s+=t.from-i.to,i=t}return s}clipPos(t){if(t>=this.range.from&&tt)return Math.max(t,e.from);return this.end}peek(t){let e,i,n=this.chunkOff+t;if(n>=0&&n=this.chunk2Pos&&en.to&&(this.chunk2=this.chunk2.slice(0,n.to-e)),i=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),i}acceptToken(t,e=0){let i=e?this.resolveOffset(e,-1):this.pos;if(null==i||i=this.chunk2Pos&&this.posthis.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=vp,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let i="";for(let n of this.ranges){if(n.from>=e)break;n.to>t&&(i+=this.input.read(Math.max(n.from,t),Math.min(n.to,e)))}return i}}class Sp{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:i}=e.p;Qp(this.data,t,e,this.id,i.data,i.tokenPrecTable)}}Sp.prototype.contextual=Sp.prototype.fallback=Sp.prototype.extend=!1;class yp{constructor(t,e,i){this.precTable=e,this.elseToken=i,this.data="string"==typeof t?gp(t):t}token(t,e){let i=t.pos,n=0;for(;;){let i=t.next<0,s=t.resolveOffset(1,1);if(Qp(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(null==this.elseToken)return;if(i||n++,null==s)break;t.reset(s,t.token)}n&&(t.reset(i,t.token),t.acceptToken(this.elseToken,n))}}yp.prototype.contextual=Sp.prototype.fallback=Sp.prototype.extend=!1;class xp{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function Qp(t,e,i,n,s,r){let o=0,a=1<0){let i=t[u];if(l.allows(i)&&(-1==e.token.value||e.token.value==i||Pp(i,e.token.value,s,r))){e.acceptToken(i);break}}let n=e.next,h=0,c=t[o+2];if(!(e.next<0&&c>h&&65535==t[i+3*c-3])){for(;h>1,r=i+s+(s<<1),a=t[r],l=t[r+1]||65536;if(n=l)){o=t[r+2],e.advance();continue t}h=s+1}}break}o=t[i+3*c-1]}}function kp(t,e,i){for(let n,s=e;65535!=(n=t[s]);s++)if(n==i)return s-e;return-1}function Pp(t,e,i,n){let s=kp(i,n,e);return s<0||kp(i,n,t)e)&&!n.type.isError)return i<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(t.length,Math.max(n.from+1,e+25));if(i<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return i<0?0:t.length}}let Tp=class{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?Cp(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?Cp(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(tt)return this.nextStart=r,null;if(s instanceof xa){if(r==t){if(r=Math.max(this.safeFrom,t)&&(this.trees.push(s),this.start.push(r),this.index.push(0))}else this.index[e]++,this.nextStart=r+s.length}}};class Ap{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map((t=>new bp))}getActions(t){let e=0,i=null,{parser:n}=t.p,{tokenizers:s}=n,r=n.stateSlot(t.state,3),o=t.curContext?t.curContext.hash:0,a=0;for(let l=0;lh.end+25&&(a=Math.max(h.lookAhead,a)),0!=h.value)){let s=e;if(h.extended>-1&&(e=this.addActions(t,h.extended,h.end,e)),e=this.addActions(t,h.value,h.end,e),!n.extend&&(i=h,e>s))break}}for(;this.actions.length>e;)this.actions.pop();return a&&t.setLookAhead(a),i||t.pos!=this.stream.end||(i=new bp,i.value=t.p.parser.eofTerm,i.start=i.end=t.pos,e=this.addActions(t,i.value,i.end,e)),this.mainToken=i,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new bp,{pos:i,p:n}=t;return e.start=i,e.end=Math.min(i+1,n.stream.end),e.value=i==n.stream.end?n.parser.eofTerm:0,e}updateCachedToken(t,e,i){let n=this.stream.clipPos(i.pos);if(e.token(this.stream.reset(n,t),i),t.value>-1){let{parser:e}=i.p;for(let n=0;n=0&&i.p.parser.dialect.allows(s>>1)){1&s?t.extended=s>>1:t.value=s>>1;break}}}else t.value=0,t.end=this.stream.clipPos(n+1)}putAction(t,e,i,n){for(let s=0;s4*t.bufferLength?new Tp(i,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,i=this.stacks,n=this.minStackPos,s=this.stacks=[];if(this.bigReductionCount>300&&1==i.length){let[t]=i;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;rn)s.push(o);else{if(this.advanceStack(o,s,i))continue;{t||(t=[],e=[]),t.push(o);let i=this.tokens.getMainToken(o);e.push(i.value,i.end)}}break}}if(!s.length){let e=t&&function(t){let e=null;for(let i of t){let t=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=t&&i.pos>t)&&i.p.parser.stateFlag(i.state,2)&&(!e||e.scorethis.stoppedAt?t[0]:this.runRecovery(t,e,s);if(i)return $p&&console.log("Force-finish "+this.stackID(i)),this.stackToTree(i.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(s.length>t)for(s.sort(((t,e)=>e.score-t.score));s.length>t;)s.pop();s.some((t=>t.reducePos>n))&&this.recovering--}else if(s.length>1){t:for(let t=0;t500&&n.buffer.length>500){if(!((e.score-n.score||e.buffer.length-n.buffer.length)>0)){s.splice(t--,1);continue t}s.splice(i--,1)}}}s.length>12&&s.splice(12,s.length-12)}this.minStackPos=s[0].pos;for(let r=1;r ":"";if(null!=this.stoppedAt&&n>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,i=e?t.curContext.hash:0;for(let o=this.fragments.nodeAt(n);o;){let n=this.parser.nodeSet.types[o.type.id]==o.type?s.getGoto(t.state,o.type.id):-1;if(n>-1&&o.length&&(!e||(o.prop(pa.contextHash)||0)==i))return t.useNode(o,n),$p&&console.log(r+this.stackID(t)+` (via reuse of ${s.getName(o.type.id)})`),!0;if(!(o instanceof xa)||0==o.children.length||o.positions[0]>0)break;let a=o.children[0];if(!(a instanceof xa&&0==o.positions[0]))break;o=a}}let o=s.stateSlot(t.state,4);if(o>0)return t.reduce(o),$p&&console.log(r+this.stackID(t)+` (via always-reduce ${s.getName(65535&o)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let a=this.tokens.getActions(t);for(let l=0;ln?e.push(f):i.push(f)}return!1}advanceFully(t,e){let i=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>i)return Mp(t,e),!0}}runRecovery(t,e,i){let n=null,s=!1;for(let r=0;r ":"";if(o.deadEnd){if(s)continue;if(s=!0,o.restart(),$p&&console.log(h+this.stackID(o)+" (restarted)"),this.advanceFully(o,i))continue}let c=o.split(),u=h;for(let t=0;c.forceReduce()&&t<10;t++){if($p&&console.log(u+this.stackID(c)+" (via force-reduce)"),this.advanceFully(c,i))break;$p&&(u=this.stackID(c)+" -> ")}for(let t of o.recoverByInsert(a))$p&&console.log(h+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,i);this.stream.end>o.pos?(l==o.pos&&(l++,a=0),o.recoverByDelete(a,l),$p&&console.log(h+this.stackID(o)+` (via recover-delete ${this.parser.getName(a)})`),Mp(o,i)):(!n||n.scoret;class Vp{constructor(t){this.start=t.start,this.shift=t.shift||qp,this.reduce=t.reduce||qp,this.reuse=t.reuse||qp,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class Ep extends ja{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let o=0;ot.topRules[e][1])),n=[];for(let o=0;o=0)s(i,t,o[e++]);else{let n=o[e+-i];for(let r=-i;r>0;r--)s(o[e++],t,n);e++}}}this.nodeSet=new va(e.map(((e,s)=>ba.define({name:s>=this.minRepeatTerm?void 0:e,id:s,props:n[s],top:i.indexOf(s)>-1,error:0==s,skipped:t.skippedNodes&&t.skippedNodes.indexOf(s)>-1})))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=fa;let r=gp(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;o"number"==typeof t?new Sp(r,t):t)),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,i){let n=new Rp(this,t,e,i);for(let s of this.wrappers)n=s(n,t,e,i);return n}getGoto(t,e,i=!1){let n=this.goto;if(e>=n[0])return-1;for(let s=n[e+1];;){let e=n[s++],r=1&e,o=n[s++];if(r&&i)return o;for(let i=s+(e>>1);s0}validAction(t,e){return!!this.allActions(t,(t=>t==e||null))}allActions(t,e){let i=this.stateSlot(t,4),n=i?e(i):void 0;for(let s=this.stateSlot(t,1);null==n;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=zp(this.data,s+2)}n=e(zp(this.data,s+1))}return n}nextStates(t){let e=[];for(let i=this.stateSlot(t,1);;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=zp(this.data,i+2)}if(!(1&this.data[i+2])){let t=this.data[i+1];e.some(((e,i)=>1&i&&e==t))||e.push(this.data[i],t)}}return e}configure(t){let e=Object.assign(Object.create(Ep.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let i=this.topRules[t.top];if(!i)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=i}return t.tokenizers&&(e.tokenizers=this.tokenizers.map((e=>{let i=t.tokenizers.find((t=>t.from==e));return i?i.to:e}))),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map(((i,n)=>{let s=t.specializers.find((t=>t.from==i.external));if(!s)return i;let r=Object.assign(Object.assign({},i),{external:s.to});return e.specializers[n]=Yp(r),r}))),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),i=e.map((()=>!1));if(t)for(let s of t.split(" ")){let t=e.indexOf(s);t>=0&&(i[t]=!0)}let n=null;for(let s=0;st.external(i,n)<<1|e}return t.get}const Lp=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],_p=new Vp({start:!1,shift:(t,e)=>5==e||6==e||316==e?t:317==e,strict:!1}),Dp=new xp(((t,e)=>{let{next:i}=t;(125==i||-1==i||e.context)&&t.acceptToken(314)}),{contextual:!0,fallback:!0}),jp=new xp(((t,e)=>{let i,{next:n}=t;Lp.indexOf(n)>-1||(47!=n||47!=(i=t.peek(1))&&42!=i)&&(125==n||59==n||-1==n||e.context||t.acceptToken(312))}),{contextual:!0}),Bp=new xp(((t,e)=>{91!=t.next||e.context||t.acceptToken(313)}),{contextual:!0}),Wp=new xp(((t,e)=>{let{next:i}=t;if(43==i||45==i){if(t.advance(),i==t.next){t.advance();let i=!e.context&&e.canShift(1);t.acceptToken(i?1:2)}}else 63==i&&46==t.peek(1)&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(3))}),{contextual:!0});function Ip(t,e){return t>=65&&t<=90||t>=97&&t<=122||95==t||t>=192||!e&&t>=48&&t<=57}const Gp=new xp(((t,e)=>{if(60!=t.next||!e.dialectEnabled(0))return;if(t.advance(),47==t.next)return;let i=0;for(;Lp.indexOf(t.next)>-1;)t.advance(),i++;if(Ip(t.next,!0)){for(t.advance(),i++;Ip(t.next,!1);)t.advance(),i++;for(;Lp.indexOf(t.next)>-1;)t.advance(),i++;if(44==t.next)return;for(let e=0;;e++){if(7==e){if(!Ip(t.next,!0))return;break}if(t.next!="extends".charCodeAt(e))break;t.advance(),i++}}t.acceptToken(4,-i)})),Up=hl({"get set async static":Tl.modifier,"for while do if else switch try catch finally return throw break continue default case":Tl.controlKeyword,"in of await yield void typeof delete instanceof":Tl.operatorKeyword,"let var const using function class extends":Tl.definitionKeyword,"import export from":Tl.moduleKeyword,"with debugger as new":Tl.keyword,TemplateString:Tl.special(Tl.string),super:Tl.atom,BooleanLiteral:Tl.bool,this:Tl.self,null:Tl.null,Star:Tl.modifier,VariableName:Tl.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Tl.function(Tl.variableName),VariableDefinition:Tl.definition(Tl.variableName),Label:Tl.labelName,PropertyName:Tl.propertyName,PrivatePropertyName:Tl.special(Tl.propertyName),"CallExpression/MemberExpression/PropertyName":Tl.function(Tl.propertyName),"FunctionDeclaration/VariableDefinition":Tl.function(Tl.definition(Tl.variableName)),"ClassDeclaration/VariableDefinition":Tl.definition(Tl.className),PropertyDefinition:Tl.definition(Tl.propertyName),PrivatePropertyDefinition:Tl.definition(Tl.special(Tl.propertyName)),UpdateOp:Tl.updateOperator,"LineComment Hashbang":Tl.lineComment,BlockComment:Tl.blockComment,Number:Tl.number,String:Tl.string,Escape:Tl.escape,ArithOp:Tl.arithmeticOperator,LogicOp:Tl.logicOperator,BitOp:Tl.bitwiseOperator,CompareOp:Tl.compareOperator,RegExp:Tl.regexp,Equals:Tl.definitionOperator,Arrow:Tl.function(Tl.punctuation),": Spread":Tl.punctuation,"( )":Tl.paren,"[ ]":Tl.squareBracket,"{ }":Tl.brace,"InterpolationStart InterpolationEnd":Tl.special(Tl.brace),".":Tl.derefOperator,", ;":Tl.separator,"@":Tl.meta,TypeName:Tl.typeName,TypeDefinition:Tl.definition(Tl.typeName),"type enum interface implements namespace module declare":Tl.definitionKeyword,"abstract global Privacy readonly override":Tl.modifier,"is keyof unique infer":Tl.operatorKeyword,JSXAttributeValue:Tl.attributeValue,JSXText:Tl.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Tl.angleBracket,"JSXIdentifier JSXNameSpacedName":Tl.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Tl.attributeName,"JSXBuiltin/JSXIdentifier":Tl.standard(Tl.tagName)}),Np={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},Hp={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},Fp={__proto__:null,"<":187},Kp=Ep.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO'#JoO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#FzO9RQ`O'#FyOOQ!0Lf'#Jo'#JoOOQ!0Lb'#Jn'#JnO9WQ`O'#GtOOQ['#K['#K[O9cQ`O'#IUO9hQ!0LrO'#IVOOQ['#J['#J[OOQ['#IZ'#IZQ`QlOOQ`QlOOO9pQ!L^O'#DsO9wQlO'#D{O:OQlO'#D}O9^Q`O'#GpO:VQMhO'#CoO:eQ`O'#EkO:pQ`O'#EvO:uQMhO'#FdO;dQ`O'#GpOOQO'#K]'#K]O;iQ`O'#K]O;wQ`O'#GxO;wQ`O'#GyO;wQ`O'#G{O9^Q`O'#HOOVQ`O'#CeO>gQ`O'#H_O>oQ`O'#HeO>oQ`O'#HgO`QlO'#HiO>oQ`O'#HkO>oQ`O'#HnO>tQ`O'#HtO>yQ!0LsO'#HzO%[QlO'#H|O?UQ!0LsO'#IOO?aQ!0LsO'#IQO9hQ!0LrO'#ISO?lQ!0MxO'#CiO@nQpO'#DiQOQ`OOO%[QlO'#D}OAUQ`O'#EQO:VQMhO'#EkOAaQ`O'#EkOAlQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Dn'#DnOOQ!0Lb'#Jr'#JrO%[QlO'#JrOOQO'#Ju'#JuOOQO'#Id'#IdOBlQpO'#EdOOQ!0Lb'#Ec'#EcOOQ!0Lb'#Jy'#JyOChQ!0MSO'#EdOCrQpO'#ETOOQO'#Jt'#JtODWQpO'#JuOEeQpO'#ETOCrQpO'#EdPErO&2DjO'#CbPOOO)CDy)CDyOOOO'#I['#I[OE}O#tO,59UOOQ!0Lh,59U,59UOOOO'#I]'#I]OF]O&jO,59UOFkQ!L^O'#D`OOOO'#I_'#I_OFrO#@ItO,59xOOQ!0Lf,59x,59xOGQQlO'#I`OGeQ`O'#JpOIdQ!fO'#JpO+}QlO'#JpOIkQ`O,5:OOJRQ`O'#EmOJ`Q`O'#KPOJkQ`O'#KOOJkQ`O'#KOOJsQ`O,5;ZOJxQ`O'#J}OOQ!0Ln,5:Z,5:ZOKPQlO,5:ZOL}Q!0MxO,5:cOMnQ`O,5:kONXQ!0LrO'#J|ON`Q`O'#J{O9WQ`O'#J{ONtQ`O'#J{ON|Q`O,5;YO! RQ`O'#J{O!#WQ!fO'#JoOOQ!0Lh'#Ci'#CiO%[QlO'#EPO!#vQ!fO,5:pOOQS'#Jv'#JvOOQO-EpOOQ['#Jd'#JdOOQ[,5>q,5>qOOQ[-E[Q!0MxO,5:gO%[QlO,5:gO!@rQ!0MxO,5:iOOQO,5@w,5@wO!AcQMhO,5=[O!AqQ!0LrO'#JeO9RQ`O'#JeO!BSQ!0LrO,59ZO!B_QpO,59ZO!BgQMhO,59ZO:VQMhO,59ZO!BrQ`O,5;WO!BzQ`O'#H^O!C`Q`O'#KaO%[QlO,5;|O!9fQpO,5tQ`O'#HTO9^Q`O'#HVO!DwQ`O'#HVO:VQMhO'#HXO!D|Q`O'#HXOOQ[,5=m,5=mO!ERQ`O'#HYO!EdQ`O'#CoO!EiQ`O,59PO!EsQ`O,59PO!GxQlO,59POOQ[,59P,59PO!HYQ!0LrO,59PO%[QlO,59PO!JeQlO'#HaOOQ['#Hb'#HbOOQ['#Hc'#HcO`QlO,5=yO!J{Q`O,5=yO`QlO,5>PO`QlO,5>RO!KQQ`O,5>TO`QlO,5>VO!KVQ`O,5>YO!K[QlO,5>`OOQ[,5>f,5>fO%[QlO,5>fO9hQ!0LrO,5>hOOQ[,5>j,5>jO# fQ`O,5>jOOQ[,5>l,5>lO# fQ`O,5>lOOQ[,5>n,5>nO#!SQpO'#D[O%[QlO'#JrO#!uQpO'#JrO##PQpO'#DjO##bQpO'#DjO#%sQlO'#DjO#%zQ`O'#JqO#&SQ`O,5:TO#&XQ`O'#EqO#&gQ`O'#KQO#&oQ`O,5;[O#&tQpO'#DjO#'RQpO'#ESOOQ!0Lf,5:l,5:lO%[QlO,5:lO#'YQ`O,5:lO>tQ`O,5;VO!B_QpO,5;VO!BgQMhO,5;VO:VQMhO,5;VO#'bQ`O,5@^O#'gQ07dO,5:pOOQO-EzO+}QlO,5>zOOQO,5?Q,5?QO#*oQlO'#I`OOQO-E<^-E<^O#*|Q`O,5@[O#+UQ!fO,5@[O#+]Q`O,5@jOOQ!0Lf1G/j1G/jO%[QlO,5@kO#+eQ`O'#IfOOQO-EoQ`O1G3oO$4WQlO1G3qO$8[QlO'#HpOOQ[1G3t1G3tO$8iQ`O'#HvO>tQ`O'#HxOOQ[1G3z1G3zO$8qQlO1G3zO9hQ!0LrO1G4QOOQ[1G4S1G4SOOQ!0Lb'#G]'#G]O9hQ!0LrO1G4UO9hQ!0LrO1G4WO$tQ`O,5:UO!(vQlO,5:UO!B_QpO,5:UO$<}Q?MtO,5:UOOQO,5;],5;]O$=XQpO'#IaO$=oQ`O,5@]OOQ!0Lf1G/o1G/oO$=wQpO'#IgO$>RQ`O,5@lOOQ!0Lb1G0v1G0vO##bQpO,5:UOOQO'#Ic'#IcO$>ZQpO,5:nOOQ!0Ln,5:n,5:nO#']Q`O1G0WOOQ!0Lf1G0W1G0WO%[QlO1G0WOOQ!0Lf1G0q1G0qO>tQ`O1G0qO!B_QpO1G0qO!BgQMhO1G0qOOQ!0Lb1G5x1G5xO!BSQ!0LrO1G0ZOOQO1G0j1G0jO%[QlO1G0jO$>bQ!0LrO1G0jO$>mQ!0LrO1G0jO!B_QpO1G0ZOCrQpO1G0ZO$>{Q!0LrO1G0jOOQO1G0Z1G0ZO$?aQ!0MxO1G0jPOOO-EzO$?}Q`O1G5vO$@VQ`O1G6UO$@_Q!fO1G6VO9WQ`O,5?QO$@iQ!0MxO1G6SO%[QlO1G6SO$@yQ!0LrO1G6SO$A[Q`O1G6RO$A[Q`O1G6RO9WQ`O1G6RO$AdQ`O,5?TO9WQ`O,5?TOOQO,5?T,5?TO$AxQ`O,5?TO$)QQ`O,5?TOOQO-E[OOQ[,5>[,5>[O%[QlO'#HqO%<{Q`O'#HsOOQ[,5>b,5>bO9WQ`O,5>bOOQ[,5>d,5>dOOQ[7+)f7+)fOOQ[7+)l7+)lOOQ[7+)p7+)pOOQ[7+)r7+)rO%=QQpO1G5xO%=lQ?MtO1G0wO%=vQ`O1G0wOOQO1G/p1G/pO%>RQ?MtO1G/pO>tQ`O1G/pO!(vQlO'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQ`O7+&]O!B_QpO7+&]OOQO7+%u7+%uO$?aQ!0MxO7+&UOOQO7+&U7+&UO%[QlO7+&UO%>]Q!0LrO7+&UO!BSQ!0LrO7+%uO!B_QpO7+%uO%>hQ!0LrO7+&UO%>vQ!0MxO7++nO%[QlO7++nO%?WQ`O7++mO%?WQ`O7++mOOQO1G4o1G4oO9WQ`O1G4oO%?`Q`O1G4oOOQS7+%z7+%zO#']Q`O<|O%[QlO,5>|OOQO-E<`-E<`O%KlQ`O1G5yOOQ!0Lf<]OOQ[,5>_,5>_O&;hQ`O1G3|O9WQ`O7+&cO!(vQlO7+&cOOQO7+%[7+%[O&;mQ?MtO1G6VO>tQ`O7+%[OOQ!0Lf<tQ`O<tQ`O7+)hO'+dQ`O<{AN>{O%[QlOAN?[OOQO<{Oh%VOk+bO![']O%f+aO~O!d+dOa(XX![(XX'v(XX!Y(XX~Oa%lO![XO'v%lO~Oh%VO!i%cO~Oh%VO!i%cO(P%eO~O!d#vO#h(uO~Ob+oO%g+pO(P+lO(RTO(UUO!Z)UP~O!Y+qO`)TX~O[+uO~O`+vO~O![%}O(P%eO(Q!lO`)TP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(P#nO(RTO(UUO!Z)SP~Oe%{O~O%g!QO(P&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(RTO(UUO(]VO(k[O(ziO~O![!eO!r!gO$V!kO(P!dO~P!E{O`,cOa%lO'v%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!HeO!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(P&ha(R&ha(U&ha(]&ha(k&ha(z&ha!Z&ha&a&hab&ha&f&ha~O(P,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# kO!d-OO#],}Oh(fX!Y#eX!Z#eX!d(fX!i(fX~O!Y(fX!Z(fX~P#!^Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(RTO(UUO(a!mO~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(RTO(UUO(]VO(k[O(z=dO~O(P{Og'XX!Y'XX~P!+oO!Y.xOg(la~OSfO![3vO$c3wO~O!Z3{O~Os3|O~P#.uOa$lq!Y$lq'v$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9}O!V4OO~P!&fO!P4PO~O}){O'u)|O(v%POk'ea(u'ea!Y'ea#]'ea~Og'ea#}'ea~P%+ZO}){O'u)|Ok'ga(u'ga(v'ga!Y'ga#]'ga~Og'ga#}'ga~P%+|O(n$YO~P#.uO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(PU#>[#>|#?`#?f#?l#?z#@a#BQ#B`#Bg#C}#D]#Ey#FX#F_#Fe#Fk#Fu#F{#GR#G]#Go#GuPPPPPPPPPPP#G{PPPPPPP#Hp#Kw#Ma#Mh#MpPPP$%OP$%X$(Q$.k$.n$.q$/p$/s$/z$0SP$0Y$0]P$0y$0}$1u$3T$3Y$3pPP$3u$3{$4PP$4S$4W$4[$5W$5o$6W$6[$6_$6b$6h$6k$6o$6sR!|RoqOXst!Z#d%k&o&q&r&t,l,q1}2QY!vQ']-^1b5iQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*g$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0S*mQ1l,^R < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:_p,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[Up],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Sp(V!b'x0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(T#S$h&j'y0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Sp(V!b'y0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(R':f$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(V!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Sp(V!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(V!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(SpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(SpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Sp(V!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(V!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(V!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(V!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(V!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(V!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-v$?V_!Z(CdsBr$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Sp(V!b'x0/l$[#t(P,2j(a$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[jp,Bp,Wp,Gp,2,3,4,5,6,7,8,9,10,11,12,13,14,Dp,new yp("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new yp("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:t=>Np[t]||-1},{term:339,get:t=>Hp[t]||-1},{term:92,get:t=>Fp[t]||-1}],tokenPrec:15004}),Jp=[ku("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),ku("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),ku("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),ku("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),ku("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),ku("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),ku("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),ku("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),ku("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),ku('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),ku('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],tm=Jp.concat([ku("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),ku("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),ku("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),em=new _a,im=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function nm(t){return(e,i)=>{let n=e.node.getChild("VariableDefinition");return n&&i(n,t),!0}}const sm=["FunctionDeclaration"],rm={FunctionDeclaration:nm("function"),ClassDeclaration:nm("class"),ClassExpression:()=>!0,EnumDeclaration:nm("constant"),TypeAliasDeclaration:nm("type"),NamespaceDeclaration:nm("namespace"),VariableDefinition(t,e){t.matchContext(sm)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function om(t,e){let i=em.get(e);if(i)return i;let n=[],s=!0;function r(e,i){let s=t.sliceString(e.from,e.to);n.push({label:s,type:i})}return e.cursor(ya.IncludeAnonymous).iterate((e=>{if(s)s=!1;else if(e.name){let t=rm[e.name];if(t&&t(e,r)||im.has(e.name))return!1}else if(e.to-e.from>8192){for(let i of om(t,e.node))n.push(i);return!1}})),em.set(e,n),n}const am=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,lm=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function hm(t){let e=zl(t.state).resolveInner(t.pos,-1);if(lm.indexOf(e.name)>-1)return null;let i="VariableName"==e.name||e.to-e.from<20&&am.test(t.state.sliceDoc(e.from,e.to));if(!i&&!t.explicit)return null;let n=[];for(let s=e;s;s=s.parent)im.has(s.name)&&(n=n.concat(om(t.state.doc,s)));return{options:n,from:i?e.from:t.pos,validFor:am}}const cm=El.define({name:"javascript",parser:Kp.configure({props:[nh.add({IfStatement:uh({except:/^\s*({|else\b)/}),TryStatement:uh({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:t=>t.baseIndent,SwitchBody:t=>{let e=t.textAfter,i=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return t.baseIndent+(i?0:n?1:2)*t.unit},Block:hh({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":uh({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag":t=>t.column(t.node.from)+t.unit}),dh.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Oh,BlockComment:t=>({from:t.from+2,to:t.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),um={test:t=>/^JSX/.test(t.name),facet:Ml({commentTokens:{block:{open:"{/*",close:"*/}"}}})},fm=cm.configure({dialect:"ts"},"typescript"),dm=cm.configure({dialect:"jsx",props:[Xl.add((t=>t.isTop?[um]:void 0))]}),Om=cm.configure({dialect:"jsx ts",props:[Xl.add((t=>t.isTop?[um]:void 0))]},"typescript");let pm=t=>({label:t,type:"keyword"});const mm="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(pm),gm=mm.concat(["declare","implements","private","protected","public"].map(pm));function bm(t={}){let e=t.jsx?t.typescript?Om:dm:t.typescript?fm:cm,i=t.typescript?tm.concat(gm):Jp.concat(mm);return new Ul(e,[cm.data.of({autocomplete:(n=lm,s=kc(i),t=>{for(let e=zl(t.state).resolveInner(t.pos,-1);e;e=e.parent){if(n.indexOf(e.name)>-1)return null;if(e.type.isTop)break}return s(t)})}),cm.data.of({autocomplete:hm}),t.jsx?Sm:[]]);var n,s}function vm(t,e,i=t.length){for(let n=null==e?void 0:e.firstChild;n;n=n.nextSibling)if("JSXIdentifier"==n.name||"JSXBuiltin"==n.name||"JSXNamespacedName"==n.name||"JSXMemberExpression"==n.name)return t.sliceString(n.from,Math.min(n.to,i));return""}const wm="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),Sm=Sr.inputHandler.of(((t,e,i,n,s)=>{if((wm?t.composing:t.compositionStarted)||t.state.readOnly||e!=i||">"!=n&&"/"!=n||!cm.isActiveAt(t.state,e,-1))return!1;let r=s(),{state:o}=r,a=o.changeByRange((t=>{var e;let i,{head:s}=t,r=zl(o).resolveInner(s-1,-1);if("JSXStartTag"==r.name&&(r=r.parent),o.doc.sliceString(s-1,s)!=n||"JSXAttributeValue"==r.name&&r.to>s);else{if(">"==n&&"JSXFragmentTag"==r.name)return{range:t,changes:{from:s,insert:""}};if("/"==n&&"JSXStartCloseTag"==r.name){let t=r.parent,n=t.parent;if(n&&t.from==s-2&&((i=vm(o.doc,n.firstChild,s))||"JSXFragmentTag"==(null===(e=n.firstChild)||void 0===e?void 0:e.name))){let t=`${i}>`;return{range:et.cursor(s+t.length,-1),changes:{from:s,insert:t}}}}else if(">"==n){let e=function(t){for(;;){if("JSXOpenTag"==t.name||"JSXSelfClosingTag"==t.name||"JSXFragmentTag"==t.name)return t;if("JSXEscape"==t.name||!t.parent)return null;t=t.parent}}(r);if(e&&"JSXOpenTag"==e.name&&!/^\/?>|^<\//.test(o.doc.sliceString(s,s+2))&&(i=vm(o.doc,e,s)))return{range:t,changes:{from:s,insert:``}}}}return{range:t}}));return!a.changes.empty&&(t.dispatch([r,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)})),ym={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},xm={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Qm={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function km(t){return 9==t||10==t||13==t||32==t}let Pm=null,$m=null,Zm=0;function Cm(t,e){let i=t.pos+e;if(Zm==i&&$m==t)return Pm;let n=t.peek(e);for(;km(n);)n=t.peek(++e);let s="";for(;45==(r=n)||46==r||58==r||r>=65&&r<=90||95==r||r>=97&&r<=122||r>=161;)s+=String.fromCharCode(n),n=t.peek(++e);var r;return $m=t,Zm=i,Pm=s?s.toLowerCase():n==Tm||n==Am?void 0:null}const Tm=63,Am=33;function Rm(t,e){this.name=t,this.parent=e}const Mm=[6,10,7,8,9],Xm=new Vp({start:null,shift:(t,e,i,n)=>Mm.indexOf(e)>-1?new Rm(Cm(n,1)||"",t):t,reduce:(t,e)=>20==e&&t?t.parent:t,reuse(t,e,i,n){let s=e.type.id;return 6==s||36==s?new Rm(Cm(n,1)||"",t):t},strict:!1}),qm=new xp(((t,e)=>{if(60!=t.next)return void(t.next<0&&e.context&&t.acceptToken(57));t.advance();let i=47==t.next;i&&t.advance();let n=Cm(t,0);if(void 0===n)return;if(!n)return t.acceptToken(i?14:6);let s=e.context?e.context.name:null;if(i){if(n==s)return t.acceptToken(11);if(s&&xm[s])return t.acceptToken(57,-2);if(e.dialectEnabled(0))return t.acceptToken(12);for(let t=e.context;t;t=t.parent)if(t.name==n)return;t.acceptToken(13)}else{if("script"==n)return t.acceptToken(7);if("style"==n)return t.acceptToken(8);if("textarea"==n)return t.acceptToken(9);if(ym.hasOwnProperty(n))return t.acceptToken(10);s&&Qm[s]&&Qm[s][n]?t.acceptToken(57,-1):t.acceptToken(6)}}),{contextual:!0}),Vm=new xp((t=>{for(let e=0,i=0;;i++){if(t.next<0){i&&t.acceptToken(58);break}if(45==t.next)e++;else{if(62==t.next&&e>=2){i>=3&&t.acceptToken(58,-2);break}e=0}t.advance()}}));const Em=new xp(((t,e)=>{if(47==t.next&&62==t.peek(1)){let i=e.dialectEnabled(1)||function(t){for(;t;t=t.parent)if("svg"==t.name||"math"==t.name)return!0;return!1}(e.context);t.acceptToken(i?5:4,2)}else 62==t.next&&t.acceptToken(4,1)}));function zm(t,e,i){let n=2+t.length;return new xp((s=>{for(let r=0,o=0,a=0;;a++){if(s.next<0){a&&s.acceptToken(e);break}if(0==r&&60==s.next||1==r&&47==s.next||r>=2&&ro?s.acceptToken(e,-o):s.acceptToken(i,-(o-2));break}if((10==s.next||13==s.next)&&a){s.acceptToken(e,1);break}r=o=0}else o++;s.advance()}}))}const Ym=zm("script",54,1),Lm=zm("style",55,2),_m=zm("textarea",56,3),Dm=hl({"Text RawText":Tl.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":Tl.angleBracket,TagName:Tl.tagName,"MismatchedCloseTag/TagName":[Tl.tagName,Tl.invalid],AttributeName:Tl.attributeName,"AttributeValue UnquotedAttributeValue":Tl.attributeValue,Is:Tl.definitionOperator,"EntityReference CharacterReference":Tl.character,Comment:Tl.blockComment,ProcessingInst:Tl.processingInstruction,DoctypeDecl:Tl.documentMeta}),jm=Ep.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'pO$fO,59oOOO`,59o,59oO'xQ#|O,59qO'}Q#|O,59rOOO`-E7W-E7WO(SQ&rO'#CsOOQW'#DZ'#DZO(bQ&rO1G.wOOOa1G.w1G.wOOO`1G/Y1G/YO(mQ&rO1G/QOOOb1G/Q1G/QO(xQ&rO1G/TOOOd1G/T1G/TO)TQ&rO1G/WOOO`1G/W1G/WO)`Q&rO1G/YOOOa-E7[-E7[O)kQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)pQ#tO'#C|OOOd-E7^-E7^O)uQ#tO'#DPOOO`-E7_-E7_O)zQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O*PQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOO`7+$t7+$tOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rO*[Q#|O,59eO*aQ#|O,59hO*fQ#|O,59kOOO`1G/X1G/XO*kO7[O'#CvO*|OMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O+_O7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+pOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:",]~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OT}OhyO~OS!POT}OhyO~OS!ROT}OhyO~OS!TOT}OhyO~OS}OT}OhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Xm,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[Dm],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TakWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOb!R!RAwP;=`<%lAY!ZBRYkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbhSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbhSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXhSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYlhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_khS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_X`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!a`!cpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!a`!cp!dPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!a`!cpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!a`!cpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!a`!cpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!a`!cpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!a`!cpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!a`!cpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!a`!cpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!cpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO{PP!-nP;=`<%l!-Sq!-xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!a`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!a`!cpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!a`!cpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!a`!cpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!a`!cpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!a`!cpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let a=t.type.id;if(28==a)return Im(t,e,i);if(31==a)return Im(t,e,n);if(34==a)return Im(t,e,s);if(20==a&&r.length){let i,n=t.node,s=n.firstChild,o=s&&Wm(s,e);if(o)for(let t of r)if(t.tag==o&&(!t.attrs||t.attrs(i||(i=Bm(s,e))))){let e=n.lastChild,i=37==e.type.id?e.from:n.to;if(i>s.to)return{parser:t.parser,overlay:[{from:s.to,to:i}]}}}if(o&&23==a){let i,n=t.node;if(i=n.firstChild){let t=o[e.read(i.from,i.to)];if(t)for(let i of t){if(i.tagName&&i.tagName!=Wm(n.parent,e))continue;let t=n.lastChild;if(26==t.type.id){let e=t.from+1,n=t.lastChild,s=t.to-(n&&n.isError?0:1);if(s>e)return{parser:i.parser,overlay:[{from:e,to:s}]}}else if(27==t.type.id)return{parser:i.parser,overlay:[{from:t.from,to:t.to}]}}}}return null}))}const Um=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function Nm(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function Hm(t){return t>=48&&t<=57}const Fm=new xp(((t,e)=>{for(let i=!1,n=0,s=0;;s++){let{next:r}=t;if(Nm(r)||45==r||95==r||i&&Hm(r))!i&&(45!=r||s>0)&&(i=!0),n===s&&45==r&&n++,t.advance();else{if(92!=r||10==t.peek(1)){i&&t.acceptToken(40==r?100:2==n&&e.canShift(2)?2:101);break}t.advance(),t.next>-1&&t.advance(),i=!0}}})),Km=new xp((t=>{if(Um.includes(t.peek(-1))){let{next:e}=t;(Nm(e)||95==e||35==e||46==e||91==e||58==e&&Nm(t.peek(1))||45==e||38==e)&&t.acceptToken(99)}})),Jm=new xp((t=>{if(!Um.includes(t.peek(-1))){let{next:e}=t;if(37==e&&(t.advance(),t.acceptToken(1)),Nm(e)){do{t.advance()}while(Nm(t.next)||Hm(t.next));t.acceptToken(1)}}})),tg=hl({"AtKeyword import charset namespace keyframes media supports":Tl.definitionKeyword,"from to selector":Tl.keyword,NamespaceName:Tl.namespace,KeyframeName:Tl.labelName,KeyframeRangeName:Tl.operatorKeyword,TagName:Tl.tagName,ClassName:Tl.className,PseudoClassName:Tl.constant(Tl.className),IdName:Tl.labelName,"FeatureName PropertyName":Tl.propertyName,AttributeName:Tl.attributeName,NumberLiteral:Tl.number,KeywordQuery:Tl.keyword,UnaryQueryOp:Tl.operatorKeyword,"CallTag ValueName":Tl.atom,VariableName:Tl.variableName,Callee:Tl.operatorKeyword,Unit:Tl.unit,"UniversalSelector NestingSelector":Tl.definitionOperator,MatchOp:Tl.compareOperator,"ChildOp SiblingOp, LogicOp":Tl.logicOperator,BinOp:Tl.arithmeticOperator,Important:Tl.modifier,Comment:Tl.blockComment,ColorLiteral:Tl.color,"ParenthesizedContent StringLiteral":Tl.string,":":Tl.punctuation,"PseudoOp #":Tl.derefOperator,"; ,":Tl.separator,"( )":Tl.paren,"[ ]":Tl.squareBracket,"{ }":Tl.brace}),eg={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:138},ig={__proto__:null,"@import":118,"@media":142,"@charset":146,"@namespace":150,"@keyframes":156,"@supports":168},ng={__proto__:null,not:132,only:132},sg=Ep.deserialize({version:14,states:":jQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DTO$vQ[O'#DWOOQP'#Em'#EmO${QdO'#DgO%jQ[O'#DtO${QdO'#DvO%{Q[O'#DxO&WQ[O'#D{O&`Q[O'#ERO&nQ[O'#ETOOQS'#El'#ElOOQS'#EW'#EWQYQ[OOO&uQXO'#CdO'jQWO'#DcO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@[)C@[OOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E[O({QWO,58{O)TQ[O,59SO$qQ[O,59oO$vQ[O,59rO(aQ[O,59uO(aQ[O,59wO(aQ[O,59xO)`Q[O'#DbOOQS,58{,58{OOQP'#Ck'#CkOOQO'#DR'#DROOQP,59S,59SO)gQWO,59SO)lQWO,59SOOQP'#DV'#DVOOQP,59o,59oOOQO'#DX'#DXO)qQ`O,59rOOQS'#Cp'#CpO${QdO'#CqO)yQvO'#CsO+ZQtO,5:ROOQO'#Cx'#CxO)lQWO'#CwO+oQWO'#CyO+tQ[O'#DOOOQS'#Ep'#EpOOQO'#Dj'#DjO+|Q[O'#DqO,[QWO'#EtO&`Q[O'#DoO,jQWO'#DrOOQO'#Eu'#EuO)OQWO,5:`O,oQpO,5:bOOQS'#Dz'#DzO,wQWO,5:dO,|Q[O,5:dOOQO'#D}'#D}O-UQWO,5:gO-ZQWO,5:mO-cQWO,5:oOOQS-E8U-E8UO-kQdO,59}O-{Q[O'#E^O.YQWO,5;_O.YQWO,5;_POOO'#EV'#EVP.eO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO/[QXO,5:vOOQO-E8Y-E8YOOQS1G.g1G.gOOQP1G.n1G.nO)gQWO1G.nO)lQWO1G.nOOQP1G/Z1G/ZO/iQ`O1G/^O0SQXO1G/aO0jQXO1G/cO1QQXO1G/dO1hQWO,59|O1mQ[O'#DSO1tQdO'#CoOOQP1G/^1G/^O${QdO1G/^O1{QpO,59]OOQS,59_,59_O${QdO,59aO2TQWO1G/mOOQS,59c,59cO2YQ!bO,59eOOQS'#DP'#DPOOQS'#EY'#EYO2eQ[O,59jOOQS,59j,59jO2mQWO'#DjO2xQWO,5:VO2}QWO,5:]O&`Q[O,5:XO&`Q[O'#E_O3VQWO,5;`O3bQWO,5:ZO(aQ[O,5:^OOQS1G/z1G/zOOQS1G/|1G/|OOQS1G0O1G0OO3sQWO1G0OO3xQdO'#EOOOQS1G0R1G0ROOQS1G0X1G0XOOQS1G0Z1G0ZO4TQtO1G/iOOQO1G/i1G/iOOQO,5:x,5:xO4kQ[O,5:xOOQO-E8[-E8[O4xQWO1G0yPOOO-E8T-E8TPOOO1G.e1G.eOOQP7+$Y7+$YOOQP7+$x7+$xO${QdO7+$xOOQS1G/h1G/hO5TQXO'#ErO5[QWO,59nO5aQtO'#EXO6XQdO'#EoO6cQWO,59ZO6hQpO7+$xOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%X7+%XOOQS1G/P1G/PO6pQWO1G/POOQS-E8W-E8WOOQS1G/U1G/UO${QdO1G/qOOQO1G/w1G/wOOQO1G/s1G/sO6uQWO,5:yOOQO-E8]-E8]O7TQXO1G/xOOQS7+%j7+%jO7[QYO'#CsOOQO'#EQ'#EQO7gQ`O'#EPOOQO'#EP'#EPO7rQWO'#E`O7zQdO,5:jOOQS,5:j,5:jO8VQtO'#E]O${QdO'#E]O9WQdO7+%TOOQO7+%T7+%TOOQO1G0d1G0dO9kQpO<OAN>OO;]QdO,5:uOOQO-E8X-E8XOOQO<T![;'S%^;'S;=`%o<%lO%^l;TUo`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYo`#e[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[o`#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSt^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWjWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VU#bQOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSo`#[~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU]QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!Y^Oy%^z;'S%^;'S;=`%o<%lO%^dCoS|SOy%^z;'S%^;'S;=`%o<%lO%^bDQU!OQOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS!OQo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[![Qo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSq^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSp^Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!bQo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!TUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!S^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!RQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[Km,Jm,Fm,1,2,3,4,new yp("m~RRYZ[z{a~~g~aO#^~~dP!P!Qg~lO#_~~",28,105)],topRules:{StyleSheet:[0,4],Styles:[1,86]},specialized:[{term:100,get:t=>eg[t]||-1},{term:58,get:t=>ig[t]||-1},{term:101,get:t=>ng[t]||-1}],tokenPrec:1219});let rg=null;function og(){if(!rg&&"object"==typeof document&&document.body){let{style:t}=document.body,e=[],i=new Set;for(let n in t)"cssText"!=n&&"cssFloat"!=n&&"string"==typeof t[n]&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))),i.has(n)||(e.push(n),i.add(n)));rg=e.sort().map((t=>({type:"property",label:t})))}return rg||[]}const ag=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map((t=>({type:"class",label:t}))),lg=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map((t=>({type:"keyword",label:t}))).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((t=>({type:"constant",label:t})))),hg=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((t=>({type:"type",label:t}))),cg=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map((t=>({type:"keyword",label:t}))),ug=/^(\w[\w-]*|-\w[\w-]*|)$/,fg=/^-(-[\w-]*)?$/;const dg=new _a,Og=["Declaration"];function pg(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function mg(t,e,i){if(e.to-e.from>4096){let n=dg.get(e);if(n)return n;let s=[],r=new Set,o=e.cursor(ya.IncludeAnonymous);if(o.firstChild())do{for(let e of mg(t,o.node,i))r.has(e.label)||(r.add(e.label),s.push(e))}while(o.nextSibling());return dg.set(e,s),s}{let n=[],s=new Set;return e.cursor().iterate((e=>{var r;if(i(e)&&e.matchContext(Og)&&":"==(null===(r=e.node.nextSibling)||void 0===r?void 0:r.name)){let i=t.sliceString(e.from,e.to);s.has(i)||(s.add(i),n.push({label:i,type:"variable"}))}})),n}}const gg=t=>e=>{let{state:i,pos:n}=e,s=zl(i).resolveInner(n,-1),r=s.type.isError&&s.from==s.to-1&&"-"==i.doc.sliceString(s.from,s.to);if("PropertyName"==s.name||(r||"TagName"==s.name)&&/^(Block|Styles)$/.test(s.resolve(s.to).name))return{from:s.from,options:og(),validFor:ug};if("ValueName"==s.name)return{from:s.from,options:lg,validFor:ug};if("PseudoClassName"==s.name)return{from:s.from,options:ag,validFor:ug};if(t(s)||(e.explicit||r)&&function(t,e){var i;if(("("==t.name||t.type.isError)&&(t=t.parent||t),"ArgList"!=t.name)return!1;let n=null===(i=t.parent)||void 0===i?void 0:i.firstChild;return"Callee"==(null==n?void 0:n.name)&&"var"==e.sliceString(n.from,n.to)}(s,i.doc))return{from:t(s)||r?s.from:n,options:mg(i.doc,pg(s),t),validFor:fg};if("TagName"==s.name){for(let{parent:t}=s;t;t=t.parent)if("Block"==t.name)return{from:s.from,options:og(),validFor:ug};return{from:s.from,options:hg,validFor:ug}}if("AtKeyword"==s.name)return{from:s.from,options:cg,validFor:ug};if(!e.explicit)return null;let o=s.resolve(n),a=o.childBefore(n);return a&&":"==a.name&&"PseudoClassSelector"==o.name?{from:n,options:ag,validFor:ug}:a&&":"==a.name&&"Declaration"==o.name||"ArgList"==o.name?{from:n,options:lg,validFor:ug}:"Block"==o.name||"Styles"==o.name?{from:n,options:og(),validFor:ug}:null},bg=gg((t=>"VariableName"==t.name)),vg=El.define({name:"css",parser:sg.configure({props:[nh.add({Declaration:uh()}),dh.add({"Block KeyframeList":Oh})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function wg(){return new Ul(vg,vg.data.of({autocomplete:bg}))}const Sg=["_blank","_self","_top","_parent"],yg=["ascii","utf-8","utf-16","latin1","latin1"],xg=["get","post","put","delete"],Qg=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],kg=["true","false"],Pg={},$g={a:{attrs:{href:null,ping:null,type:null,media:null,target:Sg,hreflang:null}},abbr:Pg,address:Pg,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Pg,aside:Pg,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Pg,base:{attrs:{href:null,target:Sg}},bdi:Pg,bdo:Pg,blockquote:{attrs:{cite:null}},body:Pg,br:Pg,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Qg,formmethod:xg,formnovalidate:["novalidate"],formtarget:Sg,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Pg,center:Pg,cite:Pg,code:Pg,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Pg,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Pg,div:Pg,dl:Pg,dt:Pg,em:Pg,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Pg,figure:Pg,footer:Pg,form:{attrs:{action:null,name:null,"accept-charset":yg,autocomplete:["on","off"],enctype:Qg,method:xg,novalidate:["novalidate"],target:Sg}},h1:Pg,h2:Pg,h3:Pg,h4:Pg,h5:Pg,h6:Pg,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Pg,hgroup:Pg,hr:Pg,html:{attrs:{manifest:null}},i:Pg,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Qg,formmethod:xg,formnovalidate:["novalidate"],formtarget:Sg,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Pg,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Pg,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Pg,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:yg,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Pg,noscript:Pg,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Pg,param:{attrs:{name:null,value:null}},pre:Pg,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Pg,rt:Pg,ruby:Pg,samp:Pg,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:yg}},section:Pg,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Pg,source:{attrs:{src:null,type:null,media:null}},span:Pg,strong:Pg,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Pg,summary:Pg,sup:Pg,table:Pg,tbody:Pg,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Pg,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Pg,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Pg,time:{attrs:{datetime:null}},title:Pg,tr:Pg,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Pg,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Pg},Zg={accesskey:null,class:null,contenteditable:kg,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:kg,autocorrect:kg,autocapitalize:kg,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":kg,"aria-autocomplete":["inline","list","both","none"],"aria-busy":kg,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":kg,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":kg,"aria-hidden":kg,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":kg,"aria-multiselectable":kg,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":kg,"aria-relevant":null,"aria-required":kg,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Cg="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((t=>"on"+t));for(let yw of Cg)Zg[yw]=null;class Tg{constructor(t,e){this.tags=Object.assign(Object.assign({},$g),t),this.globalAttrs=Object.assign(Object.assign({},Zg),e),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function Ag(t,e,i=t.length){if(!e)return"";let n=e.firstChild,s=n&&n.getChild("TagName");return s?t.sliceString(s.from,Math.min(s.to,i)):""}function Rg(t,e=!1){for(;t;t=t.parent)if("Element"==t.name){if(!e)return t;e=!1}return null}function Mg(t,e,i){let n=i.tags[Ag(t,Rg(e))];return(null==n?void 0:n.children)||i.allTags}function Xg(t,e){let i=[];for(let n=Rg(e);n&&!n.type.isTop;n=Rg(n.parent)){let s=Ag(t,n);if(s&&"CloseTag"==n.lastChild.name)break;s&&i.indexOf(s)<0&&("EndTag"==e.name||e.from>=n.firstChild.to)&&i.push(s)}return i}Tg.default=new Tg;const qg=/^[:\-\.\w\u00b7-\uffff]*$/;function Vg(t,e,i,n,s){let r=/\s*>/.test(t.sliceDoc(s,s+5))?"":">",o=Rg(i,!0);return{from:n,to:s,options:Mg(t.doc,o,e).map((t=>({label:t,type:"type"}))).concat(Xg(t.doc,i).map(((t,e)=>({label:"/"+t,apply:"/"+t+r,type:"type",boost:99-e})))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Eg(t,e,i,n){let s=/\s*>/.test(t.sliceDoc(n,n+5))?"":">";return{from:i,to:n,options:Xg(t.doc,e).map(((t,e)=>({label:t,apply:t+s,type:"type",boost:99-e}))),validFor:qg}}function zg(t,e){let{state:i,pos:n}=e,s=zl(i).resolveInner(n,-1),r=s.resolve(n);for(let o,a=n;r==s&&(o=s.childBefore(a));){let t=o.lastChild;if(!t||!t.type.isError||t.from({label:t,type:"property"}))),validFor:qg}}(i,t,s,"AttributeName"==s.name?s.from:n,n):"Is"==s.name||"AttributeValue"==s.name||"UnquotedAttributeValue"==s.name?function(t,e,i,n,s){var r;let o,a=null===(r=i.parent)||void 0===r?void 0:r.getChild("AttributeName"),l=[];if(a){let r=t.sliceDoc(a.from,a.to),h=e.globalAttrs[r];if(!h){let n=Rg(i),s=n?e.tags[Ag(t.doc,n)]:null;h=(null==s?void 0:s.attrs)&&s.attrs[r]}if(h){let e=t.sliceDoc(n,s).toLowerCase(),i='"',r='"';/^['"]/.test(e)?(o='"'==e[0]?/^[^"]*$/:/^[^']*$/,i="",r=t.sliceDoc(s,s+1)==e[0]?"":e[0],e=e.slice(1),n++):o=/^[^\s<>='"]*$/;for(let t of h)l.push({label:t,apply:i+t+r,type:"constant"})}}return{from:n,to:s,options:l,validFor:o}}(i,t,s,"Is"==s.name?n:s.from,n):!e.explicit||"Element"!=r.name&&"Text"!=r.name&&"Document"!=r.name?null:function(t,e,i,n){let s=[],r=0;for(let o of Mg(t.doc,i,e))s.push({label:"<"+o,type:"type"});for(let o of Xg(t.doc,i))s.push({label:"",type:"type",boost:99-r++});return{from:n,to:n,options:s,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(i,t,s,n)}function Yg(t){let{extraTags:e,extraGlobalAttributes:i}=t,n=i||e?new Tg(e,i):Tg.default;return t=>zg(n,t)}const Lg=cm.parser.configure({top:"SingleExpression"}),_g=[{tag:"script",attrs:t=>"text/typescript"==t.type||"ts"==t.lang,parser:fm.parser},{tag:"script",attrs:t=>"text/babel"==t.type||"text/jsx"==t.type,parser:dm.parser},{tag:"script",attrs:t=>"text/typescript-jsx"==t.type,parser:Om.parser},{tag:"script",attrs:t=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type),parser:Lg},{tag:"script",attrs:t=>!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type),parser:cm.parser},{tag:"style",attrs:t=>(!t.lang||"css"==t.lang)&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type)),parser:vg.parser}],Dg=[{name:"style",parser:vg.parser.configure({top:"Styles"})}].concat(Cg.map((t=>({name:t,parser:cm.parser})))),jg=El.define({name:"html",parser:jm.configure({props:[nh.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag":t=>t.column(t.node.from)+t.unit,Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].lengtht.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Bg=jg.configure({wrap:Gm(_g,Dg)});function Wg(t={}){let e,i="";!1===t.matchClosingTags&&(i="noMatch"),!0===t.selfClosingTags&&(i=(i?i+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(e=Gm((t.nestedLanguages||[]).concat(_g),(t.nestedAttributes||[]).concat(Dg)));let n=e?jg.configure({wrap:e,dialect:i}):i?Bg.configure({dialect:i}):Bg;return new Ul(n,[Bg.data.of({autocomplete:Yg(t)}),!1!==t.autoCloseTags?Gg:[],bm().support,wg().support])}const Ig=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),Gg=Sr.inputHandler.of(((t,e,i,n,s)=>{if(t.composing||t.state.readOnly||e!=i||">"!=n&&"/"!=n||!Bg.isActiveAt(t.state,e,-1))return!1;let r=s(),{state:o}=r,a=o.changeByRange((t=>{var e,i,s;let r,a=o.doc.sliceString(t.from-1,t.to)==n,{head:l}=t,h=zl(o).resolveInner(l,-1);if(a&&">"==n&&"EndTag"==h.name){let n=h.parent;if("CloseTag"!=(null===(i=null===(e=n.parent)||void 0===e?void 0:e.lastChild)||void 0===i?void 0:i.name)&&(r=Ag(o.doc,n.parent,l))&&!Ig.has(r)){return{range:t,changes:{from:l,to:l+(">"===o.doc.sliceString(l,l+1)?1:0),insert:``}}}}else if(a&&"/"==n&&"IncompleteCloseTag"==h.name){let t=h.parent;if(h.from==l-2&&"CloseTag"!=(null===(s=t.lastChild)||void 0===s?void 0:s.name)&&(r=Ag(o.doc,t,l))&&!Ig.has(r)){let t=l+(">"===o.doc.sliceString(l,l+1)?1:0),e=`${r}>`;return{range:et.cursor(l+e.length,-1),changes:{from:l,to:t,insert:e}}}}return{range:t}}));return!a.changes.empty&&(t.dispatch([r,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}));class Ug{static create(t,e,i,n,s){return new Ug(t,e,i,n+(n<<8)+t+(e<<4)|0,s,[],[])}constructor(t,e,i,n,s,r,o){this.type=t,this.value=e,this.from=i,this.hash=n,this.end=s,this.children=r,this.positions=o,this.hashProp=[[pa.contextHash,n]]}addChild(t,e){t.prop(pa.contextHash)!=this.hash&&(t=new xa(t.type,t.children,t.positions,t.length,this.hashProp)),this.children.push(t),this.positions.push(e)}toTree(t,e=this.end){let i=this.children.length-1;return i>=0&&(e=Math.max(e,this.positions[i]+this.children[i].length+this.from)),new xa(t.types[this.type],this.children,this.positions,e-this.from).balance({makeTree:(t,e,i)=>new xa(ba.none,t,e,i,this.hashProp)})}}var Ng;!function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"}(Ng||(Ng={}));class Hg{constructor(t,e){this.start=t,this.content=e,this.marks=[],this.parsers=[]}}class Fg{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let t=this.skipSpace(this.basePos);this.indent=this.countIndent(t,this.pos,this.indent),this.pos=t,this.next=t==this.text.length?-1:this.text.charCodeAt(t)}skipSpace(t){return eb(this.text,t)}reset(t){for(this.text=t,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(t){this.basePos=t,this.baseIndent=this.countIndent(t,this.pos,this.indent)}moveBaseColumn(t){this.baseIndent=t,this.basePos=this.findColumn(t)}addMarker(t){this.markers.push(t)}countIndent(t,e=0,i=0){for(let n=e;n=e.stack[i.depth+1].value+i.baseIndent)return!0;if(i.indent>=i.baseIndent+4)return!1;let n=(t.type==Ng.OrderedList?lb:ab)(i,e,!1);return n>0&&(t.type!=Ng.BulletList||rb(i,e,!1)<0)&&i.text.charCodeAt(i.pos+n-1)==t.value}const Jg={[Ng.Blockquote]:(t,e,i)=>62==i.next&&(i.markers.push(Vb(Ng.QuoteMark,e.lineStart+i.pos,e.lineStart+i.pos+1)),i.moveBase(i.pos+(tb(i.text.charCodeAt(i.pos+1))?2:1)),t.end=e.lineStart+i.text.length,!0),[Ng.ListItem]:(t,e,i)=>!(i.indent-1)&&(i.moveBaseColumn(i.baseIndent+t.value),!0),[Ng.OrderedList]:Kg,[Ng.BulletList]:Kg,[Ng.Document]:()=>!0};function tb(t){return 32==t||9==t||10==t||13==t}function eb(t,e=0){for(;ei&&tb(t.charCodeAt(e-1));)e--;return e}function nb(t){if(96!=t.next&&126!=t.next)return-1;let e=t.pos+1;for(;e-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(yb.SetextHeading)>-1||n<3?-1:1}function ob(t,e){for(let i=t.stack.length-1;i>=0;i--)if(t.stack[i].type==e)return!0;return!1}function ab(t,e,i){return 45!=t.next&&43!=t.next&&42!=t.next||t.pos!=t.text.length-1&&!tb(t.text.charCodeAt(t.pos+1))||!(!i||ob(e,Ng.BulletList)||t.skipSpace(t.pos+2)=48&&s<=57;){if(n++,n==t.text.length)return-1;s=t.text.charCodeAt(n)}return n==t.pos||n>t.pos+9||46!=s&&41!=s||nt.pos+1||49!=t.next)?-1:n+1-t.pos}function hb(t){if(35!=t.next)return-1;let e=t.pos+1;for(;e6?-1:i}function cb(t){if(45!=t.next&&61!=t.next||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e/,db=/\?>/,Ob=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*/i.exec(n);if(r)return t.append(Vb(Ng.Comment,i,i+1+r[0].length));let o=/^\?[^]*?\?>/.exec(n);if(o)return t.append(Vb(Ng.ProcessingInstruction,i,i+1+o[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(n);return a?t.append(Vb(Ng.HTMLTag,i,i+1+a[0].length)):-1},Emphasis(t,e,i){if(95!=e&&42!=e)return-1;let n=i+1;for(;t.char(n)==e;)n++;let s=t.slice(i-1,i),r=t.slice(n,n+1),o=jb.test(s),a=jb.test(r),l=/\s|^$/.test(s),h=/\s|^$/.test(r),c=!h&&(!a||l||o),u=!l&&(!o||h||a),f=c&&(42==e||!u||o),d=u&&(42==e||!c||a);return t.append(new _b(95==e?Eb:zb,i,n,(f?1:0)|(d?2:0)))},HardBreak(t,e,i){if(92==e&&10==t.char(i+1))return t.append(Vb(Ng.HardBreak,i,i+2));if(32==e){let e=i+1;for(;32==t.char(e);)e++;if(10==t.char(e)&&e>=i+2)return t.append(Vb(Ng.HardBreak,i,e+1))}return-1},Link:(t,e,i)=>91==e?t.append(new _b(Yb,i,i+1,1)):-1,Image:(t,e,i)=>33==e&&91==t.char(i+1)?t.append(new _b(Lb,i,i+2,1)):-1,LinkEnd(t,e,i){if(93!=e)return-1;for(let n=t.parts.length-1;n>=0;n--){let e=t.parts[n];if(e instanceof _b&&(e.type==Yb||e.type==Lb)){if(!e.side||t.skipSpace(e.to)==i&&!/[(\[]/.test(t.slice(i+1,i+2)))return t.parts[n]=null,-1;let s=t.takeContent(n),r=t.parts[n]=Wb(t,s,e.type==Yb?Ng.Link:Ng.Image,e.from,i+1);if(e.type==Yb)for(let e=0;ee?Vb(Ng.URL,e+i,s+i):s==t.length&&null}}function Gb(t,e,i){let n=t.charCodeAt(e);if(39!=n&&34!=n&&40!=n)return!1;let s=40==n?41:n;for(let r=e+1,o=!1;r=this.end?-1:this.text.charCodeAt(t-this.offset)}get end(){return this.offset+this.text.length}slice(t,e){return this.text.slice(t-this.offset,e-this.offset)}append(t){return this.parts.push(t),t.to}addDelimiter(t,e,i,n,s){return this.append(new _b(t,e,i,(n?1:0)|(s?2:0)))}get hasOpenLink(){for(let t=this.parts.length-1;t>=0;t--){let e=this.parts[t];if(e instanceof _b&&(e.type==Yb||e.type==Lb))return!0}return!1}addElement(t){return this.append(t)}resolveMarkers(t){for(let i=t;i=t;o--){let t=this.parts[o];if(t instanceof _b&&1&t.side&&t.type==e.type&&!(s&&(1&e.side||2&t.side)&&(t.to-t.from+r)%3==0&&((t.to-t.from)%3||r%3))){n=t;break}}if(!n)continue;let a=e.type.resolve,l=[],h=n.from,c=e.to;if(s){let t=Math.min(2,n.to-n.from,r);h=n.to-t,c=e.from+t,a=1==t?"Emphasis":"StrongEmphasis"}n.type.mark&&l.push(this.elt(n.type.mark,h,n.to));for(let t=o+1;t=0;e--){let i=this.parts[e];if(i instanceof _b&&i.type==t)return e}return null}takeContent(t){let e=this.resolveMarkers(t);return this.parts.length=t,e}skipSpace(t){return eb(this.text,t-this.offset)+this.offset}elt(t,e,i,n){return"string"==typeof t?Vb(this.parser.getNodeType(t),e,i,n):new qb(t,e)}}function Hb(t,e){if(!e.length)return t;if(!t.length)return e;let i=t.slice(),n=0;for(let s of e){for(;n(t?t-1:0))return!1;if(this.fragmentEnd<0){let t=this.fragment.to;for(;t>0&&"\n"!=this.input.read(t-1,t);)t--;this.fragmentEnd=t?t-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let n=t+this.fragment.offset;for(;i.to<=n;)if(!i.parent())return!1;for(;;){if(i.from>=n)return this.fragment.from<=e;if(!i.childAfter(n))return!1}}matches(t){let e=this.cursor.tree;return e&&e.prop(pa.contextHash)==t}takeNodes(t){let e=this.cursor,i=this.fragment.offset,n=this.fragmentEnd-(this.fragment.openEnd?1:0),s=t.absoluteLineStart,r=s,o=t.block.children.length,a=r,l=o;for(;;){if(e.to-i>n){if(e.type.isAnonymous&&e.firstChild())continue;break}let s=Jb(e.from-i,t.ranges);if(e.to-i<=t.ranges[t.rangeI].to)t.addNode(e.tree,s);else{let i=new xa(t.parser.nodeSet.types[Ng.Paragraph],[],[],0,t.block.hashProp);t.reusePlaceholders.set(i,e.tree),t.addNode(i,s)}if(e.type.is("Block")&&(Fb.indexOf(e.type.id)<0?(r=e.to-i,o=t.block.children.length):(r=a,o=l,a=e.to-i,l=t.block.children.length)),!e.nextSibling())break}for(;t.block.children.length>o;)t.block.children.pop(),t.block.positions.pop();return r-s}}function Jb(t,e){let i=t;for(let n=1;nbb[t])),Object.keys(bb).map((t=>yb[t])),Object.keys(bb),xb,Jg,Object.keys(Bb).map((t=>Bb[t])),Object.keys(Bb),[]);function iv(t,e,i){let n=[];for(let s=t.firstChild,r=e;;s=s.nextSibling){let t=s?s.from:i;if(t>r&&n.push({from:r,to:t}),!s)break;r=s.to}return n}const nv={resolve:"Strikethrough",mark:"StrikethroughMark"},sv={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":Tl.strikethrough}},{name:"StrikethroughMark",style:Tl.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,i){if(126!=e||126!=t.char(i+1)||126==t.char(i+2))return-1;let n=t.slice(i-1,i),s=t.slice(i+2,i+3),r=/\s|^$/.test(n),o=/\s|^$/.test(s),a=jb.test(n),l=jb.test(s);return t.addDelimiter(nv,i,i+2,!o&&(!l||r||a),!r&&(!a||o||l))},after:"Emphasis"}]};function rv(t,e,i=0,n,s=0){let r=0,o=!0,a=-1,l=-1,h=!1,c=()=>{n.push(t.elt("TableCell",s+a,s+l,t.parser.parseInline(e.slice(a,l),s+a)))};for(let u=i;u-1)&&r++,o=!1,n&&(a>-1&&c(),n.push(t.elt("TableDelimiter",u+s,u+s+1))),a=l=-1),h=!h&&92==i}return a>-1&&(r++,n&&c()),r}function ov(t,e){for(let i=e;iov(e.content,0)?new lv:null,endLeaf(t,e,i){if(i.parsers.some((t=>t instanceof lv))||!ov(e.text,e.basePos))return!1;let n=t.scanLine(t.absoluteLineEnd+1).text;return av.test(n)&&rv(t,e.text,e.basePos)==rv(t,n,e.basePos)},before:"SetextHeading"}]};class cv{nextLine(){return!1}finish(t,e){return t.addLeafElement(e,t.elt("Task",e.start,e.start+e.content.length,[t.elt("TaskMarker",e.start,e.start+3),...t.parser.parseInline(e.content.slice(3),e.start+3)])),!0}}const uv={defineNodes:[{name:"Task",block:!0,style:Tl.list},{name:"TaskMarker",style:Tl.atom}],parseBlock:[{name:"TaskList",leaf:(t,e)=>/^\[[ xX]\][ \t]/.test(e.content)&&"ListItem"==t.parentType().name?new cv:null,after:"SetextHeading"}]},fv=/(www\.)|(https?:\/\/)|([\w.+-]{,100}@)|(mailto:|xmpp:)/gy,dv=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Ov=/[\w-]+\.[\w-]+($|\/)/,pv=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,mv=/\/[a-zA-Z\d@.]+/gy;function gv(t,e,i,n){let s=0;for(let r=e;r-1)return-1;let n=e+i[0].length;for(;;){let i,s=t[n-1];if(/[?!.,:*_~]/.test(s)||")"==s&&gv(t,e,n,")")>gv(t,e,n,"("))n--;else{if(";"!=s||!(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,n))))break;n=e+i.index}}return n}(t.text,n+s[0].length),r>-1&&t.hasOpenLink){r=n+/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(n,r))[0].length}}else s[3]?r=bv(t.text,n):(r=bv(t.text,n+s[0].length),r>-1&&"xmpp:"==s[0]&&(mv.lastIndex=r,s=mv.exec(t.text),s&&(r=s.index+s[0].length)));return r<0?-1:(t.addElement(t.elt("URL",i,r+t.offset)),r+t.offset)}}]}];function wv(t,e,i){return(n,s,r)=>{if(s!=t||n.char(r+1)==t)return-1;let o=[n.elt(i,r,r+1)];for(let a=r+1;a!t.is("Block")||t.is("Document")||null!=$v(t)||function(t){return"OrderedList"==t.name||"BulletList"==t.name}(t)?void 0:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to}))),kv.add($v),nh.add({Document:()=>null}),Rl.add({Document:Qv})]});function $v(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function Zv(t,e){let i=t;for(;;){let t,n=i.nextSibling;if(!n||null!=(t=$v(n.type))&&t<=e)break;i=n}return i.to}const Cv=fh.of(((t,e,i)=>{for(let n=zl(t).resolveInner(i,-1);n&&!(n.fromi)return{from:i,to:e}}return null}));function Tv(t){return new ql(Qv,t,[Cv],"markdown")}const Av=Tv(Pv),Rv=Tv(Pv.configure([vv,yv,Sv,xv,{props:[dh.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]));class Mv{constructor(t,e,i,n,s,r,o){this.node=t,this.from=e,this.to=i,this.spaceBefore=n,this.spaceAfter=s,this.type=r,this.item=o}blank(t,e=!0){let i=this.spaceBefore+("Blockquote"==this.node.name?">":"");if(null!=t){for(;i.length0;n--)i+=" ";return i+(e?this.spaceAfter:"")}marker(t,e){let i="OrderedList"==this.node.name?String(+qv(this.item,t)[2]+e):"";return this.spaceBefore+i+this.type+this.spaceAfter}}function Xv(t,e){let i=[];for(let s=t;s;s=s.parent)"ListItem"!=s.name&&"Blockquote"!=s.name&&"FencedCode"!=s.name||i.push(s);let n=[];for(let s=i.length-1;s>=0;s--){let t,r=i[s],o=e.lineAt(r.from),a=r.from-o.from;if("FencedCode"==r.name)n.push(new Mv(r,a,a,"","","",null));else if("Blockquote"==r.name&&(t=/^ *>( ?)/.exec(o.text.slice(a))))n.push(new Mv(r,a,a+t[0].length,"",t[1],">",null));else if("ListItem"==r.name&&"OrderedList"==r.parent.name&&(t=/^( *)\d+([.)])( *)/.exec(o.text.slice(a)))){let e=t[3],i=t[0].length;e.length>=4&&(e=e.slice(0,e.length-4),i-=4),n.push(new Mv(r.parent,a,a+i,t[1],e,t[2],r))}else if("ListItem"==r.name&&"BulletList"==r.parent.name&&(t=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(a)))){let e=t[4],i=t[0].length;e.length>4&&(e=e.slice(0,e.length-4),i-=4);let s=t[2];t[3]&&(s+=t[3].replace(/[xX]/," ")),n.push(new Mv(r.parent,a,a+i,t[1],e,s,r))}}return n}function qv(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function Vv(t,e,i,n=0){for(let s=-1,r=t;;){if("ListItem"==r.name){let t=qv(r,e),o=+t[2];if(s>=0){if(o!=s+1)return;i.push({from:r.from+t[1].length,to:r.from+t[0].length,insert:String(s+2+n)})}s=o}let t=r.nextSibling;if(!t)break;r=t}}function Ev(t,e){let i=/^[ \t]*/.exec(t)[0].length;if(!i||"\t"!=e.facet(Fl))return t;let n="";for(let s=ce(t,4,i);s>0;)s>=4?(n+="\t",s-=4):(n+=" ",s--);return n+t.slice(i)}function zv(t){return"QuoteMark"==t.name||"ListMark"==t.name}function Yv(t,e,i){let n="";for(let s=0,r=t.length-2;s<=r;s++)n+=t[s].blank(s{let i=zl(t),{doc:n}=t,s=null,r=t.changeByRange((e=>{if(!e.empty||!Rv.isActiveAt(t,e.from,0))return s={range:e};let r=e.from,o=n.lineAt(r),a=Xv(i.resolveInner(r,-1),n);for(;a.length&&a[a.length-1].from>r-o.from;)a.pop();if(!a.length)return s={range:e};let l=a[a.length-1];if(l.to-l.spaceAfter.length>r-o.from)return s={range:e};let h=r>=l.to-l.spaceAfter.length&&!/\S/.test(o.text.slice(l.to));if(l.item&&h){let e=l.node.firstChild,i=l.node.getChild("ListItem","ListItem");if(e.to>=r||i&&i.to0&&!/[^\s>]/.test(n.lineAt(o.from-1).text)){let t,e=a.length>1?a[a.length-2]:null,i="";e&&e.item?(t=o.from+e.from,i=e.marker(n,1)):t=o.from+(e?e.to:0);let s=[{from:t,to:r,insert:i}];return"OrderedList"==l.node.name&&Vv(l.item,n,s,-2),e&&"OrderedList"==e.node.name&&Vv(e.item,n,s),{range:et.cursor(t+i.length),changes:s}}{let e=Yv(a,t,o);return{range:et.cursor(r+e.length+1),changes:{from:o.from,insert:e+t.lineBreak}}}}if("Blockquote"==l.node.name&&h&&o.from){let i=n.lineAt(o.from-1),s=/>\s*$/.exec(i.text);if(s&&s.index==l.from){let n=t.changes([{from:i.from+s.index,to:i.to},{from:o.from+l.from,to:o.to}]);return{range:e.map(n),changes:n}}}let c=[];"OrderedList"==l.node.name&&Vv(l.item,n,c);let u=l.item&&l.item.from]*/.exec(o.text)[0].length>=l.to)for(let t=0,i=a.length-1;t<=i;t++)f+=t!=i||u?a[t].blank(to.from&&/\s/.test(o.text.charAt(d-o.from-1));)d--;return f=Ev(f,t),function(t,e){if("OrderedList"!=t.name&&"BulletList"!=t.name)return!1;let i=t.firstChild,n=t.getChild("ListItem","ListItem");if(!n)return!1;let s=e.lineAt(i.to),r=e.lineAt(n.from),o=/^[\s>]*$/.test(s.text);return s.number+(o?0:1){let i=zl(t),n=null,s=t.changeByRange((e=>{let s=e.from,{doc:r}=t;if(e.empty&&Rv.isActiveAt(t,e.from)){let e=r.lineAt(s),n=Xv(function(t,e){let i=t.resolveInner(e,-1),n=e;zv(i)&&(n=i.from,i=i.parent);for(let s;s=i.childBefore(n);)if(zv(s))n=s.from;else{if("OrderedList"!=s.name&&"BulletList"!=s.name)break;i=s.lastChild,n=i.to}return i}(i,s),r);if(n.length){let i=n[n.length-1],r=i.to-i.spaceAfter.length+(i.spaceAfter?1:0);if(s-e.from>r&&!/\S/.test(e.text.slice(r,s-e.from)))return{range:et.cursor(e.from+r),changes:{from:e.from+r,to:s}};if(s-e.from==r&&(!i.item||e.from<=i.item.from||!/\S/.test(e.text.slice(0,i.to)))){let n=e.from+i.from;if(i.item&&i.node.from{if(t&&u){let e=null;if(t=/\S*/.exec(t)[0],e="function"==typeof u?u(t):Nl.matchLanguageName(u,t,!0),e instanceof Nl)return e.support?e.support.language.parser:_l.getSkippingParser(e.load());if(e)return e.parser}return f?f.parser:null}):void 0;var u,f;l.push(function(t){let{codeParser:e,htmlParser:i}=t,n=Wa(((t,n)=>{let s=t.type.id;if(!e||s!=Ng.CodeBlock&&s!=Ng.FencedCode){if(i&&(s==Ng.HTMLBlock||s==Ng.HTMLTag))return{parser:i,overlay:iv(t.node,t.from,t.to)}}else{let i="";if(s==Ng.FencedCode){let e=t.node.getChild(Ng.CodeInfo);e&&(i=n.read(e.from,e.to))}let r=e(i);if(r)return{parser:r,overlay:t=>t.type.id==Ng.CodeText}}return null}));return{wrap:n}}({codeParser:c,htmlParser:o.language.parser})),n&&h.push(gt.high(Cr.of(Lv)));let d=Tv(s.configure(l));return r&&h.push(d.data.of({autocomplete:jv})),new Ul(d,h)}function jv(t){let{state:e,pos:i}=t,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(i-25,i));if(!n)return null;let s=zl(e).resolveInner(i,-1);for(;s&&!s.type.isTop;){if("CodeBlock"==s.name||"FencedCode"==s.name||"ProcessingInstructionBlock"==s.name||"CommentBlock"==s.name||"Link"==s.name||"Image"==s.name)return null;s=s.parent}return{from:i-n[0].length,to:i,options:Wv(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let Bv=null;function Wv(){if(Bv)return Bv;let t=(e=new xc(It.create({extensions:_v}),0,!0),zg(Tg.default,e));var e;return Bv=t?t.options:[]}const Iv=hl({String:Tl.string,Number:Tl.number,"True False":Tl.bool,PropertyName:Tl.propertyName,Null:Tl.null,",":Tl.separator,"[ ]":Tl.squareBracket,"{ }":Tl.brace}),Gv=Ep.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[Iv],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),Uv=El.define({name:"json",parser:Gv.configure({props:[nh.add({Object:uh({except:/^\s*\}/}),Array:uh({except:/^\s*\]/})}),dh.add({"Object Array":Oh})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});var Nv={};function Hv(t,e){for(var i=0;i1&&t.eat("$");var i=t.next();return/['"({]/.test(i)?(e.tokens[0]=ew(i,"("==i?"quote":"{"==i?"def":"string"),sw(t,e)):(/\d/.test(i)||t.eatWhile(/\w/),e.tokens.shift(),"def")};function sw(t,e){return(e.tokens[0]||tw)(t,e)}const rw={name:"shell",startState:function(){return{tokens:[]}},token:function(t,e){return sw(t,e)},languageData:{autocomplete:Fv.concat(Kv,Jv),closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}};var ow=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i");const aw={name:"yaml",token:function(t,e){var i=t.peek(),n=e.escaped;if(e.escaped=!1,"#"==i&&(0==t.pos||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment";if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(e.literal&&t.indentation()>e.keyCol)return t.skipToEnd(),"string";if(e.literal&&(e.literal=!1),t.sol()){if(e.keyCol=0,e.pair=!1,e.pairStart=!1,t.match("---"))return"def";if(t.match("..."))return"def";if(t.match(/^\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==i?e.inlinePairs++:"}"==i?e.inlinePairs--:"["==i?e.inlineList++:e.inlineList--,"meta";if(e.inlineList>0&&!n&&","==i)return t.next(),"meta";if(e.inlinePairs>0&&!n&&","==i)return e.keyCol=0,e.pair=!1,e.pairStart=!1,t.next(),"meta";if(e.pairStart){if(t.match(/^\s*(\||\>)\s*/))return e.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable";if(0==e.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(e.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(ow))return"keyword"}return!e.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(e.pair=!0,e.keyCol=t.indentation(),"atom"):e.pair&&t.match(/^:\s*/)?(e.pairStart=!0,"meta"):(e.pairStart=!1,e.escaped="\\"==i,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:"#"}}};var lw,hw,cw;function uw({view:e,searchConfig:i}){const r=n.useState(""),o=s(r,2),a=o[0],l=o[1],h=t=>{e.dispatch({effects:kf.of(new gf({search:t}))})},c=()=>{h(a),Mf(e)},u=()=>{h(a),Xf(e)};return t.createElement(p,{renderLabel:"",inputRef:t=>{setTimeout((()=>null==t?void 0:t.focus()),0)},size:"small",display:"inline-block",width:"20rem",placeholder:i.placeholder,onChange:(t,e)=>{l(e),h(e)},onKeyDown:t=>{"Enter"===t.key&&(t.shiftKey?u():c())},onKeyUp:t=>{"Escape"===t.key&&jf(e)},renderBeforeInput:lw||(lw=t.createElement(b,{size:"x-small"})),renderAfterInput:t.createElement("span",null,t.createElement(v,{size:"small",withBorder:!1,withBackground:!1,onClick:c,screenReaderLabel:i.nextResultLabel},hw||(hw=t.createElement(m,null))),t.createElement(v,{size:"small",withBorder:!1,withBackground:!1,onClick:u,screenReaderLabel:i.prevResultLabel},cw||(cw=t.createElement(g,null))))})}function fw(n){return n?function(t){return t?[mf.of(t),Ff]:Ff}({createPanel:s=>{var r;const o=document.createElement("div");o.style.padding="8px";return Number(t.version.split(".")[0])>=18?e((()=>import("./index-DxmLT0bY.js").then((t=>t.c))),__vite__mapDeps([0,1])).then((e=>{e.createRoot(o).render(r||(r=t.createElement(uw,{view:s,searchConfig:n})))})).catch((t=>{})):i.render(t.createElement(uw,{view:s,searchConfig:n}),o),{dom:o}}}):[]}const dw=[{key:"ArrowLeft",run:Vd,shift:rO,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Yd,shift:lO},{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:jd,shift:cO},{mac:"Cmd-ArrowLeft",run:eO,shift:wO},{key:"Home",run:Kd,shift:gO},{key:"ArrowRight",run:qd,shift:sO,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:zd,shift:aO},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Dd,shift:hO},{mac:"Cmd-ArrowRight",run:tO,shift:vO},{key:"End",run:Jd,shift:bO},{key:"Delete",run:ZO},{key:"Mod-Delete",mac:"Alt-Delete",run:AO},{key:"Backspace",run:CO,shift:CO},{key:"Mod-Backspace",mac:"Alt-Backspace",run:RO},{mac:"Mod-Delete",run:t=>kO(t,(e=>{let i=t.lineBlockAt(e.head).from;return e.head>i?i:Math.max(0,e.head-1)}))},{mac:"Mod-Backspace",run:MO}],Ow={label:r.string.isRequired,language:r.oneOf(["sh","js","json","javascript","jsx","shell","css","html","markdown","yaml","yml","bash"]),readOnly:r.bool,editable:r.bool,lineNumbers:r.bool,foldGutter:r.bool,highlightActiveLineGutter:r.bool,highlightActiveLine:r.bool,lineWrapping:r.bool,autofocus:r.bool,spellcheck:r.bool,direction:r.oneOf(["ltr","rtl"]),rtlMoveVisually:r.bool,indentOnLoad:r.bool,indentWithTab:r.bool,indentUnit:r.string,defaultValue:r.string,value:w(r.string,"onChange","defaultValue"),onChange:r.func,onFocus:r.func,onBlur:r.func,attachment:r.oneOf(["bottom","top"]),height:r.string,width:r.string,elementRef:r.func,containerRef:r.func,searchConfig:r.object},pw=["label","styles"];var mw,gw,bw,vw;let ww=(mw=o(),gw=a(((t,e)=>{const i=e.attachment,n={top:{borderBottomLeftRadius:0,borderBottomRightRadius:0},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0}},s=1.4375;return{codeEditor:{label:"codeEditor",position:"relative",boxSizing:"border-box",height:e.height||"auto",width:e.width},label:{label:"label",height:"100%",width:"100%"},codeEditorContainer:{label:"codeEditorContainer",height:"100%",width:"100%",borderColor:null==t?void 0:t.borderColor,borderStyle:"solid",borderWidth:null==t?void 0:t.borderWidth,borderRadius:t.borderRadius,marginBottom:"1rem",...i&&{...{top:{marginBottom:0,marginTop:"0.25rem"},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0,marginBottom:"0.25rem"}}[i],...n[i]}},theme:{"&":{overflow:"hidden",background:t.background,fontFamily:t.fontFamily,fontSize:t.fontSize,color:t.color,border:0,height:"100%",width:"100%",minHeight:"1.4375rem",lineHeight:s,borderRadius:t.borderRadius,...i&&{...n[i]}},"&.cm-editor.cm-focused":{outline:`${null==t?void 0:t.borderWidth} solid ${null==t?void 0:t.focusBorderColor}`},".cm-content":{padding:`${t.verticalPadding} 0`},".cm-scroller":{fontFamily:t.fontFamily,lineHeight:1.4375},".cm-gutters":{background:t.gutterBackground,borderColor:t.borderColor},".cm-line":{padding:`0 ${t.horizontalPadding}`},".cm-selectionBackground":{background:"transparent"},".cm-focused .cm-selectionBackground":{background:"#d7d4f0"},".cm-placeholder":{color:"#707070"}},highlightStyle:[{tag:Tl.link,textDecoration:"underline"},{tag:Tl.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Tl.emphasis,fontStyle:"italic"},{tag:Tl.strong,fontWeight:"bold"},{tag:Tl.strikethrough,textDecoration:"line-through"},{tag:Tl.keyword,color:"#708"},{tag:[Tl.atom,Tl.bool,Tl.url,Tl.contentSeparator,Tl.labelName],color:"#219"},{tag:[Tl.literal,Tl.inserted],color:"#164"},{tag:[Tl.string,Tl.deleted],color:"#a11"},{tag:Tl.definition(Tl.variableName),color:"#00f"},{tag:Tl.local(Tl.variableName),color:"#30a"},{tag:Tl.className,color:"#167"},{tag:[Tl.special(Tl.variableName),Tl.macroName],color:"#256"},{tag:Tl.definition(Tl.propertyName),color:"#00c"},{tag:Tl.comment,color:"#940"},{tag:Tl.meta,color:"#757075"},{tag:[Tl.regexp,Tl.escape,Tl.special(Tl.string)],color:"#d13b00"},{tag:[Tl.typeName,Tl.namespace],color:"#008051"},{tag:Tl.invalid,color:"#e60000"}]}}),(t=>{var e,i,n,s,r;const o=t.colors,a=t.borders,l=t.typography,h=t.spacing;return{...{fontFamily:null==l?void 0:l.fontFamilyMonospace,fontSize:null==l?void 0:l.fontSizeSmall,background:null==o||null===(e=o.contrasts)||void 0===e?void 0:e.white1010,color:null==o||null===(i=o.contrasts)||void 0===i?void 0:i.grey125125,gutterBackground:null==o||null===(n=o.contrasts)||void 0===n?void 0:n.grey1111,borderWidth:null==a?void 0:a.widthSmall,borderColor:null==o||null===(s=o.contrasts)||void 0===s?void 0:s.grey1214,borderRadius:null==a?void 0:a.radiusMedium,focusBorderColor:null==o||null===(r=o.contrasts)||void 0===r?void 0:r.blue4570,horizontalPadding:null==h?void 0:h.xSmall,verticalPadding:null==h?void 0:h.xxSmall}}})),mw(bw=gw(bw=l()(bw=h()((vw=class t extends n.Component{addAnimationFrame(t){"function"==typeof t&&this._raf.push(S(t))}cancelAnimationFrames(){this._raf.forEach((t=>t.cancel())),this._raf=[]}focus(){this.addAnimationFrame((()=>{var t;null===(t=this._editorView)||void 0===t||t.focus()}))}get hasFocus(){var t;return null===(t=this._editorView)||void 0===t?void 0:t.hasFocus}selectAll(){this._editorView&&this.addAnimationFrame((()=>{var t;this.dispatchViewSelection({anchor:0,head:null===(t=this.currentDocValue)||void 0===t?void 0:t.length})}))}deselectAll(){this._editorView&&this.addAnimationFrame((()=>{this.dispatchViewSelection({anchor:0,head:0})}))}indentCurrentSelection(){this.addAnimationFrame((()=>{this._editorView&&LO({state:this._editorView.state,dispatch:t=>{var e;null===(e=this._editorView)||void 0===e||e.update([t])}})}))}indentAll(){this.addAnimationFrame((()=>{this._editorView&&this.currentDocValue&&this.indentCodeRange(0,this.currentDocValue.length)}))}indentCodeRange(t,e){this.addAnimationFrame((()=>{this._editorView&&this.currentDocValue&&this.dispatchViewChanges({changes:eh(this._editorView.state,t,e)})}))}dispatchViewEffects(t){this._editorView&&t&&this._editorView.dispatch({effects:t})}dispatchViewChanges({changes:t,selection:e,userEvent:i}){this._editorView&&t&&this._editorView.dispatch({changes:t,...e?{selection:e}:void 0,...i?{userEvent:i}:void 0})}dispatchViewSelection(t){this._editorView&&t&&this._editorView.dispatch({selection:t})}get currentDocValue(){var t;return null===(t=this._editorView)||void 0===t?void 0:t.state.doc}get isControlled(){return"string"==typeof this.props.value}constructor(t){super(t),this._id=void 0,this.ref=null,this._containerRef=void 0,this._editorView=void 0,this._raf=[],this._newSelectionAfterValueChange=void 0,this.handleRef=t=>{const e=this.props.elementRef;this.ref=t,"function"==typeof e&&e(t)},this.handleContainerRef=t=>{const e=this.props.containerRef;this._containerRef=t||void 0,"function"==typeof e&&e(t)},this._id=t.deterministicId()}componentDidMount(){var t,e;const i=this.props,n=i.value,s=i.defaultValue,r=i.autofocus,o=i.indentOnLoad;null===(t=(e=this.props).makeStyles)||void 0===t||t.call(e);const a=It.create({doc:n||s,extensions:this.extensions});this._editorView=new Sr({state:a,parent:this._containerRef}),r&&this.focus(),o&&this.indentAll()}componentWillUnmount(){var t;null===(t=this._editorView)||void 0===t||t.destroy(),this.cancelAnimationFrames()}componentDidUpdate(t){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i),this._editorView&&(this.props.value!==t.value&&this.refreshEditorValue(),this.shouldUpdateExtensions(t)&&this.refreshExtensions())}shouldUpdateExtensions(t){const e=["styles","themeOverride","language","readOnly","editable","lineNumbers","highlightActiveLineGutter","foldGutter","lineWrapping","autofocus","spellcheck","direction","dir","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","highlightActiveLine","attachment"];for(const i of e)if(!c(this.props[i],t[i]))return!0;return!1}get direction(){return this.props.direction||this.props.dir}get extensions(){const t=[...this.baseExtensions,this.languageExtension,this.onChangeExtension,this.focusListenerExtension,this.announceLineNumberExtension];return this.themeExtension&&t.push(this.themeExtension),this.props.lineNumbers&&t.push(function(t={}){return[ra.of(t),Ho(),la]}()),this.props.highlightActiveLine&&t.push(fo),this.props.highlightActiveLineGutter&&t.push(ua),this.props.foldGutter&&t.push(function(t={}){let e=Object.assign(Object.assign({},Mh),t),i=new Xh(e,!0),n=new Xh(e,!1),s=yn.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(Gl)!=t.state.facet(Gl)||t.startState.field(Sh,!1)!=t.state.field(Sh,!1)||zl(t.startState)!=zl(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new Jt;for(let s of t.viewportLineBlocks){let r=yh(t.state,s.from,s.to)?n:mh(t.state,s.from,s.to)?i:null;r&&e.add(s.from,s.from,r)}return e.finish()}}),{domEventHandlers:r}=e;return[s,Uo({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(s))||void 0===e?void 0:e.markers)||Kt.empty},initialSpacer:()=>new Xh(e,!1),domEventHandlers:Object.assign(Object.assign({},r),{click:(t,e,i)=>{if(r.click&&r.click(t,e,i))return!0;let n=yh(t.state,e.from,e.to);if(n)return t.dispatch({effects:vh.of(n)}),!0;let s=mh(t.state,e.from,e.to);return!!s&&(t.dispatch({effects:bh.of(s)}),!0)}})}),Ch()]}()),this.props.lineWrapping&&t.push(Sr.lineWrapping),!1===this.props.editable&&t.push(Sr.editable.of(!1)),this.props.readOnly&&t.push(It.readOnly.of(!0)),this.props.spellcheck&&t.push(Sr.contentAttributes.of({spellcheck:"true"})),this.direction&&t.push(Sr.contentAttributes.of({dir:this.direction})),this.props.indentUnit&&t.push(Fl.of(this.props.indentUnit)),t}get baseExtensions(){return[ao(),ud(),Br(),[Kr,Jr],It.allowMultipleSelections.of(!0),Lh(jh,{fallback:!0}),Kh(),[qu,Tu],Bu(),Sr.mouseSelectionStyle.of(((t,e)=>{return(i=e).altKey&&0==i.button?mo(t,e):null;var i})),vo(),[pf,Of],It.transactionFilter.of((t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let i=t.newDoc,{head:n}=t.newSelection.main,s=i.lineAt(n);if(n>s.from+200)return t;let r=i.sliceString(s.from,n);if(!e.some((t=>t.test(r))))return t;let{state:o}=t,a=-1,l=[];for(let{head:h}of o.selection.ranges){let t=o.doc.lineAt(h);if(t.from==a)continue;a=t.from;let e=th(o,t.from);if(null==e)continue;let i=/^\s*/.exec(t.text)[0],n=Jl(o,e);i!=n&&l.push({from:t.from,to:t.from+i.length,insert:n})}return l.length?[t,{changes:l,sequential:!0}]:t})),fw(this.props.searchConfig),Cr.of(this.keymaps)]}get keymaps(){const t=[...Vu,...this.commandKeybinding,...Zd,...Ph,...Wu,...ip,...this.props.searchConfig?Bf:[]];return this.props.indentWithTab&&t.push(BO),t}get commandKeybinding(){const t=this.props.rtlMoveVisually;if("rtl"===this.direction&&!t){const t=dw.map((t=>t.key?t.key:t.mac?t.mac:t));return[...jO.filter((e=>e.key?t.indexOf(e.key)<0:!!e.mac&&t.indexOf(e.mac)<0)),...dw]}return jO}get themeExtension(){const t=this.props.styles;if(null==t||!t.theme||!t.highlightStyle)return;return[Sr.theme(null==t?void 0:t.theme),Lh(Vh.define(null==t?void 0:t.highlightStyle))]}get languageExtension(){switch(this.props.language){case"json":return new Ul(Uv);case"js":case"jsx":case"javascript":default:return bm({jsx:!0,typescript:!0});case"html":return Wg({matchClosingTags:!0,autoCloseTags:!0});case"css":return wg();case"markdown":return Dv();case"sh":case"shell":case"bash":return lc.define(rw);case"yml":case"yaml":return lc.define(aw)}}callOnChangeHandler(t){const e=this.props,i=e.onChange,n=e.value;this.addAnimationFrame((()=>{"function"==typeof i&&t!==n&&i(t)}))}get onChangeExtension(){return It.changeFilter.of((t=>{if(!this._editorView)return!1;if(t.docChanged){const e=t.newDoc.toString();if(this.isControlled)return e===this.props.value||(this._newSelectionAfterValueChange=t.selection,this.cancelAnimationFrames(),this.callOnChangeHandler(e),!1);this.callOnChangeHandler(e)}return!0}))}get focusListenerExtension(){const t=this.props,e=t.onFocus,i=t.onBlur;return Sr.updateListener.of((t=>{t.focusChanged&&this._editorView&&(this.hasFocus?"function"==typeof e&&e():"function"==typeof i&&i())}))}get announceLineNumberExtension(){return It.transactionExtender.of((t=>{const e=t.selection,i=t.startState.selection.main;if(e&&e.main.empty&&i.empty){const n=t.startState.doc.lineAt(i.head),s=t.newDoc.lineAt(e.main.head);if(n.number!=s.number)return{effects:Sr.announce.of(t.startState.phrase("line ")+s.number+".")}}return null}))}refreshExtensions(){this.dispatchViewEffects(Xt.reconfigure.of(this.extensions))}refreshEditorValue(){if(!this._editorView)return;const t=this.props.value,e=this._editorView.state.doc.toString();if(void 0!==t&&e!==t){let i;const n=t.length-e.length;1===n?i="input.type":-1===n&&(i="delete.backward"),this.dispatchViewChanges({changes:{from:0,to:e.length,insert:t||""},selection:this._newSelectionAfterValueChange,userEvent:i}),this._newSelectionAfterValueChange=void 0}this.props.indentOnLoad&&this.indentAll()}render(){const e=this.props,i=e.label,n=e.styles,s=u(e,pw);return f("div",Object.assign({ref:this.handleRef,css:null==n?void 0:n.codeEditor},d(O(s,t.allowedProps))),f("label",{css:null==n?void 0:n.label,htmlFor:this._id},f(y,null,i),f("div",{ref:this.handleContainerRef,css:null==n?void 0:n.codeEditorContainer})))}},vw.displayName="SourceCodeEditor",vw.componentId="SourceCodeEditor",vw.propTypes=Ow,vw.allowedProps=["label","language","readOnly","editable","lineNumbers","foldGutter","highlightActiveLineGutter","highlightActiveLine","lineWrapping","autofocus","spellcheck","direction","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","defaultValue","value","onChange","onFocus","onBlur","attachment","height","width","elementRef","containerRef","searchConfig"],vw.defaultProps={language:"jsx",readOnly:!1,editable:!0,lineNumbers:!1,foldGutter:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1,lineWrapping:!1,autofocus:!1,spellcheck:!1,rtlMoveVisually:!0,indentOnLoad:!1,indentWithTab:!1,defaultValue:"",height:"auto"},bw=vw))||bw)||bw)||bw)||bw);export{ww as S}; diff --git a/assets/index-Cw9o-rUL.js b/assets/index-CFaT5J52.js similarity index 99% rename from assets/index-Cw9o-rUL.js rename to assets/index-CFaT5J52.js index 5808818..da32daf 100644 --- a/assets/index-Cw9o-rUL.js +++ b/assets/index-CFaT5J52.js @@ -1,4 +1,4 @@ -import{i as e,T as o,w as t,t as i,r as n,k as l,p as r,R as a,S as s,v as d,o as c,l as u,q as p,a7 as g}from"./index-CrryxQyl.js";import{b as h,F as m}from"./index-C6-OLeBB.js";import{u as f,j as v,B as b,f as y,n as S,k as x,m as C,s as k,z,a0 as I}from"./RenderTopNavBar-BTvx9fvK.js";const B={children:e.node,type:e.oneOf(["button","submit","reset"]),size:e.oneOf(["small","medium","large"]),elementRef:e.func,as:e.elementType,interaction:e.oneOf(["enabled","disabled","readonly"]),color:e.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:e.oneOf(["info","inverse"]),display:e.oneOf(["inline-block","block"]),textAlign:e.oneOf(["start","center"]),withBackground:e.bool,margin:o.spacing,cursor:e.string,href:e.string,renderIcon:e.oneOfType([e.node,e.func]),onClick:e.func},w=["children","type","size","as","color","focusColor","display","textAlign","withBackground","margin","cursor","href","renderIcon"];var O,_;let R=t(null,f)(O=i()(((_=class extends n.Component{constructor(...e){super(...e),this._buttonComponent=null,this.ref=null,this.handleElementRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.handleButtonRef=e=>{this._buttonComponent=e}}get focused(){return this._buttonComponent&&this._buttonComponent.focused}focus(){this._buttonComponent&&this._buttonComponent.focus()}render(){const e=this.props,o=e.children,t=e.type,i=e.size,n=e.as,s=e.color,d=e.focusColor,c=e.display,u=e.textAlign,p=e.withBackground,g=e.margin,h=e.cursor,m=e.href,f=e.renderIcon,y=l(e,w),S=v({props:y}),x=this.props.themeOverride,C={...r(y),type:t,size:i,elementRef:this.handleElementRef,ref:this.handleButtonRef,as:n,color:s,interaction:S,focusColor:d,display:c,textAlign:u,withBackground:p,margin:g,cursor:h,href:m,renderIcon:f,themeOverride:x};return a.createElement(b,C,o)}}).displayName="Button",_.componentId="Button",_.propTypes=B,_.allowedProps=["as","children","color","cursor","display","elementRef","focusColor","href","interaction","margin","renderIcon","size","textAlign","type","withBackground","onClick"],_.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",display:"inline-block",textAlign:"center",withBackground:!0,margin:"0",cursor:"pointer"},O=_))||O)||O;var F,T;class M extends n.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}render(){return a.createElement(s,Object.assign({},this.props,{name:"IconCopy",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),F||(F=a.createElement("path",{d:"M0 1919.887h1467.88V452.008H0v1467.88ZM1354.965 564.922v1242.051H112.914V564.922h1242.051ZM1920 0v1467.992h-338.741v-113.027h225.827V112.914H565.035V338.74H452.008V0H1920ZM338.741 1016.93h790.397V904.016H338.74v112.914Zm0 451.062h790.397v-113.027H338.74v113.027Zm0-225.588h564.57v-112.913H338.74v112.913Z",fillRule:"evenodd"})))}}M.glyphName="copy",M.variant="Line",M.displayName="IconCopyLine",M.propTypes={...s.propTypes},M.allowedProps=[...s.allowedProps];class P extends n.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}render(){return a.createElement(s,Object.assign({},this.props,{name:"IconX",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),T||(T=a.createElement("path",{d:"M797.32 985.882 344.772 1438.43l188.561 188.562 452.549-452.549 452.548 452.549 188.562-188.562-452.549-452.548 452.549-452.549-188.562-188.561L985.882 797.32 533.333 344.772 344.772 533.333z"})))}}P.glyphName="x",P.variant="Solid",P.displayName="IconXSolid",P.propTypes={...s.propTypes},P.allowedProps=[...s.allowedProps];const E={expanded:y(e.bool,"onToggle","defaultExpanded"),defaultExpanded:e.bool,onToggle:e.func,children:e.func,render:e.func};var H,$;const D=({expanded:e})=>({expanded:!e});let W=d()((($=class extends n.Component{constructor(e){super(e),this._contentId=void 0,this.handleToggle=e=>{var o,t;this.isControlled()||this.setState(D),null===(o=(t=this.props).onToggle)||void 0===o||o.call(t,e,!this.expanded)},this.state={expanded:this.isControlled(e)?e.expanded:e.defaultExpanded},this._contentId=e.deterministicId()}get expanded(){return this.isControlled()?this.props.expanded:this.state.expanded}isControlled(e=this.props){return"boolean"==typeof e.expanded}static getDerivedStateFromProps(e,o){return"boolean"==typeof e.expanded&&e.expanded!==o.expanded?{expanded:e.expanded}:null}render(){const e=this.props,o=e.children,t=e.render,i=void 0===t?o:t;return"function"==typeof i?i({expanded:this.expanded,getToggleProps:(e={})=>({...e,"aria-controls":this._contentId,"aria-expanded":this.expanded,onClick:S(this.handleToggle,e.onClick)}),getDetailsProps:()=>({id:this._contentId})}):null}}).displayName="Expandable",$.propTypes=E,$.allowedProps=["expanded","defaultExpanded","onToggle","children","render"],$.defaultProps={defaultExpanded:!1},H=$))||H;const L={label:e.node.isRequired,value:e.oneOfType([e.string,e.number]),id:e.string,name:e.string,checked:e.bool,disabled:e.bool,readOnly:e.bool,variant:e.oneOf(["simple","toggle"]),size:e.oneOf(["small","medium","large"]),context:e.oneOf(["success","warning","danger","off"]),inline:e.bool,onClick:e.func,onChange:e.func};var j,A;let N=d()(j=t(((e,o)=>{const t=o.disabled,i=o.variant,n=o.context,l=o.size,r=o.inline,a=e=>`[class$=-radioInput__input]:${e} + [class$=-radioInput__control] &`,s={success:{backgroundColor:e.toggleBackgroundSuccess},danger:{backgroundColor:e.toggleBackgroundDanger},warning:{backgroundColor:e.toggleBackgroundWarning},off:{backgroundColor:e.toggleBackgroundOff}},d={simple:{base:{boxSizing:"border-box",display:"block",position:"relative",marginInlineEnd:e.simpleFacadeMarginEnd,marginInlineStart:"0",flexShrink:0,minWidth:"1rem",transition:"all 0.2s ease-out",borderRadius:"100%",border:`${e.borderWidth} solid ${e.borderColor}`,background:e.background,"&::before":{content:'""',position:"absolute",top:"-0.375rem",left:"-0.375rem",width:"calc(100% + 0.75rem)",height:"calc(100% + 0.75rem)",boxSizing:"border-box",borderRadius:"100%",border:`${e.focusBorderWidth} ${e.focusBorderStyle} ${e.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none"},[a("hover")]:{borderColor:e.hoverBorderColor},[a("focus")]:{background:e.background,"&::before":{transform:"scale(1)",opacity:1}}},small:{width:e.simpleFacadeSmallSize,height:e.simpleFacadeSmallSize,[a("checked")]:{background:e.background,boxShadow:`inset 0 0 0 ${e.simpleCheckedInsetSmall} ${e.hoverBorderColor}`,borderColor:e.hoverBorderColor}},medium:{width:e.simpleFacadeMediumSize,height:e.simpleFacadeMediumSize,[a("checked")]:{background:e.background,boxShadow:`inset 0 0 0 ${e.simpleCheckedInsetMedium} ${e.hoverBorderColor}`,borderColor:e.hoverBorderColor}},large:{width:e.simpleFacadeLargeSize,height:e.simpleFacadeLargeSize,[a("checked")]:{background:e.background,boxShadow:`inset 0 0 0 ${e.simpleCheckedInsetLarge} ${e.hoverBorderColor}`,borderColor:e.hoverBorderColor}}},toggle:{base:{boxSizing:"border-box",visibility:"hidden",display:"block",position:"absolute",zIndex:1,top:"0",left:"0",width:"100%",height:"100%",boxShadow:e.toggleShadow,borderRadius:e.toggleBorderRadius,...s[n],"&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",boxSizing:"border-box",borderRadius:`calc(${e.toggleBorderRadius} + 0.0625rem)`,border:`${e.focusBorderWidth} ${e.focusBorderStyle} ${e.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0},[a("checked")]:{visibility:"visible"},[a("focus")]:{"&::before":{opacity:1,transform:"scale(1)"}}},small:{},medium:{},large:{}}},c={simple:{base:{display:"flex",alignItems:"flex-start"},small:{},medium:{},large:{}},toggle:{base:{display:"block",userSelect:"none",boxSizing:"border-box",position:"relative"},small:{padding:"0 0.5rem",height:e.toggleSmallHeight},medium:{padding:"0 0.875rem",height:e.toggleMediumHeight},large:{padding:"0 1rem",height:e.toggleLargeHeight}}},u={simple:{base:{},small:{fontSize:e.simpleFontSizeSmall},medium:{fontSize:e.simpleFontSizeMedium},large:{fontSize:e.simpleFontSizeLarge}},toggle:{base:{position:"relative",zIndex:1,textTransform:"uppercase",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:1,display:"flex",alignItems:"center",minWidth:"0.0625rem",[a("checked")]:{color:e.toggleHandleText},[a("focus")]:{textDecoration:"underline"}},small:{fontSize:e.toggleSmallFontSize,height:e.toggleSmallHeight,svg:{fontSize:`calc(${e.toggleSmallFontSize} + 0.375rem)`}},medium:{fontSize:e.toggleMediumFontSize,height:e.toggleMediumHeight,svg:{fontSize:`calc(${e.toggleMediumFontSize} + 0.375rem)`}},large:{fontSize:e.toggleLargeFontSize,height:e.toggleLargeHeight,svg:{fontSize:`calc(${e.toggleLargeFontSize} + 0.375rem)`}}}},p={padding:"0",margin:"0",fontSize:"inherit",lineHeight:"inherit",width:"auto",position:"absolute",top:"0",left:"0",opacity:1e-4};return{radioInput:{label:"radioInput",position:"relative",width:"100%",...t&&{opacity:.5},...r&&{display:"inline-block",verticalAlign:"middle",width:"auto"},"&:hover":{cursor:"default",...t&&{cursor:"not-allowed"}}},container:{width:"fit-content"},input:{label:"radioInput__input",...p,'&:is(input)[type="radio"]':p,'&:-webkit-any(input)[type="radio"]':p},control:{label:"radioInput__control",all:"initial",display:"block",direction:"inherit",textAlign:"start",...c[i].base,...c[i][l]},facade:{label:"radioInput__facade",...d[i].base,...d[i][l]},label:{label:"radioInput__label",flex:"1 1 auto",color:e.labelColor,fontFamily:e.labelFontFamily,fontWeight:e.labelFontWeight,lineHeight:e.labelLineHeight,...u[i].base,...u[i][l],cursor:"default"}}}),(e=>{var o,t,i,n,l,r,a,s,d,c,u;const p=e.spacing,g=e.borders,h=e.colors,m=e.forms,f=e.shadows,v=e.typography,b=e.key,y={canvas:{focusBorderColor:e["ic-brand-primary"],hoverBorderColor:e["ic-brand-font-color-dark"],labelColor:e["ic-brand-font-color-dark"]},"canvas-high-contrast":{toggleBackgroundOff:null==h||null===(o=h.contrasts)||void 0===o?void 0:o.grey125125}};return{...{labelColor:null==h||null===(t=h.contrasts)||void 0===t?void 0:t.grey125125,labelFontFamily:null==v?void 0:v.fontFamily,labelFontWeight:null==v?void 0:v.fontWeightNormal,labelLineHeight:null==v?void 0:v.lineHeightCondensed,background:null==h||null===(i=h.contrasts)||void 0===i?void 0:i.white1010,borderWidth:null==g?void 0:g.widthSmall,borderColor:null==h||null===(n=h.contrasts)||void 0===n?void 0:n.grey1214,hoverBorderColor:null==h||null===(l=h.contrasts)||void 0===l?void 0:l.grey125125,controlSize:"0.1875rem",focusBorderColor:null==h||null===(r=h.contrasts)||void 0===r?void 0:r.blue4570,focusBorderWidth:null==g?void 0:g.widthMedium,focusBorderStyle:null==g?void 0:g.style,simpleFacadeSmallSize:"1rem",simpleFacadeMediumSize:"1.25rem",simpleFacadeLargeSize:"1.75rem",simpleCheckedInsetSmall:"0.1875rem",simpleCheckedInsetMedium:"0.25rem",simpleCheckedInsetLarge:"0.375rem",simpleFontSizeSmall:null==v?void 0:v.fontSizeSmall,simpleFontSizeMedium:null==v?void 0:v.fontSizeMedium,simpleFontSizeLarge:null==v?void 0:v.fontSizeLarge,simpleFacadeMarginEnd:null==p?void 0:p.xSmall,toggleBorderRadius:null==g?void 0:g.radiusSmall,toggleBorderWidth:null==g?void 0:g.widthLarge,toggleBackgroundSuccess:null==h||null===(a=h.contrasts)||void 0===a?void 0:a.green4570,toggleBackgroundOff:null==h||null===(s=h.contrasts)||void 0===s?void 0:s.green4570,toggleBackgroundDanger:null==h||null===(d=h.contrasts)||void 0===d?void 0:d.orange4570,toggleBackgroundWarning:null==h||null===(c=h.contrasts)||void 0===c?void 0:c.orange4570,toggleHandleText:null==h||null===(u=h.contrasts)||void 0===u?void 0:u.white1010,toggleSmallHeight:null==m?void 0:m.inputHeightSmall,toggleMediumHeight:null==m?void 0:m.inputHeightMedium,toggleLargeHeight:null==m?void 0:m.inputHeightLarge,toggleShadow:null==f?void 0:f.depth1,toggleSmallFontSize:null==v?void 0:v.fontSizeXSmall,toggleMediumFontSize:null==v?void 0:v.fontSizeSmall,toggleLargeFontSize:null==v?void 0:v.fontSizeMedium},...y[b]}}))(j=i()((A=class e extends n.Component{constructor(e){super(e),this.ref=null,this._defaultId=void 0,this._input=null,this.handleClick=e=>{this.props.disabled||this.props.readOnly?e.preventDefault():"function"==typeof this.props.onClick&&this.props.onClick(e)},this.handleChange=e=>{this.props.disabled||this.props.readOnly?e.preventDefault():(void 0===this.props.checked&&this.setState({checked:!this.state.checked}),"function"==typeof this.props.onChange&&this.props.onChange(e))},void 0===e.checked&&(this.state={checked:!1}),this._defaultId=e.deterministicId()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}focus(){var e;null===(e=this._input)||void 0===e||e.focus()}get id(){return this.props.id||this._defaultId}get focused(){return x(this._input)}get checked(){return void 0===this.props.checked?this.state.checked:this.props.checked}render(){const o=this.props,t=o.disabled,i=o.readOnly,n=o.label,l=o.value,r=o.name,a=o.styles,s=c(this.props,e.allowedProps);return u("div",{css:null==a?void 0:a.radioInput,ref:e=>{this.ref=e}},u("div",{css:null==a?void 0:a.container},u("input",Object.assign({},s,{id:this.id,ref:e=>{this._input=e},value:l,name:r,checked:this.checked,type:"radio",css:null==a?void 0:a.input,disabled:t||i,"aria-disabled":t||i?"true":void 0,onChange:this.handleChange,onClick:this.handleClick})),u("label",{css:null==a?void 0:a.control,htmlFor:this.id},u("span",{css:null==a?void 0:a.facade,"aria-hidden":"true"}),u("span",{css:null==a?void 0:a.label},n))))}},A.displayName="RadioInput",A.componentId="RadioInput",A.allowedProps=["label","value","id","name","checked","disabled","readOnly","variant","size","context","inline","onClick","onChange"],A.propTypes=L,A.defaultProps={variant:"simple",size:"medium",disabled:!1,inline:!1,context:"success",readOnly:!1},j=A))||j)||j)||j;const V={name:e.string.isRequired,description:e.node.isRequired,defaultValue:e.oneOfType([e.string,e.number]),value:y(e.oneOfType([e.string,e.number])),onChange:e.func,disabled:e.bool,readOnly:e.bool,messages:e.arrayOf(h.message),children:e.node,variant:e.oneOf(["simple","toggle"]),size:e.oneOf(["small","medium","large"]),layout:e.oneOf(["stacked","columns","inline"])};var Z,q;let G=d()(Z=i()((q=class e extends n.Component{constructor(e){super(e),this.ref=null,this._messagesId=void 0,this.handleRef=e=>{this.ref=e},this.handleChange=e=>{const o=e.target.value;this.props.disabled||this.props.readOnly?e.preventDefault():(void 0===this.props.value&&this.setState({value:o}),"function"==typeof this.props.onChange&&this.props.onChange(e,o))},void 0===e.value&&(this.state={value:e.defaultValue}),this._messagesId=e.deterministicId("RadioInputGroup-messages")}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get value(){return void 0===this.props.value?this.state.value:this.props.value}renderChildren(){const e=this.props,o=e.children,t=e.name,i=e.variant,l=e.size,r=e.disabled,a=e.readOnly;return n.Children.map(o,((e,o)=>{if(C(e,[N])){const n=this.value===e.props.value,s=!this.value&&0===o;return k(e,{name:t,disabled:r||e.props.disabled,variant:i,size:l,checked:n,onChange:this.handleChange,readOnly:a||e.props.readOnly,width:e.props.width||"auto","aria-describedby":this.hasMessages?this._messagesId:void 0,tabIndex:n||s?0:-1,label:e.props.label})}return e}))}render(){const o=this.props,t=o.variant,i=o.layout,n=o.description;return a.createElement(m,Object.assign({},c(this.props,e.allowedProps),p(this.props,m.allowedProps),{description:n,layout:"columns"===i&&"toggle"===t?"stacked":i,vAlign:"toggle"===t?"middle":"top",rowSpacing:"small",colSpacing:"toggle"===t?"none":"small",startAt:"toggle"===t?"small":void 0,messagesId:this._messagesId,elementRef:this.handleRef,role:"radiogroup"}),this.renderChildren())}},q.displayName="RadioInputGroup",q.componentId="RadioInputGroup",q.allowedProps=["name","description","defaultValue","value","onChange","disabled","readOnly","messages","children","variant","size","layout"],q.propTypes=V,q.defaultProps={disabled:!1,variant:"simple",size:"medium",layout:"stacked",readOnly:!1},Z=q))||Z)||Z;const X=g` +import{i as e,T as o,w as t,t as i,r as n,k as l,p as r,R as a,S as s,v as d,o as c,l as u,q as p,a7 as g}from"./index-DxmLT0bY.js";import{b as h,F as m}from"./index-CmNFgSR4.js";import{u as f,j as v,B as b,f as y,n as S,k as x,m as C,s as k,z,a0 as I}from"./RenderTopNavBar-BObK9Y19.js";const B={children:e.node,type:e.oneOf(["button","submit","reset"]),size:e.oneOf(["small","medium","large"]),elementRef:e.func,as:e.elementType,interaction:e.oneOf(["enabled","disabled","readonly"]),color:e.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:e.oneOf(["info","inverse"]),display:e.oneOf(["inline-block","block"]),textAlign:e.oneOf(["start","center"]),withBackground:e.bool,margin:o.spacing,cursor:e.string,href:e.string,renderIcon:e.oneOfType([e.node,e.func]),onClick:e.func},w=["children","type","size","as","color","focusColor","display","textAlign","withBackground","margin","cursor","href","renderIcon"];var O,_;let R=t(null,f)(O=i()(((_=class extends n.Component{constructor(...e){super(...e),this._buttonComponent=null,this.ref=null,this.handleElementRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.handleButtonRef=e=>{this._buttonComponent=e}}get focused(){return this._buttonComponent&&this._buttonComponent.focused}focus(){this._buttonComponent&&this._buttonComponent.focus()}render(){const e=this.props,o=e.children,t=e.type,i=e.size,n=e.as,s=e.color,d=e.focusColor,c=e.display,u=e.textAlign,p=e.withBackground,g=e.margin,h=e.cursor,m=e.href,f=e.renderIcon,y=l(e,w),S=v({props:y}),x=this.props.themeOverride,C={...r(y),type:t,size:i,elementRef:this.handleElementRef,ref:this.handleButtonRef,as:n,color:s,interaction:S,focusColor:d,display:c,textAlign:u,withBackground:p,margin:g,cursor:h,href:m,renderIcon:f,themeOverride:x};return a.createElement(b,C,o)}}).displayName="Button",_.componentId="Button",_.propTypes=B,_.allowedProps=["as","children","color","cursor","display","elementRef","focusColor","href","interaction","margin","renderIcon","size","textAlign","type","withBackground","onClick"],_.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",display:"inline-block",textAlign:"center",withBackground:!0,margin:"0",cursor:"pointer"},O=_))||O)||O;var F,T;class M extends n.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}render(){return a.createElement(s,Object.assign({},this.props,{name:"IconCopy",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),F||(F=a.createElement("path",{d:"M0 1919.887h1467.88V452.008H0v1467.88ZM1354.965 564.922v1242.051H112.914V564.922h1242.051ZM1920 0v1467.992h-338.741v-113.027h225.827V112.914H565.035V338.74H452.008V0H1920ZM338.741 1016.93h790.397V904.016H338.74v112.914Zm0 451.062h790.397v-113.027H338.74v113.027Zm0-225.588h564.57v-112.913H338.74v112.913Z",fillRule:"evenodd"})))}}M.glyphName="copy",M.variant="Line",M.displayName="IconCopyLine",M.propTypes={...s.propTypes},M.allowedProps=[...s.allowedProps];class P extends n.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)}}render(){return a.createElement(s,Object.assign({},this.props,{name:"IconX",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),T||(T=a.createElement("path",{d:"M797.32 985.882 344.772 1438.43l188.561 188.562 452.549-452.549 452.548 452.549 188.562-188.562-452.549-452.548 452.549-452.549-188.562-188.561L985.882 797.32 533.333 344.772 344.772 533.333z"})))}}P.glyphName="x",P.variant="Solid",P.displayName="IconXSolid",P.propTypes={...s.propTypes},P.allowedProps=[...s.allowedProps];const E={expanded:y(e.bool,"onToggle","defaultExpanded"),defaultExpanded:e.bool,onToggle:e.func,children:e.func,render:e.func};var H,$;const D=({expanded:e})=>({expanded:!e});let W=d()((($=class extends n.Component{constructor(e){super(e),this._contentId=void 0,this.handleToggle=e=>{var o,t;this.isControlled()||this.setState(D),null===(o=(t=this.props).onToggle)||void 0===o||o.call(t,e,!this.expanded)},this.state={expanded:this.isControlled(e)?e.expanded:e.defaultExpanded},this._contentId=e.deterministicId()}get expanded(){return this.isControlled()?this.props.expanded:this.state.expanded}isControlled(e=this.props){return"boolean"==typeof e.expanded}static getDerivedStateFromProps(e,o){return"boolean"==typeof e.expanded&&e.expanded!==o.expanded?{expanded:e.expanded}:null}render(){const e=this.props,o=e.children,t=e.render,i=void 0===t?o:t;return"function"==typeof i?i({expanded:this.expanded,getToggleProps:(e={})=>({...e,"aria-controls":this._contentId,"aria-expanded":this.expanded,onClick:S(this.handleToggle,e.onClick)}),getDetailsProps:()=>({id:this._contentId})}):null}}).displayName="Expandable",$.propTypes=E,$.allowedProps=["expanded","defaultExpanded","onToggle","children","render"],$.defaultProps={defaultExpanded:!1},H=$))||H;const L={label:e.node.isRequired,value:e.oneOfType([e.string,e.number]),id:e.string,name:e.string,checked:e.bool,disabled:e.bool,readOnly:e.bool,variant:e.oneOf(["simple","toggle"]),size:e.oneOf(["small","medium","large"]),context:e.oneOf(["success","warning","danger","off"]),inline:e.bool,onClick:e.func,onChange:e.func};var j,A;let N=d()(j=t(((e,o)=>{const t=o.disabled,i=o.variant,n=o.context,l=o.size,r=o.inline,a=e=>`[class$=-radioInput__input]:${e} + [class$=-radioInput__control] &`,s={success:{backgroundColor:e.toggleBackgroundSuccess},danger:{backgroundColor:e.toggleBackgroundDanger},warning:{backgroundColor:e.toggleBackgroundWarning},off:{backgroundColor:e.toggleBackgroundOff}},d={simple:{base:{boxSizing:"border-box",display:"block",position:"relative",marginInlineEnd:e.simpleFacadeMarginEnd,marginInlineStart:"0",flexShrink:0,minWidth:"1rem",transition:"all 0.2s ease-out",borderRadius:"100%",border:`${e.borderWidth} solid ${e.borderColor}`,background:e.background,"&::before":{content:'""',position:"absolute",top:"-0.375rem",left:"-0.375rem",width:"calc(100% + 0.75rem)",height:"calc(100% + 0.75rem)",boxSizing:"border-box",borderRadius:"100%",border:`${e.focusBorderWidth} ${e.focusBorderStyle} ${e.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none"},[a("hover")]:{borderColor:e.hoverBorderColor},[a("focus")]:{background:e.background,"&::before":{transform:"scale(1)",opacity:1}}},small:{width:e.simpleFacadeSmallSize,height:e.simpleFacadeSmallSize,[a("checked")]:{background:e.background,boxShadow:`inset 0 0 0 ${e.simpleCheckedInsetSmall} ${e.hoverBorderColor}`,borderColor:e.hoverBorderColor}},medium:{width:e.simpleFacadeMediumSize,height:e.simpleFacadeMediumSize,[a("checked")]:{background:e.background,boxShadow:`inset 0 0 0 ${e.simpleCheckedInsetMedium} ${e.hoverBorderColor}`,borderColor:e.hoverBorderColor}},large:{width:e.simpleFacadeLargeSize,height:e.simpleFacadeLargeSize,[a("checked")]:{background:e.background,boxShadow:`inset 0 0 0 ${e.simpleCheckedInsetLarge} ${e.hoverBorderColor}`,borderColor:e.hoverBorderColor}}},toggle:{base:{boxSizing:"border-box",visibility:"hidden",display:"block",position:"absolute",zIndex:1,top:"0",left:"0",width:"100%",height:"100%",boxShadow:e.toggleShadow,borderRadius:e.toggleBorderRadius,...s[n],"&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",boxSizing:"border-box",borderRadius:`calc(${e.toggleBorderRadius} + 0.0625rem)`,border:`${e.focusBorderWidth} ${e.focusBorderStyle} ${e.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0},[a("checked")]:{visibility:"visible"},[a("focus")]:{"&::before":{opacity:1,transform:"scale(1)"}}},small:{},medium:{},large:{}}},c={simple:{base:{display:"flex",alignItems:"flex-start"},small:{},medium:{},large:{}},toggle:{base:{display:"block",userSelect:"none",boxSizing:"border-box",position:"relative"},small:{padding:"0 0.5rem",height:e.toggleSmallHeight},medium:{padding:"0 0.875rem",height:e.toggleMediumHeight},large:{padding:"0 1rem",height:e.toggleLargeHeight}}},u={simple:{base:{},small:{fontSize:e.simpleFontSizeSmall},medium:{fontSize:e.simpleFontSizeMedium},large:{fontSize:e.simpleFontSizeLarge}},toggle:{base:{position:"relative",zIndex:1,textTransform:"uppercase",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:1,display:"flex",alignItems:"center",minWidth:"0.0625rem",[a("checked")]:{color:e.toggleHandleText},[a("focus")]:{textDecoration:"underline"}},small:{fontSize:e.toggleSmallFontSize,height:e.toggleSmallHeight,svg:{fontSize:`calc(${e.toggleSmallFontSize} + 0.375rem)`}},medium:{fontSize:e.toggleMediumFontSize,height:e.toggleMediumHeight,svg:{fontSize:`calc(${e.toggleMediumFontSize} + 0.375rem)`}},large:{fontSize:e.toggleLargeFontSize,height:e.toggleLargeHeight,svg:{fontSize:`calc(${e.toggleLargeFontSize} + 0.375rem)`}}}},p={padding:"0",margin:"0",fontSize:"inherit",lineHeight:"inherit",width:"auto",position:"absolute",top:"0",left:"0",opacity:1e-4};return{radioInput:{label:"radioInput",position:"relative",width:"100%",...t&&{opacity:.5},...r&&{display:"inline-block",verticalAlign:"middle",width:"auto"},"&:hover":{cursor:"default",...t&&{cursor:"not-allowed"}}},container:{width:"fit-content"},input:{label:"radioInput__input",...p,'&:is(input)[type="radio"]':p,'&:-webkit-any(input)[type="radio"]':p},control:{label:"radioInput__control",all:"initial",display:"block",direction:"inherit",textAlign:"start",...c[i].base,...c[i][l]},facade:{label:"radioInput__facade",...d[i].base,...d[i][l]},label:{label:"radioInput__label",flex:"1 1 auto",color:e.labelColor,fontFamily:e.labelFontFamily,fontWeight:e.labelFontWeight,lineHeight:e.labelLineHeight,...u[i].base,...u[i][l],cursor:"default"}}}),(e=>{var o,t,i,n,l,r,a,s,d,c,u;const p=e.spacing,g=e.borders,h=e.colors,m=e.forms,f=e.shadows,v=e.typography,b=e.key,y={canvas:{focusBorderColor:e["ic-brand-primary"],hoverBorderColor:e["ic-brand-font-color-dark"],labelColor:e["ic-brand-font-color-dark"]},"canvas-high-contrast":{toggleBackgroundOff:null==h||null===(o=h.contrasts)||void 0===o?void 0:o.grey125125}};return{...{labelColor:null==h||null===(t=h.contrasts)||void 0===t?void 0:t.grey125125,labelFontFamily:null==v?void 0:v.fontFamily,labelFontWeight:null==v?void 0:v.fontWeightNormal,labelLineHeight:null==v?void 0:v.lineHeightCondensed,background:null==h||null===(i=h.contrasts)||void 0===i?void 0:i.white1010,borderWidth:null==g?void 0:g.widthSmall,borderColor:null==h||null===(n=h.contrasts)||void 0===n?void 0:n.grey1214,hoverBorderColor:null==h||null===(l=h.contrasts)||void 0===l?void 0:l.grey125125,controlSize:"0.1875rem",focusBorderColor:null==h||null===(r=h.contrasts)||void 0===r?void 0:r.blue4570,focusBorderWidth:null==g?void 0:g.widthMedium,focusBorderStyle:null==g?void 0:g.style,simpleFacadeSmallSize:"1rem",simpleFacadeMediumSize:"1.25rem",simpleFacadeLargeSize:"1.75rem",simpleCheckedInsetSmall:"0.1875rem",simpleCheckedInsetMedium:"0.25rem",simpleCheckedInsetLarge:"0.375rem",simpleFontSizeSmall:null==v?void 0:v.fontSizeSmall,simpleFontSizeMedium:null==v?void 0:v.fontSizeMedium,simpleFontSizeLarge:null==v?void 0:v.fontSizeLarge,simpleFacadeMarginEnd:null==p?void 0:p.xSmall,toggleBorderRadius:null==g?void 0:g.radiusSmall,toggleBorderWidth:null==g?void 0:g.widthLarge,toggleBackgroundSuccess:null==h||null===(a=h.contrasts)||void 0===a?void 0:a.green4570,toggleBackgroundOff:null==h||null===(s=h.contrasts)||void 0===s?void 0:s.green4570,toggleBackgroundDanger:null==h||null===(d=h.contrasts)||void 0===d?void 0:d.orange4570,toggleBackgroundWarning:null==h||null===(c=h.contrasts)||void 0===c?void 0:c.orange4570,toggleHandleText:null==h||null===(u=h.contrasts)||void 0===u?void 0:u.white1010,toggleSmallHeight:null==m?void 0:m.inputHeightSmall,toggleMediumHeight:null==m?void 0:m.inputHeightMedium,toggleLargeHeight:null==m?void 0:m.inputHeightLarge,toggleShadow:null==f?void 0:f.depth1,toggleSmallFontSize:null==v?void 0:v.fontSizeXSmall,toggleMediumFontSize:null==v?void 0:v.fontSizeSmall,toggleLargeFontSize:null==v?void 0:v.fontSizeMedium},...y[b]}}))(j=i()((A=class e extends n.Component{constructor(e){super(e),this.ref=null,this._defaultId=void 0,this._input=null,this.handleClick=e=>{this.props.disabled||this.props.readOnly?e.preventDefault():"function"==typeof this.props.onClick&&this.props.onClick(e)},this.handleChange=e=>{this.props.disabled||this.props.readOnly?e.preventDefault():(void 0===this.props.checked&&this.setState({checked:!this.state.checked}),"function"==typeof this.props.onChange&&this.props.onChange(e))},void 0===e.checked&&(this.state={checked:!1}),this._defaultId=e.deterministicId()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}focus(){var e;null===(e=this._input)||void 0===e||e.focus()}get id(){return this.props.id||this._defaultId}get focused(){return x(this._input)}get checked(){return void 0===this.props.checked?this.state.checked:this.props.checked}render(){const o=this.props,t=o.disabled,i=o.readOnly,n=o.label,l=o.value,r=o.name,a=o.styles,s=c(this.props,e.allowedProps);return u("div",{css:null==a?void 0:a.radioInput,ref:e=>{this.ref=e}},u("div",{css:null==a?void 0:a.container},u("input",Object.assign({},s,{id:this.id,ref:e=>{this._input=e},value:l,name:r,checked:this.checked,type:"radio",css:null==a?void 0:a.input,disabled:t||i,"aria-disabled":t||i?"true":void 0,onChange:this.handleChange,onClick:this.handleClick})),u("label",{css:null==a?void 0:a.control,htmlFor:this.id},u("span",{css:null==a?void 0:a.facade,"aria-hidden":"true"}),u("span",{css:null==a?void 0:a.label},n))))}},A.displayName="RadioInput",A.componentId="RadioInput",A.allowedProps=["label","value","id","name","checked","disabled","readOnly","variant","size","context","inline","onClick","onChange"],A.propTypes=L,A.defaultProps={variant:"simple",size:"medium",disabled:!1,inline:!1,context:"success",readOnly:!1},j=A))||j)||j)||j;const V={name:e.string.isRequired,description:e.node.isRequired,defaultValue:e.oneOfType([e.string,e.number]),value:y(e.oneOfType([e.string,e.number])),onChange:e.func,disabled:e.bool,readOnly:e.bool,messages:e.arrayOf(h.message),children:e.node,variant:e.oneOf(["simple","toggle"]),size:e.oneOf(["small","medium","large"]),layout:e.oneOf(["stacked","columns","inline"])};var Z,q;let G=d()(Z=i()((q=class e extends n.Component{constructor(e){super(e),this.ref=null,this._messagesId=void 0,this.handleRef=e=>{this.ref=e},this.handleChange=e=>{const o=e.target.value;this.props.disabled||this.props.readOnly?e.preventDefault():(void 0===this.props.value&&this.setState({value:o}),"function"==typeof this.props.onChange&&this.props.onChange(e,o))},void 0===e.value&&(this.state={value:e.defaultValue}),this._messagesId=e.deterministicId("RadioInputGroup-messages")}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get value(){return void 0===this.props.value?this.state.value:this.props.value}renderChildren(){const e=this.props,o=e.children,t=e.name,i=e.variant,l=e.size,r=e.disabled,a=e.readOnly;return n.Children.map(o,((e,o)=>{if(C(e,[N])){const n=this.value===e.props.value,s=!this.value&&0===o;return k(e,{name:t,disabled:r||e.props.disabled,variant:i,size:l,checked:n,onChange:this.handleChange,readOnly:a||e.props.readOnly,width:e.props.width||"auto","aria-describedby":this.hasMessages?this._messagesId:void 0,tabIndex:n||s?0:-1,label:e.props.label})}return e}))}render(){const o=this.props,t=o.variant,i=o.layout,n=o.description;return a.createElement(m,Object.assign({},c(this.props,e.allowedProps),p(this.props,m.allowedProps),{description:n,layout:"columns"===i&&"toggle"===t?"stacked":i,vAlign:"toggle"===t?"middle":"top",rowSpacing:"small",colSpacing:"toggle"===t?"none":"small",startAt:"toggle"===t?"small":void 0,messagesId:this._messagesId,elementRef:this.handleRef,role:"radiogroup"}),this.renderChildren())}},q.displayName="RadioInputGroup",q.componentId="RadioInputGroup",q.allowedProps=["name","description","defaultValue","value","onChange","disabled","readOnly","messages","children","variant","size","layout"],q.propTypes=V,q.defaultProps={disabled:!1,variant:"simple",size:"medium",layout:"stacked",readOnly:!1},Z=q))||Z)||Z;const X=g` to { opacity: 1; }`,U={variant:e.oneOf(["default","filled"]),summary:e.node.isRequired,expanded:y(e.bool,"onToggle","defaultExpanded"),defaultExpanded:e.bool,onToggle:e.func,icon:e.func,iconExpanded:e.func,iconPosition:e.oneOf(["start","end"]),fluidWidth:e.bool,children:e.node,size:e.oneOf(["small","medium","large"])};var J,K;let Q=t(((e,o,t)=>{const i=o.fluidWidth,n=o.iconPosition,l=o.size,r=o.variant,a="end"===n&&("filled"===r||i),s=i?{display:"block",width:"100%"}:{},d={start:{marginInlineEnd:e.iconMargin,marginInlineStart:0},end:{marginInlineStart:e.iconMargin,marginInlineEnd:0}},c={small:{fontSize:e.fontSizeSmall},medium:{fontSize:e.fontSizeMedium},large:{fontSize:e.fontSizeLarge}},u={small:{fontSize:e.smallIconSize},medium:{fontSize:e.mediumIconSize},large:{fontSize:e.largeIconSize}},p="start"!==n||i?{small:{},medium:{},large:{}}:{small:{paddingInlineStart:`calc(${e.smallIconSize} + ${e.togglePadding})`,paddingInlineEnd:"0"},medium:{paddingInlineStart:`calc(${e.mediumIconSize} + ${e.togglePadding})`,paddingInlineEnd:"0"},large:{paddingInlineStart:`calc(${e.largeIconSize} + ${e.togglePadding})`,paddingInlineEnd:"0"}};return{toggleDetails:{label:"toggleDetails",fontFamily:e.fontFamily,fontWeight:e.fontWeight,lineHeight:e.lineHeight},summary:{label:"toggleDetails__summary",position:"relative",display:"flex",alignItems:"center",boxSizing:"border-box",textAlign:"start"},summaryText:{label:"toggleDetails__summaryText",minWidth:"0.0625rem",flexGrow:1,...a?{flex:1}:{}},toggle:{label:"toggleDetails__toggle",fontFamily:e.fontFamily,appearance:"none",cursor:"pointer",userSelect:"none",touchAction:"manipulation",position:"relative",overflow:"visible",boxSizing:"border-box",padding:"0",margin:"0",outline:"none",border:"none",background:"transparent",color:e.textColor,"&::-moz-focus-inner":{padding:"0",margin:"0"},"&::before":{content:'""',position:"absolute",top:"-0.375rem",left:"-0.375rem",right:"-0.375rem",bottom:"-0.375rem",border:`${e.toggleBorderWidth} ${e.toggleBorderStyle} ${e.toggleFocusBorderColor}`,borderRadius:`calc(${e.toggleBorderRadius} * 1.5)`,opacity:0,pointerEvents:"none"},"&:focus":{"&::before":{opacity:1}},"&:focus, &:hover, &:active":{textDecoration:"none",color:e.textColor},textDecoration:"none",...s,...c[l]},icon:{label:"toggleDetails__icon","& > svg":{display:"block"},...d[n],...u[l]},details:{label:"toggleDetails__details",boxSizing:"border-box",paddingTop:e.togglePadding,color:e.textColor,...c[l],...p[l]},content:{label:"toggleDetails__content",opacity:.01,animationName:X,animationFillMode:"forwards",animationDuration:".3s"}}}),(e=>{var o,t,i,n,l;const r=e.colors,a=e.spacing,s=e.borders,d=e.typography,c=e.key,u={canvas:{toggleFocusBorderColor:e["ic-brand-primary"],iconColor:e["ic-brand-font-color-dark"],textColor:e["ic-brand-font-color-dark"]}};return{...{fontFamily:null==d?void 0:d.fontFamily,fontWeight:null==d?void 0:d.fontWeightNormal,lineHeight:null==d?void 0:d.lineHeight,textColor:null==r||null===(o=r.contrasts)||void 0===o?void 0:o.grey125125,fontSizeSmall:null==d?void 0:d.fontSizeSmall,fontSizeMedium:null==d?void 0:d.fontSizeMedium,fontSizeLarge:null==d?void 0:d.fontSizeLarge,smallIconSize:"0.5rem",mediumIconSize:"0.75rem",largeIconSize:"1rem",iconMargin:null==a?void 0:a.xxSmall,iconColor:null==r||null===(t=r.contrasts)||void 0===t?void 0:t.grey125125,togglePadding:null==a?void 0:a.xxSmall,toggleBorderRadius:null==s?void 0:s.radiusMedium,toggleBorderWidth:null==s?void 0:s.widthMedium,toggleBorderStyle:null==s?void 0:s.style,toggleFocusBorderColor:null==r||null===(i=r.contrasts)||void 0===i?void 0:i.blue4570,filledBackgroundColor:null==r||null===(n=r.contrasts)||void 0===n?void 0:n.grey1111,filledBorderWidth:null==s?void 0:s.widthSmall,filledBorderStyle:null==s?void 0:s.style,filledBorderColor:null==r||null===(l=r.contrasts)||void 0===l?void 0:l.grey1214,filledBorderRadius:null==s?void 0:s.radiusMedium,filledPadding:null==a?void 0:a.small},...u[c]}}))(J=i()((K=class e extends n.Component{constructor(...e){super(...e),this.ref=null,this._button=null,this.getButtonRef=e=>this._button=e,this.handleToggle=(e,o)=>{"function"==typeof this.props.onToggle&&this.props.onToggle(e,o)}}get focused(){return x(this._button)}focus(){var e;null===(e=this._button)||void 0===e||e.focus()}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}renderSummary(e){var o,t;const i=this.props,n=i.summary,l=i.iconPosition;return u("span",{css:null===(o=this.props.styles)||void 0===o?void 0:o.summary},"start"===l&&this.renderIcon(e),u("span",{css:null===(t=this.props.styles)||void 0===t?void 0:t.summaryText},n),"end"===l&&this.renderIcon(e))}renderToggle(o,t){const i=this.props.variant,n=this.props.children?o:{onClick:o.onClick},l={...c(this.props,e.allowedProps),...n,children:this.renderSummary(t)},r=this.renderSummary(t);return"filled"===i?u(R,Object.assign({},l,{display:"block",textAlign:"start",elementRef:this.getButtonRef}),r):l.href?u("a",Object.assign({},l,{css:null===(a=this.props.styles)||void 0===a?void 0:a.toggle,ref:this.getButtonRef}),r):u("button",Object.assign({},l,{type:"button",css:null===(s=this.props.styles)||void 0===s?void 0:s.toggle,ref:this.getButtonRef}),r);var a,s}renderIcon(e){var o;const t=e?this.props.iconExpanded:this.props.icon;return this.props.children&&t?u("span",{css:null===(o=this.props.styles)||void 0===o?void 0:o.icon},u(t,null)):null}renderDetails(e,o){var t;if(!this.props.children)return null;const i=e?{display:"block"}:{display:"none"};return u("div",Object.assign({},o,{css:[null===(t=this.props.styles)||void 0===t?void 0:t.details,i]}),e&&this.renderContent())}renderContent(){var e;return u("div",{css:null===(e=this.props.styles)||void 0===e?void 0:e.content},this.props.children)}render(){return u(W,Object.assign({},p(this.props,W.allowedProps),{onToggle:this.handleToggle}),(({expanded:e,getToggleProps:o,getDetailsProps:t})=>{var i;return u("div",{css:null===(i=this.props.styles)||void 0===i?void 0:i.toggleDetails,ref:e=>{this.ref=e}},this.renderToggle(o(),e),this.renderDetails(e,t()))}))}},K.displayName="ToggleDetails",K.componentId="ToggleDetails",K.allowedProps=["variant","summary","expanded","defaultExpanded","onToggle","icon","iconExpanded","iconPosition","fluidWidth","children","size"],K.propTypes=U,K.defaultProps={variant:"default",size:"medium",fluidWidth:!1,icon:z,iconExpanded:I,iconPosition:"start",defaultExpanded:!1,children:null},J=K))||J)||J;export{R as B,W as E,P as I,G as R,Q as T,N as a,M as b}; diff --git a/assets/index-B8c3q9fI.js b/assets/index-CaYtQ08a.js similarity index 95% rename from assets/index-B8c3q9fI.js rename to assets/index-CaYtQ08a.js index ee8d080..969ac6f 100644 --- a/assets/index-B8c3q9fI.js +++ b/assets/index-CaYtQ08a.js @@ -1 +1 @@ -import{r as e,R as r,S as n,i as o,T as t,w as s,t as a,k as i,p as c}from"./index-CrryxQyl.js";import{u as l,B as d,S as p}from"./RenderTopNavBar-BTvx9fvK.js";var u;class h extends e.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const r=this.props.elementRef;this.ref=e,"function"==typeof r&&r(e)}}render(){return r.createElement(n,Object.assign({},this.props,{name:"IconSearch",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),u||(u=r.createElement("path",{d:"M790.588 1468.235c-373.722 0-677.647-303.924-677.647-677.647 0-373.722 303.925-677.647 677.647-677.647 373.723 0 677.647 303.925 677.647 677.647 0 373.723-303.924 677.647-677.647 677.647Zm596.781-160.715c120.396-138.692 193.807-319.285 193.807-516.932C1581.176 354.748 1226.428 0 790.588 0S0 354.748 0 790.588s354.748 790.588 790.588 790.588c197.647 0 378.24-73.411 516.932-193.807l516.028 516.142 79.963-79.963-516.142-516.028Z",fillRule:"evenodd"})))}}h.glyphName="search",h.variant="Line",h.displayName="IconSearchLine",h.propTypes={...n.propTypes},h.allowedProps=[...n.allowedProps];const f={children:o.oneOfType([o.node,o.func]),renderIcon:o.oneOfType([o.node,o.func]),screenReaderLabel:o.string.isRequired,type:o.oneOf(["button","submit","reset"]),size:o.oneOf(["small","medium","large"]),elementRef:o.func,as:o.elementType,interaction:o.oneOf(["enabled","disabled","readonly"]),color:o.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:o.oneOf(["info","inverse"]),shape:o.oneOf(["rectangle","circle"]),withBackground:o.bool,withBorder:o.bool,margin:t.spacing,cursor:o.string,href:o.string,onClick:o.func},m=["children","renderIcon","screenReaderLabel","type","size","elementRef","as","interaction","color","focusColor","shape","withBackground","withBorder","margin","cursor","href"];var g,B;let y=s(null,l)(g=a()(((B=class extends e.Component{constructor(...e){super(...e),this._baseButton=null,this.ref=null,this.handleRef=e=>{const r=this.props.elementRef;this.ref=e,"function"==typeof r&&r(e)}}get focused(){return this._baseButton&&this._baseButton.focused}focus(){this._baseButton&&this._baseButton.focus()}render(){const e=this.props,n=e.children,o=e.renderIcon,t=e.screenReaderLabel,s=e.type,a=e.size;e.elementRef;const l=e.as,u=e.interaction,h=e.color,f=e.focusColor,g=e.shape,B=e.withBackground,y=e.withBorder,b=e.margin,R=e.cursor,w=e.href,O=i(e,m),v=this.props.themeOverride;return r.createElement(d,Object.assign({},c(O),{type:s,size:a,elementRef:this.handleRef,as:l,interaction:u,color:h,focusColor:f,shape:g,withBackground:B,withBorder:y,margin:b,cursor:R,href:w,renderIcon:n||o,themeOverride:v,ref:e=>{this._baseButton=e}}),r.createElement(p,null,t))}}).displayName="IconButton",B.componentId="IconButton",B.propTypes=f,B.allowedProps=["as","children","color","cursor","elementRef","focusColor","href","interaction","margin","renderIcon","screenReaderLabel","shape","size","type","withBackground","withBorder","onClick"],B.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",shape:"rectangle",withBackground:!0,withBorder:!0,margin:"0",cursor:"pointer"},g=B))||g)||g;export{y as I,h as a}; +import{r as e,R as r,S as n,i as o,T as t,w as s,t as a,k as i,p as c}from"./index-DxmLT0bY.js";import{u as l,B as d,S as p}from"./RenderTopNavBar-BObK9Y19.js";var u;class h extends e.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const r=this.props.elementRef;this.ref=e,"function"==typeof r&&r(e)}}render(){return r.createElement(n,Object.assign({},this.props,{name:"IconSearch",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),u||(u=r.createElement("path",{d:"M790.588 1468.235c-373.722 0-677.647-303.924-677.647-677.647 0-373.722 303.925-677.647 677.647-677.647 373.723 0 677.647 303.925 677.647 677.647 0 373.723-303.924 677.647-677.647 677.647Zm596.781-160.715c120.396-138.692 193.807-319.285 193.807-516.932C1581.176 354.748 1226.428 0 790.588 0S0 354.748 0 790.588s354.748 790.588 790.588 790.588c197.647 0 378.24-73.411 516.932-193.807l516.028 516.142 79.963-79.963-516.142-516.028Z",fillRule:"evenodd"})))}}h.glyphName="search",h.variant="Line",h.displayName="IconSearchLine",h.propTypes={...n.propTypes},h.allowedProps=[...n.allowedProps];const f={children:o.oneOfType([o.node,o.func]),renderIcon:o.oneOfType([o.node,o.func]),screenReaderLabel:o.string.isRequired,type:o.oneOf(["button","submit","reset"]),size:o.oneOf(["small","medium","large"]),elementRef:o.func,as:o.elementType,interaction:o.oneOf(["enabled","disabled","readonly"]),color:o.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:o.oneOf(["info","inverse"]),shape:o.oneOf(["rectangle","circle"]),withBackground:o.bool,withBorder:o.bool,margin:t.spacing,cursor:o.string,href:o.string,onClick:o.func},m=["children","renderIcon","screenReaderLabel","type","size","elementRef","as","interaction","color","focusColor","shape","withBackground","withBorder","margin","cursor","href"];var g,B;let y=s(null,l)(g=a()(((B=class extends e.Component{constructor(...e){super(...e),this._baseButton=null,this.ref=null,this.handleRef=e=>{const r=this.props.elementRef;this.ref=e,"function"==typeof r&&r(e)}}get focused(){return this._baseButton&&this._baseButton.focused}focus(){this._baseButton&&this._baseButton.focus()}render(){const e=this.props,n=e.children,o=e.renderIcon,t=e.screenReaderLabel,s=e.type,a=e.size;e.elementRef;const l=e.as,u=e.interaction,h=e.color,f=e.focusColor,g=e.shape,B=e.withBackground,y=e.withBorder,b=e.margin,R=e.cursor,w=e.href,O=i(e,m),v=this.props.themeOverride;return r.createElement(d,Object.assign({},c(O),{type:s,size:a,elementRef:this.handleRef,as:l,interaction:u,color:h,focusColor:f,shape:g,withBackground:B,withBorder:y,margin:b,cursor:R,href:w,renderIcon:n||o,themeOverride:v,ref:e=>{this._baseButton=e}}),r.createElement(p,null,t))}}).displayName="IconButton",B.componentId="IconButton",B.propTypes=f,B.allowedProps=["as","children","color","cursor","elementRef","focusColor","href","interaction","margin","renderIcon","screenReaderLabel","shape","size","type","withBackground","withBorder","onClick"],B.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",shape:"rectangle",withBackground:!0,withBorder:!0,margin:"0",cursor:"pointer"},g=B))||g)||g;export{y as I,h as a}; diff --git a/assets/index-C6-OLeBB.js b/assets/index-CmNFgSR4.js similarity index 99% rename from assets/index-C6-OLeBB.js rename to assets/index-CmNFgSR4.js index 74bbe02..b94dc0b 100644 --- a/assets/index-C6-OLeBB.js +++ b/assets/index-CmNFgSR4.js @@ -1 +1 @@ -import{m as e,r as i,R as t,S as o,i as n,w as s,n as r,o as l,l as a,k as d,q as p,s as c,v as u,h,t as m,p as g,x as f,V as b,y as v,T as w}from"./index-CrryxQyl.js";import{C as y,S,m as O,s as x,h as k,f as R,i as C,j as I,k as A,P as L,O as T,l as H,n as F,o as P,p as z}from"./RenderTopNavBar-BTvx9fvK.js";var _,M={exports:{}};var W,B,E=(_||(_=1,W=M,B=M.exports,function(e,i){var t="function",o="undefined",n="object",s="string",r="major",l="model",a="name",d="type",p="vendor",c="version",u="architecture",h="console",m="mobile",g="tablet",f="smarttv",b="wearable",v="embedded",w="Amazon",y="Apple",S="ASUS",O="BlackBerry",x="Browser",k="Chrome",R="Firefox",C="Google",I="Huawei",A="LG",L="Microsoft",T="Motorola",H="Opera",F="Samsung",P="Sharp",z="Sony",_="Xiaomi",M="Zebra",E="Facebook",q="Chromium OS",N="Mac OS",D=" Browser",$=function(e){for(var i={},t=0;t0?2===a.length?typeof a[1]==t?this[a[0]]=a[1].call(this,p):this[a[0]]=a[1]:3===a.length?typeof a[1]!==t||a[1].exec&&a[1].test?this[a[0]]=p?p.replace(a[1],a[2]):i:this[a[0]]=p?a[1].call(this,p,a[2]):i:4===a.length&&(this[a[0]]=p?a[3].call(this,p.replace(a[1],a[2])):i):this[a]=p||i;c+=2}},Z=function(e,t){for(var o in t)if(typeof t[o]===n&&t[o].length>0){for(var s=0;s2&&(e[l]="iPad",e[d]=g),e},this.getEngine=function(){var e={};return e[a]=i,e[c]=i,U.call(e,v,y.engine),e},this.getOS=function(){var e={};return e[a]=i,e[c]=i,U.call(e,v,y.os),S&&!e[a]&&w&&w.platform&&"Unknown"!=w.platform&&(e[a]=w.platform.replace(/chrome os/i,q).replace(/macos/i,N)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(e){return v=typeof e===s&&e.length>500?G(e,500):e,this},this.setUA(v),this};K.VERSION="1.0.39",K.BROWSER=$([a,c,r]),K.CPU=$([u]),K.DEVICE=$([l,p,d,h,m,f,g,b,v]),K.ENGINE=K.OS=$([a,c]),W.exports&&(B=W.exports=K),B.UAParser=K;var Q=typeof e!==o&&(e.jQuery||e.Zepto);if(Q&&!Q.ua){var Y=new K;Q.ua=Y.getResult(),Q.ua.get=function(){return Y.getUA()},Q.ua.set=function(e){Y.setUA(e);var i=Y.getResult();for(var t in i)Q.ua[t]=i[t]}}}("object"==typeof window?window:M.exports)),M.exports);const q=e(E),N=()=>"Safari"===(new q).getResult().browser.name;var D,$,V,j,G,U;class Z extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}render(){return t.createElement(o,Object.assign({},this.props,{name:"IconArrowOpenDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),D||(D=t.createElement("path",{d:"m.153 526.146 92.168-92.299 867.767 867.636 867.636-867.636 92.429 92.299-960.065 959.935z",fillRule:"evenodd"})))}}Z.glyphName="arrow-open-down",Z.variant="Line",Z.displayName="IconArrowOpenDownLine",Z.propTypes={...o.propTypes},Z.allowedProps=[...o.allowedProps];class X extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}render(){return t.createElement(o,Object.assign({},this.props,{name:"IconArrowOpenUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),$||($=t.createElement("path",{d:"m.153 1393.854 92.168 92.299 867.767-867.636 867.636 867.636 92.429-92.299L960.088 433.92z",fillRule:"evenodd"})))}}X.glyphName="arrow-open-up",X.variant="Line",X.displayName="IconArrowOpenUpLine",X.propTypes={...o.propTypes},X.allowedProps=[...o.allowedProps];class J extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}render(){return t.createElement(o,Object.assign({},this.props,{name:"IconCheck",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),V||(V=t.createElement("path",{d:"M1827.701 303.065 698.835 1431.801 92.299 825.266 0 917.564 698.835 1616.4 1919.869 395.234z",fillRule:"evenodd"})))}}J.glyphName="check",J.variant="Line",J.displayName="IconCheckLine",J.propTypes={...o.propTypes},J.allowedProps=[...o.allowedProps];class K extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}render(){return t.createElement(o,Object.assign({},this.props,{name:"IconMiniArrowDouble",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),j||(j=t.createElement("path",{d:"M1319.1 790.054 1020.06 355.79c-33.165-48.165-87.553-47.273-120.104 0L600.92 790.054c-33.166 48.165-12.581 87.21 46.116 87.21h625.944c58.64 0 78.67-39.938 46.12-87.21ZM600.634 1129.94l299.035 434.27c33.167 48.16 87.554 47.27 120.101 0l299.04-434.27c33.17-48.16 12.58-87.21-46.12-87.21H646.75c-58.636 0-78.668 39.94-46.116 87.21Z"})))}}K.glyphName="mini-arrow-double",K.variant="Line",K.displayName="IconMiniArrowDoubleLine",K.propTypes={...o.propTypes},K.allowedProps=[...o.allowedProps];class Q extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}render(){return t.createElement(o,Object.assign({},this.props,{name:"IconMiniArrowDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),G||(G=t.createElement("path",{d:"M994.034 1226.26c-18.796 27.296-49.269 27.3-68.067 0L574.893 716.424C556.096 689.128 567.713 667 600.852 667h718.297c33.133 0 44.757 22.125 25.959 49.424L994.034 1226.26Z",fillRule:"evenodd"})))}}Q.glyphName="mini-arrow-down",Q.variant="Line",Q.displayName="IconMiniArrowDownLine",Q.propTypes={...o.propTypes},Q.allowedProps=[...o.allowedProps];class Y extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}render(){return t.createElement(o,Object.assign({},this.props,{name:"IconMiniArrowUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),U||(U=t.createElement("path",{d:"M994.034 694.296c-18.796-27.296-49.269-27.3-68.067 0l-351.074 509.836c-18.797 27.296-7.18 49.424 25.959 49.424h718.297c33.133 0 44.757-22.125 25.959-49.424L994.034 694.296Z",fillRule:"evenodd"})))}}Y.glyphName="mini-arrow-up",Y.variant="Line",Y.displayName="IconMiniArrowUpLine",Y.propTypes={...o.propTypes},Y.allowedProps=[...o.allowedProps];const ee=n.oneOfType([n.number,n.oneOf(["auto"])]),ie={children:n.node,colSpacing:n.oneOf(["none","small","medium","large"]),rowSpacing:n.oneOf(["none","small","medium","large"]),textAlign:n.oneOf(["start","end","center","inherit"]),hAlign:n.oneOf(["start","center","end","space-around","space-between"]),vAlign:n.oneOf(["top","middle","bottom","stretch"]),startAt:n.oneOf(["small","medium","large","x-large",null]),visualDebug:n.bool,width:n.oneOfType([ee,n.shape({small:ee,medium:ee,large:ee,xLarge:ee})]),offset:n.oneOfType([ee,n.shape({small:ee,medium:ee,large:ee,xLarge:ee})]),isLastRow:n.bool,isLastCol:n.bool,elementRef:n.func};var te,oe;let ne=s(((e,i)=>{const t=i.vAlign,o=i.textAlign,n=i.rowSpacing,s=i.colSpacing,r=i.isLastRow,l=i.isLastCol,a=i.startAt,d=i.visualDebug,p={small:{marginBottom:e.spacingSmall},medium:{marginBottom:e.spacingMedium},large:{marginBottom:e.spacingLarge},none:{marginBottom:0}},c=()=>{const i={small:{paddingLeft:`calc(${e.spacingSmall} / 2)`,paddingRight:`calc(${e.spacingSmall} / 2)`},medium:{paddingLeft:`calc(${e.spacingMedium} / 2)`,paddingRight:`calc(${e.spacingMedium} / 2)`},large:{paddingLeft:`calc(${e.spacingLarge} / 2)`,paddingRight:`calc(${e.spacingLarge} / 2)`},none:{}};return{flexGrow:1,flexShrink:1,flexBasis:"0%",marginBottom:0,boxSizing:"border-box",...s&&i[s],...t&&{top:{alignSelf:"flex-start"},middle:{alignSelf:"center"},bottom:{alignSelf:"flex-end"},stretch:{alignSelf:"stretch"}}[t],...o&&{start:{textAlign:"start"},end:{textAlign:"end"},center:{textAlign:"center"},inherit:{textAlign:"inherit"}}[o]}},u=e=>(()=>{const e=["small","medium","large","x-large",null];return e.slice(e.indexOf(a))})().includes(e),h=(e="1")=>{switch(e){case"auto":return{flexGrow:0,flexShrink:0,flexBasis:"auto"};case 12:return{flex:"0 0 100%"};default:return{flexGrow:0,flexShrink:0,flexBasis:`calc(${e} / 12 * 99.999%)`,maxWidth:`calc(${e} / 12 * 99.999%)`}}},m=(e="1")=>{switch(e){case"auto":case 12:return{};default:return{marginInlineStart:`calc(${e} / 12 * 99.999%)`,marginInlineEnd:0}}},g=e=>a&&a===e?{...c()}:{},f=e=>{const t=(e=>{let t=i.width;if(t)return t&&"object"==typeof t&&(t=t["x-large"===e?"xLarge":e]),t})(e),o=(e=>{let t=i.offset;if(t)return t&&"object"==typeof t&&(t=t["x-large"===e?"xLarge":e]),t})(e);return u(e)?{...t&&h(t),...o&&m(o)}:{}},b=e=>({...g(e),...f(e)});return{gridCol:{label:"gridCol",display:"block",boxSizing:"border-box",textAlign:"inherit",minWidth:"0.0625rem",...n&&p[n],...r&&l&&{marginBottom:0},...b("small"),[`@media screen and (${e.mediumMin})`]:{...b("medium")},[`@media screen and (${e.largeMin})`]:{...b("large")},[`@media screen and (${e.xLargeMin})`]:{...b("x-large")},...d&&{outline:"0.0625rem dashed red"}}}}),(e=>{const i=e.spacing,t=e.media;return{...{spacingSmall:null==i?void 0:i.small,spacingMedium:null==i?void 0:i.medium,spacingLarge:null==i?void 0:i.large,...t}}}))((oe=class e extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}widthCheck(){const e=this.props.width;let i=!1;e&&("number"==typeof e&&e<=0&&(i=!0),"object"==typeof e&&Object.keys(e).forEach((t=>{"number"==typeof e[t]&&e[t]<=0&&(i=!0)}))),i&&r(!1,"Col width must be positive!")}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i),this.widthCheck()}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i),this.widthCheck()}render(){const i=this.props,t=i.children,o=i.styles,n=l(this.props,e.allowedProps);return a("span",Object.assign({},n,{ref:this.handleRef,css:null==o?void 0:o.gridCol}),t)}},oe.displayName="GridCol",oe.componentId="Grid.Col",oe.propTypes=ie,oe.allowedProps=["children","colSpacing","rowSpacing","textAlign","hAlign","vAlign","startAt","visualDebug","width","offset","isLastRow","isLastCol","elementRef"],oe.defaultProps={textAlign:"inherit",children:null,isLastCol:!1,isLastRow:!1},te=oe))||te;const se={children:y.oneOf([ne,S]),rowSpacing:n.oneOf(["none","small","medium","large"]),colSpacing:n.oneOf(["none","small","medium","large"]),hAlign:n.oneOf(["start","center","end","space-around","space-between"]),vAlign:n.oneOf(["top","middle","bottom","stretch"]),startAt:n.oneOf(["small","medium","large","x-large",null]),visualDebug:n.bool,isLastRow:n.bool},re=["styles","makeStyles"],le=["styles"];var ae,de;let pe=s(((e,i)=>{const t=i.hAlign,o=i.vAlign,n=i.rowSpacing,s=i.colSpacing,r=i.isLastRow,l=i.startAt,a=i.visualDebug,d=()=>{const i={small:{margin:`0 calc(-1 * ${e.spacingSmall} / 2)`},medium:{margin:`0 calc(-1 * ${e.spacingMedium} / 2)`},large:{margin:`0 calc(-1 * ${e.spacingLarge} / 2)`},none:{}},l={small:{marginBottom:e.spacingSmall},medium:{marginBottom:e.spacingMedium},large:{marginBottom:e.spacingLarge},none:{marginBottom:0}};return{display:"flex",flexFlow:"row nowrap",...t&&{center:{justifyContent:"center"},start:{justifyContent:"flex-start"},end:{justifyContent:"flex-end"},"space-around":{justifyContent:"space-around"},"space-between":{justifyContent:"space-between"}}[t],...o&&{top:{alignItems:"flex-start"},middle:{alignItems:"center"},bottom:{alignItems:"flex-end"},stretch:{alignItems:"stretch"}}[o],...s&&i[s],...n&&l[n],...r&&{marginBottom:0}}},p=e=>l&&l===e?{...d()}:{};return{gridRow:{label:"gridRow",display:"block",boxSizing:"border-box",...p("small"),[`@media screen and (${e.mediumMin})`]:{...p("medium")},[`@media screen and (${e.largeMin})`]:{...p("large")},[`@media screen and (${e.xLargeMin})`]:{...p("x-large")},...a&&{outline:"0.0625rem dashed blue"}}}}),(e=>{const i=e.spacing,t=e.media;return{...{spacingSmall:null==i?void 0:i.small,spacingMedium:null==i?void 0:i.medium,spacingLarge:null==i?void 0:i.large,...t}}}))((de=class e extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}renderChildren(){const t=this.props;t.styles,t.makeStyles;const o=d(t,re);return i.Children.map(this.props.children,((t,n)=>O(t,[ne])?x(t,{...p(o,e.allowedProps),...t.props,isLastRow:o.isLastRow,isLastCol:n+1===i.Children.count(this.props.children)}):t))}render(){const i=this.props,t=i.styles,o=d(i,le),n=l(o,e.allowedProps);return a("span",Object.assign({},n,{css:null==t?void 0:t.gridRow,ref:this.handleRef}),this.renderChildren())}},de.displayName="GridRow",de.componentId="Grid.Row",de.propTypes=se,de.allowedProps=["children","rowSpacing","colSpacing","hAlign","vAlign","startAt","visualDebug","isLastRow"],de.defaultProps={children:null,isLastRow:!1},ae=de))||ae;const ce={children:y.oneOf([pe,S]),colSpacing:n.oneOf(["none","small","medium","large"]),rowSpacing:n.oneOf(["none","small","medium","large"]),hAlign:n.oneOf(["start","center","end","space-around","space-between"]),vAlign:n.oneOf(["top","middle","bottom","stretch"]),startAt:n.oneOf(["small","medium","large","x-large",null]),visualDebug:n.bool},ue=["styles","makeStyles"],he=["styles"];var me,ge;let fe=s(((e,i)=>{const t=i.startAt,o=i.visualDebug,n=e=>t&&t===e?{boxSizing:"border-box"}:{};return{grid:{label:"grid",display:"block",...n("small"),[`@media screen and (${e.mediumMin})`]:{...n("medium")},[`@media screen and (${e.largeMin})`]:{...n("large")},[`@media screen and (${e.xLargeMin})`]:{...n("x-large")},...o&&{outline:"0.0625rem dashed red"}}}}),(e=>{const i=e.spacing,t=e.media;return{...{spacingSmall:null==i?void 0:i.small,spacingMedium:null==i?void 0:i.medium,spacingLarge:null==i?void 0:i.large,...t}}}))((ge=class e extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}renderChildren(){const t=this.props;t.styles,t.makeStyles;const o=d(t,ue),n=i.Children.toArray(this.props.children);return n.map(((i,t)=>O(i,[pe])?x(i,{...p(o,e.allowedProps),...i.props,isLastRow:t+1===n.length}):i))}render(){const i=this.props,t=i.styles,o=d(i,he),n=l(o,e.allowedProps);return a("span",Object.assign({},n,{css:null==t?void 0:t.grid,ref:this.handleRef}),this.renderChildren())}},ge.displayName="Grid",ge.componentId="Grid",ge.propTypes=ce,ge.allowedProps=["children","colSpacing","rowSpacing","hAlign","vAlign","startAt","visualDebug"],ge.defaultProps={colSpacing:"medium",rowSpacing:"medium",hAlign:"start",startAt:"small",vAlign:"top",visualDebug:!1,children:null},ge.Row=pe,ge.Col=ne,me=ge))||me;const be={children:n.node.isRequired,as:n.elementType};var ve,we;let ye=s(((e,i)=>{const t=i.children,o={all:"initial",display:"block",...k(t)&&{color:e.color,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,lineHeight:e.lineHeight,margin:0,textAlign:"inherit"}};return{formFieldLabel:{label:"formFieldLabel",...o,"&:is(label)":o,"&:-webkit-any(label)":o}}}),(e=>{var i;const t=e.colors,o=e.typography,n=e.key,s={canvas:{color:e["ic-brand-font-color-dark"]}};return{...{color:null==t||null===(i=t.contrasts)||void 0===i?void 0:i.grey125125,fontFamily:null==o?void 0:o.fontFamily,fontWeight:null==o?void 0:o.fontWeightBold,fontSize:null==o?void 0:o.fontSizeMedium,lineHeight:null==o?void 0:o.lineHeightFit},...s[n]}}))((we=class e extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}render(){const i=c(e,this.props),t=this.props,o=t.styles,n=t.children;return a(i,Object.assign({},l(this.props,e.allowedProps),{css:null==o?void 0:o.formFieldLabel,ref:this.handleRef}),n)}},we.displayName="FormFieldLabel",we.componentId="FormFieldLabel",we.propTypes=be,we.allowedProps=["as","children"],we.defaultProps={as:"span"},ve=we))||ve;const Se=n.oneOf(["error","hint","success","screenreader-only"]),Oe=n.node,xe={message:n.shape({type:Se,text:Oe})},ke={variant:Se,children:Oe};var Re,Ce;let Ie=s(((e,i)=>{const t=i.variant,o={hint:{color:e.colorHint},error:{color:e.colorError},success:{color:e.colorSuccess},"screenreader-only":{}};return{formFieldMessage:{label:"formFieldMessage",fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,lineHeight:e.lineHeight,display:"block",...o[t]}}}),(e=>{var i,t,o;const n=e.colors,s=e.typography,r=e.key,l={canvas:{colorHint:e["ic-brand-font-color-dark"]}};return{...{colorHint:null==n||null===(i=n.contrasts)||void 0===i?void 0:i.grey125125,colorError:null==n||null===(t=n.contrasts)||void 0===t?void 0:t.red4570,colorSuccess:null==n||null===(o=n.contrasts)||void 0===o?void 0:o.green4570,fontFamily:null==s?void 0:s.fontFamily,fontWeight:null==s?void 0:s.fontWeightNormal,fontSize:null==s?void 0:s.fontSizeSmall,lineHeight:null==s?void 0:s.lineHeight},...l[r]}}))(((Ce=class extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}render(){const e=this.props,i=e.children,t=e.styles;return"screenreader-only"!==this.props.variant?a("span",{css:null==t?void 0:t.formFieldMessage,ref:this.handleRef},i):a(S,{elementRef:this.handleRef},i)}}).displayName="FormFieldMessage",Ce.componentId="FormFieldMessage",Ce.propTypes=ke,Ce.allowedProps=["variant","children"],Ce.defaultProps={variant:"hint"},Re=Ce))||Re;const Ae={messages:n.arrayOf(xe.message)};var Le,Te;let He=s((e=>({formFieldMessages:{label:"formFieldMessages",padding:0,display:"block",margin:`calc(-1 * ${e.topMargin}) 0 0 0`},message:{label:"formFieldMessages__message",display:"block"}})),(e=>{const i=e.spacing;return{...{topMargin:null==i?void 0:i.xxSmall}}}))((Te=class e extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}render(){const i=this.props,t=i.messages,o=i.styles;return t&&t.length>0?a("span",Object.assign({css:null==o?void 0:o.formFieldMessages},l(this.props,e.allowedProps),{ref:this.handleRef}),t.map(((e,i)=>a("span",{key:`error${i}`,css:null==o?void 0:o.message},a(Ie,{variant:e.type},e.text))))):null}},Te.displayName="FormFieldMessages",Te.componentId="FormFieldMessages",Te.propTypes=Ae,Te.allowedProps=["messages"],Te.defaultProps={},Le=Te))||Le;const Fe={label:n.node.isRequired,id:n.string,as:n.elementType,messages:n.arrayOf(xe.message),messagesId:n.string,children:n.node,inline:n.bool,layout:n.oneOf(["stacked","inline"]),labelAlign:n.oneOf(["start","end"]),vAlign:n.oneOf(["top","middle","bottom"]),width:n.string,inputContainerRef:n.func,elementRef:n.func},Pe=["makeStyles","styles"];var ze,_e;let Me=u()(ze=s(((e,i)=>({formFieldLayout:{label:"formFieldLayout",all:"initial",border:"0",padding:"0",margin:"0",minWidth:"0",direction:"inherit",textAlign:"start",opacity:"inherit",display:"block",width:"100%",...i.inline&&{display:"inline-block",verticalAlign:"middle",width:"auto"}}})),null)((_e=class e extends i.Component{constructor(e){super(e),this._messagesId=void 0,this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)},this.handleInputContainerRef=e=>{"function"==typeof this.props.inputContainerRef&&this.props.inputContainerRef(e)},this._messagesId=e.messagesId||e.deterministicId(),h(void 0!==e.width||!e.inline||"inline"!==e.layout,"[FormFieldLayout] The 'inline' prop is true, and the 'layout' is set to 'inline'.\n This will cause a layout issue in Internet Explorer 11 unless you also add a value for the 'width' prop.")}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}get hasVisibleLabel(){return this.props.label&&k(this.props.label)}get hasMessages(){return this.props.messages&&this.props.messages.length>0}get elementType(){return c(e,this.props)}get inlineContainerAndLabel(){return this.props.inline&&"inline"===this.props.layout}renderLabel(){return this.hasVisibleLabel?a(fe.Col,{textAlign:this.props.labelAlign,width:this.inlineContainerAndLabel?"auto":3},a(ye,{"aria-hidden":"fieldset"===this.elementType?"true":void 0},this.props.label)):"fieldset"!==this.elementType?this.props.label:null}renderLegend(){return a(S,{as:"legend"},this.props.label,this.hasMessages&&a(He,{messages:this.props.messages}))}renderVisibleMessages(){return this.hasMessages?a(fe.Row,null,a(fe.Col,{offset:this.inlineContainerAndLabel?void 0:3,textAlign:this.inlineContainerAndLabel?"end":void 0},a(He,{id:this._messagesId,messages:this.props.messages}))):null}render(){const i=this.elementType,t=this.props;t.makeStyles;const o=t.styles,n=d(t,Pe),s=n.width,r=n.layout,c=n.children;return a(i,Object.assign({},l(n,[...e.allowedProps,...fe.allowedProps]),{css:null==o?void 0:o.formFieldLayout,style:{width:s},"aria-describedby":this.hasMessages?this._messagesId:void 0,ref:this.handleRef}),"fieldset"===this.elementType&&this.renderLegend(),a(fe,Object.assign({rowSpacing:"small",colSpacing:"small",startAt:"inline"===r&&this.hasVisibleLabel?"medium":null},p(n,fe.allowedProps)),a(fe.Row,null,this.renderLabel(),a(fe.Col,{width:this.inlineContainerAndLabel?"auto":void 0,elementRef:this.handleInputContainerRef},c)),this.renderVisibleMessages()))}},_e.displayName="FormFieldLayout",_e.componentId="FormFieldLayout",_e.propTypes=Fe,_e.allowedProps=["label","id","as","messages","messagesId","children","inline","layout","labelAlign","width","inputContainerRef","elementRef"],_e.defaultProps={inline:!1,layout:"stacked",as:"label",labelAlign:"end"},ze=_e))||ze)||ze;const We={label:n.node.isRequired,id:n.string.isRequired,messages:n.arrayOf(xe.message),messagesId:n.string,children:n.node,inline:n.bool,layout:n.oneOf(["stacked","inline"]),labelAlign:n.oneOf(["start","end"]),vAlign:n.oneOf(["top","middle","bottom"]),width:n.string,inputContainerRef:n.func,elementRef:n.func};class Be extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}render(){return t.createElement(Me,Object.assign({},l(this.props,Be.allowedProps),p(this.props,Me.allowedProps),{label:this.props.label,vAlign:this.props.vAlign,as:"label",htmlFor:this.props.id,elementRef:this.handleRef}))}}Be.displayName="FormField",Be.componentId="FormField",Be.propTypes=We,Be.allowedProps=["label","id","messages","messagesId","children","inline","layout","labelAlign","vAlign","width","inputContainerRef","elementRef"],Be.defaultProps={inline:!1,layout:"stacked",labelAlign:"end",vAlign:"middle"};const Ee={description:n.node.isRequired,as:n.elementType,messages:n.arrayOf(xe.message),messagesId:n.string,disabled:n.bool,children:n.node,layout:n.oneOf(["stacked","columns","inline"]),rowSpacing:n.oneOf(["none","small","medium","large"]),colSpacing:n.oneOf(["none","small","medium","large"]),vAlign:n.oneOf(["top","middle","bottom"]),startAt:n.oneOf(["small","medium","large","x-large",null]),elementRef:n.func},qe=["styles","makeStyles"];var Ne,De;let $e=s(((e,i,t)=>{const o=i.disabled,n=t.invalid;return{formFieldGroup:{label:"formFieldGroup",border:`${e.borderWidth} ${e.borderStyle} ${e.borderColor}`,borderRadius:e.borderRadius,display:"block",...n&&{borderColor:e.errorBorderColor,padding:e.errorFieldsPadding},...o&&{opacity:.6,cursor:"not-allowed",pointerEvents:"none"}}}}),(e=>{var i;const t=e.borders,o=e.colors,n=e.spacing;return{...{borderWidth:null==t?void 0:t.widthSmall,borderStyle:null==t?void 0:t.style,borderColor:"transparent",borderRadius:null==t?void 0:t.radiusMedium,errorBorderColor:null==o||null===(i=o.contrasts)||void 0===i?void 0:i.red4570,errorFieldsPadding:null==n?void 0:n.xSmall}}}))((De=class e extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i,this.makeStylesVariables)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i,this.makeStylesVariables)}get makeStylesVariables(){return{invalid:this.invalid}}get invalid(){return!!this.props.messages&&this.props.messages.findIndex((e=>"error"===e.type))>=0}renderColumns(){return i.Children.map(this.props.children,((e,i)=>e?a(fe.Col,{width:e.props&&e.props.width?"auto":void 0,key:i},e):null))}renderChildren(){return a(fe,{colSpacing:this.props.colSpacing,rowSpacing:this.props.rowSpacing,vAlign:this.props.vAlign,startAt:this.props.startAt||("columns"===this.props.layout?"medium":null)},a(fe.Row,null,this.renderColumns()))}renderFields(){const e=this.props.styles;return a("span",{key:"fields",css:null==e?void 0:e.formFieldGroup},this.renderChildren())}render(){const i=this.props;i.styles,i.makeStyles;const t=d(i,qe);return a(Me,Object.assign({},l(t,e.allowedProps),p(t,Me.allowedProps),{vAlign:t.vAlign,layout:"inline"===t.layout?"inline":"stacked",label:t.description,"aria-disabled":t.disabled?"true":void 0,"aria-invalid":this.invalid?"true":void 0,elementRef:this.handleRef}),this.renderFields())}},De.displayName="FormFieldGroup",De.componentId="FormFieldGroup",De.propTypes=Ee,De.allowedProps=["description","as","messages","messagesId","disabled","children","layout","rowSpacing","colSpacing","vAlign","startAt","elementRef"],De.defaultProps={as:"fieldset",disabled:!1,rowSpacing:"medium",colSpacing:"small",vAlign:"middle"},Ne=De))||Ne;const Ve={renderLabel:n.oneOfType([n.node,n.func]),type:n.oneOf(["text","email","url","tel","search","password"]),id:n.string,value:R(n.string),defaultValue:n.string,interaction:n.oneOf(["enabled","disabled","readonly"]),messages:n.arrayOf(xe.message),size:n.oneOf(["small","medium","large"]),textAlign:n.oneOf(["start","center"]),width:n.string,htmlSize:n.number,display:n.oneOf(["inline-block","block"]),shouldNotWrap:n.bool,placeholder:n.string,isRequired:n.bool,elementRef:n.func,inputRef:n.func,inputContainerRef:n.func,renderBeforeInput:n.oneOfType([n.node,n.func]),renderAfterInput:n.oneOfType([n.node,n.func]),onChange:n.func,onBlur:n.func,onFocus:n.func},je=["type","size","htmlSize","display","textAlign","placeholder","value","defaultValue","isRequired","onFocus"];var Ge,Ue;let Ze=u()(Ge=s(((e,i,t)=>{const o=i.size,n=i.textAlign,s=i.shouldNotWrap,r=t.disabled,l=t.invalid,a=t.focused,d=t.beforeElementHasWidth,p=t.afterElementHasWidth,c={small:{fontSize:e.smallFontSize,height:`calc(${e.smallHeight} - (2 * ${e.borderWidth}))`,lineHeight:`calc(${e.smallHeight} - (2 * ${e.borderWidth}))`},medium:{fontSize:e.mediumFontSize,height:`calc(${e.mediumHeight} - (2 * ${e.borderWidth}))`,lineHeight:`calc(${e.mediumHeight} - (2 * ${e.borderWidth}))`},large:{fontSize:e.largeFontSize,height:`calc(${e.largeHeight} - (2 * ${e.borderWidth}))`,lineHeight:`calc(${e.largeHeight} - (2 * ${e.borderWidth}))`}},u=r?{cursor:"not-allowed",pointerEvents:"none",opacity:"0.5"}:{},h=a?{opacity:1,transform:"scale(1)"}:{opacity:0,transform:"scale(0.95)"},m=l?{borderColor:e.errorBorderColor}:{},g=l&&a?{borderColor:e.errorBorderColor}:{},f={all:"initial","&::-ms-clear":{display:"none"},WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",appearance:"none",margin:0,width:"100%",display:"block",boxSizing:"border-box",outline:"none",fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,padding:`0 ${e.padding}`,background:"transparent",border:"none",verticalAlign:"baseline",'&[autocomplete="off"]::-webkit-contacts-auto-fill-button':{display:"none !important"},"&:focus":{boxShadow:"initial"},"&::placeholder":{color:e.placeholderColor},...c[o],textAlign:n},b={boxSizing:"border-box",fontFamily:e.fontFamily,maxWidth:"100%",overflow:"visible",unicodeBidi:"isolate"},v={...b,display:"flex",alignItems:"center",justifyContent:"flex-start",flexDirection:"row"},w={...b,flexShrink:0};return{textInput:{label:"textInput",...f,"&:is(input)[type]":f,"&:-webkit-any(input)[type]":f},facade:{label:"textInput__facade",position:"relative",display:"block",boxSizing:"border-box",border:`${e.borderWidth} ${e.borderStyle} ${e.borderColor}`,borderRadius:e.borderRadius,background:e.background,color:e.color,"&::before":{content:'""',pointerEvents:"none",position:"absolute",display:"block",boxSizing:"border-box",top:"-0.25rem",bottom:"-0.25rem",left:"-0.25rem",right:"-0.25rem",border:`${e.focusOutlineWidth} ${e.focusOutlineStyle} ${e.focusOutlineColor}`,borderRadius:`calc(${e.borderRadius} * 1.5)`,transition:"all 0.2s",...h,...g},...u,...m},layout:{label:"textInput__layout",...v,...!s&&{flexWrap:"wrap"}},beforeElement:{display:"inline-flex",alignItems:"center",label:"textInput__beforeElement",...w,paddingInlineStart:e.padding,...!1===d&&{paddingInlineStart:0}},innerWrapper:{label:"textInput__innerWrapper",...w,minWidth:"0.0625rem",flexShrink:1,flexGrow:1},inputLayout:{label:"textInput__inputLayout",...v},afterElement:{marginTop:"-1px",marginBottom:"-1px",label:"textInput__afterElement",...w,paddingInlineEnd:e.padding,...!1===p&&{paddingInlineEnd:0}}}}),(e=>{var i,t,o,n,s,r,l;const a=e.colors,d=e.typography,p=e.borders,c=e.spacing,u=e.forms,h=e.key,m={canvas:{color:e["ic-brand-font-color-dark"],focusOutlineColor:e["ic-brand-primary"]}};return{...{fontFamily:null==d?void 0:d.fontFamily,fontWeight:null==d?void 0:d.fontWeightNormal,borderWidth:null==p?void 0:p.widthSmall,borderStyle:null==p?void 0:p.style,borderColor:null==a||null===(i=a.contrasts)||void 0===i?void 0:i.grey1214,borderRadius:null==p?void 0:p.radiusMedium,color:null==a||null===(t=a.contrasts)||void 0===t?void 0:t.grey125125,background:null==a||null===(o=a.contrasts)||void 0===o?void 0:o.white1010,padding:null==c?void 0:c.small,focusOutlineWidth:null==p?void 0:p.widthMedium,focusOutlineStyle:null==p?void 0:p.style,focusOutlineColor:null==a||null===(n=a.contrasts)||void 0===n?void 0:n.blue4570,errorBorderColor:null==a||null===(s=a.contrasts)||void 0===s?void 0:s.red4570,errorOutlineColor:null==a||null===(r=a.contrasts)||void 0===r?void 0:r.red4570,placeholderColor:null==a||null===(l=a.contrasts)||void 0===l?void 0:l.grey4570,smallFontSize:null==d?void 0:d.fontSizeSmall,smallHeight:null==u?void 0:u.inputHeightSmall,mediumFontSize:null==d?void 0:d.fontSizeMedium,mediumHeight:null==u?void 0:u.inputHeightMedium,largeFontSize:null==d?void 0:d.fontSizeLarge,largeHeight:null==u?void 0:u.inputHeightLarge},...m[h]}}))(Ge=m()(((Ue=class extends i.Component{constructor(e){super(e),this.ref=null,this._input=null,this._beforeElement=null,this._afterElement=null,this._defaultId=void 0,this._messagesId=void 0,this._focusListener=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)},this.makeStyleProps=()=>{const e=this.interaction,i=this.state,t=i.hasFocus,o=i.beforeElementHasWidth,n=i.afterElementHasWidth;return{disabled:"disabled"===e,invalid:this.invalid,focused:t,beforeElementHasWidth:o,afterElementHasWidth:n}},this.handleInputRef=e=>{this._input=e,"function"==typeof this.props.inputRef&&this.props.inputRef(e)},this.handleChange=e=>{"function"==typeof this.props.onChange&&this.props.onChange(e,e.target.value)},this.handleBlur=e=>{"function"==typeof this.props.onBlur&&this.props.onBlur(e),this.setState({hasFocus:!1})},this.handleFocus=e=>{"function"==typeof this.props.onFocus&&this.props.onFocus(e),this.setState({hasFocus:!0})},this.state={hasFocus:!1,beforeElementHasWidth:void 0,afterElementHasWidth:void 0},this._defaultId=e.deterministicId(),this._messagesId=e.deterministicId("TextInput-messages")}componentDidMount(){var e,i;this._input&&(this._focusListener=C(this._input,"focus",this.handleFocus),this.setState({beforeElementHasWidth:this.getElementHasWidth(this._beforeElement),afterElementHasWidth:this.getElementHasWidth(this._afterElement)})),null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i,this.makeStyleProps())}componentWillUnmount(){this._focusListener&&this._focusListener.remove()}componentDidUpdate(e){var i,t;e.renderBeforeInput!==this.props.renderBeforeInput&&this.setState({beforeElementHasWidth:this.getElementHasWidth(this._beforeElement)}),e.renderAfterInput!==this.props.renderAfterInput&&this.setState({afterElementHasWidth:this.getElementHasWidth(this._afterElement)}),"disabled"!==I({props:e})&&"disabled"===I({props:this.props})&&this.setState({hasFocus:!1}),null===(i=(t=this.props).makeStyles)||void 0===i||i.call(t,this.makeStyleProps())}focus(){var e;null===(e=this._input)||void 0===e||e.focus()}get interaction(){return I({props:this.props})}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get invalid(){return!!this.props.messages&&this.props.messages.findIndex((e=>"error"===e.type))>=0}get focused(){return A(this._input)}get value(){var e;return null===(e=this._input)||void 0===e?void 0:e.value}get id(){return this.props.id||this._defaultId}renderInput(){var e;const i=this.props,t=i.type;i.size;const o=i.htmlSize;i.display,i.textAlign;const n=i.placeholder,s=i.value,r=i.defaultValue,l=i.isRequired;i.onFocus;const p=d(i,je),c=g(p),u=this.interaction;let h="";return c["aria-describedby"]&&(h=`${c["aria-describedby"]}`),this.hasMessages&&(h=""!==h?`${h} ${this._messagesId}`:this._messagesId),a("input",Object.assign({},c,{css:null===(e=this.props.styles)||void 0===e?void 0:e.textInput,defaultValue:r,value:s,placeholder:n,ref:this.handleInputRef,type:t,id:this.id,required:l,"aria-invalid":this.invalid?"true":void 0,disabled:"disabled"===u,readOnly:"readonly"===u,"aria-describedby":""!==h?h:void 0,size:o,onChange:this.handleChange,onBlur:this.handleBlur}))}getElementHasWidth(e){if(!e)return;const i=getComputedStyle(e),t=i.width,o=i.paddingInlineStart,n=i.paddingInlineEnd;if("auto"===t||""===t)return!0;return parseFloat(t)-parseFloat(o)-parseFloat(n)>0}render(){const e=this.props,i=e.width,t=e.display,o=e.renderLabel,n=e.renderBeforeInput,s=e.renderAfterInput,r=e.messages,l=e.inputContainerRef,d=e.styles,p=n?f(n):null,c=s?f(s):null,u=!!p||!!c;return a(Be,{id:this.id,label:f(o),messagesId:this._messagesId,messages:r,inline:"inline-block"===t,width:i,inputContainerRef:l,layout:this.props.layout,elementRef:this.handleRef},a("span",{css:null==d?void 0:d.facade},u?a("div",null,a("span",{css:null==d?void 0:d.layout},p&&a("span",{css:null==d?void 0:d.beforeElement,ref:e=>{this._beforeElement=e}},p),a("span",{css:null==d?void 0:d.innerWrapper},a("span",{css:null==d?void 0:d.inputLayout},a("span",{css:null==d?void 0:d.innerWrapper},this.renderInput()),c&&a("span",{css:null==d?void 0:d.afterElement,ref:e=>{this._afterElement=e}},c))))):this.renderInput()))}}).displayName="TextInput",Ue.componentId="TextInput",Ue.allowedProps=["renderLabel","type","id","value","defaultValue","interaction","messages","size","textAlign","width","htmlSize","display","shouldNotWrap","placeholder","isRequired","elementRef","inputRef","inputContainerRef","renderBeforeInput","renderAfterInput","onChange","onBlur","onFocus"],Ue.propTypes=Ve,Ue.defaultProps={type:"text",interaction:void 0,isRequired:!1,display:"block",shouldNotWrap:!1,size:"medium",textAlign:"start",messages:[]},Ge=Ue))||Ge)||Ge)||Ge;const Xe={id:n.string.isRequired,isHighlighted:n.bool,isSelected:n.bool,isDisabled:n.bool,renderBeforeLabel:n.oneOfType([n.node,n.func]),renderAfterLabel:n.oneOfType([n.node,n.func]),children:n.node};let Je=class extends i.Component{render(){return null}};Je.displayName="Option",Je.componentId="Select.Option",Je.allowedProps=["id","isHighlighted","isSelected","isDisabled","renderBeforeLabel","renderAfterLabel","children"],Je.propTypes=Xe,Je.defaultProps={isHighlighted:!1,isSelected:!1,isDisabled:!1};const Ke={renderLabel:n.oneOfType([n.node,n.func]).isRequired,children:y.oneOf([Je])};let Qe=class extends i.Component{render(){return null}};Qe.displayName="Group",Qe.componentId="Select.Group",Qe.allowedProps=["renderLabel","children"],Qe.propTypes=Ke,Qe.defaultProps={};const Ye={renderLabel:n.oneOfType([n.node,n.func]).isRequired,inputValue:n.string,id:n.string,size:n.oneOf(["small","medium","large"]),assistiveText:n.string,placeholder:n.string,interaction:n.oneOf(["enabled","disabled","readonly"]),isRequired:n.bool,isInline:n.bool,width:n.string,htmlSize:n.number,visibleOptionsCount:n.number,optionsMaxHeight:n.string,optionsMaxWidth:n.string,messages:n.arrayOf(xe.message),placement:L.placement,constrain:L.constrain,mountNode:L.mountNode,onFocus:n.func,onBlur:n.func,onInputChange:n.func,isShowingOptions:n.bool,onRequestShowOptions:n.func,onRequestHideOptions:n.func,onRequestHighlightOption:n.func,onRequestSelectOption:n.func,inputRef:n.func,listRef:n.func,renderBeforeInput:n.oneOfType([n.node,n.func]),renderAfterInput:n.oneOfType([n.node,n.func]),children:y.oneOf([Qe,Je]),shouldNotWrap:n.bool,scrollToHighlightedOption:n.bool},ei=["id","renderLabel","children"],ii=["renderLabel","inputValue","placeholder","isRequired","shouldNotWrap","size","isInline","width","htmlSize","messages","renderBeforeInput","renderAfterInput","onFocus","onBlur","onInputChange","onRequestHideOptions"],ti=["ref"];var oi,ni,si,ri,li,ai;const di=i.memo((function(e){const i=e.optionsItemProps,t=e.children;return a(T.Item,Object.assign({as:"li"},i),t)}),((e,i)=>e.selectOption.props.isHighlighted===i.selectOption.props.isHighlighted&&e.selectOption.props.isSelected===i.selectOption.props.isSelected&&e.selectOption.props.isDisabled===i.selectOption.props.isDisabled&&e.selectOption.props.children===i.selectOption.props.children&&e.selectOption.props.id===i.selectOption.props.id&&e.selectOption.props.renderBeforeLabel===i.selectOption.props.renderBeforeLabel&&e.selectOption.props.renderAfterLabel===i.selectOption.props.renderAfterLabel&&e.children===i.children));di.displayName="Item";let pi=u()(oi=s(((e,i)=>{const t=i.size,o={small:{fontSize:e.smallIconSize},medium:{fontSize:e.mediumIconSize},large:{fontSize:e.largeIconSize}};return{select:{label:"select",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color},icon:{label:"select__icon",...o[t]},assistiveText:{label:"select__assistiveText",display:"none"}}}),(e=>{var i,t;const o=e.colors,n=e.typography;return{...{fontSize:null==n?void 0:n.fontSizeMedium,fontFamily:null==n?void 0:n.fontFamily,fontWeight:null==n?void 0:n.fontWeightNormal,smallIconSize:null==n?void 0:n.fontSizeXSmall,mediumIconSize:null==n?void 0:n.fontSizeSmall,largeIconSize:null==n?void 0:n.fontSizeMedium,color:null==o||null===(i=o.contrasts)||void 0===i?void 0:i.grey125125,background:null==o||null===(t=o.contrasts)||void 0===t?void 0:t.white1010}}}))(oi=m()((ni=class e extends i.Component{constructor(...e){super(...e),this.state={hasInputRef:!1},this.ref=null,this._input=null,this._defaultId=this.props.deterministicId(),this._inputContainer=null,this._listView=null,this._optionIds=[],this._optionHeight=36,this.handleInputRef=e=>{var i,t;this.state.hasInputRef||this.setState({hasInputRef:!0}),this._input=e,null===(i=(t=this.props).inputRef)||void 0===i||i.call(t,e)},this.handleListRef=e=>{var i,t;null===(i=(t=this.props).listRef)||void 0===i||i.call(t,e),e&&e.querySelector('[role="option"]')&&(this._optionHeight=e.querySelector('[role="option"]').offsetHeight)},this.handleInputContainerRef=e=>{this._inputContainer=e}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i),this.props.scrollToHighlightedOption&&requestAnimationFrame((()=>this.scrollToOption(this.highlightedOptionId)))}focus(){this._input&&this._input.focus()}get childrenArray(){return i.Children.toArray(this.props.children)}getGroupChildrenArray(e){return i.Children.toArray(e.props.children)}get focused(){return!!this._input&&A(this._input)}get id(){return this.props.id||this._defaultId}get width(){return this._inputContainer?this._inputContainer.offsetWidth:void 0}get interaction(){return I({props:this.props})}get highlightedOptionId(){let e;return this.childrenArray.forEach((i=>{O(i,[Qe])?this.getGroupChildrenArray(i).forEach((i=>{i.props.isHighlighted&&(e=i.props.id)})):i.props.isHighlighted&&(e=i.props.id)})),e}get selectedOptionId(){const e=[];return this.childrenArray.forEach((i=>{O(i,[Qe])?this.getGroupChildrenArray(i).forEach((i=>{i.props.isSelected&&e.push(i.props.id)})):i.props.isSelected&&e.push(i.props.id)})),1===e.length?e[0]:0!==e.length?e:void 0}scrollToOption(e){if(this._listView){const i=this._listView.querySelector(`[id="${e}"]`);if(!i)return;const t=i.parentNode,o=H(this._listView).top,n=H(t).top,s=o+this._listView.clientHeight,r=n+(t?t.clientHeight:0);r>s?this._listView.scrollTop+=r-s:n{null==t||t(e);const i=this.selectedOptionId;i&&!Array.isArray(i)&&this.highlightOption(e,i)},onRequestHideOptions:e=>{null==o||o(e)},onRequestHighlightOption:(e,{id:t,direction:o})=>{if(!i)return;const n=this.highlightedOptionId;let s=this._optionIds.indexOf(t)>-1?t:void 0;if(!s)if(n){const e=this._optionIds.indexOf(n);s=e>-1?this._optionIds[e+o]:void 0}else s=this._optionIds[0];s&&this.highlightOption(e,s)},onRequestHighlightFirstOption:e=>{this.highlightOption(e,this._optionIds[0])},onRequestHighlightLastOption:e=>{this.highlightOption(e,this._optionIds[this._optionIds.length-1])},onRequestSelectOption:(e,{id:i})=>{i&&-1!==this._optionIds.indexOf(i)&&(null==n||n(e,{id:i}))}}:{}}renderOption(e,i){const t=i.getOptionProps,o=i.getDisabledOptionProps,n=e.props,s=n.id,r=n.isDisabled,d=n.isHighlighted,p=n.isSelected,c=n.renderBeforeLabel,u=n.renderAfterLabel,h=n.children,m=e=>{var i;return"function"!=typeof e||null!=e&&null!==(i=e.prototype)&&void 0!==i&&i.isReactComponent?e:e.bind(null,{id:s,isDisabled:r,isSelected:p,isHighlighted:d,children:h})};let g={...l(e.props,[...Je.allowedProps,...T.Item.allowedProps]),...t({id:s}),renderBeforeLabel:m(c),renderAfterLabel:m(u)};return p?g.variant="selected":d&&(g.variant="highlighted"),r?(g.variant="disabled",g={...g,...o()}):this._optionIds.push(s),a(di,{optionsItemProps:g,selectOption:e},h)}renderGroup(e,t){const o=t.getOptionProps,n=t.getDisabledOptionProps,s=t.isFirstChild,r=t.isLastChild,p=t.afterGroup,c=e.props,u=c.id,h=c.renderLabel,m=c.children,g=d(c,ei),f=[];return s||p||f.push(si||(si=a(T.Separator,null))),f.push(a(T,Object.assign({id:u,as:"ul",role:"group",renderLabel:h},l(g,[...T.allowedProps,...Qe.allowedProps])),i.Children.map(m,(e=>this.renderOption(e,{getOptionProps:o,getDisabledOptionProps:n}))))),r||f.push(ri||(ri=a(T.Separator,null))),f}renderList(e){const t=e.getListProps,o=e.getOptionProps,n=e.getDisabledOptionProps,s=this.props,r=s.isShowingOptions,l=s.optionsMaxWidth,d=s.optionsMaxHeight,p=s.visibleOptionsCount,c=s.children;let u=!1;const h=r?{display:"block",overflowY:"auto",maxHeight:d||this._optionHeight*p,maxWidth:l||this.width,background:"primary",elementRef:e=>this._listView=e}:{maxHeight:0};return a(b,h,a(T,t({as:"ul",elementRef:this.handleListRef}),r?i.Children.map(c,((e,t)=>{if(e&&O(e,[Qe,Je])){if(O(e,[Je]))return u=!1,this.renderOption(e,{getOptionProps:o,getDisabledOptionProps:n});if(O(e,[Qe])){const s=u;return u=!0,this.renderGroup(e,{getOptionProps:o,getDisabledOptionProps:n,isFirstChild:0===t,isLastChild:t===i.Children.count(c)-1,afterGroup:s})}}})):null))}renderIcon(){const e=this.props,i=e.styles,t=e.isShowingOptions;return a("span",{css:null==i?void 0:i.icon},t?li||(li=a(X,{inline:!1})):ai||(ai=a(Z,{inline:!1})))}renderInput(i){const t=i.getInputProps,o=i.getTriggerProps,n=this.props,s=n.renderLabel,r=n.inputValue,p=n.placeholder,c=n.isRequired,u=n.shouldNotWrap,h=n.size,m=n.isInline,g=n.width,f=n.htmlSize,b=n.messages,v=n.renderBeforeInput,w=n.renderAfterInput,y=n.onFocus,S=n.onBlur,O=n.onInputChange,x=n.onRequestHideOptions,k=d(n,ii),R=this.interaction,C=l(k,e.allowedProps),I=o({...C}),A=I.ref,L=d(I,ti),T=void 0!==O,H=T?{}:{role:N()?"button":"combobox",title:r,"aria-autocomplete":void 0,"aria-readonly":!0};C.autoComplete&&(H.autoComplete=C.autoComplete);const P={id:this.id,renderLabel:s,placeholder:p,size:h,width:g,htmlSize:f,messages:b,value:r,inputRef:F(A,this.handleInputRef),inputContainerRef:this.handleInputContainerRef,interaction:"enabled"!==R||T?R:"readonly",isRequired:c,shouldNotWrap:u,display:m?"inline-block":"block",renderBeforeInput:v,renderAfterInput:w||this.renderIcon(),onChange:"function"==typeof O?O:r?()=>{}:void 0,onFocus:y,onBlur:F(S,x),...H};return a(Ze,Object.assign({},L,t(P)))}render(){const e=this.props,i=e.constrain,t=e.placement,o=e.mountNode,n=e.assistiveText,s=e.isShowingOptions,r=e.styles;this._optionIds=[];const l=this.highlightedOptionId,d=this.selectedOptionId;return a(P,Object.assign({highlightedOptionId:l,isShowingOptions:s,selectedOptionId:d},this.getEventHandlers()),(({getRootProps:e,getInputProps:l,getTriggerProps:d,getListProps:p,getOptionProps:c,getDisabledOptionProps:u,getDescriptionProps:h})=>a("span",Object.assign({},e({css:null==r?void 0:r.select}),{ref:e=>this.ref=e}),this.renderInput({getInputProps:l,getTriggerProps:d}),a("span",Object.assign({},h(),{css:null==r?void 0:r.assistiveText}),n),a(z,{constrain:i,placement:t,mountNode:o,positionTarget:this._inputContainer,isShowingContent:s,shouldReturnFocus:!1,withArrow:!1},this.renderList({getListProps:p,getOptionProps:c,getDisabledOptionProps:u})))))}},ni.displayName="Select",ni.componentId="Select",ni.allowedProps=["renderLabel","inputValue","isShowingOptions","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","htmlSize","visibleOptionsCount","optionsMaxHeight","optionsMaxWidth","messages","placement","constrain","mountNode","onFocus","onBlur","onInputChange","onRequestShowOptions","onRequestHideOptions","onRequestHighlightOption","onRequestSelectOption","inputRef","listRef","renderBeforeInput","renderAfterInput","children","shouldNotWrap","scrollToHighlightedOption"],ni.propTypes=Ye,ni.defaultProps={inputValue:"",isShowingOptions:!1,size:"medium",interaction:void 0,isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",shouldNotWrap:!1,scrollToHighlightedOption:!0},ni.Option=Je,ni.Group=Qe,oi=ni))||oi)||oi)||oi;const ci={id:n.string.isRequired,value:n.oneOfType([n.string,n.number]).isRequired,isDisabled:n.bool,renderBeforeLabel:n.oneOfType([n.node,n.func]),renderAfterLabel:n.oneOfType([n.node,n.func]),children:n.string};class ui extends i.Component{render(){return null}}ui.displayName="Option",ui.componentId="SimpleSelect.Option",ui.allowedProps=["id","value","isDisabled","renderBeforeLabel","renderAfterLabel","children"],ui.propTypes=ci,ui.defaultProps={isDisabled:!1};const hi={renderLabel:n.oneOfType([n.node,n.func]).isRequired,children:y.oneOf([ui])};class mi extends i.Component{render(){return null}}mi.displayName="Group",mi.componentId="SimpleSelect.Group",mi.allowedProps=["renderLabel","children"],mi.propTypes=hi,mi.defaultProps={};const gi={renderLabel:n.oneOfType([n.node,n.func]).isRequired,value:n.oneOfType([n.string,n.number]),defaultValue:n.string,id:n.string,size:n.oneOf(["small","medium","large"]),assistiveText:n.string,placeholder:n.string,interaction:n.oneOf(["enabled","disabled","readonly"]),isRequired:n.bool,isInline:n.bool,width:n.string,visibleOptionsCount:n.number,optionsMaxHeight:n.string,optionsMaxWidth:n.string,messages:n.arrayOf(xe.message),placement:L.placement,constrain:L.constrain,mountNode:L.mountNode,onChange:n.func,onFocus:n.func,onBlur:n.func,onShowOptions:n.func,onHideOptions:n.func,inputRef:n.func,listRef:n.func,renderEmptyOption:n.oneOfType([n.node,n.func]),renderBeforeInput:n.oneOfType([n.node,n.func]),renderAfterInput:n.oneOfType([n.node,n.func]),children:y.oneOf([mi,ui])},fi=["id","value","children","renderBeforeLabel","renderAfterLabel"],bi=["id","renderLabel","children"],vi=["renderLabel","value","defaultValue","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","optionsMaxWidth","optionsMaxHeight","visibleOptionsCount","messages","placement","constrain","mountNode","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","onFocus","onBlur","onShowOptions","onHideOptions","children"];var wi,yi;let Si=u()(wi=m()(((yi=class extends i.Component{constructor(e){super(e),this.ref=null,this._emptyOptionId=void 0,this.getOption=(e,t)=>{const o=i.Children.toArray(this.props.children);let n;for(let s=0;s{this.ref=e},this.handleBlur=e=>{this.setState({highlightedOptionId:void 0}),"function"==typeof this.props.onBlur&&this.props.onBlur(e)},this.handleShowOptions=e=>{this.setState({isShowingOptions:!0}),"function"==typeof this.props.onShowOptions&&this.props.onShowOptions(e)},this.handleHideOptions=e=>{this.setState((e=>{const i=this.getOption("id",e.selectedOptionId);return{isShowingOptions:!1,highlightedOptionId:void 0,inputValue:i?i.props.children:""}})),"function"==typeof this.props.onHideOptions&&this.props.onHideOptions(e)},this.handleHighlightOption=(e,{id:i})=>{if(i===this._emptyOptionId)return;const t=this.getOption("id",i),o=null==t?void 0:t.props.children,n="keydown"===e.type?o:this.state.inputValue;this.setState({highlightedOptionId:i,inputValue:n})},this.handleSelectOption=(e,{id:i})=>{if(i===this._emptyOptionId)return void this.setState({isShowingOptions:!1});const t=this.getOption("id",i),o=t&&t.props.value;this.isControlled?this.setState({isShowingOptions:!1}):this.setState((e=>({isShowingOptions:!1,selectedOptionId:i,inputValue:t?t.props.children:e.inputValue}))),t&&"function"==typeof this.props.onChange&&this.props.onChange(e,{value:o,id:i}),"function"==typeof this.props.onHideOptions&&this.props.onHideOptions(e)};const t=this.getInitialOption(e);this.state={inputValue:t?t.props.children:"",isShowingOptions:!1,highlightedOptionId:void 0,selectedOptionId:t?t.props.id:void 0},this._emptyOptionId=e.deterministicId("Select-EmptyOption")}get _select(){return this.ref}focus(){this.ref&&this.ref.focus()}get focused(){return!!this.ref&&this.ref.focused}get id(){return this.ref?this.ref.id:void 0}get isControlled(){return void 0!==this.props.value}get interaction(){return I({props:this.props})}hasOptionsChanged(e,i){const o=e=>t.Children.map(e,(e=>t.isValidElement(e)?e.props.value:null)),n=o(e),s=o(i);return JSON.stringify(n)!==JSON.stringify(s)}componentDidUpdate(e){if(this.hasOptionsChanged(e.children,this.props.children)){const e=this.getOption("value",this.state.inputValue);this.setState({inputValue:e?e.props.children:void 0,selectedOptionId:e?e.props.id:""})}if(this.props.value!==e.value){let i=this.getOption("value",this.props.value);void 0===this.props.value&&(i=this.getOption("value",e.value)),this.setState({inputValue:i?i.props.children:"",selectedOptionId:i?i.props.id:""})}}getInitialOption(e){const i=e.value,t=e.defaultValue,o=i||t;return"string"==typeof o||"number"==typeof o?this.getOption("value",o):this.getFirstOption()}getOptionLabelById(e){const i=this.getOption("id",e);return i?i.props.children:""}getFirstOption(){const e=i.Children.toArray(this.props.children);let t;for(let o=0;oO(e,[ui])?this.renderOption(e):O(e,[mi])?this.renderGroup(e):null)).filter((e=>!!e)),0===e.length?this.renderEmptyOption():e}renderEmptyOption(){return t.createElement(pi.Option,{id:this._emptyOptionId,isHighlighted:!1,isSelected:!1},f(this.props.renderEmptyOption))}renderOption(e){const i=e.props,o=i.id,n=i.value,s=i.children,r=i.renderBeforeLabel,l=i.renderAfterLabel,a=d(i,fi),p=e.props.isDisabled,c=o===this.state.selectedOptionId,u=o===this.state.highlightedOptionId,h=e=>{var i;return"function"!=typeof e||null!=e&&null!==(i=e.prototype)&&void 0!==i&&i.isReactComponent?e:e.bind(null,{id:o,isDisabled:p,isSelected:c,isHighlighted:u,children:s})};return t.createElement(pi.Option,Object.assign({id:o,value:n,key:e.key||o,isHighlighted:o===this.state.highlightedOptionId,isSelected:o===this.state.selectedOptionId,isDisabled:e.props.isDisabled,renderBeforeLabel:h(r),renderAfterLabel:h(l)},g(a)),s)}renderGroup(e){const o=e.props,n=o.id,s=o.renderLabel,r=o.children,l=d(o,bi);return t.createElement(pi.Group,Object.assign({renderLabel:s,key:e.key||n},g(l)),i.Children.map(r,(e=>this.renderOption(e))))}render(){const e=this.props,i=e.renderLabel;e.value,e.defaultValue;const o=e.id,n=e.size,s=e.assistiveText,r=e.placeholder;e.interaction;const l=e.isRequired,a=e.isInline,p=e.width,c=e.optionsMaxWidth,u=e.optionsMaxHeight,h=e.visibleOptionsCount,m=e.messages,f=e.placement,b=e.constrain,v=e.mountNode,w=e.inputRef,y=e.listRef;e.renderEmptyOption;const S=e.renderBeforeInput,O=e.renderAfterInput,x=e.onFocus;e.onBlur,e.onShowOptions,e.onHideOptions,e.children;const k=d(e,vi);return t.createElement(pi,Object.assign({renderLabel:i,inputValue:this.state.inputValue,isShowingOptions:this.state.isShowingOptions,id:o,size:n,assistiveText:s,placeholder:r,interaction:this.interaction,isRequired:l,isInline:a,width:p,optionsMaxWidth:c,optionsMaxHeight:u,visibleOptionsCount:h,messages:m,placement:f,constrain:b,mountNode:v,ref:this.handleRef,inputRef:w,listRef:y,renderBeforeInput:S,renderAfterInput:O,onFocus:x,onBlur:this.handleBlur,onRequestShowOptions:this.handleShowOptions,onRequestHideOptions:this.handleHideOptions,onRequestHighlightOption:this.handleHighlightOption,onRequestSelectOption:this.handleSelectOption},g(k)),this.renderChildren())}}).displayName="SimpleSelect",yi.componentId="SimpleSelect",yi.Option=ui,yi.Group=mi,yi.allowedProps=["renderLabel","value","defaultValue","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","visibleOptionsCount","optionsMaxHeight","optionsMaxWidth","messages","placement","constrain","mountNode","onChange","onFocus","onBlur","onShowOptions","onHideOptions","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","children"],yi.propTypes=gi,yi.defaultProps={size:"medium",isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",renderEmptyOption:"---"},wi=yi))||wi)||wi;const Oi={children:n.node,renderSortLabel:n.oneOfType([n.node,n.func])},xi=i.createContext({isStacked:!1,hover:!1});var ki,Ri,Ci;let Ii=s((e=>({head:{label:"head",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,background:e.background}})),(e=>{var i,t;const o=e.colors,n=e.typography;return{...{fontSize:null==n?void 0:n.fontSizeMedium,fontFamily:null==n?void 0:n.fontFamily,fontWeight:null==n?void 0:n.fontWeightNormal,color:null==o||null===(i=o.contrasts)||void 0===i?void 0:i.grey125125,background:null==o||null===(t=o.contrasts)||void 0===t?void 0:t.white1010}}}))((Ri=class e extends i.Component{get isSortable(){const e=i.Children.toArray(this.props.children),t=v(e,1)[0];let o=!1;return t&&t.props&&t.props.children&&i.Children.forEach(t.props.children,(e=>{e.props.onRequestSort&&(o=!0)})),o}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;this.isSortable&&void 0===this.props.renderSortLabel&&r(!1,"[Table.Head] The `renderSortLabel` prop should be provided when Table is sortable."),null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}renderSelect(){var e;const t=this.props,o=t.children,n=t.renderSortLabel,s=i.Children.toArray(o),r=v(s,1)[0];if(null==r||null===(e=r.props)||void 0===e||!e.children)return null;const l=[],d={};let p,c=0;if(i.Children.forEach(r.props.children,(e=>{if(c+=1,!e.props)return;const i=e.props,t=i.id,o=i.stackedSortByLabel,n=i.sortDirection,s=i.onRequestSort;if(t&&s){const e=o||t;l.push({id:t,label:e}),d[t]=s,"none"!==n&&(p=t)}})),!l.length)return null;return a("div",{role:"rowgroup"},a("div",{role:"row"},a("div",{role:"cell","aria-colspan":c},a(Si,{renderLabel:n?f(n):Ci||(Ci=a(S,null)),renderBeforeInput:p&&J,value:p,onChange:(e,{value:i})=>{i&&"function"==typeof d[i]&&d[i](e,{id:`${i}`})}},l.map((({id:e,label:i})=>a(Si.Option,{id:e,key:e,value:e,renderBeforeLabel:e===p?J:()=>a(J,{style:{color:"transparent"}})},i)))))))}render(){const i=this.props,t=i.children,o=i.styles;return this.context.isStacked?this.renderSelect():a("thead",Object.assign({},l(this.props,e.allowedProps,["hover"]),{css:null==o?void 0:o.head}),t)}},Ri.displayName="Head",Ri.componentId="Table.Head",Ri.contextType=xi,Ri.allowedProps=["children","renderSortLabel"],Ri.propTypes=Oi,Ri.defaultProps={children:null},ki=Ri))||ki;const Ai={children:n.node};var Li,Ti;let Hi=s((e=>({body:{label:"body",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,background:e.background}})),(e=>{var i,t;const o=e.colors,n=e.typography;return{...{fontSize:null==n?void 0:n.fontSizeMedium,fontFamily:null==n?void 0:n.fontFamily,fontWeight:null==n?void 0:n.fontWeightNormal,color:null==o||null===(i=o.contrasts)||void 0===i?void 0:i.grey125125,background:null==o||null===(t=o.contrasts)||void 0===t?void 0:t.white1010}}}))((Ti=class e extends i.Component{componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}render(){const t=this.props,o=t.children,n=t.styles,s=this.context,r=s.isStacked,d=s.hover,p=s.headers;return a(b,Object.assign({},b.omitViewProps(l(this.props,e.allowedProps),e),{as:r?"div":"tbody",css:null==n?void 0:n.body,role:r?"rowgroup":void 0}),i.Children.map(o,(e=>i.isValidElement(e)?x(e,{key:e.props.name,hover:d,isStacked:r,headers:p}):e)))}},Ti.displayName="Body",Ti.componentId="Table.Body",Ti.contextType=xi,Ti.allowedProps=["children"],Ti.propTypes=Ai,Ti.defaultProps={children:null},Li=Ti))||Li;const Fi={children:n.node};var Pi,zi;let _i=s(((e,i,t)=>({row:{label:"row",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,background:e.background,boxSizing:"border-box",borderBottomStyle:"solid",borderBottomWidth:"0.0625rem",borderBottomColor:e.borderColor,...t.hover&&{borderLeft:"0.1875rem solid transparent",borderRight:"0.1875rem solid transparent","&:hover":{borderLeftColor:e.hoverBorderColor,borderRightColor:e.hoverBorderColor}},...t.isStacked&&{padding:e.padding}}})),(e=>{var i,t,o,n;const s=e.colors,r=e.typography,l=e.spacing,a=e.key,d={canvas:{hoverBorderColor:e["ic-brand-primary"]}};return{...{fontSize:null==r?void 0:r.fontSizeMedium,fontFamily:null==r?void 0:r.fontFamily,fontWeight:null==r?void 0:r.fontWeightNormal,color:null==s||null===(i=s.contrasts)||void 0===i?void 0:i.grey125125,background:null==s||null===(t=s.contrasts)||void 0===t?void 0:t.white1010,borderColor:null==s||null===(o=s.contrasts)||void 0===o?void 0:o.grey1214,hoverBorderColor:null==s||null===(n=s.contrasts)||void 0===n?void 0:n.blue4570,padding:`${null==l?void 0:l.xSmall} 0`},...d[a]}}))((zi=class e extends i.Component{componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i,{isStacked:this.context.isStacked,hover:this.context.hover})}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i,{isStacked:this.context.isStacked,hover:this.context.hover})}render(){const t=this.props,o=t.children,n=t.styles,s=this.context.isStacked,r=this.context.headers;return a(b,Object.assign({},b.omitViewProps(l(this.props,e.allowedProps),e),{as:s?"div":"tr",css:null==n?void 0:n.row,role:s?"row":void 0}),i.Children.toArray(o).filter(Boolean).map(((e,t)=>i.isValidElement(e)?x(e,{key:e.props.name,isStacked:s,header:r&&r[t]}):e)))}},zi.displayName="Row",zi.componentId="Table.Row",zi.contextType=xi,zi.allowedProps=["children"],zi.propTypes=Fi,zi.defaultProps={children:null},Pi=zi))||Pi;const Mi={isStacked:n.bool,id:n.string.isRequired,stackedSortByLabel:n.string,children:n.oneOfType([n.node,n.func]),width:n.oneOfType([n.string,n.number]),textAlign:n.oneOf(["start","center","end"]),sortDirection:n.oneOf(["none","ascending","descending"]),onRequestSort:n.func,scope:n.oneOf(["row","col","rowgroup","colgroup","auto"])};var Wi,Bi;let Ei=s(((e,i)=>{const t=i.onRequestSort,o=i.textAlign,n={color:e.color,fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:"bold",lineHeight:e.lineHeight,padding:e.padding};return{colHeader:{label:"colHeader",background:e.background,verticalAlign:"middle",boxSizing:"border-box",...!t&&n,textAlign:o},button:{label:"colHeader__button",...n,display:"flex",alignItems:"center",boxSizing:"border-box",border:"none",width:"100%",height:"100%",background:"transparent",cursor:"pointer",outline:"none","&::-moz-focus-inner":{border:0},"&:focus":{outline:`${e.focusOutlineWidth} ${e.focusOutlineStyle} ${e.focusOutlineColor}`},...{start:{flexDirection:"row"},center:{justifyContent:"center"},end:{flexDirection:"row-reverse"}}[o]},buttonContent:{label:"colHeader__buttonContent",display:"flex",alignItems:"center"},unSortedIconColor:{label:"colHeader__unSortedIconColor",color:e.unSortedIconColor},sortedIconColor:{label:"colHeader__sortedIconColor",color:e.sortedIconColor}}}),(e=>{var i,t,o,n,s,r;const l=e.typography,a=e.colors,d=e.borders,p=e.spacing;return{...{fontSize:null==l?void 0:l.fontSizeMedium,fontFamily:null==l?void 0:l.fontFamily,color:null==a||null===(i=a.contrasts)||void 0===i?void 0:i.grey125125,background:null==a||null===(t=a.contrasts)||void 0===t?void 0:t.white1010,borderColor:null==a||null===(o=a.contrasts)||void 0===o?void 0:o.grey1214,lineHeight:null==l?void 0:l.lineHeightCondensed,padding:`${null==p?void 0:p.xSmall} ${null==p?void 0:p.small}`,focusOutlineColor:null==a||null===(n=a.contrasts)||void 0===n?void 0:n.blue4570,focusOutlineWidth:null==d?void 0:d.widthMedium,focusOutlineStyle:null==d?void 0:d.style,unSortedIconColor:null==a||null===(s=a.contrasts)||void 0===s?void 0:s.grey4570,sortedIconColor:null==a||null===(r=a.contrasts)||void 0===r?void 0:r.blue4570}}}))((Bi=class e extends i.Component{constructor(...e){super(...e),this.handleClick=e=>{const i=this.props,t=i.id,o=i.onRequestSort;o&&o(e,{id:t})}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}renderSortArrow(){const e=this.props,i=e.sortDirection,t=e.onRequestSort,o=e.styles;return"ascending"===i?a(Y,{css:null==o?void 0:o.sortedIconColor}):"descending"===i?a(Q,{css:null==o?void 0:o.sortedIconColor}):t?a(K,{css:null==o?void 0:o.unSortedIconColor}):void 0}render(){const i=this.props,t=i.onRequestSort,o=i.width,n=i.children,s=i.sortDirection,r=i.scope,d=i.styles;return a("th",Object.assign({},l(this.props,e.allowedProps),{css:null==d?void 0:d.colHeader,style:{width:o},scope:r,"aria-sort":s}),t&&a("button",{onClick:this.handleClick,css:null==d?void 0:d.button},a("div",{css:null==d?void 0:d.buttonContent},f(n),this.renderSortArrow())),!t&&n,!t&&this.renderSortArrow())}},Bi.displayName="ColHeader",Bi.componentId="Table.ColHeader",Bi.allowedProps=["id","isStacked","stackedSortByLabel","children","width","textAlign","sortDirection","onRequestSort","scope"],Bi.propTypes=Mi,Bi.defaultProps={textAlign:"start",sortDirection:"none",children:null,scope:"col"},Wi=Bi))||Wi;const qi={children:n.oneOfType([n.node,n.func]),textAlign:n.oneOf(["start","center","end"])};var Ni,Di;let $i=s(((e,i)=>{const t=i.textAlign;return{rowHeader:{label:"rowHeader",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:"bold",color:e.color,background:e.background,boxSizing:"border-box",verticalAlign:"middle",lineHeight:e.lineHeight,padding:e.padding,...t&&{textAlign:t}}}}),(e=>{var i,t,o;const n=e.colors,s=e.typography,r=e.spacing;return{...{fontSize:null==s?void 0:s.fontSizeMedium,fontFamily:null==s?void 0:s.fontFamily,fontWeight:null==s?void 0:s.fontWeightNormal,color:null==n||null===(i=n.contrasts)||void 0===i?void 0:i.grey125125,background:null==n||null===(t=n.contrasts)||void 0===t?void 0:t.white1010,borderColor:null==n||null===(o=n.contrasts)||void 0===o?void 0:o.grey4570,lineHeight:null==s?void 0:s.lineHeightCondensed,padding:`${null==r?void 0:r.xSmall} ${null==r?void 0:r.small}`}}}))((Di=class e extends i.Component{componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}render(){const i=this.props,t=i.children,o=i.styles,n=this.context.isStacked;return a(b,Object.assign({},b.omitViewProps(l(this.props,e.allowedProps),e),{as:n?"div":"th",css:null==o?void 0:o.rowHeader,scope:"row",role:n?"rowheader":void 0}),f(t))}},Di.displayName="RowHeader",Di.componentId="Table.RowHeader",Di.contextType=xi,Di.allowedProps=["children","textAlign"],Di.propTypes=qi,Di.defaultProps={textAlign:"start",children:null},Ni=Di))||Ni;const Vi={children:n.oneOfType([n.node,n.func]),header:n.oneOfType([n.node,n.func]),textAlign:n.oneOf(["start","center","end"])};var ji,Gi;let Ui=s(((e,i)=>{const t=i.textAlign;return{cell:{label:"cell",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,background:e.background,boxSizing:"border-box",verticalAlign:"middle",lineHeight:e.lineHeight,padding:e.padding,...t&&{textAlign:t}}}}),(e=>{var i,t,o;const n=e.colors,s=e.typography,r=e.spacing;return{...{fontSize:null==s?void 0:s.fontSizeMedium,fontFamily:null==s?void 0:s.fontFamily,fontWeight:null==s?void 0:s.fontWeightNormal,color:null==n||null===(i=n.contrasts)||void 0===i?void 0:i.grey125125,background:null==n||null===(t=n.contrasts)||void 0===t?void 0:t.white1010,borderColor:null==n||null===(o=n.contrasts)||void 0===o?void 0:o.grey1214,lineHeight:null==s?void 0:s.lineHeightCondensed,padding:`${null==r?void 0:r.xSmall} ${null==r?void 0:r.small}`}}}))((Gi=class e extends i.Component{componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}render(){const i=this.props,t=i.children,o=i.styles,n=i.header,s=this.context.isStacked;return a(b,Object.assign({},b.omitViewProps(l(this.props,e.allowedProps),e),{as:s?"div":"td",css:null==o?void 0:o.cell,role:s?"cell":void 0}),n&&f(n),n&&": ",f(t))}},Gi.displayName="Cell",Gi.componentId="Table.Cell",Gi.contextType=xi,Gi.allowedProps=["children","header","textAlign"],Gi.propTypes=Vi,Gi.defaultProps={textAlign:"start",children:null},ji=Gi))||ji;const Zi={caption:n.node.isRequired,children:n.node,margin:w.spacing,elementRef:n.func,hover:n.bool,layout:n.oneOf(["auto","fixed","stacked"])};var Xi,Ji;let Ki=s(((e,i)=>{const t=i.layout;return{table:{label:"table",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,background:e.background,display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,..."fixed"===t&&{tableLayout:"fixed"},caption:{textAlign:"start"}}}}),(e=>{var i,t;const o=e.colors,n=e.typography,s=e.key,r={canvas:{color:e["ic-brand-font-color-dark"]}};return{...{fontSize:null==n?void 0:n.fontSizeMedium,fontFamily:null==n?void 0:n.fontFamily,fontWeight:null==n?void 0:n.fontWeightNormal,color:null==o||null===(i=o.contrasts)||void 0===i?void 0:i.grey125125,background:null==o||null===(t=o.contrasts)||void 0===t?void 0:t.white1010},...r[s]}}))((Ji=class e extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}getHeaders(){const e=i.Children.toArray(this.props.children),t=v(e,1)[0];if(!t||!i.isValidElement(t))return;const o=i.Children.toArray(t.props.children),n=v(o,1)[0];return n&&i.isValidElement(n)?i.Children.map(n.props.children,(e=>{if(i.isValidElement(e))return e.props.children})):void 0}render(){const t=this.props,o=t.margin,n=t.layout,s=t.caption,r=t.children,d=t.hover,p=t.styles,c="stacked"===n,u=c?this.getHeaders():void 0;return a(xi.Provider,{value:{isStacked:c,hover:d,headers:u}},a(b,Object.assign({},b.omitViewProps(l(this.props,e.allowedProps),e),{as:c?"div":"table",margin:o,elementRef:this.handleRef,css:null==p?void 0:p.table,role:c?"table":void 0,"aria-label":c?s:void 0}),!c&&a("caption",null,a(S,null,s)),i.Children.map(r,(e=>i.isValidElement(e)?x(e,{key:e.props.name}):e))))}},Ji.displayName="Table",Ji.componentId="Table",Ji.allowedProps=["caption","children","margin","elementRef","hover","layout"],Ji.propTypes=Zi,Ji.defaultProps={children:null,hover:!1,layout:"auto"},Ji.Head=Ii,Ji.Body=Hi,Ji.Row=_i,Ji.ColHeader=Ei,Ji.RowHeader=$i,Ji.Cell=Ui,Xi=Ji))||Xi;export{$e as F,fe as G,Z as I,Si as S,Ze as T,Ki as a,xe as b,He as c,pi as d,X as e,Be as f,ye as g,Ie as h,Me as i,pe as j,ne as k,J as l,K as m,Q as n,Y as o}; +import{m as e,r as i,R as t,S as o,i as n,w as s,n as r,o as l,l as a,k as d,q as p,s as c,v as u,h,t as m,p as g,x as f,V as b,y as v,T as w}from"./index-DxmLT0bY.js";import{C as y,S,m as O,s as x,h as k,f as R,i as C,j as I,k as A,P as L,O as T,l as H,n as F,o as P,p as z}from"./RenderTopNavBar-BObK9Y19.js";var _,M={exports:{}};var W,B,E=(_||(_=1,W=M,B=M.exports,function(e,i){var t="function",o="undefined",n="object",s="string",r="major",l="model",a="name",d="type",p="vendor",c="version",u="architecture",h="console",m="mobile",g="tablet",f="smarttv",b="wearable",v="embedded",w="Amazon",y="Apple",S="ASUS",O="BlackBerry",x="Browser",k="Chrome",R="Firefox",C="Google",I="Huawei",A="LG",L="Microsoft",T="Motorola",H="Opera",F="Samsung",P="Sharp",z="Sony",_="Xiaomi",M="Zebra",E="Facebook",q="Chromium OS",N="Mac OS",D=" Browser",$=function(e){for(var i={},t=0;t0?2===a.length?typeof a[1]==t?this[a[0]]=a[1].call(this,p):this[a[0]]=a[1]:3===a.length?typeof a[1]!==t||a[1].exec&&a[1].test?this[a[0]]=p?p.replace(a[1],a[2]):i:this[a[0]]=p?a[1].call(this,p,a[2]):i:4===a.length&&(this[a[0]]=p?a[3].call(this,p.replace(a[1],a[2])):i):this[a]=p||i;c+=2}},Z=function(e,t){for(var o in t)if(typeof t[o]===n&&t[o].length>0){for(var s=0;s2&&(e[l]="iPad",e[d]=g),e},this.getEngine=function(){var e={};return e[a]=i,e[c]=i,U.call(e,v,y.engine),e},this.getOS=function(){var e={};return e[a]=i,e[c]=i,U.call(e,v,y.os),S&&!e[a]&&w&&w.platform&&"Unknown"!=w.platform&&(e[a]=w.platform.replace(/chrome os/i,q).replace(/macos/i,N)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(e){return v=typeof e===s&&e.length>500?G(e,500):e,this},this.setUA(v),this};K.VERSION="1.0.39",K.BROWSER=$([a,c,r]),K.CPU=$([u]),K.DEVICE=$([l,p,d,h,m,f,g,b,v]),K.ENGINE=K.OS=$([a,c]),W.exports&&(B=W.exports=K),B.UAParser=K;var Q=typeof e!==o&&(e.jQuery||e.Zepto);if(Q&&!Q.ua){var Y=new K;Q.ua=Y.getResult(),Q.ua.get=function(){return Y.getUA()},Q.ua.set=function(e){Y.setUA(e);var i=Y.getResult();for(var t in i)Q.ua[t]=i[t]}}}("object"==typeof window?window:M.exports)),M.exports);const q=e(E),N=()=>"Safari"===(new q).getResult().browser.name;var D,$,V,j,G,U;class Z extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}render(){return t.createElement(o,Object.assign({},this.props,{name:"IconArrowOpenDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),D||(D=t.createElement("path",{d:"m.153 526.146 92.168-92.299 867.767 867.636 867.636-867.636 92.429 92.299-960.065 959.935z",fillRule:"evenodd"})))}}Z.glyphName="arrow-open-down",Z.variant="Line",Z.displayName="IconArrowOpenDownLine",Z.propTypes={...o.propTypes},Z.allowedProps=[...o.allowedProps];class X extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}render(){return t.createElement(o,Object.assign({},this.props,{name:"IconArrowOpenUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),$||($=t.createElement("path",{d:"m.153 1393.854 92.168 92.299 867.767-867.636 867.636 867.636 92.429-92.299L960.088 433.92z",fillRule:"evenodd"})))}}X.glyphName="arrow-open-up",X.variant="Line",X.displayName="IconArrowOpenUpLine",X.propTypes={...o.propTypes},X.allowedProps=[...o.allowedProps];class J extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}render(){return t.createElement(o,Object.assign({},this.props,{name:"IconCheck",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),V||(V=t.createElement("path",{d:"M1827.701 303.065 698.835 1431.801 92.299 825.266 0 917.564 698.835 1616.4 1919.869 395.234z",fillRule:"evenodd"})))}}J.glyphName="check",J.variant="Line",J.displayName="IconCheckLine",J.propTypes={...o.propTypes},J.allowedProps=[...o.allowedProps];class K extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}render(){return t.createElement(o,Object.assign({},this.props,{name:"IconMiniArrowDouble",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),j||(j=t.createElement("path",{d:"M1319.1 790.054 1020.06 355.79c-33.165-48.165-87.553-47.273-120.104 0L600.92 790.054c-33.166 48.165-12.581 87.21 46.116 87.21h625.944c58.64 0 78.67-39.938 46.12-87.21ZM600.634 1129.94l299.035 434.27c33.167 48.16 87.554 47.27 120.101 0l299.04-434.27c33.17-48.16 12.58-87.21-46.12-87.21H646.75c-58.636 0-78.668 39.94-46.116 87.21Z"})))}}K.glyphName="mini-arrow-double",K.variant="Line",K.displayName="IconMiniArrowDoubleLine",K.propTypes={...o.propTypes},K.allowedProps=[...o.allowedProps];class Q extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}render(){return t.createElement(o,Object.assign({},this.props,{name:"IconMiniArrowDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),G||(G=t.createElement("path",{d:"M994.034 1226.26c-18.796 27.296-49.269 27.3-68.067 0L574.893 716.424C556.096 689.128 567.713 667 600.852 667h718.297c33.133 0 44.757 22.125 25.959 49.424L994.034 1226.26Z",fillRule:"evenodd"})))}}Q.glyphName="mini-arrow-down",Q.variant="Line",Q.displayName="IconMiniArrowDownLine",Q.propTypes={...o.propTypes},Q.allowedProps=[...o.allowedProps];class Y extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}render(){return t.createElement(o,Object.assign({},this.props,{name:"IconMiniArrowUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),U||(U=t.createElement("path",{d:"M994.034 694.296c-18.796-27.296-49.269-27.3-68.067 0l-351.074 509.836c-18.797 27.296-7.18 49.424 25.959 49.424h718.297c33.133 0 44.757-22.125 25.959-49.424L994.034 694.296Z",fillRule:"evenodd"})))}}Y.glyphName="mini-arrow-up",Y.variant="Line",Y.displayName="IconMiniArrowUpLine",Y.propTypes={...o.propTypes},Y.allowedProps=[...o.allowedProps];const ee=n.oneOfType([n.number,n.oneOf(["auto"])]),ie={children:n.node,colSpacing:n.oneOf(["none","small","medium","large"]),rowSpacing:n.oneOf(["none","small","medium","large"]),textAlign:n.oneOf(["start","end","center","inherit"]),hAlign:n.oneOf(["start","center","end","space-around","space-between"]),vAlign:n.oneOf(["top","middle","bottom","stretch"]),startAt:n.oneOf(["small","medium","large","x-large",null]),visualDebug:n.bool,width:n.oneOfType([ee,n.shape({small:ee,medium:ee,large:ee,xLarge:ee})]),offset:n.oneOfType([ee,n.shape({small:ee,medium:ee,large:ee,xLarge:ee})]),isLastRow:n.bool,isLastCol:n.bool,elementRef:n.func};var te,oe;let ne=s(((e,i)=>{const t=i.vAlign,o=i.textAlign,n=i.rowSpacing,s=i.colSpacing,r=i.isLastRow,l=i.isLastCol,a=i.startAt,d=i.visualDebug,p={small:{marginBottom:e.spacingSmall},medium:{marginBottom:e.spacingMedium},large:{marginBottom:e.spacingLarge},none:{marginBottom:0}},c=()=>{const i={small:{paddingLeft:`calc(${e.spacingSmall} / 2)`,paddingRight:`calc(${e.spacingSmall} / 2)`},medium:{paddingLeft:`calc(${e.spacingMedium} / 2)`,paddingRight:`calc(${e.spacingMedium} / 2)`},large:{paddingLeft:`calc(${e.spacingLarge} / 2)`,paddingRight:`calc(${e.spacingLarge} / 2)`},none:{}};return{flexGrow:1,flexShrink:1,flexBasis:"0%",marginBottom:0,boxSizing:"border-box",...s&&i[s],...t&&{top:{alignSelf:"flex-start"},middle:{alignSelf:"center"},bottom:{alignSelf:"flex-end"},stretch:{alignSelf:"stretch"}}[t],...o&&{start:{textAlign:"start"},end:{textAlign:"end"},center:{textAlign:"center"},inherit:{textAlign:"inherit"}}[o]}},u=e=>(()=>{const e=["small","medium","large","x-large",null];return e.slice(e.indexOf(a))})().includes(e),h=(e="1")=>{switch(e){case"auto":return{flexGrow:0,flexShrink:0,flexBasis:"auto"};case 12:return{flex:"0 0 100%"};default:return{flexGrow:0,flexShrink:0,flexBasis:`calc(${e} / 12 * 99.999%)`,maxWidth:`calc(${e} / 12 * 99.999%)`}}},m=(e="1")=>{switch(e){case"auto":case 12:return{};default:return{marginInlineStart:`calc(${e} / 12 * 99.999%)`,marginInlineEnd:0}}},g=e=>a&&a===e?{...c()}:{},f=e=>{const t=(e=>{let t=i.width;if(t)return t&&"object"==typeof t&&(t=t["x-large"===e?"xLarge":e]),t})(e),o=(e=>{let t=i.offset;if(t)return t&&"object"==typeof t&&(t=t["x-large"===e?"xLarge":e]),t})(e);return u(e)?{...t&&h(t),...o&&m(o)}:{}},b=e=>({...g(e),...f(e)});return{gridCol:{label:"gridCol",display:"block",boxSizing:"border-box",textAlign:"inherit",minWidth:"0.0625rem",...n&&p[n],...r&&l&&{marginBottom:0},...b("small"),[`@media screen and (${e.mediumMin})`]:{...b("medium")},[`@media screen and (${e.largeMin})`]:{...b("large")},[`@media screen and (${e.xLargeMin})`]:{...b("x-large")},...d&&{outline:"0.0625rem dashed red"}}}}),(e=>{const i=e.spacing,t=e.media;return{...{spacingSmall:null==i?void 0:i.small,spacingMedium:null==i?void 0:i.medium,spacingLarge:null==i?void 0:i.large,...t}}}))((oe=class e extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}widthCheck(){const e=this.props.width;let i=!1;e&&("number"==typeof e&&e<=0&&(i=!0),"object"==typeof e&&Object.keys(e).forEach((t=>{"number"==typeof e[t]&&e[t]<=0&&(i=!0)}))),i&&r(!1,"Col width must be positive!")}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i),this.widthCheck()}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i),this.widthCheck()}render(){const i=this.props,t=i.children,o=i.styles,n=l(this.props,e.allowedProps);return a("span",Object.assign({},n,{ref:this.handleRef,css:null==o?void 0:o.gridCol}),t)}},oe.displayName="GridCol",oe.componentId="Grid.Col",oe.propTypes=ie,oe.allowedProps=["children","colSpacing","rowSpacing","textAlign","hAlign","vAlign","startAt","visualDebug","width","offset","isLastRow","isLastCol","elementRef"],oe.defaultProps={textAlign:"inherit",children:null,isLastCol:!1,isLastRow:!1},te=oe))||te;const se={children:y.oneOf([ne,S]),rowSpacing:n.oneOf(["none","small","medium","large"]),colSpacing:n.oneOf(["none","small","medium","large"]),hAlign:n.oneOf(["start","center","end","space-around","space-between"]),vAlign:n.oneOf(["top","middle","bottom","stretch"]),startAt:n.oneOf(["small","medium","large","x-large",null]),visualDebug:n.bool,isLastRow:n.bool},re=["styles","makeStyles"],le=["styles"];var ae,de;let pe=s(((e,i)=>{const t=i.hAlign,o=i.vAlign,n=i.rowSpacing,s=i.colSpacing,r=i.isLastRow,l=i.startAt,a=i.visualDebug,d=()=>{const i={small:{margin:`0 calc(-1 * ${e.spacingSmall} / 2)`},medium:{margin:`0 calc(-1 * ${e.spacingMedium} / 2)`},large:{margin:`0 calc(-1 * ${e.spacingLarge} / 2)`},none:{}},l={small:{marginBottom:e.spacingSmall},medium:{marginBottom:e.spacingMedium},large:{marginBottom:e.spacingLarge},none:{marginBottom:0}};return{display:"flex",flexFlow:"row nowrap",...t&&{center:{justifyContent:"center"},start:{justifyContent:"flex-start"},end:{justifyContent:"flex-end"},"space-around":{justifyContent:"space-around"},"space-between":{justifyContent:"space-between"}}[t],...o&&{top:{alignItems:"flex-start"},middle:{alignItems:"center"},bottom:{alignItems:"flex-end"},stretch:{alignItems:"stretch"}}[o],...s&&i[s],...n&&l[n],...r&&{marginBottom:0}}},p=e=>l&&l===e?{...d()}:{};return{gridRow:{label:"gridRow",display:"block",boxSizing:"border-box",...p("small"),[`@media screen and (${e.mediumMin})`]:{...p("medium")},[`@media screen and (${e.largeMin})`]:{...p("large")},[`@media screen and (${e.xLargeMin})`]:{...p("x-large")},...a&&{outline:"0.0625rem dashed blue"}}}}),(e=>{const i=e.spacing,t=e.media;return{...{spacingSmall:null==i?void 0:i.small,spacingMedium:null==i?void 0:i.medium,spacingLarge:null==i?void 0:i.large,...t}}}))((de=class e extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}renderChildren(){const t=this.props;t.styles,t.makeStyles;const o=d(t,re);return i.Children.map(this.props.children,((t,n)=>O(t,[ne])?x(t,{...p(o,e.allowedProps),...t.props,isLastRow:o.isLastRow,isLastCol:n+1===i.Children.count(this.props.children)}):t))}render(){const i=this.props,t=i.styles,o=d(i,le),n=l(o,e.allowedProps);return a("span",Object.assign({},n,{css:null==t?void 0:t.gridRow,ref:this.handleRef}),this.renderChildren())}},de.displayName="GridRow",de.componentId="Grid.Row",de.propTypes=se,de.allowedProps=["children","rowSpacing","colSpacing","hAlign","vAlign","startAt","visualDebug","isLastRow"],de.defaultProps={children:null,isLastRow:!1},ae=de))||ae;const ce={children:y.oneOf([pe,S]),colSpacing:n.oneOf(["none","small","medium","large"]),rowSpacing:n.oneOf(["none","small","medium","large"]),hAlign:n.oneOf(["start","center","end","space-around","space-between"]),vAlign:n.oneOf(["top","middle","bottom","stretch"]),startAt:n.oneOf(["small","medium","large","x-large",null]),visualDebug:n.bool},ue=["styles","makeStyles"],he=["styles"];var me,ge;let fe=s(((e,i)=>{const t=i.startAt,o=i.visualDebug,n=e=>t&&t===e?{boxSizing:"border-box"}:{};return{grid:{label:"grid",display:"block",...n("small"),[`@media screen and (${e.mediumMin})`]:{...n("medium")},[`@media screen and (${e.largeMin})`]:{...n("large")},[`@media screen and (${e.xLargeMin})`]:{...n("x-large")},...o&&{outline:"0.0625rem dashed red"}}}}),(e=>{const i=e.spacing,t=e.media;return{...{spacingSmall:null==i?void 0:i.small,spacingMedium:null==i?void 0:i.medium,spacingLarge:null==i?void 0:i.large,...t}}}))((ge=class e extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}renderChildren(){const t=this.props;t.styles,t.makeStyles;const o=d(t,ue),n=i.Children.toArray(this.props.children);return n.map(((i,t)=>O(i,[pe])?x(i,{...p(o,e.allowedProps),...i.props,isLastRow:t+1===n.length}):i))}render(){const i=this.props,t=i.styles,o=d(i,he),n=l(o,e.allowedProps);return a("span",Object.assign({},n,{css:null==t?void 0:t.grid,ref:this.handleRef}),this.renderChildren())}},ge.displayName="Grid",ge.componentId="Grid",ge.propTypes=ce,ge.allowedProps=["children","colSpacing","rowSpacing","hAlign","vAlign","startAt","visualDebug"],ge.defaultProps={colSpacing:"medium",rowSpacing:"medium",hAlign:"start",startAt:"small",vAlign:"top",visualDebug:!1,children:null},ge.Row=pe,ge.Col=ne,me=ge))||me;const be={children:n.node.isRequired,as:n.elementType};var ve,we;let ye=s(((e,i)=>{const t=i.children,o={all:"initial",display:"block",...k(t)&&{color:e.color,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,lineHeight:e.lineHeight,margin:0,textAlign:"inherit"}};return{formFieldLabel:{label:"formFieldLabel",...o,"&:is(label)":o,"&:-webkit-any(label)":o}}}),(e=>{var i;const t=e.colors,o=e.typography,n=e.key,s={canvas:{color:e["ic-brand-font-color-dark"]}};return{...{color:null==t||null===(i=t.contrasts)||void 0===i?void 0:i.grey125125,fontFamily:null==o?void 0:o.fontFamily,fontWeight:null==o?void 0:o.fontWeightBold,fontSize:null==o?void 0:o.fontSizeMedium,lineHeight:null==o?void 0:o.lineHeightFit},...s[n]}}))((we=class e extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}render(){const i=c(e,this.props),t=this.props,o=t.styles,n=t.children;return a(i,Object.assign({},l(this.props,e.allowedProps),{css:null==o?void 0:o.formFieldLabel,ref:this.handleRef}),n)}},we.displayName="FormFieldLabel",we.componentId="FormFieldLabel",we.propTypes=be,we.allowedProps=["as","children"],we.defaultProps={as:"span"},ve=we))||ve;const Se=n.oneOf(["error","hint","success","screenreader-only"]),Oe=n.node,xe={message:n.shape({type:Se,text:Oe})},ke={variant:Se,children:Oe};var Re,Ce;let Ie=s(((e,i)=>{const t=i.variant,o={hint:{color:e.colorHint},error:{color:e.colorError},success:{color:e.colorSuccess},"screenreader-only":{}};return{formFieldMessage:{label:"formFieldMessage",fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,lineHeight:e.lineHeight,display:"block",...o[t]}}}),(e=>{var i,t,o;const n=e.colors,s=e.typography,r=e.key,l={canvas:{colorHint:e["ic-brand-font-color-dark"]}};return{...{colorHint:null==n||null===(i=n.contrasts)||void 0===i?void 0:i.grey125125,colorError:null==n||null===(t=n.contrasts)||void 0===t?void 0:t.red4570,colorSuccess:null==n||null===(o=n.contrasts)||void 0===o?void 0:o.green4570,fontFamily:null==s?void 0:s.fontFamily,fontWeight:null==s?void 0:s.fontWeightNormal,fontSize:null==s?void 0:s.fontSizeSmall,lineHeight:null==s?void 0:s.lineHeight},...l[r]}}))(((Ce=class extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}render(){const e=this.props,i=e.children,t=e.styles;return"screenreader-only"!==this.props.variant?a("span",{css:null==t?void 0:t.formFieldMessage,ref:this.handleRef},i):a(S,{elementRef:this.handleRef},i)}}).displayName="FormFieldMessage",Ce.componentId="FormFieldMessage",Ce.propTypes=ke,Ce.allowedProps=["variant","children"],Ce.defaultProps={variant:"hint"},Re=Ce))||Re;const Ae={messages:n.arrayOf(xe.message)};var Le,Te;let He=s((e=>({formFieldMessages:{label:"formFieldMessages",padding:0,display:"block",margin:`calc(-1 * ${e.topMargin}) 0 0 0`},message:{label:"formFieldMessages__message",display:"block"}})),(e=>{const i=e.spacing;return{...{topMargin:null==i?void 0:i.xxSmall}}}))((Te=class e extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{this.ref=e}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}render(){const i=this.props,t=i.messages,o=i.styles;return t&&t.length>0?a("span",Object.assign({css:null==o?void 0:o.formFieldMessages},l(this.props,e.allowedProps),{ref:this.handleRef}),t.map(((e,i)=>a("span",{key:`error${i}`,css:null==o?void 0:o.message},a(Ie,{variant:e.type},e.text))))):null}},Te.displayName="FormFieldMessages",Te.componentId="FormFieldMessages",Te.propTypes=Ae,Te.allowedProps=["messages"],Te.defaultProps={},Le=Te))||Le;const Fe={label:n.node.isRequired,id:n.string,as:n.elementType,messages:n.arrayOf(xe.message),messagesId:n.string,children:n.node,inline:n.bool,layout:n.oneOf(["stacked","inline"]),labelAlign:n.oneOf(["start","end"]),vAlign:n.oneOf(["top","middle","bottom"]),width:n.string,inputContainerRef:n.func,elementRef:n.func},Pe=["makeStyles","styles"];var ze,_e;let Me=u()(ze=s(((e,i)=>({formFieldLayout:{label:"formFieldLayout",all:"initial",border:"0",padding:"0",margin:"0",minWidth:"0",direction:"inherit",textAlign:"start",opacity:"inherit",display:"block",width:"100%",...i.inline&&{display:"inline-block",verticalAlign:"middle",width:"auto"}}})),null)((_e=class e extends i.Component{constructor(e){super(e),this._messagesId=void 0,this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)},this.handleInputContainerRef=e=>{"function"==typeof this.props.inputContainerRef&&this.props.inputContainerRef(e)},this._messagesId=e.messagesId||e.deterministicId(),h(void 0!==e.width||!e.inline||"inline"!==e.layout,"[FormFieldLayout] The 'inline' prop is true, and the 'layout' is set to 'inline'.\n This will cause a layout issue in Internet Explorer 11 unless you also add a value for the 'width' prop.")}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}get hasVisibleLabel(){return this.props.label&&k(this.props.label)}get hasMessages(){return this.props.messages&&this.props.messages.length>0}get elementType(){return c(e,this.props)}get inlineContainerAndLabel(){return this.props.inline&&"inline"===this.props.layout}renderLabel(){return this.hasVisibleLabel?a(fe.Col,{textAlign:this.props.labelAlign,width:this.inlineContainerAndLabel?"auto":3},a(ye,{"aria-hidden":"fieldset"===this.elementType?"true":void 0},this.props.label)):"fieldset"!==this.elementType?this.props.label:null}renderLegend(){return a(S,{as:"legend"},this.props.label,this.hasMessages&&a(He,{messages:this.props.messages}))}renderVisibleMessages(){return this.hasMessages?a(fe.Row,null,a(fe.Col,{offset:this.inlineContainerAndLabel?void 0:3,textAlign:this.inlineContainerAndLabel?"end":void 0},a(He,{id:this._messagesId,messages:this.props.messages}))):null}render(){const i=this.elementType,t=this.props;t.makeStyles;const o=t.styles,n=d(t,Pe),s=n.width,r=n.layout,c=n.children;return a(i,Object.assign({},l(n,[...e.allowedProps,...fe.allowedProps]),{css:null==o?void 0:o.formFieldLayout,style:{width:s},"aria-describedby":this.hasMessages?this._messagesId:void 0,ref:this.handleRef}),"fieldset"===this.elementType&&this.renderLegend(),a(fe,Object.assign({rowSpacing:"small",colSpacing:"small",startAt:"inline"===r&&this.hasVisibleLabel?"medium":null},p(n,fe.allowedProps)),a(fe.Row,null,this.renderLabel(),a(fe.Col,{width:this.inlineContainerAndLabel?"auto":void 0,elementRef:this.handleInputContainerRef},c)),this.renderVisibleMessages()))}},_e.displayName="FormFieldLayout",_e.componentId="FormFieldLayout",_e.propTypes=Fe,_e.allowedProps=["label","id","as","messages","messagesId","children","inline","layout","labelAlign","width","inputContainerRef","elementRef"],_e.defaultProps={inline:!1,layout:"stacked",as:"label",labelAlign:"end"},ze=_e))||ze)||ze;const We={label:n.node.isRequired,id:n.string.isRequired,messages:n.arrayOf(xe.message),messagesId:n.string,children:n.node,inline:n.bool,layout:n.oneOf(["stacked","inline"]),labelAlign:n.oneOf(["start","end"]),vAlign:n.oneOf(["top","middle","bottom"]),width:n.string,inputContainerRef:n.func,elementRef:n.func};class Be extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}render(){return t.createElement(Me,Object.assign({},l(this.props,Be.allowedProps),p(this.props,Me.allowedProps),{label:this.props.label,vAlign:this.props.vAlign,as:"label",htmlFor:this.props.id,elementRef:this.handleRef}))}}Be.displayName="FormField",Be.componentId="FormField",Be.propTypes=We,Be.allowedProps=["label","id","messages","messagesId","children","inline","layout","labelAlign","vAlign","width","inputContainerRef","elementRef"],Be.defaultProps={inline:!1,layout:"stacked",labelAlign:"end",vAlign:"middle"};const Ee={description:n.node.isRequired,as:n.elementType,messages:n.arrayOf(xe.message),messagesId:n.string,disabled:n.bool,children:n.node,layout:n.oneOf(["stacked","columns","inline"]),rowSpacing:n.oneOf(["none","small","medium","large"]),colSpacing:n.oneOf(["none","small","medium","large"]),vAlign:n.oneOf(["top","middle","bottom"]),startAt:n.oneOf(["small","medium","large","x-large",null]),elementRef:n.func},qe=["styles","makeStyles"];var Ne,De;let $e=s(((e,i,t)=>{const o=i.disabled,n=t.invalid;return{formFieldGroup:{label:"formFieldGroup",border:`${e.borderWidth} ${e.borderStyle} ${e.borderColor}`,borderRadius:e.borderRadius,display:"block",...n&&{borderColor:e.errorBorderColor,padding:e.errorFieldsPadding},...o&&{opacity:.6,cursor:"not-allowed",pointerEvents:"none"}}}}),(e=>{var i;const t=e.borders,o=e.colors,n=e.spacing;return{...{borderWidth:null==t?void 0:t.widthSmall,borderStyle:null==t?void 0:t.style,borderColor:"transparent",borderRadius:null==t?void 0:t.radiusMedium,errorBorderColor:null==o||null===(i=o.contrasts)||void 0===i?void 0:i.red4570,errorFieldsPadding:null==n?void 0:n.xSmall}}}))((De=class e extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i,this.makeStylesVariables)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i,this.makeStylesVariables)}get makeStylesVariables(){return{invalid:this.invalid}}get invalid(){return!!this.props.messages&&this.props.messages.findIndex((e=>"error"===e.type))>=0}renderColumns(){return i.Children.map(this.props.children,((e,i)=>e?a(fe.Col,{width:e.props&&e.props.width?"auto":void 0,key:i},e):null))}renderChildren(){return a(fe,{colSpacing:this.props.colSpacing,rowSpacing:this.props.rowSpacing,vAlign:this.props.vAlign,startAt:this.props.startAt||("columns"===this.props.layout?"medium":null)},a(fe.Row,null,this.renderColumns()))}renderFields(){const e=this.props.styles;return a("span",{key:"fields",css:null==e?void 0:e.formFieldGroup},this.renderChildren())}render(){const i=this.props;i.styles,i.makeStyles;const t=d(i,qe);return a(Me,Object.assign({},l(t,e.allowedProps),p(t,Me.allowedProps),{vAlign:t.vAlign,layout:"inline"===t.layout?"inline":"stacked",label:t.description,"aria-disabled":t.disabled?"true":void 0,"aria-invalid":this.invalid?"true":void 0,elementRef:this.handleRef}),this.renderFields())}},De.displayName="FormFieldGroup",De.componentId="FormFieldGroup",De.propTypes=Ee,De.allowedProps=["description","as","messages","messagesId","disabled","children","layout","rowSpacing","colSpacing","vAlign","startAt","elementRef"],De.defaultProps={as:"fieldset",disabled:!1,rowSpacing:"medium",colSpacing:"small",vAlign:"middle"},Ne=De))||Ne;const Ve={renderLabel:n.oneOfType([n.node,n.func]),type:n.oneOf(["text","email","url","tel","search","password"]),id:n.string,value:R(n.string),defaultValue:n.string,interaction:n.oneOf(["enabled","disabled","readonly"]),messages:n.arrayOf(xe.message),size:n.oneOf(["small","medium","large"]),textAlign:n.oneOf(["start","center"]),width:n.string,htmlSize:n.number,display:n.oneOf(["inline-block","block"]),shouldNotWrap:n.bool,placeholder:n.string,isRequired:n.bool,elementRef:n.func,inputRef:n.func,inputContainerRef:n.func,renderBeforeInput:n.oneOfType([n.node,n.func]),renderAfterInput:n.oneOfType([n.node,n.func]),onChange:n.func,onBlur:n.func,onFocus:n.func},je=["type","size","htmlSize","display","textAlign","placeholder","value","defaultValue","isRequired","onFocus"];var Ge,Ue;let Ze=u()(Ge=s(((e,i,t)=>{const o=i.size,n=i.textAlign,s=i.shouldNotWrap,r=t.disabled,l=t.invalid,a=t.focused,d=t.beforeElementHasWidth,p=t.afterElementHasWidth,c={small:{fontSize:e.smallFontSize,height:`calc(${e.smallHeight} - (2 * ${e.borderWidth}))`,lineHeight:`calc(${e.smallHeight} - (2 * ${e.borderWidth}))`},medium:{fontSize:e.mediumFontSize,height:`calc(${e.mediumHeight} - (2 * ${e.borderWidth}))`,lineHeight:`calc(${e.mediumHeight} - (2 * ${e.borderWidth}))`},large:{fontSize:e.largeFontSize,height:`calc(${e.largeHeight} - (2 * ${e.borderWidth}))`,lineHeight:`calc(${e.largeHeight} - (2 * ${e.borderWidth}))`}},u=r?{cursor:"not-allowed",pointerEvents:"none",opacity:"0.5"}:{},h=a?{opacity:1,transform:"scale(1)"}:{opacity:0,transform:"scale(0.95)"},m=l?{borderColor:e.errorBorderColor}:{},g=l&&a?{borderColor:e.errorBorderColor}:{},f={all:"initial","&::-ms-clear":{display:"none"},WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",appearance:"none",margin:0,width:"100%",display:"block",boxSizing:"border-box",outline:"none",fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,padding:`0 ${e.padding}`,background:"transparent",border:"none",verticalAlign:"baseline",'&[autocomplete="off"]::-webkit-contacts-auto-fill-button':{display:"none !important"},"&:focus":{boxShadow:"initial"},"&::placeholder":{color:e.placeholderColor},...c[o],textAlign:n},b={boxSizing:"border-box",fontFamily:e.fontFamily,maxWidth:"100%",overflow:"visible",unicodeBidi:"isolate"},v={...b,display:"flex",alignItems:"center",justifyContent:"flex-start",flexDirection:"row"},w={...b,flexShrink:0};return{textInput:{label:"textInput",...f,"&:is(input)[type]":f,"&:-webkit-any(input)[type]":f},facade:{label:"textInput__facade",position:"relative",display:"block",boxSizing:"border-box",border:`${e.borderWidth} ${e.borderStyle} ${e.borderColor}`,borderRadius:e.borderRadius,background:e.background,color:e.color,"&::before":{content:'""',pointerEvents:"none",position:"absolute",display:"block",boxSizing:"border-box",top:"-0.25rem",bottom:"-0.25rem",left:"-0.25rem",right:"-0.25rem",border:`${e.focusOutlineWidth} ${e.focusOutlineStyle} ${e.focusOutlineColor}`,borderRadius:`calc(${e.borderRadius} * 1.5)`,transition:"all 0.2s",...h,...g},...u,...m},layout:{label:"textInput__layout",...v,...!s&&{flexWrap:"wrap"}},beforeElement:{display:"inline-flex",alignItems:"center",label:"textInput__beforeElement",...w,paddingInlineStart:e.padding,...!1===d&&{paddingInlineStart:0}},innerWrapper:{label:"textInput__innerWrapper",...w,minWidth:"0.0625rem",flexShrink:1,flexGrow:1},inputLayout:{label:"textInput__inputLayout",...v},afterElement:{marginTop:"-1px",marginBottom:"-1px",label:"textInput__afterElement",...w,paddingInlineEnd:e.padding,...!1===p&&{paddingInlineEnd:0}}}}),(e=>{var i,t,o,n,s,r,l;const a=e.colors,d=e.typography,p=e.borders,c=e.spacing,u=e.forms,h=e.key,m={canvas:{color:e["ic-brand-font-color-dark"],focusOutlineColor:e["ic-brand-primary"]}};return{...{fontFamily:null==d?void 0:d.fontFamily,fontWeight:null==d?void 0:d.fontWeightNormal,borderWidth:null==p?void 0:p.widthSmall,borderStyle:null==p?void 0:p.style,borderColor:null==a||null===(i=a.contrasts)||void 0===i?void 0:i.grey1214,borderRadius:null==p?void 0:p.radiusMedium,color:null==a||null===(t=a.contrasts)||void 0===t?void 0:t.grey125125,background:null==a||null===(o=a.contrasts)||void 0===o?void 0:o.white1010,padding:null==c?void 0:c.small,focusOutlineWidth:null==p?void 0:p.widthMedium,focusOutlineStyle:null==p?void 0:p.style,focusOutlineColor:null==a||null===(n=a.contrasts)||void 0===n?void 0:n.blue4570,errorBorderColor:null==a||null===(s=a.contrasts)||void 0===s?void 0:s.red4570,errorOutlineColor:null==a||null===(r=a.contrasts)||void 0===r?void 0:r.red4570,placeholderColor:null==a||null===(l=a.contrasts)||void 0===l?void 0:l.grey4570,smallFontSize:null==d?void 0:d.fontSizeSmall,smallHeight:null==u?void 0:u.inputHeightSmall,mediumFontSize:null==d?void 0:d.fontSizeMedium,mediumHeight:null==u?void 0:u.inputHeightMedium,largeFontSize:null==d?void 0:d.fontSizeLarge,largeHeight:null==u?void 0:u.inputHeightLarge},...m[h]}}))(Ge=m()(((Ue=class extends i.Component{constructor(e){super(e),this.ref=null,this._input=null,this._beforeElement=null,this._afterElement=null,this._defaultId=void 0,this._messagesId=void 0,this._focusListener=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)},this.makeStyleProps=()=>{const e=this.interaction,i=this.state,t=i.hasFocus,o=i.beforeElementHasWidth,n=i.afterElementHasWidth;return{disabled:"disabled"===e,invalid:this.invalid,focused:t,beforeElementHasWidth:o,afterElementHasWidth:n}},this.handleInputRef=e=>{this._input=e,"function"==typeof this.props.inputRef&&this.props.inputRef(e)},this.handleChange=e=>{"function"==typeof this.props.onChange&&this.props.onChange(e,e.target.value)},this.handleBlur=e=>{"function"==typeof this.props.onBlur&&this.props.onBlur(e),this.setState({hasFocus:!1})},this.handleFocus=e=>{"function"==typeof this.props.onFocus&&this.props.onFocus(e),this.setState({hasFocus:!0})},this.state={hasFocus:!1,beforeElementHasWidth:void 0,afterElementHasWidth:void 0},this._defaultId=e.deterministicId(),this._messagesId=e.deterministicId("TextInput-messages")}componentDidMount(){var e,i;this._input&&(this._focusListener=C(this._input,"focus",this.handleFocus),this.setState({beforeElementHasWidth:this.getElementHasWidth(this._beforeElement),afterElementHasWidth:this.getElementHasWidth(this._afterElement)})),null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i,this.makeStyleProps())}componentWillUnmount(){this._focusListener&&this._focusListener.remove()}componentDidUpdate(e){var i,t;e.renderBeforeInput!==this.props.renderBeforeInput&&this.setState({beforeElementHasWidth:this.getElementHasWidth(this._beforeElement)}),e.renderAfterInput!==this.props.renderAfterInput&&this.setState({afterElementHasWidth:this.getElementHasWidth(this._afterElement)}),"disabled"!==I({props:e})&&"disabled"===I({props:this.props})&&this.setState({hasFocus:!1}),null===(i=(t=this.props).makeStyles)||void 0===i||i.call(t,this.makeStyleProps())}focus(){var e;null===(e=this._input)||void 0===e||e.focus()}get interaction(){return I({props:this.props})}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get invalid(){return!!this.props.messages&&this.props.messages.findIndex((e=>"error"===e.type))>=0}get focused(){return A(this._input)}get value(){var e;return null===(e=this._input)||void 0===e?void 0:e.value}get id(){return this.props.id||this._defaultId}renderInput(){var e;const i=this.props,t=i.type;i.size;const o=i.htmlSize;i.display,i.textAlign;const n=i.placeholder,s=i.value,r=i.defaultValue,l=i.isRequired;i.onFocus;const p=d(i,je),c=g(p),u=this.interaction;let h="";return c["aria-describedby"]&&(h=`${c["aria-describedby"]}`),this.hasMessages&&(h=""!==h?`${h} ${this._messagesId}`:this._messagesId),a("input",Object.assign({},c,{css:null===(e=this.props.styles)||void 0===e?void 0:e.textInput,defaultValue:r,value:s,placeholder:n,ref:this.handleInputRef,type:t,id:this.id,required:l,"aria-invalid":this.invalid?"true":void 0,disabled:"disabled"===u,readOnly:"readonly"===u,"aria-describedby":""!==h?h:void 0,size:o,onChange:this.handleChange,onBlur:this.handleBlur}))}getElementHasWidth(e){if(!e)return;const i=getComputedStyle(e),t=i.width,o=i.paddingInlineStart,n=i.paddingInlineEnd;if("auto"===t||""===t)return!0;return parseFloat(t)-parseFloat(o)-parseFloat(n)>0}render(){const e=this.props,i=e.width,t=e.display,o=e.renderLabel,n=e.renderBeforeInput,s=e.renderAfterInput,r=e.messages,l=e.inputContainerRef,d=e.styles,p=n?f(n):null,c=s?f(s):null,u=!!p||!!c;return a(Be,{id:this.id,label:f(o),messagesId:this._messagesId,messages:r,inline:"inline-block"===t,width:i,inputContainerRef:l,layout:this.props.layout,elementRef:this.handleRef},a("span",{css:null==d?void 0:d.facade},u?a("div",null,a("span",{css:null==d?void 0:d.layout},p&&a("span",{css:null==d?void 0:d.beforeElement,ref:e=>{this._beforeElement=e}},p),a("span",{css:null==d?void 0:d.innerWrapper},a("span",{css:null==d?void 0:d.inputLayout},a("span",{css:null==d?void 0:d.innerWrapper},this.renderInput()),c&&a("span",{css:null==d?void 0:d.afterElement,ref:e=>{this._afterElement=e}},c))))):this.renderInput()))}}).displayName="TextInput",Ue.componentId="TextInput",Ue.allowedProps=["renderLabel","type","id","value","defaultValue","interaction","messages","size","textAlign","width","htmlSize","display","shouldNotWrap","placeholder","isRequired","elementRef","inputRef","inputContainerRef","renderBeforeInput","renderAfterInput","onChange","onBlur","onFocus"],Ue.propTypes=Ve,Ue.defaultProps={type:"text",interaction:void 0,isRequired:!1,display:"block",shouldNotWrap:!1,size:"medium",textAlign:"start",messages:[]},Ge=Ue))||Ge)||Ge)||Ge;const Xe={id:n.string.isRequired,isHighlighted:n.bool,isSelected:n.bool,isDisabled:n.bool,renderBeforeLabel:n.oneOfType([n.node,n.func]),renderAfterLabel:n.oneOfType([n.node,n.func]),children:n.node};let Je=class extends i.Component{render(){return null}};Je.displayName="Option",Je.componentId="Select.Option",Je.allowedProps=["id","isHighlighted","isSelected","isDisabled","renderBeforeLabel","renderAfterLabel","children"],Je.propTypes=Xe,Je.defaultProps={isHighlighted:!1,isSelected:!1,isDisabled:!1};const Ke={renderLabel:n.oneOfType([n.node,n.func]).isRequired,children:y.oneOf([Je])};let Qe=class extends i.Component{render(){return null}};Qe.displayName="Group",Qe.componentId="Select.Group",Qe.allowedProps=["renderLabel","children"],Qe.propTypes=Ke,Qe.defaultProps={};const Ye={renderLabel:n.oneOfType([n.node,n.func]).isRequired,inputValue:n.string,id:n.string,size:n.oneOf(["small","medium","large"]),assistiveText:n.string,placeholder:n.string,interaction:n.oneOf(["enabled","disabled","readonly"]),isRequired:n.bool,isInline:n.bool,width:n.string,htmlSize:n.number,visibleOptionsCount:n.number,optionsMaxHeight:n.string,optionsMaxWidth:n.string,messages:n.arrayOf(xe.message),placement:L.placement,constrain:L.constrain,mountNode:L.mountNode,onFocus:n.func,onBlur:n.func,onInputChange:n.func,isShowingOptions:n.bool,onRequestShowOptions:n.func,onRequestHideOptions:n.func,onRequestHighlightOption:n.func,onRequestSelectOption:n.func,inputRef:n.func,listRef:n.func,renderBeforeInput:n.oneOfType([n.node,n.func]),renderAfterInput:n.oneOfType([n.node,n.func]),children:y.oneOf([Qe,Je]),shouldNotWrap:n.bool,scrollToHighlightedOption:n.bool},ei=["id","renderLabel","children"],ii=["renderLabel","inputValue","placeholder","isRequired","shouldNotWrap","size","isInline","width","htmlSize","messages","renderBeforeInput","renderAfterInput","onFocus","onBlur","onInputChange","onRequestHideOptions"],ti=["ref"];var oi,ni,si,ri,li,ai;const di=i.memo((function(e){const i=e.optionsItemProps,t=e.children;return a(T.Item,Object.assign({as:"li"},i),t)}),((e,i)=>e.selectOption.props.isHighlighted===i.selectOption.props.isHighlighted&&e.selectOption.props.isSelected===i.selectOption.props.isSelected&&e.selectOption.props.isDisabled===i.selectOption.props.isDisabled&&e.selectOption.props.children===i.selectOption.props.children&&e.selectOption.props.id===i.selectOption.props.id&&e.selectOption.props.renderBeforeLabel===i.selectOption.props.renderBeforeLabel&&e.selectOption.props.renderAfterLabel===i.selectOption.props.renderAfterLabel&&e.children===i.children));di.displayName="Item";let pi=u()(oi=s(((e,i)=>{const t=i.size,o={small:{fontSize:e.smallIconSize},medium:{fontSize:e.mediumIconSize},large:{fontSize:e.largeIconSize}};return{select:{label:"select",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color},icon:{label:"select__icon",...o[t]},assistiveText:{label:"select__assistiveText",display:"none"}}}),(e=>{var i,t;const o=e.colors,n=e.typography;return{...{fontSize:null==n?void 0:n.fontSizeMedium,fontFamily:null==n?void 0:n.fontFamily,fontWeight:null==n?void 0:n.fontWeightNormal,smallIconSize:null==n?void 0:n.fontSizeXSmall,mediumIconSize:null==n?void 0:n.fontSizeSmall,largeIconSize:null==n?void 0:n.fontSizeMedium,color:null==o||null===(i=o.contrasts)||void 0===i?void 0:i.grey125125,background:null==o||null===(t=o.contrasts)||void 0===t?void 0:t.white1010}}}))(oi=m()((ni=class e extends i.Component{constructor(...e){super(...e),this.state={hasInputRef:!1},this.ref=null,this._input=null,this._defaultId=this.props.deterministicId(),this._inputContainer=null,this._listView=null,this._optionIds=[],this._optionHeight=36,this.handleInputRef=e=>{var i,t;this.state.hasInputRef||this.setState({hasInputRef:!0}),this._input=e,null===(i=(t=this.props).inputRef)||void 0===i||i.call(t,e)},this.handleListRef=e=>{var i,t;null===(i=(t=this.props).listRef)||void 0===i||i.call(t,e),e&&e.querySelector('[role="option"]')&&(this._optionHeight=e.querySelector('[role="option"]').offsetHeight)},this.handleInputContainerRef=e=>{this._inputContainer=e}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i),this.props.scrollToHighlightedOption&&requestAnimationFrame((()=>this.scrollToOption(this.highlightedOptionId)))}focus(){this._input&&this._input.focus()}get childrenArray(){return i.Children.toArray(this.props.children)}getGroupChildrenArray(e){return i.Children.toArray(e.props.children)}get focused(){return!!this._input&&A(this._input)}get id(){return this.props.id||this._defaultId}get width(){return this._inputContainer?this._inputContainer.offsetWidth:void 0}get interaction(){return I({props:this.props})}get highlightedOptionId(){let e;return this.childrenArray.forEach((i=>{O(i,[Qe])?this.getGroupChildrenArray(i).forEach((i=>{i.props.isHighlighted&&(e=i.props.id)})):i.props.isHighlighted&&(e=i.props.id)})),e}get selectedOptionId(){const e=[];return this.childrenArray.forEach((i=>{O(i,[Qe])?this.getGroupChildrenArray(i).forEach((i=>{i.props.isSelected&&e.push(i.props.id)})):i.props.isSelected&&e.push(i.props.id)})),1===e.length?e[0]:0!==e.length?e:void 0}scrollToOption(e){if(this._listView){const i=this._listView.querySelector(`[id="${e}"]`);if(!i)return;const t=i.parentNode,o=H(this._listView).top,n=H(t).top,s=o+this._listView.clientHeight,r=n+(t?t.clientHeight:0);r>s?this._listView.scrollTop+=r-s:n{null==t||t(e);const i=this.selectedOptionId;i&&!Array.isArray(i)&&this.highlightOption(e,i)},onRequestHideOptions:e=>{null==o||o(e)},onRequestHighlightOption:(e,{id:t,direction:o})=>{if(!i)return;const n=this.highlightedOptionId;let s=this._optionIds.indexOf(t)>-1?t:void 0;if(!s)if(n){const e=this._optionIds.indexOf(n);s=e>-1?this._optionIds[e+o]:void 0}else s=this._optionIds[0];s&&this.highlightOption(e,s)},onRequestHighlightFirstOption:e=>{this.highlightOption(e,this._optionIds[0])},onRequestHighlightLastOption:e=>{this.highlightOption(e,this._optionIds[this._optionIds.length-1])},onRequestSelectOption:(e,{id:i})=>{i&&-1!==this._optionIds.indexOf(i)&&(null==n||n(e,{id:i}))}}:{}}renderOption(e,i){const t=i.getOptionProps,o=i.getDisabledOptionProps,n=e.props,s=n.id,r=n.isDisabled,d=n.isHighlighted,p=n.isSelected,c=n.renderBeforeLabel,u=n.renderAfterLabel,h=n.children,m=e=>{var i;return"function"!=typeof e||null!=e&&null!==(i=e.prototype)&&void 0!==i&&i.isReactComponent?e:e.bind(null,{id:s,isDisabled:r,isSelected:p,isHighlighted:d,children:h})};let g={...l(e.props,[...Je.allowedProps,...T.Item.allowedProps]),...t({id:s}),renderBeforeLabel:m(c),renderAfterLabel:m(u)};return p?g.variant="selected":d&&(g.variant="highlighted"),r?(g.variant="disabled",g={...g,...o()}):this._optionIds.push(s),a(di,{optionsItemProps:g,selectOption:e},h)}renderGroup(e,t){const o=t.getOptionProps,n=t.getDisabledOptionProps,s=t.isFirstChild,r=t.isLastChild,p=t.afterGroup,c=e.props,u=c.id,h=c.renderLabel,m=c.children,g=d(c,ei),f=[];return s||p||f.push(si||(si=a(T.Separator,null))),f.push(a(T,Object.assign({id:u,as:"ul",role:"group",renderLabel:h},l(g,[...T.allowedProps,...Qe.allowedProps])),i.Children.map(m,(e=>this.renderOption(e,{getOptionProps:o,getDisabledOptionProps:n}))))),r||f.push(ri||(ri=a(T.Separator,null))),f}renderList(e){const t=e.getListProps,o=e.getOptionProps,n=e.getDisabledOptionProps,s=this.props,r=s.isShowingOptions,l=s.optionsMaxWidth,d=s.optionsMaxHeight,p=s.visibleOptionsCount,c=s.children;let u=!1;const h=r?{display:"block",overflowY:"auto",maxHeight:d||this._optionHeight*p,maxWidth:l||this.width,background:"primary",elementRef:e=>this._listView=e}:{maxHeight:0};return a(b,h,a(T,t({as:"ul",elementRef:this.handleListRef}),r?i.Children.map(c,((e,t)=>{if(e&&O(e,[Qe,Je])){if(O(e,[Je]))return u=!1,this.renderOption(e,{getOptionProps:o,getDisabledOptionProps:n});if(O(e,[Qe])){const s=u;return u=!0,this.renderGroup(e,{getOptionProps:o,getDisabledOptionProps:n,isFirstChild:0===t,isLastChild:t===i.Children.count(c)-1,afterGroup:s})}}})):null))}renderIcon(){const e=this.props,i=e.styles,t=e.isShowingOptions;return a("span",{css:null==i?void 0:i.icon},t?li||(li=a(X,{inline:!1})):ai||(ai=a(Z,{inline:!1})))}renderInput(i){const t=i.getInputProps,o=i.getTriggerProps,n=this.props,s=n.renderLabel,r=n.inputValue,p=n.placeholder,c=n.isRequired,u=n.shouldNotWrap,h=n.size,m=n.isInline,g=n.width,f=n.htmlSize,b=n.messages,v=n.renderBeforeInput,w=n.renderAfterInput,y=n.onFocus,S=n.onBlur,O=n.onInputChange,x=n.onRequestHideOptions,k=d(n,ii),R=this.interaction,C=l(k,e.allowedProps),I=o({...C}),A=I.ref,L=d(I,ti),T=void 0!==O,H=T?{}:{role:N()?"button":"combobox",title:r,"aria-autocomplete":void 0,"aria-readonly":!0};C.autoComplete&&(H.autoComplete=C.autoComplete);const P={id:this.id,renderLabel:s,placeholder:p,size:h,width:g,htmlSize:f,messages:b,value:r,inputRef:F(A,this.handleInputRef),inputContainerRef:this.handleInputContainerRef,interaction:"enabled"!==R||T?R:"readonly",isRequired:c,shouldNotWrap:u,display:m?"inline-block":"block",renderBeforeInput:v,renderAfterInput:w||this.renderIcon(),onChange:"function"==typeof O?O:r?()=>{}:void 0,onFocus:y,onBlur:F(S,x),...H};return a(Ze,Object.assign({},L,t(P)))}render(){const e=this.props,i=e.constrain,t=e.placement,o=e.mountNode,n=e.assistiveText,s=e.isShowingOptions,r=e.styles;this._optionIds=[];const l=this.highlightedOptionId,d=this.selectedOptionId;return a(P,Object.assign({highlightedOptionId:l,isShowingOptions:s,selectedOptionId:d},this.getEventHandlers()),(({getRootProps:e,getInputProps:l,getTriggerProps:d,getListProps:p,getOptionProps:c,getDisabledOptionProps:u,getDescriptionProps:h})=>a("span",Object.assign({},e({css:null==r?void 0:r.select}),{ref:e=>this.ref=e}),this.renderInput({getInputProps:l,getTriggerProps:d}),a("span",Object.assign({},h(),{css:null==r?void 0:r.assistiveText}),n),a(z,{constrain:i,placement:t,mountNode:o,positionTarget:this._inputContainer,isShowingContent:s,shouldReturnFocus:!1,withArrow:!1},this.renderList({getListProps:p,getOptionProps:c,getDisabledOptionProps:u})))))}},ni.displayName="Select",ni.componentId="Select",ni.allowedProps=["renderLabel","inputValue","isShowingOptions","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","htmlSize","visibleOptionsCount","optionsMaxHeight","optionsMaxWidth","messages","placement","constrain","mountNode","onFocus","onBlur","onInputChange","onRequestShowOptions","onRequestHideOptions","onRequestHighlightOption","onRequestSelectOption","inputRef","listRef","renderBeforeInput","renderAfterInput","children","shouldNotWrap","scrollToHighlightedOption"],ni.propTypes=Ye,ni.defaultProps={inputValue:"",isShowingOptions:!1,size:"medium",interaction:void 0,isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",shouldNotWrap:!1,scrollToHighlightedOption:!0},ni.Option=Je,ni.Group=Qe,oi=ni))||oi)||oi)||oi;const ci={id:n.string.isRequired,value:n.oneOfType([n.string,n.number]).isRequired,isDisabled:n.bool,renderBeforeLabel:n.oneOfType([n.node,n.func]),renderAfterLabel:n.oneOfType([n.node,n.func]),children:n.string};class ui extends i.Component{render(){return null}}ui.displayName="Option",ui.componentId="SimpleSelect.Option",ui.allowedProps=["id","value","isDisabled","renderBeforeLabel","renderAfterLabel","children"],ui.propTypes=ci,ui.defaultProps={isDisabled:!1};const hi={renderLabel:n.oneOfType([n.node,n.func]).isRequired,children:y.oneOf([ui])};class mi extends i.Component{render(){return null}}mi.displayName="Group",mi.componentId="SimpleSelect.Group",mi.allowedProps=["renderLabel","children"],mi.propTypes=hi,mi.defaultProps={};const gi={renderLabel:n.oneOfType([n.node,n.func]).isRequired,value:n.oneOfType([n.string,n.number]),defaultValue:n.string,id:n.string,size:n.oneOf(["small","medium","large"]),assistiveText:n.string,placeholder:n.string,interaction:n.oneOf(["enabled","disabled","readonly"]),isRequired:n.bool,isInline:n.bool,width:n.string,visibleOptionsCount:n.number,optionsMaxHeight:n.string,optionsMaxWidth:n.string,messages:n.arrayOf(xe.message),placement:L.placement,constrain:L.constrain,mountNode:L.mountNode,onChange:n.func,onFocus:n.func,onBlur:n.func,onShowOptions:n.func,onHideOptions:n.func,inputRef:n.func,listRef:n.func,renderEmptyOption:n.oneOfType([n.node,n.func]),renderBeforeInput:n.oneOfType([n.node,n.func]),renderAfterInput:n.oneOfType([n.node,n.func]),children:y.oneOf([mi,ui])},fi=["id","value","children","renderBeforeLabel","renderAfterLabel"],bi=["id","renderLabel","children"],vi=["renderLabel","value","defaultValue","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","optionsMaxWidth","optionsMaxHeight","visibleOptionsCount","messages","placement","constrain","mountNode","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","onFocus","onBlur","onShowOptions","onHideOptions","children"];var wi,yi;let Si=u()(wi=m()(((yi=class extends i.Component{constructor(e){super(e),this.ref=null,this._emptyOptionId=void 0,this.getOption=(e,t)=>{const o=i.Children.toArray(this.props.children);let n;for(let s=0;s{this.ref=e},this.handleBlur=e=>{this.setState({highlightedOptionId:void 0}),"function"==typeof this.props.onBlur&&this.props.onBlur(e)},this.handleShowOptions=e=>{this.setState({isShowingOptions:!0}),"function"==typeof this.props.onShowOptions&&this.props.onShowOptions(e)},this.handleHideOptions=e=>{this.setState((e=>{const i=this.getOption("id",e.selectedOptionId);return{isShowingOptions:!1,highlightedOptionId:void 0,inputValue:i?i.props.children:""}})),"function"==typeof this.props.onHideOptions&&this.props.onHideOptions(e)},this.handleHighlightOption=(e,{id:i})=>{if(i===this._emptyOptionId)return;const t=this.getOption("id",i),o=null==t?void 0:t.props.children,n="keydown"===e.type?o:this.state.inputValue;this.setState({highlightedOptionId:i,inputValue:n})},this.handleSelectOption=(e,{id:i})=>{if(i===this._emptyOptionId)return void this.setState({isShowingOptions:!1});const t=this.getOption("id",i),o=t&&t.props.value;this.isControlled?this.setState({isShowingOptions:!1}):this.setState((e=>({isShowingOptions:!1,selectedOptionId:i,inputValue:t?t.props.children:e.inputValue}))),t&&"function"==typeof this.props.onChange&&this.props.onChange(e,{value:o,id:i}),"function"==typeof this.props.onHideOptions&&this.props.onHideOptions(e)};const t=this.getInitialOption(e);this.state={inputValue:t?t.props.children:"",isShowingOptions:!1,highlightedOptionId:void 0,selectedOptionId:t?t.props.id:void 0},this._emptyOptionId=e.deterministicId("Select-EmptyOption")}get _select(){return this.ref}focus(){this.ref&&this.ref.focus()}get focused(){return!!this.ref&&this.ref.focused}get id(){return this.ref?this.ref.id:void 0}get isControlled(){return void 0!==this.props.value}get interaction(){return I({props:this.props})}hasOptionsChanged(e,i){const o=e=>t.Children.map(e,(e=>t.isValidElement(e)?e.props.value:null)),n=o(e),s=o(i);return JSON.stringify(n)!==JSON.stringify(s)}componentDidUpdate(e){if(this.hasOptionsChanged(e.children,this.props.children)){const e=this.getOption("value",this.state.inputValue);this.setState({inputValue:e?e.props.children:void 0,selectedOptionId:e?e.props.id:""})}if(this.props.value!==e.value){let i=this.getOption("value",this.props.value);void 0===this.props.value&&(i=this.getOption("value",e.value)),this.setState({inputValue:i?i.props.children:"",selectedOptionId:i?i.props.id:""})}}getInitialOption(e){const i=e.value,t=e.defaultValue,o=i||t;return"string"==typeof o||"number"==typeof o?this.getOption("value",o):this.getFirstOption()}getOptionLabelById(e){const i=this.getOption("id",e);return i?i.props.children:""}getFirstOption(){const e=i.Children.toArray(this.props.children);let t;for(let o=0;oO(e,[ui])?this.renderOption(e):O(e,[mi])?this.renderGroup(e):null)).filter((e=>!!e)),0===e.length?this.renderEmptyOption():e}renderEmptyOption(){return t.createElement(pi.Option,{id:this._emptyOptionId,isHighlighted:!1,isSelected:!1},f(this.props.renderEmptyOption))}renderOption(e){const i=e.props,o=i.id,n=i.value,s=i.children,r=i.renderBeforeLabel,l=i.renderAfterLabel,a=d(i,fi),p=e.props.isDisabled,c=o===this.state.selectedOptionId,u=o===this.state.highlightedOptionId,h=e=>{var i;return"function"!=typeof e||null!=e&&null!==(i=e.prototype)&&void 0!==i&&i.isReactComponent?e:e.bind(null,{id:o,isDisabled:p,isSelected:c,isHighlighted:u,children:s})};return t.createElement(pi.Option,Object.assign({id:o,value:n,key:e.key||o,isHighlighted:o===this.state.highlightedOptionId,isSelected:o===this.state.selectedOptionId,isDisabled:e.props.isDisabled,renderBeforeLabel:h(r),renderAfterLabel:h(l)},g(a)),s)}renderGroup(e){const o=e.props,n=o.id,s=o.renderLabel,r=o.children,l=d(o,bi);return t.createElement(pi.Group,Object.assign({renderLabel:s,key:e.key||n},g(l)),i.Children.map(r,(e=>this.renderOption(e))))}render(){const e=this.props,i=e.renderLabel;e.value,e.defaultValue;const o=e.id,n=e.size,s=e.assistiveText,r=e.placeholder;e.interaction;const l=e.isRequired,a=e.isInline,p=e.width,c=e.optionsMaxWidth,u=e.optionsMaxHeight,h=e.visibleOptionsCount,m=e.messages,f=e.placement,b=e.constrain,v=e.mountNode,w=e.inputRef,y=e.listRef;e.renderEmptyOption;const S=e.renderBeforeInput,O=e.renderAfterInput,x=e.onFocus;e.onBlur,e.onShowOptions,e.onHideOptions,e.children;const k=d(e,vi);return t.createElement(pi,Object.assign({renderLabel:i,inputValue:this.state.inputValue,isShowingOptions:this.state.isShowingOptions,id:o,size:n,assistiveText:s,placeholder:r,interaction:this.interaction,isRequired:l,isInline:a,width:p,optionsMaxWidth:c,optionsMaxHeight:u,visibleOptionsCount:h,messages:m,placement:f,constrain:b,mountNode:v,ref:this.handleRef,inputRef:w,listRef:y,renderBeforeInput:S,renderAfterInput:O,onFocus:x,onBlur:this.handleBlur,onRequestShowOptions:this.handleShowOptions,onRequestHideOptions:this.handleHideOptions,onRequestHighlightOption:this.handleHighlightOption,onRequestSelectOption:this.handleSelectOption},g(k)),this.renderChildren())}}).displayName="SimpleSelect",yi.componentId="SimpleSelect",yi.Option=ui,yi.Group=mi,yi.allowedProps=["renderLabel","value","defaultValue","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","visibleOptionsCount","optionsMaxHeight","optionsMaxWidth","messages","placement","constrain","mountNode","onChange","onFocus","onBlur","onShowOptions","onHideOptions","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","children"],yi.propTypes=gi,yi.defaultProps={size:"medium",isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",renderEmptyOption:"---"},wi=yi))||wi)||wi;const Oi={children:n.node,renderSortLabel:n.oneOfType([n.node,n.func])},xi=i.createContext({isStacked:!1,hover:!1});var ki,Ri,Ci;let Ii=s((e=>({head:{label:"head",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,background:e.background}})),(e=>{var i,t;const o=e.colors,n=e.typography;return{...{fontSize:null==n?void 0:n.fontSizeMedium,fontFamily:null==n?void 0:n.fontFamily,fontWeight:null==n?void 0:n.fontWeightNormal,color:null==o||null===(i=o.contrasts)||void 0===i?void 0:i.grey125125,background:null==o||null===(t=o.contrasts)||void 0===t?void 0:t.white1010}}}))((Ri=class e extends i.Component{get isSortable(){const e=i.Children.toArray(this.props.children),t=v(e,1)[0];let o=!1;return t&&t.props&&t.props.children&&i.Children.forEach(t.props.children,(e=>{e.props.onRequestSort&&(o=!0)})),o}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;this.isSortable&&void 0===this.props.renderSortLabel&&r(!1,"[Table.Head] The `renderSortLabel` prop should be provided when Table is sortable."),null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}renderSelect(){var e;const t=this.props,o=t.children,n=t.renderSortLabel,s=i.Children.toArray(o),r=v(s,1)[0];if(null==r||null===(e=r.props)||void 0===e||!e.children)return null;const l=[],d={};let p,c=0;if(i.Children.forEach(r.props.children,(e=>{if(c+=1,!e.props)return;const i=e.props,t=i.id,o=i.stackedSortByLabel,n=i.sortDirection,s=i.onRequestSort;if(t&&s){const e=o||t;l.push({id:t,label:e}),d[t]=s,"none"!==n&&(p=t)}})),!l.length)return null;return a("div",{role:"rowgroup"},a("div",{role:"row"},a("div",{role:"cell","aria-colspan":c},a(Si,{renderLabel:n?f(n):Ci||(Ci=a(S,null)),renderBeforeInput:p&&J,value:p,onChange:(e,{value:i})=>{i&&"function"==typeof d[i]&&d[i](e,{id:`${i}`})}},l.map((({id:e,label:i})=>a(Si.Option,{id:e,key:e,value:e,renderBeforeLabel:e===p?J:()=>a(J,{style:{color:"transparent"}})},i)))))))}render(){const i=this.props,t=i.children,o=i.styles;return this.context.isStacked?this.renderSelect():a("thead",Object.assign({},l(this.props,e.allowedProps,["hover"]),{css:null==o?void 0:o.head}),t)}},Ri.displayName="Head",Ri.componentId="Table.Head",Ri.contextType=xi,Ri.allowedProps=["children","renderSortLabel"],Ri.propTypes=Oi,Ri.defaultProps={children:null},ki=Ri))||ki;const Ai={children:n.node};var Li,Ti;let Hi=s((e=>({body:{label:"body",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,background:e.background}})),(e=>{var i,t;const o=e.colors,n=e.typography;return{...{fontSize:null==n?void 0:n.fontSizeMedium,fontFamily:null==n?void 0:n.fontFamily,fontWeight:null==n?void 0:n.fontWeightNormal,color:null==o||null===(i=o.contrasts)||void 0===i?void 0:i.grey125125,background:null==o||null===(t=o.contrasts)||void 0===t?void 0:t.white1010}}}))((Ti=class e extends i.Component{componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}render(){const t=this.props,o=t.children,n=t.styles,s=this.context,r=s.isStacked,d=s.hover,p=s.headers;return a(b,Object.assign({},b.omitViewProps(l(this.props,e.allowedProps),e),{as:r?"div":"tbody",css:null==n?void 0:n.body,role:r?"rowgroup":void 0}),i.Children.map(o,(e=>i.isValidElement(e)?x(e,{key:e.props.name,hover:d,isStacked:r,headers:p}):e)))}},Ti.displayName="Body",Ti.componentId="Table.Body",Ti.contextType=xi,Ti.allowedProps=["children"],Ti.propTypes=Ai,Ti.defaultProps={children:null},Li=Ti))||Li;const Fi={children:n.node};var Pi,zi;let _i=s(((e,i,t)=>({row:{label:"row",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,background:e.background,boxSizing:"border-box",borderBottomStyle:"solid",borderBottomWidth:"0.0625rem",borderBottomColor:e.borderColor,...t.hover&&{borderLeft:"0.1875rem solid transparent",borderRight:"0.1875rem solid transparent","&:hover":{borderLeftColor:e.hoverBorderColor,borderRightColor:e.hoverBorderColor}},...t.isStacked&&{padding:e.padding}}})),(e=>{var i,t,o,n;const s=e.colors,r=e.typography,l=e.spacing,a=e.key,d={canvas:{hoverBorderColor:e["ic-brand-primary"]}};return{...{fontSize:null==r?void 0:r.fontSizeMedium,fontFamily:null==r?void 0:r.fontFamily,fontWeight:null==r?void 0:r.fontWeightNormal,color:null==s||null===(i=s.contrasts)||void 0===i?void 0:i.grey125125,background:null==s||null===(t=s.contrasts)||void 0===t?void 0:t.white1010,borderColor:null==s||null===(o=s.contrasts)||void 0===o?void 0:o.grey1214,hoverBorderColor:null==s||null===(n=s.contrasts)||void 0===n?void 0:n.blue4570,padding:`${null==l?void 0:l.xSmall} 0`},...d[a]}}))((zi=class e extends i.Component{componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i,{isStacked:this.context.isStacked,hover:this.context.hover})}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i,{isStacked:this.context.isStacked,hover:this.context.hover})}render(){const t=this.props,o=t.children,n=t.styles,s=this.context.isStacked,r=this.context.headers;return a(b,Object.assign({},b.omitViewProps(l(this.props,e.allowedProps),e),{as:s?"div":"tr",css:null==n?void 0:n.row,role:s?"row":void 0}),i.Children.toArray(o).filter(Boolean).map(((e,t)=>i.isValidElement(e)?x(e,{key:e.props.name,isStacked:s,header:r&&r[t]}):e)))}},zi.displayName="Row",zi.componentId="Table.Row",zi.contextType=xi,zi.allowedProps=["children"],zi.propTypes=Fi,zi.defaultProps={children:null},Pi=zi))||Pi;const Mi={isStacked:n.bool,id:n.string.isRequired,stackedSortByLabel:n.string,children:n.oneOfType([n.node,n.func]),width:n.oneOfType([n.string,n.number]),textAlign:n.oneOf(["start","center","end"]),sortDirection:n.oneOf(["none","ascending","descending"]),onRequestSort:n.func,scope:n.oneOf(["row","col","rowgroup","colgroup","auto"])};var Wi,Bi;let Ei=s(((e,i)=>{const t=i.onRequestSort,o=i.textAlign,n={color:e.color,fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:"bold",lineHeight:e.lineHeight,padding:e.padding};return{colHeader:{label:"colHeader",background:e.background,verticalAlign:"middle",boxSizing:"border-box",...!t&&n,textAlign:o},button:{label:"colHeader__button",...n,display:"flex",alignItems:"center",boxSizing:"border-box",border:"none",width:"100%",height:"100%",background:"transparent",cursor:"pointer",outline:"none","&::-moz-focus-inner":{border:0},"&:focus":{outline:`${e.focusOutlineWidth} ${e.focusOutlineStyle} ${e.focusOutlineColor}`},...{start:{flexDirection:"row"},center:{justifyContent:"center"},end:{flexDirection:"row-reverse"}}[o]},buttonContent:{label:"colHeader__buttonContent",display:"flex",alignItems:"center"},unSortedIconColor:{label:"colHeader__unSortedIconColor",color:e.unSortedIconColor},sortedIconColor:{label:"colHeader__sortedIconColor",color:e.sortedIconColor}}}),(e=>{var i,t,o,n,s,r;const l=e.typography,a=e.colors,d=e.borders,p=e.spacing;return{...{fontSize:null==l?void 0:l.fontSizeMedium,fontFamily:null==l?void 0:l.fontFamily,color:null==a||null===(i=a.contrasts)||void 0===i?void 0:i.grey125125,background:null==a||null===(t=a.contrasts)||void 0===t?void 0:t.white1010,borderColor:null==a||null===(o=a.contrasts)||void 0===o?void 0:o.grey1214,lineHeight:null==l?void 0:l.lineHeightCondensed,padding:`${null==p?void 0:p.xSmall} ${null==p?void 0:p.small}`,focusOutlineColor:null==a||null===(n=a.contrasts)||void 0===n?void 0:n.blue4570,focusOutlineWidth:null==d?void 0:d.widthMedium,focusOutlineStyle:null==d?void 0:d.style,unSortedIconColor:null==a||null===(s=a.contrasts)||void 0===s?void 0:s.grey4570,sortedIconColor:null==a||null===(r=a.contrasts)||void 0===r?void 0:r.blue4570}}}))((Bi=class e extends i.Component{constructor(...e){super(...e),this.handleClick=e=>{const i=this.props,t=i.id,o=i.onRequestSort;o&&o(e,{id:t})}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}renderSortArrow(){const e=this.props,i=e.sortDirection,t=e.onRequestSort,o=e.styles;return"ascending"===i?a(Y,{css:null==o?void 0:o.sortedIconColor}):"descending"===i?a(Q,{css:null==o?void 0:o.sortedIconColor}):t?a(K,{css:null==o?void 0:o.unSortedIconColor}):void 0}render(){const i=this.props,t=i.onRequestSort,o=i.width,n=i.children,s=i.sortDirection,r=i.scope,d=i.styles;return a("th",Object.assign({},l(this.props,e.allowedProps),{css:null==d?void 0:d.colHeader,style:{width:o},scope:r,"aria-sort":s}),t&&a("button",{onClick:this.handleClick,css:null==d?void 0:d.button},a("div",{css:null==d?void 0:d.buttonContent},f(n),this.renderSortArrow())),!t&&n,!t&&this.renderSortArrow())}},Bi.displayName="ColHeader",Bi.componentId="Table.ColHeader",Bi.allowedProps=["id","isStacked","stackedSortByLabel","children","width","textAlign","sortDirection","onRequestSort","scope"],Bi.propTypes=Mi,Bi.defaultProps={textAlign:"start",sortDirection:"none",children:null,scope:"col"},Wi=Bi))||Wi;const qi={children:n.oneOfType([n.node,n.func]),textAlign:n.oneOf(["start","center","end"])};var Ni,Di;let $i=s(((e,i)=>{const t=i.textAlign;return{rowHeader:{label:"rowHeader",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:"bold",color:e.color,background:e.background,boxSizing:"border-box",verticalAlign:"middle",lineHeight:e.lineHeight,padding:e.padding,...t&&{textAlign:t}}}}),(e=>{var i,t,o;const n=e.colors,s=e.typography,r=e.spacing;return{...{fontSize:null==s?void 0:s.fontSizeMedium,fontFamily:null==s?void 0:s.fontFamily,fontWeight:null==s?void 0:s.fontWeightNormal,color:null==n||null===(i=n.contrasts)||void 0===i?void 0:i.grey125125,background:null==n||null===(t=n.contrasts)||void 0===t?void 0:t.white1010,borderColor:null==n||null===(o=n.contrasts)||void 0===o?void 0:o.grey4570,lineHeight:null==s?void 0:s.lineHeightCondensed,padding:`${null==r?void 0:r.xSmall} ${null==r?void 0:r.small}`}}}))((Di=class e extends i.Component{componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}render(){const i=this.props,t=i.children,o=i.styles,n=this.context.isStacked;return a(b,Object.assign({},b.omitViewProps(l(this.props,e.allowedProps),e),{as:n?"div":"th",css:null==o?void 0:o.rowHeader,scope:"row",role:n?"rowheader":void 0}),f(t))}},Di.displayName="RowHeader",Di.componentId="Table.RowHeader",Di.contextType=xi,Di.allowedProps=["children","textAlign"],Di.propTypes=qi,Di.defaultProps={textAlign:"start",children:null},Ni=Di))||Ni;const Vi={children:n.oneOfType([n.node,n.func]),header:n.oneOfType([n.node,n.func]),textAlign:n.oneOf(["start","center","end"])};var ji,Gi;let Ui=s(((e,i)=>{const t=i.textAlign;return{cell:{label:"cell",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,background:e.background,boxSizing:"border-box",verticalAlign:"middle",lineHeight:e.lineHeight,padding:e.padding,...t&&{textAlign:t}}}}),(e=>{var i,t,o;const n=e.colors,s=e.typography,r=e.spacing;return{...{fontSize:null==s?void 0:s.fontSizeMedium,fontFamily:null==s?void 0:s.fontFamily,fontWeight:null==s?void 0:s.fontWeightNormal,color:null==n||null===(i=n.contrasts)||void 0===i?void 0:i.grey125125,background:null==n||null===(t=n.contrasts)||void 0===t?void 0:t.white1010,borderColor:null==n||null===(o=n.contrasts)||void 0===o?void 0:o.grey1214,lineHeight:null==s?void 0:s.lineHeightCondensed,padding:`${null==r?void 0:r.xSmall} ${null==r?void 0:r.small}`}}}))((Gi=class e extends i.Component{componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}render(){const i=this.props,t=i.children,o=i.styles,n=i.header,s=this.context.isStacked;return a(b,Object.assign({},b.omitViewProps(l(this.props,e.allowedProps),e),{as:s?"div":"td",css:null==o?void 0:o.cell,role:s?"cell":void 0}),n&&f(n),n&&": ",f(t))}},Gi.displayName="Cell",Gi.componentId="Table.Cell",Gi.contextType=xi,Gi.allowedProps=["children","header","textAlign"],Gi.propTypes=Vi,Gi.defaultProps={textAlign:"start",children:null},ji=Gi))||ji;const Zi={caption:n.node.isRequired,children:n.node,margin:w.spacing,elementRef:n.func,hover:n.bool,layout:n.oneOf(["auto","fixed","stacked"])};var Xi,Ji;let Ki=s(((e,i)=>{const t=i.layout;return{table:{label:"table",fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,color:e.color,background:e.background,display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,..."fixed"===t&&{tableLayout:"fixed"},caption:{textAlign:"start"}}}}),(e=>{var i,t;const o=e.colors,n=e.typography,s=e.key,r={canvas:{color:e["ic-brand-font-color-dark"]}};return{...{fontSize:null==n?void 0:n.fontSizeMedium,fontFamily:null==n?void 0:n.fontFamily,fontWeight:null==n?void 0:n.fontWeightNormal,color:null==o||null===(i=o.contrasts)||void 0===i?void 0:i.grey125125,background:null==o||null===(t=o.contrasts)||void 0===t?void 0:t.white1010},...r[s]}}))((Ji=class e extends i.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const i=this.props.elementRef;this.ref=e,"function"==typeof i&&i(e)}}componentDidMount(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}componentDidUpdate(){var e,i;null===(e=(i=this.props).makeStyles)||void 0===e||e.call(i)}getHeaders(){const e=i.Children.toArray(this.props.children),t=v(e,1)[0];if(!t||!i.isValidElement(t))return;const o=i.Children.toArray(t.props.children),n=v(o,1)[0];return n&&i.isValidElement(n)?i.Children.map(n.props.children,(e=>{if(i.isValidElement(e))return e.props.children})):void 0}render(){const t=this.props,o=t.margin,n=t.layout,s=t.caption,r=t.children,d=t.hover,p=t.styles,c="stacked"===n,u=c?this.getHeaders():void 0;return a(xi.Provider,{value:{isStacked:c,hover:d,headers:u}},a(b,Object.assign({},b.omitViewProps(l(this.props,e.allowedProps),e),{as:c?"div":"table",margin:o,elementRef:this.handleRef,css:null==p?void 0:p.table,role:c?"table":void 0,"aria-label":c?s:void 0}),!c&&a("caption",null,a(S,null,s)),i.Children.map(r,(e=>i.isValidElement(e)?x(e,{key:e.props.name}):e))))}},Ji.displayName="Table",Ji.componentId="Table",Ji.allowedProps=["caption","children","margin","elementRef","hover","layout"],Ji.propTypes=Zi,Ji.defaultProps={children:null,hover:!1,layout:"auto"},Ji.Head=Ii,Ji.Body=Hi,Ji.Row=_i,Ji.ColHeader=Ei,Ji.RowHeader=$i,Ji.Cell=Ui,Xi=Ji))||Xi;export{$e as F,fe as G,Z as I,Si as S,Ze as T,Ki as a,xe as b,He as c,pi as d,X as e,Be as f,ye as g,Ie as h,Me as i,pe as j,ne as k,J as l,K as m,Q as n,Y as o}; diff --git a/assets/index-BaJp6lgV.js b/assets/index-DsnmBOMj.js similarity index 98% rename from assets/index-BaJp6lgV.js rename to assets/index-DsnmBOMj.js index 6bef05f..e2c7d35 100644 --- a/assets/index-BaJp6lgV.js +++ b/assets/index-DsnmBOMj.js @@ -1 +1 @@ -import{i as e,T as o,w as l,r as n,l as i,H as r,x as a,s,V as t,o as d}from"./index-CrryxQyl.js";const c={hero:e.oneOfType([e.element,e.func]),size:e.oneOf(["small","medium","large"]),as:e.elementType,elementRef:e.func,heading:e.string,headingAs:e.oneOf(["h1","h2","h3","span"]),headingLevel:e.oneOf(["h1","h2","h3","h4"]),message:e.oneOfType([e.node,e.func]),onClick:e.func,href:e.string,disabled:e.bool,readOnly:e.bool,margin:o.spacing};var g,u;let m=l(((e,o)=>{const l=o.size,n=o.href,i=o.onClick,r=o.disabled,a=o.hero,s=o.heading,t=n||i,d={small:{billboard:{padding:e.paddingSmall},hero:{fontSize:"3rem"},message:{fontSize:e.messageFontSizeSmall},heading:{...a&&{margin:`${e.mediumMargin} 0 0`}}},medium:{billboard:{padding:e.paddingMedium},hero:{fontSize:"5rem"},message:{fontSize:e.messageFontSizeMedium},heading:{}},large:{billboard:{padding:e.paddingLarge},hero:{fontSize:"10rem"},message:{fontSize:e.messageFontSizeLarge},heading:{}}},c=t?{appearance:"none",boxSizing:"border-box",cursor:"pointer",userSelect:"none",touchAction:"manipulation",width:"100%",margin:"0",border:`${e.buttonBorderWidth} ${e.buttonBorderStyle} transparent`,borderRadius:e.buttonBorderRadius,background:e.backgroundColor,textDecoration:"none","&:hover":{borderStyle:e.buttonHoverBorderStyle},"&:hover, &:focus":{textDecoration:"none",outline:"none",borderColor:e.iconHoverColor,"& [class$=-billboard__hero]":{color:e.iconHoverColor}},"&:active":{background:e.clickableActiveBg,borderColor:e.iconHoverColor,"& [class$=-billboard__hero], & [class$=-billboard__message]":{color:e.clickableActiveText}}}:{backgroundColor:e.backgroundColor};return{billboard:{label:"billboard",boxSizing:"border-box",position:"relative",fontFamily:e.fontFamily,marginLeft:"auto",marginRight:"auto",textAlign:"center",display:"block",...d[l].billboard,...c,...r&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5}},content:{label:"billboard__content",display:"block"},hero:{label:"billboard__hero",display:"block",color:e.iconColor,...d[l].hero,"& > img, & > svg":{maxWidth:"100%",display:"block",margin:"0 auto"},"& > img":{height:"auto"}},heading:{label:"billboard__heading",display:"block",...a&&{margin:`${e.largeMargin} 0 0`},...d[l].heading},message:{label:"billboard__message",display:"block",color:t?e.messageColorClickable:e.messageColor,...(a||s)&&{margin:`${e.mediumMargin} 0 0`},...d[l].message}}}),(e=>{var o,l,n,i,r,a,s,t,d;const c=e.borders,g=e.colors,u=e.spacing,m=e.typography,b=e.key,h={canvas:{iconHoverColor:e["ic-link-color"],messageColorClickable:e["ic-link-color"],clickableActiveBg:e["ic-brand-primary"]}};return{...{fontFamily:null==m?void 0:m.fontFamily,paddingSmall:null==u?void 0:u.small,paddingMedium:null==u?void 0:u.medium,paddingLarge:null==u?void 0:u.medium,iconColor:null==g||null===(o=g.contrasts)||void 0===o?void 0:o.grey4570,mediumMargin:null==u?void 0:u.small,largeMargin:null==u?void 0:u.medium,iconHoverColor:null==g||null===(l=g.contrasts)||void 0===l?void 0:l.blue4570,backgroundColor:null==g||null===(n=g.contrasts)||void 0===n?void 0:n.white1010,iconHoverColorInverse:null==g||null===(i=g.contrasts)||void 0===i?void 0:i.white1010,buttonBorderWidth:null==c?void 0:c.widthMedium,buttonBorderRadius:null==c?void 0:c.radiusLarge,messageColor:null==g||null===(r=g.contrasts)||void 0===r?void 0:r.blue4570,messageColorClickable:null==g||null===(a=g.contrasts)||void 0===a?void 0:a.blue4570,messageColorInverse:null==g||null===(s=g.contrasts)||void 0===s?void 0:s.grey1111,messageFontSizeSmall:null==m?void 0:m.fontSizeSmall,messageFontSizeMedium:null==m?void 0:m.fontSizeMedium,messageFontSizeLarge:null==m?void 0:m.fontSizeLarge,clickableActiveBg:null==g||null===(t=g.contrasts)||void 0===t?void 0:t.blue4570,clickableActiveText:null==g||null===(d=g.contrasts)||void 0===d?void 0:d.white1010,buttonBorderStyle:null==c?void 0:c.style,buttonHoverBorderStyle:"dashed"},...h[b]}}))((u=class e extends n.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.handleClick=e=>{const o=this.props,l=o.readOnly,n=o.onClick;l?(e.preventDefault(),e.stopPropagation()):"function"==typeof n&&n(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}renderHeading(){const e=this.props,o=e.headingLevel,l=e.headingAs,n=e.heading,a=e.styles;return i("span",{css:null==a?void 0:a.heading},i(r,{level:o,as:l,color:"primary"},n))}get SVGIconSize(){const e=this.props.size;return"small"===e?"medium":"large"===e?"x-large":"large"}renderHero(){return"function"==typeof this.props.hero?this.props.hero(this.SVGIconSize):this.props.hero}renderContent(){const e=this.props,o=e.heading,l=e.message,n=e.hero,r=e.styles;return i("span",{css:null==r?void 0:r.content},n&&i("span",{css:null==r?void 0:r.hero},this.renderHero()),o&&this.renderHeading(),l&&i("span",{css:null==r?void 0:r.message},a(l)))}render(){const o=this.props,l=o.href,n=o.disabled,r=o.readOnly,a=o.margin,c=o.styles,g=s(e,this.props);return i(t,{as:"div",margin:a},i(t,Object.assign({},d(this.props,[...e.allowedProps,...t.allowedProps]),{type:"button"===g?"button":void 0,as:g,elementRef:this.handleRef,css:null==c?void 0:c.billboard,href:l,onClick:this.handleClick,disabled:n,"aria-disabled":n||r?"true":void 0}),this.renderContent()))}},u.displayName="Billboard",u.componentId="Billboard",u.propTypes=c,u.allowedProps=["hero","size","as","elementRef","heading","headingAs","headingLevel","message","onClick","href","disabled","readOnly","margin"],u.defaultProps={disabled:!1,readOnly:!1,size:"medium",headingAs:"span",headingLevel:"h1",as:"span",elementRef:()=>{}},g=u))||g;export{m as B}; +import{i as e,T as o,w as l,r as n,l as i,H as r,x as a,s,V as t,o as d}from"./index-DxmLT0bY.js";const c={hero:e.oneOfType([e.element,e.func]),size:e.oneOf(["small","medium","large"]),as:e.elementType,elementRef:e.func,heading:e.string,headingAs:e.oneOf(["h1","h2","h3","span"]),headingLevel:e.oneOf(["h1","h2","h3","h4"]),message:e.oneOfType([e.node,e.func]),onClick:e.func,href:e.string,disabled:e.bool,readOnly:e.bool,margin:o.spacing};var g,u;let m=l(((e,o)=>{const l=o.size,n=o.href,i=o.onClick,r=o.disabled,a=o.hero,s=o.heading,t=n||i,d={small:{billboard:{padding:e.paddingSmall},hero:{fontSize:"3rem"},message:{fontSize:e.messageFontSizeSmall},heading:{...a&&{margin:`${e.mediumMargin} 0 0`}}},medium:{billboard:{padding:e.paddingMedium},hero:{fontSize:"5rem"},message:{fontSize:e.messageFontSizeMedium},heading:{}},large:{billboard:{padding:e.paddingLarge},hero:{fontSize:"10rem"},message:{fontSize:e.messageFontSizeLarge},heading:{}}},c=t?{appearance:"none",boxSizing:"border-box",cursor:"pointer",userSelect:"none",touchAction:"manipulation",width:"100%",margin:"0",border:`${e.buttonBorderWidth} ${e.buttonBorderStyle} transparent`,borderRadius:e.buttonBorderRadius,background:e.backgroundColor,textDecoration:"none","&:hover":{borderStyle:e.buttonHoverBorderStyle},"&:hover, &:focus":{textDecoration:"none",outline:"none",borderColor:e.iconHoverColor,"& [class$=-billboard__hero]":{color:e.iconHoverColor}},"&:active":{background:e.clickableActiveBg,borderColor:e.iconHoverColor,"& [class$=-billboard__hero], & [class$=-billboard__message]":{color:e.clickableActiveText}}}:{backgroundColor:e.backgroundColor};return{billboard:{label:"billboard",boxSizing:"border-box",position:"relative",fontFamily:e.fontFamily,marginLeft:"auto",marginRight:"auto",textAlign:"center",display:"block",...d[l].billboard,...c,...r&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5}},content:{label:"billboard__content",display:"block"},hero:{label:"billboard__hero",display:"block",color:e.iconColor,...d[l].hero,"& > img, & > svg":{maxWidth:"100%",display:"block",margin:"0 auto"},"& > img":{height:"auto"}},heading:{label:"billboard__heading",display:"block",...a&&{margin:`${e.largeMargin} 0 0`},...d[l].heading},message:{label:"billboard__message",display:"block",color:t?e.messageColorClickable:e.messageColor,...(a||s)&&{margin:`${e.mediumMargin} 0 0`},...d[l].message}}}),(e=>{var o,l,n,i,r,a,s,t,d;const c=e.borders,g=e.colors,u=e.spacing,m=e.typography,b=e.key,h={canvas:{iconHoverColor:e["ic-link-color"],messageColorClickable:e["ic-link-color"],clickableActiveBg:e["ic-brand-primary"]}};return{...{fontFamily:null==m?void 0:m.fontFamily,paddingSmall:null==u?void 0:u.small,paddingMedium:null==u?void 0:u.medium,paddingLarge:null==u?void 0:u.medium,iconColor:null==g||null===(o=g.contrasts)||void 0===o?void 0:o.grey4570,mediumMargin:null==u?void 0:u.small,largeMargin:null==u?void 0:u.medium,iconHoverColor:null==g||null===(l=g.contrasts)||void 0===l?void 0:l.blue4570,backgroundColor:null==g||null===(n=g.contrasts)||void 0===n?void 0:n.white1010,iconHoverColorInverse:null==g||null===(i=g.contrasts)||void 0===i?void 0:i.white1010,buttonBorderWidth:null==c?void 0:c.widthMedium,buttonBorderRadius:null==c?void 0:c.radiusLarge,messageColor:null==g||null===(r=g.contrasts)||void 0===r?void 0:r.blue4570,messageColorClickable:null==g||null===(a=g.contrasts)||void 0===a?void 0:a.blue4570,messageColorInverse:null==g||null===(s=g.contrasts)||void 0===s?void 0:s.grey1111,messageFontSizeSmall:null==m?void 0:m.fontSizeSmall,messageFontSizeMedium:null==m?void 0:m.fontSizeMedium,messageFontSizeLarge:null==m?void 0:m.fontSizeLarge,clickableActiveBg:null==g||null===(t=g.contrasts)||void 0===t?void 0:t.blue4570,clickableActiveText:null==g||null===(d=g.contrasts)||void 0===d?void 0:d.white1010,buttonBorderStyle:null==c?void 0:c.style,buttonHoverBorderStyle:"dashed"},...h[b]}}))((u=class e extends n.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=e=>{const o=this.props.elementRef;this.ref=e,"function"==typeof o&&o(e)},this.handleClick=e=>{const o=this.props,l=o.readOnly,n=o.onClick;l?(e.preventDefault(),e.stopPropagation()):"function"==typeof n&&n(e)}}componentDidMount(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}componentDidUpdate(){var e,o;null===(e=(o=this.props).makeStyles)||void 0===e||e.call(o)}renderHeading(){const e=this.props,o=e.headingLevel,l=e.headingAs,n=e.heading,a=e.styles;return i("span",{css:null==a?void 0:a.heading},i(r,{level:o,as:l,color:"primary"},n))}get SVGIconSize(){const e=this.props.size;return"small"===e?"medium":"large"===e?"x-large":"large"}renderHero(){return"function"==typeof this.props.hero?this.props.hero(this.SVGIconSize):this.props.hero}renderContent(){const e=this.props,o=e.heading,l=e.message,n=e.hero,r=e.styles;return i("span",{css:null==r?void 0:r.content},n&&i("span",{css:null==r?void 0:r.hero},this.renderHero()),o&&this.renderHeading(),l&&i("span",{css:null==r?void 0:r.message},a(l)))}render(){const o=this.props,l=o.href,n=o.disabled,r=o.readOnly,a=o.margin,c=o.styles,g=s(e,this.props);return i(t,{as:"div",margin:a},i(t,Object.assign({},d(this.props,[...e.allowedProps,...t.allowedProps]),{type:"button"===g?"button":void 0,as:g,elementRef:this.handleRef,css:null==c?void 0:c.billboard,href:l,onClick:this.handleClick,disabled:n,"aria-disabled":n||r?"true":void 0}),this.renderContent()))}},u.displayName="Billboard",u.componentId="Billboard",u.propTypes=c,u.allowedProps=["hero","size","as","elementRef","heading","headingAs","headingLevel","message","onClick","href","disabled","readOnly","margin"],u.defaultProps={disabled:!1,readOnly:!1,size:"medium",headingAs:"span",headingLevel:"h1",as:"span",elementRef:()=>{}},g=u))||g;export{m as B}; diff --git a/assets/index-CrryxQyl.js b/assets/index-DxmLT0bY.js similarity index 99% rename from assets/index-CrryxQyl.js rename to assets/index-DxmLT0bY.js index 39d8b00..722b7e6 100644 --- a/assets/index-CrryxQyl.js +++ b/assets/index-DxmLT0bY.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdownBrand-Byq6OFdN.js","assets/RenderTopNavBar-BTvx9fvK.js","assets/Mdtoui-g9rlRwfF.js","assets/index-C6-OLeBB.js","assets/index-DVeZ9h9n.js","assets/redirectTo-CxjXH9wP.js","assets/RenderTabNav-BgCD-W_P.js","assets/index-BaJp6lgV.js","assets/links-CYh0RyKT.js","assets/index-Cw9o-rUL.js","assets/index-B8c3q9fI.js","assets/mdui-BXjSBCyA.js","assets/index-DM7MZwnz.js","assets/releases-FYWc6T2H.js","assets/IconRssLine-BzGIEfvJ.js","assets/error-DNgfncXY.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdownBrand-spFPku_C.js","assets/RenderTopNavBar-BObK9Y19.js","assets/Mdtoui-DwpTTe70.js","assets/index-CmNFgSR4.js","assets/index-VWJm_On8.js","assets/redirectTo-BMbIAl3G.js","assets/RenderTabNav-Cf-NKHb4.js","assets/index-DsnmBOMj.js","assets/links-Dq9wk-i1.js","assets/index-CFaT5J52.js","assets/index-CaYtQ08a.js","assets/mdui-CXb1k3ot.js","assets/index-C-ITlPCi.js","assets/releases-0LoTboBN.js","assets/IconRssLine-CfLRRZ3P.js","assets/error-CbdNqE21.js"])))=>i.map(i=>d[i]); function e(e,t){for(var n=0;nr[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const t={},n=function(e,n,r){let a=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),r=e?.nonce||e?.getAttribute("nonce");a=Promise.allSettled(n.map((e=>{if((e=function(e){return"/"+e}(e))in t)return;t[e]=!0;const n=e.endsWith(".css"),a=n?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${a}`))return;const o=document.createElement("link");return o.rel=n?"stylesheet":"modulepreload",n||(o.as="script"),o.crossOrigin="",o.href=e,r&&o.setAttribute("nonce",r),document.head.appendChild(o),n?new Promise(((t,n)=>{o.addEventListener("load",t),o.addEventListener("error",(()=>n(new Error(`Unable to preload CSS for ${e}`))))})):void 0})))}function o(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return a.then((t=>{for(const e of t||[])"rejected"===e.status&&o(e.reason);return e().catch(o)}))};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var o,i,l={exports:{}},s={};var u,c,d,f,p=(i||(i=1,l.exports=function(){if(o)return s;o=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(t,n,r){var a=null;if(void 0!==r&&(a=""+r),void 0!==n.key&&(a=""+n.key),"key"in n)for(var o in r={},n)"key"!==o&&(r[o]=n[o]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:a,ref:void 0!==n?n:null,props:r}}return s.Fragment=t,s.jsx=n,s.jsxs=n,s}()),l.exports),m={exports:{}},h={},v={exports:{}},g={};function y(){if(u)return g;u=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,h={};function v(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||p}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var w=b.prototype=new y;w.constructor=b,m(w,v.prototype),w.isPureReactComponent=!0;var S=Array.isArray,k={H:null,A:null,T:null,S:null},C=Object.prototype.hasOwnProperty;function x(t,n,r,a,o,i){return r=i.ref,{$$typeof:e,type:t,key:n,ref:void 0!==r?r:null,props:i}}function E(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var P=/\/+/g;function _(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function T(){}function R(n,r,a,o,i){var l=typeof n;"undefined"!==l&&"boolean"!==l||(n=null);var s,u,c=!1;if(null===n)c=!0;else switch(l){case"bigint":case"string":case"number":c=!0;break;case"object":switch(n.$$typeof){case e:case t:c=!0;break;case d:return R((c=n._init)(n._payload),r,a,o,i)}}if(c)return i=i(n),c=""===o?"."+_(n,0):o,S(i)?(a="",null!=c&&(a=c.replace(P,"$&/")+"/"),R(i,r,a,"",(function(e){return e}))):null!=i&&(E(i)&&(s=i,u=a+(null==i.key||n&&n.key===i.key?"":(""+i.key).replace(P,"$&/")+"/")+c,i=x(s.type,u,void 0,0,0,s.props)),r.push(i)),1;c=0;var p,m=""===o?".":o+":";if(S(n))for(var h=0;h{const n=t.size,r=t.variant,a={"x-small":{width:e.xSmallSize,height:e.xSmallSize},small:{width:e.smallSize,height:e.smallSize},medium:{width:e.mediumSize,height:e.mediumSize},large:{width:e.largeSize,height:e.largeSize}},o={"x-small":{width:e.xSmallSize,height:e.xSmallSize},small:{width:e.smallSize,height:e.smallSize},medium:{width:e.mediumSize,height:e.mediumSize},large:{width:e.largeSize,height:e.largeSize}},i={"x-small":{strokeWidth:e.xSmallBorderWidth},small:{strokeWidth:e.smallBorderWidth},medium:{strokeWidth:e.mediumBorderWidth},large:{strokeWidth:e.largeBorderWidth}},l={"x-small":{strokeWidth:e.xSmallBorderWidth,strokeDasharray:"3em",transformOrigin:`calc(${e.xSmallSize} / 2) calc(${e.xSmallSize} / 2)`},small:{strokeWidth:e.smallBorderWidth,strokeDasharray:"6em",transformOrigin:`calc(${e.smallSize} / 2) calc(${e.smallSize} / 2)`},medium:{strokeWidth:e.mediumBorderWidth,strokeDasharray:"10.5em",transformOrigin:`calc(${e.mediumSize} / 2) calc(${e.mediumSize} / 2)`},large:{strokeWidth:e.largeBorderWidth,strokeDasharray:"14em",transformOrigin:`calc(${e.largeSize} / 2) calc(${e.largeSize} / 2)`}},s={default:{stroke:e.color},inverse:{stroke:e.inverseColor}};return{spinner:{label:"spinner",display:"inline-block",verticalAlign:"middle",position:"relative",boxSizing:"border-box",overflow:"hidden",...a[n]},circle:{label:"spinner__circle",display:"block",position:"absolute",top:"0",left:"0",animationName:ml,animationDuration:"2.25s",animationIterationCount:"infinite",animationTimingFunction:"linear",...o[n]},circleTrack:{label:"spinner__circleTrack",stroke:e.trackColor,fill:"none",...i[n]},circleSpin:{label:"spinner__circleSpin",fill:"none",strokeLinecap:"round",animationName:hl,animationDuration:"1.75s",animationIterationCount:"infinite",animationTimingFunction:"ease",...l[n],...s[r]}}}),(e=>{var t,n,r,a;const o=e.colors,i=e.key,l={"canvas-high-contrast":{inverseColor:null==o||null===(t=o.contrasts)||void 0===t?void 0:t.white1010},canvas:{color:e["ic-brand-primary"]}};return{...{trackColor:null==o||null===(n=o.contrasts)||void 0===n?void 0:n.grey1111,color:null==o||null===(r=o.contrasts)||void 0===r?void 0:r.blue4570,xSmallSize:"1.5em",xSmallBorderWidth:"0.25em",smallSize:"3em",smallBorderWidth:"0.375em",mediumSize:"5em",mediumBorderWidth:"0.5em",largeSize:"7em",largeBorderWidth:"0.75em",inverseColor:null==o||null===(a=o.contrasts)||void 0===a?void 0:a.blue4570},...l[i]}})),gl(bl=yl(bl=Ti()((wl=class e extends S.Component{constructor(e){super(e),this.ref=null,this.titleId=void 0,this.delayTimeout=void 0,this.handleRef=e=>{const t=this.props.elementRef;this.ref=e,"function"==typeof t&&t(e)},this.titleId=e.deterministicId(),this.state={shouldRender:!e.delay}}componentDidMount(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t);const n=this.props.delay;n&&(this.delayTimeout=setTimeout((()=>{this.setState({shouldRender:!0})}),n))}componentDidUpdate(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t)}componentWillUnmount(){clearTimeout(this.delayTimeout)}radius(){switch(this.props.size){case"x-small":return"0.5em";case"small":return"1em";case"large":return"2.25em";default:return"1.75em"}}renderSpinner(){var t,n,r,a;const o=Ii.omitViewProps(Ya(this.props,e.allowedProps),e);this.props.renderTitle;return da(Ii,Object.assign({},o,{as:this.props.as,elementRef:this.handleRef,css:null===(t=this.props.styles)||void 0===t?void 0:t.spinner,margin:this.props.margin}),da("svg",{css:null===(n=this.props.styles)||void 0===n?void 0:n.circle,role:"img","aria-labelledby":this.titleId,focusable:"false"},da("title",{id:this.titleId},Ea(this.props.renderTitle)),da("g",{role:"presentation"},"inverse"!==this.props.variant&&da("circle",{css:null===(r=this.props.styles)||void 0===r?void 0:r.circleTrack,cx:"50%",cy:"50%",r:this.radius()}),da("circle",{css:null===(a=this.props.styles)||void 0===a?void 0:a.circleSpin,cx:"50%",cy:"50%",r:this.radius()}))))}render(){return this.state.shouldRender?this.renderSpinner():null}},wl.displayName="Spinner",wl.componentId="Spinner",wl.allowedProps=["delay","renderTitle","size","variant","margin","elementRef","as"],wl.propTypes=vl,wl.defaultProps={as:"div",size:"medium",variant:"default"},bl=wl))||bl)||bl)||bl);function kl(){return window.self===window.top}const Cl={owner:"instructure",repo:"instructure-compliance-packages",branch:"main",url:{name:"isp-site",version:"6.0.0+1731102829",homepage:"https://inst.bid/#/",private:!0,type:"module",scripts:{dev:"vite","biome:check":"pnpm lint && pnpm check && pnpm format","biome:apply":"pnpm lint:apply && pnpm check:apply && pnpm format:apply",build:"pnpm build:preview && pnpm build:git","build:git":'git add . && git commit -m "Build v$npm_package_version" && git push',"build:js":"vite build","build:preview":"pnpm biome:apply && pnpm sec && pnpm build:version && pnpm build:ts && pnpm build:js","build:ts":"tsc","build:version":'node-jq -r \'.version=$ARGS.positional[0]+"+"+$ARGS.positional[1]\' package.json --args "$(pnpm -s env:semver)" "$(date +%s)" | sponge package.json',check:"biome check","check:apply":"biome check --write","env:package":"node-jq '.' package.json","env:biome":"biome rage","env:buildtime":"date -r $(node-jq -r '(.version | split(\"+\"))[1]' package.json)","env:semver":"node-jq -r '(.version | split(\"+\"))[0]' package.json","env:version":'echo "$npm_package_version"',format:"biome format","format:apply":"biome format --write",lint:"biome lint","lint:apply":"biome lint --write",preview:"pnpm build:preview && vite preview",push:'pnpm build && {pnpm tag || printf "";} && gh-pages -t -m "Deploy v$(pnpm -s env:version)" -d dist',sec:"pnpm sec:audit && pnpm sec:scan","sec:audit":"snyk test && pnpm audit","sec:scan":"snyk code test",tag:"git tag isp-site-v$(pnpm -s env:semver) && git push origin isp-site-v$(pnpm -s env:semver)",test:"vitest run","test:bench":"vitest bench","test:ui":"vitest --ui","test:watch":"vitest watch","test:browser":"vitest --workspace=vitest.workspace.mts"},dependencies:{"@instructure/ui":"10.4.1",react:"19.0.0-rc-66855b96-20241106","react-dom":"19.0.0-rc-66855b96-20241106","react-markdown":"^9.0.1","react-router-dom":"^6.28.0","rehype-raw":"^7.0.0","remark-gemoji":"^8.0.0","remark-gfm":"^4.0.0"},devDependencies:{"@babel/plugin-syntax-import-attributes":"^7.26.0","@biomejs/biome":"1.9.4","@commitlint/cli":"^19.5.0","@commitlint/config-conventional":"^19.5.0","@commitlint/types":"^19.5.0","@instructure/browserslist-config-instui":"^10.5.0","@instructure/shared-types":"^10.5.0","@octokit/types":"^13.6.1","@types/react":"npm:types-react@19.0.0-rc.1","@types/react-dom":"npm:types-react-dom@19.0.0-rc.1","@vitejs/plugin-basic-ssl":"^1.1.0","@vitejs/plugin-react":"^4.3.3","@vitest/browser":"^2.1.4","@vitest/coverage-v8":"^2.1.4","@vitest/ui":"^2.1.4","babel-plugin-react-compiler":"19.0.0-beta-63b359f-20241101","gh-pages":"^6.2.0",lightningcss:"^1.28.1","node-jq":"^6.0.1",playwright:"^1.48.2",snyk:"^1.1294.0","snyk-policy":"^3.0.0",terser:"^5.36.0",typescript:"^5.6.3",vite:"6.0.0-beta.9","vite-plugin-mkcert":"^1.17.6",vitest:"^2.1.4","vitest-browser-react":"^0.0.3"},engines:{node:">=23.1.0",pnpm:">=9.12.2"},packageManager:"pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee",pnpm:{overrides:{vite:"^6.0.0-beta.5",react:"^19.0.0-rc-02c0e824-20241028","react-dom":"^19.0.0-rc-02c0e824-20241028","@instructure/ui-test-sandbox>sinon":"^18.0.1","@bundled-es-modules/cookie>cookie":"^1.0.1"}},browserslist:["extends @instructure/browserslist-config-instui"]}.homepage.replace("/#/",""),gh:"https://github.com",api:"https://api.github.com",raw:"https://raw.githubusercontent.com"},xl=`${Cl.raw}/${Cl.owner}/${Cl.repo}/${Cl.branch}/README`,El=["Instructure","Canvas","Mastery","Elevate","Impact","LearnPlatform","Intelligent Insights","Parchment"],Pl=[...El,"Canvas LMS","Canvas Mobile","Canvas Studio","Canvas Credentials","Canvas Catalog","Canvas Commons","Canvas Data","Mastery Connect","Mastery Item Bank","Mastery View Assessments","Elevate Data Quality","Elevate Data Sync","Elevate Standards Alignment","LearnPlatform"],_l=[{brandName:"Instructure",get title(){return this.brandName.toLowerCase()},route:"/",readme:`${xl}.md`,color:"#287A9F",Icon:il},{brandName:"Canvas",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${xl}-${this.brandName}.md`},color:"#E72429",Icon:rl},{brandName:"Mastery",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${xl}-${this.brandName}.md`},color:"#24A159",Icon:ll},{brandName:"Elevate",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${xl}-${this.brandName}.md`},color:"#0097D3",Icon:al},{brandName:"Impact",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${xl}-${this.brandName}.md`},color:"#F76400",Icon:ol},{brandName:"LearnPlatform",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${xl}-${this.brandName}.md`},color:"#0077CC",Icon:()=>p.jsxs(Yi,{viewBox:"0 0 300 300",size:"small",color:"primary-inverse",height:"2.5rem",width:"2.5rem",children:[p.jsx("path",{d:"M191.431 212.736H205.086C204.961 212.34 204.846 211.974 204.738 211.63C204.404 210.567 204.135 209.713 203.834 208.81C199.852 198.417 195.964 187.986 192.171 177.517C181.493 149.012 170.872 120.497 160.309 91.9733C159.911 90.214 158.223 89.0597 156.44 89.3276C151.091 89.4698 145.743 89.5267 140.423 89.3276C138.432 89 136.546 90.3293 136.184 92.3147C121.657 131.422 107.129 170.519 92.6017 209.607C92.414 210.136 92.2467 210.686 92.0507 211.329C91.9201 211.759 91.7767 212.23 91.606 212.765C93.7973 212.765 95.9464 212.748 98.0664 212.732C102.222 212.701 106.265 212.67 110.297 212.765C112.402 212.935 113.17 211.94 113.824 210.091C115.474 205.226 117.167 200.375 118.859 195.525C120.552 190.675 122.245 185.824 123.895 180.959C124.199 179.276 125.788 178.141 127.479 178.399H168.729C170.418 178.138 172.011 179.255 172.342 180.931C173.799 185.14 175.307 189.334 176.814 193.524C178.251 197.519 179.687 201.511 181.076 205.51C182.365 209.107 183.012 210.914 184.295 211.821C185.589 212.736 187.531 212.736 191.431 212.736ZM148.417 109.213C154.145 126.092 159.977 143.351 165.913 160.989H131.121L148.417 109.213Z"}),p.jsx("path",{d:"M225 110.209V114.191H207.931V133.707H203.522V114.191H186.453V110.209H203.522V90.8069H207.732V110.209H225Z"}),p.jsx("path",{d:"M219.488 246.567C178.123 277.109 121.739 277.405 80.0539 247.301L86.1316 238.9C47.7742 211.418 31.5805 162.32 46.069 117.435L55.9454 119.307C69.5589 79.1029 107.372 52.0989 149.847 52.2484V13C90.0696 13.0663 37.1326 51.5854 18.7192 108.414C0.305744 165.242 20.6036 227.455 68.998 262.519C117.392 297.583 182.877 297.523 231.207 262.37C279.537 227.218 299.72 164.967 281.203 108.173L272.111 111.134C289.714 164.146 271.022 222.449 225.87 255.373"}),p.jsx("path",{d:"M219.488 246.567C178.123 277.109 121.739 277.405 80.0539 247.301L86.1316 238.9C47.7742 211.418 31.5805 162.32 46.069 117.435L55.9454 119.307C69.5589 79.1029 107.372 52.0989 149.847 52.2484V13C90.0696 13.0663 37.1326 51.5854 18.7192 108.414C0.305744 165.242 20.6036 227.455 68.998 262.519C117.392 297.583 182.877 297.523 231.207 262.37C279.537 227.218 299.72 164.967 281.203 108.173L272.111 111.134C289.714 164.146 271.022 222.449 225.87 255.373"})]})},{brandName:"Intelligent Insights",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title.replace(/ /g,"-")}`},get readme(){return`${xl}-${this.brandName.replace(/ /g,"-")}.md`},color:"#287A9F",Icon:il},{brandName:"Parchment",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${xl}-${this.brandName}.md`},color:"#0093b2",Icon:()=>p.jsxs(Yi,{viewBox:"0 -3 29 31.68",size:"small",color:"primary-inverse",height:"2.5rem",width:"2.5rem",children:[p.jsx("polygon",{points:"26.87 21.98 2.44 21.98 2.44 2.44 19.54 2.44 19.54 0 0 0 0 24.43 29.31 24.43 29.31 9.77 26.87 9.77"}),p.jsx("rect",{x:"26.87",y:"4.89",width:"2.44",height:"2.44"}),p.jsx("rect",{x:"21.98",width:"2.44",height:"2.44"}),p.jsx("rect",{x:"26.87",width:"2.44",height:"2.44"}),p.jsxs("g",{children:[p.jsx("path",{d:"M9.38,13.2c-.5,0-.62.37-.62.71v1.53c0,.4.23.69.66.69.36,0,.55-.21.55-.69v-1.53c0-.42-.13-.71-.58-.71Z"}),p.jsx("path",{d:"M9.15,11.01c-2.36,0-4.27,1.91-4.27,4.27s1.91,4.27,4.27,4.27,4.27-1.91,4.27-4.27-1.91-4.27-4.27-4.27ZM10.86,15.4c0,.81-.54,1.44-1.27,1.44-.31,0-.84-.14-.84-.38v1.87c0,.14-.18.23-.3.23h-.3c-.13,0-.31-.08-.31-.23v-5.53c0-.14.18-.28.31-.28h.31c.13,0,.29.13.29.28v.05c0-.18.44-.36.8-.36.8,0,1.31.5,1.31,1.48v1.43Z"})]})]})}],Tl=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Cl.branch}`,Rl={brand:"AWS",links:[{title:"CAIQ",from:"/aws/caiq/dl",to:`${Tl}/Amazon%20Web%20Services/AWS%20CAIQ.pdf`},{title:"Cyber Essentials+ Certificate",from:"/aws/ce/dl",to:`${Tl}/Amazon%20Web%20Services/AWS%20Cyber%20Essentials%20Plus%20Certificate.pdf`},{title:"CSA Star Level 2 Certificate",from:"/aws/csa/dl",to:`${Tl}/Amazon%20Web%20Services/AWS%20CSA%20Star%20Certification.pdf`},{title:"ISO 27001 Certificate",from:"/aws/iso/dl",to:`${Tl}/Amazon%20Web%20Services/AWS%20ISO%2027001%20Certificate.pdf`},{title:"ISO 9001 Certificate",from:"/aws/iso9001/dl",to:`${Tl}/Amazon%20Web%20Services/AWS%20ISO%209001%20Certificate.pdf`},{title:"SOC 3 Report",from:"/aws/soc/dl",to:`${Tl}/Amazon%20Web%20Services/AWS%20SOC%203.pdf`}].map((e=>({...e,lang:"EN"})))},Al="canvas-catalog",Ll=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Al}`,Ol={brand:"Canvas Catalog",links:[{title:"Compliance Package",from:"/canvas/catalog/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Al}.zip`},{title:"PCI AOC SAQ",from:"/canvas/catalog/aoc/dl",to:`${Ll}/Canvas%20Catalog/2024_Instructure_PCI_DSS_Summary.pdf`},{title:"Architecture Paper",from:"/canvas/catalog/architecture/dl",to:`${Ll}/Canvas%20Catalog/Canvas%20Catalog%20Architecture.pdf`},{title:"HECVAT Lite",from:"/canvas/catalog/hecvat/dl",to:`${Ll}/Canvas%20Catalog/Canvas%20Catalog%20HECVAT%20Lite.xlsx`},{title:"PCI Shared Responsibility Matrix",from:"/canvas/catalog/pci/dl",to:`${Ll}/Canvas%20Catalog/Canvas%20Catalog%20PCI%20Responsibility%20Matrix.pdf`},{title:"TX-RAMP Certification",from:"/canvas/catalog/tx-ramp/dl",to:`${Ll}/Canvas%20Catalog/Canvas%20Catalog%20TX-RAMP%20Provisional%20Certificate.pdf`},{title:"Payment Redirector",from:"/canvas/catalog/payments/dl",to:`${Ll}/Canvas%20Catalog/Catalog%20Payment%20Redirector.png`},{title:"Home (HE)",from:"/canvas/catalog",to:"https://www.instructure.com/higher-education/products/canvas/canvas-catalog/"},{title:"Home (K12)",from:"/canvas/catalog/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-catalog/"},{title:"Guides",from:"/canvas/catalog/guides",to:"https://community.canvaslms.com/t5/Canvas-Catalog/ct-p/canvas_catalog"},{title:"Release Notes",from:"/canvas/catalog/releases",to:"https://community.canvaslms.com/t5/Catalog-Releases/ct-p/catalog_releases"},{title:"API",from:"/canvas/catalog/api",to:"https://api.catalog.instructure.com/api/docs"}].map((e=>({...e,lang:"EN"})))},zl={brand:"Canvas Commons",links:[{title:"Home",from:"/canvas/commons",to:"https://lor.instructure.com/"},{title:"Guides",from:"/canvas/commons/guides",to:"https://community.canvaslms.com/t5/Canvas-Commons/tkb-p/commons"},{title:"API",from:"/canvas/commons/api",to:"https://lor.instructure.com/docs/api/"}].map((e=>({...e,lang:"EN"})))},$l="canvas-credentials",Ml=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${$l}`,Nl=[{title:"Compliance Package",from:"/canvas/credentials/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${$l}.zip`},{title:"VPAT",from:"/canvas/credentials/vpat/dl",to:`${Ml}/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf`},{title:"Architecture Paper",from:"/canvas/credentials/architecture/dl",to:`${Ml}/Canvas%20Credentials/Canvas%20Credentials%20Architecture.pdf`},{title:"HECVAT",from:"/canvas/credentials/hecvat/dl",to:`${Ml}/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx`},{title:"TX-RAMP Certification",from:"/canvas/credentials/tx-ramp/dl",to:`${Ml}/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Home (HE)",from:"/canvas/credentials",to:"https://www.instructure.com/higher-education/products/canvas/canvas-credentials-digital-badges/"},{title:"Home (K12)",from:"/canvas/credentials/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-credentials-digital-badges/"},{title:"Guides",from:"/canvas/credentials/guides",to:"https://community.canvaslms.com/t5/Canvas-Credentials-Badges-Badgr/ct-p/canvas-credentials-badges"},{title:"Release Notes",from:"/canvas/credentials/releases",to:"https://community.canvaslms.com/t5/Badges-Credentials-Releases/tkb-p/badges-release"},{title:"API",from:"/canvas/credentials/api",to:"https://api.badgr.io/docs/v2/"}].map((e=>({...e,lang:"EN"}))),Il="canvas-credentials-ES_LA",Dl=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Il}`,Fl=[{title:"Compliance Package",from:"/es-la/canvas/credentials/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Il}.zip`},{title:"VPAT",from:"/es-la/canvas/credentials/vpat/dl",to:`${Dl}/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf`},{title:"Papel de Arquitectura",from:"/es-la/canvas/credentials/arquitectura/dl",to:`${Dl}/Canvas%20Credentials/Canvas%20Credentials%20Architecture_ES.pdf`},{title:"HECVAT",from:"/es-la/canvas/credentials/hecvat/dl",to:`${Dl}/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx`},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/credentials/tx-ramp/dl",to:`${Dl}/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf`}].map((e=>({...e,lang:"ES_LA"}))),jl="canvas-credentials-PT_BR",Hl=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${jl}`,Ul={brand:"Canvas Credentials",links:[...Nl,...Fl,...[{title:"Compliance Package",from:"/pt-br/canvas/credentials/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${jl}.zip`},{title:"VPAT",from:"/pt-br/canvas/credentials/vpat/dl",to:`${Hl}/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf`},{title:"Papel de Arquitectura",from:"/pt-br/canvas/credentials/arquitectura/dl",to:`${Hl}/Canvas%20Credentials/Canvas%20Credentials%20Architecture_PT.pdf`},{title:"HECVAT",from:"/pt-br/canvas/credentials/hecvat/dl",to:`${Hl}/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx`},{title:"Certificado de Nível 2 de TX-RAMP",from:"/pt-br/canvas/credentials/tx-ramp/dl",to:`${Hl}/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf`}].map((e=>({...e,lang:"PT_BR"})))]},Wl={brand:"Canvas Data",links:[{title:"Guides",from:"/canvas/data/guides",to:"https://community.canvaslms.com/t5/Canvas-Data-Users/gh-p/data"},{title:"API",from:"/canvas/data/api",to:"https://portal.inshosteddata.com/docs"}].map((e=>({...e,lang:"EN"})))},Bl=[{title:"Startseite",from:"/de/canvas/lms",to:"https://www.instructure.com/de/hochschule/produkt/canvas/canvas-lms/"},{title:"Handbücher",from:"/de/canvas/handbuch",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}].map((e=>({...e,lang:"DE"}))),Vl="canvas-lms",ql=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Vl}`,Gl=[{title:"Compliance Package",from:"/canvas/lms/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Vl}.zip`},{title:"Architecture Paper",from:"/canvas/lms/architecture/dl",to:`${ql}/Canvas%20LMS/Canvas%20LMS%20Architecture.pdf`},{title:"HECVAT",from:"/canvas/lms/hecvat/dl",to:`${ql}/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx`},{title:"K12CVAT",from:"/canvas/lms/k12cvat/dl",to:`${ql}/Canvas%20LMS/Canvas%20LMS%20K12CVAT%20Full.xlsx`},{title:"SOC 3 Report",from:"/canvas/lms/soc/dl",to:`${ql}/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf`},{title:"TX-RAMP Level 2 Certificate",from:"/canvas/lms/txramp/dl",to:`${ql}/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Home (HE)",from:"/canvas/lms",to:"https://www.instructure.com/higher-education/products/canvas/canvas-lms/"},{title:"Home (K12)",from:"/canvas/lms/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-lms/"},{title:"VPAT",from:"/canvas/lms/vpat",to:"https://www.instructure.com/products/canvas/accessibility/"},{title:"Guides",from:"/canvas/lms/guides",to:"https://community.canvaslms.com/t5/Canvas-Guides/ct-p/canvas_guides/"},{title:"Release Notes",from:"/canvas/lms/releases",to:"https://community.canvaslms.com/t5/Canvas-Releases/tkb-p/canvas-release"},{title:"API",from:"/canvas/lms/api",to:"https://canvas.instructure.com/doc/api/index.html"}].map((e=>({...e,lang:"EN"}))),Ql="canvas-lms-ES_LA",Xl=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Ql}`,Kl=[{title:"Compliance Package",from:"/es-la/canvas/lms/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Ql}.zip`},{title:"Papel de Arquitectura",from:"/es-la/canvas/lms/arquitectura/dl",to:`${Xl}/Canvas%20LMS/Canvas%20LMS%20Architecture_ES.pdf`},{title:"HECVAT",from:"/es-la/canvas/lms/hecvat/dl",to:`${Xl}/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx`},{title:"K12CVAT",from:"/es-la/canvas/lms/k12cvat/dl",to:`${Xl}/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx`},{title:"Informe SOC 3",from:"/es-la/canvas/lms/soc/dl",to:`${Xl}/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf`},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/lms/txramp/dl",to:`${Xl}/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Página de inicio (HE)",from:"/es-la/canvas/lms",to:"https://www.instructure.com/es/canvas/educacion-superior/"},{title:"Página de inicio (K12)",from:"/es-la/canvas/lms/basica",to:"https://www.instructure.com/es/educacion-basica/"},{title:"Guías",from:"/es-la/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de implementación",from:"/es-la/canvas/lms/publicacion",to:"https://community.canvaslms.com/t5/Espa%C3%B1ol/tkb-p/canvas-release-espanol"}].map((e=>({...e,lang:"ES_LA"}))),Yl="canvas-lms-PT_BR",Zl=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Yl}`,Jl={brand:"Canvas LMS",links:[...Gl,...Kl,...[{title:"Compliance Package",from:"/pt-br/canvas/lms/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Yl}.zip`},{title:"Papel de Arquitetura",from:"/pt-br/canvas/lms/arquitetura/dl",to:`${Zl}/Canvas%20LMS/Canvas%20LMS%20Architecture_PT.pdf`},{title:"HECVAT",from:"/pt-br/canvas/lms/hecvat/dl",to:`${Zl}/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx`},{title:"K12CVAT",from:"/pt-br/canvas/lms/k12cvat/dl",to:`${Zl}/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx`},{title:"Relatório SOC 3",from:"/pt-br/canvas/lms/soc/dl",to:`${Zl}/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf`},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/canvas/lms/txramp/dl",to:`${Zl}/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Página inicial (HE)",from:"/canvas/lms/pt",to:"https://www.instructure.com/pt-br/canvas/ensino-superior/"},{title:"Página inicial (K12)",from:"/canvas/lms/pt/basica",to:"https://www.instructure.com/pt-br/ensino-fundamental-e-medio/"},{title:"Guias",from:"/pt-br/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de lançamento (Canvas LMS)",from:"/canvas/lms/lancamentos",to:"https://community.canvaslms.com/t5/Portugues/tkb-p/canvas-release-portugues"}].map((e=>({...e,lang:"PT_BR"}))),...Bl]},es={brand:"Canvas Mobile",links:[{title:"Mobile Apps (Android)",from:"/canvas/mobile/android",to:"https://play.google.com/store/apps/developer?id=Instructure"},{title:"Mobile Apps (iOS)",from:"/canvas/mobile/ios",to:"https://apps.apple.com/us/developer/instructure-inc/id418441198"},{title:"Release Notes",from:"/canvas/mobile/releases",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Releases/tkb-p/CanvasMobileReleases"},{title:"Guides",from:"/canvas/mobile/guides",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Users/gh-p/mobile"}].map((e=>({...e,lang:"EN"})))},ts="canvas-studio",ns=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${ts}`,rs={brand:"Canvas Studio",links:[{title:"Compliance Package",from:"/canvas/studio/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${ts}.zip`},{title:"Architecture Paper",from:"/canvas/studio/architecture/dl",to:`${ns}/Canvas%20Studio/Canvas%20Studio%20Architecture.pdf`},{title:"HECVAT",from:"/canvas/studio/hecvat/dl",to:`${ns}/Canvas%20Studio/Canvas%20Studio%20HECVAT%20Lite.xlsx`},{title:"Home (HE)",from:"/canvas/studio",to:"https://www.instructure.com/higher-education/products/canvas/canvas-studio/"},{title:"Home (K12)",from:"/canvas/studio/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-studio/"},{title:"VPAT",from:"/canvas/studio/vpat",to:"https://www.instructure.com/accessibility/canvas/canvas-studio-vpat/"},{title:"Guides",from:"/canvas/studio/guides",to:"https://community.canvaslms.com/t5/Canvas-Studio/ct-p/studio_guides"},{title:"Release Notes",from:"/canvas/studio/releases",to:"https://community.canvaslms.com/t5/Studio-Releases/ct-p/studio_releases"},{title:"API",from:"/canvas/studio/api",to:"https://canvas.instructuremedia.com/api/public/docs/#/"}].map((e=>({...e,lang:"EN"})))},as=[{title:"Gemeinschaft",from:"/de/canvas/gemeinschaft",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}].map((e=>({...e,lang:"DE"}))),os={brand:"Canvas",links:[...[{title:"Security Audit Report",from:"/canvas/audit/dl",to:`${`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/canvas-lms`}/Canvas%20LMS/Canvas%20Security%20Audit%20Report.pdf`},{title:"Try Canvas (FFT)",from:"/canvas/try",to:"https://www.instructure.com/try-canvas"},{title:"Community",from:"/canvas/community",to:"https://community.canvaslms.com/t5/Canvas/ct-p/canvas"},{title:"Roadmap",from:"/canvas/roadmap",to:"https://community.canvaslms.com/t5/Canvas-Product-Roadmap/ct-p/canvas-product-roadmap"},{title:"Ideas",from:"/canvas/ideas",to:"https://community.canvaslms.com/t5/Canvas-Ideas-and-Themes/ct-p/canvas-ideas-themes?tab=identified"}].map((e=>({...e,lang:"EN"}))),...[{title:"Communidad",from:"/es-la/canvas/lms/communidad",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"}].map((e=>({...e,lang:"ES_LA"}))),...[{title:"Comunidade",from:"/pt-br/canvas/comunidade",to:"https://community.canvaslms.com/t5/Recursos-em-Portugu%C3%AAs-Portuguese/ct-p/portuguese_resources"}].map((e=>({...e,lang:"PT_BR"}))),...as]},is={brand:"Elevate Data Quality",links:[{title:"Home",from:"/elevate/dataquality",to:"https://www.instructure.com/k12/products/elevate/elevate-data-quality/"},{title:"Guides",from:"/elevate/dataquality/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Quality/ct-p/certify"}].map((e=>({...e,lang:"EN"})))},ls={brand:"Elevate Data Sync",links:[{title:"Guides",from:"/elevate/datasync/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Sync/ct-p/elevate_data_sync"}].map((e=>({...e,lang:"EN"})))},ss="elevate-standards-alignment",us={brand:"Elevate Standards Alignment",links:[{title:"Compliance Package",from:"/elevate/standards-alignment/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${ss}.zip`},{title:"HECVAT Lite",from:"/elevate/standards-alignment/hecvat/dl",to:`${`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${ss}`}/Elevate%20Standards%20Alignment/Elevate%20Standards%20Alignment%20HECVAT%20Lite.xlsx`},{title:"Home",from:"/elevate/standards-alignment",to:"https://www.instructure.com/corporate-education/products/elevate/elevate-standards-alignment"},{title:"Release Notes",from:"/elevate/standards-alignment/releases",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/esa_releases"},{title:"Guides",from:"/elevate/standards-alignment/guides",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/ab_basics"},{title:"Standards",from:"/elevate/standards-alignment/standards",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/ct-p/ab_standards"}].map((e=>({...e,lang:"EN"})))},cs={brand:"Elevate",links:[{title:"Community",from:"/elevate/community",to:"https://community.canvaslms.com/t5/Elevate/ct-p/elevate"},{title:"Roadmap",from:"/elevate/roadmap",to:"https://community.canvaslms.com/t5/Elevate-Product-Roadmap/ct-p/elevate-product-roadmap"}].map((e=>({...e,lang:"EN"})))},ds="impact",fs=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${ds}`,ps=[{title:"Compliance Package",from:"/impact/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${ds}.zip`},{title:"Architecture Paper",from:"/impact/architecture/dl",to:`${fs}/Impact/Impact%20Architecture.pdf`},{title:"HECVAT",from:"/impact/hecvat/dl",to:`${fs}/Impact/Impact%20by%20Instructure%20HECVAT%20Full.xlsx`},{title:"TX-RAMP Level 2 Certification",from:"/impact/tx-ramp/dl",to:`${fs}/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Home (HE)",from:"/impact/he",to:"https://www.instructure.com/higher-education/products/impact/"},{title:"Home (K12)",from:"/impact/k12",to:"https://www.instructure.com/k12/products/impact/"},{title:"Community",from:"/impact/community",to:"https://community.canvaslms.com/t5/Impact/ct-p/impact"},{title:"Guides",from:"/impact/guides",to:"https://community.canvaslms.com/t5/Impact-Guides/tkb-p/impact_guides"},{title:"Release Notes",from:"/impact/releases",to:"https://community.canvaslms.com/t5/Impact-Releases/ct-p/impact_releases"}].map((e=>({...e,lang:"EN"}))),ms="impact-ES_LA",hs=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${ms}`,vs=[{title:"Compliance Package",from:"/es-la/impact/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${ms}.zip`},{title:"Papel de Arquitectura",from:"/es-la/impact/arquitectura/dl",to:`${hs}/Impact/Impact%20Architecture_ES.pdf`},{title:"HECVAT",from:"/es-la/impact/hecvat/dl",to:`${hs}/Impact/Impact%20by%20Instructure%20HECVAT%20Full.xlsx`},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/impact/tx-ramp/dl",to:`${hs}/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf`}].map((e=>({...e,lang:"ES_LA"}))),gs="impact-PT_BR",ys=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${gs}`,bs={brand:"Impact",links:[...ps,...vs,...[{title:"Compliance Package",from:"/pt-br/impact/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${gs}.zip`},{title:"Papel de Arquitetura",from:"/pt-br/impact/arquitetura/dl",to:`${ys}/Impact/Impact%20Architecture_PT.pdf`},{title:"HECVAT",from:"/pt-br/impact/hecvat/dl",to:`${ys}/Impact/Impact%20by%20Instructure%20HECVAT%20Full.xlsx`},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/impact/tx-ramp/dl",to:`${ys}/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf`}].map((e=>({...e,lang:"PT_BR"})))]},ws=[{title:"Startseite",from:"/de/home",to:"https://www.instructure.com/de"},{title:"Kontakt",from:"/de/kontakt",to:"https://www.instructure.com/de/contact-us"}].map((e=>({...e,lang:"DE"}))),Ss=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Cl.branch}`,ks={brand:"Instructure",links:[...[{title:"Security White Paper",from:"/security/dl",to:`${Ss}/Instructure/Instructure%20Security%20Overview.pdf`},{title:"Business Continuity White Paper",from:"/bc/dl",to:`${Ss}/Instructure/Instructure%20Business%20Continuity%20%26%20Disaster%20Recovery.pdf`},{title:"CAIQ",from:"/caiq/dl",to:`${Ss}/Instructure/Instructure%20ESG%20Report%20FY2023.pdf`},{title:"CSA Star Certificate",from:"/csa/dl",to:`${Ss}/Instructure/Instructure%20CSA%20STAR%20Certificate.pdf`},{title:"Cyber Essentials+ Certificate",from:"/ce/dl",to:`${Ss}/Instructure/Instructure%20Cyber%20Essentials%20Plus.pdf`},{title:"Environmental, Social, and Governance Report",from:"/esg/dl",to:`${Ss}/Instructure/Instructure%20ESG%20Report%20FY2023.pdf`},{title:"Instructure, Inc. Certificate of Insurance",from:"/coi/dl",to:`${Ss}/Instructure/Instructure%20Inc%20COI.pdf`},{title:"Instructure Global Certificate of Insurance",from:"/coi-global/dl",to:`${Ss}/Instructure/Instructure%20Global%20COI.pdf`},{title:"ISO 27001 Certificate",from:"/iso/dl",to:`${Ss}/Instructure/Instructure%20ISO%2027001%20Compliance%20Certificate.pdf`},{title:"Quality Assurance Program",from:"/qa/dl",to:`${Ss}/Instructure/Instructure%20Quality%20Assurance%20Program.pdf`},{title:"Home",from:"/home",to:"https://www.instructure.com/"},{title:"Roadmap",from:"/roadmap",to:"https://community.canvaslms.com/t5/Instructure-Roadmap/ct-p/instructure-roadmap/"},{title:"Accessibility",from:"/a11y",to:"https://www.instructure.com/accessibility/"},{title:"Contact",from:"/contact",to:"https://www.instructure.com/contact-us/"},{title:"Privacy",from:"/privacy",to:"https://www.instructure.com/canvas/privacy/"},{title:"Security",from:"/security",to:"https://www.instructure.com/products/canvas/security/"},{title:"Trust Center",from:"/trust",to:"https://www.instructure.com/trust-center/"},{title:"Community",from:"/community",to:"https://community.canvaslms.com/"},{title:"Terms & Conditions",from:"/tos",to:"https://www.instructure.com/policies/master-terms-conditions/"},{title:"Global Terms & Conditions",from:"/tos/global",to:"https://www.instructure.com/policies/global/master-terms-and-conditions/"},{title:"Acceptable Use Policy",from:"/aup",to:"https://www.instructure.com/policies/acceptable-use/"},{title:"Data Privacy Addendum",from:"/dpa",to:"https://www.instructure.com/policies/data-processing/"},{title:"Third-party Service Providers",from:"/subprocessors",to:"https://community.canvaslms.com/t5/Privacy-Articles/Instructure-s-Third-Party-Processing-Guide/ta-p/606339?attachment-id=10429"},{title:"Investor Relations",from:"/investors",to:"https://ir.instructure.com/overview/default.aspx"},{title:"Status",from:"/status",to:"https://status.instructure.com/"},{title:"CSA Star Registration",from:"/csa",to:"https://cloudsecurityalliance.org/star/registry/instructure/"},{title:"1EdTech Registrations",from:"/1edtech",to:"https://site.imsglobal.org/certifications?query=instructure"},{title:"Our Story",from:"/story",to:"https://www.instructure.com/about/our-story"},{title:"Study Hall",from:"/resources",to:"https://www.instructure.com/resources/"},{title:"EduAppCenter",from:"/apps",to:"https://www.eduappcenter.com/"},{title:"ESG Report (online)",from:"/esg",to:"https://instructure.com/esg-report"}].map((e=>({...e,lang:"EN"}))),...[{title:"Página de inicio",from:"/es-la/home",to:"https://www.instructure.com/es/"},{title:"Contáctenos",from:"/es-la/contactenos",to:"https://www.instructure.com/es/contactenos/"},{title:"Privacidad",from:"/es-la/privicidad",to:"https://www.instructure.com/es/canvas/privacidad/"},{title:"Seguridad",from:"/es-la/seguridad",to:"https://www.instructure.com/es/canvas/seguridad/"},{title:"Nuestra Historia",from:"/es-la/historia",to:"https://www.instructure.com/es/sobre/nuestra-historia"}].map((e=>({...e,lang:"ES_LA"}))),...[{title:"Pagina inicial",from:"/pt-br/home",to:"https://www.instructure.com/pt-br/"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Privacidade",from:"/pt-br/privacidade",to:"https://www.instructure.com/pt-br/canvas/privacidade/"},{title:"Segurança",from:"/pt-br/seguranca",to:"https://www.instructure.com/pt-br/canvas/seguranca/"},{title:"Nossa História",from:"/pt-br/historia",to:"https://www.instructure.com/pt-br/sobre/nossa-historia"}].map((e=>({...e,lang:"PT_BR"}))),...ws]},Cs="intelligent-insights",xs=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Cs}`,Es={brand:"Intelligent Insights",links:[{title:"Compliance Package",from:"/intelligent-insights/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Cs}.zip`},{title:"Architecture Paper",from:"/intelligent-insights/architecture/dl",to:`${xs}/Intelligent%20Insights/Intelligent%20Insights%20Architecture%20Overview.pdf`},{title:"HECVAT",from:"/intelligent-insights/hecvat/dl",to:`${xs}/Intelligent%20Insights/Intelligent%20Insights%20HECVAT%20Lite.xlsx`},{title:"Data Sheet",from:"/intelligent-insights/data/dl",to:`${xs}/Intelligent%20Insights/Intelligent%20Insights%20Data%20Sheet.pdf`},{title:"Home",from:"/intelligent-insights/home",to:"https://www.instructure.com/products/intelligent-insights"},{title:"Community",from:"/intelligent-insights/community",to:"https://community.canvaslms.com/t5/Intelligent-Insights/ct-p/intelligent_insights"},{title:"Guides",from:"/intelligent-insights/guides",to:"https://community.canvaslms.com/t5/Intelligent-Insights-Guides/tkb-p/intelligent_insights_guides"},{title:"Release Notes",from:"/intelligent-insights/releases",to:"https://community.canvaslms.com/t5/Intelligent-Insight-Release/tkb-p/intelligent_insights_releases"}].map((e=>({...e,lang:"EN"})))},Ps="learnplatform",_s=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Ps}`,Ts={brand:"Learnplatform",links:[{title:"Compliance Package",from:"/learnplatform/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Ps}.zip`},{title:"EdTech Top 40 Report",from:"/learnplatform/top40/dl",to:`${_s}/LearnPlatform/EdTech%20Top%2040.pdf`},{title:"Architecture Paper",from:"/learnplatform/architecture/dl",to:`${_s}/LearnPlatform/LearnPlatform%20Architecture%20Overview.pdf`},{title:"HECVAT Lite",from:"/learnplatform/hecvat/dl",to:`${_s}/LearnPlatform/LearnPlatform%20HECVAT%20Lite.xlsx`},{title:"Home",from:"/learnplatform",to:"https://www.instructure.com/k12/products/learnplatform/"},{title:"Terms of Service",from:"/learnplatform/tos",to:"https://www.instructure.com/policies/learnplatform-terms-of-service/"},{title:"Privacy",from:"/learnplatform/privacy",to:"https://www.instructure.com/policies/privacy-learnplatform/"},{title:"Data Processing Agreement",from:"/learnplatform/dpa",to:"https://www.instructure.com/policies/learnplatform-data-processing-agreement/"},{title:"Statement of Neutrality",from:"/learnplatform/neutrality",to:"https://www.instructure.com/policies/learnplatform-neutrality/"},{title:"Utah BOE",from:"/learnplatform/utah",to:"https://www.instructure.com/k12/products/learnplatform/"}].map((e=>({...e,lang:"EN"})))},Rs="mastery-connect",As=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Rs}`,Ls={brand:"Mastery Connect",links:[{title:"Compliance Package",from:"/mastery/connect/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Rs}.zip`},{title:"Architecture Paper",from:"/mastery/connect/architecture/dl",to:`${As}/Mastery%20Connect/Mastery%20Connect%20Architecture.pdf`},{title:"HECVAT Lite",from:"/mastery/connect/hecvat/dl",to:`${As}/Mastery%20Connect/Mastery%20Connect%20HECVAT%20Lite.xlsx`},{title:"Home",from:"/mastery/connect",to:"https://www.instructure.com/k12/products/mastery/mastery-connect"},{title:"Guides",from:"/mastery/connect/guides",to:"https://community.canvaslms.com/t5/Mastery-Connect/ct-p/masteryconnect"},{title:"Release Notes",from:"/mastery/connect/releases",to:"https://community.canvaslms.com/t5/Mastery-Connect-Releases/tkb-p/masteryconnect"},{title:"API",from:"/mastery/connect/api",to:"https://docs.google.com/document/d/19TxyeRzF6nyJDY6ej2dZozbE87JdUygw"},{title:"Mobile App (Android)",from:"/mastery/connect/android",to:"https://play.google.com/store/apps/dev?id=8869528477632015729&hl=EN&gl=US"},{title:"Mobile App (iOS)",from:"/canvas/lms/ios",to:"https://apps.apple.com/us/developer/masteryconnect/id413937396"}].map((e=>({...e,lang:"EN"})))},Os={brand:"Mastery Item Bank",links:[{title:"Home",from:"/mastery/itembank",to:"https://www.instructure.com/k12/products/mastery/mastery-item-bank/"},{title:"Guides",from:"/mastery/itembank/guides",to:"https://community.canvaslms.com/t5/Mastery-Item-Bank/ct-p/mastery-item-bank/"}].map((e=>({...e,lang:"EN"})))},zs={brand:"Mastery View Assessments",links:[{title:"Formatives Home",from:"/mastery/view/formative",to:"https://www.instructure.com/k12/products/mastery/mastery-view-formative-assessments/"},{title:"Predictives Home",from:"/mastery/view/predictive",to:"https://www.instructure.com/k12/products/mastery/mastery-view-predictive-assessments/"}].map((e=>({...e,lang:"EN"})))},$s=[Rl,ks,os,Jl,es,rs,Ol,zl,Wl,Ul,{brand:"Mastery",links:[{title:"Community",from:"/mastery/community",to:"https://community.canvaslms.com/t5/Mastery/ct-p/mastery"},{title:"Roadmap",from:"/mastery/roadmap",to:"https://community.canvaslms.com/t5/Mastery-Product-Roadmap/ct-p/mastery-product-roadmap"}].map((e=>({...e,lang:"EN"})))},Ls,Os,zs,bs,cs,us,is,ls,Ts,Es,{brand:"Parchment",links:[].map((e=>({...e,lang:"EN"})))}];si.use({overrides:{typography:{fontFamily:'LatoWeb, "Lato Extended", Lato, "Helvetica Neue", Helvetica, Arial, sans-serif'}}});const Ms=document.getElementById("root");if(!Ms)throw new Error("Root element not found");const Ns=async()=>{let e={mode:"App"};if(!kl()){const t=await function(){const e={mode:"LTI",lti:{"lti.getPageSettings":null,"lti.capabilities":null}};return new Promise((t=>{const n=t=>{const{message_id:n}=t.data;e.lti[n]=t.data};window.addEventListener("message",n);for(const a of Object.keys(e.lti))window.parent.postMessage({subject:a,message_id:a},"*");const r=()=>{Object.values(e.lti).every((e=>null!==e))?(window.removeEventListener("message",n),t(e)):setTimeout(r,50)};r()}))}();null!==t?.lti?.["lti.getPageSettings"]&&(e=t)}return e},Is=({config:e})=>{const t=[];for(const a of _l)t.push({path:`${a.route}`,lazy:()=>n((()=>import("./markdownBrand-Byq6OFdN.js")),__vite__mapDeps([0,1,2,3,4])),loader:()=>({readme:a.readme,brand:a.brandName,config:e}),children:[{path:":language",lazy:()=>n((()=>import("./markdownBrand-Byq6OFdN.js")),__vite__mapDeps([0,1,2,3,4])),loader:()=>({readme:a.readme,brand:a.brandName,config:e})}]});for(const a of $s)for(const r of a.links)t.push({path:r.from,lazy:()=>n((()=>import("./redirectTo-CxjXH9wP.js")),__vite__mapDeps([5,1,6,4,7])),loader:()=>({path:r.from,brand:a.brand,url:r.to,config:e}),children:[{path:":language",lazy:()=>n((()=>import("./redirectTo-CxjXH9wP.js")),__vite__mapDeps([5,1,6,4,7])),loader:()=>({path:r.from,brand:a.brand,url:r.to,config:e})}]});t.push({path:"/links",lazy:()=>n((()=>import("./links-CYh0RyKT.js")),__vite__mapDeps([8,1,9,3,10])),loader:()=>({config:e}),children:[{path:":language",lazy:()=>n((()=>import("./links-CYh0RyKT.js")),__vite__mapDeps([8,1,9,3,10])),loader:()=>({config:e})}]}),t.push({path:"/mdui",lazy:()=>n((()=>import("./mdui-BXjSBCyA.js")),__vite__mapDeps([11,2,1,3,12,10])),loader:()=>({config:e}),children:[{path:":language",lazy:()=>n((()=>import("./mdui-BXjSBCyA.js")),__vite__mapDeps([11,2,1,3,12,10])),loader:()=>({config:e})}]}),t.push({path:"/releases",lazy:()=>n((()=>import("./releases-FYWc6T2H.js")),__vite__mapDeps([13,2,1,3,14])),loader:()=>({config:e}),children:[{path:":language",lazy:()=>n((()=>import("./releases-FYWc6T2H.js")),__vite__mapDeps([13,2,1,3,14])),loader:()=>({config:e})}]}),t.push({path:"*",lazy:()=>n((()=>import("./error-DNgfncXY.js")),__vite__mapDeps([15,1,6,4,7])),loader:()=>({config:e}),children:[{path:":language",lazy:()=>n((()=>import("./error-DNgfncXY.js")),__vite__mapDeps([15,1,6,4,7])),loader:()=>({config:e})}]});const r=function(e){return We({basename:void 0,future:an({},void 0,{v7_prependBasename:!0}),history:X({window:void 0}),hydrationData:ln(),routes:e,mapRouteProperties:rn,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}(t);return p.jsx(k.StrictMode,{children:p.jsx(Ii,{as:"div",minHeight:"100vh",position:"relative",className:e.mode.toLowerCase(),children:p.jsx(hn,{router:r})})})},Ds=()=>{const e=w.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={mode:"LTI"},e[0]=t):t=e[0];const[n,r]=S.useState(t);let a,o,i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{Ns().then((e=>{r(e)})).catch((e=>{console.error("Error initiating config:",e)}))},o=[],e[1]=a,e[2]=o):(a=e[1],o=e[2]),S.useEffect(a,o),e[3]!==n?(i=n?p.jsx(Is,{config:n}):p.jsxs(Ii,{as:"div",textAlign:"center",children:[p.jsx(pl,{level:"h1",as:"h1",margin:"0 0 x-small",children:"Loading..."}),p.jsx(Sl,{renderTitle:"Loading",size:"medium"})]}),e[3]=n,e[4]=i):i=e[4],i};H.createRoot(Ms).render(p.jsx(S.StrictMode,{children:p.jsx(Ds,{})}));export{ao as $,Ae as A,Ua as B,Wa as C,Ba as D,qa as E,Va as F,io as G,pl as H,oo as I,Xa as J,Uo as K,$s as L,Na as M,si as N,po as O,_l as P,oa as Q,k as R,Yi as S,bi as T,vo as U,Ii as V,B as W,Oa as X,fa as Y,za as Z,n as _,w as a,kl as a0,il as a1,wn as a2,a as a3,Wo as a4,Bo as a5,zo as a6,ba as a7,ki as a8,Si as a9,Sl as aa,Bi as ab,rl as ac,al as ad,ol as ae,ll as af,El as b,U as c,W as d,Ht as e,Pl as f,Cl as g,_a as h,xa as i,p as j,so as k,da as l,r as m,Ta as n,Ya as o,no as p,ro as q,S as r,Ka as s,Ti as t,Zt as u,lo as v,di as w,Ea as x,Ha as y,Jt as z}; + }`,vl={delay:xa.number,renderTitle:xa.oneOfType([xa.func,xa.node]),size:xa.oneOf(["x-small","small","medium","large"]),variant:xa.oneOf(["default","inverse"]),margin:bi.spacing,elementRef:xa.func,as:xa.elementType};var gl,yl,bl,wl;let Sl=(gl=lo(),yl=di(((e,t)=>{const n=t.size,r=t.variant,a={"x-small":{width:e.xSmallSize,height:e.xSmallSize},small:{width:e.smallSize,height:e.smallSize},medium:{width:e.mediumSize,height:e.mediumSize},large:{width:e.largeSize,height:e.largeSize}},o={"x-small":{width:e.xSmallSize,height:e.xSmallSize},small:{width:e.smallSize,height:e.smallSize},medium:{width:e.mediumSize,height:e.mediumSize},large:{width:e.largeSize,height:e.largeSize}},i={"x-small":{strokeWidth:e.xSmallBorderWidth},small:{strokeWidth:e.smallBorderWidth},medium:{strokeWidth:e.mediumBorderWidth},large:{strokeWidth:e.largeBorderWidth}},l={"x-small":{strokeWidth:e.xSmallBorderWidth,strokeDasharray:"3em",transformOrigin:`calc(${e.xSmallSize} / 2) calc(${e.xSmallSize} / 2)`},small:{strokeWidth:e.smallBorderWidth,strokeDasharray:"6em",transformOrigin:`calc(${e.smallSize} / 2) calc(${e.smallSize} / 2)`},medium:{strokeWidth:e.mediumBorderWidth,strokeDasharray:"10.5em",transformOrigin:`calc(${e.mediumSize} / 2) calc(${e.mediumSize} / 2)`},large:{strokeWidth:e.largeBorderWidth,strokeDasharray:"14em",transformOrigin:`calc(${e.largeSize} / 2) calc(${e.largeSize} / 2)`}},s={default:{stroke:e.color},inverse:{stroke:e.inverseColor}};return{spinner:{label:"spinner",display:"inline-block",verticalAlign:"middle",position:"relative",boxSizing:"border-box",overflow:"hidden",...a[n]},circle:{label:"spinner__circle",display:"block",position:"absolute",top:"0",left:"0",animationName:ml,animationDuration:"2.25s",animationIterationCount:"infinite",animationTimingFunction:"linear",...o[n]},circleTrack:{label:"spinner__circleTrack",stroke:e.trackColor,fill:"none",...i[n]},circleSpin:{label:"spinner__circleSpin",fill:"none",strokeLinecap:"round",animationName:hl,animationDuration:"1.75s",animationIterationCount:"infinite",animationTimingFunction:"ease",...l[n],...s[r]}}}),(e=>{var t,n,r,a;const o=e.colors,i=e.key,l={"canvas-high-contrast":{inverseColor:null==o||null===(t=o.contrasts)||void 0===t?void 0:t.white1010},canvas:{color:e["ic-brand-primary"]}};return{...{trackColor:null==o||null===(n=o.contrasts)||void 0===n?void 0:n.grey1111,color:null==o||null===(r=o.contrasts)||void 0===r?void 0:r.blue4570,xSmallSize:"1.5em",xSmallBorderWidth:"0.25em",smallSize:"3em",smallBorderWidth:"0.375em",mediumSize:"5em",mediumBorderWidth:"0.5em",largeSize:"7em",largeBorderWidth:"0.75em",inverseColor:null==o||null===(a=o.contrasts)||void 0===a?void 0:a.blue4570},...l[i]}})),gl(bl=yl(bl=Ti()((wl=class e extends S.Component{constructor(e){super(e),this.ref=null,this.titleId=void 0,this.delayTimeout=void 0,this.handleRef=e=>{const t=this.props.elementRef;this.ref=e,"function"==typeof t&&t(e)},this.titleId=e.deterministicId(),this.state={shouldRender:!e.delay}}componentDidMount(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t);const n=this.props.delay;n&&(this.delayTimeout=setTimeout((()=>{this.setState({shouldRender:!0})}),n))}componentDidUpdate(){var e,t;null===(e=(t=this.props).makeStyles)||void 0===e||e.call(t)}componentWillUnmount(){clearTimeout(this.delayTimeout)}radius(){switch(this.props.size){case"x-small":return"0.5em";case"small":return"1em";case"large":return"2.25em";default:return"1.75em"}}renderSpinner(){var t,n,r,a;const o=Ii.omitViewProps(Ya(this.props,e.allowedProps),e);this.props.renderTitle;return da(Ii,Object.assign({},o,{as:this.props.as,elementRef:this.handleRef,css:null===(t=this.props.styles)||void 0===t?void 0:t.spinner,margin:this.props.margin}),da("svg",{css:null===(n=this.props.styles)||void 0===n?void 0:n.circle,role:"img","aria-labelledby":this.titleId,focusable:"false"},da("title",{id:this.titleId},Ea(this.props.renderTitle)),da("g",{role:"presentation"},"inverse"!==this.props.variant&&da("circle",{css:null===(r=this.props.styles)||void 0===r?void 0:r.circleTrack,cx:"50%",cy:"50%",r:this.radius()}),da("circle",{css:null===(a=this.props.styles)||void 0===a?void 0:a.circleSpin,cx:"50%",cy:"50%",r:this.radius()}))))}render(){return this.state.shouldRender?this.renderSpinner():null}},wl.displayName="Spinner",wl.componentId="Spinner",wl.allowedProps=["delay","renderTitle","size","variant","margin","elementRef","as"],wl.propTypes=vl,wl.defaultProps={as:"div",size:"medium",variant:"default"},bl=wl))||bl)||bl)||bl);function kl(){return window.self===window.top}const Cl={owner:"instructure",repo:"instructure-compliance-packages",branch:"main",url:{name:"isp-site",version:"6.0.0+1731103637",homepage:"https://inst.bid/#/",private:!0,type:"module",scripts:{dev:"vite","biome:check":"pnpm lint && pnpm check && pnpm format","biome:apply":"pnpm lint:apply && pnpm check:apply && pnpm format:apply",build:"pnpm build:preview && pnpm build:git","build:git":'git add . && git commit -m "Build v$npm_package_version" && git push',"build:js":"vite build","build:preview":"pnpm biome:apply && pnpm sec && pnpm build:version && pnpm build:ts && pnpm build:js","build:ts":"tsc","build:version":'node-jq -r \'.version=$ARGS.positional[0]+"+"+$ARGS.positional[1]\' package.json --args "$(pnpm -s env:semver)" "$(date +%s)" | sponge package.json',check:"biome check","check:apply":"biome check --write","env:package":"node-jq '.' package.json","env:biome":"biome rage","env:buildtime":"date -r $(node-jq -r '(.version | split(\"+\"))[1]' package.json)","env:semver":"node-jq -r '(.version | split(\"+\"))[0]' package.json","env:version":'echo "$npm_package_version"',format:"biome format","format:apply":"biome format --write",lint:"biome lint","lint:apply":"biome lint --write",preview:"pnpm build:preview && vite preview",push:'pnpm build && {pnpm tag || printf "";} && gh-pages -t -m "Deploy v$(pnpm -s env:version)" -d dist',sec:"pnpm sec:audit && pnpm sec:scan","sec:audit":"snyk test && pnpm audit","sec:scan":"snyk code test",tag:"git tag isp-site-v$(pnpm -s env:semver) && git push origin isp-site-v$(pnpm -s env:semver)",test:"vitest run","test:bench":"vitest bench","test:ui":"vitest --ui","test:watch":"vitest watch","test:browser":"vitest --workspace=vitest.workspace.mts"},dependencies:{"@instructure/ui":"10.4.1",react:"19.0.0-rc-66855b96-20241106","react-dom":"19.0.0-rc-66855b96-20241106","react-markdown":"^9.0.1","react-router-dom":"^6.28.0","rehype-raw":"^7.0.0","remark-gemoji":"^8.0.0","remark-gfm":"^4.0.0"},devDependencies:{"@babel/plugin-syntax-import-attributes":"^7.26.0","@biomejs/biome":"1.9.4","@commitlint/cli":"^19.5.0","@commitlint/config-conventional":"^19.5.0","@commitlint/types":"^19.5.0","@instructure/browserslist-config-instui":"^10.5.0","@instructure/shared-types":"^10.5.0","@octokit/types":"^13.6.1","@types/react":"npm:types-react@19.0.0-rc.1","@types/react-dom":"npm:types-react-dom@19.0.0-rc.1","@vitejs/plugin-basic-ssl":"^1.1.0","@vitejs/plugin-react":"^4.3.3","@vitest/browser":"^2.1.4","@vitest/coverage-v8":"^2.1.4","@vitest/ui":"^2.1.4","babel-plugin-react-compiler":"19.0.0-beta-63b359f-20241101","gh-pages":"^6.2.0",lightningcss:"^1.28.1","node-jq":"^6.0.1",playwright:"^1.48.2",snyk:"^1.1294.0","snyk-policy":"^3.0.0",terser:"^5.36.0",typescript:"^5.6.3",vite:"6.0.0-beta.9","vite-plugin-mkcert":"^1.17.6",vitest:"^2.1.4","vitest-browser-react":"^0.0.3"},engines:{node:">=23.1.0",pnpm:">=9.12.2"},packageManager:"pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee",pnpm:{overrides:{vite:"^6.0.0-beta.5",react:"^19.0.0-rc-02c0e824-20241028","react-dom":"^19.0.0-rc-02c0e824-20241028","@instructure/ui-test-sandbox>sinon":"^18.0.1","@bundled-es-modules/cookie>cookie":"^1.0.1"}},browserslist:["extends @instructure/browserslist-config-instui"]}.homepage.replace("/#/",""),gh:"https://github.com",api:"https://api.github.com",raw:"https://raw.githubusercontent.com"},xl=`${Cl.raw}/${Cl.owner}/${Cl.repo}/${Cl.branch}/README`,El=["Instructure","Canvas","Mastery","Elevate","Impact","LearnPlatform","Intelligent Insights","Parchment"],Pl=[...El,"Canvas LMS","Canvas Mobile","Canvas Studio","Canvas Credentials","Canvas Catalog","Canvas Commons","Canvas Data","Mastery Connect","Mastery Item Bank","Mastery View Assessments","Elevate Data Quality","Elevate Data Sync","Elevate Standards Alignment","LearnPlatform"],_l=[{brandName:"Instructure",get title(){return this.brandName.toLowerCase()},route:"/",readme:`${xl}.md`,color:"#287A9F",Icon:il},{brandName:"Canvas",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${xl}-${this.brandName}.md`},color:"#E72429",Icon:rl},{brandName:"Mastery",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${xl}-${this.brandName}.md`},color:"#24A159",Icon:ll},{brandName:"Elevate",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${xl}-${this.brandName}.md`},color:"#0097D3",Icon:al},{brandName:"Impact",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${xl}-${this.brandName}.md`},color:"#F76400",Icon:ol},{brandName:"LearnPlatform",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${xl}-${this.brandName}.md`},color:"#0077CC",Icon:()=>p.jsxs(Yi,{viewBox:"0 0 300 300",size:"small",color:"primary-inverse",height:"2.5rem",width:"2.5rem",children:[p.jsx("path",{d:"M191.431 212.736H205.086C204.961 212.34 204.846 211.974 204.738 211.63C204.404 210.567 204.135 209.713 203.834 208.81C199.852 198.417 195.964 187.986 192.171 177.517C181.493 149.012 170.872 120.497 160.309 91.9733C159.911 90.214 158.223 89.0597 156.44 89.3276C151.091 89.4698 145.743 89.5267 140.423 89.3276C138.432 89 136.546 90.3293 136.184 92.3147C121.657 131.422 107.129 170.519 92.6017 209.607C92.414 210.136 92.2467 210.686 92.0507 211.329C91.9201 211.759 91.7767 212.23 91.606 212.765C93.7973 212.765 95.9464 212.748 98.0664 212.732C102.222 212.701 106.265 212.67 110.297 212.765C112.402 212.935 113.17 211.94 113.824 210.091C115.474 205.226 117.167 200.375 118.859 195.525C120.552 190.675 122.245 185.824 123.895 180.959C124.199 179.276 125.788 178.141 127.479 178.399H168.729C170.418 178.138 172.011 179.255 172.342 180.931C173.799 185.14 175.307 189.334 176.814 193.524C178.251 197.519 179.687 201.511 181.076 205.51C182.365 209.107 183.012 210.914 184.295 211.821C185.589 212.736 187.531 212.736 191.431 212.736ZM148.417 109.213C154.145 126.092 159.977 143.351 165.913 160.989H131.121L148.417 109.213Z"}),p.jsx("path",{d:"M225 110.209V114.191H207.931V133.707H203.522V114.191H186.453V110.209H203.522V90.8069H207.732V110.209H225Z"}),p.jsx("path",{d:"M219.488 246.567C178.123 277.109 121.739 277.405 80.0539 247.301L86.1316 238.9C47.7742 211.418 31.5805 162.32 46.069 117.435L55.9454 119.307C69.5589 79.1029 107.372 52.0989 149.847 52.2484V13C90.0696 13.0663 37.1326 51.5854 18.7192 108.414C0.305744 165.242 20.6036 227.455 68.998 262.519C117.392 297.583 182.877 297.523 231.207 262.37C279.537 227.218 299.72 164.967 281.203 108.173L272.111 111.134C289.714 164.146 271.022 222.449 225.87 255.373"}),p.jsx("path",{d:"M219.488 246.567C178.123 277.109 121.739 277.405 80.0539 247.301L86.1316 238.9C47.7742 211.418 31.5805 162.32 46.069 117.435L55.9454 119.307C69.5589 79.1029 107.372 52.0989 149.847 52.2484V13C90.0696 13.0663 37.1326 51.5854 18.7192 108.414C0.305744 165.242 20.6036 227.455 68.998 262.519C117.392 297.583 182.877 297.523 231.207 262.37C279.537 227.218 299.72 164.967 281.203 108.173L272.111 111.134C289.714 164.146 271.022 222.449 225.87 255.373"})]})},{brandName:"Intelligent Insights",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title.replace(/ /g,"-")}`},get readme(){return`${xl}-${this.brandName.replace(/ /g,"-")}.md`},color:"#287A9F",Icon:il},{brandName:"Parchment",get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${xl}-${this.brandName}.md`},color:"#0093b2",Icon:()=>p.jsxs(Yi,{viewBox:"0 -3 29 31.68",size:"small",color:"primary-inverse",height:"2.5rem",width:"2.5rem",children:[p.jsx("polygon",{points:"26.87 21.98 2.44 21.98 2.44 2.44 19.54 2.44 19.54 0 0 0 0 24.43 29.31 24.43 29.31 9.77 26.87 9.77"}),p.jsx("rect",{x:"26.87",y:"4.89",width:"2.44",height:"2.44"}),p.jsx("rect",{x:"21.98",width:"2.44",height:"2.44"}),p.jsx("rect",{x:"26.87",width:"2.44",height:"2.44"}),p.jsxs("g",{children:[p.jsx("path",{d:"M9.38,13.2c-.5,0-.62.37-.62.71v1.53c0,.4.23.69.66.69.36,0,.55-.21.55-.69v-1.53c0-.42-.13-.71-.58-.71Z"}),p.jsx("path",{d:"M9.15,11.01c-2.36,0-4.27,1.91-4.27,4.27s1.91,4.27,4.27,4.27,4.27-1.91,4.27-4.27-1.91-4.27-4.27-4.27ZM10.86,15.4c0,.81-.54,1.44-1.27,1.44-.31,0-.84-.14-.84-.38v1.87c0,.14-.18.23-.3.23h-.3c-.13,0-.31-.08-.31-.23v-5.53c0-.14.18-.28.31-.28h.31c.13,0,.29.13.29.28v.05c0-.18.44-.36.8-.36.8,0,1.31.5,1.31,1.48v1.43Z"})]})]})}],Tl=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Cl.branch}`,Rl={brand:"AWS",links:[{title:"CAIQ",from:"/aws/caiq/dl",to:`${Tl}/Amazon%20Web%20Services/AWS%20CAIQ.pdf`},{title:"Cyber Essentials+ Certificate",from:"/aws/ce/dl",to:`${Tl}/Amazon%20Web%20Services/AWS%20Cyber%20Essentials%20Plus%20Certificate.pdf`},{title:"CSA Star Level 2 Certificate",from:"/aws/csa/dl",to:`${Tl}/Amazon%20Web%20Services/AWS%20CSA%20Star%20Certification.pdf`},{title:"ISO 27001 Certificate",from:"/aws/iso/dl",to:`${Tl}/Amazon%20Web%20Services/AWS%20ISO%2027001%20Certificate.pdf`},{title:"ISO 9001 Certificate",from:"/aws/iso9001/dl",to:`${Tl}/Amazon%20Web%20Services/AWS%20ISO%209001%20Certificate.pdf`},{title:"SOC 3 Report",from:"/aws/soc/dl",to:`${Tl}/Amazon%20Web%20Services/AWS%20SOC%203.pdf`}].map((e=>({...e,lang:"EN"})))},Al="canvas-catalog",Ll=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Al}`,Ol={brand:"Canvas Catalog",links:[{title:"Compliance Package",from:"/canvas/catalog/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Al}.zip`},{title:"PCI AOC SAQ",from:"/canvas/catalog/aoc/dl",to:`${Ll}/Canvas%20Catalog/2024_Instructure_PCI_DSS_Summary.pdf`},{title:"Architecture Paper",from:"/canvas/catalog/architecture/dl",to:`${Ll}/Canvas%20Catalog/Canvas%20Catalog%20Architecture.pdf`},{title:"HECVAT Lite",from:"/canvas/catalog/hecvat/dl",to:`${Ll}/Canvas%20Catalog/Canvas%20Catalog%20HECVAT%20Lite.xlsx`},{title:"PCI Shared Responsibility Matrix",from:"/canvas/catalog/pci/dl",to:`${Ll}/Canvas%20Catalog/Canvas%20Catalog%20PCI%20Responsibility%20Matrix.pdf`},{title:"TX-RAMP Certification",from:"/canvas/catalog/tx-ramp/dl",to:`${Ll}/Canvas%20Catalog/Canvas%20Catalog%20TX-RAMP%20Provisional%20Certificate.pdf`},{title:"Payment Redirector",from:"/canvas/catalog/payments/dl",to:`${Ll}/Canvas%20Catalog/Catalog%20Payment%20Redirector.png`},{title:"Home (HE)",from:"/canvas/catalog",to:"https://www.instructure.com/higher-education/products/canvas/canvas-catalog/"},{title:"Home (K12)",from:"/canvas/catalog/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-catalog/"},{title:"Guides",from:"/canvas/catalog/guides",to:"https://community.canvaslms.com/t5/Canvas-Catalog/ct-p/canvas_catalog"},{title:"Release Notes",from:"/canvas/catalog/releases",to:"https://community.canvaslms.com/t5/Catalog-Releases/ct-p/catalog_releases"},{title:"API",from:"/canvas/catalog/api",to:"https://api.catalog.instructure.com/api/docs"}].map((e=>({...e,lang:"EN"})))},zl={brand:"Canvas Commons",links:[{title:"Home",from:"/canvas/commons",to:"https://lor.instructure.com/"},{title:"Guides",from:"/canvas/commons/guides",to:"https://community.canvaslms.com/t5/Canvas-Commons/tkb-p/commons"},{title:"API",from:"/canvas/commons/api",to:"https://lor.instructure.com/docs/api/"}].map((e=>({...e,lang:"EN"})))},$l="canvas-credentials",Ml=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${$l}`,Nl=[{title:"Compliance Package",from:"/canvas/credentials/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${$l}.zip`},{title:"VPAT",from:"/canvas/credentials/vpat/dl",to:`${Ml}/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf`},{title:"Architecture Paper",from:"/canvas/credentials/architecture/dl",to:`${Ml}/Canvas%20Credentials/Canvas%20Credentials%20Architecture.pdf`},{title:"HECVAT",from:"/canvas/credentials/hecvat/dl",to:`${Ml}/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx`},{title:"TX-RAMP Certification",from:"/canvas/credentials/tx-ramp/dl",to:`${Ml}/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Home (HE)",from:"/canvas/credentials",to:"https://www.instructure.com/higher-education/products/canvas/canvas-credentials-digital-badges/"},{title:"Home (K12)",from:"/canvas/credentials/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-credentials-digital-badges/"},{title:"Guides",from:"/canvas/credentials/guides",to:"https://community.canvaslms.com/t5/Canvas-Credentials-Badges-Badgr/ct-p/canvas-credentials-badges"},{title:"Release Notes",from:"/canvas/credentials/releases",to:"https://community.canvaslms.com/t5/Badges-Credentials-Releases/tkb-p/badges-release"},{title:"API",from:"/canvas/credentials/api",to:"https://api.badgr.io/docs/v2/"}].map((e=>({...e,lang:"EN"}))),Il="canvas-credentials-ES_LA",Dl=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Il}`,Fl=[{title:"Compliance Package",from:"/es-la/canvas/credentials/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Il}.zip`},{title:"VPAT",from:"/es-la/canvas/credentials/vpat/dl",to:`${Dl}/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf`},{title:"Papel de Arquitectura",from:"/es-la/canvas/credentials/arquitectura/dl",to:`${Dl}/Canvas%20Credentials/Canvas%20Credentials%20Architecture_ES.pdf`},{title:"HECVAT",from:"/es-la/canvas/credentials/hecvat/dl",to:`${Dl}/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx`},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/credentials/tx-ramp/dl",to:`${Dl}/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf`}].map((e=>({...e,lang:"ES_LA"}))),jl="canvas-credentials-PT_BR",Hl=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${jl}`,Ul={brand:"Canvas Credentials",links:[...Nl,...Fl,...[{title:"Compliance Package",from:"/pt-br/canvas/credentials/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${jl}.zip`},{title:"VPAT",from:"/pt-br/canvas/credentials/vpat/dl",to:`${Hl}/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf`},{title:"Papel de Arquitectura",from:"/pt-br/canvas/credentials/arquitectura/dl",to:`${Hl}/Canvas%20Credentials/Canvas%20Credentials%20Architecture_PT.pdf`},{title:"HECVAT",from:"/pt-br/canvas/credentials/hecvat/dl",to:`${Hl}/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx`},{title:"Certificado de Nível 2 de TX-RAMP",from:"/pt-br/canvas/credentials/tx-ramp/dl",to:`${Hl}/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf`}].map((e=>({...e,lang:"PT_BR"})))]},Wl={brand:"Canvas Data",links:[{title:"Guides",from:"/canvas/data/guides",to:"https://community.canvaslms.com/t5/Canvas-Data-Users/gh-p/data"},{title:"API",from:"/canvas/data/api",to:"https://portal.inshosteddata.com/docs"}].map((e=>({...e,lang:"EN"})))},Bl=[{title:"Startseite",from:"/de/canvas/lms",to:"https://www.instructure.com/de/hochschule/produkt/canvas/canvas-lms/"},{title:"Handbücher",from:"/de/canvas/handbuch",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}].map((e=>({...e,lang:"DE"}))),Vl="canvas-lms",ql=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Vl}`,Gl=[{title:"Compliance Package",from:"/canvas/lms/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Vl}.zip`},{title:"Architecture Paper",from:"/canvas/lms/architecture/dl",to:`${ql}/Canvas%20LMS/Canvas%20LMS%20Architecture.pdf`},{title:"HECVAT",from:"/canvas/lms/hecvat/dl",to:`${ql}/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx`},{title:"K12CVAT",from:"/canvas/lms/k12cvat/dl",to:`${ql}/Canvas%20LMS/Canvas%20LMS%20K12CVAT%20Full.xlsx`},{title:"SOC 3 Report",from:"/canvas/lms/soc/dl",to:`${ql}/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf`},{title:"TX-RAMP Level 2 Certificate",from:"/canvas/lms/txramp/dl",to:`${ql}/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Home (HE)",from:"/canvas/lms",to:"https://www.instructure.com/higher-education/products/canvas/canvas-lms/"},{title:"Home (K12)",from:"/canvas/lms/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-lms/"},{title:"VPAT",from:"/canvas/lms/vpat",to:"https://www.instructure.com/products/canvas/accessibility/"},{title:"Guides",from:"/canvas/lms/guides",to:"https://community.canvaslms.com/t5/Canvas-Guides/ct-p/canvas_guides/"},{title:"Release Notes",from:"/canvas/lms/releases",to:"https://community.canvaslms.com/t5/Canvas-Releases/tkb-p/canvas-release"},{title:"API",from:"/canvas/lms/api",to:"https://canvas.instructure.com/doc/api/index.html"}].map((e=>({...e,lang:"EN"}))),Ql="canvas-lms-ES_LA",Xl=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Ql}`,Kl=[{title:"Compliance Package",from:"/es-la/canvas/lms/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Ql}.zip`},{title:"Papel de Arquitectura",from:"/es-la/canvas/lms/arquitectura/dl",to:`${Xl}/Canvas%20LMS/Canvas%20LMS%20Architecture_ES.pdf`},{title:"HECVAT",from:"/es-la/canvas/lms/hecvat/dl",to:`${Xl}/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx`},{title:"K12CVAT",from:"/es-la/canvas/lms/k12cvat/dl",to:`${Xl}/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx`},{title:"Informe SOC 3",from:"/es-la/canvas/lms/soc/dl",to:`${Xl}/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf`},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/lms/txramp/dl",to:`${Xl}/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Página de inicio (HE)",from:"/es-la/canvas/lms",to:"https://www.instructure.com/es/canvas/educacion-superior/"},{title:"Página de inicio (K12)",from:"/es-la/canvas/lms/basica",to:"https://www.instructure.com/es/educacion-basica/"},{title:"Guías",from:"/es-la/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de implementación",from:"/es-la/canvas/lms/publicacion",to:"https://community.canvaslms.com/t5/Espa%C3%B1ol/tkb-p/canvas-release-espanol"}].map((e=>({...e,lang:"ES_LA"}))),Yl="canvas-lms-PT_BR",Zl=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Yl}`,Jl={brand:"Canvas LMS",links:[...Gl,...Kl,...[{title:"Compliance Package",from:"/pt-br/canvas/lms/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Yl}.zip`},{title:"Papel de Arquitetura",from:"/pt-br/canvas/lms/arquitetura/dl",to:`${Zl}/Canvas%20LMS/Canvas%20LMS%20Architecture_PT.pdf`},{title:"HECVAT",from:"/pt-br/canvas/lms/hecvat/dl",to:`${Zl}/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx`},{title:"K12CVAT",from:"/pt-br/canvas/lms/k12cvat/dl",to:`${Zl}/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx`},{title:"Relatório SOC 3",from:"/pt-br/canvas/lms/soc/dl",to:`${Zl}/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf`},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/canvas/lms/txramp/dl",to:`${Zl}/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Página inicial (HE)",from:"/canvas/lms/pt",to:"https://www.instructure.com/pt-br/canvas/ensino-superior/"},{title:"Página inicial (K12)",from:"/canvas/lms/pt/basica",to:"https://www.instructure.com/pt-br/ensino-fundamental-e-medio/"},{title:"Guias",from:"/pt-br/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de lançamento (Canvas LMS)",from:"/canvas/lms/lancamentos",to:"https://community.canvaslms.com/t5/Portugues/tkb-p/canvas-release-portugues"}].map((e=>({...e,lang:"PT_BR"}))),...Bl]},es={brand:"Canvas Mobile",links:[{title:"Mobile Apps (Android)",from:"/canvas/mobile/android",to:"https://play.google.com/store/apps/developer?id=Instructure"},{title:"Mobile Apps (iOS)",from:"/canvas/mobile/ios",to:"https://apps.apple.com/us/developer/instructure-inc/id418441198"},{title:"Release Notes",from:"/canvas/mobile/releases",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Releases/tkb-p/CanvasMobileReleases"},{title:"Guides",from:"/canvas/mobile/guides",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Users/gh-p/mobile"}].map((e=>({...e,lang:"EN"})))},ts="canvas-studio",ns=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${ts}`,rs={brand:"Canvas Studio",links:[{title:"Compliance Package",from:"/canvas/studio/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${ts}.zip`},{title:"Architecture Paper",from:"/canvas/studio/architecture/dl",to:`${ns}/Canvas%20Studio/Canvas%20Studio%20Architecture.pdf`},{title:"HECVAT",from:"/canvas/studio/hecvat/dl",to:`${ns}/Canvas%20Studio/Canvas%20Studio%20HECVAT%20Lite.xlsx`},{title:"Home (HE)",from:"/canvas/studio",to:"https://www.instructure.com/higher-education/products/canvas/canvas-studio/"},{title:"Home (K12)",from:"/canvas/studio/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-studio/"},{title:"VPAT",from:"/canvas/studio/vpat",to:"https://www.instructure.com/accessibility/canvas/canvas-studio-vpat/"},{title:"Guides",from:"/canvas/studio/guides",to:"https://community.canvaslms.com/t5/Canvas-Studio/ct-p/studio_guides"},{title:"Release Notes",from:"/canvas/studio/releases",to:"https://community.canvaslms.com/t5/Studio-Releases/ct-p/studio_releases"},{title:"API",from:"/canvas/studio/api",to:"https://canvas.instructuremedia.com/api/public/docs/#/"}].map((e=>({...e,lang:"EN"})))},as=[{title:"Gemeinschaft",from:"/de/canvas/gemeinschaft",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}].map((e=>({...e,lang:"DE"}))),os={brand:"Canvas",links:[...[{title:"Security Audit Report",from:"/canvas/audit/dl",to:`${`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/canvas-lms`}/Canvas%20LMS/Canvas%20Security%20Audit%20Report.pdf`},{title:"Try Canvas (FFT)",from:"/canvas/try",to:"https://www.instructure.com/try-canvas"},{title:"Community",from:"/canvas/community",to:"https://community.canvaslms.com/t5/Canvas/ct-p/canvas"},{title:"Roadmap",from:"/canvas/roadmap",to:"https://community.canvaslms.com/t5/Canvas-Product-Roadmap/ct-p/canvas-product-roadmap"},{title:"Ideas",from:"/canvas/ideas",to:"https://community.canvaslms.com/t5/Canvas-Ideas-and-Themes/ct-p/canvas-ideas-themes?tab=identified"}].map((e=>({...e,lang:"EN"}))),...[{title:"Communidad",from:"/es-la/canvas/lms/communidad",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"}].map((e=>({...e,lang:"ES_LA"}))),...[{title:"Comunidade",from:"/pt-br/canvas/comunidade",to:"https://community.canvaslms.com/t5/Recursos-em-Portugu%C3%AAs-Portuguese/ct-p/portuguese_resources"}].map((e=>({...e,lang:"PT_BR"}))),...as]},is={brand:"Elevate Data Quality",links:[{title:"Home",from:"/elevate/dataquality",to:"https://www.instructure.com/k12/products/elevate/elevate-data-quality/"},{title:"Guides",from:"/elevate/dataquality/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Quality/ct-p/certify"}].map((e=>({...e,lang:"EN"})))},ls={brand:"Elevate Data Sync",links:[{title:"Guides",from:"/elevate/datasync/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Sync/ct-p/elevate_data_sync"}].map((e=>({...e,lang:"EN"})))},ss="elevate-standards-alignment",us={brand:"Elevate Standards Alignment",links:[{title:"Compliance Package",from:"/elevate/standards-alignment/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${ss}.zip`},{title:"HECVAT Lite",from:"/elevate/standards-alignment/hecvat/dl",to:`${`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${ss}`}/Elevate%20Standards%20Alignment/Elevate%20Standards%20Alignment%20HECVAT%20Lite.xlsx`},{title:"Home",from:"/elevate/standards-alignment",to:"https://www.instructure.com/corporate-education/products/elevate/elevate-standards-alignment"},{title:"Release Notes",from:"/elevate/standards-alignment/releases",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/esa_releases"},{title:"Guides",from:"/elevate/standards-alignment/guides",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/ab_basics"},{title:"Standards",from:"/elevate/standards-alignment/standards",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/ct-p/ab_standards"}].map((e=>({...e,lang:"EN"})))},cs={brand:"Elevate",links:[{title:"Community",from:"/elevate/community",to:"https://community.canvaslms.com/t5/Elevate/ct-p/elevate"},{title:"Roadmap",from:"/elevate/roadmap",to:"https://community.canvaslms.com/t5/Elevate-Product-Roadmap/ct-p/elevate-product-roadmap"}].map((e=>({...e,lang:"EN"})))},ds="impact",fs=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${ds}`,ps=[{title:"Compliance Package",from:"/impact/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${ds}.zip`},{title:"Architecture Paper",from:"/impact/architecture/dl",to:`${fs}/Impact/Impact%20Architecture.pdf`},{title:"HECVAT",from:"/impact/hecvat/dl",to:`${fs}/Impact/Impact%20by%20Instructure%20HECVAT%20Full.xlsx`},{title:"TX-RAMP Level 2 Certification",from:"/impact/tx-ramp/dl",to:`${fs}/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf`},{title:"Home (HE)",from:"/impact/he",to:"https://www.instructure.com/higher-education/products/impact/"},{title:"Home (K12)",from:"/impact/k12",to:"https://www.instructure.com/k12/products/impact/"},{title:"Community",from:"/impact/community",to:"https://community.canvaslms.com/t5/Impact/ct-p/impact"},{title:"Guides",from:"/impact/guides",to:"https://community.canvaslms.com/t5/Impact-Guides/tkb-p/impact_guides"},{title:"Release Notes",from:"/impact/releases",to:"https://community.canvaslms.com/t5/Impact-Releases/ct-p/impact_releases"}].map((e=>({...e,lang:"EN"}))),ms="impact-ES_LA",hs=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${ms}`,vs=[{title:"Compliance Package",from:"/es-la/impact/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${ms}.zip`},{title:"Papel de Arquitectura",from:"/es-la/impact/arquitectura/dl",to:`${hs}/Impact/Impact%20Architecture_ES.pdf`},{title:"HECVAT",from:"/es-la/impact/hecvat/dl",to:`${hs}/Impact/Impact%20by%20Instructure%20HECVAT%20Full.xlsx`},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/impact/tx-ramp/dl",to:`${hs}/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf`}].map((e=>({...e,lang:"ES_LA"}))),gs="impact-PT_BR",ys=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${gs}`,bs={brand:"Impact",links:[...ps,...vs,...[{title:"Compliance Package",from:"/pt-br/impact/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${gs}.zip`},{title:"Papel de Arquitetura",from:"/pt-br/impact/arquitetura/dl",to:`${ys}/Impact/Impact%20Architecture_PT.pdf`},{title:"HECVAT",from:"/pt-br/impact/hecvat/dl",to:`${ys}/Impact/Impact%20by%20Instructure%20HECVAT%20Full.xlsx`},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/impact/tx-ramp/dl",to:`${ys}/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf`}].map((e=>({...e,lang:"PT_BR"})))]},ws=[{title:"Startseite",from:"/de/home",to:"https://www.instructure.com/de"},{title:"Kontakt",from:"/de/kontakt",to:"https://www.instructure.com/de/contact-us"}].map((e=>({...e,lang:"DE"}))),Ss=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Cl.branch}`,ks={brand:"Instructure",links:[...[{title:"Security White Paper",from:"/security/dl",to:`${Ss}/Instructure/Instructure%20Security%20Overview.pdf`},{title:"Business Continuity White Paper",from:"/bc/dl",to:`${Ss}/Instructure/Instructure%20Business%20Continuity%20%26%20Disaster%20Recovery.pdf`},{title:"CAIQ",from:"/caiq/dl",to:`${Ss}/Instructure/Instructure%20ESG%20Report%20FY2023.pdf`},{title:"CSA Star Certificate",from:"/csa/dl",to:`${Ss}/Instructure/Instructure%20CSA%20STAR%20Certificate.pdf`},{title:"Cyber Essentials+ Certificate",from:"/ce/dl",to:`${Ss}/Instructure/Instructure%20Cyber%20Essentials%20Plus.pdf`},{title:"Environmental, Social, and Governance Report",from:"/esg/dl",to:`${Ss}/Instructure/Instructure%20ESG%20Report%20FY2023.pdf`},{title:"Instructure, Inc. Certificate of Insurance",from:"/coi/dl",to:`${Ss}/Instructure/Instructure%20Inc%20COI.pdf`},{title:"Instructure Global Certificate of Insurance",from:"/coi-global/dl",to:`${Ss}/Instructure/Instructure%20Global%20COI.pdf`},{title:"ISO 27001 Certificate",from:"/iso/dl",to:`${Ss}/Instructure/Instructure%20ISO%2027001%20Compliance%20Certificate.pdf`},{title:"Quality Assurance Program",from:"/qa/dl",to:`${Ss}/Instructure/Instructure%20Quality%20Assurance%20Program.pdf`},{title:"Home",from:"/home",to:"https://www.instructure.com/"},{title:"Roadmap",from:"/roadmap",to:"https://community.canvaslms.com/t5/Instructure-Roadmap/ct-p/instructure-roadmap/"},{title:"Accessibility",from:"/a11y",to:"https://www.instructure.com/accessibility/"},{title:"Contact",from:"/contact",to:"https://www.instructure.com/contact-us/"},{title:"Privacy",from:"/privacy",to:"https://www.instructure.com/canvas/privacy/"},{title:"Security",from:"/security",to:"https://www.instructure.com/products/canvas/security/"},{title:"Trust Center",from:"/trust",to:"https://www.instructure.com/trust-center/"},{title:"Community",from:"/community",to:"https://community.canvaslms.com/"},{title:"Terms & Conditions",from:"/tos",to:"https://www.instructure.com/policies/master-terms-conditions/"},{title:"Global Terms & Conditions",from:"/tos/global",to:"https://www.instructure.com/policies/global/master-terms-and-conditions/"},{title:"Acceptable Use Policy",from:"/aup",to:"https://www.instructure.com/policies/acceptable-use/"},{title:"Data Privacy Addendum",from:"/dpa",to:"https://www.instructure.com/policies/data-processing/"},{title:"Third-party Service Providers",from:"/subprocessors",to:"https://community.canvaslms.com/t5/Privacy-Articles/Instructure-s-Third-Party-Processing-Guide/ta-p/606339?attachment-id=10429"},{title:"Investor Relations",from:"/investors",to:"https://ir.instructure.com/overview/default.aspx"},{title:"Status",from:"/status",to:"https://status.instructure.com/"},{title:"CSA Star Registration",from:"/csa",to:"https://cloudsecurityalliance.org/star/registry/instructure/"},{title:"1EdTech Registrations",from:"/1edtech",to:"https://site.imsglobal.org/certifications?query=instructure"},{title:"Our Story",from:"/story",to:"https://www.instructure.com/about/our-story"},{title:"Study Hall",from:"/resources",to:"https://www.instructure.com/resources/"},{title:"EduAppCenter",from:"/apps",to:"https://www.eduappcenter.com/"},{title:"ESG Report (online)",from:"/esg",to:"https://instructure.com/esg-report"}].map((e=>({...e,lang:"EN"}))),...[{title:"Página de inicio",from:"/es-la/home",to:"https://www.instructure.com/es/"},{title:"Contáctenos",from:"/es-la/contactenos",to:"https://www.instructure.com/es/contactenos/"},{title:"Privacidad",from:"/es-la/privicidad",to:"https://www.instructure.com/es/canvas/privacidad/"},{title:"Seguridad",from:"/es-la/seguridad",to:"https://www.instructure.com/es/canvas/seguridad/"},{title:"Nuestra Historia",from:"/es-la/historia",to:"https://www.instructure.com/es/sobre/nuestra-historia"}].map((e=>({...e,lang:"ES_LA"}))),...[{title:"Pagina inicial",from:"/pt-br/home",to:"https://www.instructure.com/pt-br/"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Privacidade",from:"/pt-br/privacidade",to:"https://www.instructure.com/pt-br/canvas/privacidade/"},{title:"Segurança",from:"/pt-br/seguranca",to:"https://www.instructure.com/pt-br/canvas/seguranca/"},{title:"Nossa História",from:"/pt-br/historia",to:"https://www.instructure.com/pt-br/sobre/nossa-historia"}].map((e=>({...e,lang:"PT_BR"}))),...ws]},Cs="intelligent-insights",xs=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Cs}`,Es={brand:"Intelligent Insights",links:[{title:"Compliance Package",from:"/intelligent-insights/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Cs}.zip`},{title:"Architecture Paper",from:"/intelligent-insights/architecture/dl",to:`${xs}/Intelligent%20Insights/Intelligent%20Insights%20Architecture%20Overview.pdf`},{title:"HECVAT",from:"/intelligent-insights/hecvat/dl",to:`${xs}/Intelligent%20Insights/Intelligent%20Insights%20HECVAT%20Lite.xlsx`},{title:"Data Sheet",from:"/intelligent-insights/data/dl",to:`${xs}/Intelligent%20Insights/Intelligent%20Insights%20Data%20Sheet.pdf`},{title:"Home",from:"/intelligent-insights/home",to:"https://www.instructure.com/products/intelligent-insights"},{title:"Community",from:"/intelligent-insights/community",to:"https://community.canvaslms.com/t5/Intelligent-Insights/ct-p/intelligent_insights"},{title:"Guides",from:"/intelligent-insights/guides",to:"https://community.canvaslms.com/t5/Intelligent-Insights-Guides/tkb-p/intelligent_insights_guides"},{title:"Release Notes",from:"/intelligent-insights/releases",to:"https://community.canvaslms.com/t5/Intelligent-Insight-Release/tkb-p/intelligent_insights_releases"}].map((e=>({...e,lang:"EN"})))},Ps="learnplatform",_s=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Ps}`,Ts={brand:"Learnplatform",links:[{title:"Compliance Package",from:"/learnplatform/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Ps}.zip`},{title:"EdTech Top 40 Report",from:"/learnplatform/top40/dl",to:`${_s}/LearnPlatform/EdTech%20Top%2040.pdf`},{title:"Architecture Paper",from:"/learnplatform/architecture/dl",to:`${_s}/LearnPlatform/LearnPlatform%20Architecture%20Overview.pdf`},{title:"HECVAT Lite",from:"/learnplatform/hecvat/dl",to:`${_s}/LearnPlatform/LearnPlatform%20HECVAT%20Lite.xlsx`},{title:"Home",from:"/learnplatform",to:"https://www.instructure.com/k12/products/learnplatform/"},{title:"Terms of Service",from:"/learnplatform/tos",to:"https://www.instructure.com/policies/learnplatform-terms-of-service/"},{title:"Privacy",from:"/learnplatform/privacy",to:"https://www.instructure.com/policies/privacy-learnplatform/"},{title:"Data Processing Agreement",from:"/learnplatform/dpa",to:"https://www.instructure.com/policies/learnplatform-data-processing-agreement/"},{title:"Statement of Neutrality",from:"/learnplatform/neutrality",to:"https://www.instructure.com/policies/learnplatform-neutrality/"},{title:"Utah BOE",from:"/learnplatform/utah",to:"https://www.instructure.com/k12/products/learnplatform/"}].map((e=>({...e,lang:"EN"})))},Rs="mastery-connect",As=`${`${Cl.raw}/${Cl.owner}/${Cl.repo}`}/${Rs}`,Ls={brand:"Mastery Connect",links:[{title:"Compliance Package",from:"/mastery/connect/dl",to:`${`${Cl.gh}/${Cl.owner}/${Cl.repo}/archive/refs/heads`}/${Rs}.zip`},{title:"Architecture Paper",from:"/mastery/connect/architecture/dl",to:`${As}/Mastery%20Connect/Mastery%20Connect%20Architecture.pdf`},{title:"HECVAT Lite",from:"/mastery/connect/hecvat/dl",to:`${As}/Mastery%20Connect/Mastery%20Connect%20HECVAT%20Lite.xlsx`},{title:"Home",from:"/mastery/connect",to:"https://www.instructure.com/k12/products/mastery/mastery-connect"},{title:"Guides",from:"/mastery/connect/guides",to:"https://community.canvaslms.com/t5/Mastery-Connect/ct-p/masteryconnect"},{title:"Release Notes",from:"/mastery/connect/releases",to:"https://community.canvaslms.com/t5/Mastery-Connect-Releases/tkb-p/masteryconnect"},{title:"API",from:"/mastery/connect/api",to:"https://docs.google.com/document/d/19TxyeRzF6nyJDY6ej2dZozbE87JdUygw"},{title:"Mobile App (Android)",from:"/mastery/connect/android",to:"https://play.google.com/store/apps/dev?id=8869528477632015729&hl=EN&gl=US"},{title:"Mobile App (iOS)",from:"/canvas/lms/ios",to:"https://apps.apple.com/us/developer/masteryconnect/id413937396"}].map((e=>({...e,lang:"EN"})))},Os={brand:"Mastery Item Bank",links:[{title:"Home",from:"/mastery/itembank",to:"https://www.instructure.com/k12/products/mastery/mastery-item-bank/"},{title:"Guides",from:"/mastery/itembank/guides",to:"https://community.canvaslms.com/t5/Mastery-Item-Bank/ct-p/mastery-item-bank/"}].map((e=>({...e,lang:"EN"})))},zs={brand:"Mastery View Assessments",links:[{title:"Formatives Home",from:"/mastery/view/formative",to:"https://www.instructure.com/k12/products/mastery/mastery-view-formative-assessments/"},{title:"Predictives Home",from:"/mastery/view/predictive",to:"https://www.instructure.com/k12/products/mastery/mastery-view-predictive-assessments/"}].map((e=>({...e,lang:"EN"})))},$s=[Rl,ks,os,Jl,es,rs,Ol,zl,Wl,Ul,{brand:"Mastery",links:[{title:"Community",from:"/mastery/community",to:"https://community.canvaslms.com/t5/Mastery/ct-p/mastery"},{title:"Roadmap",from:"/mastery/roadmap",to:"https://community.canvaslms.com/t5/Mastery-Product-Roadmap/ct-p/mastery-product-roadmap"}].map((e=>({...e,lang:"EN"})))},Ls,Os,zs,bs,cs,us,is,ls,Ts,Es,{brand:"Parchment",links:[].map((e=>({...e,lang:"EN"})))}];si.use({overrides:{typography:{fontFamily:'LatoWeb, "Lato Extended", Lato, "Helvetica Neue", Helvetica, Arial, sans-serif'}}});const Ms=document.getElementById("root");if(!Ms)throw new Error("Root element not found");const Ns=async()=>{let e={mode:"App"};if(!kl()){const t=await function(){const e={mode:"LTI",lti:{"lti.getPageSettings":null,"lti.capabilities":null}};return new Promise((t=>{const n=t=>{const{message_id:n}=t.data;e.lti[n]=t.data};window.addEventListener("message",n);for(const a of Object.keys(e.lti))window.parent.postMessage({subject:a,message_id:a},"*");const r=()=>{Object.values(e.lti).every((e=>null!==e))?(window.removeEventListener("message",n),t(e)):setTimeout(r,50)};r()}))}();null!==t?.lti?.["lti.getPageSettings"]&&(e=t)}return e},Is=({config:e})=>{const t=[];for(const a of _l)t.push({path:`${a.route}`,lazy:()=>n((()=>import("./markdownBrand-spFPku_C.js")),__vite__mapDeps([0,1,2,3,4])),loader:()=>({readme:a.readme,brand:a.brandName,config:e}),children:[{path:":language",lazy:()=>n((()=>import("./markdownBrand-spFPku_C.js")),__vite__mapDeps([0,1,2,3,4])),loader:()=>({readme:a.readme,brand:a.brandName,config:e})}]});for(const a of $s)for(const r of a.links)t.push({path:r.from,lazy:()=>n((()=>import("./redirectTo-BMbIAl3G.js")),__vite__mapDeps([5,1,6,4,7])),loader:()=>({path:r.from,brand:a.brand,url:r.to,config:e}),children:[{path:":language",lazy:()=>n((()=>import("./redirectTo-BMbIAl3G.js")),__vite__mapDeps([5,1,6,4,7])),loader:()=>({path:r.from,brand:a.brand,url:r.to,config:e})}]});t.push({path:"/links",lazy:()=>n((()=>import("./links-Dq9wk-i1.js")),__vite__mapDeps([8,1,9,3,10])),loader:()=>({config:e}),children:[{path:":language",lazy:()=>n((()=>import("./links-Dq9wk-i1.js")),__vite__mapDeps([8,1,9,3,10])),loader:()=>({config:e})}]}),t.push({path:"/mdui",lazy:()=>n((()=>import("./mdui-CXb1k3ot.js")),__vite__mapDeps([11,2,1,3,12,10])),loader:()=>({config:e}),children:[{path:":language",lazy:()=>n((()=>import("./mdui-CXb1k3ot.js")),__vite__mapDeps([11,2,1,3,12,10])),loader:()=>({config:e})}]}),t.push({path:"/releases",lazy:()=>n((()=>import("./releases-0LoTboBN.js")),__vite__mapDeps([13,2,1,3,14])),loader:()=>({config:e}),children:[{path:":language",lazy:()=>n((()=>import("./releases-0LoTboBN.js")),__vite__mapDeps([13,2,1,3,14])),loader:()=>({config:e})}]}),t.push({path:"*",lazy:()=>n((()=>import("./error-CbdNqE21.js")),__vite__mapDeps([15,1,6,4,7])),loader:()=>({config:e}),children:[{path:":language",lazy:()=>n((()=>import("./error-CbdNqE21.js")),__vite__mapDeps([15,1,6,4,7])),loader:()=>({config:e})}]});const r=function(e){return We({basename:void 0,future:an({},void 0,{v7_prependBasename:!0}),history:X({window:void 0}),hydrationData:ln(),routes:e,mapRouteProperties:rn,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}(t);return p.jsx(k.StrictMode,{children:p.jsx(Ii,{as:"div",minHeight:"100vh",position:"relative",className:e.mode.toLowerCase(),children:p.jsx(hn,{router:r})})})},Ds=()=>{const e=w.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={mode:"LTI"},e[0]=t):t=e[0];const[n,r]=S.useState(t);let a,o,i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{Ns().then((e=>{r(e),console.info("Config:",e)})).catch((e=>{console.error("Error initiating config:",e)}))},o=[],e[1]=a,e[2]=o):(a=e[1],o=e[2]),S.useEffect(a,o),e[3]!==n?(i=n?p.jsx(Is,{config:n}):p.jsxs(Ii,{as:"div",textAlign:"center",children:[p.jsx(pl,{level:"h1",as:"h1",margin:"0 0 x-small",children:"Loading..."}),p.jsx(Sl,{renderTitle:"Loading",size:"medium"})]}),e[3]=n,e[4]=i):i=e[4],i};H.createRoot(Ms).render(p.jsx(S.StrictMode,{children:p.jsx(Ds,{})}));export{ao as $,Ae as A,Ua as B,Wa as C,Ba as D,qa as E,Va as F,io as G,pl as H,oo as I,Xa as J,Uo as K,$s as L,Na as M,si as N,po as O,_l as P,oa as Q,k as R,Yi as S,bi as T,vo as U,Ii as V,B as W,Oa as X,fa as Y,za as Z,n as _,w as a,kl as a0,il as a1,wn as a2,a as a3,Wo as a4,Bo as a5,zo as a6,ba as a7,ki as a8,Si as a9,Sl as aa,Bi as ab,rl as ac,al as ad,ol as ae,ll as af,El as b,U as c,W as d,Ht as e,Pl as f,Cl as g,_a as h,xa as i,p as j,so as k,da as l,r as m,Ta as n,Ya as o,no as p,ro as q,S as r,Ka as s,Ti as t,Zt as u,lo as v,di as w,Ea as x,Ha as y,Jt as z}; diff --git a/assets/index-BDfvr0fn.js b/assets/index-H8vdBuKt.js similarity index 99% rename from assets/index-BDfvr0fn.js rename to assets/index-H8vdBuKt.js index 99080d8..d49d5e2 100644 --- a/assets/index-BDfvr0fn.js +++ b/assets/index-H8vdBuKt.js @@ -1 +1 @@ -import{m as e,R as t}from"./index-CrryxQyl.js";var r,n={exports:{}};function i(){return r||(r=1,n.exports=function(){var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=n||i||o,l=a&&(n?document.documentMode||6:+(o||i)[1]),s=!o&&/WebKit\//.test(e),u=s&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\/(\d+)/.exec(e),d=c&&+c[1],h=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),m=/PhantomJS/.test(e),g=f&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),y=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),x=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),k=/win/i.test(t),w=h&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,s=!0);var C=x&&(u||h&&(null==w||w<12.11)),S=r||a&&l>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var M,T=function(e,t){var r=e.className,n=L(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function A(e,t){return D(e).appendChild(t)}function F(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(P=function(e){try{e.select()}catch(t){}});var U=function(){this.id=null,this.f=null,this.time=0,this.handler=R(this.onTimeout,this)};function K(e,t){for(var r=0;r=t)return n+Math.min(a,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var Q=[""];function J(e){for(;Q.length<=e;)Q.push(ee(Q)+" ");return Q[e]}function ee(e){return e[e.length-1]}function te(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||oe.test(e))}function le(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ae(e))||t.test(e):ae(e)}function se(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ue=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ce(e){return e.charCodeAt(0)>=768&&ue.test(e)}function de(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function fe(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;ot||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var pe=null;function me(e,t,r){var n;pe=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:pe=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:pe=i)}return null!=n?n:pe}var ge=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(r){return r<=247?e.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?t.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var c=e.length,d=[],h=0;h-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function we(e,t){var r=be(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function Me(e){e.prototype.on=function(e,t){xe(this,e,t)},e.prototype.off=function(e,t){ke(this,e,t)}}function Te(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function De(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ae(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Fe(e){Te(e),De(e)}function Ne(e){return e.target||e.srcElement}function Oe(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),x&&e.ctrlKey&&1==t&&(t=3),t}var Ee,ze,We=function(){if(a&&l<9)return!1;var e=F("div");return"draggable"in e||"dragDrop"in e}();function Pe(e){if(null==Ee){var t=F("span","​");A(e,F("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ee=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var r=Ee?F("span","​"):F("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function He(e){if(null!=ze)return ze;var t=A(e,document.createTextNode("AخA")),r=M(t,0,1).getBoundingClientRect(),n=M(t,1,2).getBoundingClientRect();return D(e),!(!r||r.left==r.right)&&(ze=n.right-r.right<3)}var Ie,je=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Be=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(Ie){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(Ie){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Re="oncopy"in(Ie=F("div"))||(Ie.setAttribute("oncopy","return;"),"function"==typeof Ie.oncopy),qe=null;function Ve(e){if(null!=qe)return qe;var t=A(e,F("span","x")),r=t.getBoundingClientRect(),n=M(t,0,1).getBoundingClientRect();return qe=Math.abs(r.left-n.left)>1}var Ue={},Ke={};function $e(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ue[e]=t}function Ge(e,t){Ke[e]=t}function _e(e){if("string"==typeof e&&Ke.hasOwnProperty(e))e=Ke[e];else if(e&&"string"==typeof e.name&&Ke.hasOwnProperty(e.name)){var t=Ke[e.name];"string"==typeof t&&(t={name:t}),(e=ie(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return _e("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return _e("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Xe(e,t){t=_e(t);var r=Ue[t.name];if(!r)return Xe(e,"text/plain");var n=r(e,t);if(Ye.hasOwnProperty(t.name)){var i=Ye[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var Ye={};function Ze(e,t){q(t,Ye.hasOwnProperty(e)?Ye[e]:Ye[e]={})}function Qe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Je(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function et(e,t,r){return!e.startState||e.startState(t,r)}var tt=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function rt(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?ct(r,rt(e,r).text.length):yt(t,rt(e,t.line).text.length)}function yt(e,t){var r=e.ch;return null==r||r>t?ct(e.line,t):r<0?ct(e.line,0):e}function xt(e,t){for(var r=[],n=0;n=this.string.length},tt.prototype.sol=function(){return this.pos==this.lineStart},tt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},tt.prototype.next=function(){if(this.post},tt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},tt.prototype.skipToEnd=function(){this.pos=this.string.length},tt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},tt.prototype.backUp=function(e){this.pos-=e},tt.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},tt.prototype.current=function(){return this.string.slice(this.start,this.pos)},tt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},tt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},tt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var bt=function(e,t){this.state=e,this.lookAhead=t},kt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function wt(e,t,r,n){var i=[e.state.modeGen],o={};Nt(e,t.text,e.doc.mode,r,(function(e,t){return i.push(e,t)}),o,n);for(var a=r.state,l=function(n){r.baseTokens=i;var l=e.state.overlays[n],s=1,u=0;r.state=!0,Nt(e,t.text,l.mode,r,(function(e,t){for(var r=s;ue&&i.splice(s,1,e,i[s+1],n),s+=2,u=Math.min(e,n)}if(t)if(l.opaque)i.splice(r,s-r,e,"overlay "+t),s=r+2;else for(;re.options.maxHighlightLength&&Qe(e.doc.mode,n.state),o=wt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function St(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new kt(n,!0,t);var o=Ot(e,t,r),a=o>n.first&&rt(n,o-1).stateAfter,l=a?kt.fromSaved(n,a,o):new kt(n,et(n.mode),o);return n.iter(o,t,(function(r){Lt(e,r.text,l);var n=l.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}kt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},kt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},kt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},kt.fromSaved=function(e,t,r){return t instanceof bt?new kt(e,Qe(e.mode,t.state),r,t.lookAhead):new kt(e,Qe(e.mode,t),r)},kt.prototype.save=function(e){var t=!1!==e?Qe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new bt(t,this.maxLookAhead):t};var Dt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function At(e,t,r,n){var i,o,a=e.doc,l=a.mode,s=rt(a,(t=vt(a,t)).line),u=St(e,t.line,r),c=new tt(s.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pose.options.maxHighlightLength?(l=!1,a&&Lt(e,t,n,d.pos),d.pos=t.length,s=null):s=Ft(Tt(r,d,n.state,h),o),h){var f=h[0].name;f&&(s="m-"+(s?f+" "+s:f))}if(!l||c!=s){for(;ua;--l){if(l<=o.first)return o.first;var s=rt(o,l-1),u=s.stateAfter;if(u&&(!r||l+(u instanceof bt?u.lookAhead:0)<=o.modeFrontier))return l;var c=V(s.text,null,e.options.tabSize);(null==i||n>c)&&(i=l-1,n=c)}return i}function Et(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var i=rt(e,n).stateAfter;if(i&&(!(i instanceof bt)||n+i.lookAhead=t:o.to>t);(n||(n=[])).push(new It(a,o.from,l?null:o.to))}}return n}function Vt(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&l)for(var x=0;x0)){var c=[s,1],d=dt(u.from,l.from),h=dt(u.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:l.from}),(h>0||!a.inclusiveRight&&!h)&&c.push({from:l.to,to:u.to}),i.splice.apply(i,c),s+=c.length-3}}return i}function Gt(e){var t=e.markedSpans;if(t){for(var r=0;rt)&&(!r||Zt(r,o.marker)<0)&&(r=o.marker)}return r}function rr(e,t,r,n,i){var o=rt(e,t),a=Wt&&o.markedSpans;if(a)for(var l=0;l=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?dt(u.to,r)>=0:dt(u.to,r)>0)||c>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?dt(u.from,n)<=0:dt(u.from,n)<0)))return!0}}}function nr(e){for(var t;t=Jt(e);)e=t.find(-1,!0).line;return e}function ir(e){for(var t;t=er(e);)e=t.find(1,!0).line;return e}function or(e){for(var t,r;t=er(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function ar(e,t){var r=rt(e,t),n=nr(r);return r==n?t:at(n)}function lr(e,t){if(t>e.lastLine())return t;var r,n=rt(e,t);if(!sr(e,n))return t;for(;r=er(n);)n=r.find(1,!0).line;return at(n)+1}function sr(e,t){var r=Wt&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var fr=function(e,t,r){this.text=e,_t(this,t),this.height=r?r(this):1};function pr(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Gt(e),_t(e,r);var i=n?n(e):1;i!=e.height&&ot(e,i)}function mr(e){e.parent=null,Gt(e)}fr.prototype.lineNo=function(){return at(this)},Me(fr);var gr={},vr={};function yr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?vr:gr;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function xr(e,t){var r=N("span",null,null,s?"padding-right: .1px":null),n={pre:N("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;n.pos=0,n.addToken=kr,He(e.display.measure)&&(a=ve(o,e.doc.direction))&&(n.addToken=Cr(n.addToken,a)),n.map=[],Lr(o,n,Ct(e,o,t!=e.display.externalMeasured&&at(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=W(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=W(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Pe(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var l=n.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return we(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=W(n.pre.className,n.textClass||"")),n}function br(e){var t=F("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function kr(e,t,r,n,i,o,s){if(t){var u,c=e.splitSpaces?wr(t,e.trailingSpace):t,d=e.cm.state.specialChars,h=!1;if(d.test(t)){u=document.createDocumentFragment();for(var f=0;;){d.lastIndex=f;var p=d.exec(t),m=p?p.index-f:t.length-f;if(m){var g=document.createTextNode(c.slice(f,f+m));a&&l<9?u.appendChild(F("span",[g])):u.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!p)break;f+=m+1;var v=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,x=y-e.col%y;(v=u.appendChild(F("span",J(x),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=x}else"\r"==p[0]||"\n"==p[0]?((v=u.appendChild(F("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),a&&l<9?u.appendChild(F("span",[v])):u.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),a&&l<9&&(h=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||n||i||h||o||s){var b=r||"";n&&(b+=n),i&&(b+=i);var k=F("span",[u],b,o);if(s)for(var w in s)s.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&k.setAttribute(w,s[w]);return e.content.appendChild(k)}e.content.appendChild(u)}}function wr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&d.from<=u);h++);if(d.to>=c)return e(r,n,i,o,a,l,s);e(r,n.slice(0,d.to-u),i,o,null,l,s),o=null,n=n.slice(d.to-u),u=d.to}}}function Sr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Lr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,l,s,u,c,d,h,f=i.length,p=0,m=1,g="",v=0;;){if(v==p){s=u=c=l="",h=null,d=null,v=1/0;for(var y=[],x=void 0,b=0;bp||w.collapsed&&k.to==p&&k.from==p)){if(null!=k.to&&k.to!=p&&v>k.to&&(v=k.to,u=""),w.className&&(s+=" "+w.className),w.css&&(l=(l?l+";":"")+w.css),w.startStyle&&k.from==p&&(c+=" "+w.startStyle),w.endStyle&&k.to==v&&(x||(x=[])).push(w.endStyle,k.to),w.title&&((h||(h={})).title=w.title),w.attributes)for(var C in w.attributes)(h||(h={}))[C]=w.attributes[C];w.collapsed&&(!d||Zt(d.marker,w)<0)&&(d=k)}else k.from>p&&v>k.from&&(v=k.from)}if(x)for(var S=0;S=f)break;for(var M=Math.min(f,v);;){if(g){var T=p+g.length;if(!d){var D=T>M?g.slice(0,M-p):g;t.addToken(t,D,a?a+s:s,c,p+D.length==v?u:"",l,h)}if(T>=M){g=g.slice(M-p),p=M;break}p=T,c=""}g=i.slice(o,o=r[m++]),a=yr(r[m++],t.cm.options)}}else for(var A=1;A2&&o.push((s.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function rn(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function nn(e,t){var r=at(t=nr(t)),n=e.display.externalMeasured=new Mr(e.doc,t,r);n.lineN=r;var i=n.built=xr(e,n);return n.text=i.pre,A(e.display.lineMeasure,i.pre),n}function on(e,t,r,n){return sn(e,ln(e,t),r,n)}function an(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(i=(o=s-l)-1,t>=s&&(a="right")),null!=i){if(n=e[u+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],a="left";if("right"==r&&i==s-l)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function fn(e,t,r,n){var i,o=dn(t.map,r,n),s=o.node,u=o.start,c=o.end,d=o.collapse;if(3==s.nodeType){for(var h=0;h<4;h++){for(;u&&ce(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c0&&(d=n="right"),i=e.options.lineWrapping&&(f=s.getClientRects()).length>1?f["right"==n?f.length-1:0]:s.getBoundingClientRect()}if(a&&l<9&&!u&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+Wn(e.display),top:p.top,bottom:p.bottom}:cn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,x=0;x=n.text.length?(s=n.text.length,u="before"):s<=0&&(s=0,u="after"),!l)return a("before"==u?s-1:s,"before"==u);function c(e,t,r){return a(r?e-1:e,1==l[t].level!=r)}var d=me(l,s,u),h=pe,f=c(s,d,"before"==u);return null!=h&&(f.other=c(s,h,"before"!=u)),f}function Ln(e,t){var r=0;t=vt(e.doc,t),e.options.lineWrapping||(r=Wn(e.display)*t.ch);var n=rt(e.doc,t.line),i=cr(n)+Xr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Mn(e,t,r,n,i){var o=ct(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function Tn(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return Mn(n.first,0,null,-1,-1);var i=lt(n,r),o=n.first+n.size-1;if(i>o)return Mn(n.first+n.size-1,rt(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=rt(n,i);;){var l=Nn(e,a,i,t,r),s=tr(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var u=s.find(1);if(u.line==i)return u;a=rt(n,i=u.line)}}function Dn(e,t,r,n){n-=bn(t);var i=t.text.length,o=he((function(t){return sn(e,r,t-1).bottom<=n}),i,0);return{begin:o,end:i=he((function(t){return sn(e,r,t).top>n}),o,i)}}function An(e,t,r,n){return r||(r=ln(e,t)),Dn(e,t,r,kn(e,t,sn(e,r,n),"line").top)}function Fn(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Nn(e,t,r,n,i){i-=cr(t);var o=ln(e,t),a=bn(t),l=0,s=t.text.length,u=!0,c=ve(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?En:On)(e,t,r,o,c,n,i);l=(u=1!=d.level)?d.from:d.to-1,s=u?d.to:d.from-1}var h,f,p=null,m=null,g=he((function(t){var r=sn(e,o,t);return r.top+=a,r.bottom+=a,!!Fn(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,m=r),!0)}),l,s),v=!1;if(m){var y=n-m.left=b.bottom?1:0}return Mn(r,g=de(t.text,g,1),f,v,n-h)}function On(e,t,r,n,i,o,a){var l=he((function(l){var s=i[l],u=1!=s.level;return Fn(Sn(e,ct(r,u?s.to:s.from,u?"before":"after"),"line",t,n),o,a,!0)}),0,i.length-1),s=i[l];if(l>0){var u=1!=s.level,c=Sn(e,ct(r,u?s.from:s.to,u?"after":"before"),"line",t,n);Fn(c,o,a,!0)&&c.top>a&&(s=i[l-1])}return s}function En(e,t,r,n,i,o,a){var l=Dn(e,t,n,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,d=null,h=0;h=u||f.to<=s)){var p=sn(e,n,1!=f.level?Math.min(u,f.to)-1:Math.max(s,f.from)).right,m=pm)&&(c=f,d=m)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function zn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==un){un=F("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)un.appendChild(document.createTextNode("x")),un.appendChild(F("br"));un.appendChild(document.createTextNode("x"))}A(e.measure,un);var r=un.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),D(e.measure),r||1}function Wn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=F("span","xxxxxxxxxx"),r=F("pre",[t],"CodeMirror-line-like");A(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Pn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;r[l]=o.offsetLeft+o.clientLeft+i,n[l]=o.clientWidth}return{fixedPos:Hn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Hn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function In(e){var t=zn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Wn(e.display)-3);return function(i){if(sr(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(s=rt(e.doc,u.line).text).length==u.ch){var c=V(s,s.length,e.options.tabSize)-s.length;u=ct(u.line,Math.max(0,Math.round((o-Zr(e.display).left)/Wn(e.display))-c))}return u}function Rn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Wt&&ar(e.doc,t)i.viewFrom?Un(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Un(e);else if(t<=i.viewFrom){var o=Kn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Un(e)}else if(r>=i.viewTo){var a=Kn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Un(e)}else{var l=Kn(e,t,t,-1),s=Kn(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(Tr(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Un(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[Rn(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==K(a,r)&&a.push(r)}}}function Un(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Kn(e,t,r,n){var i,o=Rn(e,t),a=e.display.view;if(!Wt||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var l=e.display.viewFrom,s=0;s0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,r+=i}for(;ar(e.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null;r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function $n(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Tr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Tr(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,Rn(e,r)))),n.viewTo=r}function Gn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo||s.to().line0?a:e.defaultCharWidth())+"px"}if(n.other){var l=r.appendChild(F("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=n.other.left+"px",l.style.top=n.other.top+"px",l.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Zn(e,t){return e.top-t.top||e.left-t.left}function Qn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=Zr(e.display),l=a.left,s=Math.max(n.sizerWidth,Jr(e)-n.sizer.offsetLeft)-a.right,u="ltr"==i.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(F("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?s-e:r)+"px;\n height: "+(n-t)+"px"))}function d(t,r,n){var o,a,d=rt(i,t),h=d.text.length;function f(r,n){return Cn(e,ct(t,r),"div",d,n)}function p(t,r,n){var i=An(e,d,null,t),o="ltr"==r==("after"==n)?"left":"right";return f("after"==n?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),o)[o]}var m=ve(d,i.direction);return fe(m,r||0,null==n?h:n,(function(e,t,i,d){var g="ltr"==i,v=f(e,g?"left":"right"),y=f(t-1,g?"right":"left"),x=null==r&&0==e,b=null==n&&t==h,k=0==d,w=!m||d==m.length-1;if(y.top-v.top<=3){var C=(u?b:x)&&w,S=(u?x:b)&&k?l:(g?v:y).left,L=C?s:(g?y:v).right;c(S,v.top,L-S,v.bottom)}else{var M,T,D,A;g?(M=u&&x&&k?l:v.left,T=u?s:p(e,i,"before"),D=u?l:p(t,i,"after"),A=u&&b&&w?s:y.right):(M=u?p(e,i,"before"):l,T=!u&&x&&k?s:v.right,D=!u&&b&&w?l:y.left,A=u?p(t,i,"after"):s),c(M,v.top,T-M,v.bottom),v.bottom0?t.blinker=setInterval((function(){e.hasFocus()||ni(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ei(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ri(e))}function ti(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ni(e))}),100)}function ri(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(we(e,"focus",e,t),e.state.focused=!0,z(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Jn(e))}function ni(e,t){e.state.delayingBlurEvent||(e.state.focused&&(we(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function ii(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,s=0;s.005||m<-.005)&&(ie.display.sizerWidth){var v=Math.ceil(h/Wn(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function oi(e){if(e.widgets)for(var t=0;t=a&&(o=lt(t,cr(rt(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function li(e,t){if(!Ce(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null,o=r.wrapper.ownerDocument;if(t.top+n.top<0?i=!0:t.bottom+n.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),null!=i&&!m){var a=F("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Xr(e.display))+"px;\n height: "+(t.bottom-t.top+Qr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function si(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?ct(t.line,t.ch+1,"before"):t,t=t.ch?ct(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,l=Sn(e,t),s=r&&r!=t?Sn(e,r):l,u=ci(e,i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-n,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+n}),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=u.scrollTop&&(vi(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(xi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}function ui(e,t){var r=ci(e,t);null!=r.scrollTop&&vi(e,r.scrollTop),null!=r.scrollLeft&&xi(e,r.scrollLeft)}function ci(e,t){var r=e.display,n=zn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=en(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Yr(r),s=t.topl-n;if(t.topi+o){var c=Math.min(t.top,(u?l:t.bottom)-o);c!=i&&(a.scrollTop=c)}var d=e.options.fixedGutter?0:r.gutters.offsetWidth,h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-d,f=Jr(e)-r.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.leftf+h-3&&(a.scrollLeft=t.right+(p?0:10)-f),a}function di(e,t){null!=t&&(mi(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function hi(e){mi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function fi(e,t,r){null==t&&null==r||mi(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function pi(e,t){mi(e),e.curOp.scrollToPos=t}function mi(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,gi(e,Ln(e,t.from),Ln(e,t.to),t.margin))}function gi(e,t,r,n){var i=ci(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});fi(e,i.scrollLeft,i.scrollTop)}function vi(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||_i(e,{top:t}),yi(e,t,!0),r&&_i(e),Bi(e,100))}function yi(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function xi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Qi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function bi(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Yr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Qr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var ki=function(e,t,r){this.cm=r;var n=this.vert=F("div",[F("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=F("div",[F("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),xe(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),xe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ki.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},ki.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ki.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ki.prototype.zeroWidthHack=function(){var e=x&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new U,this.disableVert=new U},ki.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,n)}e.style.visibility="",t.set(1e3,n)},ki.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var wi=function(){};function Ci(e,t){t||(t=bi(e));var r=e.display.barWidth,n=e.display.barHeight;Si(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&ii(e),Si(e,bi(e)),r=e.display.barWidth,n=e.display.barHeight}function Si(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}wi.prototype.update=function(){return{bottom:0,right:0}},wi.prototype.setScrollLeft=function(){},wi.prototype.setScrollTop=function(){},wi.prototype.clear=function(){};var Li={native:ki,null:wi};function Mi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Li[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),xe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?xi(e,t):vi(e,t)}),e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}var Ti=0;function Di(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ti,markArrays:null},Ar(e.curOp)}function Ai(e){var t=e.curOp;t&&Nr(t,(function(e){for(var t=0;t=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new qi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Oi(e){e.updatedDisplay=e.mustUpdate&&$i(e.cm,e.update)}function Ei(e){var t=e.cm,r=t.display;e.updatedDisplay&&ii(t),e.barMeasure=bi(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=on(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Qr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Jr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function zi(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var r=+new Date+e.options.workTime,n=St(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(n.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?Qe(t.mode,n.state):null,s=wt(e,o,n,!0);l&&(n.state=l),o.styles=s.styles;var u=o.styleClasses,c=s.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),h=0;!d&&hr)return Bi(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Pi(e,(function(){for(var t=0;t=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Gn(e))return!1;Ji(e)&&(Un(e),t.dims=Pn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFroma&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),Wt&&(o=ar(e.doc,o),a=lr(e.doc,a));var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;$n(e,o,a),r.viewOffset=cr(rt(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=Gn(e);if(!l&&0==s&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=Ui(e);return s>4&&(r.lineDiv.style.display="none"),Xi(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Ki(u),D(r.cursorDiv),D(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Bi(e,400)),r.updateLineNumbers=null,!0}function Gi(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Jr(e))n&&(t.visible=ai(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Yr(e.display)-en(e),r.top)}),t.visible=ai(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!$i(e,t))break;ii(e);var i=bi(e);_n(e),Ci(e,i),Zi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function _i(e,t){var r=new qi(e,t);if($i(e,r)){ii(e),Gi(e,r);var n=bi(e);_n(e),Ci(e,n),Zi(e,n),r.finish()}}function Xi(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function l(t){var r=t.nextSibling;return s&&x&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,d=0;d-1&&(f=!1),Wr(e,h,c,r)),f&&(D(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(ut(e.options,c)))),a=h.node.nextSibling}else{var p=Vr(e,h,c,r);o.insertBefore(p,a)}c+=h.size}for(;a;)a=l(a)}function Yi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Er(e,"gutterChanged",e)}function Zi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Qr(e)+"px"}function Qi(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=Hn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a=105&&(o.wrapper.style.clipPath="inset(0px)"),o.wrapper.setAttribute("translate","no"),a&&l<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),s||r&&y||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=eo(i.gutters,i.lineNumbers),to(o),n.init(o)}qi.prototype.signal=function(e,t){Le(e,t)&&this.events.push(arguments)},qi.prototype.finish=function(){for(var e=0;eu.clientWidth,p=u.scrollHeight>u.clientHeight;if(i&&f||o&&p){if(o&&x&&s)e:for(var m=t.target,g=l.view;m!=u;m=m.parentNode)for(var v=0;v=0&&dt(e,n.to())<=0)return r}return-1};var co=function(e,t){this.anchor=e,this.head=t};function ho(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort((function(e,t){return dt(e.from(),t.from())})),r=K(t,i);for(var o=1;o0:s>=0){var u=mt(l.from(),a.from()),c=pt(l.to(),a.to()),d=l.empty()?a.from()==a.head:l.from()==l.head;o<=r&&--r,t.splice(--o,2,new co(d?c:u,d?u:c))}}return new uo(t,r)}function fo(e,t){return new uo([new co(e,t||e)],0)}function po(e){return e.text?ct(e.from.line+e.text.length-1,ee(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function mo(e,t){if(dt(e,t.from)<0)return e;if(dt(e,t.to)<=0)return po(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=po(t).ch-t.to.ch),ct(r,n)}function go(e,t){for(var r=[],n=0;n1&&e.remove(l.line+1,p-1),e.insert(l.line+1,v)}Er(e,"change",e,t)}function Co(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges?(e.done.pop(),ee(e.done)):void 0}function No(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Fo(i,i.lastOp==n)))a=ee(o.changes),0==dt(t.from,t.to)&&0==dt(t.from,a.to)?a.to=po(t):o.changes.push(Do(e,t));else{var s=ee(i.done);for(s&&s.ranges||zo(e.sel,i.done),o={changes:[Do(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||we(e,"historyAdded")}function Oo(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Eo(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Oo(e,o,ee(i.done),t))?i.done[i.done.length-1]=t:zo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&Ao(i.undone)}function zo(e,t){var r=ee(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Wo(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o}))}function Po(e){if(!e)return null;for(var t,r=0;r-1&&(ee(l)[d]=u[d],delete u[d])}}}return n}function Bo(e,t,r,n){if(n){var i=e.anchor;if(r){var o=dt(t,i)<0;o!=dt(r,i)<0?(i=t,t=r):o!=dt(t,r)<0&&(t=r)}return new co(i,t)}return new co(r||t,t)}function Ro(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Go(e,new uo([Bo(e.sel.primary(),t,r,i)],0),n)}function qo(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:l.to>t.ch))){if(i&&(we(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(r){var d=s.find(n<0?1:-1),h=void 0;if((n<0?c:u)&&(d=ea(e,d,-n,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(h=dt(d,r))&&(n<0?h<0:h>0))return Qo(e,d,t,n,i)}var f=s.find(n<0?-1:1);return(n<0?u:c)&&(f=ea(e,f,n,f.line==t.line?o:null)),f?Qo(e,f,t,n,i):null}}return t}function Jo(e,t,r,n,i){var o=n||1,a=Qo(e,t,r,o,i)||!i&&Qo(e,t,r,o,!0)||Qo(e,t,r,-o,i)||!i&&Qo(e,t,r,-o,!0);return a||(e.cantEdit=!0,ct(e.first,0))}function ea(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?vt(e,ct(t.line-1)):null:r>0&&t.ch==(n||rt(e,t.line)).text.length?t.line=0;--i)ia(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else ia(e,t)}}function ia(e,t){if(1!=t.text.length||""!=t.text[0]||0!=dt(t.from,t.to)){var r=go(e,t);No(e,t,r,e.cm?e.cm.curOp.id:NaN),la(e,t,r,Ut(e,t));var n=[];Co(e,(function(e,r){r||-1!=K(n,e.history)||(ha(e.history,t),n.push(e.history)),la(e,t,null,Ut(e,t))}))}}function oa(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,a=e.sel,l="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,u=0;u=0;--f){var p=h(f);if(p)return p.v}}}}function aa(e,t){if(0!=t&&(e.first+=t,e.sel=new uo(te(e.sel.ranges,(function(e){return new co(ct(e.anchor.line+t,e.anchor.ch),ct(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){qn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ct(o,rt(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=nt(e,t.from,t.to),r||(r=go(e,t)),e.cm?sa(e.cm,t,n):wo(e,t,n),_o(e,r,_),e.cantEdit&&Jo(e,ct(e.firstLine(),0))&&(e.cantEdit=!1)}}function sa(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=at(nr(rt(n,o.line))),n.iter(s,a.line+1,(function(e){if(e==i.maxLine)return l=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&Se(e),wo(n,t,r,In(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,(function(e){var t=dr(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0)),Et(n,o.line),Bi(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?qn(e):o.line!=a.line||1!=t.text.length||ko(e.doc,t)?qn(e,o.line,a.line+1,u):Vn(e,o.line,"text");var c=Le(e,"changes"),d=Le(e,"change");if(d||c){var h={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Er(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function ua(e,t,r,n,i){var o;n||(n=r),dt(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),na(e,{from:r,to:n,text:t,origin:i})}function ca(e,t,r,n){r1||!(this.children[0]instanceof pa))){var l=[];this.collapse(l),this.children=[new pa(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,l=a;l10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=N("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(rr(e,t.line,t,r,o)||t.line!=r.line&&rr(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ht()}o.addToHistory&&No(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l,s=t.line,u=e.cm;if(e.iter(s,r.line+1,(function(n){u&&o.collapsed&&!u.options.lineWrapping&&nr(n)==u.display.maxLine&&(l=!0),o.collapsed&&s!=t.line&&ot(n,0),Rt(n,new It(o,s==t.line?t.ch:null,s==r.line?r.ch:null),e.cm&&e.cm.curOp),++s})),o.collapsed&&e.iter(t.line,r.line+1,(function(t){sr(e,t)&&ot(t,0)})),o.clearOnEnter&&xe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Pt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++xa,o.atomic=!0),u){if(l&&(u.curOp.updateMaxLine=!0),o.collapsed)qn(u,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=r.line;c++)Vn(u,c,"text");o.atomic&&Yo(u.doc),Er(u,"markerAdded",u,o)}return o}ba.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Di(e),Le(this,"clear")){var r=this.find();r&&Er(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&qn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Yo(e.doc)),e&&Er(e,"markerCleared",e,this,n,i),t&&Ai(e),this.parent&&this.parent.clear()}},ba.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;s--)na(this,n[s]);l?$o(this,l):this.cm&&hi(this.cm)})),undo:ji((function(){oa(this,"undo")})),redo:ji((function(){oa(this,"redo")})),undoSelection:ji((function(){oa(this,"undo",!0)})),redoSelection:ji((function(){oa(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=vt(this,e),t=vt(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var l=0;l=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=o,++r})),vt(this,ct(r,t))},indexFromPos:function(e){var t=(e=vt(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),_o(t.doc,fo(r,r)),h)for(var f=0;f=0;t--)ua(e.doc,"",n[t].from,n[t].to,"+delete");hi(e)}))}function Qa(e,t,r){var n=de(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Ja(e,t,r){var n=Qa(e,t.ch,r);return null==n?null:new ct(t.line,n,r<0?"after":"before")}function el(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ve(r,t.doc.direction);if(o){var a,l=i<0?ee(o):o[0],s=i<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var u=ln(t,r);a=i<0?r.text.length-1:0;var c=sn(t,u,a).top;a=he((function(e){return sn(t,u,e).top==c}),i<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=Qa(r,a,1))}else a=i<0?l.to:l.from;return new ct(n,a,s)}}return new ct(n,i<0?r.text.length:0,i<0?"before":"after")}function tl(e,t,r,n){var i=ve(t,e.doc.direction);if(!i)return Ja(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=me(i,r.ch,r.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from=a.from&&h>=c.begin)){var f=d?"before":"after";return new ct(r.line,h,f)}}var p=function(e,t,n){for(var o=function(e,t){return t?new ct(r.line,s(e,1),"before"):new ct(r.line,e,"after")};e>=0&&e0==(1!=a.level),u=l?n.begin:s(n.end,-1);if(a.from<=u&&u0?c.end:s(c.begin,-1);return null==g||n>0&&g==t.text.length||!(m=p(n>0?0:i.length-1,n,u(g)))?null:m}Va.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Va.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Va.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Va.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Va.default=x?Va.macDefault:Va.pcDefault;var rl={selectAll:ta,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),_)},killLine:function(e){return Za(e,(function(t){if(t.empty()){var r=rt(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)i=new ct(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ct(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=rt(e.doc,i.line-1).text;a&&(i=new ct(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),ct(i.line-1,a.length-1),i,"+transpose"))}r.push(new co(i,i))}e.setSelections(r)}))},newlineAndIndent:function(e){return Pi(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n-1&&(dt((i=l.ranges[i]).from(),t)<0||t.xRel>0)&&(dt(i.to(),t)>0||t.xRel<0)?Tl(e,n,t,o):Al(e,n,t,o)}function Tl(e,t,r,n){var i=e.display,o=!1,u=Hi(e,(function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ti(e)),ke(i.wrapper.ownerDocument,"mouseup",u),ke(i.wrapper.ownerDocument,"mousemove",c),ke(i.scroller,"dragstart",d),ke(i.scroller,"drop",u),o||(Te(t),n.addNew||Ro(e.doc,r,null,null,n.extend),s&&!f||a&&9==l?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!n.moveOnDrag,xe(i.wrapper.ownerDocument,"mouseup",u),xe(i.wrapper.ownerDocument,"mousemove",c),xe(i.scroller,"dragstart",d),xe(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Dl(e,t,r){if("char"==r)return new co(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new co(ct(t.line,0),vt(e.doc,ct(t.line+1,0)));var n=r(e,t);return new co(n.from,n.to)}function Al(e,t,r,n){a&&ti(e);var i=e.display,o=e.doc;Te(t);var l,s,u=o.sel,c=u.ranges;if(n.addNew&&!n.extend?(s=o.sel.contains(r),l=s>-1?c[s]:new co(r,r)):(l=o.sel.primary(),s=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(l=new co(r,r)),r=Bn(e,t,!0,!0),s=-1;else{var d=Dl(e,r,n.unit);l=n.extend?Bo(l,d.anchor,d.head,n.extend):d}n.addNew?-1==s?(s=c.length,Go(o,ho(e,c.concat([l]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==n.unit&&!n.extend?(Go(o,ho(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Vo(o,s,l,X):(s=0,Go(o,new uo([l],0),X),u=o.sel);var h=r;function f(t){if(0!=dt(h,t))if(h=t,"rectangle"==n.unit){for(var i=[],a=e.options.tabSize,c=V(rt(o,r.line).text,r.ch,a),d=V(rt(o,t.line).text,t.ch,a),f=Math.min(c,d),p=Math.max(c,d),m=Math.min(r.line,t.line),g=Math.min(e.lastLine(),Math.max(r.line,t.line));m<=g;m++){var v=rt(o,m).text,y=Z(v,f,a);f==p?i.push(new co(ct(m,y),ct(m,y))):v.length>y&&i.push(new co(ct(m,y),ct(m,Z(v,p,a))))}i.length||i.push(new co(r,r)),Go(o,ho(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,b=l,k=Dl(e,t,n.unit),w=b.anchor;dt(k.anchor,w)>0?(x=k.head,w=mt(b.from(),k.anchor)):(x=k.anchor,w=pt(b.to(),k.head));var C=u.ranges.slice(0);C[s]=Fl(e,new co(vt(o,w),x)),Go(o,ho(e,C,s),X)}}var p=i.wrapper.getBoundingClientRect(),m=0;function g(t){var r=++m,a=Bn(e,t,!0,"rectangle"==n.unit);if(a)if(0!=dt(a,h)){e.curOp.focus=E(I(e)),f(a);var l=ai(i,o);(a.line>=l.to||a.linep.bottom?20:0;s&&setTimeout(Hi(e,(function(){m==r&&(i.scroller.scrollTop+=s,g(t))})),50)}}function v(t){e.state.selectingText=!1,m=1/0,t&&(Te(t),i.input.focus()),ke(i.wrapper.ownerDocument,"mousemove",y),ke(i.wrapper.ownerDocument,"mouseup",x),o.history.lastSelOrigin=null}var y=Hi(e,(function(e){0!==e.buttons&&Oe(e)?g(e):v(e)})),x=Hi(e,v);e.state.selectingText=x,xe(i.wrapper.ownerDocument,"mousemove",y),xe(i.wrapper.ownerDocument,"mouseup",x)}function Fl(e,t){var r=t.anchor,n=t.head,i=rt(e.doc,r.line);if(0==dt(r,n)&&r.sticky==n.sticky)return t;var o=ve(i);if(!o)return t;var a=me(o,r.ch,r.sticky),l=o[a];if(l.from!=r.ch&&l.to!=r.ch)return t;var s,u=a+(l.from==r.ch==(1!=l.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)s=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=me(o,n.ch,n.sticky),d=c-a||(n.ch-r.ch)*(1==l.level?-1:1);s=c==u-1||c==u?d<0:d>0}var h=o[u+(s?-1:0)],f=s==(1==h.level),p=f?h.from:h.to,m=f?"after":"before";return r.ch==p&&r.sticky==m?t:new co(new ct(r.line,p,m),n)}function Nl(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(c){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Te(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Le(e,r))return Ae(t);o-=l.top-a.viewOffset;for(var s=0;s=i)return we(e,r,e,lt(e.doc,o),e.display.gutterSpecs[s].className,t),Ae(t)}}function Ol(e,t){return Nl(e,t,"gutterClick",!0)}function El(e,t){_r(e.display,t)||zl(e,t)||Ce(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function zl(e,t){return!!Le(e,"gutterContextMenu")&&Nl(e,t,"gutterContextMenu",!1)}function Wl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),vn(e)}kl.prototype.compare=function(e,t,r){return this.time+bl>e&&0==dt(t,this.pos)&&r==this.button};var Pl={toString:function(){return"CodeMirror.Init"}},Hl={},Il={};function jl(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=Pl&&i(e,t,r)}:i)}e.defineOption=r,e.Init=Pl,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,xo(e)}),!0),r("indentUnit",2,xo,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){bo(e),vn(e),qn(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(ct(n,o))}n++}));for(var i=r.length-1;i>=0;i--)ua(e.doc,t,r[i],ct(r[i].line,r[i].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Pl&&e.refresh()})),r("specialCharPlaceholder",br,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!k),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){Wl(e),ro(e)}),!0),r("keyMap","default",(function(e,t,r){var n=Ya(t),i=r!=Pl&&Ya(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Rl,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=eo(t,e.options.lineNumbers),ro(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Hn(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return Ci(e)}),!0),r("scrollbarStyle","native",(function(e){Mi(e),Ci(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=eo(e.options.gutters,t),ro(e)}),!0),r("firstLineNumber",1,ro,!0),r("lineNumberFormatter",(function(e){return e}),ro,!0),r("showCursorWhenSelecting",!1,_n,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(ni(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Bl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,_n,!0),r("singleCursorHeightPerLine",!0,_n,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,bo,!0),r("addModeClass",!1,bo,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,bo,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}function Bl(e,t,r){if(!t!=!(r&&r!=Pl)){var n=e.display.dragFunctions,i=t?xe:ke;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Rl(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),hr(e)),jn(e),qn(e),vn(e),setTimeout((function(){return Ci(e)}),100)}function ql(e,t){var r=this;if(!(this instanceof ql))return new ql(e,t);this.options=t=t?q(t):{},q(Hl,t,!1);var n=t.value;"string"==typeof n?n=new Da(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new ql.inputStyles[t.inputStyle](this),o=this.display=new no(e,n,i,t);for(var u in o.wrapper.CodeMirror=this,Wl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Mi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new U,keySeq:null,specialChars:null},t.autofocus&&!y&&o.input.focus(),a&&l<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),Vl(this),Pa(),Di(this),this.curOp.forceUpdate=!0,So(this,n),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&ri(r)}),20):ni(this),Il)Il.hasOwnProperty(u)&&Il[u](this,t[u],Pl);Ji(this),t.finishInit&&t.finishInit(this);for(var c=0;c400}xe(t.scroller,"touchstart",(function(i){if(!Ce(e,i)&&!o(i)&&!Ol(e,i)){t.input.ensurePolled(),clearTimeout(r);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),xe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),xe(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!_r(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!n.prev||s(n,n.prev)?new co(a,a):!n.prev.prev||s(n,n.prev.prev)?e.findWordAt(a):new co(ct(a.line,0),vt(e.doc,ct(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Te(r)}i()})),xe(t.scroller,"touchcancel",i),xe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(vi(e,t.scroller.scrollTop),xi(e,t.scroller.scrollLeft,!0),we(e,"scroll",e))})),xe(t.scroller,"mousewheel",(function(t){return so(e,t)})),xe(t.scroller,"DOMMouseScroll",(function(t){return so(e,t)})),xe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){Ce(e,t)||Fe(t)},over:function(t){Ce(e,t)||(Oa(e,t),Fe(t))},start:function(t){return Na(e,t)},drop:Hi(e,Fa),leave:function(t){Ce(e,t)||Ea(e)}};var u=t.input.getField();xe(u,"keyup",(function(t){return gl.call(e,t)})),xe(u,"keydown",Hi(e,pl)),xe(u,"keypress",Hi(e,vl)),xe(u,"focus",(function(t){return ri(e,t)})),xe(u,"blur",(function(t){return ni(e,t)}))}ql.defaults=Hl,ql.optionHandlers=Il;var Ul=[];function Kl(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=St(e,t).state:r="prev");var a=e.options.tabSize,l=rt(o,t),s=V(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u,c=l.text.match(/^\s*/)[0];if(n||/\S/.test(l.text)){if("smart"==r&&((u=o.mode.indent(i,l.text.slice(c.length),l.text))==G||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?V(rt(o,t-1).text,null,a):0:"add"==r?u=s+e.options.indentUnit:"subtract"==r?u=s-e.options.indentUnit:"number"==typeof r&&(u=s+r),u=Math.max(0,u);var d="",h=0;if(e.options.indentWithTabs)for(var f=Math.floor(u/a);f;--f)h+=a,d+="\t";if(ha,s=je(t),u=null;if(l&&n.ranges.length>1)if($l&&$l.text.join("\n")==t){if(n.ranges.length%$l.text.length==0){u=[];for(var c=0;c<$l.text.length;c++)u.push(o.splitLines($l.text[c]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=te(s,(function(e){return[e]})));for(var d=e.curOp.updateInput,h=n.ranges.length-1;h>=0;h--){var f=n.ranges[h],p=f.from(),m=f.to();f.empty()&&(r&&r>0?p=ct(p.line,p.ch-r):e.state.overwrite&&!l?m=ct(m.line,Math.min(rt(o,m.line).text.length,m.ch+ee(s).length)):l&&$l&&$l.lineWise&&$l.text.join("\n")==s.join("\n")&&(p=m=ct(p.line,0)));var g={from:p,to:m,text:u?u[h%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};na(e.doc,g),Er(e,"inputRead",e,g)}t&&!l&&Yl(e,t),hi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Xl(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||Pi(t,(function(){return _l(t,r,0,null,"paste")})),!0}function Yl(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l-1){a=Kl(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(rt(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Kl(e,i.head.line,"smart"));a&&Er(e,"electricInput",e,i.head.line)}}}function Zl(e){for(var t=[],r=[],n=0;nr&&(Kl(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&hi(this));else{var o=i.from(),a=i.to(),l=Math.max(r,o.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s0&&Vo(this.doc,n,new co(o,u[n].to()),_)}}})),getTokenAt:function(e,t){return At(this,e,t)},getLineTokens:function(e,t){return At(this,ct(e),t,!0)},getTokenTypeAt:function(e){e=vt(this.doc,e);var t,r=Ct(this,rt(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]o&&(e=o,i=!0),n=rt(this.doc,e)}else n=e;return kn(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-cr(n):0)},defaultTextHeight:function(){return zn(this.display)},defaultCharWidth:function(){return Wn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,a=(e=Sn(this,vt(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>u&&(l=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&ui(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Ii(pl),triggerOnKeyPress:Ii(vl),triggerOnKeyUp:gl,triggerOnMouseDown:Ii(Cl),execCommand:function(e){if(rl.hasOwnProperty(e))return rl[e].call(null,this)},triggerElectric:Ii((function(e){Yl(this,e)})),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=vt(this.doc,e),a=0;a0&&a(t.charAt(r-1));)--r;for(;n.5||this.options.lineWrapping)&&jn(this),we(this,"refresh",this)})),swapDoc:Ii((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),So(this,e),vn(this),this.display.input.reset(),fi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Er(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Me(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function ts(e,t,r,n,i){var o=t,a=r,l=rt(e,t.line),s=i&&"rtl"==e.direction?-r:r;function u(){var r=t.line+s;return!(r=e.first+e.size)&&(t=new ct(r,t.ch,t.sticky),l=rt(e,r))}function c(o){var a;if("codepoint"==n){var c=l.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(c))a=null;else{var d=r>0?c>=55296&&c<56320:c>=56320&&c<57343;a=new ct(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(d?2:1))),-r)}}else a=i?tl(e.cm,l,t,r):Ja(l,t,r);if(null==a){if(o||!u())return!1;t=el(i,e.cm,l,t.line,s)}else t=a;return!0}if("char"==n||"codepoint"==n)c();else if("column"==n)c(!0);else if("word"==n||"group"==n)for(var d=null,h="group"==n,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(r<0)||c(!p);p=!1){var m=l.text.charAt(t.ch)||"\n",g=le(m,f)?"w":h&&"\n"==m?"n":!h||/\s/.test(m)?null:"p";if(!h||p||g||(g="s"),d&&d!=g){r<0&&(r=1,c(),t.sticky="after");break}if(g&&(d=g),r>0&&!c(!p))break}var v=Jo(e,t,o,a,!0);return ht(o,v)&&(v.hitSide=!0),v}function rs(e,t,r,n){var i,o,a=e.doc,l=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,B(e).innerHeight||a(e).documentElement.clientHeight),u=Math.max(s-.5*zn(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=Tn(e,l,i)).outside;){if(r<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*r}return o}var ns=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new U,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function is(e,t){var r=an(e,t.line);if(!r||r.hidden)return null;var n=rt(e.doc,t.line),i=rn(r,n,t.line),o=ve(n,e.doc.direction),a="left";o&&(a=me(o,t.ch)%2?"right":"left");var l=dn(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function os(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function as(e,t){return t&&(e.bad=!0),e}function ls(e,t,r,n,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function u(e){return function(t){return t.id==e}}function c(){a&&(o+=l,s&&(o+=l),a=s=!1)}function d(e){e&&(c(),o+=e)}function h(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void d(r);var o,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(ct(n,0),ct(i+1,0),u(+f));return void(p.length&&(o=p[0].find(0))&&d(nt(e.doc,o.from,o.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&c();for(var g=0;g=t.display.viewTo||o.line=t.display.viewFrom&&is(t,i)||{node:s[0].measure.map[2],offset:0},c=o.linen.firstLine()&&(a=ct(a.line-1,rt(n.doc,a.line-1).length)),l.ch==rt(n.doc,l.line).text.length&&l.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=Rn(n,a.line))?(t=at(i.view[0].line),r=i.view[0].node):(t=at(i.view[e].line),r=i.view[e-1].node.nextSibling);var s,u,c=Rn(n,l.line);if(c==i.view.length-1?(s=i.viewTo-1,u=i.lineDiv.lastChild):(s=at(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var d=n.doc.splitLines(ls(n,r,u,t,s)),h=nt(n.doc,ct(t,0),ct(s,rt(n.doc,s).text.length));d.length>1&&h.length>1;)if(ee(d)==ee(h))d.pop(),h.pop(),s--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),t++}for(var f=0,p=0,m=d[0],g=h[0],v=Math.min(m.length,g.length);fa.ch&&y.charCodeAt(y.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;d[d.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var k=ct(t,f),w=ct(s,h.length?ee(h).length-p:0);return d.length>1||d[0]||dt(k,w)?(ua(n.doc,d,k,w,"+input"),!0):void 0},ns.prototype.ensurePolled=function(){this.forceCompositionEnd()},ns.prototype.reset=function(){this.forceCompositionEnd()},ns.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ns.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},ns.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Pi(this.cm,(function(){return qn(e.cm)}))},ns.prototype.setUneditable=function(e){e.contentEditable="false"},ns.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Hi(this.cm,_l)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ns.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},ns.prototype.onContextMenu=function(){},ns.prototype.resetPosition=function(){},ns.prototype.needsContentAttribute=!0;var cs=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new U,this.hasSelection=!1,this.composing=null,this.resetting=!1};function ds(e,t){if((t=t?q(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=E(j(e));t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(xe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(Ie){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(ke(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var l=ql((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return l}function hs(e){e.off=ke,e.on=xe,e.wheelEventPixels=lo,e.Doc=Da,e.splitLines=je,e.countColumn=V,e.findColumn=Z,e.isWordChar=ae,e.Pass=G,e.signal=we,e.Line=fr,e.changeEnd=po,e.scrollbarModel=Li,e.Pos=ct,e.cmpPos=dt,e.modes=Ue,e.mimeModes=Ke,e.resolveMode=_e,e.getMode=Xe,e.modeExtensions=Ye,e.extendMode=Ze,e.copyState=Qe,e.startState=et,e.innerMode=Je,e.commands=rl,e.keyMap=Va,e.keyName=Xa,e.isModifierKey=Ga,e.lookupKey=$a,e.normalizeKeyMap=Ka,e.StringStream=tt,e.SharedTextMarker=wa,e.TextMarker=ba,e.LineWidget=ga,e.e_preventDefault=Te,e.e_stopPropagation=De,e.e_stop=Fe,e.addClass=z,e.contains=O,e.rmClass=T,e.keyNames=ja}cs.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!Ce(n,e)){if(n.somethingSelected())Gl({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Zl(n);Gl({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,_):(r.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),xe(i,"input",(function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),xe(i,"paste",(function(e){Ce(n,e)||Xl(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),xe(i,"cut",o),xe(i,"copy",o),xe(e.scroller,"paste",(function(t){if(!_r(e,t)&&!Ce(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),xe(e.lineSpace,"selectstart",(function(t){_r(e,t)||Te(t)})),xe(i,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),xe(i,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},cs.prototype.createField=function(e){this.wrapper=Jl(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Ql(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},cs.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},cs.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Xn(e);if(e.options.moveInputWithCursor){var i=Sn(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},cs.prototype.showSelection=function(e){var t=this.cm.display;A(t.cursorDiv,e.cursors),A(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},cs.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&P(this.textarea),a&&l>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null));this.resetting=!1}},cs.prototype.getField=function(){return this.textarea},cs.prototype.supportsTouch=function(){return!1},cs.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||E(j(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(Ie){}},cs.prototype.blur=function(){this.textarea.blur()},cs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},cs.prototype.receivedFocus=function(){this.slowPoll()},cs.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},cs.prototype.fastPoll=function(){var e=!1,t=this;function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}t.pollingFast=!0,t.polling.set(20,r)},cs.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Be(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(a&&l>=9&&this.hasSelection===i||x&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,u=Math.min(n.length,i.length);s1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},cs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},cs.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},cs.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Bn(r,e),u=n.scroller.scrollTop;if(o&&!h){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&Hi(r,Go)(r.doc,fo(o),_);var c,d=i.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(c=i.ownerDocument.defaultView.scrollY),n.input.focus(),s&&i.ownerDocument.defaultView.scrollTo(null,c),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),a&&l>=9&&g(),S){Fe(e);var m=function(){ke(window,"mouseup",m),setTimeout(v,20)};xe(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=d,a&&l<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart)){(!a||a&&l<9)&&g();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Hi(r,ta)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},cs.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},cs.prototype.setUneditable=function(){},cs.prototype.needsContentAttribute=!1,jl(ql),es(ql);var fs="iter insert remove copy getEditor constructor".split(" ");for(var ps in Da.prototype)Da.prototype.hasOwnProperty(ps)&&K(fs,ps)<0&&(ql.prototype[ps]=function(e){return function(){return e.apply(this.doc,arguments)}}(Da.prototype[ps]));return Me(Da),ql.inputStyles={textarea:cs,contenteditable:ns},ql.defineMode=function(e){ql.defaults.mode||"null"==e||(ql.defaults.mode=e),$e.apply(this,arguments)},ql.defineMIME=Ge,ql.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),ql.defineMIME("text/plain","null"),ql.defineExtension=function(e,t){ql.prototype[e]=t},ql.defineDocExtension=function(e,t){Da.prototype[e]=t},ql.fromTextArea=ds,hs(ql),ql.version="5.65.16",ql}()),n.exports}const o=e(i());var a,l={};function s(){return a||(a=1,e=i(),t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1},e.defineMode("xml",(function(n,i){var o,a,l=n.indentUnit,s={},u=i.htmlMode?t:r;for(var c in u)s[c]=u[c];for(var c in i)s[c]=i[c];function d(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();return"<"==n?e.eat("!")?e.eat("[")?e.match("CDATA[")?r(p("atom","]]>")):null:e.match("--")?r(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(m(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=h,"tag bracket"):"&"==n?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function h(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=d,o=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return o="equals",null;if("<"==r){t.tokenize=d,t.state=b,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=f(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=h;break}return"string"};return t.isInAttribute=!0,t}function p(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=d;break}r.next()}return e}}function m(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=m(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=d;break}return r.tokenize=m(e-1),r.tokenize(t,r)}}return"meta"}}function g(e){return e&&e.toLowerCase()}function v(e,t,r){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=r,(s.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function y(e){e.context&&(e.context=e.context.prev)}function x(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!s.contextGrabbers.hasOwnProperty(g(r))||!s.contextGrabbers[g(r)].hasOwnProperty(g(t)))return;y(e)}}function b(e,t,r){return"openTag"==e?(r.tagStart=t.column(),k):"closeTag"==e?w:b}function k(e,t,r){return"word"==e?(r.tagName=t.current(),a="tag",L):s.allowMissingTagName&&"endTag"==e?(a="tag bracket",L(e,t,r)):(a="error",k)}function w(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&s.implicitlyClosed.hasOwnProperty(g(r.context.tagName))&&y(r),r.context&&r.context.tagName==n||!1===s.matchClosing?(a="tag",C):(a="tag error",S)}return s.allowMissingTagName&&"endTag"==e?(a="tag bracket",C(e,t,r)):(a="error",S)}function C(e,t,r){return"endTag"!=e?(a="error",C):(y(r),b)}function S(e,t,r){return a="error",C(e,t,r)}function L(e,t,r){if("word"==e)return a="attribute",M;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||s.autoSelfClosers.hasOwnProperty(g(n))?x(r,n):(x(r,n),r.context=new v(r,n,i==r.indented)),b}return a="error",L}function M(e,t,r){return"equals"==e?T:(s.allowMissing||(a="error"),L(e,t,r))}function T(e,t,r){return"string"==e?D:"word"==e&&s.allowUnquoted?(a="string",L):(a="error",L(e,t,r))}function D(e,t,r){return"string"==e?D:L(e,t,r)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:b,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var r=t.tokenize(e,t);return(r||o)&&"comment"!=r&&(a=null,t.state=t.state(o||r,e,t),a&&(r="error"==a?r+" error":a)),r},indent:function(t,r,n){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=h&&t.tokenize!=d)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==s.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(s.multilineTagIndentFactor||1);if(s.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:s.htmlMode?"html":"xml",helperType:s.htmlMode?"html":"xml",skipAttribute:function(e){e.state==T&&(e.state=L)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],r=e.context;r;r=r.prev)t.push(r.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})),l;var e,t,r}var u,c,d={};function h(){return u||(u=1,(e=i()).defineMode("javascript",(function(t,r){var n,i,o=t.indentUnit,a=r.statementIndent,l=r.jsonld,s=r.json||l,u=!1!==r.trackScope,c=r.typescript,d=r.wordCharacters||/[\w$\xa1-\uffff]/,h=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),f=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function g(e,t,r){return n=e,i=r,t}function v(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=y(r),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g("number","number");if("."==r&&e.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return g(r);if("="==r&&e.eat(">"))return g("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g("number","number");if("/"==r)return e.eat("*")?(t.tokenize=x,x(e,t)):e.eat("/")?(e.skipToEnd(),g("comment","comment")):it(e,t,1)?(m(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2")):(e.eat("="),g("operator","operator",e.current()));if("`"==r)return t.tokenize=b,b(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),g("meta","meta");if("#"==r&&e.eatWhile(d))return g("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),g("comment","comment");if(f.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?g("."):g("operator","operator",e.current());if(d.test(r)){e.eatWhile(d);var n=e.current();if("."!=t.lastType){if(h.propertyIsEnumerable(n)){var i=h[n];return g(i.type,i.style,n)}if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",n)}return g("variable","variable",n)}}function y(e){return function(t,r){var n,i=!1;if(l&&"@"==t.peek()&&t.match(p))return r.tokenize=v,g("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=v),g("string","string")}}function x(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=v;break}n="*"==r}return g("comment","comment")}function b(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=v;break}n=!n&&"\\"==r}return g("quasi","string-2",e.current())}var k="([{}])";function w(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(c){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),s=k.indexOf(l);if(s>=0&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(d.test(l))o=!0;else if(/["'\/`]/.test(l))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==l&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(t.fatArrowAt=a)}}var C={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function S(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function L(e,t){if(!u)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function M(e,t,r,n,i){var o=e.cc;for(T.state=e,T.stream=i,T.marked=null,T.cc=o,T.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():s?K:V)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return T.marked?T.marked:"variable"==r&&L(e,n)?"variable-2":t}}var T={state:null,column:null,marked:null,cc:null};function D(){for(var e=arguments.length-1;e>=0;e--)T.cc.push(arguments[e])}function A(){return D.apply(null,arguments),!0}function F(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function N(e){var t=T.state;if(T.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=O(e,t.context);if(null!=n)return void(t.context=n)}else if(!F(e,t.localVars))return void(t.localVars=new W(e,t.localVars));r.globalVars&&!F(e,t.globalVars)&&(t.globalVars=new W(e,t.globalVars))}}function O(e,t){if(t){if(t.block){var r=O(e,t.prev);return r?r==t.prev?t:new z(r,t.vars,!0):null}return F(e,t.vars)?t:new z(t.prev,new W(e,t.vars),!1)}return null}function E(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function z(e,t,r){this.prev=e,this.vars=t,this.block=r}function W(e,t){this.name=e,this.next=t}var P=new W("this",new W("arguments",null));function H(){T.state.context=new z(T.state.context,T.state.localVars,!1),T.state.localVars=P}function I(){T.state.context=new z(T.state.context,T.state.localVars,!0),T.state.localVars=null}function j(){T.state.localVars=T.state.context.vars,T.state.context=T.state.context.prev}function B(e,t){var r=function(){var r=T.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new S(n,T.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function R(){var e=T.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function q(e){function t(r){return r==e?A():";"==e||"}"==r||")"==r||"]"==r?D():A(t)}return t}function V(e,t){return"var"==e?A(B("vardef",t),De,q(";"),R):"keyword a"==e?A(B("form"),G,V,R):"keyword b"==e?A(B("form"),V,R):"keyword d"==e?T.stream.match(/^\s*$/,!1)?A():A(B("stat"),X,q(";"),R):"debugger"==e?A(q(";")):"{"==e?A(B("}"),I,he,R,j):";"==e?A():"if"==e?("else"==T.state.lexical.info&&T.state.cc[T.state.cc.length-1]==R&&T.state.cc.pop()(),A(B("form"),G,V,R,ze)):"function"==e?A(Ie):"for"==e?A(B("form"),I,We,V,j,R):"class"==e||c&&"interface"==t?(T.marked="keyword",A(B("form","class"==e?e:t),Ve,R)):"variable"==e?c&&"declare"==t?(T.marked="keyword",A(V)):c&&("module"==t||"enum"==t||"type"==t)&&T.stream.match(/^\s*\w/,!1)?(T.marked="keyword","enum"==t?A(tt):"type"==t?A(Be,q("operator"),ve,q(";")):A(B("form"),Ae,q("{"),B("}"),he,R,R)):c&&"namespace"==t?(T.marked="keyword",A(B("form"),K,V,R)):c&&"abstract"==t?(T.marked="keyword",A(V)):A(B("stat"),oe):"switch"==e?A(B("form"),G,q("{"),B("}","switch"),I,he,R,R,j):"case"==e?A(K,q(":")):"default"==e?A(q(":")):"catch"==e?A(B("form"),H,U,V,R,j):"export"==e?A(B("stat"),Ge,R):"import"==e?A(B("stat"),Xe,R):"async"==e?A(V):"@"==t?A(K,V):D(B("stat"),K,q(";"),R)}function U(e){if("("==e)return A(Re,q(")"))}function K(e,t){return _(e,t,!1)}function $(e,t){return _(e,t,!0)}function G(e){return"("!=e?D():A(B(")"),X,q(")"),R)}function _(e,t,r){if(T.state.fatArrowAt==T.stream.start){var n=r?te:ee;if("("==e)return A(H,B(")"),ce(Re,")"),R,q("=>"),n,j);if("variable"==e)return D(H,Ae,q("=>"),n,j)}var i=r?Z:Y;return C.hasOwnProperty(e)?A(i):"function"==e?A(Ie,i):"class"==e||c&&"interface"==t?(T.marked="keyword",A(B("form"),qe,R)):"keyword c"==e||"async"==e?A(r?$:K):"("==e?A(B(")"),X,q(")"),R,i):"operator"==e||"spread"==e?A(r?$:K):"["==e?A(B("]"),et,R,i):"{"==e?de(le,"}",null,i):"quasi"==e?D(Q,i):"new"==e?A(re(r)):A()}function X(e){return e.match(/[;\}\)\],]/)?D():D(K)}function Y(e,t){return","==e?A(X):Z(e,t,!1)}function Z(e,t,r){var n=0==r?Y:Z,i=0==r?K:$;return"=>"==e?A(H,r?te:ee,j):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?A(n):c&&"<"==t&&T.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?A(B(">"),ce(ve,">"),R,n):"?"==t?A(K,q(":"),i):A(i):"quasi"==e?D(Q,n):";"!=e?"("==e?de($,")","call",n):"."==e?A(ae,n):"["==e?A(B("]"),X,q("]"),R,n):c&&"as"==t?(T.marked="keyword",A(ve,n)):"regexp"==e?(T.state.lastType=T.marked="operator",T.stream.backUp(T.stream.pos-T.stream.start-1),A(i)):void 0:void 0}function Q(e,t){return"quasi"!=e?D():"${"!=t.slice(t.length-2)?A(Q):A(X,J)}function J(e){if("}"==e)return T.marked="string-2",T.state.tokenize=b,A(Q)}function ee(e){return w(T.stream,T.state),D("{"==e?V:K)}function te(e){return w(T.stream,T.state),D("{"==e?V:$)}function re(e){return function(t){return"."==t?A(e?ie:ne):"variable"==t&&c?A(Le,e?Z:Y):D(e?$:K)}}function ne(e,t){if("target"==t)return T.marked="keyword",A(Y)}function ie(e,t){if("target"==t)return T.marked="keyword",A(Z)}function oe(e){return":"==e?A(R,V):D(Y,q(";"),R)}function ae(e){if("variable"==e)return T.marked="property",A()}function le(e,t){return"async"==e?(T.marked="property",A(le)):"variable"==e||"keyword"==T.style?(T.marked="property","get"==t||"set"==t?A(se):(c&&T.state.fatArrowAt==T.stream.start&&(r=T.stream.match(/^\s*:\s*/,!1))&&(T.state.fatArrowAt=T.stream.pos+r[0].length),A(ue))):"number"==e||"string"==e?(T.marked=l?"property":T.style+" property",A(ue)):"jsonld-keyword"==e?A(ue):c&&E(t)?(T.marked="keyword",A(le)):"["==e?A(K,fe,q("]"),ue):"spread"==e?A($,ue):"*"==t?(T.marked="keyword",A(le)):":"==e?D(ue):void 0;var r}function se(e){return"variable"!=e?D(ue):(T.marked="property",A(Ie))}function ue(e){return":"==e?A($):"("==e?D(Ie):void 0}function ce(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var a=T.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),A((function(r,n){return r==t||n==t?D():D(e)}),n)}return i==t||o==t?A():r&&r.indexOf(";")>-1?D(e):A(q(t))}return function(r,i){return r==t||i==t?A():D(e,n)}}function de(e,t,r){for(var n=3;n"),ve):"quasi"==e?D(ke,Se):void 0}function ye(e){if("=>"==e)return A(ve)}function xe(e){return e.match(/[\}\)\]]/)?A():","==e||";"==e?A(xe):D(be,xe)}function be(e,t){return"variable"==e||"keyword"==T.style?(T.marked="property",A(be)):"?"==t||"number"==e||"string"==e?A(be):":"==e?A(ve):"["==e?A(q("variable"),pe,q("]"),be):"("==e?D(je,be):e.match(/[;\}\)\],]/)?void 0:A()}function ke(e,t){return"quasi"!=e?D():"${"!=t.slice(t.length-2)?A(ke):A(ve,we)}function we(e){if("}"==e)return T.marked="string-2",T.state.tokenize=b,A(ke)}function Ce(e,t){return"variable"==e&&T.stream.match(/^\s*[?:]/,!1)||"?"==t?A(Ce):":"==e?A(ve):"spread"==e?A(Ce):D(ve)}function Se(e,t){return"<"==t?A(B(">"),ce(ve,">"),R,Se):"|"==t||"."==e||"&"==t?A(ve):"["==e?A(ve,q("]"),Se):"extends"==t||"implements"==t?(T.marked="keyword",A(ve)):"?"==t?A(ve,q(":"),ve):void 0}function Le(e,t){if("<"==t)return A(B(">"),ce(ve,">"),R,Se)}function Me(){return D(ve,Te)}function Te(e,t){if("="==t)return A(ve)}function De(e,t){return"enum"==t?(T.marked="keyword",A(tt)):D(Ae,fe,Oe,Ee)}function Ae(e,t){return c&&E(t)?(T.marked="keyword",A(Ae)):"variable"==e?(N(t),A()):"spread"==e?A(Ae):"["==e?de(Ne,"]"):"{"==e?de(Fe,"}"):void 0}function Fe(e,t){return"variable"!=e||T.stream.match(/^\s*:/,!1)?("variable"==e&&(T.marked="property"),"spread"==e?A(Ae):"}"==e?D():"["==e?A(K,q("]"),q(":"),Fe):A(q(":"),Ae,Oe)):(N(t),A(Oe))}function Ne(){return D(Ae,Oe)}function Oe(e,t){if("="==t)return A($)}function Ee(e){if(","==e)return A(De)}function ze(e,t){if("keyword b"==e&&"else"==t)return A(B("form","else"),V,R)}function We(e,t){return"await"==t?A(We):"("==e?A(B(")"),Pe,R):void 0}function Pe(e){return"var"==e?A(De,He):"variable"==e?A(He):D(He)}function He(e,t){return")"==e?A():";"==e?A(He):"in"==t||"of"==t?(T.marked="keyword",A(K,He)):D(K,He)}function Ie(e,t){return"*"==t?(T.marked="keyword",A(Ie)):"variable"==e?(N(t),A(Ie)):"("==e?A(H,B(")"),ce(Re,")"),R,me,V,j):c&&"<"==t?A(B(">"),ce(Me,">"),R,Ie):void 0}function je(e,t){return"*"==t?(T.marked="keyword",A(je)):"variable"==e?(N(t),A(je)):"("==e?A(H,B(")"),ce(Re,")"),R,me,j):c&&"<"==t?A(B(">"),ce(Me,">"),R,je):void 0}function Be(e,t){return"keyword"==e||"variable"==e?(T.marked="type",A(Be)):"<"==t?A(B(">"),ce(Me,">"),R):void 0}function Re(e,t){return"@"==t&&A(K,Re),"spread"==e?A(Re):c&&E(t)?(T.marked="keyword",A(Re)):c&&"this"==e?A(fe,Oe):D(Ae,fe,Oe)}function qe(e,t){return"variable"==e?Ve(e,t):Ue(e,t)}function Ve(e,t){if("variable"==e)return N(t),A(Ue)}function Ue(e,t){return"<"==t?A(B(">"),ce(Me,">"),R,Ue):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(T.marked="keyword"),A(c?ve:K,Ue)):"{"==e?A(B("}"),Ke,R):void 0}function Ke(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&E(t))&&T.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(T.marked="keyword",A(Ke)):"variable"==e||"keyword"==T.style?(T.marked="property",A($e,Ke)):"number"==e||"string"==e?A($e,Ke):"["==e?A(K,fe,q("]"),$e,Ke):"*"==t?(T.marked="keyword",A(Ke)):c&&"("==e?D(je,Ke):";"==e||","==e?A(Ke):"}"==e?A():"@"==t?A(K,Ke):void 0}function $e(e,t){if("!"==t)return A($e);if("?"==t)return A($e);if(":"==e)return A(ve,Oe);if("="==t)return A($);var r=T.state.lexical.prev;return D(r&&"interface"==r.info?je:Ie)}function Ge(e,t){return"*"==t?(T.marked="keyword",A(Je,q(";"))):"default"==t?(T.marked="keyword",A(K,q(";"))):"{"==e?A(ce(_e,"}"),Je,q(";")):D(V)}function _e(e,t){return"as"==t?(T.marked="keyword",A(q("variable"))):"variable"==e?D($,_e):void 0}function Xe(e){return"string"==e?A():"("==e?D(K):"."==e?D(Y):D(Ye,Ze,Je)}function Ye(e,t){return"{"==e?de(Ye,"}"):("variable"==e&&N(t),"*"==t&&(T.marked="keyword"),A(Qe))}function Ze(e){if(","==e)return A(Ye,Ze)}function Qe(e,t){if("as"==t)return T.marked="keyword",A(Ye)}function Je(e,t){if("from"==t)return T.marked="keyword",A(K)}function et(e){return"]"==e?A():D(ce($,"]"))}function tt(){return D(B("form"),Ae,q("{"),B("}"),ce(rt,"}"),R,R)}function rt(){return D(Ae,Oe)}function nt(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function it(e,t,r){return t.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return H.lex=I.lex=!0,j.lex=!0,R.lex=!0,{startState:function(e){var t={tokenize:v,lastType:"sof",cc:[],lexical:new S((e||0)-o,0,"block",!1),localVars:r.localVars,context:r.localVars&&new z(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),w(e,t)),t.tokenize!=x&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",M(t,r,n,i,e))},indent:function(t,n){if(t.tokenize==x||t.tokenize==b)return e.Pass;if(t.tokenize!=v)return 0;var i,l=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var c=t.cc[u];if(c==R)s=s.prev;else if(c!=ze&&c!=j)break}for(;("stat"==s.type||"form"==s.type)&&("}"==l||(i=t.cc[t.cc.length-1])&&(i==Y||i==Z)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;a&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,h=l==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==d&&"{"==l?s.indented:"form"==d?s.indented+o:"stat"==d?s.indented+(nt(t,n)?a||o:0):"switch"!=s.info||h||0==r.doubleIndentSwitch?s.align?s.column+(h?0:1):s.indented+(h?0:o):s.indented+(/^(?:case|default)\b/.test(n)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:l,jsonMode:s,expressionAllowed:it,skipExpression:function(t){M(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})),d;var e}c||(c=1,function(e){function t(e,t,r,n){this.state=e,this.mode=t,this.depth=r,this.prev=n}function r(n){return new t(e.copyState(n.mode,n.state),n.mode,n.depth,n.prev&&r(n.prev))}e.defineMode("jsx",(function(n,i){var o=e.getMode(n,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),a=e.getMode(n,i&&i.base||"javascript");function l(e){var t=e.tagName;e.tagName=null;var r=o.indent(e,"","");return e.tagName=t,r}function s(e,t){return t.context.mode==o?u(e,t,t.context):c(e,t,t.context)}function u(r,i,u){if(2==u.depth)return r.match(/^.*?\*\//)?u.depth=1:r.skipToEnd(),"comment";if("{"==r.peek()){o.skipAttribute(u.state);var c=l(u.state),d=u.state.context;if(d&&r.match(/^[^>]*>\s*$/,!1)){for(;d.prev&&!d.startOfLine;)d=d.prev;d.startOfLine?c-=n.indentUnit:u.prev.state.lexical&&(c=u.prev.state.lexical.indented)}else 1==u.depth&&(c+=n.indentUnit);return i.context=new t(e.startState(a,c),a,0,i.context),null}if(1==u.depth){if("<"==r.peek())return o.skipAttribute(u.state),i.context=new t(e.startState(o,l(u.state)),o,0,i.context),null;if(r.match("//"))return r.skipToEnd(),"comment";if(r.match("/*"))return u.depth=2,s(r,i)}var h,f=o.token(r,u.state),p=r.current();return/\btag\b/.test(f)?/>$/.test(p)?u.state.context?u.depth=0:i.context=i.context.prev:/^-1&&r.backUp(p.length-h),f}function c(r,n,i){if("<"==r.peek()&&!r.match(/^<([^<>]|<[^>]*>)+,\s*>/,!1)&&a.expressionAllowed(r,i.state))return n.context=new t(e.startState(o,a.indent(i.state,"","")),o,0,n.context),a.skipExpression(i.state),null;var l=a.token(r,i.state);if(!l&&null!=i.depth){var s=r.current();"{"==s?i.depth++:"}"==s&&0==--i.depth&&(n.context=n.context.prev)}return l}return{startState:function(){return{context:new t(e.startState(a),a)}},copyState:function(e){return{context:r(e.context)}},token:s,indent:function(e,t,r){return e.context.mode.indent(e.context.state,t,r)},innerMode:function(e){return e.context}}}),"xml","javascript"),e.defineMIME("text/jsx","jsx"),e.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})}(i(),s(),h()));var f,p;f||(f=1,(p=i()).defineMode("shell",(function(){var e={};function t(t,r){for(var n=0;n1&&e.eat("$");var r=e.next();return/['"({]/.test(r)?(t.tokens[0]=a(r,"("==r?"quote":"{"==r?"def":"string"),c(e,t)):(/\d/.test(r)||e.eatWhile(/\w/),t.tokens.shift(),"def")};function u(e){return function(t,r){return t.sol()&&t.string==e&&r.tokens.shift(),t.skipToEnd(),"string-2"}}function c(e,t){return(t.tokens[0]||o)(e,t)}return{startState:function(){return{tokens:[]}},token:function(e,t){return c(e,t)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}})),p.defineMIME("text/x-sh","shell"),p.defineMIME("application/x-sh","shell"));var m,g={};function v(){return m||(m=1,function(e){function t(e){for(var t={},r=0;r*\/]/.test(r)?w(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?w(null,r):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=L),w("variable callee","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),w("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):e.match(/^\w+-/)?w("meta","meta"):void 0}function S(e){return function(t,r){for(var n,i=!1;null!=(n=t.next());){if(n==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==n}return(n==e||!i&&")"!=e)&&(r.tokenize=null),w("string","string")}}function L(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=S(")"),w(null,"(")}function M(e,t,r){this.type=e,this.indent=t,this.prev=r}function T(e,t,r,n){return e.context=new M(r,t.indentation()+(!1===n?0:a),e.context),r}function D(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function A(e,t,r){return O[r.context.type](e,t,r)}function F(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return A(e,t,r)}function N(e){var t=e.current().toLowerCase();o=v.hasOwnProperty(t)?"atom":g.hasOwnProperty(t)?"keyword":"variable"}var O={top:function(e,t,r){if("{"==e)return T(r,t,"block");if("}"==e&&r.context.prev)return D(r);if(b&&/@component/i.test(e))return T(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return T(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return T(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return T(r,t,"at");if("hash"==e)o="builtin";else if("word"==e)o="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return T(r,t,"interpolation");if(":"==e)return"pseudo";if(y&&"("==e)return T(r,t,"parens")}return r.context.type},block:function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return h.hasOwnProperty(n)?(o="property","maybeprop"):f.hasOwnProperty(n)?(o=k?"string-2":"property","maybeprop"):y?(o=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==e?"block":y||"hash"!=e&&"qualifier"!=e?O.top(e,t,r):(o="error","block")},maybeprop:function(e,t,r){return":"==e?T(r,t,"prop"):A(e,t,r)},prop:function(e,t,r){if(";"==e)return D(r);if("{"==e&&y)return T(r,t,"propBlock");if("}"==e||"{"==e)return F(e,t,r);if("("==e)return T(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t.current())){if("word"==e)N(t);else if("interpolation"==e)return T(r,t,"interpolation")}else o+=" error";return"prop"},propBlock:function(e,t,r){return"}"==e?D(r):"word"==e?(o="property","maybeprop"):r.context.type},parens:function(e,t,r){return"{"==e||"}"==e?F(e,t,r):")"==e?D(r):"("==e?T(r,t,"parens"):"interpolation"==e?T(r,t,"interpolation"):("word"==e&&N(t),"parens")},pseudo:function(e,t,r){return"meta"==e?"pseudo":"word"==e?(o="variable-3",r.context.type):A(e,t,r)},documentTypes:function(e,t,r){return"word"==e&&s.hasOwnProperty(t.current())?(o="tag",r.context.type):O.atBlock(e,t,r)},atBlock:function(e,t,r){if("("==e)return T(r,t,"atBlock_parens");if("}"==e||";"==e)return F(e,t,r);if("{"==e)return D(r)&&T(r,t,y?"block":"top");if("interpolation"==e)return T(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();o="only"==n||"not"==n||"and"==n||"or"==n?"keyword":u.hasOwnProperty(n)?"attribute":c.hasOwnProperty(n)?"property":d.hasOwnProperty(n)?"keyword":h.hasOwnProperty(n)?"property":f.hasOwnProperty(n)?k?"string-2":"property":v.hasOwnProperty(n)?"atom":g.hasOwnProperty(n)?"keyword":"error"}return r.context.type},atComponentBlock:function(e,t,r){return"}"==e?F(e,t,r):"{"==e?D(r)&&T(r,t,y?"block":"top",!1):("word"==e&&(o="error"),r.context.type)},atBlock_parens:function(e,t,r){return")"==e?D(r):"{"==e||"}"==e?F(e,t,r,2):O.atBlock(e,t,r)},restricted_atBlock_before:function(e,t,r){return"{"==e?T(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(o="variable","restricted_atBlock_before"):A(e,t,r)},restricted_atBlock:function(e,t,r){return"}"==e?(r.stateArg=null,D(r)):"word"==e?(o="@font-face"==r.stateArg&&!p.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,r){return"word"==e?(o="variable","keyframes"):"{"==e?T(r,t,"top"):A(e,t,r)},at:function(e,t,r){return";"==e?D(r):"{"==e||"}"==e?F(e,t,r):("word"==e?o="tag":"hash"==e&&(o="builtin"),"at")},interpolation:function(e,t,r){return"}"==e?D(r):"{"==e||";"==e?F(e,t,r):("word"==e?o="variable":"variable"!=e&&"("!=e&&")"!=e&&(o="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:n?"block":"top",stateArg:null,context:new M(n?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||C)(e,t);return r&&"object"==typeof r&&(i=r[1],r=r[0]),o=r,"comment"!=i&&(t.state=O[t.state](i,e,t)),o},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),i=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(i=Math.max(0,r.indent-a)):i=(r=r.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:x,fold:"brace"}}));var r=["domain","regexp","url","url-prefix"],n=t(r),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],l=t(a),s=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],u=t(s),c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=t(c),h=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],f=t(h),p=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),m=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],v=t(g),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],x=t(y),b=r.concat(i).concat(a).concat(s).concat(c).concat(h).concat(g).concat(y);function k(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.registerHelper("hintWords","css",b),e.defineMIME("text/css",{documentTypes:n,mediaTypes:o,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:m,colorKeywords:v,valueKeywords:x,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k,k(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:x,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k,k(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:x,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k,k(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:n,mediaTypes:o,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:m,colorKeywords:v,valueKeywords:x,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k,k(e,t))}},name:"css",helperType:"gss"})}(i())),g}v();var y;y||(y=1,function(e){var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function r(e,t,r){var n=e.current(),i=n.search(t);return i>-1?e.backUp(n.length-i):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}var n={};function i(e){var t=n[e];return t||(n[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function o(e,t){var r=e.match(i(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function a(e,t){return new RegExp((t?"^":"")+"","i")}function l(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),i=e[r],o=i.length-1;o>=0;o--)n.unshift(i[o])}function s(e,t){for(var r=0;r=0;h--)u.script.unshift(["type",d[h].matches,d[h].mode]);function f(t,i){var l,c=o.token(t,i.htmlState),d=/\btag\b/.test(c);if(d&&!/[<>\s\/]/.test(t.current())&&(l=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(l))i.inTag=l+" ";else if(i.inTag&&d&&/>$/.test(t.current())){var h=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var p=">"==t.current()&&s(u[h[1]],h[2]),m=e.getMode(n,p),g=a(h[1],!0),v=a(h[1],!1);i.token=function(e,t){return e.match(g,!1)?(t.token=f,t.localState=t.localMode=null,null):r(e,v,t.localMode.token(e,t.localState))},i.localMode=m,i.localState=e.startState(m,o.indent(i.htmlState,"",""))}else i.inTag&&(i.inTag+=t.current(),t.eol()&&(i.inTag+=" "));return c}return{startState:function(){return{token:f,inTag:null,localMode:null,localState:null,htmlState:e.startState(o)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(o,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?o.indent(t.htmlState,r,n):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||o}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(i(),s(),h(),v()));var x,b;b||(b=1,function(e){e.defineMode("markdown",(function(t,r){var n=e.getMode(t,"text/html"),i="null"==n.name;function o(r){if(e.findModeByName){var n=e.findModeByName(r);n&&(r=n.mime||n.mimes[0])}var i=e.getMode(t,r);return"null"==i.name?null:i}void 0===r.highlightFormatting&&(r.highlightFormatting=!1),void 0===r.maxBlockquoteDepth&&(r.maxBlockquoteDepth=0),void 0===r.taskLists&&(r.taskLists=!1),void 0===r.strikethrough&&(r.strikethrough=!1),void 0===r.emoji&&(r.emoji=!1),void 0===r.fencedCodeBlockHighlighting&&(r.fencedCodeBlockHighlighting=!0),void 0===r.fencedCodeBlockDefaultMode&&(r.fencedCodeBlockDefaultMode="text/plain"),void 0===r.xml&&(r.xml=!0),void 0===r.tokenTypeOverrides&&(r.tokenTypeOverrides={});var a={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var l in a)a.hasOwnProperty(l)&&r.tokenTypeOverrides[l]&&(a[l]=r.tokenTypeOverrides[l]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,u=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,d=r.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,f=/^[^#!\[\]*_\\<>` "'(~:]+/,p=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,m=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,v=" ";function y(e,t,r){return t.f=t.inline=r,r(e,t)}function x(e,t,r){return t.f=t.block=r,r(e,t)}function b(e){return!e||!/\S/.test(e.string)}function k(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==C){var r=i;if(!r){var o=e.innerMode(n,t.htmlState);r="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}r&&(t.f=T,t.block=w,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function w(t,n){var i=t.column()===n.indentation,l=b(n.prevLine.stream),f=n.indentedCode,g=n.prevLine.hr,v=!1!==n.list,x=(n.listStack[n.listStack.length-1]||0)+3;n.indentedCode=!1;var k=n.indentation;if(null===n.indentationDiff&&(n.indentationDiff=n.indentation,v)){for(n.list=null;k=4&&(f||n.prevLine.fencedCodeEnd||n.prevLine.header||l))return t.skipToEnd(),n.indentedCode=!0,a.code;if(t.eatSpace())return null;if(i&&n.indentation<=x&&(M=t.match(d))&&M[1].length<=6)return n.quote=0,n.header=M[1].length,n.thisLine.header=!0,r.highlightFormatting&&(n.formatting="header"),n.f=n.inline,L(n);if(n.indentation<=x&&t.eat(">"))return n.quote=i?1:n.quote+1,r.highlightFormatting&&(n.formatting="quote"),t.eatSpace(),L(n);if(!C&&!n.setext&&i&&n.indentation<=x&&(M=t.match(u))){var T=M[1]?"ol":"ul";return n.indentation=k+t.current().length,n.list=!0,n.quote=0,n.listStack.push(n.indentation),n.em=!1,n.strong=!1,n.code=!1,n.strikethrough=!1,r.taskLists&&t.match(c,!1)&&(n.taskList=!0),n.f=n.inline,r.highlightFormatting&&(n.formatting=["list","list-"+T]),L(n)}return i&&n.indentation<=x&&(M=t.match(p,!0))?(n.quote=0,n.fencedEndRE=new RegExp(M[1]+"+ *$"),n.localMode=r.fencedCodeBlockHighlighting&&o(M[2]||r.fencedCodeBlockDefaultMode),n.localMode&&(n.localState=e.startState(n.localMode)),n.f=n.block=S,r.highlightFormatting&&(n.formatting="code-block"),n.code=-1,L(n)):n.setext||!(w&&v||n.quote||!1!==n.list||n.code||C||m.test(t.string))&&(M=t.lookAhead(1))&&(M=M.match(h))?(n.setext?(n.header=n.setext,n.setext=0,t.skipToEnd(),r.highlightFormatting&&(n.formatting="header")):(n.header="="==M[0].charAt(0)?1:2,n.setext=n.header),n.thisLine.header=!0,n.f=n.inline,L(n)):C?(t.skipToEnd(),n.hr=!0,n.thisLine.hr=!0,a.hr):"["===t.peek()?y(t,n,O):y(t,n,n.inline)}function C(t,r){var o=n.token(t,r.htmlState);if(!i){var a=e.innerMode(n,r.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||r.md_inside&&t.current().indexOf(">")>-1)&&(r.f=T,r.block=w,r.htmlState=null)}return o}function S(e,t){var n,i=t.listStack[t.listStack.length-1]||0,o=t.indentation=e.quote?t.push(a.formatting+"-"+e.formatting[n]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(a.linkHref,"url"):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,"link"),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+"-"+e.header),e.quote&&(t.push(a.quote),!r.maxBlockquoteDepth||r.maxBlockquoteDepth>=e.quote?t.push(a.quote+"-"+e.quote):t.push(a.quote+"-"+r.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(a.list2):t.push(a.list3):t.push(a.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function M(e,t){if(e.match(f,!0))return L(t)}function T(t,i){var o=i.text(t,i);if(void 0!==o)return o;if(i.list)return i.list=null,L(i);if(i.taskList)return" "===t.match(c,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,r.highlightFormatting&&(i.formatting="task"),i.taskList=!1,L(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return r.highlightFormatting&&(i.formatting="header"),L(i);var l=t.next();if(i.linkTitle){i.linkTitle=!1;var s=l;"("===l&&(s=")");var u="^\\s*(?:[^"+(s=(s+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+s;if(t.match(new RegExp(u),!0))return a.linkHref}if("`"===l){var d=i.formatting;r.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var h=t.current().length;if(0!=i.code||i.quote&&1!=h){if(h==i.code){var f=L(i);return i.code=0,f}return i.formatting=d,L(i)}return i.code=h,L(i)}if(i.code)return L(i);if("\\"===l&&(t.next(),r.highlightFormatting)){var p=L(i),m=a.formatting+"-escape";return p?p+" "+m:m}if("!"===l&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,r.highlightFormatting&&(i.formatting="image"),L(i);if("["===l&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,r.highlightFormatting&&(i.formatting="image"),L(i);if("]"===l&&i.imageAltText){r.highlightFormatting&&(i.formatting="image");var p=L(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=A,p}if("["===l&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,r.highlightFormatting&&(i.formatting="link")),L(i);if("]"===l&&i.linkText){r.highlightFormatting&&(i.formatting="link");var p=L(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?A:T,p}if("<"===l&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=D,r.highlightFormatting&&(i.formatting="link"),(p=L(i))?p+=" ":p="",p+a.linkInline;if("<"===l&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=D,r.highlightFormatting&&(i.formatting="link"),(p=L(i))?p+=" ":p="",p+a.linkEmail;if(r.xml&&"<"===l&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var v=t.string.indexOf(">",t.pos);if(-1!=v){var y=t.string.substring(t.start,v);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(n),x(t,i,C)}if(r.xml&&"<"===l&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===l||"_"===l){for(var b=1,k=1==t.pos?" ":t.string.charAt(t.pos-2);b<3&&t.eat(l);)b++;var w=t.peek()||" ",S=!/\s/.test(w)&&(!g.test(w)||/\s/.test(k)||g.test(k)),M=!/\s/.test(k)&&(!g.test(k)||/\s/.test(w)||g.test(w)),F=null,N=null;if(b%2&&(i.em||!S||"*"!==l&&M&&!g.test(k)?i.em!=l||!M||"*"!==l&&S&&!g.test(w)||(F=!1):F=!0),b>1&&(i.strong||!S||"*"!==l&&M&&!g.test(k)?i.strong!=l||!M||"*"!==l&&S&&!g.test(w)||(N=!1):N=!0),null!=N||null!=F)return r.highlightFormatting&&(i.formatting=null==F?"strong":null==N?"em":"strong em"),!0===F&&(i.em=l),!0===N&&(i.strong=l),f=L(i),!1===F&&(i.em=!1),!1===N&&(i.strong=!1),f}else if(" "===l&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return L(i);t.backUp(1)}if(r.strikethrough)if("~"===l&&t.eatWhile(l)){if(i.strikethrough)return r.highlightFormatting&&(i.formatting="strikethrough"),f=L(i),i.strikethrough=!1,f;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,r.highlightFormatting&&(i.formatting="strikethrough"),L(i)}else if(" "===l&&t.match("~~",!0)){if(" "===t.peek())return L(i);t.backUp(2)}if(r.emoji&&":"===l&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,r.highlightFormatting&&(i.formatting="emoji");var O=L(i);return i.emoji=!1,O}return" "===l&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),L(i)}function D(e,t){if(">"===e.next()){t.f=t.inline=T,r.highlightFormatting&&(t.formatting="link");var n=L(t);return n?n+=" ":n="",n+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function A(e,t){if(e.eatSpace())return null;var n=e.next();return"("===n||"["===n?(t.f=t.inline=N("("===n?")":"]"),r.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,L(t)):"error"}var F={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function N(e){return function(t,n){if(t.next()===e){n.f=n.inline=T,r.highlightFormatting&&(n.formatting="link-string");var i=L(n);return n.linkHref=!1,i}return t.match(F[e]),n.linkHref=!0,L(n)}}function O(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=E,e.next(),r.highlightFormatting&&(t.formatting="link"),t.linkText=!0,L(t)):y(e,t,T)}function E(e,t){if(e.match("]:",!0)){t.f=t.inline=z,r.highlightFormatting&&(t.formatting="link");var n=L(t);return t.linkText=!1,n}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function z(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),t.f=t.inline=T,a.linkHref+" url")}var W={startState:function(){return{f:w,prevLine:{stream:null},thisLine:{stream:null},block:w,htmlState:null,indentation:0,inline:T,text:M,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(n,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return k(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=C)){var r=e.match(/^\s*/,!0)[0].replace(/\t/g,v).length;if(t.indentation=r,t.indentationDiff=null,r>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==C?{state:e.htmlState,mode:n}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:W}},indent:function(t,r,i){return t.block==C&&n.indent?n.indent(t.htmlState,r,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,r,i):e.Pass},blankLine:k,getType:L,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return W}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(i(),s(),x||(x=1,function(e){e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var r=0;rr.keyCol)return t.skipToEnd(),"string";if(r.literal&&(r.literal=!1),t.sol()){if(r.keyCol=0,r.pair=!1,r.pairStart=!1,t.match("---"))return"def";if(t.match("..."))return"def";if(t.match(/\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==n?r.inlinePairs++:"}"==n?r.inlinePairs--:"["==n?r.inlineList++:r.inlineList--,"meta";if(r.inlineList>0&&!i&&","==n)return t.next(),"meta";if(r.inlinePairs>0&&!i&&","==n)return r.keyCol=0,r.pair=!1,r.pairStart=!1,t.next(),"meta";if(r.pairStart){if(t.match(/^\s*(\||\>)\s*/))return r.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==r.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(r.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(e))return"keyword"}return!r.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)?(r.pair=!0,r.keyCol=t.indentation(),"atom"):r.pair&&t.match(/^:\s*/)?(r.pairStart=!0,"meta"):(r.pairStart=!1,r.escaped="\\"==n,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}})),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")}(i()));class w extends t.Component{constructor(e){super(e),this.appliedNext=void 0,this.deferred=void 0,this.editor=void 0,this.emulating=void 0,this.hydrated=void 0,this.initCb=void 0,this.mirror=void 0,this.mounted=void 0,this.ref=void 0,this.shared=void 0,this.appliedNext=!1,this.deferred=null,this.emulating=!1,this.hydrated=!1,this.initCb=()=>{this.props.editorDidConfigure&&this.props.editorDidConfigure(this.editor)},this.mounted=!1}hydrate(e){const t=e&&e.options?e.options:{},r=Object.assign({},o.defaults,this.editor.options,t);Object.keys(r).some((e=>this.editor.getOption(e)!==r[e]))&&Object.keys(r).forEach((e=>{t.hasOwnProperty(e)&&this.editor.getOption(e)!==r[e]&&(this.editor.setOption(e,r[e]),this.mirror.setOption(e,r[e]))})),this.hydrated||(this.deferred?this.resolveChange(e.value):this.initChange(e.value||"")),this.hydrated=!0}initChange(e){this.emulating=!0;const t=this.editor.getDoc(),r=t.lastLine(),n=t.getLine(t.lastLine()).length;t.replaceRange(e||"",{line:0,ch:0},{line:r,ch:n}),this.mirror.setValue(e),t.clearHistory(),this.mirror.clearHistory(),this.emulating=!1}resolveChange(e){this.emulating=!0;const t=this.editor.getDoc();if("undo"===this.deferred.origin?t.undo():"redo"===this.deferred.origin?t.redo():t.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),e&&e!==t.getValue()){const r=t.getCursor();t.setValue(e),t.setCursor(r)}this.emulating=!1,this.deferred=null}mirrorChange(e){const t=this.editor.getDoc();return"undo"===e.origin?(t.setHistory(this.mirror.getHistory()),this.mirror.undo()):"redo"===e.origin?(t.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(e.text,e.from,e.to,e.origin),this.mirror.getValue()}componentDidMount(){this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&o.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=o(this.ref,this.props.options),this.shared=new S(this.editor,this.props),this.mirror=o((()=>{}),this.props.options),this.editor.on("electricInput",(()=>{this.mirror.setHistory(this.editor.getDoc().getHistory())})),this.editor.on("cursorActivity",(()=>{this.mirror.setCursor(this.editor.getDoc().getCursor())})),this.editor.on("beforeChange",((e,t)=>{if(this.emulating)return;t.cancel(),this.deferred=t;const r=this.mirrorChange(this.deferred);this.props.onBeforeChange&&this.props.onBeforeChange(this.editor,this.deferred,r)})),this.editor.on("change",((e,t)=>{this.mounted&&this.props.onChange&&this.props.onChange(this.editor,t,this.editor.getValue())})),this.hydrate(this.props),this.shared.apply(this.props),this.mounted=!0,this.shared.wire(this.props),this.editor.getOption("autofocus")&&this.editor.focus(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb)}componentDidUpdate(e){const t={cursor:void 0};this.props.value!==e.value&&(this.hydrated=!1),this.props.autoCursor||void 0===this.props.autoCursor||(t.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.appliedNext||(this.shared.applyNext(e,this.props,t),this.appliedNext=!0),this.shared.applyUserDefined(e,t)}componentWillUnmount(){this.props.editorWillUnmount&&this.props.editorWillUnmount(o)}shouldComponentUpdate(){return!0}render(){const e=this.props.className?`react-codemirror2 ${this.props.className}`:"react-codemirror2";return t.createElement("div",{className:e,ref:e=>this.ref=e})}}w.displayName="Controlled";class C{static equals(e,t){const r=Object.keys,n=typeof e;return e&&t&&"object"===n&&n===typeof t?r(e).length===r(t).length&&r(e).every((r=>this.equals(e[r],t[r]))):e===t}}class S{constructor(e,t){this.editor=void 0,this.props=void 0,this.editor=e,this.props=t}delegateCursor(e,t,r){const n=this.editor.getDoc();r&&this.editor.focus(),t?n.setCursor(e):n.setCursor(e,void 0,{scroll:!1})}delegateScroll(e){this.editor.scrollTo(e.x,e.y)}delegateSelection(e,t){this.editor.getDoc().setSelections(e),t&&this.editor.focus()}apply(e){e&&e.selection&&e.selection.ranges&&this.delegateSelection(e.selection.ranges,e.selection.focus||!1),e&&e.cursor&&this.delegateCursor(e.cursor,e.autoScroll||!1,this.editor.getOption("autofocus")||!1),e&&e.scroll&&this.delegateScroll(e.scroll)}applyNext(e,t,r){e&&e.selection&&e.selection.ranges&&t&&t.selection&&t.selection.ranges&&!C.equals(e.selection.ranges,t.selection.ranges)&&this.delegateSelection(t.selection.ranges,t.selection.focus||!1),e&&e.cursor&&t&&t.cursor&&!C.equals(e.cursor,t.cursor)&&this.delegateCursor(r.cursor||t.cursor,t.autoScroll||!1,t.autoCursor||!1),e&&e.scroll&&t&&t.scroll&&!C.equals(e.scroll,t.scroll)&&this.delegateScroll(t.scroll)}applyUserDefined(e,t){t&&t.cursor&&this.delegateCursor(t.cursor,e.autoScroll||!1,this.editor.getOption("autofocus")||!1)}wire(e){Object.keys(e||{}).filter((e=>/^on/.test(e))).forEach((e=>{switch(e){case"onBlur":this.editor.on("blur",((e,t)=>{var r,n;null===(r=(n=this.props).onBlur)||void 0===r||r.call(n,this.editor,t)}));break;case"onContextMenu":this.editor.on("contextmenu",((e,t)=>{var r,n;null===(r=(n=this.props).onContextMenu)||void 0===r||r.call(n,this.editor,t)}));break;case"onCopy":this.editor.on("copy",((e,t)=>{var r,n;null===(r=(n=this.props).onCopy)||void 0===r||r.call(n,this.editor,t)}));break;case"onCursor":this.editor.on("cursorActivity",(()=>{var e,t;null===(e=(t=this.props).onCursor)||void 0===e||e.call(t,this.editor,this.editor.getDoc().getCursor())}));break;case"onCursorActivity":this.editor.on("cursorActivity",(()=>{var e,t;null===(e=(t=this.props).onCursorActivity)||void 0===e||e.call(t,this.editor)}));break;case"onCut":this.editor.on("cut",((e,t)=>{var r,n;null===(r=(n=this.props).onCut)||void 0===r||r.call(n,this.editor,t)}));break;case"onDblClick":this.editor.on("dblclick",((e,t)=>{var r,n;null===(r=(n=this.props).onDblClick)||void 0===r||r.call(n,this.editor,t)}));break;case"onDragEnter":this.editor.on("dragenter",((e,t)=>{var r,n;null===(r=(n=this.props).onDragEnter)||void 0===r||r.call(n,this.editor,t)}));break;case"onDragLeave":this.editor.on("dragleave",((e,t)=>{var r,n;null===(r=(n=this.props).onDragLeave)||void 0===r||r.call(n,this.editor,t)}));break;case"onDragOver":this.editor.on("dragover",((e,t)=>{var r,n;null===(r=(n=this.props).onDragOver)||void 0===r||r.call(n,this.editor,t)}));break;case"onDragStart":this.editor.on("dragstart",((e,t)=>{var r,n;null===(r=(n=this.props).onDragStart)||void 0===r||r.call(n,this.editor,t)}));break;case"onDrop":this.editor.on("drop",((e,t)=>{var r,n;null===(r=(n=this.props).onDrop)||void 0===r||r.call(n,this.editor,t)}));break;case"onFocus":this.editor.on("focus",((e,t)=>{var r,n;null===(r=(n=this.props).onFocus)||void 0===r||r.call(n,this.editor,t)}));break;case"onGutterClick":this.editor.on("gutterClick",((e,t,r,n)=>{var i,o;null===(i=(o=this.props).onGutterClick)||void 0===i||i.call(o,this.editor,t,r,n)}));break;case"onInputRead":this.editor.on("inputRead",((e,t)=>{var r,n;null===(r=(n=this.props).onInputRead)||void 0===r||r.call(n,this.editor,t)}));break;case"onKeyDown":this.editor.on("keydown",((e,t)=>{var r,n;null===(r=(n=this.props).onKeyDown)||void 0===r||r.call(n,this.editor,t)}));break;case"onKeyHandled":this.editor.on("keyHandled",((e,t,r)=>{var n,i;null===(n=(i=this.props).onKeyHandled)||void 0===n||n.call(i,this.editor,t,r)}));break;case"onKeyPress":this.editor.on("keypress",((e,t)=>{var r,n;null===(r=(n=this.props).onKeyPress)||void 0===r||r.call(n,this.editor,t)}));break;case"onKeyUp":this.editor.on("keyup",((e,t)=>{var r,n;null===(r=(n=this.props).onKeyUp)||void 0===r||r.call(n,this.editor,t)}));break;case"onMouseDown":this.editor.on("mousedown",((e,t)=>{var r,n;null===(r=(n=this.props).onMouseDown)||void 0===r||r.call(n,this.editor,t)}));break;case"onPaste":this.editor.on("paste",((e,t)=>{var r,n;null===(r=(n=this.props).onPaste)||void 0===r||r.call(n,this.editor,t)}));break;case"onRenderLine":this.editor.on("renderLine",((e,t,r)=>{var n,i;null===(n=(i=this.props).onRenderLine)||void 0===n||n.call(i,this.editor,t,r)}));break;case"onScroll":this.editor.on("scroll",(e=>{var t,r;null===(t=(r=this.props).onScroll)||void 0===t||t.call(r,this.editor,this.editor.getScrollInfo())}));break;case"onSelection":this.editor.on("beforeSelectionChange",((e,t)=>{var r,n;null===(r=(n=this.props).onSelection)||void 0===r||r.call(n,this.editor,t)}));break;case"onTouchStart":this.editor.on("touchstart",((e,t)=>{var r,n;null===(r=(n=this.props).onTouchStart)||void 0===r||r.call(n,this.editor,t)}));break;case"onUpdate":this.editor.on("update",(e=>{var t,r;null===(t=(r=this.props).onUpdate)||void 0===t||t.call(r,this.editor)}));break;case"onViewportChange":this.editor.on("viewportChange",((e,t,r)=>{var n,i;null===(n=(i=this.props).onViewportChange)||void 0===n||n.call(i,this.editor,t,r)}))}}))}}export{S as Shared,w as default}; +import{m as e,R as t}from"./index-DxmLT0bY.js";var r,n={exports:{}};function i(){return r||(r=1,n.exports=function(){var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=n||i||o,l=a&&(n?document.documentMode||6:+(o||i)[1]),s=!o&&/WebKit\//.test(e),u=s&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\/(\d+)/.exec(e),d=c&&+c[1],h=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),m=/PhantomJS/.test(e),g=f&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),y=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),x=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),k=/win/i.test(t),w=h&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,s=!0);var C=x&&(u||h&&(null==w||w<12.11)),S=r||a&&l>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var M,T=function(e,t){var r=e.className,n=L(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function A(e,t){return D(e).appendChild(t)}function F(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(P=function(e){try{e.select()}catch(t){}});var U=function(){this.id=null,this.f=null,this.time=0,this.handler=R(this.onTimeout,this)};function K(e,t){for(var r=0;r=t)return n+Math.min(a,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var Q=[""];function J(e){for(;Q.length<=e;)Q.push(ee(Q)+" ");return Q[e]}function ee(e){return e[e.length-1]}function te(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||oe.test(e))}function le(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ae(e))||t.test(e):ae(e)}function se(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ue=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ce(e){return e.charCodeAt(0)>=768&&ue.test(e)}function de(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function fe(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;ot||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var pe=null;function me(e,t,r){var n;pe=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:pe=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:pe=i)}return null!=n?n:pe}var ge=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(r){return r<=247?e.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?t.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var c=e.length,d=[],h=0;h-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function we(e,t){var r=be(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function Me(e){e.prototype.on=function(e,t){xe(this,e,t)},e.prototype.off=function(e,t){ke(this,e,t)}}function Te(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function De(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ae(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Fe(e){Te(e),De(e)}function Ne(e){return e.target||e.srcElement}function Oe(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),x&&e.ctrlKey&&1==t&&(t=3),t}var Ee,ze,We=function(){if(a&&l<9)return!1;var e=F("div");return"draggable"in e||"dragDrop"in e}();function Pe(e){if(null==Ee){var t=F("span","​");A(e,F("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ee=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var r=Ee?F("span","​"):F("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function He(e){if(null!=ze)return ze;var t=A(e,document.createTextNode("AخA")),r=M(t,0,1).getBoundingClientRect(),n=M(t,1,2).getBoundingClientRect();return D(e),!(!r||r.left==r.right)&&(ze=n.right-r.right<3)}var Ie,je=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Be=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(Ie){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(Ie){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Re="oncopy"in(Ie=F("div"))||(Ie.setAttribute("oncopy","return;"),"function"==typeof Ie.oncopy),qe=null;function Ve(e){if(null!=qe)return qe;var t=A(e,F("span","x")),r=t.getBoundingClientRect(),n=M(t,0,1).getBoundingClientRect();return qe=Math.abs(r.left-n.left)>1}var Ue={},Ke={};function $e(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ue[e]=t}function Ge(e,t){Ke[e]=t}function _e(e){if("string"==typeof e&&Ke.hasOwnProperty(e))e=Ke[e];else if(e&&"string"==typeof e.name&&Ke.hasOwnProperty(e.name)){var t=Ke[e.name];"string"==typeof t&&(t={name:t}),(e=ie(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return _e("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return _e("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Xe(e,t){t=_e(t);var r=Ue[t.name];if(!r)return Xe(e,"text/plain");var n=r(e,t);if(Ye.hasOwnProperty(t.name)){var i=Ye[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var Ye={};function Ze(e,t){q(t,Ye.hasOwnProperty(e)?Ye[e]:Ye[e]={})}function Qe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Je(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function et(e,t,r){return!e.startState||e.startState(t,r)}var tt=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function rt(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?ct(r,rt(e,r).text.length):yt(t,rt(e,t.line).text.length)}function yt(e,t){var r=e.ch;return null==r||r>t?ct(e.line,t):r<0?ct(e.line,0):e}function xt(e,t){for(var r=[],n=0;n=this.string.length},tt.prototype.sol=function(){return this.pos==this.lineStart},tt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},tt.prototype.next=function(){if(this.post},tt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},tt.prototype.skipToEnd=function(){this.pos=this.string.length},tt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},tt.prototype.backUp=function(e){this.pos-=e},tt.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},tt.prototype.current=function(){return this.string.slice(this.start,this.pos)},tt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},tt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},tt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var bt=function(e,t){this.state=e,this.lookAhead=t},kt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function wt(e,t,r,n){var i=[e.state.modeGen],o={};Nt(e,t.text,e.doc.mode,r,(function(e,t){return i.push(e,t)}),o,n);for(var a=r.state,l=function(n){r.baseTokens=i;var l=e.state.overlays[n],s=1,u=0;r.state=!0,Nt(e,t.text,l.mode,r,(function(e,t){for(var r=s;ue&&i.splice(s,1,e,i[s+1],n),s+=2,u=Math.min(e,n)}if(t)if(l.opaque)i.splice(r,s-r,e,"overlay "+t),s=r+2;else for(;re.options.maxHighlightLength&&Qe(e.doc.mode,n.state),o=wt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function St(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new kt(n,!0,t);var o=Ot(e,t,r),a=o>n.first&&rt(n,o-1).stateAfter,l=a?kt.fromSaved(n,a,o):new kt(n,et(n.mode),o);return n.iter(o,t,(function(r){Lt(e,r.text,l);var n=l.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}kt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},kt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},kt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},kt.fromSaved=function(e,t,r){return t instanceof bt?new kt(e,Qe(e.mode,t.state),r,t.lookAhead):new kt(e,Qe(e.mode,t),r)},kt.prototype.save=function(e){var t=!1!==e?Qe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new bt(t,this.maxLookAhead):t};var Dt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function At(e,t,r,n){var i,o,a=e.doc,l=a.mode,s=rt(a,(t=vt(a,t)).line),u=St(e,t.line,r),c=new tt(s.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pose.options.maxHighlightLength?(l=!1,a&&Lt(e,t,n,d.pos),d.pos=t.length,s=null):s=Ft(Tt(r,d,n.state,h),o),h){var f=h[0].name;f&&(s="m-"+(s?f+" "+s:f))}if(!l||c!=s){for(;ua;--l){if(l<=o.first)return o.first;var s=rt(o,l-1),u=s.stateAfter;if(u&&(!r||l+(u instanceof bt?u.lookAhead:0)<=o.modeFrontier))return l;var c=V(s.text,null,e.options.tabSize);(null==i||n>c)&&(i=l-1,n=c)}return i}function Et(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var i=rt(e,n).stateAfter;if(i&&(!(i instanceof bt)||n+i.lookAhead=t:o.to>t);(n||(n=[])).push(new It(a,o.from,l?null:o.to))}}return n}function Vt(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&l)for(var x=0;x0)){var c=[s,1],d=dt(u.from,l.from),h=dt(u.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:l.from}),(h>0||!a.inclusiveRight&&!h)&&c.push({from:l.to,to:u.to}),i.splice.apply(i,c),s+=c.length-3}}return i}function Gt(e){var t=e.markedSpans;if(t){for(var r=0;rt)&&(!r||Zt(r,o.marker)<0)&&(r=o.marker)}return r}function rr(e,t,r,n,i){var o=rt(e,t),a=Wt&&o.markedSpans;if(a)for(var l=0;l=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?dt(u.to,r)>=0:dt(u.to,r)>0)||c>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?dt(u.from,n)<=0:dt(u.from,n)<0)))return!0}}}function nr(e){for(var t;t=Jt(e);)e=t.find(-1,!0).line;return e}function ir(e){for(var t;t=er(e);)e=t.find(1,!0).line;return e}function or(e){for(var t,r;t=er(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function ar(e,t){var r=rt(e,t),n=nr(r);return r==n?t:at(n)}function lr(e,t){if(t>e.lastLine())return t;var r,n=rt(e,t);if(!sr(e,n))return t;for(;r=er(n);)n=r.find(1,!0).line;return at(n)+1}function sr(e,t){var r=Wt&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var fr=function(e,t,r){this.text=e,_t(this,t),this.height=r?r(this):1};function pr(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Gt(e),_t(e,r);var i=n?n(e):1;i!=e.height&&ot(e,i)}function mr(e){e.parent=null,Gt(e)}fr.prototype.lineNo=function(){return at(this)},Me(fr);var gr={},vr={};function yr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?vr:gr;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function xr(e,t){var r=N("span",null,null,s?"padding-right: .1px":null),n={pre:N("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;n.pos=0,n.addToken=kr,He(e.display.measure)&&(a=ve(o,e.doc.direction))&&(n.addToken=Cr(n.addToken,a)),n.map=[],Lr(o,n,Ct(e,o,t!=e.display.externalMeasured&&at(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=W(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=W(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Pe(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var l=n.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return we(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=W(n.pre.className,n.textClass||"")),n}function br(e){var t=F("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function kr(e,t,r,n,i,o,s){if(t){var u,c=e.splitSpaces?wr(t,e.trailingSpace):t,d=e.cm.state.specialChars,h=!1;if(d.test(t)){u=document.createDocumentFragment();for(var f=0;;){d.lastIndex=f;var p=d.exec(t),m=p?p.index-f:t.length-f;if(m){var g=document.createTextNode(c.slice(f,f+m));a&&l<9?u.appendChild(F("span",[g])):u.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!p)break;f+=m+1;var v=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,x=y-e.col%y;(v=u.appendChild(F("span",J(x),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=x}else"\r"==p[0]||"\n"==p[0]?((v=u.appendChild(F("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),a&&l<9?u.appendChild(F("span",[v])):u.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),a&&l<9&&(h=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||n||i||h||o||s){var b=r||"";n&&(b+=n),i&&(b+=i);var k=F("span",[u],b,o);if(s)for(var w in s)s.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&k.setAttribute(w,s[w]);return e.content.appendChild(k)}e.content.appendChild(u)}}function wr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&d.from<=u);h++);if(d.to>=c)return e(r,n,i,o,a,l,s);e(r,n.slice(0,d.to-u),i,o,null,l,s),o=null,n=n.slice(d.to-u),u=d.to}}}function Sr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Lr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,l,s,u,c,d,h,f=i.length,p=0,m=1,g="",v=0;;){if(v==p){s=u=c=l="",h=null,d=null,v=1/0;for(var y=[],x=void 0,b=0;bp||w.collapsed&&k.to==p&&k.from==p)){if(null!=k.to&&k.to!=p&&v>k.to&&(v=k.to,u=""),w.className&&(s+=" "+w.className),w.css&&(l=(l?l+";":"")+w.css),w.startStyle&&k.from==p&&(c+=" "+w.startStyle),w.endStyle&&k.to==v&&(x||(x=[])).push(w.endStyle,k.to),w.title&&((h||(h={})).title=w.title),w.attributes)for(var C in w.attributes)(h||(h={}))[C]=w.attributes[C];w.collapsed&&(!d||Zt(d.marker,w)<0)&&(d=k)}else k.from>p&&v>k.from&&(v=k.from)}if(x)for(var S=0;S=f)break;for(var M=Math.min(f,v);;){if(g){var T=p+g.length;if(!d){var D=T>M?g.slice(0,M-p):g;t.addToken(t,D,a?a+s:s,c,p+D.length==v?u:"",l,h)}if(T>=M){g=g.slice(M-p),p=M;break}p=T,c=""}g=i.slice(o,o=r[m++]),a=yr(r[m++],t.cm.options)}}else for(var A=1;A2&&o.push((s.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function rn(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function nn(e,t){var r=at(t=nr(t)),n=e.display.externalMeasured=new Mr(e.doc,t,r);n.lineN=r;var i=n.built=xr(e,n);return n.text=i.pre,A(e.display.lineMeasure,i.pre),n}function on(e,t,r,n){return sn(e,ln(e,t),r,n)}function an(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(i=(o=s-l)-1,t>=s&&(a="right")),null!=i){if(n=e[u+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],a="left";if("right"==r&&i==s-l)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function fn(e,t,r,n){var i,o=dn(t.map,r,n),s=o.node,u=o.start,c=o.end,d=o.collapse;if(3==s.nodeType){for(var h=0;h<4;h++){for(;u&&ce(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c0&&(d=n="right"),i=e.options.lineWrapping&&(f=s.getClientRects()).length>1?f["right"==n?f.length-1:0]:s.getBoundingClientRect()}if(a&&l<9&&!u&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+Wn(e.display),top:p.top,bottom:p.bottom}:cn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,x=0;x=n.text.length?(s=n.text.length,u="before"):s<=0&&(s=0,u="after"),!l)return a("before"==u?s-1:s,"before"==u);function c(e,t,r){return a(r?e-1:e,1==l[t].level!=r)}var d=me(l,s,u),h=pe,f=c(s,d,"before"==u);return null!=h&&(f.other=c(s,h,"before"!=u)),f}function Ln(e,t){var r=0;t=vt(e.doc,t),e.options.lineWrapping||(r=Wn(e.display)*t.ch);var n=rt(e.doc,t.line),i=cr(n)+Xr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Mn(e,t,r,n,i){var o=ct(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function Tn(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return Mn(n.first,0,null,-1,-1);var i=lt(n,r),o=n.first+n.size-1;if(i>o)return Mn(n.first+n.size-1,rt(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=rt(n,i);;){var l=Nn(e,a,i,t,r),s=tr(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var u=s.find(1);if(u.line==i)return u;a=rt(n,i=u.line)}}function Dn(e,t,r,n){n-=bn(t);var i=t.text.length,o=he((function(t){return sn(e,r,t-1).bottom<=n}),i,0);return{begin:o,end:i=he((function(t){return sn(e,r,t).top>n}),o,i)}}function An(e,t,r,n){return r||(r=ln(e,t)),Dn(e,t,r,kn(e,t,sn(e,r,n),"line").top)}function Fn(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Nn(e,t,r,n,i){i-=cr(t);var o=ln(e,t),a=bn(t),l=0,s=t.text.length,u=!0,c=ve(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?En:On)(e,t,r,o,c,n,i);l=(u=1!=d.level)?d.from:d.to-1,s=u?d.to:d.from-1}var h,f,p=null,m=null,g=he((function(t){var r=sn(e,o,t);return r.top+=a,r.bottom+=a,!!Fn(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,m=r),!0)}),l,s),v=!1;if(m){var y=n-m.left=b.bottom?1:0}return Mn(r,g=de(t.text,g,1),f,v,n-h)}function On(e,t,r,n,i,o,a){var l=he((function(l){var s=i[l],u=1!=s.level;return Fn(Sn(e,ct(r,u?s.to:s.from,u?"before":"after"),"line",t,n),o,a,!0)}),0,i.length-1),s=i[l];if(l>0){var u=1!=s.level,c=Sn(e,ct(r,u?s.from:s.to,u?"after":"before"),"line",t,n);Fn(c,o,a,!0)&&c.top>a&&(s=i[l-1])}return s}function En(e,t,r,n,i,o,a){var l=Dn(e,t,n,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,d=null,h=0;h=u||f.to<=s)){var p=sn(e,n,1!=f.level?Math.min(u,f.to)-1:Math.max(s,f.from)).right,m=pm)&&(c=f,d=m)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function zn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==un){un=F("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)un.appendChild(document.createTextNode("x")),un.appendChild(F("br"));un.appendChild(document.createTextNode("x"))}A(e.measure,un);var r=un.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),D(e.measure),r||1}function Wn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=F("span","xxxxxxxxxx"),r=F("pre",[t],"CodeMirror-line-like");A(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Pn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;r[l]=o.offsetLeft+o.clientLeft+i,n[l]=o.clientWidth}return{fixedPos:Hn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Hn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function In(e){var t=zn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Wn(e.display)-3);return function(i){if(sr(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(s=rt(e.doc,u.line).text).length==u.ch){var c=V(s,s.length,e.options.tabSize)-s.length;u=ct(u.line,Math.max(0,Math.round((o-Zr(e.display).left)/Wn(e.display))-c))}return u}function Rn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Wt&&ar(e.doc,t)i.viewFrom?Un(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Un(e);else if(t<=i.viewFrom){var o=Kn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Un(e)}else if(r>=i.viewTo){var a=Kn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Un(e)}else{var l=Kn(e,t,t,-1),s=Kn(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(Tr(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Un(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[Rn(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==K(a,r)&&a.push(r)}}}function Un(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Kn(e,t,r,n){var i,o=Rn(e,t),a=e.display.view;if(!Wt||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var l=e.display.viewFrom,s=0;s0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,r+=i}for(;ar(e.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null;r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function $n(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Tr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Tr(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,Rn(e,r)))),n.viewTo=r}function Gn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo||s.to().line0?a:e.defaultCharWidth())+"px"}if(n.other){var l=r.appendChild(F("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=n.other.left+"px",l.style.top=n.other.top+"px",l.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Zn(e,t){return e.top-t.top||e.left-t.left}function Qn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=Zr(e.display),l=a.left,s=Math.max(n.sizerWidth,Jr(e)-n.sizer.offsetLeft)-a.right,u="ltr"==i.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(F("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?s-e:r)+"px;\n height: "+(n-t)+"px"))}function d(t,r,n){var o,a,d=rt(i,t),h=d.text.length;function f(r,n){return Cn(e,ct(t,r),"div",d,n)}function p(t,r,n){var i=An(e,d,null,t),o="ltr"==r==("after"==n)?"left":"right";return f("after"==n?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),o)[o]}var m=ve(d,i.direction);return fe(m,r||0,null==n?h:n,(function(e,t,i,d){var g="ltr"==i,v=f(e,g?"left":"right"),y=f(t-1,g?"right":"left"),x=null==r&&0==e,b=null==n&&t==h,k=0==d,w=!m||d==m.length-1;if(y.top-v.top<=3){var C=(u?b:x)&&w,S=(u?x:b)&&k?l:(g?v:y).left,L=C?s:(g?y:v).right;c(S,v.top,L-S,v.bottom)}else{var M,T,D,A;g?(M=u&&x&&k?l:v.left,T=u?s:p(e,i,"before"),D=u?l:p(t,i,"after"),A=u&&b&&w?s:y.right):(M=u?p(e,i,"before"):l,T=!u&&x&&k?s:v.right,D=!u&&b&&w?l:y.left,A=u?p(t,i,"after"):s),c(M,v.top,T-M,v.bottom),v.bottom0?t.blinker=setInterval((function(){e.hasFocus()||ni(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ei(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ri(e))}function ti(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ni(e))}),100)}function ri(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(we(e,"focus",e,t),e.state.focused=!0,z(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Jn(e))}function ni(e,t){e.state.delayingBlurEvent||(e.state.focused&&(we(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function ii(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,s=0;s.005||m<-.005)&&(ie.display.sizerWidth){var v=Math.ceil(h/Wn(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function oi(e){if(e.widgets)for(var t=0;t=a&&(o=lt(t,cr(rt(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function li(e,t){if(!Ce(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null,o=r.wrapper.ownerDocument;if(t.top+n.top<0?i=!0:t.bottom+n.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),null!=i&&!m){var a=F("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Xr(e.display))+"px;\n height: "+(t.bottom-t.top+Qr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function si(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?ct(t.line,t.ch+1,"before"):t,t=t.ch?ct(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,l=Sn(e,t),s=r&&r!=t?Sn(e,r):l,u=ci(e,i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-n,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+n}),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=u.scrollTop&&(vi(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(xi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}function ui(e,t){var r=ci(e,t);null!=r.scrollTop&&vi(e,r.scrollTop),null!=r.scrollLeft&&xi(e,r.scrollLeft)}function ci(e,t){var r=e.display,n=zn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=en(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Yr(r),s=t.topl-n;if(t.topi+o){var c=Math.min(t.top,(u?l:t.bottom)-o);c!=i&&(a.scrollTop=c)}var d=e.options.fixedGutter?0:r.gutters.offsetWidth,h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-d,f=Jr(e)-r.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.leftf+h-3&&(a.scrollLeft=t.right+(p?0:10)-f),a}function di(e,t){null!=t&&(mi(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function hi(e){mi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function fi(e,t,r){null==t&&null==r||mi(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function pi(e,t){mi(e),e.curOp.scrollToPos=t}function mi(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,gi(e,Ln(e,t.from),Ln(e,t.to),t.margin))}function gi(e,t,r,n){var i=ci(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});fi(e,i.scrollLeft,i.scrollTop)}function vi(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||_i(e,{top:t}),yi(e,t,!0),r&&_i(e),Bi(e,100))}function yi(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function xi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Qi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function bi(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Yr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Qr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var ki=function(e,t,r){this.cm=r;var n=this.vert=F("div",[F("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=F("div",[F("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),xe(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),xe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ki.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},ki.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ki.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ki.prototype.zeroWidthHack=function(){var e=x&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new U,this.disableVert=new U},ki.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,n)}e.style.visibility="",t.set(1e3,n)},ki.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var wi=function(){};function Ci(e,t){t||(t=bi(e));var r=e.display.barWidth,n=e.display.barHeight;Si(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&ii(e),Si(e,bi(e)),r=e.display.barWidth,n=e.display.barHeight}function Si(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}wi.prototype.update=function(){return{bottom:0,right:0}},wi.prototype.setScrollLeft=function(){},wi.prototype.setScrollTop=function(){},wi.prototype.clear=function(){};var Li={native:ki,null:wi};function Mi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Li[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),xe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?xi(e,t):vi(e,t)}),e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}var Ti=0;function Di(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ti,markArrays:null},Ar(e.curOp)}function Ai(e){var t=e.curOp;t&&Nr(t,(function(e){for(var t=0;t=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new qi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Oi(e){e.updatedDisplay=e.mustUpdate&&$i(e.cm,e.update)}function Ei(e){var t=e.cm,r=t.display;e.updatedDisplay&&ii(t),e.barMeasure=bi(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=on(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Qr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Jr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function zi(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var r=+new Date+e.options.workTime,n=St(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(n.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?Qe(t.mode,n.state):null,s=wt(e,o,n,!0);l&&(n.state=l),o.styles=s.styles;var u=o.styleClasses,c=s.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),h=0;!d&&hr)return Bi(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Pi(e,(function(){for(var t=0;t=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Gn(e))return!1;Ji(e)&&(Un(e),t.dims=Pn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFroma&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),Wt&&(o=ar(e.doc,o),a=lr(e.doc,a));var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;$n(e,o,a),r.viewOffset=cr(rt(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=Gn(e);if(!l&&0==s&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=Ui(e);return s>4&&(r.lineDiv.style.display="none"),Xi(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Ki(u),D(r.cursorDiv),D(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Bi(e,400)),r.updateLineNumbers=null,!0}function Gi(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Jr(e))n&&(t.visible=ai(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Yr(e.display)-en(e),r.top)}),t.visible=ai(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!$i(e,t))break;ii(e);var i=bi(e);_n(e),Ci(e,i),Zi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function _i(e,t){var r=new qi(e,t);if($i(e,r)){ii(e),Gi(e,r);var n=bi(e);_n(e),Ci(e,n),Zi(e,n),r.finish()}}function Xi(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function l(t){var r=t.nextSibling;return s&&x&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,d=0;d-1&&(f=!1),Wr(e,h,c,r)),f&&(D(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(ut(e.options,c)))),a=h.node.nextSibling}else{var p=Vr(e,h,c,r);o.insertBefore(p,a)}c+=h.size}for(;a;)a=l(a)}function Yi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Er(e,"gutterChanged",e)}function Zi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Qr(e)+"px"}function Qi(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=Hn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a=105&&(o.wrapper.style.clipPath="inset(0px)"),o.wrapper.setAttribute("translate","no"),a&&l<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),s||r&&y||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=eo(i.gutters,i.lineNumbers),to(o),n.init(o)}qi.prototype.signal=function(e,t){Le(e,t)&&this.events.push(arguments)},qi.prototype.finish=function(){for(var e=0;eu.clientWidth,p=u.scrollHeight>u.clientHeight;if(i&&f||o&&p){if(o&&x&&s)e:for(var m=t.target,g=l.view;m!=u;m=m.parentNode)for(var v=0;v=0&&dt(e,n.to())<=0)return r}return-1};var co=function(e,t){this.anchor=e,this.head=t};function ho(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort((function(e,t){return dt(e.from(),t.from())})),r=K(t,i);for(var o=1;o0:s>=0){var u=mt(l.from(),a.from()),c=pt(l.to(),a.to()),d=l.empty()?a.from()==a.head:l.from()==l.head;o<=r&&--r,t.splice(--o,2,new co(d?c:u,d?u:c))}}return new uo(t,r)}function fo(e,t){return new uo([new co(e,t||e)],0)}function po(e){return e.text?ct(e.from.line+e.text.length-1,ee(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function mo(e,t){if(dt(e,t.from)<0)return e;if(dt(e,t.to)<=0)return po(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=po(t).ch-t.to.ch),ct(r,n)}function go(e,t){for(var r=[],n=0;n1&&e.remove(l.line+1,p-1),e.insert(l.line+1,v)}Er(e,"change",e,t)}function Co(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges?(e.done.pop(),ee(e.done)):void 0}function No(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Fo(i,i.lastOp==n)))a=ee(o.changes),0==dt(t.from,t.to)&&0==dt(t.from,a.to)?a.to=po(t):o.changes.push(Do(e,t));else{var s=ee(i.done);for(s&&s.ranges||zo(e.sel,i.done),o={changes:[Do(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||we(e,"historyAdded")}function Oo(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Eo(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Oo(e,o,ee(i.done),t))?i.done[i.done.length-1]=t:zo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&Ao(i.undone)}function zo(e,t){var r=ee(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Wo(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o}))}function Po(e){if(!e)return null;for(var t,r=0;r-1&&(ee(l)[d]=u[d],delete u[d])}}}return n}function Bo(e,t,r,n){if(n){var i=e.anchor;if(r){var o=dt(t,i)<0;o!=dt(r,i)<0?(i=t,t=r):o!=dt(t,r)<0&&(t=r)}return new co(i,t)}return new co(r||t,t)}function Ro(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Go(e,new uo([Bo(e.sel.primary(),t,r,i)],0),n)}function qo(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:l.to>t.ch))){if(i&&(we(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(r){var d=s.find(n<0?1:-1),h=void 0;if((n<0?c:u)&&(d=ea(e,d,-n,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(h=dt(d,r))&&(n<0?h<0:h>0))return Qo(e,d,t,n,i)}var f=s.find(n<0?-1:1);return(n<0?u:c)&&(f=ea(e,f,n,f.line==t.line?o:null)),f?Qo(e,f,t,n,i):null}}return t}function Jo(e,t,r,n,i){var o=n||1,a=Qo(e,t,r,o,i)||!i&&Qo(e,t,r,o,!0)||Qo(e,t,r,-o,i)||!i&&Qo(e,t,r,-o,!0);return a||(e.cantEdit=!0,ct(e.first,0))}function ea(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?vt(e,ct(t.line-1)):null:r>0&&t.ch==(n||rt(e,t.line)).text.length?t.line=0;--i)ia(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else ia(e,t)}}function ia(e,t){if(1!=t.text.length||""!=t.text[0]||0!=dt(t.from,t.to)){var r=go(e,t);No(e,t,r,e.cm?e.cm.curOp.id:NaN),la(e,t,r,Ut(e,t));var n=[];Co(e,(function(e,r){r||-1!=K(n,e.history)||(ha(e.history,t),n.push(e.history)),la(e,t,null,Ut(e,t))}))}}function oa(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,a=e.sel,l="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,u=0;u=0;--f){var p=h(f);if(p)return p.v}}}}function aa(e,t){if(0!=t&&(e.first+=t,e.sel=new uo(te(e.sel.ranges,(function(e){return new co(ct(e.anchor.line+t,e.anchor.ch),ct(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){qn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ct(o,rt(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=nt(e,t.from,t.to),r||(r=go(e,t)),e.cm?sa(e.cm,t,n):wo(e,t,n),_o(e,r,_),e.cantEdit&&Jo(e,ct(e.firstLine(),0))&&(e.cantEdit=!1)}}function sa(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=at(nr(rt(n,o.line))),n.iter(s,a.line+1,(function(e){if(e==i.maxLine)return l=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&Se(e),wo(n,t,r,In(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,(function(e){var t=dr(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0)),Et(n,o.line),Bi(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?qn(e):o.line!=a.line||1!=t.text.length||ko(e.doc,t)?qn(e,o.line,a.line+1,u):Vn(e,o.line,"text");var c=Le(e,"changes"),d=Le(e,"change");if(d||c){var h={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Er(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function ua(e,t,r,n,i){var o;n||(n=r),dt(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),na(e,{from:r,to:n,text:t,origin:i})}function ca(e,t,r,n){r1||!(this.children[0]instanceof pa))){var l=[];this.collapse(l),this.children=[new pa(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,l=a;l10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=N("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(rr(e,t.line,t,r,o)||t.line!=r.line&&rr(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ht()}o.addToHistory&&No(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l,s=t.line,u=e.cm;if(e.iter(s,r.line+1,(function(n){u&&o.collapsed&&!u.options.lineWrapping&&nr(n)==u.display.maxLine&&(l=!0),o.collapsed&&s!=t.line&&ot(n,0),Rt(n,new It(o,s==t.line?t.ch:null,s==r.line?r.ch:null),e.cm&&e.cm.curOp),++s})),o.collapsed&&e.iter(t.line,r.line+1,(function(t){sr(e,t)&&ot(t,0)})),o.clearOnEnter&&xe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Pt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++xa,o.atomic=!0),u){if(l&&(u.curOp.updateMaxLine=!0),o.collapsed)qn(u,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=r.line;c++)Vn(u,c,"text");o.atomic&&Yo(u.doc),Er(u,"markerAdded",u,o)}return o}ba.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Di(e),Le(this,"clear")){var r=this.find();r&&Er(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&qn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Yo(e.doc)),e&&Er(e,"markerCleared",e,this,n,i),t&&Ai(e),this.parent&&this.parent.clear()}},ba.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;s--)na(this,n[s]);l?$o(this,l):this.cm&&hi(this.cm)})),undo:ji((function(){oa(this,"undo")})),redo:ji((function(){oa(this,"redo")})),undoSelection:ji((function(){oa(this,"undo",!0)})),redoSelection:ji((function(){oa(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=vt(this,e),t=vt(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var l=0;l=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=o,++r})),vt(this,ct(r,t))},indexFromPos:function(e){var t=(e=vt(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),_o(t.doc,fo(r,r)),h)for(var f=0;f=0;t--)ua(e.doc,"",n[t].from,n[t].to,"+delete");hi(e)}))}function Qa(e,t,r){var n=de(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Ja(e,t,r){var n=Qa(e,t.ch,r);return null==n?null:new ct(t.line,n,r<0?"after":"before")}function el(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ve(r,t.doc.direction);if(o){var a,l=i<0?ee(o):o[0],s=i<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var u=ln(t,r);a=i<0?r.text.length-1:0;var c=sn(t,u,a).top;a=he((function(e){return sn(t,u,e).top==c}),i<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=Qa(r,a,1))}else a=i<0?l.to:l.from;return new ct(n,a,s)}}return new ct(n,i<0?r.text.length:0,i<0?"before":"after")}function tl(e,t,r,n){var i=ve(t,e.doc.direction);if(!i)return Ja(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=me(i,r.ch,r.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from=a.from&&h>=c.begin)){var f=d?"before":"after";return new ct(r.line,h,f)}}var p=function(e,t,n){for(var o=function(e,t){return t?new ct(r.line,s(e,1),"before"):new ct(r.line,e,"after")};e>=0&&e0==(1!=a.level),u=l?n.begin:s(n.end,-1);if(a.from<=u&&u0?c.end:s(c.begin,-1);return null==g||n>0&&g==t.text.length||!(m=p(n>0?0:i.length-1,n,u(g)))?null:m}Va.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Va.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Va.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Va.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Va.default=x?Va.macDefault:Va.pcDefault;var rl={selectAll:ta,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),_)},killLine:function(e){return Za(e,(function(t){if(t.empty()){var r=rt(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)i=new ct(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ct(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=rt(e.doc,i.line-1).text;a&&(i=new ct(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),ct(i.line-1,a.length-1),i,"+transpose"))}r.push(new co(i,i))}e.setSelections(r)}))},newlineAndIndent:function(e){return Pi(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n-1&&(dt((i=l.ranges[i]).from(),t)<0||t.xRel>0)&&(dt(i.to(),t)>0||t.xRel<0)?Tl(e,n,t,o):Al(e,n,t,o)}function Tl(e,t,r,n){var i=e.display,o=!1,u=Hi(e,(function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ti(e)),ke(i.wrapper.ownerDocument,"mouseup",u),ke(i.wrapper.ownerDocument,"mousemove",c),ke(i.scroller,"dragstart",d),ke(i.scroller,"drop",u),o||(Te(t),n.addNew||Ro(e.doc,r,null,null,n.extend),s&&!f||a&&9==l?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!n.moveOnDrag,xe(i.wrapper.ownerDocument,"mouseup",u),xe(i.wrapper.ownerDocument,"mousemove",c),xe(i.scroller,"dragstart",d),xe(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Dl(e,t,r){if("char"==r)return new co(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new co(ct(t.line,0),vt(e.doc,ct(t.line+1,0)));var n=r(e,t);return new co(n.from,n.to)}function Al(e,t,r,n){a&&ti(e);var i=e.display,o=e.doc;Te(t);var l,s,u=o.sel,c=u.ranges;if(n.addNew&&!n.extend?(s=o.sel.contains(r),l=s>-1?c[s]:new co(r,r)):(l=o.sel.primary(),s=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(l=new co(r,r)),r=Bn(e,t,!0,!0),s=-1;else{var d=Dl(e,r,n.unit);l=n.extend?Bo(l,d.anchor,d.head,n.extend):d}n.addNew?-1==s?(s=c.length,Go(o,ho(e,c.concat([l]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==n.unit&&!n.extend?(Go(o,ho(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Vo(o,s,l,X):(s=0,Go(o,new uo([l],0),X),u=o.sel);var h=r;function f(t){if(0!=dt(h,t))if(h=t,"rectangle"==n.unit){for(var i=[],a=e.options.tabSize,c=V(rt(o,r.line).text,r.ch,a),d=V(rt(o,t.line).text,t.ch,a),f=Math.min(c,d),p=Math.max(c,d),m=Math.min(r.line,t.line),g=Math.min(e.lastLine(),Math.max(r.line,t.line));m<=g;m++){var v=rt(o,m).text,y=Z(v,f,a);f==p?i.push(new co(ct(m,y),ct(m,y))):v.length>y&&i.push(new co(ct(m,y),ct(m,Z(v,p,a))))}i.length||i.push(new co(r,r)),Go(o,ho(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,b=l,k=Dl(e,t,n.unit),w=b.anchor;dt(k.anchor,w)>0?(x=k.head,w=mt(b.from(),k.anchor)):(x=k.anchor,w=pt(b.to(),k.head));var C=u.ranges.slice(0);C[s]=Fl(e,new co(vt(o,w),x)),Go(o,ho(e,C,s),X)}}var p=i.wrapper.getBoundingClientRect(),m=0;function g(t){var r=++m,a=Bn(e,t,!0,"rectangle"==n.unit);if(a)if(0!=dt(a,h)){e.curOp.focus=E(I(e)),f(a);var l=ai(i,o);(a.line>=l.to||a.linep.bottom?20:0;s&&setTimeout(Hi(e,(function(){m==r&&(i.scroller.scrollTop+=s,g(t))})),50)}}function v(t){e.state.selectingText=!1,m=1/0,t&&(Te(t),i.input.focus()),ke(i.wrapper.ownerDocument,"mousemove",y),ke(i.wrapper.ownerDocument,"mouseup",x),o.history.lastSelOrigin=null}var y=Hi(e,(function(e){0!==e.buttons&&Oe(e)?g(e):v(e)})),x=Hi(e,v);e.state.selectingText=x,xe(i.wrapper.ownerDocument,"mousemove",y),xe(i.wrapper.ownerDocument,"mouseup",x)}function Fl(e,t){var r=t.anchor,n=t.head,i=rt(e.doc,r.line);if(0==dt(r,n)&&r.sticky==n.sticky)return t;var o=ve(i);if(!o)return t;var a=me(o,r.ch,r.sticky),l=o[a];if(l.from!=r.ch&&l.to!=r.ch)return t;var s,u=a+(l.from==r.ch==(1!=l.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)s=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=me(o,n.ch,n.sticky),d=c-a||(n.ch-r.ch)*(1==l.level?-1:1);s=c==u-1||c==u?d<0:d>0}var h=o[u+(s?-1:0)],f=s==(1==h.level),p=f?h.from:h.to,m=f?"after":"before";return r.ch==p&&r.sticky==m?t:new co(new ct(r.line,p,m),n)}function Nl(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(c){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Te(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Le(e,r))return Ae(t);o-=l.top-a.viewOffset;for(var s=0;s=i)return we(e,r,e,lt(e.doc,o),e.display.gutterSpecs[s].className,t),Ae(t)}}function Ol(e,t){return Nl(e,t,"gutterClick",!0)}function El(e,t){_r(e.display,t)||zl(e,t)||Ce(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function zl(e,t){return!!Le(e,"gutterContextMenu")&&Nl(e,t,"gutterContextMenu",!1)}function Wl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),vn(e)}kl.prototype.compare=function(e,t,r){return this.time+bl>e&&0==dt(t,this.pos)&&r==this.button};var Pl={toString:function(){return"CodeMirror.Init"}},Hl={},Il={};function jl(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=Pl&&i(e,t,r)}:i)}e.defineOption=r,e.Init=Pl,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,xo(e)}),!0),r("indentUnit",2,xo,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){bo(e),vn(e),qn(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(ct(n,o))}n++}));for(var i=r.length-1;i>=0;i--)ua(e.doc,t,r[i],ct(r[i].line,r[i].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Pl&&e.refresh()})),r("specialCharPlaceholder",br,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!k),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){Wl(e),ro(e)}),!0),r("keyMap","default",(function(e,t,r){var n=Ya(t),i=r!=Pl&&Ya(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Rl,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=eo(t,e.options.lineNumbers),ro(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Hn(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return Ci(e)}),!0),r("scrollbarStyle","native",(function(e){Mi(e),Ci(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=eo(e.options.gutters,t),ro(e)}),!0),r("firstLineNumber",1,ro,!0),r("lineNumberFormatter",(function(e){return e}),ro,!0),r("showCursorWhenSelecting",!1,_n,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(ni(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Bl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,_n,!0),r("singleCursorHeightPerLine",!0,_n,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,bo,!0),r("addModeClass",!1,bo,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,bo,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}function Bl(e,t,r){if(!t!=!(r&&r!=Pl)){var n=e.display.dragFunctions,i=t?xe:ke;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Rl(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),hr(e)),jn(e),qn(e),vn(e),setTimeout((function(){return Ci(e)}),100)}function ql(e,t){var r=this;if(!(this instanceof ql))return new ql(e,t);this.options=t=t?q(t):{},q(Hl,t,!1);var n=t.value;"string"==typeof n?n=new Da(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new ql.inputStyles[t.inputStyle](this),o=this.display=new no(e,n,i,t);for(var u in o.wrapper.CodeMirror=this,Wl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Mi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new U,keySeq:null,specialChars:null},t.autofocus&&!y&&o.input.focus(),a&&l<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),Vl(this),Pa(),Di(this),this.curOp.forceUpdate=!0,So(this,n),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&ri(r)}),20):ni(this),Il)Il.hasOwnProperty(u)&&Il[u](this,t[u],Pl);Ji(this),t.finishInit&&t.finishInit(this);for(var c=0;c400}xe(t.scroller,"touchstart",(function(i){if(!Ce(e,i)&&!o(i)&&!Ol(e,i)){t.input.ensurePolled(),clearTimeout(r);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),xe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),xe(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!_r(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!n.prev||s(n,n.prev)?new co(a,a):!n.prev.prev||s(n,n.prev.prev)?e.findWordAt(a):new co(ct(a.line,0),vt(e.doc,ct(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Te(r)}i()})),xe(t.scroller,"touchcancel",i),xe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(vi(e,t.scroller.scrollTop),xi(e,t.scroller.scrollLeft,!0),we(e,"scroll",e))})),xe(t.scroller,"mousewheel",(function(t){return so(e,t)})),xe(t.scroller,"DOMMouseScroll",(function(t){return so(e,t)})),xe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){Ce(e,t)||Fe(t)},over:function(t){Ce(e,t)||(Oa(e,t),Fe(t))},start:function(t){return Na(e,t)},drop:Hi(e,Fa),leave:function(t){Ce(e,t)||Ea(e)}};var u=t.input.getField();xe(u,"keyup",(function(t){return gl.call(e,t)})),xe(u,"keydown",Hi(e,pl)),xe(u,"keypress",Hi(e,vl)),xe(u,"focus",(function(t){return ri(e,t)})),xe(u,"blur",(function(t){return ni(e,t)}))}ql.defaults=Hl,ql.optionHandlers=Il;var Ul=[];function Kl(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=St(e,t).state:r="prev");var a=e.options.tabSize,l=rt(o,t),s=V(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u,c=l.text.match(/^\s*/)[0];if(n||/\S/.test(l.text)){if("smart"==r&&((u=o.mode.indent(i,l.text.slice(c.length),l.text))==G||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?V(rt(o,t-1).text,null,a):0:"add"==r?u=s+e.options.indentUnit:"subtract"==r?u=s-e.options.indentUnit:"number"==typeof r&&(u=s+r),u=Math.max(0,u);var d="",h=0;if(e.options.indentWithTabs)for(var f=Math.floor(u/a);f;--f)h+=a,d+="\t";if(ha,s=je(t),u=null;if(l&&n.ranges.length>1)if($l&&$l.text.join("\n")==t){if(n.ranges.length%$l.text.length==0){u=[];for(var c=0;c<$l.text.length;c++)u.push(o.splitLines($l.text[c]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=te(s,(function(e){return[e]})));for(var d=e.curOp.updateInput,h=n.ranges.length-1;h>=0;h--){var f=n.ranges[h],p=f.from(),m=f.to();f.empty()&&(r&&r>0?p=ct(p.line,p.ch-r):e.state.overwrite&&!l?m=ct(m.line,Math.min(rt(o,m.line).text.length,m.ch+ee(s).length)):l&&$l&&$l.lineWise&&$l.text.join("\n")==s.join("\n")&&(p=m=ct(p.line,0)));var g={from:p,to:m,text:u?u[h%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};na(e.doc,g),Er(e,"inputRead",e,g)}t&&!l&&Yl(e,t),hi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Xl(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||Pi(t,(function(){return _l(t,r,0,null,"paste")})),!0}function Yl(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l-1){a=Kl(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(rt(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Kl(e,i.head.line,"smart"));a&&Er(e,"electricInput",e,i.head.line)}}}function Zl(e){for(var t=[],r=[],n=0;nr&&(Kl(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&hi(this));else{var o=i.from(),a=i.to(),l=Math.max(r,o.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s0&&Vo(this.doc,n,new co(o,u[n].to()),_)}}})),getTokenAt:function(e,t){return At(this,e,t)},getLineTokens:function(e,t){return At(this,ct(e),t,!0)},getTokenTypeAt:function(e){e=vt(this.doc,e);var t,r=Ct(this,rt(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]o&&(e=o,i=!0),n=rt(this.doc,e)}else n=e;return kn(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-cr(n):0)},defaultTextHeight:function(){return zn(this.display)},defaultCharWidth:function(){return Wn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,a=(e=Sn(this,vt(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>u&&(l=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&ui(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Ii(pl),triggerOnKeyPress:Ii(vl),triggerOnKeyUp:gl,triggerOnMouseDown:Ii(Cl),execCommand:function(e){if(rl.hasOwnProperty(e))return rl[e].call(null,this)},triggerElectric:Ii((function(e){Yl(this,e)})),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=vt(this.doc,e),a=0;a0&&a(t.charAt(r-1));)--r;for(;n.5||this.options.lineWrapping)&&jn(this),we(this,"refresh",this)})),swapDoc:Ii((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),So(this,e),vn(this),this.display.input.reset(),fi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Er(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Me(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function ts(e,t,r,n,i){var o=t,a=r,l=rt(e,t.line),s=i&&"rtl"==e.direction?-r:r;function u(){var r=t.line+s;return!(r=e.first+e.size)&&(t=new ct(r,t.ch,t.sticky),l=rt(e,r))}function c(o){var a;if("codepoint"==n){var c=l.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(c))a=null;else{var d=r>0?c>=55296&&c<56320:c>=56320&&c<57343;a=new ct(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(d?2:1))),-r)}}else a=i?tl(e.cm,l,t,r):Ja(l,t,r);if(null==a){if(o||!u())return!1;t=el(i,e.cm,l,t.line,s)}else t=a;return!0}if("char"==n||"codepoint"==n)c();else if("column"==n)c(!0);else if("word"==n||"group"==n)for(var d=null,h="group"==n,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(r<0)||c(!p);p=!1){var m=l.text.charAt(t.ch)||"\n",g=le(m,f)?"w":h&&"\n"==m?"n":!h||/\s/.test(m)?null:"p";if(!h||p||g||(g="s"),d&&d!=g){r<0&&(r=1,c(),t.sticky="after");break}if(g&&(d=g),r>0&&!c(!p))break}var v=Jo(e,t,o,a,!0);return ht(o,v)&&(v.hitSide=!0),v}function rs(e,t,r,n){var i,o,a=e.doc,l=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,B(e).innerHeight||a(e).documentElement.clientHeight),u=Math.max(s-.5*zn(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=Tn(e,l,i)).outside;){if(r<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*r}return o}var ns=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new U,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function is(e,t){var r=an(e,t.line);if(!r||r.hidden)return null;var n=rt(e.doc,t.line),i=rn(r,n,t.line),o=ve(n,e.doc.direction),a="left";o&&(a=me(o,t.ch)%2?"right":"left");var l=dn(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function os(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function as(e,t){return t&&(e.bad=!0),e}function ls(e,t,r,n,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function u(e){return function(t){return t.id==e}}function c(){a&&(o+=l,s&&(o+=l),a=s=!1)}function d(e){e&&(c(),o+=e)}function h(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void d(r);var o,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(ct(n,0),ct(i+1,0),u(+f));return void(p.length&&(o=p[0].find(0))&&d(nt(e.doc,o.from,o.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&c();for(var g=0;g=t.display.viewTo||o.line=t.display.viewFrom&&is(t,i)||{node:s[0].measure.map[2],offset:0},c=o.linen.firstLine()&&(a=ct(a.line-1,rt(n.doc,a.line-1).length)),l.ch==rt(n.doc,l.line).text.length&&l.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=Rn(n,a.line))?(t=at(i.view[0].line),r=i.view[0].node):(t=at(i.view[e].line),r=i.view[e-1].node.nextSibling);var s,u,c=Rn(n,l.line);if(c==i.view.length-1?(s=i.viewTo-1,u=i.lineDiv.lastChild):(s=at(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var d=n.doc.splitLines(ls(n,r,u,t,s)),h=nt(n.doc,ct(t,0),ct(s,rt(n.doc,s).text.length));d.length>1&&h.length>1;)if(ee(d)==ee(h))d.pop(),h.pop(),s--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),t++}for(var f=0,p=0,m=d[0],g=h[0],v=Math.min(m.length,g.length);fa.ch&&y.charCodeAt(y.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;d[d.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var k=ct(t,f),w=ct(s,h.length?ee(h).length-p:0);return d.length>1||d[0]||dt(k,w)?(ua(n.doc,d,k,w,"+input"),!0):void 0},ns.prototype.ensurePolled=function(){this.forceCompositionEnd()},ns.prototype.reset=function(){this.forceCompositionEnd()},ns.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ns.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},ns.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Pi(this.cm,(function(){return qn(e.cm)}))},ns.prototype.setUneditable=function(e){e.contentEditable="false"},ns.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Hi(this.cm,_l)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ns.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},ns.prototype.onContextMenu=function(){},ns.prototype.resetPosition=function(){},ns.prototype.needsContentAttribute=!0;var cs=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new U,this.hasSelection=!1,this.composing=null,this.resetting=!1};function ds(e,t){if((t=t?q(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=E(j(e));t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(xe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(Ie){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(ke(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var l=ql((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return l}function hs(e){e.off=ke,e.on=xe,e.wheelEventPixels=lo,e.Doc=Da,e.splitLines=je,e.countColumn=V,e.findColumn=Z,e.isWordChar=ae,e.Pass=G,e.signal=we,e.Line=fr,e.changeEnd=po,e.scrollbarModel=Li,e.Pos=ct,e.cmpPos=dt,e.modes=Ue,e.mimeModes=Ke,e.resolveMode=_e,e.getMode=Xe,e.modeExtensions=Ye,e.extendMode=Ze,e.copyState=Qe,e.startState=et,e.innerMode=Je,e.commands=rl,e.keyMap=Va,e.keyName=Xa,e.isModifierKey=Ga,e.lookupKey=$a,e.normalizeKeyMap=Ka,e.StringStream=tt,e.SharedTextMarker=wa,e.TextMarker=ba,e.LineWidget=ga,e.e_preventDefault=Te,e.e_stopPropagation=De,e.e_stop=Fe,e.addClass=z,e.contains=O,e.rmClass=T,e.keyNames=ja}cs.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!Ce(n,e)){if(n.somethingSelected())Gl({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Zl(n);Gl({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,_):(r.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),xe(i,"input",(function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),xe(i,"paste",(function(e){Ce(n,e)||Xl(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),xe(i,"cut",o),xe(i,"copy",o),xe(e.scroller,"paste",(function(t){if(!_r(e,t)&&!Ce(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),xe(e.lineSpace,"selectstart",(function(t){_r(e,t)||Te(t)})),xe(i,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),xe(i,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},cs.prototype.createField=function(e){this.wrapper=Jl(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Ql(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},cs.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},cs.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Xn(e);if(e.options.moveInputWithCursor){var i=Sn(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},cs.prototype.showSelection=function(e){var t=this.cm.display;A(t.cursorDiv,e.cursors),A(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},cs.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&P(this.textarea),a&&l>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null));this.resetting=!1}},cs.prototype.getField=function(){return this.textarea},cs.prototype.supportsTouch=function(){return!1},cs.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||E(j(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(Ie){}},cs.prototype.blur=function(){this.textarea.blur()},cs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},cs.prototype.receivedFocus=function(){this.slowPoll()},cs.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},cs.prototype.fastPoll=function(){var e=!1,t=this;function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}t.pollingFast=!0,t.polling.set(20,r)},cs.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Be(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(a&&l>=9&&this.hasSelection===i||x&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,u=Math.min(n.length,i.length);s1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},cs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},cs.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},cs.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Bn(r,e),u=n.scroller.scrollTop;if(o&&!h){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&Hi(r,Go)(r.doc,fo(o),_);var c,d=i.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(c=i.ownerDocument.defaultView.scrollY),n.input.focus(),s&&i.ownerDocument.defaultView.scrollTo(null,c),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),a&&l>=9&&g(),S){Fe(e);var m=function(){ke(window,"mouseup",m),setTimeout(v,20)};xe(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=d,a&&l<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart)){(!a||a&&l<9)&&g();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Hi(r,ta)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},cs.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},cs.prototype.setUneditable=function(){},cs.prototype.needsContentAttribute=!1,jl(ql),es(ql);var fs="iter insert remove copy getEditor constructor".split(" ");for(var ps in Da.prototype)Da.prototype.hasOwnProperty(ps)&&K(fs,ps)<0&&(ql.prototype[ps]=function(e){return function(){return e.apply(this.doc,arguments)}}(Da.prototype[ps]));return Me(Da),ql.inputStyles={textarea:cs,contenteditable:ns},ql.defineMode=function(e){ql.defaults.mode||"null"==e||(ql.defaults.mode=e),$e.apply(this,arguments)},ql.defineMIME=Ge,ql.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),ql.defineMIME("text/plain","null"),ql.defineExtension=function(e,t){ql.prototype[e]=t},ql.defineDocExtension=function(e,t){Da.prototype[e]=t},ql.fromTextArea=ds,hs(ql),ql.version="5.65.16",ql}()),n.exports}const o=e(i());var a,l={};function s(){return a||(a=1,e=i(),t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1},e.defineMode("xml",(function(n,i){var o,a,l=n.indentUnit,s={},u=i.htmlMode?t:r;for(var c in u)s[c]=u[c];for(var c in i)s[c]=i[c];function d(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();return"<"==n?e.eat("!")?e.eat("[")?e.match("CDATA[")?r(p("atom","]]>")):null:e.match("--")?r(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(m(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=h,"tag bracket"):"&"==n?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function h(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=d,o=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return o="equals",null;if("<"==r){t.tokenize=d,t.state=b,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=f(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=h;break}return"string"};return t.isInAttribute=!0,t}function p(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=d;break}r.next()}return e}}function m(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=m(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=d;break}return r.tokenize=m(e-1),r.tokenize(t,r)}}return"meta"}}function g(e){return e&&e.toLowerCase()}function v(e,t,r){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=r,(s.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function y(e){e.context&&(e.context=e.context.prev)}function x(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!s.contextGrabbers.hasOwnProperty(g(r))||!s.contextGrabbers[g(r)].hasOwnProperty(g(t)))return;y(e)}}function b(e,t,r){return"openTag"==e?(r.tagStart=t.column(),k):"closeTag"==e?w:b}function k(e,t,r){return"word"==e?(r.tagName=t.current(),a="tag",L):s.allowMissingTagName&&"endTag"==e?(a="tag bracket",L(e,t,r)):(a="error",k)}function w(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&s.implicitlyClosed.hasOwnProperty(g(r.context.tagName))&&y(r),r.context&&r.context.tagName==n||!1===s.matchClosing?(a="tag",C):(a="tag error",S)}return s.allowMissingTagName&&"endTag"==e?(a="tag bracket",C(e,t,r)):(a="error",S)}function C(e,t,r){return"endTag"!=e?(a="error",C):(y(r),b)}function S(e,t,r){return a="error",C(e,t,r)}function L(e,t,r){if("word"==e)return a="attribute",M;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||s.autoSelfClosers.hasOwnProperty(g(n))?x(r,n):(x(r,n),r.context=new v(r,n,i==r.indented)),b}return a="error",L}function M(e,t,r){return"equals"==e?T:(s.allowMissing||(a="error"),L(e,t,r))}function T(e,t,r){return"string"==e?D:"word"==e&&s.allowUnquoted?(a="string",L):(a="error",L(e,t,r))}function D(e,t,r){return"string"==e?D:L(e,t,r)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:b,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var r=t.tokenize(e,t);return(r||o)&&"comment"!=r&&(a=null,t.state=t.state(o||r,e,t),a&&(r="error"==a?r+" error":a)),r},indent:function(t,r,n){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=h&&t.tokenize!=d)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==s.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(s.multilineTagIndentFactor||1);if(s.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:s.htmlMode?"html":"xml",helperType:s.htmlMode?"html":"xml",skipAttribute:function(e){e.state==T&&(e.state=L)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],r=e.context;r;r=r.prev)t.push(r.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})),l;var e,t,r}var u,c,d={};function h(){return u||(u=1,(e=i()).defineMode("javascript",(function(t,r){var n,i,o=t.indentUnit,a=r.statementIndent,l=r.jsonld,s=r.json||l,u=!1!==r.trackScope,c=r.typescript,d=r.wordCharacters||/[\w$\xa1-\uffff]/,h=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),f=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function g(e,t,r){return n=e,i=r,t}function v(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=y(r),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g("number","number");if("."==r&&e.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return g(r);if("="==r&&e.eat(">"))return g("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g("number","number");if("/"==r)return e.eat("*")?(t.tokenize=x,x(e,t)):e.eat("/")?(e.skipToEnd(),g("comment","comment")):it(e,t,1)?(m(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2")):(e.eat("="),g("operator","operator",e.current()));if("`"==r)return t.tokenize=b,b(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),g("meta","meta");if("#"==r&&e.eatWhile(d))return g("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),g("comment","comment");if(f.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?g("."):g("operator","operator",e.current());if(d.test(r)){e.eatWhile(d);var n=e.current();if("."!=t.lastType){if(h.propertyIsEnumerable(n)){var i=h[n];return g(i.type,i.style,n)}if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",n)}return g("variable","variable",n)}}function y(e){return function(t,r){var n,i=!1;if(l&&"@"==t.peek()&&t.match(p))return r.tokenize=v,g("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=v),g("string","string")}}function x(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=v;break}n="*"==r}return g("comment","comment")}function b(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=v;break}n=!n&&"\\"==r}return g("quasi","string-2",e.current())}var k="([{}])";function w(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(c){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),s=k.indexOf(l);if(s>=0&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(d.test(l))o=!0;else if(/["'\/`]/.test(l))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==l&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(t.fatArrowAt=a)}}var C={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function S(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function L(e,t){if(!u)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function M(e,t,r,n,i){var o=e.cc;for(T.state=e,T.stream=i,T.marked=null,T.cc=o,T.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():s?K:V)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return T.marked?T.marked:"variable"==r&&L(e,n)?"variable-2":t}}var T={state:null,column:null,marked:null,cc:null};function D(){for(var e=arguments.length-1;e>=0;e--)T.cc.push(arguments[e])}function A(){return D.apply(null,arguments),!0}function F(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function N(e){var t=T.state;if(T.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=O(e,t.context);if(null!=n)return void(t.context=n)}else if(!F(e,t.localVars))return void(t.localVars=new W(e,t.localVars));r.globalVars&&!F(e,t.globalVars)&&(t.globalVars=new W(e,t.globalVars))}}function O(e,t){if(t){if(t.block){var r=O(e,t.prev);return r?r==t.prev?t:new z(r,t.vars,!0):null}return F(e,t.vars)?t:new z(t.prev,new W(e,t.vars),!1)}return null}function E(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function z(e,t,r){this.prev=e,this.vars=t,this.block=r}function W(e,t){this.name=e,this.next=t}var P=new W("this",new W("arguments",null));function H(){T.state.context=new z(T.state.context,T.state.localVars,!1),T.state.localVars=P}function I(){T.state.context=new z(T.state.context,T.state.localVars,!0),T.state.localVars=null}function j(){T.state.localVars=T.state.context.vars,T.state.context=T.state.context.prev}function B(e,t){var r=function(){var r=T.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new S(n,T.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function R(){var e=T.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function q(e){function t(r){return r==e?A():";"==e||"}"==r||")"==r||"]"==r?D():A(t)}return t}function V(e,t){return"var"==e?A(B("vardef",t),De,q(";"),R):"keyword a"==e?A(B("form"),G,V,R):"keyword b"==e?A(B("form"),V,R):"keyword d"==e?T.stream.match(/^\s*$/,!1)?A():A(B("stat"),X,q(";"),R):"debugger"==e?A(q(";")):"{"==e?A(B("}"),I,he,R,j):";"==e?A():"if"==e?("else"==T.state.lexical.info&&T.state.cc[T.state.cc.length-1]==R&&T.state.cc.pop()(),A(B("form"),G,V,R,ze)):"function"==e?A(Ie):"for"==e?A(B("form"),I,We,V,j,R):"class"==e||c&&"interface"==t?(T.marked="keyword",A(B("form","class"==e?e:t),Ve,R)):"variable"==e?c&&"declare"==t?(T.marked="keyword",A(V)):c&&("module"==t||"enum"==t||"type"==t)&&T.stream.match(/^\s*\w/,!1)?(T.marked="keyword","enum"==t?A(tt):"type"==t?A(Be,q("operator"),ve,q(";")):A(B("form"),Ae,q("{"),B("}"),he,R,R)):c&&"namespace"==t?(T.marked="keyword",A(B("form"),K,V,R)):c&&"abstract"==t?(T.marked="keyword",A(V)):A(B("stat"),oe):"switch"==e?A(B("form"),G,q("{"),B("}","switch"),I,he,R,R,j):"case"==e?A(K,q(":")):"default"==e?A(q(":")):"catch"==e?A(B("form"),H,U,V,R,j):"export"==e?A(B("stat"),Ge,R):"import"==e?A(B("stat"),Xe,R):"async"==e?A(V):"@"==t?A(K,V):D(B("stat"),K,q(";"),R)}function U(e){if("("==e)return A(Re,q(")"))}function K(e,t){return _(e,t,!1)}function $(e,t){return _(e,t,!0)}function G(e){return"("!=e?D():A(B(")"),X,q(")"),R)}function _(e,t,r){if(T.state.fatArrowAt==T.stream.start){var n=r?te:ee;if("("==e)return A(H,B(")"),ce(Re,")"),R,q("=>"),n,j);if("variable"==e)return D(H,Ae,q("=>"),n,j)}var i=r?Z:Y;return C.hasOwnProperty(e)?A(i):"function"==e?A(Ie,i):"class"==e||c&&"interface"==t?(T.marked="keyword",A(B("form"),qe,R)):"keyword c"==e||"async"==e?A(r?$:K):"("==e?A(B(")"),X,q(")"),R,i):"operator"==e||"spread"==e?A(r?$:K):"["==e?A(B("]"),et,R,i):"{"==e?de(le,"}",null,i):"quasi"==e?D(Q,i):"new"==e?A(re(r)):A()}function X(e){return e.match(/[;\}\)\],]/)?D():D(K)}function Y(e,t){return","==e?A(X):Z(e,t,!1)}function Z(e,t,r){var n=0==r?Y:Z,i=0==r?K:$;return"=>"==e?A(H,r?te:ee,j):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?A(n):c&&"<"==t&&T.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?A(B(">"),ce(ve,">"),R,n):"?"==t?A(K,q(":"),i):A(i):"quasi"==e?D(Q,n):";"!=e?"("==e?de($,")","call",n):"."==e?A(ae,n):"["==e?A(B("]"),X,q("]"),R,n):c&&"as"==t?(T.marked="keyword",A(ve,n)):"regexp"==e?(T.state.lastType=T.marked="operator",T.stream.backUp(T.stream.pos-T.stream.start-1),A(i)):void 0:void 0}function Q(e,t){return"quasi"!=e?D():"${"!=t.slice(t.length-2)?A(Q):A(X,J)}function J(e){if("}"==e)return T.marked="string-2",T.state.tokenize=b,A(Q)}function ee(e){return w(T.stream,T.state),D("{"==e?V:K)}function te(e){return w(T.stream,T.state),D("{"==e?V:$)}function re(e){return function(t){return"."==t?A(e?ie:ne):"variable"==t&&c?A(Le,e?Z:Y):D(e?$:K)}}function ne(e,t){if("target"==t)return T.marked="keyword",A(Y)}function ie(e,t){if("target"==t)return T.marked="keyword",A(Z)}function oe(e){return":"==e?A(R,V):D(Y,q(";"),R)}function ae(e){if("variable"==e)return T.marked="property",A()}function le(e,t){return"async"==e?(T.marked="property",A(le)):"variable"==e||"keyword"==T.style?(T.marked="property","get"==t||"set"==t?A(se):(c&&T.state.fatArrowAt==T.stream.start&&(r=T.stream.match(/^\s*:\s*/,!1))&&(T.state.fatArrowAt=T.stream.pos+r[0].length),A(ue))):"number"==e||"string"==e?(T.marked=l?"property":T.style+" property",A(ue)):"jsonld-keyword"==e?A(ue):c&&E(t)?(T.marked="keyword",A(le)):"["==e?A(K,fe,q("]"),ue):"spread"==e?A($,ue):"*"==t?(T.marked="keyword",A(le)):":"==e?D(ue):void 0;var r}function se(e){return"variable"!=e?D(ue):(T.marked="property",A(Ie))}function ue(e){return":"==e?A($):"("==e?D(Ie):void 0}function ce(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var a=T.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),A((function(r,n){return r==t||n==t?D():D(e)}),n)}return i==t||o==t?A():r&&r.indexOf(";")>-1?D(e):A(q(t))}return function(r,i){return r==t||i==t?A():D(e,n)}}function de(e,t,r){for(var n=3;n"),ve):"quasi"==e?D(ke,Se):void 0}function ye(e){if("=>"==e)return A(ve)}function xe(e){return e.match(/[\}\)\]]/)?A():","==e||";"==e?A(xe):D(be,xe)}function be(e,t){return"variable"==e||"keyword"==T.style?(T.marked="property",A(be)):"?"==t||"number"==e||"string"==e?A(be):":"==e?A(ve):"["==e?A(q("variable"),pe,q("]"),be):"("==e?D(je,be):e.match(/[;\}\)\],]/)?void 0:A()}function ke(e,t){return"quasi"!=e?D():"${"!=t.slice(t.length-2)?A(ke):A(ve,we)}function we(e){if("}"==e)return T.marked="string-2",T.state.tokenize=b,A(ke)}function Ce(e,t){return"variable"==e&&T.stream.match(/^\s*[?:]/,!1)||"?"==t?A(Ce):":"==e?A(ve):"spread"==e?A(Ce):D(ve)}function Se(e,t){return"<"==t?A(B(">"),ce(ve,">"),R,Se):"|"==t||"."==e||"&"==t?A(ve):"["==e?A(ve,q("]"),Se):"extends"==t||"implements"==t?(T.marked="keyword",A(ve)):"?"==t?A(ve,q(":"),ve):void 0}function Le(e,t){if("<"==t)return A(B(">"),ce(ve,">"),R,Se)}function Me(){return D(ve,Te)}function Te(e,t){if("="==t)return A(ve)}function De(e,t){return"enum"==t?(T.marked="keyword",A(tt)):D(Ae,fe,Oe,Ee)}function Ae(e,t){return c&&E(t)?(T.marked="keyword",A(Ae)):"variable"==e?(N(t),A()):"spread"==e?A(Ae):"["==e?de(Ne,"]"):"{"==e?de(Fe,"}"):void 0}function Fe(e,t){return"variable"!=e||T.stream.match(/^\s*:/,!1)?("variable"==e&&(T.marked="property"),"spread"==e?A(Ae):"}"==e?D():"["==e?A(K,q("]"),q(":"),Fe):A(q(":"),Ae,Oe)):(N(t),A(Oe))}function Ne(){return D(Ae,Oe)}function Oe(e,t){if("="==t)return A($)}function Ee(e){if(","==e)return A(De)}function ze(e,t){if("keyword b"==e&&"else"==t)return A(B("form","else"),V,R)}function We(e,t){return"await"==t?A(We):"("==e?A(B(")"),Pe,R):void 0}function Pe(e){return"var"==e?A(De,He):"variable"==e?A(He):D(He)}function He(e,t){return")"==e?A():";"==e?A(He):"in"==t||"of"==t?(T.marked="keyword",A(K,He)):D(K,He)}function Ie(e,t){return"*"==t?(T.marked="keyword",A(Ie)):"variable"==e?(N(t),A(Ie)):"("==e?A(H,B(")"),ce(Re,")"),R,me,V,j):c&&"<"==t?A(B(">"),ce(Me,">"),R,Ie):void 0}function je(e,t){return"*"==t?(T.marked="keyword",A(je)):"variable"==e?(N(t),A(je)):"("==e?A(H,B(")"),ce(Re,")"),R,me,j):c&&"<"==t?A(B(">"),ce(Me,">"),R,je):void 0}function Be(e,t){return"keyword"==e||"variable"==e?(T.marked="type",A(Be)):"<"==t?A(B(">"),ce(Me,">"),R):void 0}function Re(e,t){return"@"==t&&A(K,Re),"spread"==e?A(Re):c&&E(t)?(T.marked="keyword",A(Re)):c&&"this"==e?A(fe,Oe):D(Ae,fe,Oe)}function qe(e,t){return"variable"==e?Ve(e,t):Ue(e,t)}function Ve(e,t){if("variable"==e)return N(t),A(Ue)}function Ue(e,t){return"<"==t?A(B(">"),ce(Me,">"),R,Ue):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(T.marked="keyword"),A(c?ve:K,Ue)):"{"==e?A(B("}"),Ke,R):void 0}function Ke(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&E(t))&&T.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(T.marked="keyword",A(Ke)):"variable"==e||"keyword"==T.style?(T.marked="property",A($e,Ke)):"number"==e||"string"==e?A($e,Ke):"["==e?A(K,fe,q("]"),$e,Ke):"*"==t?(T.marked="keyword",A(Ke)):c&&"("==e?D(je,Ke):";"==e||","==e?A(Ke):"}"==e?A():"@"==t?A(K,Ke):void 0}function $e(e,t){if("!"==t)return A($e);if("?"==t)return A($e);if(":"==e)return A(ve,Oe);if("="==t)return A($);var r=T.state.lexical.prev;return D(r&&"interface"==r.info?je:Ie)}function Ge(e,t){return"*"==t?(T.marked="keyword",A(Je,q(";"))):"default"==t?(T.marked="keyword",A(K,q(";"))):"{"==e?A(ce(_e,"}"),Je,q(";")):D(V)}function _e(e,t){return"as"==t?(T.marked="keyword",A(q("variable"))):"variable"==e?D($,_e):void 0}function Xe(e){return"string"==e?A():"("==e?D(K):"."==e?D(Y):D(Ye,Ze,Je)}function Ye(e,t){return"{"==e?de(Ye,"}"):("variable"==e&&N(t),"*"==t&&(T.marked="keyword"),A(Qe))}function Ze(e){if(","==e)return A(Ye,Ze)}function Qe(e,t){if("as"==t)return T.marked="keyword",A(Ye)}function Je(e,t){if("from"==t)return T.marked="keyword",A(K)}function et(e){return"]"==e?A():D(ce($,"]"))}function tt(){return D(B("form"),Ae,q("{"),B("}"),ce(rt,"}"),R,R)}function rt(){return D(Ae,Oe)}function nt(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function it(e,t,r){return t.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return H.lex=I.lex=!0,j.lex=!0,R.lex=!0,{startState:function(e){var t={tokenize:v,lastType:"sof",cc:[],lexical:new S((e||0)-o,0,"block",!1),localVars:r.localVars,context:r.localVars&&new z(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),w(e,t)),t.tokenize!=x&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",M(t,r,n,i,e))},indent:function(t,n){if(t.tokenize==x||t.tokenize==b)return e.Pass;if(t.tokenize!=v)return 0;var i,l=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var c=t.cc[u];if(c==R)s=s.prev;else if(c!=ze&&c!=j)break}for(;("stat"==s.type||"form"==s.type)&&("}"==l||(i=t.cc[t.cc.length-1])&&(i==Y||i==Z)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;a&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,h=l==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==d&&"{"==l?s.indented:"form"==d?s.indented+o:"stat"==d?s.indented+(nt(t,n)?a||o:0):"switch"!=s.info||h||0==r.doubleIndentSwitch?s.align?s.column+(h?0:1):s.indented+(h?0:o):s.indented+(/^(?:case|default)\b/.test(n)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:l,jsonMode:s,expressionAllowed:it,skipExpression:function(t){M(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})),d;var e}c||(c=1,function(e){function t(e,t,r,n){this.state=e,this.mode=t,this.depth=r,this.prev=n}function r(n){return new t(e.copyState(n.mode,n.state),n.mode,n.depth,n.prev&&r(n.prev))}e.defineMode("jsx",(function(n,i){var o=e.getMode(n,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),a=e.getMode(n,i&&i.base||"javascript");function l(e){var t=e.tagName;e.tagName=null;var r=o.indent(e,"","");return e.tagName=t,r}function s(e,t){return t.context.mode==o?u(e,t,t.context):c(e,t,t.context)}function u(r,i,u){if(2==u.depth)return r.match(/^.*?\*\//)?u.depth=1:r.skipToEnd(),"comment";if("{"==r.peek()){o.skipAttribute(u.state);var c=l(u.state),d=u.state.context;if(d&&r.match(/^[^>]*>\s*$/,!1)){for(;d.prev&&!d.startOfLine;)d=d.prev;d.startOfLine?c-=n.indentUnit:u.prev.state.lexical&&(c=u.prev.state.lexical.indented)}else 1==u.depth&&(c+=n.indentUnit);return i.context=new t(e.startState(a,c),a,0,i.context),null}if(1==u.depth){if("<"==r.peek())return o.skipAttribute(u.state),i.context=new t(e.startState(o,l(u.state)),o,0,i.context),null;if(r.match("//"))return r.skipToEnd(),"comment";if(r.match("/*"))return u.depth=2,s(r,i)}var h,f=o.token(r,u.state),p=r.current();return/\btag\b/.test(f)?/>$/.test(p)?u.state.context?u.depth=0:i.context=i.context.prev:/^-1&&r.backUp(p.length-h),f}function c(r,n,i){if("<"==r.peek()&&!r.match(/^<([^<>]|<[^>]*>)+,\s*>/,!1)&&a.expressionAllowed(r,i.state))return n.context=new t(e.startState(o,a.indent(i.state,"","")),o,0,n.context),a.skipExpression(i.state),null;var l=a.token(r,i.state);if(!l&&null!=i.depth){var s=r.current();"{"==s?i.depth++:"}"==s&&0==--i.depth&&(n.context=n.context.prev)}return l}return{startState:function(){return{context:new t(e.startState(a),a)}},copyState:function(e){return{context:r(e.context)}},token:s,indent:function(e,t,r){return e.context.mode.indent(e.context.state,t,r)},innerMode:function(e){return e.context}}}),"xml","javascript"),e.defineMIME("text/jsx","jsx"),e.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})}(i(),s(),h()));var f,p;f||(f=1,(p=i()).defineMode("shell",(function(){var e={};function t(t,r){for(var n=0;n1&&e.eat("$");var r=e.next();return/['"({]/.test(r)?(t.tokens[0]=a(r,"("==r?"quote":"{"==r?"def":"string"),c(e,t)):(/\d/.test(r)||e.eatWhile(/\w/),t.tokens.shift(),"def")};function u(e){return function(t,r){return t.sol()&&t.string==e&&r.tokens.shift(),t.skipToEnd(),"string-2"}}function c(e,t){return(t.tokens[0]||o)(e,t)}return{startState:function(){return{tokens:[]}},token:function(e,t){return c(e,t)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}})),p.defineMIME("text/x-sh","shell"),p.defineMIME("application/x-sh","shell"));var m,g={};function v(){return m||(m=1,function(e){function t(e){for(var t={},r=0;r*\/]/.test(r)?w(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?w(null,r):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=L),w("variable callee","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),w("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):e.match(/^\w+-/)?w("meta","meta"):void 0}function S(e){return function(t,r){for(var n,i=!1;null!=(n=t.next());){if(n==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==n}return(n==e||!i&&")"!=e)&&(r.tokenize=null),w("string","string")}}function L(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=S(")"),w(null,"(")}function M(e,t,r){this.type=e,this.indent=t,this.prev=r}function T(e,t,r,n){return e.context=new M(r,t.indentation()+(!1===n?0:a),e.context),r}function D(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function A(e,t,r){return O[r.context.type](e,t,r)}function F(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return A(e,t,r)}function N(e){var t=e.current().toLowerCase();o=v.hasOwnProperty(t)?"atom":g.hasOwnProperty(t)?"keyword":"variable"}var O={top:function(e,t,r){if("{"==e)return T(r,t,"block");if("}"==e&&r.context.prev)return D(r);if(b&&/@component/i.test(e))return T(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return T(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return T(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return T(r,t,"at");if("hash"==e)o="builtin";else if("word"==e)o="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return T(r,t,"interpolation");if(":"==e)return"pseudo";if(y&&"("==e)return T(r,t,"parens")}return r.context.type},block:function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return h.hasOwnProperty(n)?(o="property","maybeprop"):f.hasOwnProperty(n)?(o=k?"string-2":"property","maybeprop"):y?(o=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==e?"block":y||"hash"!=e&&"qualifier"!=e?O.top(e,t,r):(o="error","block")},maybeprop:function(e,t,r){return":"==e?T(r,t,"prop"):A(e,t,r)},prop:function(e,t,r){if(";"==e)return D(r);if("{"==e&&y)return T(r,t,"propBlock");if("}"==e||"{"==e)return F(e,t,r);if("("==e)return T(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t.current())){if("word"==e)N(t);else if("interpolation"==e)return T(r,t,"interpolation")}else o+=" error";return"prop"},propBlock:function(e,t,r){return"}"==e?D(r):"word"==e?(o="property","maybeprop"):r.context.type},parens:function(e,t,r){return"{"==e||"}"==e?F(e,t,r):")"==e?D(r):"("==e?T(r,t,"parens"):"interpolation"==e?T(r,t,"interpolation"):("word"==e&&N(t),"parens")},pseudo:function(e,t,r){return"meta"==e?"pseudo":"word"==e?(o="variable-3",r.context.type):A(e,t,r)},documentTypes:function(e,t,r){return"word"==e&&s.hasOwnProperty(t.current())?(o="tag",r.context.type):O.atBlock(e,t,r)},atBlock:function(e,t,r){if("("==e)return T(r,t,"atBlock_parens");if("}"==e||";"==e)return F(e,t,r);if("{"==e)return D(r)&&T(r,t,y?"block":"top");if("interpolation"==e)return T(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();o="only"==n||"not"==n||"and"==n||"or"==n?"keyword":u.hasOwnProperty(n)?"attribute":c.hasOwnProperty(n)?"property":d.hasOwnProperty(n)?"keyword":h.hasOwnProperty(n)?"property":f.hasOwnProperty(n)?k?"string-2":"property":v.hasOwnProperty(n)?"atom":g.hasOwnProperty(n)?"keyword":"error"}return r.context.type},atComponentBlock:function(e,t,r){return"}"==e?F(e,t,r):"{"==e?D(r)&&T(r,t,y?"block":"top",!1):("word"==e&&(o="error"),r.context.type)},atBlock_parens:function(e,t,r){return")"==e?D(r):"{"==e||"}"==e?F(e,t,r,2):O.atBlock(e,t,r)},restricted_atBlock_before:function(e,t,r){return"{"==e?T(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(o="variable","restricted_atBlock_before"):A(e,t,r)},restricted_atBlock:function(e,t,r){return"}"==e?(r.stateArg=null,D(r)):"word"==e?(o="@font-face"==r.stateArg&&!p.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,r){return"word"==e?(o="variable","keyframes"):"{"==e?T(r,t,"top"):A(e,t,r)},at:function(e,t,r){return";"==e?D(r):"{"==e||"}"==e?F(e,t,r):("word"==e?o="tag":"hash"==e&&(o="builtin"),"at")},interpolation:function(e,t,r){return"}"==e?D(r):"{"==e||";"==e?F(e,t,r):("word"==e?o="variable":"variable"!=e&&"("!=e&&")"!=e&&(o="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:n?"block":"top",stateArg:null,context:new M(n?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||C)(e,t);return r&&"object"==typeof r&&(i=r[1],r=r[0]),o=r,"comment"!=i&&(t.state=O[t.state](i,e,t)),o},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),i=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(i=Math.max(0,r.indent-a)):i=(r=r.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:x,fold:"brace"}}));var r=["domain","regexp","url","url-prefix"],n=t(r),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],l=t(a),s=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],u=t(s),c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=t(c),h=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],f=t(h),p=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),m=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],v=t(g),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],x=t(y),b=r.concat(i).concat(a).concat(s).concat(c).concat(h).concat(g).concat(y);function k(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.registerHelper("hintWords","css",b),e.defineMIME("text/css",{documentTypes:n,mediaTypes:o,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:m,colorKeywords:v,valueKeywords:x,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k,k(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:x,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k,k(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:x,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k,k(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:n,mediaTypes:o,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:m,colorKeywords:v,valueKeywords:x,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k,k(e,t))}},name:"css",helperType:"gss"})}(i())),g}v();var y;y||(y=1,function(e){var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function r(e,t,r){var n=e.current(),i=n.search(t);return i>-1?e.backUp(n.length-i):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}var n={};function i(e){var t=n[e];return t||(n[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function o(e,t){var r=e.match(i(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function a(e,t){return new RegExp((t?"^":"")+"","i")}function l(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),i=e[r],o=i.length-1;o>=0;o--)n.unshift(i[o])}function s(e,t){for(var r=0;r=0;h--)u.script.unshift(["type",d[h].matches,d[h].mode]);function f(t,i){var l,c=o.token(t,i.htmlState),d=/\btag\b/.test(c);if(d&&!/[<>\s\/]/.test(t.current())&&(l=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(l))i.inTag=l+" ";else if(i.inTag&&d&&/>$/.test(t.current())){var h=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var p=">"==t.current()&&s(u[h[1]],h[2]),m=e.getMode(n,p),g=a(h[1],!0),v=a(h[1],!1);i.token=function(e,t){return e.match(g,!1)?(t.token=f,t.localState=t.localMode=null,null):r(e,v,t.localMode.token(e,t.localState))},i.localMode=m,i.localState=e.startState(m,o.indent(i.htmlState,"",""))}else i.inTag&&(i.inTag+=t.current(),t.eol()&&(i.inTag+=" "));return c}return{startState:function(){return{token:f,inTag:null,localMode:null,localState:null,htmlState:e.startState(o)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(o,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?o.indent(t.htmlState,r,n):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||o}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(i(),s(),h(),v()));var x,b;b||(b=1,function(e){e.defineMode("markdown",(function(t,r){var n=e.getMode(t,"text/html"),i="null"==n.name;function o(r){if(e.findModeByName){var n=e.findModeByName(r);n&&(r=n.mime||n.mimes[0])}var i=e.getMode(t,r);return"null"==i.name?null:i}void 0===r.highlightFormatting&&(r.highlightFormatting=!1),void 0===r.maxBlockquoteDepth&&(r.maxBlockquoteDepth=0),void 0===r.taskLists&&(r.taskLists=!1),void 0===r.strikethrough&&(r.strikethrough=!1),void 0===r.emoji&&(r.emoji=!1),void 0===r.fencedCodeBlockHighlighting&&(r.fencedCodeBlockHighlighting=!0),void 0===r.fencedCodeBlockDefaultMode&&(r.fencedCodeBlockDefaultMode="text/plain"),void 0===r.xml&&(r.xml=!0),void 0===r.tokenTypeOverrides&&(r.tokenTypeOverrides={});var a={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var l in a)a.hasOwnProperty(l)&&r.tokenTypeOverrides[l]&&(a[l]=r.tokenTypeOverrides[l]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,u=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,d=r.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,f=/^[^#!\[\]*_\\<>` "'(~:]+/,p=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,m=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,v=" ";function y(e,t,r){return t.f=t.inline=r,r(e,t)}function x(e,t,r){return t.f=t.block=r,r(e,t)}function b(e){return!e||!/\S/.test(e.string)}function k(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==C){var r=i;if(!r){var o=e.innerMode(n,t.htmlState);r="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}r&&(t.f=T,t.block=w,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function w(t,n){var i=t.column()===n.indentation,l=b(n.prevLine.stream),f=n.indentedCode,g=n.prevLine.hr,v=!1!==n.list,x=(n.listStack[n.listStack.length-1]||0)+3;n.indentedCode=!1;var k=n.indentation;if(null===n.indentationDiff&&(n.indentationDiff=n.indentation,v)){for(n.list=null;k=4&&(f||n.prevLine.fencedCodeEnd||n.prevLine.header||l))return t.skipToEnd(),n.indentedCode=!0,a.code;if(t.eatSpace())return null;if(i&&n.indentation<=x&&(M=t.match(d))&&M[1].length<=6)return n.quote=0,n.header=M[1].length,n.thisLine.header=!0,r.highlightFormatting&&(n.formatting="header"),n.f=n.inline,L(n);if(n.indentation<=x&&t.eat(">"))return n.quote=i?1:n.quote+1,r.highlightFormatting&&(n.formatting="quote"),t.eatSpace(),L(n);if(!C&&!n.setext&&i&&n.indentation<=x&&(M=t.match(u))){var T=M[1]?"ol":"ul";return n.indentation=k+t.current().length,n.list=!0,n.quote=0,n.listStack.push(n.indentation),n.em=!1,n.strong=!1,n.code=!1,n.strikethrough=!1,r.taskLists&&t.match(c,!1)&&(n.taskList=!0),n.f=n.inline,r.highlightFormatting&&(n.formatting=["list","list-"+T]),L(n)}return i&&n.indentation<=x&&(M=t.match(p,!0))?(n.quote=0,n.fencedEndRE=new RegExp(M[1]+"+ *$"),n.localMode=r.fencedCodeBlockHighlighting&&o(M[2]||r.fencedCodeBlockDefaultMode),n.localMode&&(n.localState=e.startState(n.localMode)),n.f=n.block=S,r.highlightFormatting&&(n.formatting="code-block"),n.code=-1,L(n)):n.setext||!(w&&v||n.quote||!1!==n.list||n.code||C||m.test(t.string))&&(M=t.lookAhead(1))&&(M=M.match(h))?(n.setext?(n.header=n.setext,n.setext=0,t.skipToEnd(),r.highlightFormatting&&(n.formatting="header")):(n.header="="==M[0].charAt(0)?1:2,n.setext=n.header),n.thisLine.header=!0,n.f=n.inline,L(n)):C?(t.skipToEnd(),n.hr=!0,n.thisLine.hr=!0,a.hr):"["===t.peek()?y(t,n,O):y(t,n,n.inline)}function C(t,r){var o=n.token(t,r.htmlState);if(!i){var a=e.innerMode(n,r.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||r.md_inside&&t.current().indexOf(">")>-1)&&(r.f=T,r.block=w,r.htmlState=null)}return o}function S(e,t){var n,i=t.listStack[t.listStack.length-1]||0,o=t.indentation=e.quote?t.push(a.formatting+"-"+e.formatting[n]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(a.linkHref,"url"):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,"link"),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+"-"+e.header),e.quote&&(t.push(a.quote),!r.maxBlockquoteDepth||r.maxBlockquoteDepth>=e.quote?t.push(a.quote+"-"+e.quote):t.push(a.quote+"-"+r.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(a.list2):t.push(a.list3):t.push(a.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function M(e,t){if(e.match(f,!0))return L(t)}function T(t,i){var o=i.text(t,i);if(void 0!==o)return o;if(i.list)return i.list=null,L(i);if(i.taskList)return" "===t.match(c,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,r.highlightFormatting&&(i.formatting="task"),i.taskList=!1,L(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return r.highlightFormatting&&(i.formatting="header"),L(i);var l=t.next();if(i.linkTitle){i.linkTitle=!1;var s=l;"("===l&&(s=")");var u="^\\s*(?:[^"+(s=(s+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+s;if(t.match(new RegExp(u),!0))return a.linkHref}if("`"===l){var d=i.formatting;r.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var h=t.current().length;if(0!=i.code||i.quote&&1!=h){if(h==i.code){var f=L(i);return i.code=0,f}return i.formatting=d,L(i)}return i.code=h,L(i)}if(i.code)return L(i);if("\\"===l&&(t.next(),r.highlightFormatting)){var p=L(i),m=a.formatting+"-escape";return p?p+" "+m:m}if("!"===l&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,r.highlightFormatting&&(i.formatting="image"),L(i);if("["===l&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,r.highlightFormatting&&(i.formatting="image"),L(i);if("]"===l&&i.imageAltText){r.highlightFormatting&&(i.formatting="image");var p=L(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=A,p}if("["===l&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,r.highlightFormatting&&(i.formatting="link")),L(i);if("]"===l&&i.linkText){r.highlightFormatting&&(i.formatting="link");var p=L(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?A:T,p}if("<"===l&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=D,r.highlightFormatting&&(i.formatting="link"),(p=L(i))?p+=" ":p="",p+a.linkInline;if("<"===l&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=D,r.highlightFormatting&&(i.formatting="link"),(p=L(i))?p+=" ":p="",p+a.linkEmail;if(r.xml&&"<"===l&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var v=t.string.indexOf(">",t.pos);if(-1!=v){var y=t.string.substring(t.start,v);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(n),x(t,i,C)}if(r.xml&&"<"===l&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===l||"_"===l){for(var b=1,k=1==t.pos?" ":t.string.charAt(t.pos-2);b<3&&t.eat(l);)b++;var w=t.peek()||" ",S=!/\s/.test(w)&&(!g.test(w)||/\s/.test(k)||g.test(k)),M=!/\s/.test(k)&&(!g.test(k)||/\s/.test(w)||g.test(w)),F=null,N=null;if(b%2&&(i.em||!S||"*"!==l&&M&&!g.test(k)?i.em!=l||!M||"*"!==l&&S&&!g.test(w)||(F=!1):F=!0),b>1&&(i.strong||!S||"*"!==l&&M&&!g.test(k)?i.strong!=l||!M||"*"!==l&&S&&!g.test(w)||(N=!1):N=!0),null!=N||null!=F)return r.highlightFormatting&&(i.formatting=null==F?"strong":null==N?"em":"strong em"),!0===F&&(i.em=l),!0===N&&(i.strong=l),f=L(i),!1===F&&(i.em=!1),!1===N&&(i.strong=!1),f}else if(" "===l&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return L(i);t.backUp(1)}if(r.strikethrough)if("~"===l&&t.eatWhile(l)){if(i.strikethrough)return r.highlightFormatting&&(i.formatting="strikethrough"),f=L(i),i.strikethrough=!1,f;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,r.highlightFormatting&&(i.formatting="strikethrough"),L(i)}else if(" "===l&&t.match("~~",!0)){if(" "===t.peek())return L(i);t.backUp(2)}if(r.emoji&&":"===l&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,r.highlightFormatting&&(i.formatting="emoji");var O=L(i);return i.emoji=!1,O}return" "===l&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),L(i)}function D(e,t){if(">"===e.next()){t.f=t.inline=T,r.highlightFormatting&&(t.formatting="link");var n=L(t);return n?n+=" ":n="",n+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function A(e,t){if(e.eatSpace())return null;var n=e.next();return"("===n||"["===n?(t.f=t.inline=N("("===n?")":"]"),r.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,L(t)):"error"}var F={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function N(e){return function(t,n){if(t.next()===e){n.f=n.inline=T,r.highlightFormatting&&(n.formatting="link-string");var i=L(n);return n.linkHref=!1,i}return t.match(F[e]),n.linkHref=!0,L(n)}}function O(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=E,e.next(),r.highlightFormatting&&(t.formatting="link"),t.linkText=!0,L(t)):y(e,t,T)}function E(e,t){if(e.match("]:",!0)){t.f=t.inline=z,r.highlightFormatting&&(t.formatting="link");var n=L(t);return t.linkText=!1,n}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function z(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),t.f=t.inline=T,a.linkHref+" url")}var W={startState:function(){return{f:w,prevLine:{stream:null},thisLine:{stream:null},block:w,htmlState:null,indentation:0,inline:T,text:M,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(n,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return k(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=C)){var r=e.match(/^\s*/,!0)[0].replace(/\t/g,v).length;if(t.indentation=r,t.indentationDiff=null,r>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==C?{state:e.htmlState,mode:n}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:W}},indent:function(t,r,i){return t.block==C&&n.indent?n.indent(t.htmlState,r,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,r,i):e.Pass},blankLine:k,getType:L,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return W}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(i(),s(),x||(x=1,function(e){e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var r=0;rr.keyCol)return t.skipToEnd(),"string";if(r.literal&&(r.literal=!1),t.sol()){if(r.keyCol=0,r.pair=!1,r.pairStart=!1,t.match("---"))return"def";if(t.match("..."))return"def";if(t.match(/\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==n?r.inlinePairs++:"}"==n?r.inlinePairs--:"["==n?r.inlineList++:r.inlineList--,"meta";if(r.inlineList>0&&!i&&","==n)return t.next(),"meta";if(r.inlinePairs>0&&!i&&","==n)return r.keyCol=0,r.pair=!1,r.pairStart=!1,t.next(),"meta";if(r.pairStart){if(t.match(/^\s*(\||\>)\s*/))return r.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==r.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(r.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(e))return"keyword"}return!r.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)?(r.pair=!0,r.keyCol=t.indentation(),"atom"):r.pair&&t.match(/^:\s*/)?(r.pairStart=!0,"meta"):(r.pairStart=!1,r.escaped="\\"==n,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}})),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")}(i()));class w extends t.Component{constructor(e){super(e),this.appliedNext=void 0,this.deferred=void 0,this.editor=void 0,this.emulating=void 0,this.hydrated=void 0,this.initCb=void 0,this.mirror=void 0,this.mounted=void 0,this.ref=void 0,this.shared=void 0,this.appliedNext=!1,this.deferred=null,this.emulating=!1,this.hydrated=!1,this.initCb=()=>{this.props.editorDidConfigure&&this.props.editorDidConfigure(this.editor)},this.mounted=!1}hydrate(e){const t=e&&e.options?e.options:{},r=Object.assign({},o.defaults,this.editor.options,t);Object.keys(r).some((e=>this.editor.getOption(e)!==r[e]))&&Object.keys(r).forEach((e=>{t.hasOwnProperty(e)&&this.editor.getOption(e)!==r[e]&&(this.editor.setOption(e,r[e]),this.mirror.setOption(e,r[e]))})),this.hydrated||(this.deferred?this.resolveChange(e.value):this.initChange(e.value||"")),this.hydrated=!0}initChange(e){this.emulating=!0;const t=this.editor.getDoc(),r=t.lastLine(),n=t.getLine(t.lastLine()).length;t.replaceRange(e||"",{line:0,ch:0},{line:r,ch:n}),this.mirror.setValue(e),t.clearHistory(),this.mirror.clearHistory(),this.emulating=!1}resolveChange(e){this.emulating=!0;const t=this.editor.getDoc();if("undo"===this.deferred.origin?t.undo():"redo"===this.deferred.origin?t.redo():t.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),e&&e!==t.getValue()){const r=t.getCursor();t.setValue(e),t.setCursor(r)}this.emulating=!1,this.deferred=null}mirrorChange(e){const t=this.editor.getDoc();return"undo"===e.origin?(t.setHistory(this.mirror.getHistory()),this.mirror.undo()):"redo"===e.origin?(t.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(e.text,e.from,e.to,e.origin),this.mirror.getValue()}componentDidMount(){this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&o.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=o(this.ref,this.props.options),this.shared=new S(this.editor,this.props),this.mirror=o((()=>{}),this.props.options),this.editor.on("electricInput",(()=>{this.mirror.setHistory(this.editor.getDoc().getHistory())})),this.editor.on("cursorActivity",(()=>{this.mirror.setCursor(this.editor.getDoc().getCursor())})),this.editor.on("beforeChange",((e,t)=>{if(this.emulating)return;t.cancel(),this.deferred=t;const r=this.mirrorChange(this.deferred);this.props.onBeforeChange&&this.props.onBeforeChange(this.editor,this.deferred,r)})),this.editor.on("change",((e,t)=>{this.mounted&&this.props.onChange&&this.props.onChange(this.editor,t,this.editor.getValue())})),this.hydrate(this.props),this.shared.apply(this.props),this.mounted=!0,this.shared.wire(this.props),this.editor.getOption("autofocus")&&this.editor.focus(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb)}componentDidUpdate(e){const t={cursor:void 0};this.props.value!==e.value&&(this.hydrated=!1),this.props.autoCursor||void 0===this.props.autoCursor||(t.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.appliedNext||(this.shared.applyNext(e,this.props,t),this.appliedNext=!0),this.shared.applyUserDefined(e,t)}componentWillUnmount(){this.props.editorWillUnmount&&this.props.editorWillUnmount(o)}shouldComponentUpdate(){return!0}render(){const e=this.props.className?`react-codemirror2 ${this.props.className}`:"react-codemirror2";return t.createElement("div",{className:e,ref:e=>this.ref=e})}}w.displayName="Controlled";class C{static equals(e,t){const r=Object.keys,n=typeof e;return e&&t&&"object"===n&&n===typeof t?r(e).length===r(t).length&&r(e).every((r=>this.equals(e[r],t[r]))):e===t}}class S{constructor(e,t){this.editor=void 0,this.props=void 0,this.editor=e,this.props=t}delegateCursor(e,t,r){const n=this.editor.getDoc();r&&this.editor.focus(),t?n.setCursor(e):n.setCursor(e,void 0,{scroll:!1})}delegateScroll(e){this.editor.scrollTo(e.x,e.y)}delegateSelection(e,t){this.editor.getDoc().setSelections(e),t&&this.editor.focus()}apply(e){e&&e.selection&&e.selection.ranges&&this.delegateSelection(e.selection.ranges,e.selection.focus||!1),e&&e.cursor&&this.delegateCursor(e.cursor,e.autoScroll||!1,this.editor.getOption("autofocus")||!1),e&&e.scroll&&this.delegateScroll(e.scroll)}applyNext(e,t,r){e&&e.selection&&e.selection.ranges&&t&&t.selection&&t.selection.ranges&&!C.equals(e.selection.ranges,t.selection.ranges)&&this.delegateSelection(t.selection.ranges,t.selection.focus||!1),e&&e.cursor&&t&&t.cursor&&!C.equals(e.cursor,t.cursor)&&this.delegateCursor(r.cursor||t.cursor,t.autoScroll||!1,t.autoCursor||!1),e&&e.scroll&&t&&t.scroll&&!C.equals(e.scroll,t.scroll)&&this.delegateScroll(t.scroll)}applyUserDefined(e,t){t&&t.cursor&&this.delegateCursor(t.cursor,e.autoScroll||!1,this.editor.getOption("autofocus")||!1)}wire(e){Object.keys(e||{}).filter((e=>/^on/.test(e))).forEach((e=>{switch(e){case"onBlur":this.editor.on("blur",((e,t)=>{var r,n;null===(r=(n=this.props).onBlur)||void 0===r||r.call(n,this.editor,t)}));break;case"onContextMenu":this.editor.on("contextmenu",((e,t)=>{var r,n;null===(r=(n=this.props).onContextMenu)||void 0===r||r.call(n,this.editor,t)}));break;case"onCopy":this.editor.on("copy",((e,t)=>{var r,n;null===(r=(n=this.props).onCopy)||void 0===r||r.call(n,this.editor,t)}));break;case"onCursor":this.editor.on("cursorActivity",(()=>{var e,t;null===(e=(t=this.props).onCursor)||void 0===e||e.call(t,this.editor,this.editor.getDoc().getCursor())}));break;case"onCursorActivity":this.editor.on("cursorActivity",(()=>{var e,t;null===(e=(t=this.props).onCursorActivity)||void 0===e||e.call(t,this.editor)}));break;case"onCut":this.editor.on("cut",((e,t)=>{var r,n;null===(r=(n=this.props).onCut)||void 0===r||r.call(n,this.editor,t)}));break;case"onDblClick":this.editor.on("dblclick",((e,t)=>{var r,n;null===(r=(n=this.props).onDblClick)||void 0===r||r.call(n,this.editor,t)}));break;case"onDragEnter":this.editor.on("dragenter",((e,t)=>{var r,n;null===(r=(n=this.props).onDragEnter)||void 0===r||r.call(n,this.editor,t)}));break;case"onDragLeave":this.editor.on("dragleave",((e,t)=>{var r,n;null===(r=(n=this.props).onDragLeave)||void 0===r||r.call(n,this.editor,t)}));break;case"onDragOver":this.editor.on("dragover",((e,t)=>{var r,n;null===(r=(n=this.props).onDragOver)||void 0===r||r.call(n,this.editor,t)}));break;case"onDragStart":this.editor.on("dragstart",((e,t)=>{var r,n;null===(r=(n=this.props).onDragStart)||void 0===r||r.call(n,this.editor,t)}));break;case"onDrop":this.editor.on("drop",((e,t)=>{var r,n;null===(r=(n=this.props).onDrop)||void 0===r||r.call(n,this.editor,t)}));break;case"onFocus":this.editor.on("focus",((e,t)=>{var r,n;null===(r=(n=this.props).onFocus)||void 0===r||r.call(n,this.editor,t)}));break;case"onGutterClick":this.editor.on("gutterClick",((e,t,r,n)=>{var i,o;null===(i=(o=this.props).onGutterClick)||void 0===i||i.call(o,this.editor,t,r,n)}));break;case"onInputRead":this.editor.on("inputRead",((e,t)=>{var r,n;null===(r=(n=this.props).onInputRead)||void 0===r||r.call(n,this.editor,t)}));break;case"onKeyDown":this.editor.on("keydown",((e,t)=>{var r,n;null===(r=(n=this.props).onKeyDown)||void 0===r||r.call(n,this.editor,t)}));break;case"onKeyHandled":this.editor.on("keyHandled",((e,t,r)=>{var n,i;null===(n=(i=this.props).onKeyHandled)||void 0===n||n.call(i,this.editor,t,r)}));break;case"onKeyPress":this.editor.on("keypress",((e,t)=>{var r,n;null===(r=(n=this.props).onKeyPress)||void 0===r||r.call(n,this.editor,t)}));break;case"onKeyUp":this.editor.on("keyup",((e,t)=>{var r,n;null===(r=(n=this.props).onKeyUp)||void 0===r||r.call(n,this.editor,t)}));break;case"onMouseDown":this.editor.on("mousedown",((e,t)=>{var r,n;null===(r=(n=this.props).onMouseDown)||void 0===r||r.call(n,this.editor,t)}));break;case"onPaste":this.editor.on("paste",((e,t)=>{var r,n;null===(r=(n=this.props).onPaste)||void 0===r||r.call(n,this.editor,t)}));break;case"onRenderLine":this.editor.on("renderLine",((e,t,r)=>{var n,i;null===(n=(i=this.props).onRenderLine)||void 0===n||n.call(i,this.editor,t,r)}));break;case"onScroll":this.editor.on("scroll",(e=>{var t,r;null===(t=(r=this.props).onScroll)||void 0===t||t.call(r,this.editor,this.editor.getScrollInfo())}));break;case"onSelection":this.editor.on("beforeSelectionChange",((e,t)=>{var r,n;null===(r=(n=this.props).onSelection)||void 0===r||r.call(n,this.editor,t)}));break;case"onTouchStart":this.editor.on("touchstart",((e,t)=>{var r,n;null===(r=(n=this.props).onTouchStart)||void 0===r||r.call(n,this.editor,t)}));break;case"onUpdate":this.editor.on("update",(e=>{var t,r;null===(t=(r=this.props).onUpdate)||void 0===t||t.call(r,this.editor)}));break;case"onViewportChange":this.editor.on("viewportChange",((e,t,r)=>{var n,i;null===(n=(i=this.props).onViewportChange)||void 0===n||n.call(i,this.editor,t,r)}))}}))}}export{S as Shared,w as default}; diff --git a/assets/index-DVeZ9h9n.js b/assets/index-VWJm_On8.js similarity index 99% rename from assets/index-DVeZ9h9n.js rename to assets/index-VWJm_On8.js index 492143a..de8e8f2 100644 --- a/assets/index-DVeZ9h9n.js +++ b/assets/index-VWJm_On8.js @@ -1,4 +1,4 @@ -import{C as e,i as t,r as o,n as s,a7 as i,w as n,k as r,l,x as a,p as d,V as c,T as h,t as u,R as f,h as p}from"./index-CrryxQyl.js";import{i as b,N as v,ag as m,n as g,w as y,C as w,v as O,l as x,F as L,D as S,m as C,s as k,x as T}from"./RenderTopNavBar-BTvx9fvK.js";const _="keyboard",R="pointer";let D=[],F=[],H=_,W=0;const B={},z=e=>{"html"!==e.target.nodeName.toLowerCase()&&(I(H,R),D.forEach((e=>e.remove())))},I=(e,t)=>{e!==t&&(H=t,Object.keys(B).forEach((o=>B[o](e,t))))},M=()=>{I(H,_)},A=()=>{I(H,R)},E=t=>{const o=t.onInputModeChange,s=W++;return"function"==typeof o&&(B[s]=o),e&&(0===F.length&&(F.push(b(document,"keydown",M,!0)),F.push(b(document,"mousedown",A,!0)),F.push(b(document,"pointerdown",A,!0)),F.push(b(document,"touchstart",A,!0))),0===D.length&&(D.push(b(document,"mousemove",z,!0)),D.push(b(document,"mousedown",z,!0)),D.push(b(document,"mouseup",z,!0)),D.push(b(document,"pointermove",z,!0)),D.push(b(document,"pointerdown",z,!0)),D.push(b(document,"pointerup",z,!0)),D.push(b(document,"touchmove",z,!0)),D.push(b(document,"touchstart",z,!0)),D.push(b(document,"touchend",z,!0)))),{isKeyboardMode:()=>H===_,remove:()=>{1===W&&(D.forEach((e=>e.remove())),D=[],F.forEach((e=>e.remove())),F=[]),delete B[s],W--}}},P={children:t.func,render:t.func};class $ extends o.Component{constructor(...e){super(...e),this._focusListener=null,this._blurListener=null,this._inputModeListener=null,this.state={focused:!1,focusable:void 0},this.handleInputModeChange=()=>{this.forceUpdate()},this.handleFocus=()=>{this.removeFocusListener(),this.setState({focused:!0})},this.handleBlur=()=>{this.removeBlurListener(),this.setState({focused:!1})},this.ref=null,this.attachRef=e=>{this.ref=e}}componentDidMount(){const e=this.focusable,t=this.focused;this.addFocusableListeners(t,e),this._inputModeListener=E({onInputModeChange:this.handleInputModeChange}),this.setState({focusable:e,focused:t})}getSnapshotBeforeUpdate(e){const t=this.props,o=t.render,s=t.children;return e.children===s&&e.render===o||this.removeFocusableListeners(),null}componentDidUpdate(){const e=this.focusable;!e&&this.state.focusable?(this.removeFocusableListeners(),this.setState({focusable:void 0,focused:!1})):e!==this.state.focusable?(this.removeFocusableListeners(),this.state.focused&&e.focus(),this.addFocusableListeners(this.state.focused,e),this.setState({focusable:e})):this.addFocusableListeners(this.state.focused,e)}componentWillUnmount(){this._inputModeListener&&(this._inputModeListener.remove(),this._inputModeListener=null),this.removeFocusableListeners()}addFocusableListeners(e,t){t&&(e&&!this._blurListener?this._blurListener=b(t,"blur",this.handleBlur,!0):this._focusListener||(this._focusListener=b(t,"focus",this.handleFocus,!0)))}removeFocusableListeners(){this.removeFocusListener(),this.removeBlurListener()}removeFocusListener(){this._focusListener&&(this._focusListener.remove(),this._focusListener=null)}removeBlurListener(){this._blurListener&&(this._blurListener.remove(),this._blurListener=null)}get focused(){return v(this)}get focusable(){const e=m(this,(()=>!0),!0)||[],t=e&&e.length||0;s(1===t,`[Focusable] Exactly one focusable child is required (${t} found).`);const o=!!e&&e[0];return o&&"function"==typeof o.focus?o:void 0}get focusVisible(){const e=this.state,t=e.focusable,o=e.focused;return this.isFocusVisible(o,t)}focus(){const e=this.focusable;e&&e.focus()}isFocusVisible(e,t){if(!t||!e)return!1;if(this._inputModeListener&&this._inputModeListener.isKeyboardMode())return!0;const o=t.tagName,s=t.type,i=t.isContentEditable;return!("INPUT"!=o||!$.inputTypes[s])||("TEXTAREA"==o||!!i)}render(){const e=this.props,t=e.children,s=e.render,i=void 0===s?t:s,n=this.state,r=n.focusable,l=n.focused;if("function"==typeof i){const e=i({focused:l,focusable:r,focusVisible:this.isFocusVisible(l,r),attachRef:this.attachRef});return o.cloneElement(e,{ref:e.ref?g(e.ref,this.attachRef):this.attachRef})}return null}}$.displayName="Focusable",$.propTypes=P,$.allowedProps=["children","render"],$.defaultProps={children:null},$.inputTypes={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};const N=i` +import{C as e,i as t,r as o,n as s,a7 as i,w as n,k as r,l,x as a,p as d,V as c,T as h,t as u,R as f,h as p}from"./index-DxmLT0bY.js";import{i as b,N as v,ag as m,n as g,w as y,C as w,v as O,l as x,F as L,D as S,m as C,s as k,x as T}from"./RenderTopNavBar-BObK9Y19.js";const _="keyboard",R="pointer";let D=[],F=[],H=_,W=0;const B={},z=e=>{"html"!==e.target.nodeName.toLowerCase()&&(I(H,R),D.forEach((e=>e.remove())))},I=(e,t)=>{e!==t&&(H=t,Object.keys(B).forEach((o=>B[o](e,t))))},M=()=>{I(H,_)},A=()=>{I(H,R)},E=t=>{const o=t.onInputModeChange,s=W++;return"function"==typeof o&&(B[s]=o),e&&(0===F.length&&(F.push(b(document,"keydown",M,!0)),F.push(b(document,"mousedown",A,!0)),F.push(b(document,"pointerdown",A,!0)),F.push(b(document,"touchstart",A,!0))),0===D.length&&(D.push(b(document,"mousemove",z,!0)),D.push(b(document,"mousedown",z,!0)),D.push(b(document,"mouseup",z,!0)),D.push(b(document,"pointermove",z,!0)),D.push(b(document,"pointerdown",z,!0)),D.push(b(document,"pointerup",z,!0)),D.push(b(document,"touchmove",z,!0)),D.push(b(document,"touchstart",z,!0)),D.push(b(document,"touchend",z,!0)))),{isKeyboardMode:()=>H===_,remove:()=>{1===W&&(D.forEach((e=>e.remove())),D=[],F.forEach((e=>e.remove())),F=[]),delete B[s],W--}}},P={children:t.func,render:t.func};class $ extends o.Component{constructor(...e){super(...e),this._focusListener=null,this._blurListener=null,this._inputModeListener=null,this.state={focused:!1,focusable:void 0},this.handleInputModeChange=()=>{this.forceUpdate()},this.handleFocus=()=>{this.removeFocusListener(),this.setState({focused:!0})},this.handleBlur=()=>{this.removeBlurListener(),this.setState({focused:!1})},this.ref=null,this.attachRef=e=>{this.ref=e}}componentDidMount(){const e=this.focusable,t=this.focused;this.addFocusableListeners(t,e),this._inputModeListener=E({onInputModeChange:this.handleInputModeChange}),this.setState({focusable:e,focused:t})}getSnapshotBeforeUpdate(e){const t=this.props,o=t.render,s=t.children;return e.children===s&&e.render===o||this.removeFocusableListeners(),null}componentDidUpdate(){const e=this.focusable;!e&&this.state.focusable?(this.removeFocusableListeners(),this.setState({focusable:void 0,focused:!1})):e!==this.state.focusable?(this.removeFocusableListeners(),this.state.focused&&e.focus(),this.addFocusableListeners(this.state.focused,e),this.setState({focusable:e})):this.addFocusableListeners(this.state.focused,e)}componentWillUnmount(){this._inputModeListener&&(this._inputModeListener.remove(),this._inputModeListener=null),this.removeFocusableListeners()}addFocusableListeners(e,t){t&&(e&&!this._blurListener?this._blurListener=b(t,"blur",this.handleBlur,!0):this._focusListener||(this._focusListener=b(t,"focus",this.handleFocus,!0)))}removeFocusableListeners(){this.removeFocusListener(),this.removeBlurListener()}removeFocusListener(){this._focusListener&&(this._focusListener.remove(),this._focusListener=null)}removeBlurListener(){this._blurListener&&(this._blurListener.remove(),this._blurListener=null)}get focused(){return v(this)}get focusable(){const e=m(this,(()=>!0),!0)||[],t=e&&e.length||0;s(1===t,`[Focusable] Exactly one focusable child is required (${t} found).`);const o=!!e&&e[0];return o&&"function"==typeof o.focus?o:void 0}get focusVisible(){const e=this.state,t=e.focusable,o=e.focused;return this.isFocusVisible(o,t)}focus(){const e=this.focusable;e&&e.focus()}isFocusVisible(e,t){if(!t||!e)return!1;if(this._inputModeListener&&this._inputModeListener.isKeyboardMode())return!0;const o=t.tagName,s=t.type,i=t.isContentEditable;return!("INPUT"!=o||!$.inputTypes[s])||("TEXTAREA"==o||!!i)}render(){const e=this.props,t=e.children,s=e.render,i=void 0===s?t:s,n=this.state,r=n.focusable,l=n.focused;if("function"==typeof i){const e=i({focused:l,focusable:r,focusVisible:this.isFocusVisible(l,r),attachRef:this.attachRef});return o.cloneElement(e,{ref:e.ref?g(e.ref,this.attachRef):this.attachRef})}return null}}$.displayName="Focusable",$.propTypes=P,$.allowedProps=["children","render"],$.defaultProps={children:null},$.inputTypes={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};const N=i` to { opacity: 1; transform: translate3d(0, 0, 0) scaleX(1); diff --git a/assets/index.node-BuQMAeGn.js b/assets/index.node-CLoDR8RL.js similarity index 80% rename from assets/index.node-BuQMAeGn.js rename to assets/index.node-CLoDR8RL.js index 6ece3ce..4909447 100644 --- a/assets/index.node-BuQMAeGn.js +++ b/assets/index.node-CLoDR8RL.js @@ -1 +1 @@ -import{r as e}from"./index-CrryxQyl.js";class n extends e.Component{constructor(e){super(e)}hydrate(){}initChange(){}resolveChange(){}mirrorChange(){}componentDidMount(){}componentDidUpdate(){}componentWillUnmount(){}shouldComponentUpdate(){return!1}render(){return null}}n.displayName="Controlled";export{n as default}; +import{r as e}from"./index-DxmLT0bY.js";class n extends e.Component{constructor(e){super(e)}hydrate(){}initChange(){}resolveChange(){}mirrorChange(){}componentDidMount(){}componentDidUpdate(){}componentWillUnmount(){}shouldComponentUpdate(){return!1}render(){return null}}n.displayName="Controlled";export{n as default}; diff --git a/assets/links-CYh0RyKT.js b/assets/links-Dq9wk-i1.js similarity index 94% rename from assets/links-CYh0RyKT.js rename to assets/links-Dq9wk-i1.js index 79412d0..dfa5fdc 100644 --- a/assets/links-CYh0RyKT.js +++ b/assets/links-Dq9wk-i1.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/error-DNgfncXY.js","assets/index-CrryxQyl.js","assets/index-CqQFZXZA.css","assets/RenderTopNavBar-BTvx9fvK.js","assets/RenderTabNav-BgCD-W_P.js","assets/index-DVeZ9h9n.js","assets/index-BaJp6lgV.js"])))=>i.map(i=>d[i]); -import{a as e,e as a,r,b as l,f as n,L as o,j as s,H as t,_ as i,g as c,V as d}from"./index-CrryxQyl.js";import{a as p,g as u,T as h,d as g,b as m,R as f,L as x,e as E,c as L}from"./RenderTopNavBar-BTvx9fvK.js";import{B as _,R as j,a as R,I as S,T as b,b as y}from"./index-Cw9o-rUL.js";import{T as k,F as C,a as T}from"./index-C6-OLeBB.js";import{I as w,a as P}from"./index-B8c3q9fI.js";const v={header:{EN:"Redirect Links",ES_LA:"Enlaces de Redirección",PT_BR:"Links de Redirecionamento",DE:"Weiterleitungslinks"},description:{EN:"This page provides a collection of shortened URLs for use in RFP responses. Each row has a short URL and the original URL. Click on the copy icon and the short URL will be added to your clipboard.",ES_LA:"Esta página proporciona una colección de URL abreviadas para usar en las respuestas a RFP. Cada fila tiene una URL corta y la URL original. Haga clic en la copia y la URL corta se agregará a su portapapeles.",PT_BR:"Esta página fornece uma coleção de URLs abreviados para uso em respostas de RFP. Cada linha possui um URL curto e o URL original. Clique na cópia ícone e o URL curto serão adicionados à sua área de transferência.",DE:"Diese Seite bietet eine Sammlung verkürzter URLs zur Verwendung in RFP-Antworten. Jede Zeile enthält eine Kurz-URL und die Original-URL. Klicken Sie auf die Kopie-Symbol und die Kurz-URL wird Ihrer Zwischenablage hinzugefügt."},filters:{EN:"Filters",ES_LA:"Filtros",PT_BR:"Filtros",DE:"filter"},toggleShow:{EN:"Show filters",ES_LA:"Mostrar filtros",PT_BR:"Mostrar filtros",DE:"Filter anzeigen"},toggleHide:{EN:"Hide filters",ES_LA:"Ocultar filtros",PT_BR:"Ocultar filtros",DE:"Filter ausblenden"},search:{EN:"Search",ES_LA:"Buscar",PT_BR:"Procurar",DE:"Suche"},clearSearch:{EN:"Clear search",ES_LA:"Borrar búsqueda",PT_BR:"Limpar pesquisa",DE:"Suche löschen"},placeholder:{EN:"community",ES_LA:"comunidad",PT_BR:"comunidade",DE:"Gemeinschaft"},brands:{EN:"Brands",ES_LA:"Marcas",PT_BR:"Marcas",DE:"Marken"},products:{EN:"Products",ES_LA:"Productos",PT_BR:"Produtos",DE:"Produkte"},language:{EN:"Language",ES_LA:"Idioma",PT_BR:"Idioma",DE:"Sprache"},title:{EN:"Title",ES_LA:"Título",PT_BR:"Título",DE:"Titel"},link:{EN:"Link",ES_LA:"Enlace",PT_BR:"Link",DE:"Link"},copy:{EN:"Copy",ES_LA:"Copiar",PT_BR:"Copiar",DE:"Kopieren"},copy_url:{EN:"Copy URL to clipboard",ES_LA:"Copiar URL al portapapeles",PT_BR:"Copiar URL para a área de transferência",DE:"Kopieren Sie die URL in die Zwischenablage"},copy_error:{EN:"Error copying to clipboard",ES_LA:"Error al copiar al portapapeles",PT_BR:"Erro ao copiar para a área de transferência",DE:"Fehler beim Kopieren in die Zwischenablage"}};function B(){const i=e.c(88),B=a().language;let D,F;i[0]!==B?(F=p(B),D=u(v,F),i[0]=B,i[1]=D,i[2]=F):(D=i[1],F=i[2]);const H=D;let z;i[3]===Symbol.for("react.memo_cache_sentinel")?(z=c.url.replace("https://",""),i[3]=z):z=i[3];const I=z;let $;i[4]!==H.toggleShow?($={expanded:!1,text:H.toggleShow},i[4]=H.toggleShow,i[5]=$):$=i[5];const[K,V]=r.useState($);let W;i[6]!==K.expanded||i[7]!==H.toggleShow||i[8]!==H.toggleHide?(W=()=>{const e=K.expanded?H.toggleShow:H.toggleHide;V({expanded:!K.expanded,text:e})},i[6]=K.expanded,i[7]=H.toggleShow,i[8]=H.toggleHide,i[9]=W):W=i[9];const M=W,[O,Z]=r.useState(""),q=(e,a)=>{Z(a),Ee(ee,a,ue,ne)},G=e=>{e.stopPropagation(),q(0,"")},J=()=>O.search.length?s.jsx(w,{type:"button",size:"small",withBackground:!1,withBorder:!1,screenReaderLabel:H.clearSearch,onClick:G,children:s.jsx(S,{})}):null;let Q;i[10]!==F?(Q=[F],i[10]=F,i[11]=Q):Q=i[11];const[X,Y]=r.useState(Q),ee=X,ae=(e,a)=>{const r=[];"all"===a?(r.push(...m),te(e,"all")):r.push(...m.filter((e=>e.toUpperCase().includes(a.toUpperCase())))),Y(r),Ee(r,O,ue,ne)},[re,le]=r.useState("all"),ne=re,[oe,se]=r.useState(l),te=(e,a)=>{"all"===a||l.includes(a)?le(a):console.error(`Invalid value for setActiveProduct: ${a}`),Ee(ee,O,ue,a)},[ie,ce]=r.useState("all"),[de,pe]=r.useState(n),ue=de,he=(e,a)=>{const r=[];"all"===a?r.push("AWS",...n):r.push(...["AWS",...n].filter((e=>e.toLowerCase().includes(a.toLowerCase())))),ce(a),pe(r),te(e,"all"),se(r),Ee(ee,O,r,"all")};let ge,me;i[12]!==F?(ge=o.map((e=>({...e,links:e.links.filter((e=>e.lang.toUpperCase()===F))}))),i[12]=F,i[13]=ge):ge=i[13],i[14]!==ge?(me={list:ge},i[14]=ge,i[15]=me):me=i[15];const[fe,xe]=r.useState(me),Ee=(e,a,r,l)=>{const n=o.map((r=>({...r,links:r.links.filter((e=>`${r.brand} ${e.title}`.toLowerCase().includes(a.toLowerCase()))).filter((a=>e.includes(a.lang.toUpperCase())))}))).filter((e=>e.links.length>0)).filter((e=>r.includes(e.brand))).filter((e=>"all"===l||(e.brand===oe[0]||e.brand===l)));xe({list:n})};let Le;i[16]!==H.copy_error?(Le=async function(e){try{await navigator.clipboard.writeText(e)}catch(a){const e=a;let r=H.copy_error;e instanceof Error?r=e.message:"string"==typeof e&&(r=e),console.error(r)}},i[16]=H.copy_error,i[17]=Le):Le=i[17];const _e=Le;let je,Re,Se,be;i[18]!==F?(je=s.jsx(f,{language:F}),i[18]=F,i[19]=je):je=i[19],i[20]!==H.header?(Re=s.jsx(t,{level:"h1",children:H.header}),i[20]=H.header,i[21]=Re):Re=i[21],i[22]!==H.description?(Se=s.jsx(h,{as:"p",children:H.description}),i[22]=H.description,i[23]=Se):Se=i[23],i[24]!==M||i[25]!==K.text?(be=s.jsx(_,{onClick:M,children:K.text}),i[24]=M,i[25]=K.text,i[26]=be):be=i[26];const ye=H.filters,ke=K.expanded;let Ce,Te;i[27]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(P,{inline:!1}),i[27]=Ce):Ce=i[27],i[28]!==H.search||i[29]!==H.placeholder||i[30]!==q||i[31]!==J||i[32]!==O?(Te=s.jsx(k,{type:"search",renderLabel:H.search,placeholder:H.placeholder,onChange:q,renderBeforeInput:Ce,renderAfterInput:J,value:O}),i[28]=H.search,i[29]=H.placeholder,i[30]=q,i[31]=J,i[32]=O,i[33]=Te):Te=i[33];const we=H.brands;let Pe,ve,Be,Ae;i[34]===Symbol.for("react.memo_cache_sentinel")?(Pe=s.jsx(R,{value:"all",label:"All",context:"off"},"all"),ve=["AWS",...l].map(N),i[34]=Pe,i[35]=ve):(Pe=i[34],ve=i[35]),i[36]!==H.brands||i[37]!==he?(Be=s.jsxs(j,{name:"brand",description:we,defaultValue:"all",layout:"columns",variant:"toggle",onChange:he,children:[Pe,ve]}),i[36]=H.brands,i[37]=he,i[38]=Be):Be=i[38],i[39]!==ie||i[40]!==oe||i[41]!==te||i[42]!==ne||i[43]!==H?(Ae="all"!==ie&&oe.length>1&&s.jsxs(j,{name:"product",description:H.products,defaultValue:"all",layout:"columns",variant:"toggle",onChange:te,children:[s.jsx(R,{value:"all",label:"All",context:"off",id:"allProducts",checked:"all"===ne},"all"),oe.filter((e=>e!==ie)).map(U)]}),i[39]=ie,i[40]=oe,i[41]=te,i[42]=ne,i[43]=H,i[44]=Ae):Ae=i[44];const Ue=H.language;let Ne,De,Fe,He,ze,Ie,$e,Ke,Ve,We;if(i[45]===Symbol.for("react.memo_cache_sentinel")?(Ne=s.jsx(R,{value:"all",label:"All",context:"off"},"all"),De=g.map(A),i[45]=Ne,i[46]=De):(Ne=i[45],De=i[46]),i[47]!==H.language||i[48]!==F||i[49]!==ae?(Fe=s.jsxs(j,{name:"language",description:Ue,defaultValue:F,layout:"columns",variant:"toggle",onChange:ae,children:[Ne,De]}),i[47]=H.language,i[48]=F,i[49]=ae,i[50]=Fe):Fe=i[50],i[51]!==Te||i[52]!==Be||i[53]!==Ae||i[54]!==Fe?(He=s.jsx(d,{as:"div",margin:"large none none",children:s.jsx("form",{name:"searchFilters",autoComplete:"off",children:s.jsxs(C,{label:"",description:"",layout:"stacked",children:[Te,Be,Ae,Fe]})})}),i[51]=Te,i[52]=Be,i[53]=Ae,i[54]=Fe,i[55]=He):He=i[55],i[56]!==H.filters||i[57]!==M||i[58]!==K.expanded||i[59]!==He?(ze=s.jsx(b,{id:"toggleFilters",summary:ye,onToggle:M,expanded:ke,children:He}),i[56]=H.filters,i[57]=M,i[58]=K.expanded,i[59]=He,i[60]=ze):ze=i[60],i[61]!==Re||i[62]!==Se||i[63]!==be||i[64]!==ze?(Ie=s.jsxs(d,{as:"div",margin:"none none x-large",children:[Re,Se,be,ze]}),i[61]=Re,i[62]=Se,i[63]=be,i[64]=ze,i[65]=Ie):Ie=i[65],i[66]!==H.title||i[67]!==H.link||i[68]!==H.copy||i[69]!==H.copy_url||i[70]!==_e||i[71]!==fe.list){let e;i[73]!==H.title||i[74]!==H.link||i[75]!==H.copy||i[76]!==H.copy_url||i[77]!==_e?(e=e=>{if(e.links.length){const a=e.brand;return s.jsxs(d,{as:"div",margin:"none none xx-large",children:[s.jsx(t,{level:l.includes(a)?"h2":"h3",id:a,children:a}),s.jsxs(T,{hover:!0,caption:a,children:[s.jsx(T.Head,{children:s.jsxs(T.Row,{children:[s.jsx(T.ColHeader,{id:"Title",width:"25%",children:H.title}),s.jsx(T.ColHeader,{id:"URLs",children:H.link})]})}),s.jsx(T.Body,{children:e.links.map((e=>s.jsxs(T.Row,{children:[s.jsx(T.Cell,{children:s.jsx(h,{children:e.title})}),s.jsxs(T.Cell,{children:[s.jsx(x,{href:`https://${I}${e.from}`,children:`${I}${e.from}`}),"  ",s.jsx(E,{renderTip:H.copy,on:["hover","focus"],placement:"top",color:"primary-inverse",children:s.jsx(w,{withBackground:!1,withBorder:!1,screenReaderLabel:H.copy_url,onClick:()=>{_e(`https://${I}${e.from}`)},children:s.jsx(y,{})})}),s.jsx("br",{}),s.jsx(h,{size:"small",color:"secondary",children:e.to.split("?")[0]})]})]},e.title)))})]})]},a)}return null},i[73]=H.title,i[74]=H.link,i[75]=H.copy,i[76]=H.copy_url,i[77]=_e,i[78]=e):e=i[78],$e=fe.list.map(e),i[66]=H.title,i[67]=H.link,i[68]=H.copy,i[69]=H.copy_url,i[70]=_e,i[71]=fe.list,i[72]=$e}else $e=i[72];return i[79]!==Ie||i[80]!==$e?(Ke=s.jsxs(d,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[Ie,$e]}),i[79]=Ie,i[80]=$e,i[81]=Ke):Ke=i[81],i[82]!==F?(Ve=s.jsx(L,{language:F}),i[82]=F,i[83]=Ve):Ve=i[83],i[84]!==je||i[85]!==Ke||i[86]!==Ve?(We=s.jsxs(s.Fragment,{children:[je,Ke,Ve]}),i[84]=je,i[85]=Ke,i[86]=Ve,i[87]=We):We=i[87],We}function A(e){return s.jsx(R,{value:e.code,label:e.local,context:"off"},e.code)}function U(e){return s.jsx(R,{value:e,label:e,context:"off"},e)}function N(e){return s.jsx(R,{value:e,label:e,context:"off"},e)}function D(){const e=r.lazy((()=>i((()=>import("./error-DNgfncXY.js")),__vite__mapDeps([0,1,2,3,4,5,6])).then((e=>({default:e.Component})))));return s.jsx(r.Suspense,{fallback:s.jsx("h1",{children:"Error."}),children:s.jsx(e,{})})}B.displayName="Route.Links",D.displayName="Error.Links";export{B as Component,D as ErrorBoundary}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/error-CbdNqE21.js","assets/index-DxmLT0bY.js","assets/index-CqQFZXZA.css","assets/RenderTopNavBar-BObK9Y19.js","assets/RenderTabNav-Cf-NKHb4.js","assets/index-VWJm_On8.js","assets/index-DsnmBOMj.js"])))=>i.map(i=>d[i]); +import{a as e,e as a,r,b as l,f as n,L as o,j as s,H as t,_ as i,g as c,V as d}from"./index-DxmLT0bY.js";import{a as p,g as u,T as h,d as g,b as m,R as f,L as x,e as E,c as L}from"./RenderTopNavBar-BObK9Y19.js";import{B as _,R as j,a as R,I as S,T as b,b as y}from"./index-CFaT5J52.js";import{T as k,F as C,a as T}from"./index-CmNFgSR4.js";import{I as w,a as P}from"./index-CaYtQ08a.js";const v={header:{EN:"Redirect Links",ES_LA:"Enlaces de Redirección",PT_BR:"Links de Redirecionamento",DE:"Weiterleitungslinks"},description:{EN:"This page provides a collection of shortened URLs for use in RFP responses. Each row has a short URL and the original URL. Click on the copy icon and the short URL will be added to your clipboard.",ES_LA:"Esta página proporciona una colección de URL abreviadas para usar en las respuestas a RFP. Cada fila tiene una URL corta y la URL original. Haga clic en la copia y la URL corta se agregará a su portapapeles.",PT_BR:"Esta página fornece uma coleção de URLs abreviados para uso em respostas de RFP. Cada linha possui um URL curto e o URL original. Clique na cópia ícone e o URL curto serão adicionados à sua área de transferência.",DE:"Diese Seite bietet eine Sammlung verkürzter URLs zur Verwendung in RFP-Antworten. Jede Zeile enthält eine Kurz-URL und die Original-URL. Klicken Sie auf die Kopie-Symbol und die Kurz-URL wird Ihrer Zwischenablage hinzugefügt."},filters:{EN:"Filters",ES_LA:"Filtros",PT_BR:"Filtros",DE:"filter"},toggleShow:{EN:"Show filters",ES_LA:"Mostrar filtros",PT_BR:"Mostrar filtros",DE:"Filter anzeigen"},toggleHide:{EN:"Hide filters",ES_LA:"Ocultar filtros",PT_BR:"Ocultar filtros",DE:"Filter ausblenden"},search:{EN:"Search",ES_LA:"Buscar",PT_BR:"Procurar",DE:"Suche"},clearSearch:{EN:"Clear search",ES_LA:"Borrar búsqueda",PT_BR:"Limpar pesquisa",DE:"Suche löschen"},placeholder:{EN:"community",ES_LA:"comunidad",PT_BR:"comunidade",DE:"Gemeinschaft"},brands:{EN:"Brands",ES_LA:"Marcas",PT_BR:"Marcas",DE:"Marken"},products:{EN:"Products",ES_LA:"Productos",PT_BR:"Produtos",DE:"Produkte"},language:{EN:"Language",ES_LA:"Idioma",PT_BR:"Idioma",DE:"Sprache"},title:{EN:"Title",ES_LA:"Título",PT_BR:"Título",DE:"Titel"},link:{EN:"Link",ES_LA:"Enlace",PT_BR:"Link",DE:"Link"},copy:{EN:"Copy",ES_LA:"Copiar",PT_BR:"Copiar",DE:"Kopieren"},copy_url:{EN:"Copy URL to clipboard",ES_LA:"Copiar URL al portapapeles",PT_BR:"Copiar URL para a área de transferência",DE:"Kopieren Sie die URL in die Zwischenablage"},copy_error:{EN:"Error copying to clipboard",ES_LA:"Error al copiar al portapapeles",PT_BR:"Erro ao copiar para a área de transferência",DE:"Fehler beim Kopieren in die Zwischenablage"}};function B(){const i=e.c(88),B=a().language;let D,F;i[0]!==B?(F=p(B),D=u(v,F),i[0]=B,i[1]=D,i[2]=F):(D=i[1],F=i[2]);const H=D;let z;i[3]===Symbol.for("react.memo_cache_sentinel")?(z=c.url.replace("https://",""),i[3]=z):z=i[3];const I=z;let $;i[4]!==H.toggleShow?($={expanded:!1,text:H.toggleShow},i[4]=H.toggleShow,i[5]=$):$=i[5];const[K,V]=r.useState($);let W;i[6]!==K.expanded||i[7]!==H.toggleShow||i[8]!==H.toggleHide?(W=()=>{const e=K.expanded?H.toggleShow:H.toggleHide;V({expanded:!K.expanded,text:e})},i[6]=K.expanded,i[7]=H.toggleShow,i[8]=H.toggleHide,i[9]=W):W=i[9];const M=W,[O,Z]=r.useState(""),q=(e,a)=>{Z(a),Ee(ee,a,ue,ne)},G=e=>{e.stopPropagation(),q(0,"")},J=()=>O.search.length?s.jsx(w,{type:"button",size:"small",withBackground:!1,withBorder:!1,screenReaderLabel:H.clearSearch,onClick:G,children:s.jsx(S,{})}):null;let Q;i[10]!==F?(Q=[F],i[10]=F,i[11]=Q):Q=i[11];const[X,Y]=r.useState(Q),ee=X,ae=(e,a)=>{const r=[];"all"===a?(r.push(...m),te(e,"all")):r.push(...m.filter((e=>e.toUpperCase().includes(a.toUpperCase())))),Y(r),Ee(r,O,ue,ne)},[re,le]=r.useState("all"),ne=re,[oe,se]=r.useState(l),te=(e,a)=>{"all"===a||l.includes(a)?le(a):console.error(`Invalid value for setActiveProduct: ${a}`),Ee(ee,O,ue,a)},[ie,ce]=r.useState("all"),[de,pe]=r.useState(n),ue=de,he=(e,a)=>{const r=[];"all"===a?r.push("AWS",...n):r.push(...["AWS",...n].filter((e=>e.toLowerCase().includes(a.toLowerCase())))),ce(a),pe(r),te(e,"all"),se(r),Ee(ee,O,r,"all")};let ge,me;i[12]!==F?(ge=o.map((e=>({...e,links:e.links.filter((e=>e.lang.toUpperCase()===F))}))),i[12]=F,i[13]=ge):ge=i[13],i[14]!==ge?(me={list:ge},i[14]=ge,i[15]=me):me=i[15];const[fe,xe]=r.useState(me),Ee=(e,a,r,l)=>{const n=o.map((r=>({...r,links:r.links.filter((e=>`${r.brand} ${e.title}`.toLowerCase().includes(a.toLowerCase()))).filter((a=>e.includes(a.lang.toUpperCase())))}))).filter((e=>e.links.length>0)).filter((e=>r.includes(e.brand))).filter((e=>"all"===l||(e.brand===oe[0]||e.brand===l)));xe({list:n})};let Le;i[16]!==H.copy_error?(Le=async function(e){try{await navigator.clipboard.writeText(e)}catch(a){const e=a;let r=H.copy_error;e instanceof Error?r=e.message:"string"==typeof e&&(r=e),console.error(r)}},i[16]=H.copy_error,i[17]=Le):Le=i[17];const _e=Le;let je,Re,Se,be;i[18]!==F?(je=s.jsx(f,{language:F}),i[18]=F,i[19]=je):je=i[19],i[20]!==H.header?(Re=s.jsx(t,{level:"h1",children:H.header}),i[20]=H.header,i[21]=Re):Re=i[21],i[22]!==H.description?(Se=s.jsx(h,{as:"p",children:H.description}),i[22]=H.description,i[23]=Se):Se=i[23],i[24]!==M||i[25]!==K.text?(be=s.jsx(_,{onClick:M,children:K.text}),i[24]=M,i[25]=K.text,i[26]=be):be=i[26];const ye=H.filters,ke=K.expanded;let Ce,Te;i[27]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(P,{inline:!1}),i[27]=Ce):Ce=i[27],i[28]!==H.search||i[29]!==H.placeholder||i[30]!==q||i[31]!==J||i[32]!==O?(Te=s.jsx(k,{type:"search",renderLabel:H.search,placeholder:H.placeholder,onChange:q,renderBeforeInput:Ce,renderAfterInput:J,value:O}),i[28]=H.search,i[29]=H.placeholder,i[30]=q,i[31]=J,i[32]=O,i[33]=Te):Te=i[33];const we=H.brands;let Pe,ve,Be,Ae;i[34]===Symbol.for("react.memo_cache_sentinel")?(Pe=s.jsx(R,{value:"all",label:"All",context:"off"},"all"),ve=["AWS",...l].map(N),i[34]=Pe,i[35]=ve):(Pe=i[34],ve=i[35]),i[36]!==H.brands||i[37]!==he?(Be=s.jsxs(j,{name:"brand",description:we,defaultValue:"all",layout:"columns",variant:"toggle",onChange:he,children:[Pe,ve]}),i[36]=H.brands,i[37]=he,i[38]=Be):Be=i[38],i[39]!==ie||i[40]!==oe||i[41]!==te||i[42]!==ne||i[43]!==H?(Ae="all"!==ie&&oe.length>1&&s.jsxs(j,{name:"product",description:H.products,defaultValue:"all",layout:"columns",variant:"toggle",onChange:te,children:[s.jsx(R,{value:"all",label:"All",context:"off",id:"allProducts",checked:"all"===ne},"all"),oe.filter((e=>e!==ie)).map(U)]}),i[39]=ie,i[40]=oe,i[41]=te,i[42]=ne,i[43]=H,i[44]=Ae):Ae=i[44];const Ue=H.language;let Ne,De,Fe,He,ze,Ie,$e,Ke,Ve,We;if(i[45]===Symbol.for("react.memo_cache_sentinel")?(Ne=s.jsx(R,{value:"all",label:"All",context:"off"},"all"),De=g.map(A),i[45]=Ne,i[46]=De):(Ne=i[45],De=i[46]),i[47]!==H.language||i[48]!==F||i[49]!==ae?(Fe=s.jsxs(j,{name:"language",description:Ue,defaultValue:F,layout:"columns",variant:"toggle",onChange:ae,children:[Ne,De]}),i[47]=H.language,i[48]=F,i[49]=ae,i[50]=Fe):Fe=i[50],i[51]!==Te||i[52]!==Be||i[53]!==Ae||i[54]!==Fe?(He=s.jsx(d,{as:"div",margin:"large none none",children:s.jsx("form",{name:"searchFilters",autoComplete:"off",children:s.jsxs(C,{label:"",description:"",layout:"stacked",children:[Te,Be,Ae,Fe]})})}),i[51]=Te,i[52]=Be,i[53]=Ae,i[54]=Fe,i[55]=He):He=i[55],i[56]!==H.filters||i[57]!==M||i[58]!==K.expanded||i[59]!==He?(ze=s.jsx(b,{id:"toggleFilters",summary:ye,onToggle:M,expanded:ke,children:He}),i[56]=H.filters,i[57]=M,i[58]=K.expanded,i[59]=He,i[60]=ze):ze=i[60],i[61]!==Re||i[62]!==Se||i[63]!==be||i[64]!==ze?(Ie=s.jsxs(d,{as:"div",margin:"none none x-large",children:[Re,Se,be,ze]}),i[61]=Re,i[62]=Se,i[63]=be,i[64]=ze,i[65]=Ie):Ie=i[65],i[66]!==H.title||i[67]!==H.link||i[68]!==H.copy||i[69]!==H.copy_url||i[70]!==_e||i[71]!==fe.list){let e;i[73]!==H.title||i[74]!==H.link||i[75]!==H.copy||i[76]!==H.copy_url||i[77]!==_e?(e=e=>{if(e.links.length){const a=e.brand;return s.jsxs(d,{as:"div",margin:"none none xx-large",children:[s.jsx(t,{level:l.includes(a)?"h2":"h3",id:a,children:a}),s.jsxs(T,{hover:!0,caption:a,children:[s.jsx(T.Head,{children:s.jsxs(T.Row,{children:[s.jsx(T.ColHeader,{id:"Title",width:"25%",children:H.title}),s.jsx(T.ColHeader,{id:"URLs",children:H.link})]})}),s.jsx(T.Body,{children:e.links.map((e=>s.jsxs(T.Row,{children:[s.jsx(T.Cell,{children:s.jsx(h,{children:e.title})}),s.jsxs(T.Cell,{children:[s.jsx(x,{href:`https://${I}${e.from}`,children:`${I}${e.from}`}),"  ",s.jsx(E,{renderTip:H.copy,on:["hover","focus"],placement:"top",color:"primary-inverse",children:s.jsx(w,{withBackground:!1,withBorder:!1,screenReaderLabel:H.copy_url,onClick:()=>{_e(`https://${I}${e.from}`)},children:s.jsx(y,{})})}),s.jsx("br",{}),s.jsx(h,{size:"small",color:"secondary",children:e.to.split("?")[0]})]})]},e.title)))})]})]},a)}return null},i[73]=H.title,i[74]=H.link,i[75]=H.copy,i[76]=H.copy_url,i[77]=_e,i[78]=e):e=i[78],$e=fe.list.map(e),i[66]=H.title,i[67]=H.link,i[68]=H.copy,i[69]=H.copy_url,i[70]=_e,i[71]=fe.list,i[72]=$e}else $e=i[72];return i[79]!==Ie||i[80]!==$e?(Ke=s.jsxs(d,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[Ie,$e]}),i[79]=Ie,i[80]=$e,i[81]=Ke):Ke=i[81],i[82]!==F?(Ve=s.jsx(L,{language:F}),i[82]=F,i[83]=Ve):Ve=i[83],i[84]!==je||i[85]!==Ke||i[86]!==Ve?(We=s.jsxs(s.Fragment,{children:[je,Ke,Ve]}),i[84]=je,i[85]=Ke,i[86]=Ve,i[87]=We):We=i[87],We}function A(e){return s.jsx(R,{value:e.code,label:e.local,context:"off"},e.code)}function U(e){return s.jsx(R,{value:e,label:e,context:"off"},e)}function N(e){return s.jsx(R,{value:e,label:e,context:"off"},e)}function D(){const e=r.lazy((()=>i((()=>import("./error-CbdNqE21.js")),__vite__mapDeps([0,1,2,3,4,5,6])).then((e=>({default:e.Component})))));return s.jsx(r.Suspense,{fallback:s.jsx("h1",{children:"Error."}),children:s.jsx(e,{})})}B.displayName="Route.Links",D.displayName="Error.Links";export{B as Component,D as ErrorBoundary}; diff --git a/assets/markdownBrand-Byq6OFdN.js b/assets/markdownBrand-spFPku_C.js similarity index 91% rename from assets/markdownBrand-Byq6OFdN.js rename to assets/markdownBrand-spFPku_C.js index a24cbe0..4ef3212 100644 --- a/assets/markdownBrand-Byq6OFdN.js +++ b/assets/markdownBrand-spFPku_C.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/error-DNgfncXY.js","assets/index-CrryxQyl.js","assets/index-CqQFZXZA.css","assets/RenderTopNavBar-BTvx9fvK.js","assets/RenderTabNav-BgCD-W_P.js","assets/index-DVeZ9h9n.js","assets/index-BaJp6lgV.js"])))=>i.map(i=>d[i]); -import{g as e,a as t,r,j as a,b as n,P as o,V as s,d as c,u as l,e as i,_ as d}from"./index-CrryxQyl.js";import{g as m,a as u,b as h,R as p,c as f}from"./RenderTopNavBar-BTvx9fvK.js";import{r as g,a as x,b as _,M as b,c as E,d as j}from"./Mdtoui-g9rlRwfF.js";import{T as S}from"./index-DVeZ9h9n.js";import"./index-C6-OLeBB.js";const y={fetch_fail:{EN:"Didn't fetch text correctly.",ES_LA:"No se obtuvo el texto correctamente.",PT_BR:"Não buscou o texto corretamente.",DE:"Text nicht korrekt abgerufen."},download:{EN:"Download",ES_LA:"Descargar",PT_BR:"Baixar",DE:"Herunterladen"},explore:{EN:"Explore",ES_LA:"Explorar",PT_BR:"Explorar",DE:"Erkunden"},error:{EN:"An error occurred fetching package contents.",ES_LA:"Ocurrió un error al obtener el contenido del paquete.",PT_BR:"Ocorreu um erro ao buscar o conteúdo do pacote.",DE:"Beim Abrufen des Paketinhalts ist ein Fehler aufgetreten."}},P={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_VERSION:"6.0.0+1731102829"};function k(e,t){const r=["Google Cloud Platform","Amazon Web Services","Instructure"],a=e=>{const t=e.toLocaleUpperCase(),a=r.findIndex((e=>t.startsWith(e.toLocaleUpperCase())));return-1!==a?a:r.length},n=a(e.path),o=a(t.path);return n!==o?o-n:e.path.localeCompare(t.path)}async function w(t,r,a){const n=a,o=e.owner,s=e.repo,c=[...r.classList].filter((e=>~e.indexOf(t))).toString();if(c){const t=await async function(t,r,a){const n=`${e.api}/repos/${t}/${r}/git/trees/${a}?recursive=1`;try{const e=await fetch(n,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:P?.GITHUB_TOKEN?"token undefined":"","X-GitHub-Api-Version":"2022-11-28"}}),t=await e.json();return t?.tree?{...t,tree:t.tree.sort(k)}:null}catch(o){o instanceof Error?console.error(`Error: ${o.message}`):console.error(`An unexpected error occurred: ${o}`)}}(o,s,c);if(t){const r=function(t,r,a,n,o){const s=m(y,o),c=t.tree.filter((e=>"tree"===e.type)),l=t.tree.filter((e=>"blob"===e.type)).filter((e=>".gitignore"!==e.path));let i=`
\n 🕵️ ${s.explore}\r\n\r\n`;for(const[d,m]of c.entries()){i+=`| ${m.path} |\r\n| ---------------- |`;for(const t of l)m?.path&&t?.path?.startsWith(m.path)&&(i+=`\r\n| [${t.path.replace(`${m.path}/`,"")}](${encodeURI(`${e.raw}/${r}/${a}/${n}/${t.path}`)}) |`);d{const n=t.c(9),{brand:o,branch:s,l:c}=e,[l,i]=r.useState(null);let d,m,u,h,p;return n[0]!==o||n[1]!==s||n[2]!==c?(d=()=>{w(o.toLowerCase().replace(/\s/g,"-"),s,c).then((e=>i(e))).catch((e=>console.error(e)))},m=[o,s,c],n[0]=o,n[1]=s,n[2]=c,n[3]=d,n[4]=m):(d=n[3],m=n[4]),r.useEffect(d,m),n[5]===Symbol.for("react.memo_cache_sentinel")?(u=[g,x],h=[_],n[5]=u,n[6]=h):(u=n[5],h=n[6]),n[7]!==l?(p=a.jsx(b,{remarkPlugins:u,rehypePlugins:h,allowedElements:E,components:j,children:l}),n[7]=l,n[8]=p):p=n[8],p},A={compliance_packages:{EN:"Instructure Compliance Packages",ES_LA:"Paquetes de cumplimiento",PT_BR:"Pacotes de conformidade",DE:"Compliance-Pakete"},loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."}},$=e=>{const n=t.c(16),{index:l,language:i}=e;let d;n[0]===Symbol.for("react.memo_cache_sentinel")?(d=[...o],n[0]=d):d=n[0];const u=d,h=i;let p;n[1]!==h?(p=m(A,h),n[1]=h,n[2]=p):p=n[2];const f=p,S=u[l],y=S.readme,[P,k]=r.useState(null),[w,$]=r.useState(!1);let C;n[3]===Symbol.for("react.memo_cache_sentinel")?(C=[],n[3]=C):C=n[3];const[T,R]=r.useState(C);let L,v,B,D;return n[4]!==y||n[5]!==f.fetch_fail?(L=()=>{fetch(y).then((e=>e.ok?e.text():Promise.reject(f.fetch_fail))).then((e=>{k(e)})).then((()=>{R(Array.from(document.querySelectorAll(".contents"))),$(!0)})).catch((e=>console.error(e)))},v=[y,f.fetch_fail],n[4]=y,n[5]=f.fetch_fail,n[6]=L,n[7]=v):(L=n[6],v=n[7]),r.useEffect(L,v),n[8]!==w||n[9]!==S||n[10]!==h||n[11]!==T||n[12]!==P?(B=w?a.jsxs(a.Fragment,{children:[T.map((e=>c.createPortal(a.jsx(N,{brand:S.brandName,branch:e,l:h}),e))),a.jsx(s,{as:"div",className:"markdown",children:a.jsx(b,{remarkPlugins:[g,x],rehypePlugins:[_],allowedElements:E,components:j,children:P})})]}):null,n[8]=w,n[9]=S,n[10]=h,n[11]=T,n[12]=P,n[13]=B):B=n[13],n[14]!==B?(D=a.jsx(a.Fragment,{children:B}),n[14]=B,n[15]=D):D=n[15],D};function C(e){const c=t.c(6),{language:l,brand:i}=e,d=void 0===i?n[0]:i,m=l,u=[...o],h=`.markdown .lang { display: none; } .markdown .lang.${m.toUpperCase()} { display: inherit; }`,p=u.findIndex((e=>e.title.replace(/\s+/g,"-")===d.toLowerCase())),[f,g]=r.useState(p);let x;c[0]===Symbol.for("react.memo_cache_sentinel")?(x=(e,t)=>{g(t.index)},c[0]=x):x=c[0];const _=x;let b,E;return c[1]!==h?(b=a.jsx("style",{children:h}),c[1]=h,c[2]=b):b=c[2],c[3]!==f||c[4]!==m?(E=a.jsx($,{index:f,language:m}),c[3]=f,c[4]=m,c[5]=E):E=c[5],a.jsxs(s,{as:"div",children:[b,a.jsxs(S,{onRequestTabChange:_,variant:"secondary",children:[a.jsx(S.Panel,{id:`tab-${u[0].brandName}`,renderTitle:u[0].brandName,padding:"large large none",isSelected:0===f,active:!0,children:E},u[0].brandName),u.shift()&&u.map(((e,t)=>a.jsx(S.Panel,{id:`tab-${e.brandName}`,renderTitle:e.brandName,isSelected:f===t+1,children:e.brandName},e.brandName)),[f])]})]})}function T(){const e=t.c(40),{readme:n,brand:o,config:d}=l(),S=d?.lti?.["lti.getPageSettings"]?.pageSettings?.locale.toUpperCase();let P;P=u(i().language);const k=h.find((e=>e.startsWith(S)));k&&(P=k);const w=m(y,P),A=`.markdown .lang { display: none; } .markdown .lang.${P.toUpperCase()} { display: inherit; }`,$=n;let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=window.location.hash.replace("#","").split("/"),e[0]=T):T=e[0];const R=T[1],{mode:L}=d,[v,B]=r.useState(null),[D,I]=r.useState(!1);let O;e[1]===Symbol.for("react.memo_cache_sentinel")?(O=[],e[1]=O):O=e[1];const[U,W]=r.useState(O);let V,q,M,F;if(e[2]!==L||e[3]!==o||e[4]!==$||e[5]!==w.fetch_fail?(V=()=>{"App"===L&&(document.title=`${o} Compliance Packages`),fetch($).then((e=>e.ok?e.text():Promise.reject(w.fetch_fail))).then((e=>{B(e)})).catch((e=>console.error(e)))},q=[$,w.fetch_fail,o,L],e[2]=L,e[3]=o,e[4]=$,e[5]=w.fetch_fail,e[6]=V,e[7]=q):(V=e[6],q=e[7]),r.useEffect(V,q),e[8]!==v?(M=()=>{v&&(W(Array.from(document.querySelectorAll(".contents"))),I(!0))},F=[v],e[8]=v,e[9]=M,e[10]=F):(M=e[9],F=e[10]),r.useEffect(M,F),"App"===L){let t;e[11]!==D||e[12]!==U||e[13]!==P||e[14]!==o?(t=D&&U?.map((e=>c.createPortal(a.jsx(N,{brand:o,branch:e,l:P}),e))),e[11]=D,e[12]=U,e[13]=P,e[14]=o,e[15]=t):t=e[15];const r=P;let n,l;e[16]!==o||e[17]!==r?(n=a.jsx(p,{brand:o,language:r}),e[16]=o,e[17]=r,e[18]=n):n=e[18],e[19]!==A?(l=a.jsx("style",{children:A}),e[19]=A,e[20]=l):l=e[20];const i=`${o.toLowerCase().replace(/\s/g,"-")} markdown`;let d,m,u,h,S;e[21]===Symbol.for("react.memo_cache_sentinel")?(d=[g,x],m=[_],e[21]=d,e[22]=m):(d=e[21],m=e[22]),e[23]!==v?(u=a.jsx(b,{remarkPlugins:d,rehypePlugins:m,allowedElements:E,components:j,children:v}),e[23]=v,e[24]=u):u=e[24],e[25]!==i||e[26]!==u?(h=a.jsx(s,{as:"div",className:i,children:u}),e[25]=i,e[26]=u,e[27]=h):h=e[27],e[28]!==l||e[29]!==h?(S=a.jsxs(s,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[l,h]}),e[28]=l,e[29]=h,e[30]=S):S=e[30];const y=P;let k,w;return e[31]!==y?(k=a.jsx(f,{language:y}),e[31]=y,e[32]=k):k=e[32],e[33]!==t||e[34]!==n||e[35]!==S||e[36]!==k?(w=a.jsxs(a.Fragment,{children:[t,n,S,k]}),e[33]=t,e[34]=n,e[35]=S,e[36]=k,e[37]=w):w=e[37],w}const G=P;let z;return e[38]!==G?(z=a.jsx(C,{language:G,brand:R.length>0?R:void 0}),e[38]=G,e[39]=z):z=e[39],z}function R(){const e=r.lazy((()=>d((()=>import("./error-DNgfncXY.js")),__vite__mapDeps([0,1,2,3,4,5,6])).then((e=>({default:e.Component})))));return a.jsx(r.Suspense,{fallback:a.jsx("h1",{children:"Error."}),children:a.jsx(e,{})})}T.displayName="Route.MarkdownBrand",R.displayName="Error.MarkdownBrand";export{T as Component,R as ErrorBoundary}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/error-CbdNqE21.js","assets/index-DxmLT0bY.js","assets/index-CqQFZXZA.css","assets/RenderTopNavBar-BObK9Y19.js","assets/RenderTabNav-Cf-NKHb4.js","assets/index-VWJm_On8.js","assets/index-DsnmBOMj.js"])))=>i.map(i=>d[i]); +import{g as e,a as t,r,j as a,b as n,P as o,V as s,d as c,u as l,e as i,_ as d}from"./index-DxmLT0bY.js";import{g as m,a as u,b as h,R as p,c as f}from"./RenderTopNavBar-BObK9Y19.js";import{r as g,a as x,b as _,M as b,c as E,d as j}from"./Mdtoui-DwpTTe70.js";import{T as S}from"./index-VWJm_On8.js";import"./index-CmNFgSR4.js";const y={fetch_fail:{EN:"Didn't fetch text correctly.",ES_LA:"No se obtuvo el texto correctamente.",PT_BR:"Não buscou o texto corretamente.",DE:"Text nicht korrekt abgerufen."},download:{EN:"Download",ES_LA:"Descargar",PT_BR:"Baixar",DE:"Herunterladen"},explore:{EN:"Explore",ES_LA:"Explorar",PT_BR:"Explorar",DE:"Erkunden"},error:{EN:"An error occurred fetching package contents.",ES_LA:"Ocurrió un error al obtener el contenido del paquete.",PT_BR:"Ocorreu um erro ao buscar o conteúdo do pacote.",DE:"Beim Abrufen des Paketinhalts ist ein Fehler aufgetreten."}},P={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_VERSION:"6.0.0+1731103637"};function k(e,t){const r=["Google Cloud Platform","Amazon Web Services","Instructure"],a=e=>{const t=e.toLocaleUpperCase(),a=r.findIndex((e=>t.startsWith(e.toLocaleUpperCase())));return-1!==a?a:r.length},n=a(e.path),o=a(t.path);return n!==o?o-n:e.path.localeCompare(t.path)}async function w(t,r,a){const n=a,o=e.owner,s=e.repo,c=[...r.classList].filter((e=>~e.indexOf(t))).toString();if(c){const t=await async function(t,r,a){const n=`${e.api}/repos/${t}/${r}/git/trees/${a}?recursive=1`;try{const e=await fetch(n,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:P?.GITHUB_TOKEN?"token undefined":"","X-GitHub-Api-Version":"2022-11-28"}}),t=await e.json();return t?.tree?{...t,tree:t.tree.sort(k)}:null}catch(o){o instanceof Error?console.error(`Error: ${o.message}`):console.error(`An unexpected error occurred: ${o}`)}}(o,s,c);if(t){const r=function(t,r,a,n,o){const s=m(y,o),c=t.tree.filter((e=>"tree"===e.type)),l=t.tree.filter((e=>"blob"===e.type)).filter((e=>".gitignore"!==e.path));let i=`
\n 🕵️ ${s.explore}\r\n\r\n`;for(const[d,m]of c.entries()){i+=`| ${m.path} |\r\n| ---------------- |`;for(const t of l)m?.path&&t?.path?.startsWith(m.path)&&(i+=`\r\n| [${t.path.replace(`${m.path}/`,"")}](${encodeURI(`${e.raw}/${r}/${a}/${n}/${t.path}`)}) |`);d{const n=t.c(9),{brand:o,branch:s,l:c}=e,[l,i]=r.useState(null);let d,m,u,h,p;return n[0]!==o||n[1]!==s||n[2]!==c?(d=()=>{w(o.toLowerCase().replace(/\s/g,"-"),s,c).then((e=>i(e))).catch((e=>console.error(e)))},m=[o,s,c],n[0]=o,n[1]=s,n[2]=c,n[3]=d,n[4]=m):(d=n[3],m=n[4]),r.useEffect(d,m),n[5]===Symbol.for("react.memo_cache_sentinel")?(u=[g,x],h=[_],n[5]=u,n[6]=h):(u=n[5],h=n[6]),n[7]!==l?(p=a.jsx(b,{remarkPlugins:u,rehypePlugins:h,allowedElements:E,components:j,children:l}),n[7]=l,n[8]=p):p=n[8],p},A={compliance_packages:{EN:"Instructure Compliance Packages",ES_LA:"Paquetes de cumplimiento",PT_BR:"Pacotes de conformidade",DE:"Compliance-Pakete"},loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."}},$=e=>{const n=t.c(16),{index:l,language:i}=e;let d;n[0]===Symbol.for("react.memo_cache_sentinel")?(d=[...o],n[0]=d):d=n[0];const u=d,h=i;let p;n[1]!==h?(p=m(A,h),n[1]=h,n[2]=p):p=n[2];const f=p,S=u[l],y=S.readme,[P,k]=r.useState(null),[w,$]=r.useState(!1);let C;n[3]===Symbol.for("react.memo_cache_sentinel")?(C=[],n[3]=C):C=n[3];const[T,R]=r.useState(C);let L,v,B,D;return n[4]!==y||n[5]!==f.fetch_fail?(L=()=>{fetch(y).then((e=>e.ok?e.text():Promise.reject(f.fetch_fail))).then((e=>{k(e)})).then((()=>{R(Array.from(document.querySelectorAll(".contents"))),$(!0)})).catch((e=>console.error(e)))},v=[y,f.fetch_fail],n[4]=y,n[5]=f.fetch_fail,n[6]=L,n[7]=v):(L=n[6],v=n[7]),r.useEffect(L,v),n[8]!==w||n[9]!==S||n[10]!==h||n[11]!==T||n[12]!==P?(B=w?a.jsxs(a.Fragment,{children:[T.map((e=>c.createPortal(a.jsx(N,{brand:S.brandName,branch:e,l:h}),e))),a.jsx(s,{as:"div",className:"markdown",children:a.jsx(b,{remarkPlugins:[g,x],rehypePlugins:[_],allowedElements:E,components:j,children:P})})]}):null,n[8]=w,n[9]=S,n[10]=h,n[11]=T,n[12]=P,n[13]=B):B=n[13],n[14]!==B?(D=a.jsx(a.Fragment,{children:B}),n[14]=B,n[15]=D):D=n[15],D};function C(e){const c=t.c(6),{language:l,brand:i}=e,d=void 0===i?n[0]:i,m=l,u=[...o],h=`.markdown .lang { display: none; } .markdown .lang.${m.toUpperCase()} { display: inherit; }`,p=u.findIndex((e=>e.title.replace(/\s+/g,"-")===d.toLowerCase())),[f,g]=r.useState(p);let x;c[0]===Symbol.for("react.memo_cache_sentinel")?(x=(e,t)=>{g(t.index)},c[0]=x):x=c[0];const _=x;let b,E;return c[1]!==h?(b=a.jsx("style",{children:h}),c[1]=h,c[2]=b):b=c[2],c[3]!==f||c[4]!==m?(E=a.jsx($,{index:f,language:m}),c[3]=f,c[4]=m,c[5]=E):E=c[5],a.jsxs(s,{as:"div",children:[b,a.jsxs(S,{onRequestTabChange:_,variant:"secondary",children:[a.jsx(S.Panel,{id:`tab-${u[0].brandName}`,renderTitle:u[0].brandName,padding:"large large none",isSelected:0===f,active:!0,children:E},u[0].brandName),u.shift()&&u.map(((e,t)=>a.jsx(S.Panel,{id:`tab-${e.brandName}`,renderTitle:e.brandName,isSelected:f===t+1,children:e.brandName},e.brandName)),[f])]})]})}function T(){const e=t.c(40),{readme:n,brand:o,config:d}=l(),S=d?.lti?.["lti.getPageSettings"]?.pageSettings?.locale.toUpperCase();let P;P=u(i().language);const k=h.find((e=>e.startsWith(S)));k&&(P=k);const w=m(y,P),A=`.markdown .lang { display: none; } .markdown .lang.${P.toUpperCase()} { display: inherit; }`,$=n;let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=window.location.hash.replace("#","").split("/"),e[0]=T):T=e[0];const R=T[1],{mode:L}=d,[v,B]=r.useState(null),[D,I]=r.useState(!1);let O;e[1]===Symbol.for("react.memo_cache_sentinel")?(O=[],e[1]=O):O=e[1];const[U,W]=r.useState(O);let V,q,M,F;if(e[2]!==L||e[3]!==o||e[4]!==$||e[5]!==w.fetch_fail?(V=()=>{"App"===L&&(document.title=`${o} Compliance Packages`),fetch($).then((e=>e.ok?e.text():Promise.reject(w.fetch_fail))).then((e=>{B(e)})).catch((e=>console.error(e)))},q=[$,w.fetch_fail,o,L],e[2]=L,e[3]=o,e[4]=$,e[5]=w.fetch_fail,e[6]=V,e[7]=q):(V=e[6],q=e[7]),r.useEffect(V,q),e[8]!==v?(M=()=>{v&&(W(Array.from(document.querySelectorAll(".contents"))),I(!0))},F=[v],e[8]=v,e[9]=M,e[10]=F):(M=e[9],F=e[10]),r.useEffect(M,F),"App"===L){let t;e[11]!==D||e[12]!==U||e[13]!==P||e[14]!==o?(t=D&&U?.map((e=>c.createPortal(a.jsx(N,{brand:o,branch:e,l:P}),e))),e[11]=D,e[12]=U,e[13]=P,e[14]=o,e[15]=t):t=e[15];const r=P;let n,l;e[16]!==o||e[17]!==r?(n=a.jsx(p,{brand:o,language:r}),e[16]=o,e[17]=r,e[18]=n):n=e[18],e[19]!==A?(l=a.jsx("style",{children:A}),e[19]=A,e[20]=l):l=e[20];const i=`${o.toLowerCase().replace(/\s/g,"-")} markdown`;let d,m,u,h,S;e[21]===Symbol.for("react.memo_cache_sentinel")?(d=[g,x],m=[_],e[21]=d,e[22]=m):(d=e[21],m=e[22]),e[23]!==v?(u=a.jsx(b,{remarkPlugins:d,rehypePlugins:m,allowedElements:E,components:j,children:v}),e[23]=v,e[24]=u):u=e[24],e[25]!==i||e[26]!==u?(h=a.jsx(s,{as:"div",className:i,children:u}),e[25]=i,e[26]=u,e[27]=h):h=e[27],e[28]!==l||e[29]!==h?(S=a.jsxs(s,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[l,h]}),e[28]=l,e[29]=h,e[30]=S):S=e[30];const y=P;let k,w;return e[31]!==y?(k=a.jsx(f,{language:y}),e[31]=y,e[32]=k):k=e[32],e[33]!==t||e[34]!==n||e[35]!==S||e[36]!==k?(w=a.jsxs(a.Fragment,{children:[t,n,S,k]}),e[33]=t,e[34]=n,e[35]=S,e[36]=k,e[37]=w):w=e[37],w}const G=P;let z;return e[38]!==G?(z=a.jsx(C,{language:G,brand:R.length>0?R:void 0}),e[38]=G,e[39]=z):z=e[39],z}function R(){const e=r.lazy((()=>d((()=>import("./error-CbdNqE21.js")),__vite__mapDeps([0,1,2,3,4,5,6])).then((e=>({default:e.Component})))));return a.jsx(r.Suspense,{fallback:a.jsx("h1",{children:"Error."}),children:a.jsx(e,{})})}T.displayName="Route.MarkdownBrand",R.displayName="Error.MarkdownBrand";export{T as Component,R as ErrorBoundary}; diff --git a/assets/mdui-BXjSBCyA.js b/assets/mdui-CXb1k3ot.js similarity index 91% rename from assets/mdui-BXjSBCyA.js rename to assets/mdui-CXb1k3ot.js index 1b3864d..1c8df7e 100644 --- a/assets/mdui-BXjSBCyA.js +++ b/assets/mdui-CXb1k3ot.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/error-DNgfncXY.js","assets/index-CrryxQyl.js","assets/index-CqQFZXZA.css","assets/RenderTopNavBar-BTvx9fvK.js","assets/RenderTabNav-BgCD-W_P.js","assets/index-DVeZ9h9n.js","assets/index-BaJp6lgV.js"])))=>i.map(i=>d[i]); -import{a as n,e,r as a,j as t,V as o,_ as r}from"./index-CrryxQyl.js";import{M as i,c as s,d as l,r as d,a as m,b as u}from"./Mdtoui-g9rlRwfF.js";import{a as c,g,R as h,c as b}from"./RenderTopNavBar-BTvx9fvK.js";import{G as p}from"./index-C6-OLeBB.js";import{S as k}from"./index-DM7MZwnz.js";import"./index-B8c3q9fI.js";const f={loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},markdown_source:{EN:"Markdown Source",ES_LA:"Fuente de Markdown",PT_BR:"Fonte de Markdown",DE:"Markdown-Quelle"},try_editor:{EN:"Try editing the markdown below.",ES_LA:"Intenta editar el markdown abajo.",PT_BR:"Tente editar o markdown abaixo.",DE:"Versuche den Markdown unten zu bearbeiten."},close:{EN:"Close",ES_LA:"Cerrar",PT_BR:"Fechar",DE:"Schließen"}},w="# Markdown to Instructure UI\n\n> [!NOTE]\n> Try editing the markdown on this page.\n\nThis page is rendered from [github-flavored markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) and passing the content through [react-markdown](https://github.com/remarkjs/react-markdown) to [Instructure UI](https://instructure.design/). The result is accessible, well styled, and modular content created simply with markdown.\n\n:arrow_right: [Github](https://github.com/thedannywahl/instructure-security-package/blob/gh-pages/isp-site/src/components/mdtoui.jsx)\n\n
\n\n## Tables\n\n### Normal table\n\n| First Header | Second Header |\n| ---------------- | ---------------- |\n| Content Cell A1 | Content Cell B1 |\n| Content Cell A2 | Content Cell B2 |\n\n### Table with fancy formatting\n\n| Command | Description |\n| --- | --- |\n| `git status` | List all *new or modified* files |\n| `git diff` | Show file differences that **haven't been** staged |\n\n### Table with columnar alignment\n\n| Left-aligned | Center-aligned | Right-aligned |\n| :--- | :---: | ---: |\n| git status | git status | git status |\n| git diff | git diff | git diff |\n\n## Details\n\n
CLICK ME\n\n#### We can hide anything\n\nHello world!\n\n
\n\n## Quotes\n\n> Text that is a quote -- Author Name\n\n> Long quote w/ no attribution, and linebreaks in MD. Bacon ipsum dolor amet biltong pastrami shankle venison jowl meatloaf.\n> Ham jowl leberkas salami fatback sausage chuck pancetta short loin meatball, filet mignon chislic. \n> Tri-tip ham hock ball tip, frankfurter bacon buffalo hamburger chuck turkey filet mignon andouille rump ground round doner short ribs. \n> Fatback short ribs bresaola, turducken ball tip drumstick meatloaf t-bone venison pork belly pig landjaeger chicken salami hamburger. \n> Jowl pork shank t-bone short loin.\n\n### Alerts\n\n> [!NOTE]\n> Useful information that users should know, even when skimming content.\n\n> [!TIP]\n> Helpful advice for doing things better or more easily.\n\n> [!IMPORTANT]\n> Key information users need to know to achieve their goal.\n\n> [!WARNING]\n> Urgent info that needs immediate user attention to avoid problems.\n\n> [!CAUTION]\n> Advises about risks or negative outcomes of certain actions.\n\n## Code\n\nUse `git status` to list all new or modified files that haven't yet been committed.\n\nSome basic Git commands are:\n```\ngit status\ngit add\ngit commit\n```\n\n```javascript\nconst msg = `you need to know about ${err}.`\nalert(msg)\nconsole.warn(\"User alerted:\", msg)\n```\n\n
This is some preformatted text, but it is NOT code
\n\n## Lists\n\n1. James Madison\n2. James Monroe\n3. John Quincy Adams\n\n* George Washington\n* John Adams\n* Thomas Jefferson\n\n- [x] #739\n- [ ] https://github.com/octo-org/octo-repo/issues/740\n- [ ] Add delight to the experience when all tasks are complete :tada:\n\n## Text\n\nEmoji: @octocat :+1: This PR looks great - it's ready to merge!\n\nText style: *italic* **bold** ~struck~\n\n# Heading 1\n## Heading 2\n### Heading 3\n#### Heading 4\n##### Heading 5\n###### Heading 6\n\n**Bacon** ipsum dolor amet beef ribs porchetta shank prosciutto burgdoggen sirloin pork belly pancetta picanha drumstick shoulder meatloaf. Sausage ground round flank shank venison, turducken frankfurter sirloin landjaeger jerky bresaola swine picanha. Buffalo shank short ribs rump swine tail, meatloaf capicola venison pork loin cupim. Buffalo spare ribs ribeye sausage. Ground round porchetta cow, landjaeger pork belly jowl picanha salami. Pork belly pancetta spare ribs swine t-bone, meatloaf bresaola kielbasa pastrami burgdoggen turkey sausage ham hock. Ribeye shank tenderloin beef ribs tail venison drumstick tongue pastrami.\n\nShank spare ribs sausage landjaeger strip steak jerky, fatback salami tenderloin ball tip pastrami pork. Meatball tri-tip ham tongue, beef ribs chuck boudin short ribs pork burgdoggen spare ribs shankle bacon picanha. Burgdoggen pork meatball boudin venison tenderloin tail pork loin short loin chicken. Salami pork loin shankle bresaola, ground round pork pork belly beef ribs flank tongue biltong pastrami cow. Hamburger cupim sausage tri-tip. Ham rump shoulder, ground round sausage flank hamburger spare ribs picanha bacon chuck strip steak.";function y(){const r=n.c(24),y=e().language;let x,T;r[0]!==y?(T=c(y),x=g(f,T),r[0]=y,r[1]=x,r[2]=T):(x=r[1],T=r[2]);const _=x;a.useEffect(j);const[E,v]=a.useState(`${_.loading}`);let C,A,N,S,M,R;r[3]===Symbol.for("react.memo_cache_sentinel")?(C=()=>{v(w)},A=[w],r[3]=C,r[4]=A):(C=r[3],A=r[4]),a.useEffect(C,A),r[5]!==T?(N=t.jsx(h,{language:T}),r[5]=T,r[6]=N):N=r[6],r[7]===Symbol.for("react.memo_cache_sentinel")?(S=[d,m],M=[u],r[7]=S,r[8]=M):(S=r[7],M=r[8]),r[9]!==E?(R=t.jsx(p.Col,{children:t.jsx(i,{remarkPlugins:S,rehypePlugins:M,allowedElements:s,components:l,children:E})}),r[9]=E,r[10]=R):R=r[10];const I=`${_.markdown_source}`;let H,L,B,P,D;return r[11]===Symbol.for("react.memo_cache_sentinel")?(H=n=>{v(n)},r[11]=H):H=r[11],r[12]!==I||r[13]!==E?(L=t.jsx(p.Col,{children:t.jsx(k,{label:I,language:"markdown",readOnly:!1,editable:!0,lineNumbers:!0,foldGutter:!0,highlightActiveLineGutter:!0,highlightActiveLine:!0,lineWrapping:!0,value:E,onChange:H})}),r[12]=I,r[13]=E,r[14]=L):L=r[14],r[15]!==R||r[16]!==L?(B=t.jsx(o,{id:"main",className:"mdui",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"100vw",margin:"0 auto",children:t.jsx(p,{startAt:"large",children:t.jsxs(p.Row,{children:[R,L]})})}),r[15]=R,r[16]=L,r[17]=B):B=r[17],r[18]!==T?(P=t.jsx(b,{language:T}),r[18]=T,r[19]=P):P=r[19],r[20]!==N||r[21]!==B||r[22]!==P?(D=t.jsxs(t.Fragment,{children:[N,B,P]}),r[20]=N,r[21]=B,r[22]=P,r[23]=D):D=r[23],D}function j(){document.title="Markdown to Instructure UI"}function x(){const n=a.lazy((()=>r((()=>import("./error-DNgfncXY.js")),__vite__mapDeps([0,1,2,3,4,5,6])).then((n=>({default:n.Component})))));return t.jsx(a.Suspense,{fallback:t.jsx("h1",{children:"Error."}),children:t.jsx(n,{})})}y.displayName="Route.MDUI",x.displayName="Error.Releases";export{y as Component,x as ErrorBoundary}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/error-CbdNqE21.js","assets/index-DxmLT0bY.js","assets/index-CqQFZXZA.css","assets/RenderTopNavBar-BObK9Y19.js","assets/RenderTabNav-Cf-NKHb4.js","assets/index-VWJm_On8.js","assets/index-DsnmBOMj.js"])))=>i.map(i=>d[i]); +import{a as n,e,r as a,j as t,V as o,_ as r}from"./index-DxmLT0bY.js";import{M as i,c as s,d as l,r as d,a as m,b as u}from"./Mdtoui-DwpTTe70.js";import{a as c,g,R as h,c as b}from"./RenderTopNavBar-BObK9Y19.js";import{G as p}from"./index-CmNFgSR4.js";import{S as k}from"./index-C-ITlPCi.js";import"./index-CaYtQ08a.js";const f={loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},markdown_source:{EN:"Markdown Source",ES_LA:"Fuente de Markdown",PT_BR:"Fonte de Markdown",DE:"Markdown-Quelle"},try_editor:{EN:"Try editing the markdown below.",ES_LA:"Intenta editar el markdown abajo.",PT_BR:"Tente editar o markdown abaixo.",DE:"Versuche den Markdown unten zu bearbeiten."},close:{EN:"Close",ES_LA:"Cerrar",PT_BR:"Fechar",DE:"Schließen"}},w="# Markdown to Instructure UI\n\n> [!NOTE]\n> Try editing the markdown on this page.\n\nThis page is rendered from [github-flavored markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) and passing the content through [react-markdown](https://github.com/remarkjs/react-markdown) to [Instructure UI](https://instructure.design/). The result is accessible, well styled, and modular content created simply with markdown.\n\n:arrow_right: [Github](https://github.com/thedannywahl/instructure-security-package/blob/gh-pages/isp-site/src/components/mdtoui.jsx)\n\n
\n\n## Tables\n\n### Normal table\n\n| First Header | Second Header |\n| ---------------- | ---------------- |\n| Content Cell A1 | Content Cell B1 |\n| Content Cell A2 | Content Cell B2 |\n\n### Table with fancy formatting\n\n| Command | Description |\n| --- | --- |\n| `git status` | List all *new or modified* files |\n| `git diff` | Show file differences that **haven't been** staged |\n\n### Table with columnar alignment\n\n| Left-aligned | Center-aligned | Right-aligned |\n| :--- | :---: | ---: |\n| git status | git status | git status |\n| git diff | git diff | git diff |\n\n## Details\n\n
CLICK ME\n\n#### We can hide anything\n\nHello world!\n\n
\n\n## Quotes\n\n> Text that is a quote -- Author Name\n\n> Long quote w/ no attribution, and linebreaks in MD. Bacon ipsum dolor amet biltong pastrami shankle venison jowl meatloaf.\n> Ham jowl leberkas salami fatback sausage chuck pancetta short loin meatball, filet mignon chislic. \n> Tri-tip ham hock ball tip, frankfurter bacon buffalo hamburger chuck turkey filet mignon andouille rump ground round doner short ribs. \n> Fatback short ribs bresaola, turducken ball tip drumstick meatloaf t-bone venison pork belly pig landjaeger chicken salami hamburger. \n> Jowl pork shank t-bone short loin.\n\n### Alerts\n\n> [!NOTE]\n> Useful information that users should know, even when skimming content.\n\n> [!TIP]\n> Helpful advice for doing things better or more easily.\n\n> [!IMPORTANT]\n> Key information users need to know to achieve their goal.\n\n> [!WARNING]\n> Urgent info that needs immediate user attention to avoid problems.\n\n> [!CAUTION]\n> Advises about risks or negative outcomes of certain actions.\n\n## Code\n\nUse `git status` to list all new or modified files that haven't yet been committed.\n\nSome basic Git commands are:\n```\ngit status\ngit add\ngit commit\n```\n\n```javascript\nconst msg = `you need to know about ${err}.`\nalert(msg)\nconsole.warn(\"User alerted:\", msg)\n```\n\n
This is some preformatted text, but it is NOT code
\n\n## Lists\n\n1. James Madison\n2. James Monroe\n3. John Quincy Adams\n\n* George Washington\n* John Adams\n* Thomas Jefferson\n\n- [x] #739\n- [ ] https://github.com/octo-org/octo-repo/issues/740\n- [ ] Add delight to the experience when all tasks are complete :tada:\n\n## Text\n\nEmoji: @octocat :+1: This PR looks great - it's ready to merge!\n\nText style: *italic* **bold** ~struck~\n\n# Heading 1\n## Heading 2\n### Heading 3\n#### Heading 4\n##### Heading 5\n###### Heading 6\n\n**Bacon** ipsum dolor amet beef ribs porchetta shank prosciutto burgdoggen sirloin pork belly pancetta picanha drumstick shoulder meatloaf. Sausage ground round flank shank venison, turducken frankfurter sirloin landjaeger jerky bresaola swine picanha. Buffalo shank short ribs rump swine tail, meatloaf capicola venison pork loin cupim. Buffalo spare ribs ribeye sausage. Ground round porchetta cow, landjaeger pork belly jowl picanha salami. Pork belly pancetta spare ribs swine t-bone, meatloaf bresaola kielbasa pastrami burgdoggen turkey sausage ham hock. Ribeye shank tenderloin beef ribs tail venison drumstick tongue pastrami.\n\nShank spare ribs sausage landjaeger strip steak jerky, fatback salami tenderloin ball tip pastrami pork. Meatball tri-tip ham tongue, beef ribs chuck boudin short ribs pork burgdoggen spare ribs shankle bacon picanha. Burgdoggen pork meatball boudin venison tenderloin tail pork loin short loin chicken. Salami pork loin shankle bresaola, ground round pork pork belly beef ribs flank tongue biltong pastrami cow. Hamburger cupim sausage tri-tip. Ham rump shoulder, ground round sausage flank hamburger spare ribs picanha bacon chuck strip steak.";function y(){const r=n.c(24),y=e().language;let x,T;r[0]!==y?(T=c(y),x=g(f,T),r[0]=y,r[1]=x,r[2]=T):(x=r[1],T=r[2]);const _=x;a.useEffect(j);const[E,v]=a.useState(`${_.loading}`);let C,A,N,S,M,R;r[3]===Symbol.for("react.memo_cache_sentinel")?(C=()=>{v(w)},A=[w],r[3]=C,r[4]=A):(C=r[3],A=r[4]),a.useEffect(C,A),r[5]!==T?(N=t.jsx(h,{language:T}),r[5]=T,r[6]=N):N=r[6],r[7]===Symbol.for("react.memo_cache_sentinel")?(S=[d,m],M=[u],r[7]=S,r[8]=M):(S=r[7],M=r[8]),r[9]!==E?(R=t.jsx(p.Col,{children:t.jsx(i,{remarkPlugins:S,rehypePlugins:M,allowedElements:s,components:l,children:E})}),r[9]=E,r[10]=R):R=r[10];const I=`${_.markdown_source}`;let H,L,B,P,D;return r[11]===Symbol.for("react.memo_cache_sentinel")?(H=n=>{v(n)},r[11]=H):H=r[11],r[12]!==I||r[13]!==E?(L=t.jsx(p.Col,{children:t.jsx(k,{label:I,language:"markdown",readOnly:!1,editable:!0,lineNumbers:!0,foldGutter:!0,highlightActiveLineGutter:!0,highlightActiveLine:!0,lineWrapping:!0,value:E,onChange:H})}),r[12]=I,r[13]=E,r[14]=L):L=r[14],r[15]!==R||r[16]!==L?(B=t.jsx(o,{id:"main",className:"mdui",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"100vw",margin:"0 auto",children:t.jsx(p,{startAt:"large",children:t.jsxs(p.Row,{children:[R,L]})})}),r[15]=R,r[16]=L,r[17]=B):B=r[17],r[18]!==T?(P=t.jsx(b,{language:T}),r[18]=T,r[19]=P):P=r[19],r[20]!==N||r[21]!==B||r[22]!==P?(D=t.jsxs(t.Fragment,{children:[N,B,P]}),r[20]=N,r[21]=B,r[22]=P,r[23]=D):D=r[23],D}function j(){document.title="Markdown to Instructure UI"}function x(){const n=a.lazy((()=>r((()=>import("./error-CbdNqE21.js")),__vite__mapDeps([0,1,2,3,4,5,6])).then((n=>({default:n.Component})))));return t.jsx(a.Suspense,{fallback:t.jsx("h1",{children:"Error."}),children:t.jsx(n,{})})}y.displayName="Route.MDUI",x.displayName="Error.Releases";export{y as Component,x as ErrorBoundary}; diff --git a/assets/redirectTo-CxjXH9wP.js b/assets/redirectTo-BMbIAl3G.js similarity index 87% rename from assets/redirectTo-CxjXH9wP.js rename to assets/redirectTo-BMbIAl3G.js index 9f9d3f4..c308ea5 100644 --- a/assets/redirectTo-CxjXH9wP.js +++ b/assets/redirectTo-BMbIAl3G.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/error-DNgfncXY.js","assets/index-CrryxQyl.js","assets/index-CqQFZXZA.css","assets/RenderTopNavBar-BTvx9fvK.js","assets/RenderTabNav-BgCD-W_P.js","assets/index-DVeZ9h9n.js","assets/index-BaJp6lgV.js"])))=>i.map(i=>d[i]); -import{a as e,u as n,e as a,r as o,j as i,_ as r,V as d}from"./index-CrryxQyl.js";import{a as t,g as s,R as c,L as l,I as g,T as m,c as _}from"./RenderTopNavBar-BTvx9fvK.js";import{R as u}from"./RenderTabNav-BgCD-W_P.js";import{B as p}from"./index-BaJp6lgV.js";import"./index-DVeZ9h9n.js";const h={downloading:{EN:"Downloading",ES_LA:"Descargando",PT_BR:"Baixando",DE:"Herunterladen"},redirecting:{EN:"Redirecting",ES_LA:"Redirigiendo",PT_BR:"Redirecionando",DE:"Weiterleitung"},youre_downloading_the:{EN:"You're downloading the",ES_LA:"¡Estás descargando el paquete de cumplimiento de",PT_BR:"Você está baixando o pacote de conformidade do",DE:"Sie laden das"},youre_downloading_a:{EN:"You're downloading a document from the",ES_LA:"Estás descargando un documento del paquete de cumplimiento de",PT_BR:"Você está baixando um documento do pacote de conformidade do",DE:"Sie laden ein Dokument aus dem"},compliance_package:{EN:"compliance package!",ES_LA:"!",PT_BR:"!",DE:"-Compliance-Paket herunter!"},didnt_work:{EN:"Didn't work?",ES_LA:"¿No funcionó?",PT_BR:"Não funcionou?",DE:"Hat nicht funktioniert?"},try_again:{EN:"Try again",ES_LA:"Inténtalo de nuevo",PT_BR:"Tente novamente",DE:"Versuchen Sie es erneut"},redirecting_to:{EN:"Redirecting you to",ES_LA:"Redirigiéndote a",PT_BR:"Redirecionando você para",DE:"Weiterleitung zu"},back:{EN:"Back",ES_LA:"Atrás",PT_BR:"Voltar",DE:"Zurück"}};function E(){const r=e.c(38),{path:E,brand:x,url:j,config:w}=n(),R=a().language;let f,k;r[0]!==R?(k=t(R),f=s(h,k),r[0]=R,r[1]=f,r[2]=k):(f=r[1],k=r[2]);const y=f;let N;r[3]!==j?(N=j.split("?"),r[3]=j,r[4]=N):N=r[4];const T=N[0];let D;r[5]!==j?(D=j.slice(-4),r[5]=j,r[6]=D):D=r[6];const L=D,S="/dl"===E.slice(-3),{mode:A}=w,B="App"===A;let P,b,v;r[7]!==j?(P=()=>{window.location.href=j},b=[j],r[7]=j,r[8]=P,r[9]=b):(P=r[8],b=r[9]),o.useEffect(P,b),r[10]!==S||r[11]!==L||r[12]!==y.youre_downloading_the||r[13]!==y.compliance_package||r[14]!==y.youre_downloading_a||r[15]!==y.didnt_work||r[16]!==y.try_again||r[17]!==y.redirecting_to||r[18]!==x||r[19]!==j||r[20]!==T?(v=()=>S?i.jsxs(d,{as:"div",children:[i.jsx(m,{children:".zip"===L?`${y.youre_downloading_the} ${x} ${y.compliance_package}`:`${y.youre_downloading_a} ${x} ${y.compliance_package}`}),i.jsx("br",{}),i.jsxs(m,{size:"x-small",children:[y.didnt_work," ",i.jsx(l,{href:j,children:y.try_again})]})]}):i.jsx(d,{as:"div",children:i.jsxs(m,{children:[y.redirecting_to," ",i.jsx(l,{href:j,children:T})]})}),r[10]=S,r[11]=L,r[12]=y.youre_downloading_the,r[13]=y.compliance_package,r[14]=y.youre_downloading_a,r[15]=y.didnt_work,r[16]=y.try_again,r[17]=y.redirecting_to,r[18]=x,r[19]=j,r[20]=T,r[21]=v):v=r[21];const $=v;let z,C;r[22]!==B||r[23]!==k||r[24]!==x||r[25]!==y?(z=B?i.jsx(c,{language:k}):i.jsxs(i.Fragment,{children:[i.jsx(u,{language:k,brand:x}),i.jsx(l,{href:"intelligent insights"===x.toLowerCase()?`/#/${x.toLowerCase().replace(" ","-")}/`:`/#/${x.split(" ")[0].toLowerCase()}/`,margin:"0 0 0 large",renderIcon:i.jsx(g,{size:"x-small"}),children:y.back})]}),r[22]=B,r[23]=k,r[24]=x,r[25]=y,r[26]=z):z=r[26],r[27]===Symbol.for("react.memo_cache_sentinel")?(C={messageColor:"primary"},r[27]=C):C=r[27];const V=S?y.downloading:y.redirecting;let I,W,q;return r[28]!==V||r[29]!==$?(I=i.jsx(d,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:i.jsx(p,{themeOverride:C,size:"medium",heading:V,headingAs:"h1",message:$})}),r[28]=V,r[29]=$,r[30]=I):I=r[30],r[31]!==B||r[32]!==k?(W=B&&i.jsx(_,{language:k}),r[31]=B,r[32]=k,r[33]=W):W=r[33],r[34]!==z||r[35]!==I||r[36]!==W?(q=i.jsxs(i.Fragment,{children:[z,I,W]}),r[34]=z,r[35]=I,r[36]=W,r[37]=q):q=r[37],q}function x(){const e=o.lazy((()=>r((()=>import("./error-DNgfncXY.js")),__vite__mapDeps([0,1,2,3,4,5,6])).then((e=>({default:e.Component})))));return i.jsx(o.Suspense,{fallback:i.jsx("h1",{children:"Error."}),children:i.jsx(e,{})})}E.displayName="Route.Redirect",x.displayName="Error.Redirect";export{E as Component,x as ErrorBoundary}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/error-CbdNqE21.js","assets/index-DxmLT0bY.js","assets/index-CqQFZXZA.css","assets/RenderTopNavBar-BObK9Y19.js","assets/RenderTabNav-Cf-NKHb4.js","assets/index-VWJm_On8.js","assets/index-DsnmBOMj.js"])))=>i.map(i=>d[i]); +import{a as e,u as n,e as a,r as o,j as i,_ as r,V as d}from"./index-DxmLT0bY.js";import{a as t,g as s,R as c,L as l,I as g,T as m,c as _}from"./RenderTopNavBar-BObK9Y19.js";import{R as u}from"./RenderTabNav-Cf-NKHb4.js";import{B as p}from"./index-DsnmBOMj.js";import"./index-VWJm_On8.js";const h={downloading:{EN:"Downloading",ES_LA:"Descargando",PT_BR:"Baixando",DE:"Herunterladen"},redirecting:{EN:"Redirecting",ES_LA:"Redirigiendo",PT_BR:"Redirecionando",DE:"Weiterleitung"},youre_downloading_the:{EN:"You're downloading the",ES_LA:"¡Estás descargando el paquete de cumplimiento de",PT_BR:"Você está baixando o pacote de conformidade do",DE:"Sie laden das"},youre_downloading_a:{EN:"You're downloading a document from the",ES_LA:"Estás descargando un documento del paquete de cumplimiento de",PT_BR:"Você está baixando um documento do pacote de conformidade do",DE:"Sie laden ein Dokument aus dem"},compliance_package:{EN:"compliance package!",ES_LA:"!",PT_BR:"!",DE:"-Compliance-Paket herunter!"},didnt_work:{EN:"Didn't work?",ES_LA:"¿No funcionó?",PT_BR:"Não funcionou?",DE:"Hat nicht funktioniert?"},try_again:{EN:"Try again",ES_LA:"Inténtalo de nuevo",PT_BR:"Tente novamente",DE:"Versuchen Sie es erneut"},redirecting_to:{EN:"Redirecting you to",ES_LA:"Redirigiéndote a",PT_BR:"Redirecionando você para",DE:"Weiterleitung zu"},back:{EN:"Back",ES_LA:"Atrás",PT_BR:"Voltar",DE:"Zurück"}};function E(){const r=e.c(38),{path:E,brand:x,url:j,config:w}=n(),R=a().language;let f,k;r[0]!==R?(k=t(R),f=s(h,k),r[0]=R,r[1]=f,r[2]=k):(f=r[1],k=r[2]);const y=f;let N;r[3]!==j?(N=j.split("?"),r[3]=j,r[4]=N):N=r[4];const T=N[0];let D;r[5]!==j?(D=j.slice(-4),r[5]=j,r[6]=D):D=r[6];const L=D,S="/dl"===E.slice(-3),{mode:A}=w,B="App"===A;let P,b,v;r[7]!==j?(P=()=>{window.location.href=j},b=[j],r[7]=j,r[8]=P,r[9]=b):(P=r[8],b=r[9]),o.useEffect(P,b),r[10]!==S||r[11]!==L||r[12]!==y.youre_downloading_the||r[13]!==y.compliance_package||r[14]!==y.youre_downloading_a||r[15]!==y.didnt_work||r[16]!==y.try_again||r[17]!==y.redirecting_to||r[18]!==x||r[19]!==j||r[20]!==T?(v=()=>S?i.jsxs(d,{as:"div",children:[i.jsx(m,{children:".zip"===L?`${y.youre_downloading_the} ${x} ${y.compliance_package}`:`${y.youre_downloading_a} ${x} ${y.compliance_package}`}),i.jsx("br",{}),i.jsxs(m,{size:"x-small",children:[y.didnt_work," ",i.jsx(l,{href:j,children:y.try_again})]})]}):i.jsx(d,{as:"div",children:i.jsxs(m,{children:[y.redirecting_to," ",i.jsx(l,{href:j,children:T})]})}),r[10]=S,r[11]=L,r[12]=y.youre_downloading_the,r[13]=y.compliance_package,r[14]=y.youre_downloading_a,r[15]=y.didnt_work,r[16]=y.try_again,r[17]=y.redirecting_to,r[18]=x,r[19]=j,r[20]=T,r[21]=v):v=r[21];const $=v;let z,C;r[22]!==B||r[23]!==k||r[24]!==x||r[25]!==y?(z=B?i.jsx(c,{language:k}):i.jsxs(i.Fragment,{children:[i.jsx(u,{language:k,brand:x}),i.jsx(l,{href:"intelligent insights"===x.toLowerCase()?`/#/${x.toLowerCase().replace(" ","-")}/`:`/#/${x.split(" ")[0].toLowerCase()}/`,margin:"0 0 0 large",renderIcon:i.jsx(g,{size:"x-small"}),children:y.back})]}),r[22]=B,r[23]=k,r[24]=x,r[25]=y,r[26]=z):z=r[26],r[27]===Symbol.for("react.memo_cache_sentinel")?(C={messageColor:"primary"},r[27]=C):C=r[27];const V=S?y.downloading:y.redirecting;let I,W,q;return r[28]!==V||r[29]!==$?(I=i.jsx(d,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:i.jsx(p,{themeOverride:C,size:"medium",heading:V,headingAs:"h1",message:$})}),r[28]=V,r[29]=$,r[30]=I):I=r[30],r[31]!==B||r[32]!==k?(W=B&&i.jsx(_,{language:k}),r[31]=B,r[32]=k,r[33]=W):W=r[33],r[34]!==z||r[35]!==I||r[36]!==W?(q=i.jsxs(i.Fragment,{children:[z,I,W]}),r[34]=z,r[35]=I,r[36]=W,r[37]=q):q=r[37],q}function x(){const e=o.lazy((()=>r((()=>import("./error-CbdNqE21.js")),__vite__mapDeps([0,1,2,3,4,5,6])).then((e=>({default:e.Component})))));return i.jsx(o.Suspense,{fallback:i.jsx("h1",{children:"Error."}),children:i.jsx(e,{})})}E.displayName="Route.Redirect",x.displayName="Error.Redirect";export{E as Component,x as ErrorBoundary}; diff --git a/assets/releases-FYWc6T2H.js b/assets/releases-0LoTboBN.js similarity index 82% rename from assets/releases-FYWc6T2H.js rename to assets/releases-0LoTboBN.js index 447e9e6..40b39cd 100644 --- a/assets/releases-FYWc6T2H.js +++ b/assets/releases-0LoTboBN.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/error-DNgfncXY.js","assets/index-CrryxQyl.js","assets/index-CqQFZXZA.css","assets/RenderTopNavBar-BTvx9fvK.js","assets/RenderTabNav-BgCD-W_P.js","assets/index-DVeZ9h9n.js","assets/index-BaJp6lgV.js"])))=>i.map(i=>d[i]); -import{g as e,a as n,e as r,r as s,j as a,H as o,_ as t,V as i}from"./index-CrryxQyl.js";import{r as l,a as c,b as d,M as m,c as u,d as h}from"./Mdtoui-g9rlRwfF.js";import{a as p,g,R as E,L as j,c as b}from"./RenderTopNavBar-BTvx9fvK.js";import{I as _}from"./IconRssLine-BzGIEfvJ.js";import"./index-C6-OLeBB.js";const f={releases:{EN:"Releases",ES_LA:"Versiones",PT_BR:"Lançamentos",DE:"Veröffentlichungen"},loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},subscribe:{EN:"Subscribe",ES_LA:"Suscríbete",PT_BR:"Inscreva-se",DE:"Abonnieren Sie"}},x={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_VERSION:"6.0.0+1731102829"};function y(e){let n=e?.author?.login||"";return"gdenne"===n?n=" -- Gary Denne":"thedannywahl"===n&&(n=" -- Danny Wahl"),`\n## ${e.name}\r\n\n> ${e.tag_name}${n}\r\n\n\n${e.body}\r\n\n---`}async function R(){return async function(n,r){const s=`${e.api}/repos/${n}/${r}/releases`;try{const e=await fetch(s,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:x?.VITE_GITHUB_TOKEN?"token undefined":"","X-GitHub-Api-Version":"2022-11-28"}}),n=await e.json();return n.length>3?`${n.slice(0,3).map(y).join("\r\n\r\n").slice(0,-3)}---\r\n\r\n[Older Releases](https://github.com/thedannywahl/instructure-security-package/releases)`:n.map(y).join("\r\n\r\n").slice(0,-3)||null}catch(a){return a instanceof Error?console.error(`Error: ${a.message}`):console.error(`An unexpected error occurred: ${a}`),null}}(e.owner,e.repo)}function S(){const t=n.c(32),x=r().language;let y,S,$,w;t[0]!==x?($=p(x),S=g(f,$),w=`https://github.com/${e.owner}/${e.repo}/releases.atom`,y=$.toUpperCase(),t[0]=x,t[1]=y,t[2]=S,t[3]=$,t[4]=w):(y=t[1],S=t[2],$=t[3],w=t[4]);const A=`.markdown .lang { display: none; } .markdown .lang.${y} { display: inherit; }`,[T,D]=s.useState(`${S.loading}`);let L,N,P,V,I,k,v,B,O,C,G,W;return t[5]===Symbol.for("react.memo_cache_sentinel")?(L=()=>{R().then((e=>{D(e)})).catch((e=>console.error(e)))},t[5]=L):L=t[5],s.useEffect(L),t[6]!==$?(N=a.jsx(E,{language:$}),t[6]=$,t[7]=N):N=t[7],t[8]!==S.subscribe?(P=a.jsx(_,{size:"small",color:"warning",title:S.subscribe}),t[8]=S.subscribe,t[9]=P):P=t[9],t[10]!==w||t[11]!==P?(V=a.jsx(j,{href:w,children:P}),t[10]=w,t[11]=P,t[12]=V):V=t[12],t[13]!==V||t[14]!==S.releases?(I=a.jsxs(o,{level:"h1",children:[V," ",S.releases]}),t[13]=V,t[14]=S.releases,t[15]=I):I=t[15],t[16]!==A?(k=a.jsx("style",{children:A}),t[16]=A,t[17]=k):k=t[17],t[18]===Symbol.for("react.memo_cache_sentinel")?(v=[l,c],B=[d],t[18]=v,t[19]=B):(v=t[18],B=t[19]),t[20]!==T?(O=a.jsx(i,{as:"div",className:"markdown",children:a.jsx(m,{remarkPlugins:v,rehypePlugins:B,allowedElements:u,components:h,children:T})}),t[20]=T,t[21]=O):O=t[21],t[22]!==I||t[23]!==k||t[24]!==O?(C=a.jsxs(i,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[I,k,O]}),t[22]=I,t[23]=k,t[24]=O,t[25]=C):C=t[25],t[26]!==$?(G=a.jsx(b,{language:$}),t[26]=$,t[27]=G):G=t[27],t[28]!==N||t[29]!==C||t[30]!==G?(W=a.jsxs(a.Fragment,{children:[N,C,G]}),t[28]=N,t[29]=C,t[30]=G,t[31]=W):W=t[31],W}function $(){const e=s.lazy((()=>t((()=>import("./error-DNgfncXY.js")),__vite__mapDeps([0,1,2,3,4,5,6])).then((e=>({default:e.Component})))));return a.jsx(s.Suspense,{fallback:a.jsx("h1",{children:"Error."}),children:a.jsx(e,{})})}S.displayName="Route.Releases",$.displayName="Error.Releases";export{S as Component,$ as ErrorBoundary}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/error-CbdNqE21.js","assets/index-DxmLT0bY.js","assets/index-CqQFZXZA.css","assets/RenderTopNavBar-BObK9Y19.js","assets/RenderTabNav-Cf-NKHb4.js","assets/index-VWJm_On8.js","assets/index-DsnmBOMj.js"])))=>i.map(i=>d[i]); +import{g as e,a as n,e as r,r as s,j as a,H as o,_ as t,V as i}from"./index-DxmLT0bY.js";import{r as l,a as c,b as d,M as m,c as u,d as h}from"./Mdtoui-DwpTTe70.js";import{a as p,g,R as E,L as j,c as b}from"./RenderTopNavBar-BObK9Y19.js";import{I as _}from"./IconRssLine-CfLRRZ3P.js";import"./index-CmNFgSR4.js";const f={releases:{EN:"Releases",ES_LA:"Versiones",PT_BR:"Lançamentos",DE:"Veröffentlichungen"},loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},subscribe:{EN:"Subscribe",ES_LA:"Suscríbete",PT_BR:"Inscreva-se",DE:"Abonnieren Sie"}},x={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_VERSION:"6.0.0+1731103637"};function y(e){let n=e?.author?.login||"";return"gdenne"===n?n=" -- Gary Denne":"thedannywahl"===n&&(n=" -- Danny Wahl"),`\n## ${e.name}\r\n\n> ${e.tag_name}${n}\r\n\n\n${e.body}\r\n\n---`}async function R(){return async function(n,r){const s=`${e.api}/repos/${n}/${r}/releases`;try{const e=await fetch(s,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:x?.VITE_GITHUB_TOKEN?"token undefined":"","X-GitHub-Api-Version":"2022-11-28"}}),n=await e.json();return n.length>3?`${n.slice(0,3).map(y).join("\r\n\r\n").slice(0,-3)}---\r\n\r\n[Older Releases](https://github.com/thedannywahl/instructure-security-package/releases)`:n.map(y).join("\r\n\r\n").slice(0,-3)||null}catch(a){return a instanceof Error?console.error(`Error: ${a.message}`):console.error(`An unexpected error occurred: ${a}`),null}}(e.owner,e.repo)}function S(){const t=n.c(32),x=r().language;let y,S,$,w;t[0]!==x?($=p(x),S=g(f,$),w=`https://github.com/${e.owner}/${e.repo}/releases.atom`,y=$.toUpperCase(),t[0]=x,t[1]=y,t[2]=S,t[3]=$,t[4]=w):(y=t[1],S=t[2],$=t[3],w=t[4]);const A=`.markdown .lang { display: none; } .markdown .lang.${y} { display: inherit; }`,[T,D]=s.useState(`${S.loading}`);let L,N,P,V,I,k,v,B,O,C,G,W;return t[5]===Symbol.for("react.memo_cache_sentinel")?(L=()=>{R().then((e=>{D(e)})).catch((e=>console.error(e)))},t[5]=L):L=t[5],s.useEffect(L),t[6]!==$?(N=a.jsx(E,{language:$}),t[6]=$,t[7]=N):N=t[7],t[8]!==S.subscribe?(P=a.jsx(_,{size:"small",color:"warning",title:S.subscribe}),t[8]=S.subscribe,t[9]=P):P=t[9],t[10]!==w||t[11]!==P?(V=a.jsx(j,{href:w,children:P}),t[10]=w,t[11]=P,t[12]=V):V=t[12],t[13]!==V||t[14]!==S.releases?(I=a.jsxs(o,{level:"h1",children:[V," ",S.releases]}),t[13]=V,t[14]=S.releases,t[15]=I):I=t[15],t[16]!==A?(k=a.jsx("style",{children:A}),t[16]=A,t[17]=k):k=t[17],t[18]===Symbol.for("react.memo_cache_sentinel")?(v=[l,c],B=[d],t[18]=v,t[19]=B):(v=t[18],B=t[19]),t[20]!==T?(O=a.jsx(i,{as:"div",className:"markdown",children:a.jsx(m,{remarkPlugins:v,rehypePlugins:B,allowedElements:u,components:h,children:T})}),t[20]=T,t[21]=O):O=t[21],t[22]!==I||t[23]!==k||t[24]!==O?(C=a.jsxs(i,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[I,k,O]}),t[22]=I,t[23]=k,t[24]=O,t[25]=C):C=t[25],t[26]!==$?(G=a.jsx(b,{language:$}),t[26]=$,t[27]=G):G=t[27],t[28]!==N||t[29]!==C||t[30]!==G?(W=a.jsxs(a.Fragment,{children:[N,C,G]}),t[28]=N,t[29]=C,t[30]=G,t[31]=W):W=t[31],W}function $(){const e=s.lazy((()=>t((()=>import("./error-CbdNqE21.js")),__vite__mapDeps([0,1,2,3,4,5,6])).then((e=>({default:e.Component})))));return a.jsx(s.Suspense,{fallback:a.jsx("h1",{children:"Error."}),children:a.jsx(e,{})})}S.displayName="Route.Releases",$.displayName="Error.Releases";export{S as Component,$ as ErrorBoundary}; diff --git a/index.html b/index.html index 4e9404d..f59bf1d 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ - + @@ -16,7 +16,7 @@ Instructure Compliance Packages - +