diff --git a/src/promptflow-devkit/promptflow/_sdk/_service/static/trace/assets/index-LcTdDUWD.js b/src/promptflow-devkit/promptflow/_sdk/_service/static/trace/assets/index-vZjyjVA1.js similarity index 92% rename from src/promptflow-devkit/promptflow/_sdk/_service/static/trace/assets/index-LcTdDUWD.js rename to src/promptflow-devkit/promptflow/_sdk/_service/static/trace/assets/index-vZjyjVA1.js index b4bc5a9eeec..c15fa27a63c 100644 --- a/src/promptflow-devkit/promptflow/_sdk/_service/static/trace/assets/index-LcTdDUWD.js +++ b/src/promptflow-devkit/promptflow/_sdk/_service/static/trace/assets/index-vZjyjVA1.js @@ -159,7 +159,7 @@ License: MIT `:"\r"}(Os,Js)),Do=!1,Oo.delimiter)Co(Oo.delimiter)&&(Oo.delimiter=Oo.delimiter(Os),Zo.meta.delimiter=Oo.delimiter);else{var Ys=function($a,yl,Ol,Zl,ou){var _c,Fl,na,Sl;ou=ou||[","," ","|",";",lo.RECORD_SEP,lo.UNIT_SEP];for(var cu=0;cu=Po)return Fs(!0)}else for(Es=Fo,Fo++;;){if((Es=qo.indexOf(wo,Es+1))===-1)return Qo||$s.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:Ts.length,index:Fo}),qs();if(Es===Zo-1)return qs(qo.substring(Fo,Es).replace(cu,wo));if(wo!==No||qo[Es+1]!==No){if(wo===No||Es===0||qo[Es-1]!==No){na!==-1&&na=Po)return Fs(!0);break}$s.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:Ts.length,index:Fo}),Es++}}else Es++}return qs();function Cs(_l){Ts.push(_l),Ls=Fo}function Ps(_l){var xl=0;if(_l!==-1){var Nl=qo.substring(Es+1,_l);Nl&&Nl.trim()===""&&(xl=Nl.length)}return xl}function qs(_l){return Qo||(_l===void 0&&(_l=qo.substring(Fo)),Os.push(_l),Fo=Zo,Cs(Os),Rs&&Qs()),Fs()}function Ds(_l){Fo=_l,Cs(Os),Os=[],Sl=qo.indexOf(Do,Fo)}function Fs(_l){return{data:Ts,errors:$s,meta:{delimiter:Ro,linebreak:Do,aborted:zo,truncated:!!_l,cursor:Ls+(Go||0)}}}function Qs(){Mo(Fs()),Ts=[],$s=[]}},this.abort=function(){zo=!0},this.getCharIndex=function(){return Fo}}function _o(Oo){var wo=Oo.data,Ro=so[wo.workerId],Do=!1;if(wo.error)Ro.userError(wo.error,wo.file);else if(wo.results&&wo.results.data){var $o={abort:function(){Do=!0,Eo(wo.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:So,resume:So};if(Co(Ro.userStep)){for(var Mo=0;Mo{const no={};return Object.keys(eo).forEach(oo=>{const io=eo[oo];oo===to?no[ro]=io:no[oo]=io}),no},getDefaultNodeVariant=eo=>{const{defaultVariantId:to=BASELINE_VARIANT_ID,variants:ro={}}=eo,no=ro[to];return no==null?void 0:no.node},getDefaultNodeList=(eo,to)=>{const ro=[];return eo.forEach(no=>{const oo=to.get(no);if(!oo)return;const io=getDefaultNodeVariant(oo);io&&ro.push(io)}),ro},getFlowSnapshotNodeList=(eo,to,ro)=>{const no=[];return eo.forEach(oo=>{if(ro.includes(oo)){no.push({name:oo,use_variants:!0});return}const io=to[oo];if(!io)return;const so={inputs:{},...getDefaultNodeVariant(io)};so&&no.push(so)}),no};ToolType.llm;ToolType.prompt;ValueType.string,ToolType.python;ValueType.string,ToolType.typescript;const getTokensUsageByRow=eo=>{var to,ro,no,oo,io,so;return eo.children&&eo.children.length>0?eo.children.reduce((ao,lo)=>{const co=getTokensUsageByRow(lo);return{totalTokens:ao.totalTokens+co.totalTokens,promptTokens:ao.promptTokens+co.promptTokens,completionTokens:ao.completionTokens+co.completionTokens}},{totalTokens:0,promptTokens:0,completionTokens:0}):{totalTokens:((ro=(to=eo.output)==null?void 0:to.usage)==null?void 0:ro.total_tokens)??0,promptTokens:((oo=(no=eo.output)==null?void 0:no.usage)==null?void 0:oo.prompt_tokens)??0,completionTokens:((so=(io=eo.output)==null?void 0:io.usage)==null?void 0:so.completion_tokens)??0}},numberToDigitsString=eo=>eo.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),timePDTFormatter=eo=>{const to=new Date(eo),ro=getUTCTimezoneOffset();return`${to.getFullYear()}-${to.getMonth()+1}-${to.getDate()} ${to.getHours()}:${to.getMinutes()}:${to.getSeconds()}:${to.getMilliseconds()} (${ro})`},getUTCTimezoneOffset=()=>{const eo=new Date().getTimezoneOffset(),to=Math.abs(eo);return`UTC${(eo<0?"+":"-")+`00${Math.floor(to/60)}`.slice(-2)}:${`00${to%60}`.slice(-2)}`},hasOwn=(eo,to)=>Object.prototype.hasOwnProperty.call(eo,to),resolveTool=(eo,to,ro,no)=>{var oo,io,so;if(((oo=eo==null?void 0:eo.source)==null?void 0:oo.type)==="code")return to;if(((io=eo==null?void 0:eo.source)==null?void 0:io.type)==="package_with_prompt"){const ao=(so=eo==null?void 0:eo.source)==null?void 0:so.path,lo=no(ao??"");return ro?{...ro,inputs:{...lo==null?void 0:lo.inputs,...addPositionField(ro==null?void 0:ro.inputs,"parameter")},code:lo==null?void 0:lo.code}:void 0}return ro},addPositionField=(eo,to)=>{if(!eo)return eo;const ro={...eo};return Object.keys(ro).forEach(no=>{ro[no]={...ro[no],position:to}}),ro},keyWords=["and","as","assert","break","class","continue","def","del","elif","else","except","False","finally","for","from","global","if","import","in","is","lambda","None","nonlocal","not","or","pass","raise","return","True","try","while","with","yield"],keyFunction=["abs","all","any","ascii","bin","bool","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","str","sum","super","tuple","type","vars","zip"],flowWords=["input","inputs","output","outputs","flow","flows"],checkNodeNameValid=eo=>keyWords.some(to=>to===eo)||keyFunction.some(to=>to===eo)||flowWords.some(to=>to===eo)?!1:/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(eo),getNodesThatMoreThanOneVariant=(eo={})=>{const to=[];return Object.keys(eo).forEach(ro=>{const no=eo[ro],{variants:oo={},defaultVariantId:io,default_variant_id:so}=no,ao=Object.keys(oo).length;ao>1&&to.push({nodeName:ro,variantsCount:ao,defaultVariantId:io??so??BASELINE_VARIANT_ID,variants:oo})}),to},getVariantNodes=(eo={})=>{const to={};return Object.keys(eo).forEach(ro=>{const no=eo[ro],{variants:oo={}}=no;if(Object.keys(oo).length>1){const so=lodashExports.cloneDeep(no);Object.entries((so==null?void 0:so.variants)??{}).forEach(([lo,co])=>{co.node&&delete co.node.name});const ao=so.defaultVariantId;delete so.defaultVariantId,to[ro]={default_variant_id:ao,...so}}}),Object.keys(to).length>0?to:void 0},revValueRegex=/^\$\{(\S+)\}$/,getRefValueFromRaw=eo=>{var to,ro;return(ro=(to=`${eo??""}`)==null?void 0:to.match(revValueRegex))==null?void 0:ro[1]},generateRandomStrings=eo=>{const to="abcdefghijklmnopqrstuvwxyz0123456789";let ro="";for(let no=0;nogenerateRandomStrings(8),getRandomOutputDefinitionId=getRandomInputDefinitionId,intNumberRegExp=/^[+-]?\d+$/,doubleNumberRegExp=/^[+-]?\d+(\.\d+)?$/,isBool=eo=>eo.toLowerCase()==="true"||eo.toLowerCase()==="false",isNumber=eo=>doubleNumberRegExp.test(eo.trim())?eo===eo.trim()&&eo.length>0&&!Number.isNaN(Number(eo)):!1,isInt=eo=>intNumberRegExp.test(eo.trim())?isNumber(eo)&&Number.isInteger(Number(eo)):!1,isList$1=eo=>{try{const to=JSON.parse(eo);return Array.isArray(to)}catch{return!1}},isObject$f=eo=>{try{const to=JSON.parse(eo);return Object.prototype.toString.call(to)==="[object Object]"}catch{return!1}},isTypeValid=(eo,to)=>{const ro=typeof eo,no=ro==="string";switch(to){case ValueType.int:return no?isInt(eo):Number.isInteger(eo);case ValueType.double:return no?isNumber(eo):ro==="number";case ValueType.list:return no?isList$1(eo):Array.isArray(eo);case ValueType.object:return no?isObject$f(eo):ro==="object";case ValueType.bool:return no?isBool(eo):ro==="boolean";case ValueType.function_str:return!0;default:return!0}},getCycle=(eo,to,ro,no)=>{var so,ao;const oo=[],io=new Set(eo.keys());for(eo.forEach((lo,co)=>{lo===0&&oo.push(co)});oo.length>0;){const lo=oo.shift();lo&&(io.delete(lo),(so=to.get(lo))==null||so.forEach(co=>{const uo=(eo.get(co)??0)-1;eo.set(co,uo),uo===0&&oo.push(co)}))}for(ro.forEach((lo,co)=>{lo===0&&oo.push(co)});oo.length>0;){const lo=oo.shift();lo&&(io.delete(lo),(ao=no.get(lo))==null||ao.forEach(co=>{const uo=(ro.get(co)??0)-1;ro.set(co,uo),uo===0&&oo.push(co)}))}return io};function commonjsRequire$1(eo){throw new Error('Could not dynamically require "'+eo+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$4(eo,to){return eo===to||eo!==eo&&to!==to}var eq_1=eq$4,eq$3=eq_1;function assocIndexOf$4(eo,to){for(var ro=eo.length;ro--;)if(eq$3(eo[ro][0],to))return ro;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(eo){var to=this.__data__,ro=assocIndexOf$3(to,eo);if(ro<0)return!1;var no=to.length-1;return ro==no?to.pop():splice.call(to,ro,1),--this.size,!0}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(eo){var to=this.__data__,ro=assocIndexOf$2(to,eo);return ro<0?void 0:to[ro][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(eo){return assocIndexOf$1(this.__data__,eo)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(eo,to){var ro=this.__data__,no=assocIndexOf(ro,eo);return no<0?(++this.size,ro.push([eo,to])):ro[no][1]=to,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(eo){var to=-1,ro=eo==null?0:eo.length;for(this.clear();++to-1&&eo%1==0&&eo-1&&eo%1==0&&eo<=MAX_SAFE_INTEGER}var isLength_1=isLength$3,baseGetTag$4=_baseGetTag,isLength$2=isLength_1,isObjectLike$6=isObjectLike_1,argsTag$2="[object Arguments]",arrayTag$2="[object Array]",boolTag$3="[object Boolean]",dateTag$3="[object Date]",errorTag$2="[object Error]",funcTag$1="[object Function]",mapTag$5="[object Map]",numberTag$3="[object Number]",objectTag$4="[object Object]",regexpTag$3="[object RegExp]",setTag$5="[object Set]",stringTag$4="[object String]",weakMapTag$2="[object WeakMap]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=!0;typedArrayTags[argsTag$2]=typedArrayTags[arrayTag$2]=typedArrayTags[arrayBufferTag$3]=typedArrayTags[boolTag$3]=typedArrayTags[dataViewTag$4]=typedArrayTags[dateTag$3]=typedArrayTags[errorTag$2]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$5]=typedArrayTags[numberTag$3]=typedArrayTags[objectTag$4]=typedArrayTags[regexpTag$3]=typedArrayTags[setTag$5]=typedArrayTags[stringTag$4]=typedArrayTags[weakMapTag$2]=!1;function baseIsTypedArray$1(eo){return isObjectLike$6(eo)&&isLength$2(eo.length)&&!!typedArrayTags[baseGetTag$4(eo)]}var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$4(eo){return function(to){return eo(to)}}var _baseUnary=baseUnary$4,_nodeUtil={exports:{}};_nodeUtil.exports;(function(eo,to){var ro=_freeGlobal,no=to&&!to.nodeType&&to,oo=no&&!0&&eo&&!eo.nodeType&&eo,io=oo&&oo.exports===no,so=io&&ro.process,ao=function(){try{var lo=oo&&oo.require&&oo.require("util").types;return lo||so&&so.binding&&so.binding("util")}catch{}}();eo.exports=ao})(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray=_baseIsTypedArray,baseUnary$3=_baseUnary,nodeUtil$2=_nodeUtilExports,nodeIsTypedArray=nodeUtil$2&&nodeUtil$2.isTypedArray,isTypedArray$2=nodeIsTypedArray?baseUnary$3(nodeIsTypedArray):baseIsTypedArray,isTypedArray_1=isTypedArray$2,baseTimes=_baseTimes,isArguments$2=isArguments_1,isArray$d=isArray_1,isBuffer$2=isBufferExports,isIndex$2=_isIndex,isTypedArray$1=isTypedArray_1,objectProto$8=Object.prototype,hasOwnProperty$8=objectProto$8.hasOwnProperty;function arrayLikeKeys$2(eo,to){var ro=isArray$d(eo),no=!ro&&isArguments$2(eo),oo=!ro&&!no&&isBuffer$2(eo),io=!ro&&!no&&!oo&&isTypedArray$1(eo),so=ro||no||oo||io,ao=so?baseTimes(eo.length,String):[],lo=ao.length;for(var co in eo)(to||hasOwnProperty$8.call(eo,co))&&!(so&&(co=="length"||oo&&(co=="offset"||co=="parent")||io&&(co=="buffer"||co=="byteLength"||co=="byteOffset")||isIndex$2(co,lo)))&&ao.push(co);return ao}var _arrayLikeKeys=arrayLikeKeys$2,objectProto$7=Object.prototype;function isPrototype$3(eo){var to=eo&&eo.constructor,ro=typeof to=="function"&&to.prototype||objectProto$7;return eo===ro}var _isPrototype=isPrototype$3;function overArg$2(eo,to){return function(ro){return eo(to(ro))}}var _overArg=overArg$2,overArg$1=_overArg,nativeKeys$1=overArg$1(Object.keys,Object),_nativeKeys=nativeKeys$1,isPrototype$2=_isPrototype,nativeKeys=_nativeKeys,objectProto$6=Object.prototype,hasOwnProperty$7=objectProto$6.hasOwnProperty;function baseKeys$1(eo){if(!isPrototype$2(eo))return nativeKeys(eo);var to=[];for(var ro in Object(eo))hasOwnProperty$7.call(eo,ro)&&ro!="constructor"&&to.push(ro);return to}var _baseKeys=baseKeys$1,isFunction$3=isFunction_1,isLength$1=isLength_1;function isArrayLike$8(eo){return eo!=null&&isLength$1(eo.length)&&!isFunction$3(eo)}var isArrayLike_1=isArrayLike$8,arrayLikeKeys$1=_arrayLikeKeys,baseKeys=_baseKeys,isArrayLike$7=isArrayLike_1;function keys$7(eo){return isArrayLike$7(eo)?arrayLikeKeys$1(eo):baseKeys(eo)}var keys_1=keys$7,copyObject$3=_copyObject,keys$6=keys_1;function baseAssign$1(eo,to){return eo&©Object$3(to,keys$6(to),eo)}var _baseAssign=baseAssign$1;function nativeKeysIn$1(eo){var to=[];if(eo!=null)for(var ro in Object(eo))to.push(ro);return to}var _nativeKeysIn=nativeKeysIn$1,isObject$b=isObject_1,isPrototype$1=_isPrototype,nativeKeysIn=_nativeKeysIn,objectProto$5=Object.prototype,hasOwnProperty$6=objectProto$5.hasOwnProperty;function baseKeysIn$1(eo){if(!isObject$b(eo))return nativeKeysIn(eo);var to=isPrototype$1(eo),ro=[];for(var no in eo)no=="constructor"&&(to||!hasOwnProperty$6.call(eo,no))||ro.push(no);return ro}var _baseKeysIn=baseKeysIn$1,arrayLikeKeys=_arrayLikeKeys,baseKeysIn=_baseKeysIn,isArrayLike$6=isArrayLike_1;function keysIn$3(eo){return isArrayLike$6(eo)?arrayLikeKeys(eo,!0):baseKeysIn(eo)}var keysIn_1=keysIn$3,copyObject$2=_copyObject,keysIn$2=keysIn_1;function baseAssignIn$1(eo,to){return eo&©Object$2(to,keysIn$2(to),eo)}var _baseAssignIn=baseAssignIn$1,_cloneBuffer={exports:{}};_cloneBuffer.exports;(function(eo,to){var ro=_root$1,no=to&&!to.nodeType&&to,oo=no&&!0&&eo&&!eo.nodeType&&eo,io=oo&&oo.exports===no,so=io?ro.Buffer:void 0,ao=so?so.allocUnsafe:void 0;function lo(co,uo){if(uo)return co.slice();var fo=co.length,ho=ao?ao(fo):new co.constructor(fo);return co.copy(ho),ho}eo.exports=lo})(_cloneBuffer,_cloneBuffer.exports);var _cloneBufferExports=_cloneBuffer.exports;function copyArray$1(eo,to){var ro=-1,no=eo.length;for(to||(to=Array(no));++roao))return!1;var co=io.get(eo),uo=io.get(to);if(co&&uo)return co==to&&uo==eo;var fo=-1,ho=!0,po=ro&COMPARE_UNORDERED_FLAG$3?new SetCache$1:void 0;for(io.set(eo,to),io.set(to,eo);++fo0&&ro(ao)?to>1?baseFlatten$2(ao,to-1,ro,no,oo):arrayPush$1(oo,ao):no||(oo[oo.length]=ao)}return oo}var _baseFlatten=baseFlatten$2;function apply$2(eo,to,ro){switch(ro.length){case 0:return eo.call(to);case 1:return eo.call(to,ro[0]);case 2:return eo.call(to,ro[0],ro[1]);case 3:return eo.call(to,ro[0],ro[1],ro[2])}return eo.apply(to,ro)}var _apply=apply$2,apply$1=_apply,nativeMax$2=Math.max;function overRest$2(eo,to,ro){return to=nativeMax$2(to===void 0?eo.length-1:to,0),function(){for(var no=arguments,oo=-1,io=nativeMax$2(no.length-to,0),so=Array(io);++oo0){if(++to>=HOT_COUNT)return arguments[0]}else to=0;return eo.apply(void 0,arguments)}}var _shortOut=shortOut$1,baseSetToString=_baseSetToString,shortOut=_shortOut,setToString$2=shortOut(baseSetToString),_setToString=setToString$2,identity$5=identity_1,overRest$1=_overRest,setToString$1=_setToString;function baseRest$1(eo,to){return setToString$1(overRest$1(eo,to,identity$5),eo+"")}var _baseRest=baseRest$1;function baseFindIndex$2(eo,to,ro,no){for(var oo=eo.length,io=ro+(no?1:-1);no?io--:++io-1}var _arrayIncludes=arrayIncludes$1;function arrayIncludesWith$1(eo,to,ro){for(var no=-1,oo=eo==null?0:eo.length;++no=LARGE_ARRAY_SIZE){var co=to?null:createSet(eo);if(co)return setToArray(co);so=!1,oo=cacheHas,lo=new SetCache}else lo=to?[]:ao;e:for(;++no1?po.setNode(go,fo):po.setNode(go)}),this},oo.prototype.setNode=function(uo,fo){return eo.has(this._nodes,uo)?(arguments.length>1&&(this._nodes[uo]=fo),this):(this._nodes[uo]=arguments.length>1?fo:this._defaultNodeLabelFn(uo),this._isCompound&&(this._parent[uo]=ro,this._children[uo]={},this._children[ro][uo]=!0),this._in[uo]={},this._preds[uo]={},this._out[uo]={},this._sucs[uo]={},++this._nodeCount,this)},oo.prototype.node=function(uo){return this._nodes[uo]},oo.prototype.hasNode=function(uo){return eo.has(this._nodes,uo)},oo.prototype.removeNode=function(uo){var fo=this;if(eo.has(this._nodes,uo)){var ho=function(po){fo.removeEdge(fo._edgeObjs[po])};delete this._nodes[uo],this._isCompound&&(this._removeFromParentsChildList(uo),delete this._parent[uo],eo.each(this.children(uo),function(po){fo.setParent(po)}),delete this._children[uo]),eo.each(eo.keys(this._in[uo]),ho),delete this._in[uo],delete this._preds[uo],eo.each(eo.keys(this._out[uo]),ho),delete this._out[uo],delete this._sucs[uo],--this._nodeCount}return this},oo.prototype.setParent=function(uo,fo){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(eo.isUndefined(fo))fo=ro;else{fo+="";for(var ho=fo;!eo.isUndefined(ho);ho=this.parent(ho))if(ho===uo)throw new Error("Setting "+fo+" as parent of "+uo+" would create a cycle");this.setNode(fo)}return this.setNode(uo),this._removeFromParentsChildList(uo),this._parent[uo]=fo,this._children[fo][uo]=!0,this},oo.prototype._removeFromParentsChildList=function(uo){delete this._children[this._parent[uo]][uo]},oo.prototype.parent=function(uo){if(this._isCompound){var fo=this._parent[uo];if(fo!==ro)return fo}},oo.prototype.children=function(uo){if(eo.isUndefined(uo)&&(uo=ro),this._isCompound){var fo=this._children[uo];if(fo)return eo.keys(fo)}else{if(uo===ro)return this.nodes();if(this.hasNode(uo))return[]}},oo.prototype.predecessors=function(uo){var fo=this._preds[uo];if(fo)return eo.keys(fo)},oo.prototype.successors=function(uo){var fo=this._sucs[uo];if(fo)return eo.keys(fo)},oo.prototype.neighbors=function(uo){var fo=this.predecessors(uo);if(fo)return eo.union(fo,this.successors(uo))},oo.prototype.isLeaf=function(uo){var fo;return this.isDirected()?fo=this.successors(uo):fo=this.neighbors(uo),fo.length===0},oo.prototype.filterNodes=function(uo){var fo=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});fo.setGraph(this.graph());var ho=this;eo.each(this._nodes,function(vo,yo){uo(yo)&&fo.setNode(yo,vo)}),eo.each(this._edgeObjs,function(vo){fo.hasNode(vo.v)&&fo.hasNode(vo.w)&&fo.setEdge(vo,ho.edge(vo))});var po={};function go(vo){var yo=ho.parent(vo);return yo===void 0||fo.hasNode(yo)?(po[vo]=yo,yo):yo in po?po[yo]:go(yo)}return this._isCompound&&eo.each(fo.nodes(),function(vo){fo.setParent(vo,go(vo))}),fo},oo.prototype.setDefaultEdgeLabel=function(uo){return eo.isFunction(uo)||(uo=eo.constant(uo)),this._defaultEdgeLabelFn=uo,this},oo.prototype.edgeCount=function(){return this._edgeCount},oo.prototype.edges=function(){return eo.values(this._edgeObjs)},oo.prototype.setPath=function(uo,fo){var ho=this,po=arguments;return eo.reduce(uo,function(go,vo){return po.length>1?ho.setEdge(go,vo,fo):ho.setEdge(go,vo),vo}),this},oo.prototype.setEdge=function(){var uo,fo,ho,po,go=!1,vo=arguments[0];typeof vo=="object"&&vo!==null&&"v"in vo?(uo=vo.v,fo=vo.w,ho=vo.name,arguments.length===2&&(po=arguments[1],go=!0)):(uo=vo,fo=arguments[1],ho=arguments[3],arguments.length>2&&(po=arguments[2],go=!0)),uo=""+uo,fo=""+fo,eo.isUndefined(ho)||(ho=""+ho);var yo=ao(this._isDirected,uo,fo,ho);if(eo.has(this._edgeLabels,yo))return go&&(this._edgeLabels[yo]=po),this;if(!eo.isUndefined(ho)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(uo),this.setNode(fo),this._edgeLabels[yo]=go?po:this._defaultEdgeLabelFn(uo,fo,ho);var xo=lo(this._isDirected,uo,fo,ho);return uo=xo.v,fo=xo.w,Object.freeze(xo),this._edgeObjs[yo]=xo,io(this._preds[fo],uo),io(this._sucs[uo],fo),this._in[fo][yo]=xo,this._out[uo][yo]=xo,this._edgeCount++,this},oo.prototype.edge=function(uo,fo,ho){var po=arguments.length===1?co(this._isDirected,arguments[0]):ao(this._isDirected,uo,fo,ho);return this._edgeLabels[po]},oo.prototype.hasEdge=function(uo,fo,ho){var po=arguments.length===1?co(this._isDirected,arguments[0]):ao(this._isDirected,uo,fo,ho);return eo.has(this._edgeLabels,po)},oo.prototype.removeEdge=function(uo,fo,ho){var po=arguments.length===1?co(this._isDirected,arguments[0]):ao(this._isDirected,uo,fo,ho),go=this._edgeObjs[po];return go&&(uo=go.v,fo=go.w,delete this._edgeLabels[po],delete this._edgeObjs[po],so(this._preds[fo],uo),so(this._sucs[uo],fo),delete this._in[fo][po],delete this._out[uo][po],this._edgeCount--),this},oo.prototype.inEdges=function(uo,fo){var ho=this._in[uo];if(ho){var po=eo.values(ho);return fo?eo.filter(po,function(go){return go.v===fo}):po}},oo.prototype.outEdges=function(uo,fo){var ho=this._out[uo];if(ho){var po=eo.values(ho);return fo?eo.filter(po,function(go){return go.w===fo}):po}},oo.prototype.nodeEdges=function(uo,fo){var ho=this.inEdges(uo,fo);if(ho)return ho.concat(this.outEdges(uo,fo))};function io(uo,fo){uo[fo]?uo[fo]++:uo[fo]=1}function so(uo,fo){--uo[fo]||delete uo[fo]}function ao(uo,fo,ho,po){var go=""+fo,vo=""+ho;if(!uo&&go>vo){var yo=go;go=vo,vo=yo}return go+no+vo+no+(eo.isUndefined(po)?to:po)}function lo(uo,fo,ho,po){var go=""+fo,vo=""+ho;if(!uo&&go>vo){var yo=go;go=vo,vo=yo}var xo={v:go,w:vo};return po&&(xo.name=po),xo}function co(uo,fo){return ao(uo,fo.v,fo.w,fo.name)}return graph}var version$1,hasRequiredVersion;function requireVersion(){return hasRequiredVersion||(hasRequiredVersion=1,version$1="2.1.8"),version$1}var lib,hasRequiredLib;function requireLib(){return hasRequiredLib||(hasRequiredLib=1,lib={Graph:requireGraph(),version:requireVersion()}),lib}var json,hasRequiredJson;function requireJson(){if(hasRequiredJson)return json;hasRequiredJson=1;var eo=requireLodash(),to=requireGraph();json={write:ro,read:io};function ro(so){var ao={options:{directed:so.isDirected(),multigraph:so.isMultigraph(),compound:so.isCompound()},nodes:no(so),edges:oo(so)};return eo.isUndefined(so.graph())||(ao.value=eo.clone(so.graph())),ao}function no(so){return eo.map(so.nodes(),function(ao){var lo=so.node(ao),co=so.parent(ao),uo={v:ao};return eo.isUndefined(lo)||(uo.value=lo),eo.isUndefined(co)||(uo.parent=co),uo})}function oo(so){return eo.map(so.edges(),function(ao){var lo=so.edge(ao),co={v:ao.v,w:ao.w};return eo.isUndefined(ao.name)||(co.name=ao.name),eo.isUndefined(lo)||(co.value=lo),co})}function io(so){var ao=new to(so.options).setGraph(so.value);return eo.each(so.nodes,function(lo){ao.setNode(lo.v,lo.value),lo.parent&&ao.setParent(lo.v,lo.parent)}),eo.each(so.edges,function(lo){ao.setEdge({v:lo.v,w:lo.w,name:lo.name},lo.value)}),ao}return json}var components_1,hasRequiredComponents;function requireComponents(){if(hasRequiredComponents)return components_1;hasRequiredComponents=1;var eo=requireLodash();components_1=to;function to(ro){var no={},oo=[],io;function so(ao){eo.has(no,ao)||(no[ao]=!0,io.push(ao),eo.each(ro.successors(ao),so),eo.each(ro.predecessors(ao),so))}return eo.each(ro.nodes(),function(ao){io=[],so(ao),io.length&&oo.push(io)}),oo}return components_1}var priorityQueue,hasRequiredPriorityQueue;function requirePriorityQueue(){if(hasRequiredPriorityQueue)return priorityQueue;hasRequiredPriorityQueue=1;var eo=requireLodash();priorityQueue=to;function to(){this._arr=[],this._keyIndices={}}return to.prototype.size=function(){return this._arr.length},to.prototype.keys=function(){return this._arr.map(function(ro){return ro.key})},to.prototype.has=function(ro){return eo.has(this._keyIndices,ro)},to.prototype.priority=function(ro){var no=this._keyIndices[ro];if(no!==void 0)return this._arr[no].priority},to.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},to.prototype.add=function(ro,no){var oo=this._keyIndices;if(ro=String(ro),!eo.has(oo,ro)){var io=this._arr,so=io.length;return oo[ro]=so,io.push({key:ro,priority:no}),this._decrease(so),!0}return!1},to.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var ro=this._arr.pop();return delete this._keyIndices[ro.key],this._heapify(0),ro.key},to.prototype.decrease=function(ro,no){var oo=this._keyIndices[ro];if(no>this._arr[oo].priority)throw new Error("New priority is greater than current priority. Key: "+ro+" Old: "+this._arr[oo].priority+" New: "+no);this._arr[oo].priority=no,this._decrease(oo)},to.prototype._heapify=function(ro){var no=this._arr,oo=2*ro,io=oo+1,so=ro;oo>1,!(no[io].priority0&&(fo=uo.removeMin(),ho=co[fo],ho.distance!==Number.POSITIVE_INFINITY);)lo(fo).forEach(po);return co}return dijkstra_1}var dijkstraAll_1,hasRequiredDijkstraAll;function requireDijkstraAll(){if(hasRequiredDijkstraAll)return dijkstraAll_1;hasRequiredDijkstraAll=1;var eo=requireDijkstra(),to=requireLodash();dijkstraAll_1=ro;function ro(no,oo,io){return to.transform(no.nodes(),function(so,ao){so[ao]=eo(no,ao,oo,io)},{})}return dijkstraAll_1}var tarjan_1,hasRequiredTarjan;function requireTarjan(){if(hasRequiredTarjan)return tarjan_1;hasRequiredTarjan=1;var eo=requireLodash();tarjan_1=to;function to(ro){var no=0,oo=[],io={},so=[];function ao(lo){var co=io[lo]={onStack:!0,lowlink:no,index:no++};if(oo.push(lo),ro.successors(lo).forEach(function(ho){eo.has(io,ho)?io[ho].onStack&&(co.lowlink=Math.min(co.lowlink,io[ho].index)):(ao(ho),co.lowlink=Math.min(co.lowlink,io[ho].lowlink))}),co.lowlink===co.index){var uo=[],fo;do fo=oo.pop(),io[fo].onStack=!1,uo.push(fo);while(lo!==fo);so.push(uo)}}return ro.nodes().forEach(function(lo){eo.has(io,lo)||ao(lo)}),so}return tarjan_1}var findCycles_1,hasRequiredFindCycles;function requireFindCycles(){if(hasRequiredFindCycles)return findCycles_1;hasRequiredFindCycles=1;var eo=requireLodash(),to=requireTarjan();findCycles_1=ro;function ro(no){return eo.filter(to(no),function(oo){return oo.length>1||oo.length===1&&no.hasEdge(oo[0],oo[0])})}return findCycles_1}var floydWarshall_1,hasRequiredFloydWarshall;function requireFloydWarshall(){if(hasRequiredFloydWarshall)return floydWarshall_1;hasRequiredFloydWarshall=1;var eo=requireLodash();floydWarshall_1=ro;var to=eo.constant(1);function ro(oo,io,so){return no(oo,io||to,so||function(ao){return oo.outEdges(ao)})}function no(oo,io,so){var ao={},lo=oo.nodes();return lo.forEach(function(co){ao[co]={},ao[co][co]={distance:0},lo.forEach(function(uo){co!==uo&&(ao[co][uo]={distance:Number.POSITIVE_INFINITY})}),so(co).forEach(function(uo){var fo=uo.v===co?uo.w:uo.v,ho=io(uo);ao[co][fo]={distance:ho,predecessor:co}})}),lo.forEach(function(co){var uo=ao[co];lo.forEach(function(fo){var ho=ao[fo];lo.forEach(function(po){var go=ho[co],vo=uo[po],yo=ho[po],xo=go.distance+vo.distance;xo0;){if(co=lo.removeMin(),eo.has(ao,co))so.setEdge(co,ao[co]);else{if(fo)throw new Error("Input graph is not connected: "+oo);fo=!0}oo.nodeEdges(co).forEach(uo)}return so}return prim_1}var alg,hasRequiredAlg;function requireAlg(){return hasRequiredAlg||(hasRequiredAlg=1,alg={components:requireComponents(),dijkstra:requireDijkstra(),dijkstraAll:requireDijkstraAll(),findCycles:requireFindCycles(),floydWarshall:requireFloydWarshall(),isAcyclic:requireIsAcyclic(),postorder:requirePostorder(),preorder:requirePreorder(),prim:requirePrim(),tarjan:requireTarjan(),topsort:requireTopsort()}),alg}var graphlib$1,hasRequiredGraphlib;function requireGraphlib(){if(hasRequiredGraphlib)return graphlib$1;hasRequiredGraphlib=1;var eo=requireLib();return graphlib$1={Graph:eo.Graph,json:requireJson(),alg:requireAlg(),version:eo.version},graphlib$1}var graphlib;if(typeof commonjsRequire$1=="function")try{graphlib=requireGraphlib()}catch{}graphlib||(graphlib=window.graphlib);var graphlib_1=graphlib,cloneDeep_1,hasRequiredCloneDeep;function requireCloneDeep(){if(hasRequiredCloneDeep)return cloneDeep_1;hasRequiredCloneDeep=1;var eo=_baseClone,to=1,ro=4;function no(oo){return eo(oo,to|ro)}return cloneDeep_1=no,cloneDeep_1}var eq=eq_1,isArrayLike$3=isArrayLike_1,isIndex=_isIndex,isObject$7=isObject_1;function isIterateeCall$2(eo,to,ro){if(!isObject$7(ro))return!1;var no=typeof to;return(no=="number"?isArrayLike$3(ro)&&isIndex(to,ro.length):no=="string"&&to in ro)?eq(ro[to],eo):!1}var _isIterateeCall=isIterateeCall$2,defaults_1,hasRequiredDefaults;function requireDefaults(){if(hasRequiredDefaults)return defaults_1;hasRequiredDefaults=1;var eo=_baseRest,to=eq_1,ro=_isIterateeCall,no=keysIn_1,oo=Object.prototype,io=oo.hasOwnProperty,so=eo(function(ao,lo){ao=Object(ao);var co=-1,uo=lo.length,fo=uo>2?lo[2]:void 0;for(fo&&ro(lo[0],lo[1],fo)&&(uo=1);++co-1?oo[io?to[so]:so]:void 0}}var _createFind=createFind$1,reWhitespace=/\s/;function trimmedEndIndex$1(eo){for(var to=eo.length;to--&&reWhitespace.test(eo.charAt(to)););return to}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(eo){return eo&&eo.slice(0,trimmedEndIndex(eo)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1,baseTrim=_baseTrim,isObject$6=isObject_1,isSymbol$2=isSymbol_1,NAN=NaN,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber$1(eo){if(typeof eo=="number")return eo;if(isSymbol$2(eo))return NAN;if(isObject$6(eo)){var to=typeof eo.valueOf=="function"?eo.valueOf():eo;eo=isObject$6(to)?to+"":to}if(typeof eo!="string")return eo===0?eo:+eo;eo=baseTrim(eo);var ro=reIsBinary.test(eo);return ro||reIsOctal.test(eo)?freeParseInt(eo.slice(2),ro?2:8):reIsBadHex.test(eo)?NAN:+eo}var toNumber_1=toNumber$1,toNumber=toNumber_1,INFINITY=1/0,MAX_INTEGER=17976931348623157e292;function toFinite$2(eo){if(!eo)return eo===0?eo:0;if(eo=toNumber(eo),eo===INFINITY||eo===-INFINITY){var to=eo<0?-1:1;return to*MAX_INTEGER}return eo===eo?eo:0}var toFinite_1=toFinite$2,toFinite$1=toFinite_1;function toInteger$1(eo){var to=toFinite$1(eo),ro=to%1;return to===to?ro?to-ro:to:0}var toInteger_1=toInteger$1,baseFindIndex=_baseFindIndex,baseIteratee$3=_baseIteratee,toInteger=toInteger_1,nativeMax$1=Math.max;function findIndex$1(eo,to,ro){var no=eo==null?0:eo.length;if(!no)return-1;var oo=ro==null?0:toInteger(ro);return oo<0&&(oo=nativeMax$1(no+oo,0)),baseFindIndex(eo,baseIteratee$3(to),oo)}var findIndex_1=findIndex$1,createFind=_createFind,findIndex=findIndex_1,find$1=createFind(findIndex),find_1=find$1,baseFlatten$1=_baseFlatten;function flatten$2(eo){var to=eo==null?0:eo.length;return to?baseFlatten$1(eo,1):[]}var flatten_1=flatten$2,forIn_1,hasRequiredForIn;function requireForIn(){if(hasRequiredForIn)return forIn_1;hasRequiredForIn=1;var eo=_baseFor,to=require_castFunction(),ro=keysIn_1;function no(oo,io){return oo==null?oo:eo(oo,to(io),ro)}return forIn_1=no,forIn_1}function last(eo){var to=eo==null?0:eo.length;return to?eo[to-1]:void 0}var last_1=last,baseAssignValue=_baseAssignValue,baseForOwn=_baseForOwn,baseIteratee$2=_baseIteratee;function mapValues(eo,to){var ro={};return to=baseIteratee$2(to),baseForOwn(eo,function(no,oo,io){baseAssignValue(ro,oo,to(no,oo,io))}),ro}var mapValues_1=mapValues,isSymbol$1=isSymbol_1;function baseExtremum$3(eo,to,ro){for(var no=-1,oo=eo.length;++noto}var _baseGt=baseGt$1,baseExtremum$2=_baseExtremum,baseGt=_baseGt,identity$4=identity_1;function max$1(eo){return eo&&eo.length?baseExtremum$2(eo,identity$4,baseGt):void 0}var max_1=max$1,_assignMergeValue,hasRequired_assignMergeValue;function require_assignMergeValue(){if(hasRequired_assignMergeValue)return _assignMergeValue;hasRequired_assignMergeValue=1;var eo=_baseAssignValue,to=eq_1;function ro(no,oo,io){(io!==void 0&&!to(no[oo],io)||io===void 0&&!(oo in no))&&eo(no,oo,io)}return _assignMergeValue=ro,_assignMergeValue}var baseGetTag=_baseGetTag,getPrototype=_getPrototype,isObjectLike=isObjectLike_1,objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$2=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject$1(eo){if(!isObjectLike(eo)||baseGetTag(eo)!=objectTag)return!1;var to=getPrototype(eo);if(to===null)return!0;var ro=hasOwnProperty$2.call(to,"constructor")&&to.constructor;return typeof ro=="function"&&ro instanceof ro&&funcToString.call(ro)==objectCtorString}var isPlainObject_1=isPlainObject$1,_safeGet,hasRequired_safeGet;function require_safeGet(){if(hasRequired_safeGet)return _safeGet;hasRequired_safeGet=1;function eo(to,ro){if(!(ro==="constructor"&&typeof to[ro]=="function")&&ro!="__proto__")return to[ro]}return _safeGet=eo,_safeGet}var toPlainObject_1,hasRequiredToPlainObject;function requireToPlainObject(){if(hasRequiredToPlainObject)return toPlainObject_1;hasRequiredToPlainObject=1;var eo=_copyObject,to=keysIn_1;function ro(no){return eo(no,to(no))}return toPlainObject_1=ro,toPlainObject_1}var _baseMergeDeep,hasRequired_baseMergeDeep;function require_baseMergeDeep(){if(hasRequired_baseMergeDeep)return _baseMergeDeep;hasRequired_baseMergeDeep=1;var eo=require_assignMergeValue(),to=_cloneBufferExports,ro=_cloneTypedArray,no=_copyArray,oo=_initCloneObject,io=isArguments_1,so=isArray_1,ao=requireIsArrayLikeObject(),lo=isBufferExports,co=isFunction_1,uo=isObject_1,fo=isPlainObject_1,ho=isTypedArray_1,po=require_safeGet(),go=requireToPlainObject();function vo(yo,xo,_o,Eo,So,ko,Ao){var Co=po(yo,_o),Oo=po(xo,_o),wo=Ao.get(Oo);if(wo){eo(yo,_o,wo);return}var Ro=ko?ko(Co,Oo,_o+"",yo,xo,Ao):void 0,Do=Ro===void 0;if(Do){var $o=so(Oo),Mo=!$o&&lo(Oo),Po=!$o&&!Mo&&ho(Oo);Ro=Oo,$o||Mo||Po?so(Co)?Ro=Co:ao(Co)?Ro=no(Co):Mo?(Do=!1,Ro=to(Oo,!0)):Po?(Do=!1,Ro=ro(Oo,!0)):Ro=[]:fo(Oo)||io(Oo)?(Ro=Co,io(Co)?Ro=go(Co):(!uo(Co)||co(Co))&&(Ro=oo(Oo))):Do=!1}Do&&(Ao.set(Oo,Ro),So(Ro,Oo,Eo,ko,Ao),Ao.delete(Oo)),eo(yo,_o,Ro)}return _baseMergeDeep=vo,_baseMergeDeep}var _baseMerge,hasRequired_baseMerge;function require_baseMerge(){if(hasRequired_baseMerge)return _baseMerge;hasRequired_baseMerge=1;var eo=_Stack,to=require_assignMergeValue(),ro=_baseFor,no=require_baseMergeDeep(),oo=isObject_1,io=keysIn_1,so=require_safeGet();function ao(lo,co,uo,fo,ho){lo!==co&&ro(co,function(po,go){if(ho||(ho=new eo),oo(po))no(lo,co,go,uo,ao,fo,ho);else{var vo=fo?fo(so(lo,go),po,go+"",lo,co,ho):void 0;vo===void 0&&(vo=po),to(lo,go,vo)}},io)}return _baseMerge=ao,_baseMerge}var _createAssigner,hasRequired_createAssigner;function require_createAssigner(){if(hasRequired_createAssigner)return _createAssigner;hasRequired_createAssigner=1;var eo=_baseRest,to=_isIterateeCall;function ro(no){return eo(function(oo,io){var so=-1,ao=io.length,lo=ao>1?io[ao-1]:void 0,co=ao>2?io[2]:void 0;for(lo=no.length>3&&typeof lo=="function"?(ao--,lo):void 0,co&&to(io[0],io[1],co)&&(lo=ao<3?void 0:lo,ao=1),oo=Object(oo);++soto||io&&so&&lo&&!ao&&!co||no&&so&&lo||!ro&&lo||!oo)return 1;if(!no&&!io&&!co&&eo=ao)return lo;var co=ro[no];return lo*(co=="desc"?-1:1)}}return eo.index-to.index}var _compareMultiple=compareMultiple$1,arrayMap=_arrayMap,baseGet=_baseGet,baseIteratee=_baseIteratee,baseMap=_baseMap,baseSortBy=_baseSortBy,baseUnary=_baseUnary,compareMultiple=_compareMultiple,identity$2=identity_1,isArray$1=isArray_1;function baseOrderBy$1(eo,to,ro){to.length?to=arrayMap(to,function(io){return isArray$1(io)?function(so){return baseGet(so,io.length===1?io[0]:io)}:io}):to=[identity$2];var no=-1;to=arrayMap(to,baseUnary(baseIteratee));var oo=baseMap(eo,function(io,so,ao){var lo=arrayMap(to,function(co){return co(io)});return{criteria:lo,index:++no,value:io}});return baseSortBy(oo,function(io,so){return compareMultiple(io,so,ro)})}var _baseOrderBy=baseOrderBy$1,baseFlatten=_baseFlatten,baseOrderBy=_baseOrderBy,baseRest=_baseRest,isIterateeCall=_isIterateeCall,sortBy=baseRest(function(eo,to){if(eo==null)return[];var ro=to.length;return ro>1&&isIterateeCall(eo,to[0],to[1])?to=[]:ro>2&&isIterateeCall(to[0],to[1],to[2])&&(to=[to[0]]),baseOrderBy(eo,baseFlatten(to,1),[])}),sortBy_1=sortBy,uniqueId_1,hasRequiredUniqueId;function requireUniqueId(){if(hasRequiredUniqueId)return uniqueId_1;hasRequiredUniqueId=1;var eo=toString_1,to=0;function ro(no){var oo=++to;return eo(no)+oo}return uniqueId_1=ro,uniqueId_1}var _baseZipObject,hasRequired_baseZipObject;function require_baseZipObject(){if(hasRequired_baseZipObject)return _baseZipObject;hasRequired_baseZipObject=1;function eo(to,ro,no){for(var oo=-1,io=to.length,so=ro.length,ao={};++oo0;--ao)if(so=to[ao].dequeue(),so){no=no.concat(removeNode(eo,to,ro,so,!0));break}}}return no}function removeNode(eo,to,ro,no,oo){var io=oo?[]:void 0;return _$u.forEach(eo.inEdges(no.v),function(so){var ao=eo.edge(so),lo=eo.node(so.v);oo&&io.push({v:so.v,w:so.w}),lo.out-=ao,assignBucket(to,ro,lo)}),_$u.forEach(eo.outEdges(no.v),function(so){var ao=eo.edge(so),lo=so.w,co=eo.node(lo);co.in-=ao,assignBucket(to,ro,co)}),eo.removeNode(no.v),io}function buildState(eo,to){var ro=new Graph$7,no=0,oo=0;_$u.forEach(eo.nodes(),function(ao){ro.setNode(ao,{v:ao,in:0,out:0})}),_$u.forEach(eo.edges(),function(ao){var lo=ro.edge(ao.v,ao.w)||0,co=to(ao),uo=lo+co;ro.setEdge(ao.v,ao.w,uo),oo=Math.max(oo,ro.node(ao.v).out+=co),no=Math.max(no,ro.node(ao.w).in+=co)});var io=_$u.range(oo+no+3).map(function(){return new List$2}),so=no+1;return _$u.forEach(ro.nodes(),function(ao){assignBucket(io,so,ro.node(ao))}),{graph:ro,buckets:io,zeroIdx:so}}function assignBucket(eo,to,ro){ro.out?ro.in?eo[ro.out-ro.in+to].enqueue(ro):eo[eo.length-1].enqueue(ro):eo[0].enqueue(ro)}var _$t=lodash_1,greedyFAS=greedyFas,acyclic$1={run:run$2,undo:undo$4};function run$2(eo){var to=eo.graph().acyclicer==="greedy"?greedyFAS(eo,ro(eo)):dfsFAS(eo);_$t.forEach(to,function(no){var oo=eo.edge(no);eo.removeEdge(no),oo.forwardName=no.name,oo.reversed=!0,eo.setEdge(no.w,no.v,oo,_$t.uniqueId("rev"))});function ro(no){return function(oo){return no.edge(oo).weight}}}function dfsFAS(eo){var to=[],ro={},no={};function oo(io){_$t.has(no,io)||(no[io]=!0,ro[io]=!0,_$t.forEach(eo.outEdges(io),function(so){_$t.has(ro,so.w)?to.push(so):oo(so.w)}),delete ro[io])}return _$t.forEach(eo.nodes(),oo),to}function undo$4(eo){_$t.forEach(eo.edges(),function(to){var ro=eo.edge(to);if(ro.reversed){eo.removeEdge(to);var no=ro.forwardName;delete ro.reversed,delete ro.forwardName,eo.setEdge(to.w,to.v,ro,no)}})}var _$s=lodash_1,Graph$6=graphlib_1.Graph,util$a={addDummyNode,simplify:simplify$1,asNonCompoundGraph,successorWeights,predecessorWeights,intersectRect,buildLayerMatrix,normalizeRanks:normalizeRanks$1,removeEmptyRanks:removeEmptyRanks$1,addBorderNode:addBorderNode$1,maxRank,partition,time,notime};function addDummyNode(eo,to,ro,no){var oo;do oo=_$s.uniqueId(no);while(eo.hasNode(oo));return ro.dummy=to,eo.setNode(oo,ro),oo}function simplify$1(eo){var to=new Graph$6().setGraph(eo.graph());return _$s.forEach(eo.nodes(),function(ro){to.setNode(ro,eo.node(ro))}),_$s.forEach(eo.edges(),function(ro){var no=to.edge(ro.v,ro.w)||{weight:0,minlen:1},oo=eo.edge(ro);to.setEdge(ro.v,ro.w,{weight:no.weight+oo.weight,minlen:Math.max(no.minlen,oo.minlen)})}),to}function asNonCompoundGraph(eo){var to=new Graph$6({multigraph:eo.isMultigraph()}).setGraph(eo.graph());return _$s.forEach(eo.nodes(),function(ro){eo.children(ro).length||to.setNode(ro,eo.node(ro))}),_$s.forEach(eo.edges(),function(ro){to.setEdge(ro,eo.edge(ro))}),to}function successorWeights(eo){var to=_$s.map(eo.nodes(),function(ro){var no={};return _$s.forEach(eo.outEdges(ro),function(oo){no[oo.w]=(no[oo.w]||0)+eo.edge(oo).weight}),no});return _$s.zipObject(eo.nodes(),to)}function predecessorWeights(eo){var to=_$s.map(eo.nodes(),function(ro){var no={};return _$s.forEach(eo.inEdges(ro),function(oo){no[oo.v]=(no[oo.v]||0)+eo.edge(oo).weight}),no});return _$s.zipObject(eo.nodes(),to)}function intersectRect(eo,to){var ro=eo.x,no=eo.y,oo=to.x-ro,io=to.y-no,so=eo.width/2,ao=eo.height/2;if(!oo&&!io)throw new Error("Not possible to find intersection inside of the rectangle");var lo,co;return Math.abs(io)*so>Math.abs(oo)*ao?(io<0&&(ao=-ao),lo=ao*oo/io,co=ao):(oo<0&&(so=-so),lo=so,co=so*io/oo),{x:ro+lo,y:no+co}}function buildLayerMatrix(eo){var to=_$s.map(_$s.range(maxRank(eo)+1),function(){return[]});return _$s.forEach(eo.nodes(),function(ro){var no=eo.node(ro),oo=no.rank;_$s.isUndefined(oo)||(to[oo][no.order]=ro)}),to}function normalizeRanks$1(eo){var to=_$s.min(_$s.map(eo.nodes(),function(ro){return eo.node(ro).rank}));_$s.forEach(eo.nodes(),function(ro){var no=eo.node(ro);_$s.has(no,"rank")&&(no.rank-=to)})}function removeEmptyRanks$1(eo){var to=_$s.min(_$s.map(eo.nodes(),function(io){return eo.node(io).rank})),ro=[];_$s.forEach(eo.nodes(),function(io){var so=eo.node(io).rank-to;ro[so]||(ro[so]=[]),ro[so].push(io)});var no=0,oo=eo.graph().nodeRankFactor;_$s.forEach(ro,function(io,so){_$s.isUndefined(io)&&so%oo!==0?--no:no&&_$s.forEach(io,function(ao){eo.node(ao).rank+=no})})}function addBorderNode$1(eo,to,ro,no){var oo={width:0,height:0};return arguments.length>=4&&(oo.rank=ro,oo.order=no),addDummyNode(eo,"border",oo,to)}function maxRank(eo){return _$s.max(_$s.map(eo.nodes(),function(to){var ro=eo.node(to).rank;if(!_$s.isUndefined(ro))return ro}))}function partition(eo,to){var ro={lhs:[],rhs:[]};return _$s.forEach(eo,function(no){to(no)?ro.lhs.push(no):ro.rhs.push(no)}),ro}function time(eo,to){var ro=_$s.now();try{return to()}finally{console.log(eo+" time: "+(_$s.now()-ro)+"ms")}}function notime(eo,to){return to()}var _$r=lodash_1,util$9=util$a,normalize$1={run:run$1,undo:undo$3};function run$1(eo){eo.graph().dummyChains=[],_$r.forEach(eo.edges(),function(to){normalizeEdge(eo,to)})}function normalizeEdge(eo,to){var ro=to.v,no=eo.node(ro).rank,oo=to.w,io=eo.node(oo).rank,so=to.name,ao=eo.edge(to),lo=ao.labelRank;if(io!==no+1){eo.removeEdge(to);var co,uo,fo;for(fo=0,++no;noso.lim&&(ao=so,lo=!0);var co=_$o.filter(to.edges(),function(uo){return lo===isDescendant(eo,eo.node(uo.v),ao)&&lo!==isDescendant(eo,eo.node(uo.w),ao)});return _$o.minBy(co,function(uo){return slack(to,uo)})}function exchangeEdges(eo,to,ro,no){var oo=ro.v,io=ro.w;eo.removeEdge(oo,io),eo.setEdge(no.v,no.w,{}),initLowLimValues(eo),initCutValues(eo,to),updateRanks(eo,to)}function updateRanks(eo,to){var ro=_$o.find(eo.nodes(),function(oo){return!to.node(oo).parent}),no=preorder(eo,ro);no=no.slice(1),_$o.forEach(no,function(oo){var io=eo.node(oo).parent,so=to.edge(oo,io),ao=!1;so||(so=to.edge(io,oo),ao=!0),to.node(oo).rank=to.node(io).rank+(ao?so.minlen:-so.minlen)})}function isTreeEdge(eo,to,ro){return eo.hasEdge(to,ro)}function isDescendant(eo,to,ro){return ro.low<=to.lim&&to.lim<=ro.lim}var rankUtil=util$8,longestPath=rankUtil.longestPath,feasibleTree=feasibleTree_1,networkSimplex=networkSimplex_1,rank_1=rank$1;function rank$1(eo){switch(eo.graph().ranker){case"network-simplex":networkSimplexRanker(eo);break;case"tight-tree":tightTreeRanker(eo);break;case"longest-path":longestPathRanker(eo);break;default:networkSimplexRanker(eo)}}var longestPathRanker=longestPath;function tightTreeRanker(eo){longestPath(eo),feasibleTree(eo)}function networkSimplexRanker(eo){networkSimplex(eo)}var _$n=lodash_1,parentDummyChains_1=parentDummyChains$1;function parentDummyChains$1(eo){var to=postorder(eo);_$n.forEach(eo.graph().dummyChains,function(ro){for(var no=eo.node(ro),oo=no.edgeObj,io=findPath(eo,to,oo.v,oo.w),so=io.path,ao=io.lca,lo=0,co=so[lo],uo=!0;ro!==oo.w;){if(no=eo.node(ro),uo){for(;(co=so[lo])!==ao&&eo.node(co).maxRankso||ao>to[lo].lim));for(co=lo,lo=no;(lo=eo.parent(lo))!==co;)io.push(lo);return{path:oo.concat(io.reverse()),lca:co}}function postorder(eo){var to={},ro=0;function no(oo){var io=ro;_$n.forEach(eo.children(oo),no),to[oo]={low:io,lim:ro++}}return _$n.forEach(eo.children(),no),to}var _$m=lodash_1,util$7=util$a,nestingGraph$1={run,cleanup:cleanup$1};function run(eo){var to=util$7.addDummyNode(eo,"root",{},"_root"),ro=treeDepths(eo),no=_$m.max(_$m.values(ro))-1,oo=2*no+1;eo.graph().nestingRoot=to,_$m.forEach(eo.edges(),function(so){eo.edge(so).minlen*=oo});var io=sumWeights(eo)+1;_$m.forEach(eo.children(),function(so){dfs(eo,to,oo,io,no,ro,so)}),eo.graph().nodeRankFactor=oo}function dfs(eo,to,ro,no,oo,io,so){var ao=eo.children(so);if(!ao.length){so!==to&&eo.setEdge(to,so,{weight:0,minlen:ro});return}var lo=util$7.addBorderNode(eo,"_bt"),co=util$7.addBorderNode(eo,"_bb"),uo=eo.node(so);eo.setParent(lo,so),uo.borderTop=lo,eo.setParent(co,so),uo.borderBottom=co,_$m.forEach(ao,function(fo){dfs(eo,to,ro,no,oo,io,fo);var ho=eo.node(fo),po=ho.borderTop?ho.borderTop:fo,go=ho.borderBottom?ho.borderBottom:fo,vo=ho.borderTop?no:2*no,yo=po!==go?1:oo-io[so]+1;eo.setEdge(lo,po,{weight:vo,minlen:yo,nestingEdge:!0}),eo.setEdge(go,co,{weight:vo,minlen:yo,nestingEdge:!0})}),eo.parent(so)||eo.setEdge(to,lo,{weight:0,minlen:oo+io[so]})}function treeDepths(eo){var to={};function ro(no,oo){var io=eo.children(no);io&&io.length&&_$m.forEach(io,function(so){ro(so,oo+1)}),to[no]=oo}return _$m.forEach(eo.children(),function(no){ro(no,1)}),to}function sumWeights(eo){return _$m.reduce(eo.edges(),function(to,ro){return to+eo.edge(ro).weight},0)}function cleanup$1(eo){var to=eo.graph();eo.removeNode(to.nestingRoot),delete to.nestingRoot,_$m.forEach(eo.edges(),function(ro){var no=eo.edge(ro);no.nestingEdge&&eo.removeEdge(ro)})}var _$l=lodash_1,util$6=util$a,addBorderSegments_1=addBorderSegments$1;function addBorderSegments$1(eo){function to(ro){var no=eo.children(ro),oo=eo.node(ro);if(no.length&&_$l.forEach(no,to),_$l.has(oo,"minRank")){oo.borderLeft=[],oo.borderRight=[];for(var io=oo.minRank,so=oo.maxRank+1;io0;)uo%2&&(fo+=ao[uo+1]),uo=uo-1>>1,ao[uo]+=co.weight;lo+=co.weight*fo})),lo}var _$h=lodash_1,barycenter_1=barycenter$1;function barycenter$1(eo,to){return _$h.map(to,function(ro){var no=eo.inEdges(ro);if(no.length){var oo=_$h.reduce(no,function(io,so){var ao=eo.edge(so),lo=eo.node(so.v);return{sum:io.sum+ao.weight*lo.order,weight:io.weight+ao.weight}},{sum:0,weight:0});return{v:ro,barycenter:oo.sum/oo.weight,weight:oo.weight}}else return{v:ro}})}var _$g=lodash_1,resolveConflicts_1=resolveConflicts$1;function resolveConflicts$1(eo,to){var ro={};_$g.forEach(eo,function(oo,io){var so=ro[oo.v]={indegree:0,in:[],out:[],vs:[oo.v],i:io};_$g.isUndefined(oo.barycenter)||(so.barycenter=oo.barycenter,so.weight=oo.weight)}),_$g.forEach(to.edges(),function(oo){var io=ro[oo.v],so=ro[oo.w];!_$g.isUndefined(io)&&!_$g.isUndefined(so)&&(so.indegree++,io.out.push(ro[oo.w]))});var no=_$g.filter(ro,function(oo){return!oo.indegree});return doResolveConflicts(no)}function doResolveConflicts(eo){var to=[];function ro(io){return function(so){so.merged||(_$g.isUndefined(so.barycenter)||_$g.isUndefined(io.barycenter)||so.barycenter>=io.barycenter)&&mergeEntries(io,so)}}function no(io){return function(so){so.in.push(io),--so.indegree===0&&eo.push(so)}}for(;eo.length;){var oo=eo.pop();to.push(oo),_$g.forEach(oo.in.reverse(),ro(oo)),_$g.forEach(oo.out,no(oo))}return _$g.map(_$g.filter(to,function(io){return!io.merged}),function(io){return _$g.pick(io,["vs","i","barycenter","weight"])})}function mergeEntries(eo,to){var ro=0,no=0;eo.weight&&(ro+=eo.barycenter*eo.weight,no+=eo.weight),to.weight&&(ro+=to.barycenter*to.weight,no+=to.weight),eo.vs=to.vs.concat(eo.vs),eo.barycenter=ro/no,eo.weight=no,eo.i=Math.min(to.i,eo.i),to.merged=!0}var _$f=lodash_1,util$5=util$a,sort_1=sort$1;function sort$1(eo,to){var ro=util$5.partition(eo,function(uo){return _$f.has(uo,"barycenter")}),no=ro.lhs,oo=_$f.sortBy(ro.rhs,function(uo){return-uo.i}),io=[],so=0,ao=0,lo=0;no.sort(compareWithBias(!!to)),lo=consumeUnsortable(io,oo,lo),_$f.forEach(no,function(uo){lo+=uo.vs.length,io.push(uo.vs),so+=uo.barycenter*uo.weight,ao+=uo.weight,lo=consumeUnsortable(io,oo,lo)});var co={vs:_$f.flatten(io,!0)};return ao&&(co.barycenter=so/ao,co.weight=ao),co}function consumeUnsortable(eo,to,ro){for(var no;to.length&&(no=_$f.last(to)).i<=ro;)to.pop(),eo.push(no.vs),ro++;return ro}function compareWithBias(eo){return function(to,ro){return to.barycenterro.barycenter?1:eo?ro.i-to.i:to.i-ro.i}}var _$e=lodash_1,barycenter=barycenter_1,resolveConflicts=resolveConflicts_1,sort=sort_1,sortSubgraph_1=sortSubgraph$1;function sortSubgraph$1(eo,to,ro,no){var oo=eo.children(to),io=eo.node(to),so=io?io.borderLeft:void 0,ao=io?io.borderRight:void 0,lo={};so&&(oo=_$e.filter(oo,function(go){return go!==so&&go!==ao}));var co=barycenter(eo,oo);_$e.forEach(co,function(go){if(eo.children(go.v).length){var vo=sortSubgraph$1(eo,go.v,ro,no);lo[go.v]=vo,_$e.has(vo,"barycenter")&&mergeBarycenters(go,vo)}});var uo=resolveConflicts(co,ro);expandSubgraphs(uo,lo);var fo=sort(uo,no);if(so&&(fo.vs=_$e.flatten([so,fo.vs,ao],!0),eo.predecessors(so).length)){var ho=eo.node(eo.predecessors(so)[0]),po=eo.node(eo.predecessors(ao)[0]);_$e.has(fo,"barycenter")||(fo.barycenter=0,fo.weight=0),fo.barycenter=(fo.barycenter*fo.weight+ho.order+po.order)/(fo.weight+2),fo.weight+=2}return fo}function expandSubgraphs(eo,to){_$e.forEach(eo,function(ro){ro.vs=_$e.flatten(ro.vs.map(function(no){return to[no]?to[no].vs:no}),!0)})}function mergeBarycenters(eo,to){_$e.isUndefined(eo.barycenter)?(eo.barycenter=to.barycenter,eo.weight=to.weight):(eo.barycenter=(eo.barycenter*eo.weight+to.barycenter*to.weight)/(eo.weight+to.weight),eo.weight+=to.weight)}var _$d=lodash_1,Graph$4=graphlib_1.Graph,buildLayerGraph_1=buildLayerGraph$1;function buildLayerGraph$1(eo,to,ro){var no=createRootNode(eo),oo=new Graph$4({compound:!0}).setGraph({root:no}).setDefaultNodeLabel(function(io){return eo.node(io)});return _$d.forEach(eo.nodes(),function(io){var so=eo.node(io),ao=eo.parent(io);(so.rank===to||so.minRank<=to&&to<=so.maxRank)&&(oo.setNode(io),oo.setParent(io,ao||no),_$d.forEach(eo[ro](io),function(lo){var co=lo.v===io?lo.w:lo.v,uo=oo.edge(co,io),fo=_$d.isUndefined(uo)?0:uo.weight;oo.setEdge(co,io,{weight:eo.edge(lo).weight+fo})}),_$d.has(so,"minRank")&&oo.setNode(io,{borderLeft:so.borderLeft[to],borderRight:so.borderRight[to]}))}),oo}function createRootNode(eo){for(var to;eo.hasNode(to=_$d.uniqueId("_root")););return to}var _$c=lodash_1,addSubgraphConstraints_1=addSubgraphConstraints$1;function addSubgraphConstraints$1(eo,to,ro){var no={},oo;_$c.forEach(ro,function(io){for(var so=eo.parent(io),ao,lo;so;){if(ao=eo.parent(so),ao?(lo=no[ao],no[ao]=so):(lo=oo,oo=so),lo&&lo!==so){to.setEdge(lo,so);return}so=ao}})}var _$b=lodash_1,initOrder=initOrder_1,crossCount=crossCount_1,sortSubgraph=sortSubgraph_1,buildLayerGraph=buildLayerGraph_1,addSubgraphConstraints=addSubgraphConstraints_1,Graph$3=graphlib_1.Graph,util$4=util$a,order_1=order$1;function order$1(eo){var to=util$4.maxRank(eo),ro=buildLayerGraphs(eo,_$b.range(1,to+1),"inEdges"),no=buildLayerGraphs(eo,_$b.range(to-1,-1,-1),"outEdges"),oo=initOrder(eo);assignOrder(eo,oo);for(var io=Number.POSITIVE_INFINITY,so,ao=0,lo=0;lo<4;++ao,++lo){sweepLayerGraphs(ao%2?ro:no,ao%4>=2),oo=util$4.buildLayerMatrix(eo);var co=crossCount(eo,oo);coco)&&addConflict(ro,ho,uo)})})}function oo(io,so){var ao=-1,lo,co=0;return _$a.forEach(so,function(uo,fo){if(eo.node(uo).dummy==="border"){var ho=eo.predecessors(uo);ho.length&&(lo=eo.node(ho[0]).order,no(so,co,fo,ao,lo),co=fo,ao=lo)}no(so,co,so.length,lo,io.length)}),so}return _$a.reduce(to,oo),ro}function findOtherInnerSegmentNode(eo,to){if(eo.node(to).dummy)return _$a.find(eo.predecessors(to),function(ro){return eo.node(ro).dummy})}function addConflict(eo,to,ro){if(to>ro){var no=to;to=ro,ro=no}var oo=eo[to];oo||(eo[to]=oo={}),oo[ro]=!0}function hasConflict(eo,to,ro){if(to>ro){var no=to;to=ro,ro=no}return _$a.has(eo[to],ro)}function verticalAlignment(eo,to,ro,no){var oo={},io={},so={};return _$a.forEach(to,function(ao){_$a.forEach(ao,function(lo,co){oo[lo]=lo,io[lo]=lo,so[lo]=co})}),_$a.forEach(to,function(ao){var lo=-1;_$a.forEach(ao,function(co){var uo=no(co);if(uo.length){uo=_$a.sortBy(uo,function(vo){return so[vo]});for(var fo=(uo.length-1)/2,ho=Math.floor(fo),po=Math.ceil(fo);ho<=po;++ho){var go=uo[ho];io[co]===co&&lo=0;ao--)(so=eo[ao])&&(io=(oo<3?so(io):oo>3?so(to,ro,io):so(to,ro))||io);return oo>3&&io&&Object.defineProperty(to,ro,io),io}function __spreadArray$1(eo,to,ro){if(ro||arguments.length===2)for(var no=0,oo=to.length,io;no"u"?InjectionMode$1.none:InjectionMode$1.insertNode,defaultPrefix:"css",namespace:void 0,cspSettings:void 0},to),this._classNameToArgs=(no=ro==null?void 0:ro.classNameToArgs)!==null&&no!==void 0?no:this._classNameToArgs,this._counter=(oo=ro==null?void 0:ro.counter)!==null&&oo!==void 0?oo:this._counter,this._keyToClassName=(so=(io=this._config.classNameCache)!==null&&io!==void 0?io:ro==null?void 0:ro.keyToClassName)!==null&&so!==void 0?so:this._keyToClassName,this._preservedRules=(ao=ro==null?void 0:ro.preservedRules)!==null&&ao!==void 0?ao:this._preservedRules,this._rules=(lo=ro==null?void 0:ro.rules)!==null&&lo!==void 0?lo:this._rules}return eo.getInstance=function(){if(_stylesheet$1=_global$2[STYLESHEET_SETTING$1],!_stylesheet$1||_stylesheet$1._lastStyleElement&&_stylesheet$1._lastStyleElement.ownerDocument!==document){var to=(_global$2==null?void 0:_global$2.FabricConfig)||{},ro=new eo(to.mergeStyles,to.serializedStylesheet);_stylesheet$1=ro,_global$2[STYLESHEET_SETTING$1]=ro}return _stylesheet$1},eo.prototype.serialize=function(){return JSON.stringify({classNameToArgs:this._classNameToArgs,counter:this._counter,keyToClassName:this._keyToClassName,preservedRules:this._preservedRules,rules:this._rules})},eo.prototype.setConfig=function(to){this._config=__assign$4(__assign$4({},this._config),to)},eo.prototype.onReset=function(to){var ro=this;return this._onResetCallbacks.push(to),function(){ro._onResetCallbacks=ro._onResetCallbacks.filter(function(no){return no!==to})}},eo.prototype.onInsertRule=function(to){var ro=this;return this._onInsertRuleCallbacks.push(to),function(){ro._onInsertRuleCallbacks=ro._onInsertRuleCallbacks.filter(function(no){return no!==to})}},eo.prototype.getClassName=function(to){var ro=this._config.namespace,no=to||this._config.defaultPrefix;return"".concat(ro?ro+"-":"").concat(no,"-").concat(this._counter++)},eo.prototype.cacheClassName=function(to,ro,no,oo){this._keyToClassName[ro]=to,this._classNameToArgs[to]={args:no,rules:oo}},eo.prototype.classNameFromKey=function(to){return this._keyToClassName[to]},eo.prototype.getClassNameCache=function(){return this._keyToClassName},eo.prototype.argsFromClassName=function(to){var ro=this._classNameToArgs[to];return ro&&ro.args},eo.prototype.insertedRulesFromClassName=function(to){var ro=this._classNameToArgs[to];return ro&&ro.rules},eo.prototype.insertRule=function(to,ro){var no=this._config.injectionMode,oo=no!==InjectionMode$1.none?this._getStyleElement():void 0;if(ro&&this._preservedRules.push(to),oo)switch(no){case InjectionMode$1.insertNode:var io=oo.sheet;try{io.insertRule(to,io.cssRules.length)}catch{}break;case InjectionMode$1.appendChild:oo.appendChild(document.createTextNode(to));break}else this._rules.push(to);this._config.onInsertRule&&this._config.onInsertRule(to),this._onInsertRuleCallbacks.forEach(function(so){return so()})},eo.prototype.getRules=function(to){return(to?this._preservedRules.join(""):"")+this._rules.join("")},eo.prototype.reset=function(){this._rules=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._onResetCallbacks.forEach(function(to){return to()})},eo.prototype.resetKeys=function(){this._keyToClassName={}},eo.prototype._getStyleElement=function(){var to=this;return!this._styleElement&&typeof document<"u"&&(this._styleElement=this._createStyleElement(),REUSE_STYLE_NODE$1||window.requestAnimationFrame(function(){to._styleElement=void 0})),this._styleElement},eo.prototype._createStyleElement=function(){var to=document.head,ro=document.createElement("style"),no=null;ro.setAttribute("data-merge-styles","true");var oo=this._config.cspSettings;if(oo&&oo.nonce&&ro.setAttribute("nonce",oo.nonce),this._lastStyleElement)no=this._lastStyleElement.nextElementSibling;else{var io=this._findPlaceholderStyleTag();io?no=io.nextElementSibling:no=to.childNodes[0]}return to.insertBefore(ro,to.contains(no)?no:null),this._lastStyleElement=ro,ro},eo.prototype._findPlaceholderStyleTag=function(){var to=document.head;return to?to.querySelector("style[data-merge-styles]"):null},eo}();function extractStyleParts$1(){for(var eo=[],to=0;to=0)io(co.split(" "));else{var uo=oo.argsFromClassName(co);uo?io(uo):ro.indexOf(co)===-1&&ro.push(co)}else Array.isArray(co)?io(co):typeof co=="object"&&no.push(co)}}return io(eo),{classes:ro,objects:no}}function setRTL$1(eo){_rtl$1!==eo&&(_rtl$1=eo)}function getRTL$2(){return _rtl$1===void 0&&(_rtl$1=typeof document<"u"&&!!document.documentElement&&document.documentElement.getAttribute("dir")==="rtl"),_rtl$1}var _rtl$1;_rtl$1=getRTL$2();function getStyleOptions$1(){return{rtl:getRTL$2()}}var rules$1={};function kebabRules$1(eo,to){var ro=eo[to];ro.charAt(0)!=="-"&&(eo[to]=rules$1[ro]=rules$1[ro]||ro.replace(/([A-Z])/g,"-$1").toLowerCase())}var _vendorSettings$1;function getVendorSettings$1(){var eo;if(!_vendorSettings$1){var to=typeof document<"u"?document:void 0,ro=typeof navigator<"u"?navigator:void 0,no=(eo=ro==null?void 0:ro.userAgent)===null||eo===void 0?void 0:eo.toLowerCase();to?_vendorSettings$1={isWebkit:!!(to&&"WebkitAppearance"in to.documentElement.style),isMoz:!!(no&&no.indexOf("firefox")>-1),isOpera:!!(no&&no.indexOf("opera")>-1),isMs:!!(ro&&(/rv:11.0/i.test(ro.userAgent)||/Edge\/\d./i.test(navigator.userAgent)))}:_vendorSettings$1={isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return _vendorSettings$1}var autoPrefixNames$1={"user-select":1};function prefixRules$1(eo,to){var ro=getVendorSettings$1(),no=eo[to];if(autoPrefixNames$1[no]){var oo=eo[to+1];autoPrefixNames$1[no]&&(ro.isWebkit&&eo.push("-webkit-"+no,oo),ro.isMoz&&eo.push("-moz-"+no,oo),ro.isMs&&eo.push("-ms-"+no,oo),ro.isOpera&&eo.push("-o-"+no,oo))}}var NON_PIXEL_NUMBER_PROPS$1=["column-count","font-weight","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];function provideUnits$1(eo,to){var ro=eo[to],no=eo[to+1];if(typeof no=="number"){var oo=NON_PIXEL_NUMBER_PROPS$1.indexOf(ro)>-1,io=ro.indexOf("--")>-1,so=oo||io?"":"px";eo[to+1]="".concat(no).concat(so)}}var _a$a,LEFT$1="left",RIGHT$1="right",NO_FLIP$1="@noflip",NAME_REPLACEMENTS$1=(_a$a={},_a$a[LEFT$1]=RIGHT$1,_a$a[RIGHT$1]=LEFT$1,_a$a),VALUE_REPLACEMENTS$1={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"};function rtlifyRules$1(eo,to,ro){if(eo.rtl){var no=to[ro];if(!no)return;var oo=to[ro+1];if(typeof oo=="string"&&oo.indexOf(NO_FLIP$1)>=0)to[ro+1]=oo.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(no.indexOf(LEFT$1)>=0)to[ro]=no.replace(LEFT$1,RIGHT$1);else if(no.indexOf(RIGHT$1)>=0)to[ro]=no.replace(RIGHT$1,LEFT$1);else if(String(oo).indexOf(LEFT$1)>=0)to[ro+1]=oo.replace(LEFT$1,RIGHT$1);else if(String(oo).indexOf(RIGHT$1)>=0)to[ro+1]=oo.replace(RIGHT$1,LEFT$1);else if(NAME_REPLACEMENTS$1[no])to[ro]=NAME_REPLACEMENTS$1[no];else if(VALUE_REPLACEMENTS$1[oo])to[ro+1]=VALUE_REPLACEMENTS$1[oo];else switch(no){case"margin":case"padding":to[ro+1]=flipQuad$1(oo);break;case"box-shadow":to[ro+1]=negateNum$1(oo,0);break}}}function negateNum$1(eo,to){var ro=eo.split(" "),no=parseInt(ro[to],10);return ro[0]=ro[0].replace(String(no),String(no*-1)),ro.join(" ")}function flipQuad$1(eo){if(typeof eo=="string"){var to=eo.split(" ");if(to.length===4)return"".concat(to[0]," ").concat(to[3]," ").concat(to[2]," ").concat(to[1])}return eo}function tokenizeWithParentheses$1(eo){for(var to=[],ro=0,no=0,oo=0;ooro&&to.push(eo.substring(ro,oo)),ro=oo+1);break}return ro-1&&to.push([no.index,no.index+no[0].length,no[1].split(",").map(function(oo){return":global(".concat(oo.trim(),")")}).join(", ")]);return to.reverse().reduce(function(oo,io){var so=io[0],ao=io[1],lo=io[2],co=oo.slice(0,so),uo=oo.slice(ao);return co+lo+uo},eo)}function expandSelector$1(eo,to){return eo.indexOf(":global(")>=0?eo.replace(globalSelectorRegExp$1,"$1"):eo.indexOf(":")===0?to+eo:eo.indexOf("&")<0?to+" "+eo:eo}function extractSelector$1(eo,to,ro,no){to===void 0&&(to={__order:[]}),ro.indexOf("@")===0?(ro=ro+"{"+eo,extractRules$1([no],to,ro)):ro.indexOf(",")>-1?expandCommaSeparatedGlobals$1(ro).split(",").map(function(oo){return oo.trim()}).forEach(function(oo){return extractRules$1([no],to,expandSelector$1(oo,eo))}):extractRules$1([no],to,expandSelector$1(ro,eo))}function extractRules$1(eo,to,ro){to===void 0&&(to={__order:[]}),ro===void 0&&(ro="&");var no=Stylesheet$1.getInstance(),oo=to[ro];oo||(oo={},to[ro]=oo,to.__order.push(ro));for(var io=0,so=eo;io0){ro.subComponentStyles={};var ho=ro.subComponentStyles,po=function(go){if(no.hasOwnProperty(go)){var vo=no[go];ho[go]=function(yo){return concatStyleSets.apply(void 0,vo.map(function(xo){return typeof xo=="function"?xo(yo):xo}))}}};for(var co in no)po(co)}return ro}function mergeStyleSets(){for(var eo=[],to=0;to"u")){var to=eo;return to&&to.ownerDocument&&to.ownerDocument.defaultView?to.ownerDocument.defaultView:_window}}var Async=function(){function eo(to,ro){this._timeoutIds=null,this._immediateIds=null,this._intervalIds=null,this._animationFrameIds=null,this._isDisposed=!1,this._parent=to||null,this._onErrorHandler=ro,this._noop=function(){}}return eo.prototype.dispose=function(){var to;if(this._isDisposed=!0,this._parent=null,this._timeoutIds){for(to in this._timeoutIds)this._timeoutIds.hasOwnProperty(to)&&this.clearTimeout(parseInt(to,10));this._timeoutIds=null}if(this._immediateIds){for(to in this._immediateIds)this._immediateIds.hasOwnProperty(to)&&this.clearImmediate(parseInt(to,10));this._immediateIds=null}if(this._intervalIds){for(to in this._intervalIds)this._intervalIds.hasOwnProperty(to)&&this.clearInterval(parseInt(to,10));this._intervalIds=null}if(this._animationFrameIds){for(to in this._animationFrameIds)this._animationFrameIds.hasOwnProperty(to)&&this.cancelAnimationFrame(parseInt(to,10));this._animationFrameIds=null}},eo.prototype.setTimeout=function(to,ro){var no=this,oo=0;return this._isDisposed||(this._timeoutIds||(this._timeoutIds={}),oo=setTimeout(function(){try{no._timeoutIds&&delete no._timeoutIds[oo],to.apply(no._parent)}catch(io){no._logError(io)}},ro),this._timeoutIds[oo]=!0),oo},eo.prototype.clearTimeout=function(to){this._timeoutIds&&this._timeoutIds[to]&&(clearTimeout(to),delete this._timeoutIds[to])},eo.prototype.setImmediate=function(to,ro){var no=this,oo=0,io=getWindow(ro);if(!this._isDisposed){this._immediateIds||(this._immediateIds={});var so=function(){try{no._immediateIds&&delete no._immediateIds[oo],to.apply(no._parent)}catch(ao){no._logError(ao)}};oo=io.setTimeout(so,0),this._immediateIds[oo]=!0}return oo},eo.prototype.clearImmediate=function(to,ro){var no=getWindow(ro);this._immediateIds&&this._immediateIds[to]&&(no.clearTimeout(to),delete this._immediateIds[to])},eo.prototype.setInterval=function(to,ro){var no=this,oo=0;return this._isDisposed||(this._intervalIds||(this._intervalIds={}),oo=setInterval(function(){try{to.apply(no._parent)}catch(io){no._logError(io)}},ro),this._intervalIds[oo]=!0),oo},eo.prototype.clearInterval=function(to){this._intervalIds&&this._intervalIds[to]&&(clearInterval(to),delete this._intervalIds[to])},eo.prototype.throttle=function(to,ro,no){var oo=this;if(this._isDisposed)return this._noop;var io=ro||0,so=!0,ao=!0,lo=0,co,uo,fo=null;no&&typeof no.leading=="boolean"&&(so=no.leading),no&&typeof no.trailing=="boolean"&&(ao=no.trailing);var ho=function(go){var vo=Date.now(),yo=vo-lo,xo=so?io-yo:io;return yo>=io&&(!go||so)?(lo=vo,fo&&(oo.clearTimeout(fo),fo=null),co=to.apply(oo._parent,uo)):fo===null&&ao&&(fo=oo.setTimeout(ho,xo)),co},po=function(){for(var go=[],vo=0;vo=so&&(Oo=!0),uo=Co);var wo=Co-uo,Ro=so-wo,Do=Co-fo,$o=!1;return co!==null&&(Do>=co&&go?$o=!0:Ro=Math.min(Ro,co-Do)),wo>=so||$o||Oo?yo(Co):(go===null||!Ao)&&lo&&(go=oo.setTimeout(xo,Ro)),ho},_o=function(){return!!go},Eo=function(){_o()&&vo(Date.now())},So=function(){return _o()&&yo(Date.now()),ho},ko=function(){for(var Ao=[],Co=0;Co-1)for(var so=ro.split(/[ ,]+/),ao=0;ao"u")){var to=eo;return to&&to.ownerDocument?to.ownerDocument:document}}var _scrollbarWidth,_bodyScrollDisabledCount=0,DisabledScrollClassName=mergeStyles$1({overflow:"hidden !important"}),DATA_IS_SCROLLABLE_ATTRIBUTE="data-is-scrollable",allowScrollOnElement=function(eo,to){if(eo){var ro=0,no=null,oo=function(so){so.targetTouches.length===1&&(ro=so.targetTouches[0].clientY)},io=function(so){if(so.targetTouches.length===1&&(so.stopPropagation(),!!no)){var ao=so.targetTouches[0].clientY-ro,lo=findScrollableParent(so.target);lo&&(no=lo),no.scrollTop===0&&ao>0&&so.preventDefault(),no.scrollHeight-Math.ceil(no.scrollTop)<=no.clientHeight&&ao<0&&so.preventDefault()}};to.on(eo,"touchstart",oo,{passive:!1}),to.on(eo,"touchmove",io,{passive:!1}),no=eo}},allowOverscrollOnElement=function(eo,to){if(eo){var ro=function(no){no.stopPropagation()};to.on(eo,"touchmove",ro,{passive:!1})}},_disableIosBodyScroll=function(eo){eo.preventDefault()};function disableBodyScroll(){var eo=getDocument();eo&&eo.body&&!_bodyScrollDisabledCount&&(eo.body.classList.add(DisabledScrollClassName),eo.body.addEventListener("touchmove",_disableIosBodyScroll,{passive:!1,capture:!1})),_bodyScrollDisabledCount++}function enableBodyScroll(){if(_bodyScrollDisabledCount>0){var eo=getDocument();eo&&eo.body&&_bodyScrollDisabledCount===1&&(eo.body.classList.remove(DisabledScrollClassName),eo.body.removeEventListener("touchmove",_disableIosBodyScroll)),_bodyScrollDisabledCount--}}function getScrollbarWidth(){if(_scrollbarWidth===void 0){var eo=document.createElement("div");eo.style.setProperty("width","100px"),eo.style.setProperty("height","100px"),eo.style.setProperty("overflow","scroll"),eo.style.setProperty("position","absolute"),eo.style.setProperty("top","-9999px"),document.body.appendChild(eo),_scrollbarWidth=eo.offsetWidth-eo.clientWidth,document.body.removeChild(eo)}return _scrollbarWidth}function findScrollableParent(eo){for(var to=eo,ro=getDocument(eo);to&&to!==ro.body;){if(to.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE)==="true")return to;to=to.parentElement}for(to=eo;to&&to!==ro.body;){if(to.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE)!=="false"){var no=getComputedStyle(to),oo=no?no.getPropertyValue("overflow-y"):"";if(oo&&(oo==="scroll"||oo==="auto"))return to}to=to.parentElement}return(!to||to===ro.body)&&(to=getWindow(eo)),to}var _warningCallback=void 0;function warn(eo){console&&console.warn&&console.warn(eo)}var GLOBAL_SETTINGS_PROP_NAME="__globalSettings__",CALLBACK_STATE_PROP_NAME="__callbacks__",_counter=0,GlobalSettings=function(){function eo(){}return eo.getValue=function(to,ro){var no=_getGlobalSettings();return no[to]===void 0&&(no[to]=typeof ro=="function"?ro():ro),no[to]},eo.setValue=function(to,ro){var no=_getGlobalSettings(),oo=no[CALLBACK_STATE_PROP_NAME],io=no[to];if(ro!==io){no[to]=ro;var so={oldValue:io,value:ro,key:to};for(var ao in oo)oo.hasOwnProperty(ao)&&oo[ao](so)}return ro},eo.addChangeListener=function(to){var ro=to.__id__,no=_getCallbacks();ro||(ro=to.__id__=String(_counter++)),no[ro]=to},eo.removeChangeListener=function(to){var ro=_getCallbacks();delete ro[to.__id__]},eo}();function _getGlobalSettings(){var eo,to=getWindow(),ro=to||{};return ro[GLOBAL_SETTINGS_PROP_NAME]||(ro[GLOBAL_SETTINGS_PROP_NAME]=(eo={},eo[CALLBACK_STATE_PROP_NAME]={},eo)),ro[GLOBAL_SETTINGS_PROP_NAME]}function _getCallbacks(){var eo=_getGlobalSettings();return eo[CALLBACK_STATE_PROP_NAME]}var KeyCodes$1={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pauseBreak:19,capslock:20,escape:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,del:46,zero:48,one:49,two:50,three:51,four:52,five:53,six:54,seven:55,eight:56,nine:57,colon:58,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftWindow:91,rightWindow:92,select:93,zero_numpad:96,one_numpad:97,two_numpad:98,three_numpad:99,four_numpad:100,five_numpad:101,six_numpad:102,seven_numpad:103,eight_numpad:104,nine_numpad:105,multiply:106,add:107,subtract:109,decimalPoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrollLock:145,semicolon:186,equalSign:187,comma:188,dash:189,period:190,forwardSlash:191,graveAccent:192,openBracket:219,backSlash:220,closeBracket:221,singleQuote:222},Rectangle=function(){function eo(to,ro,no,oo){to===void 0&&(to=0),ro===void 0&&(ro=0),no===void 0&&(no=0),oo===void 0&&(oo=0),this.top=no,this.bottom=oo,this.left=to,this.right=ro}return Object.defineProperty(eo.prototype,"width",{get:function(){return this.right-this.left},enumerable:!1,configurable:!0}),Object.defineProperty(eo.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!1,configurable:!0}),eo.prototype.equals=function(to){return parseFloat(this.top.toFixed(4))===parseFloat(to.top.toFixed(4))&&parseFloat(this.bottom.toFixed(4))===parseFloat(to.bottom.toFixed(4))&&parseFloat(this.left.toFixed(4))===parseFloat(to.left.toFixed(4))&&parseFloat(this.right.toFixed(4))===parseFloat(to.right.toFixed(4))},eo}();function appendFunction(eo){for(var to=[],ro=1;ro-1&&oo._virtual.children.splice(io,1)}ro._virtual.parent=no||void 0,no&&(no._virtual||(no._virtual={children:[]}),no._virtual.children.push(ro))}var IS_FOCUSABLE_ATTRIBUTE$1="data-is-focusable",IS_VISIBLE_ATTRIBUTE="data-is-visible",FOCUSZONE_ID_ATTRIBUTE$1="data-focuszone-id",FOCUSZONE_SUB_ATTRIBUTE="data-is-sub-focuszone";function getFirstFocusable(eo,to,ro){return getNextElement(eo,to,!0,!1,!1,ro)}function getLastFocusable(eo,to,ro){return getPreviousElement(eo,to,!0,!1,!0,ro)}function getFirstTabbable(eo,to,ro,no){return no===void 0&&(no=!0),getNextElement(eo,to,no,!1,!1,ro,!1,!0)}function getLastTabbable(eo,to,ro,no){return no===void 0&&(no=!0),getPreviousElement(eo,to,no,!1,!0,ro,!1,!0)}function focusFirstChild(eo,to){var ro=getNextElement(eo,eo,!0,!1,!1,!0,void 0,void 0,to);return ro?(focusAsync(ro),!0):!1}function getPreviousElement(eo,to,ro,no,oo,io,so,ao){if(!to||!so&&to===eo)return null;var lo=isElementVisible(to);if(oo&&lo&&(io||!(isElementFocusZone(to)||isElementFocusSubZone(to)))){var co=getPreviousElement(eo,to.lastElementChild,!0,!0,!0,io,so,ao);if(co){if(ao&&isElementTabbable(co,!0)||!ao)return co;var uo=getPreviousElement(eo,co.previousElementSibling,!0,!0,!0,io,so,ao);if(uo)return uo;for(var fo=co.parentElement;fo&&fo!==to;){var ho=getPreviousElement(eo,fo.previousElementSibling,!0,!0,!0,io,so,ao);if(ho)return ho;fo=fo.parentElement}}}if(ro&&lo&&isElementTabbable(to,ao))return to;var po=getPreviousElement(eo,to.previousElementSibling,!0,!0,!0,io,so,ao);return po||(no?null:getPreviousElement(eo,to.parentElement,!0,!1,!1,io,so,ao))}function getNextElement(eo,to,ro,no,oo,io,so,ao,lo){if(!to||to===eo&&oo&&!so)return null;var co=lo?isElementVisibleAndNotHidden:isElementVisible,uo=co(to);if(ro&&uo&&isElementTabbable(to,ao))return to;if(!oo&&uo&&(io||!(isElementFocusZone(to)||isElementFocusSubZone(to)))){var fo=getNextElement(eo,to.firstElementChild,!0,!0,!1,io,so,ao,lo);if(fo)return fo}if(to===eo)return null;var ho=getNextElement(eo,to.nextElementSibling,!0,!0,!1,io,so,ao,lo);return ho||(no?null:getNextElement(eo,to.parentElement,!1,!1,!0,io,so,ao,lo))}function isElementVisible(eo){if(!eo||!eo.getAttribute)return!1;var to=eo.getAttribute(IS_VISIBLE_ATTRIBUTE);return to!=null?to==="true":eo.offsetHeight!==0||eo.offsetParent!==null||eo.isVisible===!0}function isElementVisibleAndNotHidden(eo){return!!eo&&isElementVisible(eo)&&!eo.hidden&&window.getComputedStyle(eo).visibility!=="hidden"}function isElementTabbable(eo,to){if(!eo||eo.disabled)return!1;var ro=0,no=null;eo&&eo.getAttribute&&(no=eo.getAttribute("tabIndex"),no&&(ro=parseInt(no,10)));var oo=eo.getAttribute?eo.getAttribute(IS_FOCUSABLE_ATTRIBUTE$1):null,io=no!==null&&ro>=0,so=!!eo&&oo!=="false"&&(eo.tagName==="A"||eo.tagName==="BUTTON"||eo.tagName==="INPUT"||eo.tagName==="TEXTAREA"||eo.tagName==="SELECT"||oo==="true"||io);return to?ro!==-1&&so:so}function isElementFocusZone(eo){return!!(eo&&eo.getAttribute&&eo.getAttribute(FOCUSZONE_ID_ATTRIBUTE$1))}function isElementFocusSubZone(eo){return!!(eo&&eo.getAttribute&&eo.getAttribute(FOCUSZONE_SUB_ATTRIBUTE)==="true")}function doesElementContainFocus(eo){var to=getDocument(eo),ro=to&&to.activeElement;return!!(ro&&elementContains(eo,ro))}function shouldWrapFocus(eo,to){return elementContainsAttribute(eo,to)!=="true"}var animationId=void 0;function focusAsync(eo){if(eo){var to=getWindow(eo);to&&(animationId!==void 0&&to.cancelAnimationFrame(animationId),animationId=to.requestAnimationFrame(function(){eo&&eo.focus(),animationId=void 0}))}}function getFocusableByIndexPath(eo,to){for(var ro=eo,no=0,oo=to;no(eo.cacheSize||MAX_CACHE_COUNT)){var po=getWindow();!((lo=po==null?void 0:po.FabricConfig)===null||lo===void 0)&&lo.enableClassNameCacheFullWarning&&(console.warn("Styles are being recalculated too frequently. Cache miss rate is ".concat(ro,"/").concat(no,".")),console.trace()),to.clear(),ro=0,eo.disableCaching=!0}return co[retVal]};return io}function _traverseEdge(eo,to){return to=_normalizeValue(to),eo.has(to)||eo.set(to,new Map),eo.get(to)}function _traverseMap(eo,to){if(typeof to=="function"){var ro=to.__cachedInputs__;if(ro)for(var no=0,oo=to.__cachedInputs__;no"u"?null:WeakMap;function resetMemoizations(){_resetCounter++}function memoizeFunction(eo,to,ro){if(to===void 0&&(to=100),ro===void 0&&(ro=!1),!_weakMap)return eo;if(!_initializedStylesheetResets$1){var no=Stylesheet$1.getInstance();no&&no.onReset&&Stylesheet$1.getInstance().onReset(resetMemoizations),_initializedStylesheetResets$1=!0}var oo,io=0,so=_resetCounter;return function(){for(var lo=[],co=0;co0&&io>to)&&(oo=_createNode(),io=0,so=_resetCounter),uo=oo;for(var fo=0;fo=0||lo.indexOf("data-")===0||lo.indexOf("aria-")===0;co&&(!ro||(ro==null?void 0:ro.indexOf(lo))===-1)&&(oo[lo]=eo[lo])}return oo}function initializeComponentRef(eo){extendComponent(eo,{componentDidMount:_onMount,componentDidUpdate:_onUpdate,componentWillUnmount:_onUnmount})}function _onMount(){_setComponentRef(this.props.componentRef,this)}function _onUpdate(eo){eo.componentRef!==this.props.componentRef&&(_setComponentRef(eo.componentRef,null),_setComponentRef(this.props.componentRef,this))}function _onUnmount(){_setComponentRef(this.props.componentRef,null)}function _setComponentRef(eo,to){eo&&(typeof eo=="object"?eo.current=to:typeof eo=="function"&&eo(to))}var _a$9,DirectionalKeyCodes=(_a$9={},_a$9[KeyCodes$1.up]=1,_a$9[KeyCodes$1.down]=1,_a$9[KeyCodes$1.left]=1,_a$9[KeyCodes$1.right]=1,_a$9[KeyCodes$1.home]=1,_a$9[KeyCodes$1.end]=1,_a$9[KeyCodes$1.tab]=1,_a$9[KeyCodes$1.pageUp]=1,_a$9[KeyCodes$1.pageDown]=1,_a$9);function isDirectionalKeyCode(eo){return!!DirectionalKeyCodes[eo]}var IsFocusVisibleClassName="ms-Fabric--isFocusVisible",IsFocusHiddenClassName="ms-Fabric--isFocusHidden";function updateClassList(eo,to){eo&&(eo.classList.add(to?IsFocusVisibleClassName:IsFocusHiddenClassName),eo.classList.remove(to?IsFocusHiddenClassName:IsFocusVisibleClassName))}function setFocusVisibility(eo,to,ro){var no;ro?ro.forEach(function(oo){return updateClassList(oo.current,eo)}):updateClassList((no=getWindow(to))===null||no===void 0?void 0:no.document.body,eo)}var mountCounters=new WeakMap,callbackMap=new WeakMap;function setMountCounters(eo,to){var ro,no=mountCounters.get(eo);return no?ro=no+to:ro=1,mountCounters.set(eo,ro),ro}function setCallbackMap(eo){var to=callbackMap.get(eo);if(to)return to;var ro=function(so){return _onMouseDown(so,eo.registeredProviders)},no=function(so){return _onPointerDown(so,eo.registeredProviders)},oo=function(so){return _onKeyDown(so,eo.registeredProviders)},io=function(so){return _onKeyUp(so,eo.registeredProviders)};return to={onMouseDown:ro,onPointerDown:no,onKeyDown:oo,onKeyUp:io},callbackMap.set(eo,to),to}var FocusRectsContext=reactExports.createContext(void 0);function useFocusRects(eo){var to=reactExports.useContext(FocusRectsContext);reactExports.useEffect(function(){var ro,no,oo,io,so=getWindow(eo==null?void 0:eo.current);if(!(!so||((ro=so.FabricConfig)===null||ro===void 0?void 0:ro.disableFocusRects)===!0)){var ao=so,lo,co,uo,fo;if(!((no=to==null?void 0:to.providerRef)===null||no===void 0)&&no.current&&(!((io=(oo=to==null?void 0:to.providerRef)===null||oo===void 0?void 0:oo.current)===null||io===void 0)&&io.addEventListener)){ao=to.providerRef.current;var ho=setCallbackMap(to);lo=ho.onMouseDown,co=ho.onPointerDown,uo=ho.onKeyDown,fo=ho.onKeyUp}else lo=_onMouseDown,co=_onPointerDown,uo=_onKeyDown,fo=_onKeyUp;var po=setMountCounters(ao,1);return po<=1&&(ao.addEventListener("mousedown",lo,!0),ao.addEventListener("pointerdown",co,!0),ao.addEventListener("keydown",uo,!0),ao.addEventListener("keyup",fo,!0)),function(){var go;!so||((go=so.FabricConfig)===null||go===void 0?void 0:go.disableFocusRects)===!0||(po=setMountCounters(ao,-1),po===0&&(ao.removeEventListener("mousedown",lo,!0),ao.removeEventListener("pointerdown",co,!0),ao.removeEventListener("keydown",uo,!0),ao.removeEventListener("keyup",fo,!0)))}}},[to,eo])}var FocusRects=function(eo){return useFocusRects(eo.rootRef),null};function _onMouseDown(eo,to){setFocusVisibility(!1,eo.target,to)}function _onPointerDown(eo,to){eo.pointerType!=="mouse"&&setFocusVisibility(!1,eo.target,to)}function _onKeyDown(eo,to){isDirectionalKeyCode(eo.which)&&setFocusVisibility(!0,eo.target,to)}function _onKeyUp(eo,to){isDirectionalKeyCode(eo.which)&&setFocusVisibility(!0,eo.target,to)}var FocusRectsProvider=function(eo){var to=eo.providerRef,ro=eo.layerRoot,no=reactExports.useState([])[0],oo=reactExports.useContext(FocusRectsContext),io=oo!==void 0&&!ro,so=reactExports.useMemo(function(){return io?void 0:{providerRef:to,registeredProviders:no,registerProvider:function(ao){no.push(ao),oo==null||oo.registerProvider(ao)},unregisterProvider:function(ao){oo==null||oo.unregisterProvider(ao);var lo=no.indexOf(ao);lo>=0&&no.splice(lo,1)}}},[to,no,oo,io]);return reactExports.useEffect(function(){if(so)return so.registerProvider(so.providerRef),function(){return so.unregisterProvider(so.providerRef)}},[so]),so?reactExports.createElement(FocusRectsContext.Provider,{value:so},eo.children):reactExports.createElement(reactExports.Fragment,null,eo.children)};function getItem(eo){var to=null;try{var ro=getWindow();to=ro?ro.localStorage.getItem(eo):null}catch{}return to}var _language,STORAGE_KEY="language";function getLanguage(eo){if(eo===void 0&&(eo="sessionStorage"),_language===void 0){var to=getDocument(),ro=eo==="localStorage"?getItem(STORAGE_KEY):eo==="sessionStorage"?getItem$1(STORAGE_KEY):void 0;ro&&(_language=ro),_language===void 0&&to&&(_language=to.documentElement.getAttribute("lang")),_language===void 0&&(_language="en")}return _language}function merge$3(eo){for(var to=[],ro=1;ro-1;eo[no]=io?oo:_merge(eo[no]||{},oo,ro)}else eo[no]=oo}return ro.pop(),eo}var isIOS=function(){return!window||!window.navigator||!window.navigator.userAgent?!1:/iPad|iPhone|iPod/i.test(window.navigator.userAgent)},tagsToIgnore=["TEMPLATE","STYLE","SCRIPT"];function modalize(eo){var to=getDocument(eo);if(!to)return function(){};for(var ro=[];eo!==to.body&&eo.parentElement;){for(var no=0,oo=eo.parentElement.children;no"u"||eo){var ro=getWindow(),no=(to=ro==null?void 0:ro.navigator)===null||to===void 0?void 0:to.userAgent;isMacResult=!!no&&no.indexOf("Macintosh")!==-1}return!!isMacResult}function createComposedRenderFunction(eo){var to=createMemoizer(function(ro){var no=createMemoizer(function(oo){return function(io){return ro(io,oo)}});return function(oo,io){return eo(oo,io?no(io):ro)}});return to}var memoizer=createMemoizer(createComposedRenderFunction);function composeRenderFunction(eo,to){return memoizer(eo)(to)}var DefaultFields=["theme","styles"];function styled(eo,to,ro,no,oo){no=no||{scope:"",fields:void 0};var io=no.scope,so=no.fields,ao=so===void 0?DefaultFields:so,lo=reactExports.forwardRef(function(uo,fo){var ho=reactExports.useRef(),po=useCustomizationSettings(ao,io),go=po.styles;po.dir;var vo=__rest$1(po,["styles","dir"]),yo=ro?ro(uo):void 0,xo=ho.current&&ho.current.__cachedInputs__||[],_o=uo.styles;if(!ho.current||go!==xo[1]||_o!==xo[2]){var Eo=function(So){return concatStyleSetsWithProps(So,to,go,_o)};Eo.__cachedInputs__=[to,go,_o],Eo.__noStyleOverride__=!go&&!_o,ho.current=Eo}return reactExports.createElement(eo,__assign$4({ref:fo},vo,yo,uo,{styles:ho.current}))});lo.displayName="Styled".concat(eo.displayName||eo.name);var co=oo?reactExports.memo(lo):lo;return lo.displayName&&(co.displayName=lo.displayName),co}function getPropsWithDefaults(eo,to){for(var ro=__assign$4({},to),no=0,oo=Object.keys(eo);no=Po)return Fs(!0)}else for(Es=Fo,Fo++;;){if((Es=qo.indexOf(wo,Es+1))===-1)return Qo||$s.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:Ts.length,index:Fo}),qs();if(Es===Zo-1)return qs(qo.substring(Fo,Es).replace(cu,wo));if(wo!==No||qo[Es+1]!==No){if(wo===No||Es===0||qo[Es-1]!==No){na!==-1&&na=Po)return Fs(!0);break}$s.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:Ts.length,index:Fo}),Es++}}else Es++}return qs();function Cs(_l){Ts.push(_l),Ls=Fo}function Ps(_l){var xl=0;if(_l!==-1){var Nl=qo.substring(Es+1,_l);Nl&&Nl.trim()===""&&(xl=Nl.length)}return xl}function qs(_l){return Qo||(_l===void 0&&(_l=qo.substring(Fo)),Os.push(_l),Fo=Zo,Cs(Os),Rs&&Qs()),Fs()}function Ds(_l){Fo=_l,Cs(Os),Os=[],Sl=qo.indexOf(Do,Fo)}function Fs(_l){return{data:Ts,errors:$s,meta:{delimiter:Ro,linebreak:Do,aborted:zo,truncated:!!_l,cursor:Ls+(Go||0)}}}function Qs(){Mo(Fs()),Ts=[],$s=[]}},this.abort=function(){zo=!0},this.getCharIndex=function(){return Fo}}function _o(Oo){var wo=Oo.data,Ro=so[wo.workerId],Do=!1;if(wo.error)Ro.userError(wo.error,wo.file);else if(wo.results&&wo.results.data){var $o={abort:function(){Do=!0,Eo(wo.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:So,resume:So};if(Co(Ro.userStep)){for(var Mo=0;Mo{const no={};return Object.keys(eo).forEach(oo=>{const io=eo[oo];oo===to?no[ro]=io:no[oo]=io}),no},getDefaultNodeVariant=eo=>{const{defaultVariantId:to=BASELINE_VARIANT_ID,variants:ro={}}=eo,no=ro[to];return no==null?void 0:no.node},getDefaultNodeList=(eo,to)=>{const ro=[];return eo.forEach(no=>{const oo=to.get(no);if(!oo)return;const io=getDefaultNodeVariant(oo);io&&ro.push(io)}),ro},getFlowSnapshotNodeList=(eo,to,ro)=>{const no=[];return eo.forEach(oo=>{if(ro.includes(oo)){no.push({name:oo,use_variants:!0});return}const io=to[oo];if(!io)return;const so={inputs:{},...getDefaultNodeVariant(io)};so&&no.push(so)}),no};ToolType.llm;ToolType.prompt;ValueType.string,ToolType.python;ValueType.string,ToolType.typescript;const getTokensUsageByRow=eo=>{var to,ro,no,oo,io,so;return eo.children&&eo.children.length>0?eo.children.reduce((ao,lo)=>{const co=getTokensUsageByRow(lo);return{totalTokens:ao.totalTokens+co.totalTokens,promptTokens:ao.promptTokens+co.promptTokens,completionTokens:ao.completionTokens+co.completionTokens}},{totalTokens:0,promptTokens:0,completionTokens:0}):{totalTokens:((ro=(to=eo.output)==null?void 0:to.usage)==null?void 0:ro.total_tokens)??0,promptTokens:((oo=(no=eo.output)==null?void 0:no.usage)==null?void 0:oo.prompt_tokens)??0,completionTokens:((so=(io=eo.output)==null?void 0:io.usage)==null?void 0:so.completion_tokens)??0}},numberToDigitsString=eo=>eo.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),timePDTFormatter=eo=>{const to=new Date(eo),ro=getUTCTimezoneOffset();return`${to.getFullYear()}-${to.getMonth()+1}-${to.getDate()} ${to.getHours()}:${to.getMinutes()}:${to.getSeconds()}:${to.getMilliseconds()} (${ro})`},getUTCTimezoneOffset=()=>{const eo=new Date().getTimezoneOffset(),to=Math.abs(eo);return`UTC${(eo<0?"+":"-")+`00${Math.floor(to/60)}`.slice(-2)}:${`00${to%60}`.slice(-2)}`},hasOwn=(eo,to)=>Object.prototype.hasOwnProperty.call(eo,to),resolveTool=(eo,to,ro,no)=>{var oo,io,so;if(((oo=eo==null?void 0:eo.source)==null?void 0:oo.type)==="code")return to;if(((io=eo==null?void 0:eo.source)==null?void 0:io.type)==="package_with_prompt"){const ao=(so=eo==null?void 0:eo.source)==null?void 0:so.path,lo=no(ao??"");return ro?{...ro,inputs:{...lo==null?void 0:lo.inputs,...addPositionField(ro==null?void 0:ro.inputs,"parameter")},code:lo==null?void 0:lo.code}:void 0}return ro},addPositionField=(eo,to)=>{if(!eo)return eo;const ro={...eo};return Object.keys(ro).forEach(no=>{ro[no]={...ro[no],position:to}}),ro},keyWords=["and","as","assert","break","class","continue","def","del","elif","else","except","False","finally","for","from","global","if","import","in","is","lambda","None","nonlocal","not","or","pass","raise","return","True","try","while","with","yield"],keyFunction=["abs","all","any","ascii","bin","bool","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","str","sum","super","tuple","type","vars","zip"],flowWords=["input","inputs","output","outputs","flow","flows"],checkNodeNameValid=eo=>keyWords.some(to=>to===eo)||keyFunction.some(to=>to===eo)||flowWords.some(to=>to===eo)?!1:/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(eo),getNodesThatMoreThanOneVariant=(eo={})=>{const to=[];return Object.keys(eo).forEach(ro=>{const no=eo[ro],{variants:oo={},defaultVariantId:io,default_variant_id:so}=no,ao=Object.keys(oo).length;ao>1&&to.push({nodeName:ro,variantsCount:ao,defaultVariantId:io??so??BASELINE_VARIANT_ID,variants:oo})}),to},getVariantNodes=(eo={})=>{const to={};return Object.keys(eo).forEach(ro=>{const no=eo[ro],{variants:oo={}}=no;if(Object.keys(oo).length>1){const so=lodashExports.cloneDeep(no);Object.entries((so==null?void 0:so.variants)??{}).forEach(([lo,co])=>{co.node&&delete co.node.name});const ao=so.defaultVariantId;delete so.defaultVariantId,to[ro]={default_variant_id:ao,...so}}}),Object.keys(to).length>0?to:void 0},revValueRegex=/^\$\{(\S+)\}$/,getRefValueFromRaw=eo=>{var to,ro;return(ro=(to=`${eo??""}`)==null?void 0:to.match(revValueRegex))==null?void 0:ro[1]},generateRandomStrings=eo=>{const to="abcdefghijklmnopqrstuvwxyz0123456789";let ro="";for(let no=0;nogenerateRandomStrings(8),getRandomOutputDefinitionId=getRandomInputDefinitionId,intNumberRegExp=/^[+-]?\d+$/,doubleNumberRegExp=/^[+-]?\d+(\.\d+)?$/,isBool=eo=>eo.toLowerCase()==="true"||eo.toLowerCase()==="false",isNumber=eo=>doubleNumberRegExp.test(eo.trim())?eo===eo.trim()&&eo.length>0&&!Number.isNaN(Number(eo)):!1,isInt=eo=>intNumberRegExp.test(eo.trim())?isNumber(eo)&&Number.isInteger(Number(eo)):!1,isList$1=eo=>{try{const to=JSON.parse(eo);return Array.isArray(to)}catch{return!1}},isObject$f=eo=>{try{const to=JSON.parse(eo);return Object.prototype.toString.call(to)==="[object Object]"}catch{return!1}},isTypeValid=(eo,to)=>{const ro=typeof eo,no=ro==="string";switch(to){case ValueType.int:return no?isInt(eo):Number.isInteger(eo);case ValueType.double:return no?isNumber(eo):ro==="number";case ValueType.list:return no?isList$1(eo):Array.isArray(eo);case ValueType.object:return no?isObject$f(eo):ro==="object";case ValueType.bool:return no?isBool(eo):ro==="boolean";case ValueType.function_str:return!0;default:return!0}},getCycle=(eo,to,ro,no)=>{var so,ao;const oo=[],io=new Set(eo.keys());for(eo.forEach((lo,co)=>{lo===0&&oo.push(co)});oo.length>0;){const lo=oo.shift();lo&&(io.delete(lo),(so=to.get(lo))==null||so.forEach(co=>{const uo=(eo.get(co)??0)-1;eo.set(co,uo),uo===0&&oo.push(co)}))}for(ro.forEach((lo,co)=>{lo===0&&oo.push(co)});oo.length>0;){const lo=oo.shift();lo&&(io.delete(lo),(ao=no.get(lo))==null||ao.forEach(co=>{const uo=(ro.get(co)??0)-1;ro.set(co,uo),uo===0&&oo.push(co)}))}return io};function commonjsRequire$1(eo){throw new Error('Could not dynamically require "'+eo+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$4(eo,to){return eo===to||eo!==eo&&to!==to}var eq_1=eq$4,eq$3=eq_1;function assocIndexOf$4(eo,to){for(var ro=eo.length;ro--;)if(eq$3(eo[ro][0],to))return ro;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(eo){var to=this.__data__,ro=assocIndexOf$3(to,eo);if(ro<0)return!1;var no=to.length-1;return ro==no?to.pop():splice.call(to,ro,1),--this.size,!0}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(eo){var to=this.__data__,ro=assocIndexOf$2(to,eo);return ro<0?void 0:to[ro][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(eo){return assocIndexOf$1(this.__data__,eo)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(eo,to){var ro=this.__data__,no=assocIndexOf(ro,eo);return no<0?(++this.size,ro.push([eo,to])):ro[no][1]=to,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(eo){var to=-1,ro=eo==null?0:eo.length;for(this.clear();++to-1&&eo%1==0&&eo-1&&eo%1==0&&eo<=MAX_SAFE_INTEGER}var isLength_1=isLength$3,baseGetTag$4=_baseGetTag,isLength$2=isLength_1,isObjectLike$6=isObjectLike_1,argsTag$2="[object Arguments]",arrayTag$2="[object Array]",boolTag$3="[object Boolean]",dateTag$3="[object Date]",errorTag$2="[object Error]",funcTag$1="[object Function]",mapTag$5="[object Map]",numberTag$3="[object Number]",objectTag$4="[object Object]",regexpTag$3="[object RegExp]",setTag$5="[object Set]",stringTag$4="[object String]",weakMapTag$2="[object WeakMap]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=!0;typedArrayTags[argsTag$2]=typedArrayTags[arrayTag$2]=typedArrayTags[arrayBufferTag$3]=typedArrayTags[boolTag$3]=typedArrayTags[dataViewTag$4]=typedArrayTags[dateTag$3]=typedArrayTags[errorTag$2]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$5]=typedArrayTags[numberTag$3]=typedArrayTags[objectTag$4]=typedArrayTags[regexpTag$3]=typedArrayTags[setTag$5]=typedArrayTags[stringTag$4]=typedArrayTags[weakMapTag$2]=!1;function baseIsTypedArray$1(eo){return isObjectLike$6(eo)&&isLength$2(eo.length)&&!!typedArrayTags[baseGetTag$4(eo)]}var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$4(eo){return function(to){return eo(to)}}var _baseUnary=baseUnary$4,_nodeUtil={exports:{}};_nodeUtil.exports;(function(eo,to){var ro=_freeGlobal,no=to&&!to.nodeType&&to,oo=no&&!0&&eo&&!eo.nodeType&&eo,io=oo&&oo.exports===no,so=io&&ro.process,ao=function(){try{var lo=oo&&oo.require&&oo.require("util").types;return lo||so&&so.binding&&so.binding("util")}catch{}}();eo.exports=ao})(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray=_baseIsTypedArray,baseUnary$3=_baseUnary,nodeUtil$2=_nodeUtilExports,nodeIsTypedArray=nodeUtil$2&&nodeUtil$2.isTypedArray,isTypedArray$2=nodeIsTypedArray?baseUnary$3(nodeIsTypedArray):baseIsTypedArray,isTypedArray_1=isTypedArray$2,baseTimes=_baseTimes,isArguments$2=isArguments_1,isArray$d=isArray_1,isBuffer$2=isBufferExports,isIndex$2=_isIndex,isTypedArray$1=isTypedArray_1,objectProto$8=Object.prototype,hasOwnProperty$8=objectProto$8.hasOwnProperty;function arrayLikeKeys$2(eo,to){var ro=isArray$d(eo),no=!ro&&isArguments$2(eo),oo=!ro&&!no&&isBuffer$2(eo),io=!ro&&!no&&!oo&&isTypedArray$1(eo),so=ro||no||oo||io,ao=so?baseTimes(eo.length,String):[],lo=ao.length;for(var co in eo)(to||hasOwnProperty$8.call(eo,co))&&!(so&&(co=="length"||oo&&(co=="offset"||co=="parent")||io&&(co=="buffer"||co=="byteLength"||co=="byteOffset")||isIndex$2(co,lo)))&&ao.push(co);return ao}var _arrayLikeKeys=arrayLikeKeys$2,objectProto$7=Object.prototype;function isPrototype$3(eo){var to=eo&&eo.constructor,ro=typeof to=="function"&&to.prototype||objectProto$7;return eo===ro}var _isPrototype=isPrototype$3;function overArg$2(eo,to){return function(ro){return eo(to(ro))}}var _overArg=overArg$2,overArg$1=_overArg,nativeKeys$1=overArg$1(Object.keys,Object),_nativeKeys=nativeKeys$1,isPrototype$2=_isPrototype,nativeKeys=_nativeKeys,objectProto$6=Object.prototype,hasOwnProperty$7=objectProto$6.hasOwnProperty;function baseKeys$1(eo){if(!isPrototype$2(eo))return nativeKeys(eo);var to=[];for(var ro in Object(eo))hasOwnProperty$7.call(eo,ro)&&ro!="constructor"&&to.push(ro);return to}var _baseKeys=baseKeys$1,isFunction$3=isFunction_1,isLength$1=isLength_1;function isArrayLike$8(eo){return eo!=null&&isLength$1(eo.length)&&!isFunction$3(eo)}var isArrayLike_1=isArrayLike$8,arrayLikeKeys$1=_arrayLikeKeys,baseKeys=_baseKeys,isArrayLike$7=isArrayLike_1;function keys$7(eo){return isArrayLike$7(eo)?arrayLikeKeys$1(eo):baseKeys(eo)}var keys_1=keys$7,copyObject$3=_copyObject,keys$6=keys_1;function baseAssign$1(eo,to){return eo&©Object$3(to,keys$6(to),eo)}var _baseAssign=baseAssign$1;function nativeKeysIn$1(eo){var to=[];if(eo!=null)for(var ro in Object(eo))to.push(ro);return to}var _nativeKeysIn=nativeKeysIn$1,isObject$b=isObject_1,isPrototype$1=_isPrototype,nativeKeysIn=_nativeKeysIn,objectProto$5=Object.prototype,hasOwnProperty$6=objectProto$5.hasOwnProperty;function baseKeysIn$1(eo){if(!isObject$b(eo))return nativeKeysIn(eo);var to=isPrototype$1(eo),ro=[];for(var no in eo)no=="constructor"&&(to||!hasOwnProperty$6.call(eo,no))||ro.push(no);return ro}var _baseKeysIn=baseKeysIn$1,arrayLikeKeys=_arrayLikeKeys,baseKeysIn=_baseKeysIn,isArrayLike$6=isArrayLike_1;function keysIn$3(eo){return isArrayLike$6(eo)?arrayLikeKeys(eo,!0):baseKeysIn(eo)}var keysIn_1=keysIn$3,copyObject$2=_copyObject,keysIn$2=keysIn_1;function baseAssignIn$1(eo,to){return eo&©Object$2(to,keysIn$2(to),eo)}var _baseAssignIn=baseAssignIn$1,_cloneBuffer={exports:{}};_cloneBuffer.exports;(function(eo,to){var ro=_root$1,no=to&&!to.nodeType&&to,oo=no&&!0&&eo&&!eo.nodeType&&eo,io=oo&&oo.exports===no,so=io?ro.Buffer:void 0,ao=so?so.allocUnsafe:void 0;function lo(co,uo){if(uo)return co.slice();var fo=co.length,ho=ao?ao(fo):new co.constructor(fo);return co.copy(ho),ho}eo.exports=lo})(_cloneBuffer,_cloneBuffer.exports);var _cloneBufferExports=_cloneBuffer.exports;function copyArray$1(eo,to){var ro=-1,no=eo.length;for(to||(to=Array(no));++roao))return!1;var co=io.get(eo),uo=io.get(to);if(co&&uo)return co==to&&uo==eo;var fo=-1,ho=!0,po=ro&COMPARE_UNORDERED_FLAG$3?new SetCache$1:void 0;for(io.set(eo,to),io.set(to,eo);++fo0&&ro(ao)?to>1?baseFlatten$2(ao,to-1,ro,no,oo):arrayPush$1(oo,ao):no||(oo[oo.length]=ao)}return oo}var _baseFlatten=baseFlatten$2;function apply$2(eo,to,ro){switch(ro.length){case 0:return eo.call(to);case 1:return eo.call(to,ro[0]);case 2:return eo.call(to,ro[0],ro[1]);case 3:return eo.call(to,ro[0],ro[1],ro[2])}return eo.apply(to,ro)}var _apply=apply$2,apply$1=_apply,nativeMax$2=Math.max;function overRest$2(eo,to,ro){return to=nativeMax$2(to===void 0?eo.length-1:to,0),function(){for(var no=arguments,oo=-1,io=nativeMax$2(no.length-to,0),so=Array(io);++oo0){if(++to>=HOT_COUNT)return arguments[0]}else to=0;return eo.apply(void 0,arguments)}}var _shortOut=shortOut$1,baseSetToString=_baseSetToString,shortOut=_shortOut,setToString$2=shortOut(baseSetToString),_setToString=setToString$2,identity$5=identity_1,overRest$1=_overRest,setToString$1=_setToString;function baseRest$1(eo,to){return setToString$1(overRest$1(eo,to,identity$5),eo+"")}var _baseRest=baseRest$1;function baseFindIndex$2(eo,to,ro,no){for(var oo=eo.length,io=ro+(no?1:-1);no?io--:++io-1}var _arrayIncludes=arrayIncludes$1;function arrayIncludesWith$1(eo,to,ro){for(var no=-1,oo=eo==null?0:eo.length;++no=LARGE_ARRAY_SIZE){var co=to?null:createSet(eo);if(co)return setToArray(co);so=!1,oo=cacheHas,lo=new SetCache}else lo=to?[]:ao;e:for(;++no1?po.setNode(go,fo):po.setNode(go)}),this},oo.prototype.setNode=function(uo,fo){return eo.has(this._nodes,uo)?(arguments.length>1&&(this._nodes[uo]=fo),this):(this._nodes[uo]=arguments.length>1?fo:this._defaultNodeLabelFn(uo),this._isCompound&&(this._parent[uo]=ro,this._children[uo]={},this._children[ro][uo]=!0),this._in[uo]={},this._preds[uo]={},this._out[uo]={},this._sucs[uo]={},++this._nodeCount,this)},oo.prototype.node=function(uo){return this._nodes[uo]},oo.prototype.hasNode=function(uo){return eo.has(this._nodes,uo)},oo.prototype.removeNode=function(uo){var fo=this;if(eo.has(this._nodes,uo)){var ho=function(po){fo.removeEdge(fo._edgeObjs[po])};delete this._nodes[uo],this._isCompound&&(this._removeFromParentsChildList(uo),delete this._parent[uo],eo.each(this.children(uo),function(po){fo.setParent(po)}),delete this._children[uo]),eo.each(eo.keys(this._in[uo]),ho),delete this._in[uo],delete this._preds[uo],eo.each(eo.keys(this._out[uo]),ho),delete this._out[uo],delete this._sucs[uo],--this._nodeCount}return this},oo.prototype.setParent=function(uo,fo){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(eo.isUndefined(fo))fo=ro;else{fo+="";for(var ho=fo;!eo.isUndefined(ho);ho=this.parent(ho))if(ho===uo)throw new Error("Setting "+fo+" as parent of "+uo+" would create a cycle");this.setNode(fo)}return this.setNode(uo),this._removeFromParentsChildList(uo),this._parent[uo]=fo,this._children[fo][uo]=!0,this},oo.prototype._removeFromParentsChildList=function(uo){delete this._children[this._parent[uo]][uo]},oo.prototype.parent=function(uo){if(this._isCompound){var fo=this._parent[uo];if(fo!==ro)return fo}},oo.prototype.children=function(uo){if(eo.isUndefined(uo)&&(uo=ro),this._isCompound){var fo=this._children[uo];if(fo)return eo.keys(fo)}else{if(uo===ro)return this.nodes();if(this.hasNode(uo))return[]}},oo.prototype.predecessors=function(uo){var fo=this._preds[uo];if(fo)return eo.keys(fo)},oo.prototype.successors=function(uo){var fo=this._sucs[uo];if(fo)return eo.keys(fo)},oo.prototype.neighbors=function(uo){var fo=this.predecessors(uo);if(fo)return eo.union(fo,this.successors(uo))},oo.prototype.isLeaf=function(uo){var fo;return this.isDirected()?fo=this.successors(uo):fo=this.neighbors(uo),fo.length===0},oo.prototype.filterNodes=function(uo){var fo=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});fo.setGraph(this.graph());var ho=this;eo.each(this._nodes,function(vo,yo){uo(yo)&&fo.setNode(yo,vo)}),eo.each(this._edgeObjs,function(vo){fo.hasNode(vo.v)&&fo.hasNode(vo.w)&&fo.setEdge(vo,ho.edge(vo))});var po={};function go(vo){var yo=ho.parent(vo);return yo===void 0||fo.hasNode(yo)?(po[vo]=yo,yo):yo in po?po[yo]:go(yo)}return this._isCompound&&eo.each(fo.nodes(),function(vo){fo.setParent(vo,go(vo))}),fo},oo.prototype.setDefaultEdgeLabel=function(uo){return eo.isFunction(uo)||(uo=eo.constant(uo)),this._defaultEdgeLabelFn=uo,this},oo.prototype.edgeCount=function(){return this._edgeCount},oo.prototype.edges=function(){return eo.values(this._edgeObjs)},oo.prototype.setPath=function(uo,fo){var ho=this,po=arguments;return eo.reduce(uo,function(go,vo){return po.length>1?ho.setEdge(go,vo,fo):ho.setEdge(go,vo),vo}),this},oo.prototype.setEdge=function(){var uo,fo,ho,po,go=!1,vo=arguments[0];typeof vo=="object"&&vo!==null&&"v"in vo?(uo=vo.v,fo=vo.w,ho=vo.name,arguments.length===2&&(po=arguments[1],go=!0)):(uo=vo,fo=arguments[1],ho=arguments[3],arguments.length>2&&(po=arguments[2],go=!0)),uo=""+uo,fo=""+fo,eo.isUndefined(ho)||(ho=""+ho);var yo=ao(this._isDirected,uo,fo,ho);if(eo.has(this._edgeLabels,yo))return go&&(this._edgeLabels[yo]=po),this;if(!eo.isUndefined(ho)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(uo),this.setNode(fo),this._edgeLabels[yo]=go?po:this._defaultEdgeLabelFn(uo,fo,ho);var xo=lo(this._isDirected,uo,fo,ho);return uo=xo.v,fo=xo.w,Object.freeze(xo),this._edgeObjs[yo]=xo,io(this._preds[fo],uo),io(this._sucs[uo],fo),this._in[fo][yo]=xo,this._out[uo][yo]=xo,this._edgeCount++,this},oo.prototype.edge=function(uo,fo,ho){var po=arguments.length===1?co(this._isDirected,arguments[0]):ao(this._isDirected,uo,fo,ho);return this._edgeLabels[po]},oo.prototype.hasEdge=function(uo,fo,ho){var po=arguments.length===1?co(this._isDirected,arguments[0]):ao(this._isDirected,uo,fo,ho);return eo.has(this._edgeLabels,po)},oo.prototype.removeEdge=function(uo,fo,ho){var po=arguments.length===1?co(this._isDirected,arguments[0]):ao(this._isDirected,uo,fo,ho),go=this._edgeObjs[po];return go&&(uo=go.v,fo=go.w,delete this._edgeLabels[po],delete this._edgeObjs[po],so(this._preds[fo],uo),so(this._sucs[uo],fo),delete this._in[fo][po],delete this._out[uo][po],this._edgeCount--),this},oo.prototype.inEdges=function(uo,fo){var ho=this._in[uo];if(ho){var po=eo.values(ho);return fo?eo.filter(po,function(go){return go.v===fo}):po}},oo.prototype.outEdges=function(uo,fo){var ho=this._out[uo];if(ho){var po=eo.values(ho);return fo?eo.filter(po,function(go){return go.w===fo}):po}},oo.prototype.nodeEdges=function(uo,fo){var ho=this.inEdges(uo,fo);if(ho)return ho.concat(this.outEdges(uo,fo))};function io(uo,fo){uo[fo]?uo[fo]++:uo[fo]=1}function so(uo,fo){--uo[fo]||delete uo[fo]}function ao(uo,fo,ho,po){var go=""+fo,vo=""+ho;if(!uo&&go>vo){var yo=go;go=vo,vo=yo}return go+no+vo+no+(eo.isUndefined(po)?to:po)}function lo(uo,fo,ho,po){var go=""+fo,vo=""+ho;if(!uo&&go>vo){var yo=go;go=vo,vo=yo}var xo={v:go,w:vo};return po&&(xo.name=po),xo}function co(uo,fo){return ao(uo,fo.v,fo.w,fo.name)}return graph}var version$1,hasRequiredVersion;function requireVersion(){return hasRequiredVersion||(hasRequiredVersion=1,version$1="2.1.8"),version$1}var lib,hasRequiredLib;function requireLib(){return hasRequiredLib||(hasRequiredLib=1,lib={Graph:requireGraph(),version:requireVersion()}),lib}var json,hasRequiredJson;function requireJson(){if(hasRequiredJson)return json;hasRequiredJson=1;var eo=requireLodash(),to=requireGraph();json={write:ro,read:io};function ro(so){var ao={options:{directed:so.isDirected(),multigraph:so.isMultigraph(),compound:so.isCompound()},nodes:no(so),edges:oo(so)};return eo.isUndefined(so.graph())||(ao.value=eo.clone(so.graph())),ao}function no(so){return eo.map(so.nodes(),function(ao){var lo=so.node(ao),co=so.parent(ao),uo={v:ao};return eo.isUndefined(lo)||(uo.value=lo),eo.isUndefined(co)||(uo.parent=co),uo})}function oo(so){return eo.map(so.edges(),function(ao){var lo=so.edge(ao),co={v:ao.v,w:ao.w};return eo.isUndefined(ao.name)||(co.name=ao.name),eo.isUndefined(lo)||(co.value=lo),co})}function io(so){var ao=new to(so.options).setGraph(so.value);return eo.each(so.nodes,function(lo){ao.setNode(lo.v,lo.value),lo.parent&&ao.setParent(lo.v,lo.parent)}),eo.each(so.edges,function(lo){ao.setEdge({v:lo.v,w:lo.w,name:lo.name},lo.value)}),ao}return json}var components_1,hasRequiredComponents;function requireComponents(){if(hasRequiredComponents)return components_1;hasRequiredComponents=1;var eo=requireLodash();components_1=to;function to(ro){var no={},oo=[],io;function so(ao){eo.has(no,ao)||(no[ao]=!0,io.push(ao),eo.each(ro.successors(ao),so),eo.each(ro.predecessors(ao),so))}return eo.each(ro.nodes(),function(ao){io=[],so(ao),io.length&&oo.push(io)}),oo}return components_1}var priorityQueue,hasRequiredPriorityQueue;function requirePriorityQueue(){if(hasRequiredPriorityQueue)return priorityQueue;hasRequiredPriorityQueue=1;var eo=requireLodash();priorityQueue=to;function to(){this._arr=[],this._keyIndices={}}return to.prototype.size=function(){return this._arr.length},to.prototype.keys=function(){return this._arr.map(function(ro){return ro.key})},to.prototype.has=function(ro){return eo.has(this._keyIndices,ro)},to.prototype.priority=function(ro){var no=this._keyIndices[ro];if(no!==void 0)return this._arr[no].priority},to.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},to.prototype.add=function(ro,no){var oo=this._keyIndices;if(ro=String(ro),!eo.has(oo,ro)){var io=this._arr,so=io.length;return oo[ro]=so,io.push({key:ro,priority:no}),this._decrease(so),!0}return!1},to.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var ro=this._arr.pop();return delete this._keyIndices[ro.key],this._heapify(0),ro.key},to.prototype.decrease=function(ro,no){var oo=this._keyIndices[ro];if(no>this._arr[oo].priority)throw new Error("New priority is greater than current priority. Key: "+ro+" Old: "+this._arr[oo].priority+" New: "+no);this._arr[oo].priority=no,this._decrease(oo)},to.prototype._heapify=function(ro){var no=this._arr,oo=2*ro,io=oo+1,so=ro;oo>1,!(no[io].priority0&&(fo=uo.removeMin(),ho=co[fo],ho.distance!==Number.POSITIVE_INFINITY);)lo(fo).forEach(po);return co}return dijkstra_1}var dijkstraAll_1,hasRequiredDijkstraAll;function requireDijkstraAll(){if(hasRequiredDijkstraAll)return dijkstraAll_1;hasRequiredDijkstraAll=1;var eo=requireDijkstra(),to=requireLodash();dijkstraAll_1=ro;function ro(no,oo,io){return to.transform(no.nodes(),function(so,ao){so[ao]=eo(no,ao,oo,io)},{})}return dijkstraAll_1}var tarjan_1,hasRequiredTarjan;function requireTarjan(){if(hasRequiredTarjan)return tarjan_1;hasRequiredTarjan=1;var eo=requireLodash();tarjan_1=to;function to(ro){var no=0,oo=[],io={},so=[];function ao(lo){var co=io[lo]={onStack:!0,lowlink:no,index:no++};if(oo.push(lo),ro.successors(lo).forEach(function(ho){eo.has(io,ho)?io[ho].onStack&&(co.lowlink=Math.min(co.lowlink,io[ho].index)):(ao(ho),co.lowlink=Math.min(co.lowlink,io[ho].lowlink))}),co.lowlink===co.index){var uo=[],fo;do fo=oo.pop(),io[fo].onStack=!1,uo.push(fo);while(lo!==fo);so.push(uo)}}return ro.nodes().forEach(function(lo){eo.has(io,lo)||ao(lo)}),so}return tarjan_1}var findCycles_1,hasRequiredFindCycles;function requireFindCycles(){if(hasRequiredFindCycles)return findCycles_1;hasRequiredFindCycles=1;var eo=requireLodash(),to=requireTarjan();findCycles_1=ro;function ro(no){return eo.filter(to(no),function(oo){return oo.length>1||oo.length===1&&no.hasEdge(oo[0],oo[0])})}return findCycles_1}var floydWarshall_1,hasRequiredFloydWarshall;function requireFloydWarshall(){if(hasRequiredFloydWarshall)return floydWarshall_1;hasRequiredFloydWarshall=1;var eo=requireLodash();floydWarshall_1=ro;var to=eo.constant(1);function ro(oo,io,so){return no(oo,io||to,so||function(ao){return oo.outEdges(ao)})}function no(oo,io,so){var ao={},lo=oo.nodes();return lo.forEach(function(co){ao[co]={},ao[co][co]={distance:0},lo.forEach(function(uo){co!==uo&&(ao[co][uo]={distance:Number.POSITIVE_INFINITY})}),so(co).forEach(function(uo){var fo=uo.v===co?uo.w:uo.v,ho=io(uo);ao[co][fo]={distance:ho,predecessor:co}})}),lo.forEach(function(co){var uo=ao[co];lo.forEach(function(fo){var ho=ao[fo];lo.forEach(function(po){var go=ho[co],vo=uo[po],yo=ho[po],xo=go.distance+vo.distance;xo0;){if(co=lo.removeMin(),eo.has(ao,co))so.setEdge(co,ao[co]);else{if(fo)throw new Error("Input graph is not connected: "+oo);fo=!0}oo.nodeEdges(co).forEach(uo)}return so}return prim_1}var alg,hasRequiredAlg;function requireAlg(){return hasRequiredAlg||(hasRequiredAlg=1,alg={components:requireComponents(),dijkstra:requireDijkstra(),dijkstraAll:requireDijkstraAll(),findCycles:requireFindCycles(),floydWarshall:requireFloydWarshall(),isAcyclic:requireIsAcyclic(),postorder:requirePostorder(),preorder:requirePreorder(),prim:requirePrim(),tarjan:requireTarjan(),topsort:requireTopsort()}),alg}var graphlib$1,hasRequiredGraphlib;function requireGraphlib(){if(hasRequiredGraphlib)return graphlib$1;hasRequiredGraphlib=1;var eo=requireLib();return graphlib$1={Graph:eo.Graph,json:requireJson(),alg:requireAlg(),version:eo.version},graphlib$1}var graphlib;if(typeof commonjsRequire$1=="function")try{graphlib=requireGraphlib()}catch{}graphlib||(graphlib=window.graphlib);var graphlib_1=graphlib,cloneDeep_1,hasRequiredCloneDeep;function requireCloneDeep(){if(hasRequiredCloneDeep)return cloneDeep_1;hasRequiredCloneDeep=1;var eo=_baseClone,to=1,ro=4;function no(oo){return eo(oo,to|ro)}return cloneDeep_1=no,cloneDeep_1}var eq=eq_1,isArrayLike$3=isArrayLike_1,isIndex=_isIndex,isObject$7=isObject_1;function isIterateeCall$2(eo,to,ro){if(!isObject$7(ro))return!1;var no=typeof to;return(no=="number"?isArrayLike$3(ro)&&isIndex(to,ro.length):no=="string"&&to in ro)?eq(ro[to],eo):!1}var _isIterateeCall=isIterateeCall$2,defaults_1,hasRequiredDefaults;function requireDefaults(){if(hasRequiredDefaults)return defaults_1;hasRequiredDefaults=1;var eo=_baseRest,to=eq_1,ro=_isIterateeCall,no=keysIn_1,oo=Object.prototype,io=oo.hasOwnProperty,so=eo(function(ao,lo){ao=Object(ao);var co=-1,uo=lo.length,fo=uo>2?lo[2]:void 0;for(fo&&ro(lo[0],lo[1],fo)&&(uo=1);++co-1?oo[io?to[so]:so]:void 0}}var _createFind=createFind$1,reWhitespace=/\s/;function trimmedEndIndex$1(eo){for(var to=eo.length;to--&&reWhitespace.test(eo.charAt(to)););return to}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(eo){return eo&&eo.slice(0,trimmedEndIndex(eo)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1,baseTrim=_baseTrim,isObject$6=isObject_1,isSymbol$2=isSymbol_1,NAN=NaN,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber$1(eo){if(typeof eo=="number")return eo;if(isSymbol$2(eo))return NAN;if(isObject$6(eo)){var to=typeof eo.valueOf=="function"?eo.valueOf():eo;eo=isObject$6(to)?to+"":to}if(typeof eo!="string")return eo===0?eo:+eo;eo=baseTrim(eo);var ro=reIsBinary.test(eo);return ro||reIsOctal.test(eo)?freeParseInt(eo.slice(2),ro?2:8):reIsBadHex.test(eo)?NAN:+eo}var toNumber_1=toNumber$1,toNumber=toNumber_1,INFINITY=1/0,MAX_INTEGER=17976931348623157e292;function toFinite$2(eo){if(!eo)return eo===0?eo:0;if(eo=toNumber(eo),eo===INFINITY||eo===-INFINITY){var to=eo<0?-1:1;return to*MAX_INTEGER}return eo===eo?eo:0}var toFinite_1=toFinite$2,toFinite$1=toFinite_1;function toInteger$1(eo){var to=toFinite$1(eo),ro=to%1;return to===to?ro?to-ro:to:0}var toInteger_1=toInteger$1,baseFindIndex=_baseFindIndex,baseIteratee$3=_baseIteratee,toInteger=toInteger_1,nativeMax$1=Math.max;function findIndex$1(eo,to,ro){var no=eo==null?0:eo.length;if(!no)return-1;var oo=ro==null?0:toInteger(ro);return oo<0&&(oo=nativeMax$1(no+oo,0)),baseFindIndex(eo,baseIteratee$3(to),oo)}var findIndex_1=findIndex$1,createFind=_createFind,findIndex=findIndex_1,find$1=createFind(findIndex),find_1=find$1,baseFlatten$1=_baseFlatten;function flatten$2(eo){var to=eo==null?0:eo.length;return to?baseFlatten$1(eo,1):[]}var flatten_1=flatten$2,forIn_1,hasRequiredForIn;function requireForIn(){if(hasRequiredForIn)return forIn_1;hasRequiredForIn=1;var eo=_baseFor,to=require_castFunction(),ro=keysIn_1;function no(oo,io){return oo==null?oo:eo(oo,to(io),ro)}return forIn_1=no,forIn_1}function last(eo){var to=eo==null?0:eo.length;return to?eo[to-1]:void 0}var last_1=last,baseAssignValue=_baseAssignValue,baseForOwn=_baseForOwn,baseIteratee$2=_baseIteratee;function mapValues(eo,to){var ro={};return to=baseIteratee$2(to),baseForOwn(eo,function(no,oo,io){baseAssignValue(ro,oo,to(no,oo,io))}),ro}var mapValues_1=mapValues,isSymbol$1=isSymbol_1;function baseExtremum$3(eo,to,ro){for(var no=-1,oo=eo.length;++noto}var _baseGt=baseGt$1,baseExtremum$2=_baseExtremum,baseGt=_baseGt,identity$4=identity_1;function max$1(eo){return eo&&eo.length?baseExtremum$2(eo,identity$4,baseGt):void 0}var max_1=max$1,_assignMergeValue,hasRequired_assignMergeValue;function require_assignMergeValue(){if(hasRequired_assignMergeValue)return _assignMergeValue;hasRequired_assignMergeValue=1;var eo=_baseAssignValue,to=eq_1;function ro(no,oo,io){(io!==void 0&&!to(no[oo],io)||io===void 0&&!(oo in no))&&eo(no,oo,io)}return _assignMergeValue=ro,_assignMergeValue}var baseGetTag=_baseGetTag,getPrototype=_getPrototype,isObjectLike=isObjectLike_1,objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$2=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject$1(eo){if(!isObjectLike(eo)||baseGetTag(eo)!=objectTag)return!1;var to=getPrototype(eo);if(to===null)return!0;var ro=hasOwnProperty$2.call(to,"constructor")&&to.constructor;return typeof ro=="function"&&ro instanceof ro&&funcToString.call(ro)==objectCtorString}var isPlainObject_1=isPlainObject$1,_safeGet,hasRequired_safeGet;function require_safeGet(){if(hasRequired_safeGet)return _safeGet;hasRequired_safeGet=1;function eo(to,ro){if(!(ro==="constructor"&&typeof to[ro]=="function")&&ro!="__proto__")return to[ro]}return _safeGet=eo,_safeGet}var toPlainObject_1,hasRequiredToPlainObject;function requireToPlainObject(){if(hasRequiredToPlainObject)return toPlainObject_1;hasRequiredToPlainObject=1;var eo=_copyObject,to=keysIn_1;function ro(no){return eo(no,to(no))}return toPlainObject_1=ro,toPlainObject_1}var _baseMergeDeep,hasRequired_baseMergeDeep;function require_baseMergeDeep(){if(hasRequired_baseMergeDeep)return _baseMergeDeep;hasRequired_baseMergeDeep=1;var eo=require_assignMergeValue(),to=_cloneBufferExports,ro=_cloneTypedArray,no=_copyArray,oo=_initCloneObject,io=isArguments_1,so=isArray_1,ao=requireIsArrayLikeObject(),lo=isBufferExports,co=isFunction_1,uo=isObject_1,fo=isPlainObject_1,ho=isTypedArray_1,po=require_safeGet(),go=requireToPlainObject();function vo(yo,xo,_o,Eo,So,ko,Ao){var Co=po(yo,_o),Oo=po(xo,_o),wo=Ao.get(Oo);if(wo){eo(yo,_o,wo);return}var Ro=ko?ko(Co,Oo,_o+"",yo,xo,Ao):void 0,Do=Ro===void 0;if(Do){var $o=so(Oo),Mo=!$o&&lo(Oo),Po=!$o&&!Mo&&ho(Oo);Ro=Oo,$o||Mo||Po?so(Co)?Ro=Co:ao(Co)?Ro=no(Co):Mo?(Do=!1,Ro=to(Oo,!0)):Po?(Do=!1,Ro=ro(Oo,!0)):Ro=[]:fo(Oo)||io(Oo)?(Ro=Co,io(Co)?Ro=go(Co):(!uo(Co)||co(Co))&&(Ro=oo(Oo))):Do=!1}Do&&(Ao.set(Oo,Ro),So(Ro,Oo,Eo,ko,Ao),Ao.delete(Oo)),eo(yo,_o,Ro)}return _baseMergeDeep=vo,_baseMergeDeep}var _baseMerge,hasRequired_baseMerge;function require_baseMerge(){if(hasRequired_baseMerge)return _baseMerge;hasRequired_baseMerge=1;var eo=_Stack,to=require_assignMergeValue(),ro=_baseFor,no=require_baseMergeDeep(),oo=isObject_1,io=keysIn_1,so=require_safeGet();function ao(lo,co,uo,fo,ho){lo!==co&&ro(co,function(po,go){if(ho||(ho=new eo),oo(po))no(lo,co,go,uo,ao,fo,ho);else{var vo=fo?fo(so(lo,go),po,go+"",lo,co,ho):void 0;vo===void 0&&(vo=po),to(lo,go,vo)}},io)}return _baseMerge=ao,_baseMerge}var _createAssigner,hasRequired_createAssigner;function require_createAssigner(){if(hasRequired_createAssigner)return _createAssigner;hasRequired_createAssigner=1;var eo=_baseRest,to=_isIterateeCall;function ro(no){return eo(function(oo,io){var so=-1,ao=io.length,lo=ao>1?io[ao-1]:void 0,co=ao>2?io[2]:void 0;for(lo=no.length>3&&typeof lo=="function"?(ao--,lo):void 0,co&&to(io[0],io[1],co)&&(lo=ao<3?void 0:lo,ao=1),oo=Object(oo);++soto||io&&so&&lo&&!ao&&!co||no&&so&&lo||!ro&&lo||!oo)return 1;if(!no&&!io&&!co&&eo=ao)return lo;var co=ro[no];return lo*(co=="desc"?-1:1)}}return eo.index-to.index}var _compareMultiple=compareMultiple$1,arrayMap=_arrayMap,baseGet=_baseGet,baseIteratee=_baseIteratee,baseMap=_baseMap,baseSortBy=_baseSortBy,baseUnary=_baseUnary,compareMultiple=_compareMultiple,identity$2=identity_1,isArray$1=isArray_1;function baseOrderBy$1(eo,to,ro){to.length?to=arrayMap(to,function(io){return isArray$1(io)?function(so){return baseGet(so,io.length===1?io[0]:io)}:io}):to=[identity$2];var no=-1;to=arrayMap(to,baseUnary(baseIteratee));var oo=baseMap(eo,function(io,so,ao){var lo=arrayMap(to,function(co){return co(io)});return{criteria:lo,index:++no,value:io}});return baseSortBy(oo,function(io,so){return compareMultiple(io,so,ro)})}var _baseOrderBy=baseOrderBy$1,baseFlatten=_baseFlatten,baseOrderBy=_baseOrderBy,baseRest=_baseRest,isIterateeCall=_isIterateeCall,sortBy=baseRest(function(eo,to){if(eo==null)return[];var ro=to.length;return ro>1&&isIterateeCall(eo,to[0],to[1])?to=[]:ro>2&&isIterateeCall(to[0],to[1],to[2])&&(to=[to[0]]),baseOrderBy(eo,baseFlatten(to,1),[])}),sortBy_1=sortBy,uniqueId_1,hasRequiredUniqueId;function requireUniqueId(){if(hasRequiredUniqueId)return uniqueId_1;hasRequiredUniqueId=1;var eo=toString_1,to=0;function ro(no){var oo=++to;return eo(no)+oo}return uniqueId_1=ro,uniqueId_1}var _baseZipObject,hasRequired_baseZipObject;function require_baseZipObject(){if(hasRequired_baseZipObject)return _baseZipObject;hasRequired_baseZipObject=1;function eo(to,ro,no){for(var oo=-1,io=to.length,so=ro.length,ao={};++oo0;--ao)if(so=to[ao].dequeue(),so){no=no.concat(removeNode(eo,to,ro,so,!0));break}}}return no}function removeNode(eo,to,ro,no,oo){var io=oo?[]:void 0;return _$u.forEach(eo.inEdges(no.v),function(so){var ao=eo.edge(so),lo=eo.node(so.v);oo&&io.push({v:so.v,w:so.w}),lo.out-=ao,assignBucket(to,ro,lo)}),_$u.forEach(eo.outEdges(no.v),function(so){var ao=eo.edge(so),lo=so.w,co=eo.node(lo);co.in-=ao,assignBucket(to,ro,co)}),eo.removeNode(no.v),io}function buildState(eo,to){var ro=new Graph$7,no=0,oo=0;_$u.forEach(eo.nodes(),function(ao){ro.setNode(ao,{v:ao,in:0,out:0})}),_$u.forEach(eo.edges(),function(ao){var lo=ro.edge(ao.v,ao.w)||0,co=to(ao),uo=lo+co;ro.setEdge(ao.v,ao.w,uo),oo=Math.max(oo,ro.node(ao.v).out+=co),no=Math.max(no,ro.node(ao.w).in+=co)});var io=_$u.range(oo+no+3).map(function(){return new List$2}),so=no+1;return _$u.forEach(ro.nodes(),function(ao){assignBucket(io,so,ro.node(ao))}),{graph:ro,buckets:io,zeroIdx:so}}function assignBucket(eo,to,ro){ro.out?ro.in?eo[ro.out-ro.in+to].enqueue(ro):eo[eo.length-1].enqueue(ro):eo[0].enqueue(ro)}var _$t=lodash_1,greedyFAS=greedyFas,acyclic$1={run:run$2,undo:undo$4};function run$2(eo){var to=eo.graph().acyclicer==="greedy"?greedyFAS(eo,ro(eo)):dfsFAS(eo);_$t.forEach(to,function(no){var oo=eo.edge(no);eo.removeEdge(no),oo.forwardName=no.name,oo.reversed=!0,eo.setEdge(no.w,no.v,oo,_$t.uniqueId("rev"))});function ro(no){return function(oo){return no.edge(oo).weight}}}function dfsFAS(eo){var to=[],ro={},no={};function oo(io){_$t.has(no,io)||(no[io]=!0,ro[io]=!0,_$t.forEach(eo.outEdges(io),function(so){_$t.has(ro,so.w)?to.push(so):oo(so.w)}),delete ro[io])}return _$t.forEach(eo.nodes(),oo),to}function undo$4(eo){_$t.forEach(eo.edges(),function(to){var ro=eo.edge(to);if(ro.reversed){eo.removeEdge(to);var no=ro.forwardName;delete ro.reversed,delete ro.forwardName,eo.setEdge(to.w,to.v,ro,no)}})}var _$s=lodash_1,Graph$6=graphlib_1.Graph,util$a={addDummyNode,simplify:simplify$1,asNonCompoundGraph,successorWeights,predecessorWeights,intersectRect,buildLayerMatrix,normalizeRanks:normalizeRanks$1,removeEmptyRanks:removeEmptyRanks$1,addBorderNode:addBorderNode$1,maxRank,partition,time,notime};function addDummyNode(eo,to,ro,no){var oo;do oo=_$s.uniqueId(no);while(eo.hasNode(oo));return ro.dummy=to,eo.setNode(oo,ro),oo}function simplify$1(eo){var to=new Graph$6().setGraph(eo.graph());return _$s.forEach(eo.nodes(),function(ro){to.setNode(ro,eo.node(ro))}),_$s.forEach(eo.edges(),function(ro){var no=to.edge(ro.v,ro.w)||{weight:0,minlen:1},oo=eo.edge(ro);to.setEdge(ro.v,ro.w,{weight:no.weight+oo.weight,minlen:Math.max(no.minlen,oo.minlen)})}),to}function asNonCompoundGraph(eo){var to=new Graph$6({multigraph:eo.isMultigraph()}).setGraph(eo.graph());return _$s.forEach(eo.nodes(),function(ro){eo.children(ro).length||to.setNode(ro,eo.node(ro))}),_$s.forEach(eo.edges(),function(ro){to.setEdge(ro,eo.edge(ro))}),to}function successorWeights(eo){var to=_$s.map(eo.nodes(),function(ro){var no={};return _$s.forEach(eo.outEdges(ro),function(oo){no[oo.w]=(no[oo.w]||0)+eo.edge(oo).weight}),no});return _$s.zipObject(eo.nodes(),to)}function predecessorWeights(eo){var to=_$s.map(eo.nodes(),function(ro){var no={};return _$s.forEach(eo.inEdges(ro),function(oo){no[oo.v]=(no[oo.v]||0)+eo.edge(oo).weight}),no});return _$s.zipObject(eo.nodes(),to)}function intersectRect(eo,to){var ro=eo.x,no=eo.y,oo=to.x-ro,io=to.y-no,so=eo.width/2,ao=eo.height/2;if(!oo&&!io)throw new Error("Not possible to find intersection inside of the rectangle");var lo,co;return Math.abs(io)*so>Math.abs(oo)*ao?(io<0&&(ao=-ao),lo=ao*oo/io,co=ao):(oo<0&&(so=-so),lo=so,co=so*io/oo),{x:ro+lo,y:no+co}}function buildLayerMatrix(eo){var to=_$s.map(_$s.range(maxRank(eo)+1),function(){return[]});return _$s.forEach(eo.nodes(),function(ro){var no=eo.node(ro),oo=no.rank;_$s.isUndefined(oo)||(to[oo][no.order]=ro)}),to}function normalizeRanks$1(eo){var to=_$s.min(_$s.map(eo.nodes(),function(ro){return eo.node(ro).rank}));_$s.forEach(eo.nodes(),function(ro){var no=eo.node(ro);_$s.has(no,"rank")&&(no.rank-=to)})}function removeEmptyRanks$1(eo){var to=_$s.min(_$s.map(eo.nodes(),function(io){return eo.node(io).rank})),ro=[];_$s.forEach(eo.nodes(),function(io){var so=eo.node(io).rank-to;ro[so]||(ro[so]=[]),ro[so].push(io)});var no=0,oo=eo.graph().nodeRankFactor;_$s.forEach(ro,function(io,so){_$s.isUndefined(io)&&so%oo!==0?--no:no&&_$s.forEach(io,function(ao){eo.node(ao).rank+=no})})}function addBorderNode$1(eo,to,ro,no){var oo={width:0,height:0};return arguments.length>=4&&(oo.rank=ro,oo.order=no),addDummyNode(eo,"border",oo,to)}function maxRank(eo){return _$s.max(_$s.map(eo.nodes(),function(to){var ro=eo.node(to).rank;if(!_$s.isUndefined(ro))return ro}))}function partition(eo,to){var ro={lhs:[],rhs:[]};return _$s.forEach(eo,function(no){to(no)?ro.lhs.push(no):ro.rhs.push(no)}),ro}function time(eo,to){var ro=_$s.now();try{return to()}finally{console.log(eo+" time: "+(_$s.now()-ro)+"ms")}}function notime(eo,to){return to()}var _$r=lodash_1,util$9=util$a,normalize$1={run:run$1,undo:undo$3};function run$1(eo){eo.graph().dummyChains=[],_$r.forEach(eo.edges(),function(to){normalizeEdge(eo,to)})}function normalizeEdge(eo,to){var ro=to.v,no=eo.node(ro).rank,oo=to.w,io=eo.node(oo).rank,so=to.name,ao=eo.edge(to),lo=ao.labelRank;if(io!==no+1){eo.removeEdge(to);var co,uo,fo;for(fo=0,++no;noso.lim&&(ao=so,lo=!0);var co=_$o.filter(to.edges(),function(uo){return lo===isDescendant(eo,eo.node(uo.v),ao)&&lo!==isDescendant(eo,eo.node(uo.w),ao)});return _$o.minBy(co,function(uo){return slack(to,uo)})}function exchangeEdges(eo,to,ro,no){var oo=ro.v,io=ro.w;eo.removeEdge(oo,io),eo.setEdge(no.v,no.w,{}),initLowLimValues(eo),initCutValues(eo,to),updateRanks(eo,to)}function updateRanks(eo,to){var ro=_$o.find(eo.nodes(),function(oo){return!to.node(oo).parent}),no=preorder(eo,ro);no=no.slice(1),_$o.forEach(no,function(oo){var io=eo.node(oo).parent,so=to.edge(oo,io),ao=!1;so||(so=to.edge(io,oo),ao=!0),to.node(oo).rank=to.node(io).rank+(ao?so.minlen:-so.minlen)})}function isTreeEdge(eo,to,ro){return eo.hasEdge(to,ro)}function isDescendant(eo,to,ro){return ro.low<=to.lim&&to.lim<=ro.lim}var rankUtil=util$8,longestPath=rankUtil.longestPath,feasibleTree=feasibleTree_1,networkSimplex=networkSimplex_1,rank_1=rank$1;function rank$1(eo){switch(eo.graph().ranker){case"network-simplex":networkSimplexRanker(eo);break;case"tight-tree":tightTreeRanker(eo);break;case"longest-path":longestPathRanker(eo);break;default:networkSimplexRanker(eo)}}var longestPathRanker=longestPath;function tightTreeRanker(eo){longestPath(eo),feasibleTree(eo)}function networkSimplexRanker(eo){networkSimplex(eo)}var _$n=lodash_1,parentDummyChains_1=parentDummyChains$1;function parentDummyChains$1(eo){var to=postorder(eo);_$n.forEach(eo.graph().dummyChains,function(ro){for(var no=eo.node(ro),oo=no.edgeObj,io=findPath(eo,to,oo.v,oo.w),so=io.path,ao=io.lca,lo=0,co=so[lo],uo=!0;ro!==oo.w;){if(no=eo.node(ro),uo){for(;(co=so[lo])!==ao&&eo.node(co).maxRankso||ao>to[lo].lim));for(co=lo,lo=no;(lo=eo.parent(lo))!==co;)io.push(lo);return{path:oo.concat(io.reverse()),lca:co}}function postorder(eo){var to={},ro=0;function no(oo){var io=ro;_$n.forEach(eo.children(oo),no),to[oo]={low:io,lim:ro++}}return _$n.forEach(eo.children(),no),to}var _$m=lodash_1,util$7=util$a,nestingGraph$1={run,cleanup:cleanup$1};function run(eo){var to=util$7.addDummyNode(eo,"root",{},"_root"),ro=treeDepths(eo),no=_$m.max(_$m.values(ro))-1,oo=2*no+1;eo.graph().nestingRoot=to,_$m.forEach(eo.edges(),function(so){eo.edge(so).minlen*=oo});var io=sumWeights(eo)+1;_$m.forEach(eo.children(),function(so){dfs(eo,to,oo,io,no,ro,so)}),eo.graph().nodeRankFactor=oo}function dfs(eo,to,ro,no,oo,io,so){var ao=eo.children(so);if(!ao.length){so!==to&&eo.setEdge(to,so,{weight:0,minlen:ro});return}var lo=util$7.addBorderNode(eo,"_bt"),co=util$7.addBorderNode(eo,"_bb"),uo=eo.node(so);eo.setParent(lo,so),uo.borderTop=lo,eo.setParent(co,so),uo.borderBottom=co,_$m.forEach(ao,function(fo){dfs(eo,to,ro,no,oo,io,fo);var ho=eo.node(fo),po=ho.borderTop?ho.borderTop:fo,go=ho.borderBottom?ho.borderBottom:fo,vo=ho.borderTop?no:2*no,yo=po!==go?1:oo-io[so]+1;eo.setEdge(lo,po,{weight:vo,minlen:yo,nestingEdge:!0}),eo.setEdge(go,co,{weight:vo,minlen:yo,nestingEdge:!0})}),eo.parent(so)||eo.setEdge(to,lo,{weight:0,minlen:oo+io[so]})}function treeDepths(eo){var to={};function ro(no,oo){var io=eo.children(no);io&&io.length&&_$m.forEach(io,function(so){ro(so,oo+1)}),to[no]=oo}return _$m.forEach(eo.children(),function(no){ro(no,1)}),to}function sumWeights(eo){return _$m.reduce(eo.edges(),function(to,ro){return to+eo.edge(ro).weight},0)}function cleanup$1(eo){var to=eo.graph();eo.removeNode(to.nestingRoot),delete to.nestingRoot,_$m.forEach(eo.edges(),function(ro){var no=eo.edge(ro);no.nestingEdge&&eo.removeEdge(ro)})}var _$l=lodash_1,util$6=util$a,addBorderSegments_1=addBorderSegments$1;function addBorderSegments$1(eo){function to(ro){var no=eo.children(ro),oo=eo.node(ro);if(no.length&&_$l.forEach(no,to),_$l.has(oo,"minRank")){oo.borderLeft=[],oo.borderRight=[];for(var io=oo.minRank,so=oo.maxRank+1;io0;)uo%2&&(fo+=ao[uo+1]),uo=uo-1>>1,ao[uo]+=co.weight;lo+=co.weight*fo})),lo}var _$h=lodash_1,barycenter_1=barycenter$1;function barycenter$1(eo,to){return _$h.map(to,function(ro){var no=eo.inEdges(ro);if(no.length){var oo=_$h.reduce(no,function(io,so){var ao=eo.edge(so),lo=eo.node(so.v);return{sum:io.sum+ao.weight*lo.order,weight:io.weight+ao.weight}},{sum:0,weight:0});return{v:ro,barycenter:oo.sum/oo.weight,weight:oo.weight}}else return{v:ro}})}var _$g=lodash_1,resolveConflicts_1=resolveConflicts$1;function resolveConflicts$1(eo,to){var ro={};_$g.forEach(eo,function(oo,io){var so=ro[oo.v]={indegree:0,in:[],out:[],vs:[oo.v],i:io};_$g.isUndefined(oo.barycenter)||(so.barycenter=oo.barycenter,so.weight=oo.weight)}),_$g.forEach(to.edges(),function(oo){var io=ro[oo.v],so=ro[oo.w];!_$g.isUndefined(io)&&!_$g.isUndefined(so)&&(so.indegree++,io.out.push(ro[oo.w]))});var no=_$g.filter(ro,function(oo){return!oo.indegree});return doResolveConflicts(no)}function doResolveConflicts(eo){var to=[];function ro(io){return function(so){so.merged||(_$g.isUndefined(so.barycenter)||_$g.isUndefined(io.barycenter)||so.barycenter>=io.barycenter)&&mergeEntries(io,so)}}function no(io){return function(so){so.in.push(io),--so.indegree===0&&eo.push(so)}}for(;eo.length;){var oo=eo.pop();to.push(oo),_$g.forEach(oo.in.reverse(),ro(oo)),_$g.forEach(oo.out,no(oo))}return _$g.map(_$g.filter(to,function(io){return!io.merged}),function(io){return _$g.pick(io,["vs","i","barycenter","weight"])})}function mergeEntries(eo,to){var ro=0,no=0;eo.weight&&(ro+=eo.barycenter*eo.weight,no+=eo.weight),to.weight&&(ro+=to.barycenter*to.weight,no+=to.weight),eo.vs=to.vs.concat(eo.vs),eo.barycenter=ro/no,eo.weight=no,eo.i=Math.min(to.i,eo.i),to.merged=!0}var _$f=lodash_1,util$5=util$a,sort_1=sort$1;function sort$1(eo,to){var ro=util$5.partition(eo,function(uo){return _$f.has(uo,"barycenter")}),no=ro.lhs,oo=_$f.sortBy(ro.rhs,function(uo){return-uo.i}),io=[],so=0,ao=0,lo=0;no.sort(compareWithBias(!!to)),lo=consumeUnsortable(io,oo,lo),_$f.forEach(no,function(uo){lo+=uo.vs.length,io.push(uo.vs),so+=uo.barycenter*uo.weight,ao+=uo.weight,lo=consumeUnsortable(io,oo,lo)});var co={vs:_$f.flatten(io,!0)};return ao&&(co.barycenter=so/ao,co.weight=ao),co}function consumeUnsortable(eo,to,ro){for(var no;to.length&&(no=_$f.last(to)).i<=ro;)to.pop(),eo.push(no.vs),ro++;return ro}function compareWithBias(eo){return function(to,ro){return to.barycenterro.barycenter?1:eo?ro.i-to.i:to.i-ro.i}}var _$e=lodash_1,barycenter=barycenter_1,resolveConflicts=resolveConflicts_1,sort=sort_1,sortSubgraph_1=sortSubgraph$1;function sortSubgraph$1(eo,to,ro,no){var oo=eo.children(to),io=eo.node(to),so=io?io.borderLeft:void 0,ao=io?io.borderRight:void 0,lo={};so&&(oo=_$e.filter(oo,function(go){return go!==so&&go!==ao}));var co=barycenter(eo,oo);_$e.forEach(co,function(go){if(eo.children(go.v).length){var vo=sortSubgraph$1(eo,go.v,ro,no);lo[go.v]=vo,_$e.has(vo,"barycenter")&&mergeBarycenters(go,vo)}});var uo=resolveConflicts(co,ro);expandSubgraphs(uo,lo);var fo=sort(uo,no);if(so&&(fo.vs=_$e.flatten([so,fo.vs,ao],!0),eo.predecessors(so).length)){var ho=eo.node(eo.predecessors(so)[0]),po=eo.node(eo.predecessors(ao)[0]);_$e.has(fo,"barycenter")||(fo.barycenter=0,fo.weight=0),fo.barycenter=(fo.barycenter*fo.weight+ho.order+po.order)/(fo.weight+2),fo.weight+=2}return fo}function expandSubgraphs(eo,to){_$e.forEach(eo,function(ro){ro.vs=_$e.flatten(ro.vs.map(function(no){return to[no]?to[no].vs:no}),!0)})}function mergeBarycenters(eo,to){_$e.isUndefined(eo.barycenter)?(eo.barycenter=to.barycenter,eo.weight=to.weight):(eo.barycenter=(eo.barycenter*eo.weight+to.barycenter*to.weight)/(eo.weight+to.weight),eo.weight+=to.weight)}var _$d=lodash_1,Graph$4=graphlib_1.Graph,buildLayerGraph_1=buildLayerGraph$1;function buildLayerGraph$1(eo,to,ro){var no=createRootNode(eo),oo=new Graph$4({compound:!0}).setGraph({root:no}).setDefaultNodeLabel(function(io){return eo.node(io)});return _$d.forEach(eo.nodes(),function(io){var so=eo.node(io),ao=eo.parent(io);(so.rank===to||so.minRank<=to&&to<=so.maxRank)&&(oo.setNode(io),oo.setParent(io,ao||no),_$d.forEach(eo[ro](io),function(lo){var co=lo.v===io?lo.w:lo.v,uo=oo.edge(co,io),fo=_$d.isUndefined(uo)?0:uo.weight;oo.setEdge(co,io,{weight:eo.edge(lo).weight+fo})}),_$d.has(so,"minRank")&&oo.setNode(io,{borderLeft:so.borderLeft[to],borderRight:so.borderRight[to]}))}),oo}function createRootNode(eo){for(var to;eo.hasNode(to=_$d.uniqueId("_root")););return to}var _$c=lodash_1,addSubgraphConstraints_1=addSubgraphConstraints$1;function addSubgraphConstraints$1(eo,to,ro){var no={},oo;_$c.forEach(ro,function(io){for(var so=eo.parent(io),ao,lo;so;){if(ao=eo.parent(so),ao?(lo=no[ao],no[ao]=so):(lo=oo,oo=so),lo&&lo!==so){to.setEdge(lo,so);return}so=ao}})}var _$b=lodash_1,initOrder=initOrder_1,crossCount=crossCount_1,sortSubgraph=sortSubgraph_1,buildLayerGraph=buildLayerGraph_1,addSubgraphConstraints=addSubgraphConstraints_1,Graph$3=graphlib_1.Graph,util$4=util$a,order_1=order$1;function order$1(eo){var to=util$4.maxRank(eo),ro=buildLayerGraphs(eo,_$b.range(1,to+1),"inEdges"),no=buildLayerGraphs(eo,_$b.range(to-1,-1,-1),"outEdges"),oo=initOrder(eo);assignOrder(eo,oo);for(var io=Number.POSITIVE_INFINITY,so,ao=0,lo=0;lo<4;++ao,++lo){sweepLayerGraphs(ao%2?ro:no,ao%4>=2),oo=util$4.buildLayerMatrix(eo);var co=crossCount(eo,oo);coco)&&addConflict(ro,ho,uo)})})}function oo(io,so){var ao=-1,lo,co=0;return _$a.forEach(so,function(uo,fo){if(eo.node(uo).dummy==="border"){var ho=eo.predecessors(uo);ho.length&&(lo=eo.node(ho[0]).order,no(so,co,fo,ao,lo),co=fo,ao=lo)}no(so,co,so.length,lo,io.length)}),so}return _$a.reduce(to,oo),ro}function findOtherInnerSegmentNode(eo,to){if(eo.node(to).dummy)return _$a.find(eo.predecessors(to),function(ro){return eo.node(ro).dummy})}function addConflict(eo,to,ro){if(to>ro){var no=to;to=ro,ro=no}var oo=eo[to];oo||(eo[to]=oo={}),oo[ro]=!0}function hasConflict(eo,to,ro){if(to>ro){var no=to;to=ro,ro=no}return _$a.has(eo[to],ro)}function verticalAlignment(eo,to,ro,no){var oo={},io={},so={};return _$a.forEach(to,function(ao){_$a.forEach(ao,function(lo,co){oo[lo]=lo,io[lo]=lo,so[lo]=co})}),_$a.forEach(to,function(ao){var lo=-1;_$a.forEach(ao,function(co){var uo=no(co);if(uo.length){uo=_$a.sortBy(uo,function(vo){return so[vo]});for(var fo=(uo.length-1)/2,ho=Math.floor(fo),po=Math.ceil(fo);ho<=po;++ho){var go=uo[ho];io[co]===co&&lo=0;ao--)(so=eo[ao])&&(io=(oo<3?so(io):oo>3?so(to,ro,io):so(to,ro))||io);return oo>3&&io&&Object.defineProperty(to,ro,io),io}function __spreadArray$1(eo,to,ro){if(ro||arguments.length===2)for(var no=0,oo=to.length,io;no"u"?InjectionMode$1.none:InjectionMode$1.insertNode,defaultPrefix:"css",namespace:void 0,cspSettings:void 0},to),this._classNameToArgs=(no=ro==null?void 0:ro.classNameToArgs)!==null&&no!==void 0?no:this._classNameToArgs,this._counter=(oo=ro==null?void 0:ro.counter)!==null&&oo!==void 0?oo:this._counter,this._keyToClassName=(so=(io=this._config.classNameCache)!==null&&io!==void 0?io:ro==null?void 0:ro.keyToClassName)!==null&&so!==void 0?so:this._keyToClassName,this._preservedRules=(ao=ro==null?void 0:ro.preservedRules)!==null&&ao!==void 0?ao:this._preservedRules,this._rules=(lo=ro==null?void 0:ro.rules)!==null&&lo!==void 0?lo:this._rules}return eo.getInstance=function(){if(_stylesheet$1=_global$2[STYLESHEET_SETTING$1],!_stylesheet$1||_stylesheet$1._lastStyleElement&&_stylesheet$1._lastStyleElement.ownerDocument!==document){var to=(_global$2==null?void 0:_global$2.FabricConfig)||{},ro=new eo(to.mergeStyles,to.serializedStylesheet);_stylesheet$1=ro,_global$2[STYLESHEET_SETTING$1]=ro}return _stylesheet$1},eo.prototype.serialize=function(){return JSON.stringify({classNameToArgs:this._classNameToArgs,counter:this._counter,keyToClassName:this._keyToClassName,preservedRules:this._preservedRules,rules:this._rules})},eo.prototype.setConfig=function(to){this._config=__assign$4(__assign$4({},this._config),to)},eo.prototype.onReset=function(to){var ro=this;return this._onResetCallbacks.push(to),function(){ro._onResetCallbacks=ro._onResetCallbacks.filter(function(no){return no!==to})}},eo.prototype.onInsertRule=function(to){var ro=this;return this._onInsertRuleCallbacks.push(to),function(){ro._onInsertRuleCallbacks=ro._onInsertRuleCallbacks.filter(function(no){return no!==to})}},eo.prototype.getClassName=function(to){var ro=this._config.namespace,no=to||this._config.defaultPrefix;return"".concat(ro?ro+"-":"").concat(no,"-").concat(this._counter++)},eo.prototype.cacheClassName=function(to,ro,no,oo){this._keyToClassName[ro]=to,this._classNameToArgs[to]={args:no,rules:oo}},eo.prototype.classNameFromKey=function(to){return this._keyToClassName[to]},eo.prototype.getClassNameCache=function(){return this._keyToClassName},eo.prototype.argsFromClassName=function(to){var ro=this._classNameToArgs[to];return ro&&ro.args},eo.prototype.insertedRulesFromClassName=function(to){var ro=this._classNameToArgs[to];return ro&&ro.rules},eo.prototype.insertRule=function(to,ro){var no=this._config.injectionMode,oo=no!==InjectionMode$1.none?this._getStyleElement():void 0;if(ro&&this._preservedRules.push(to),oo)switch(no){case InjectionMode$1.insertNode:var io=oo.sheet;try{io.insertRule(to,io.cssRules.length)}catch{}break;case InjectionMode$1.appendChild:oo.appendChild(document.createTextNode(to));break}else this._rules.push(to);this._config.onInsertRule&&this._config.onInsertRule(to),this._onInsertRuleCallbacks.forEach(function(so){return so()})},eo.prototype.getRules=function(to){return(to?this._preservedRules.join(""):"")+this._rules.join("")},eo.prototype.reset=function(){this._rules=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._onResetCallbacks.forEach(function(to){return to()})},eo.prototype.resetKeys=function(){this._keyToClassName={}},eo.prototype._getStyleElement=function(){var to=this;return!this._styleElement&&typeof document<"u"&&(this._styleElement=this._createStyleElement(),REUSE_STYLE_NODE$1||window.requestAnimationFrame(function(){to._styleElement=void 0})),this._styleElement},eo.prototype._createStyleElement=function(){var to=document.head,ro=document.createElement("style"),no=null;ro.setAttribute("data-merge-styles","true");var oo=this._config.cspSettings;if(oo&&oo.nonce&&ro.setAttribute("nonce",oo.nonce),this._lastStyleElement)no=this._lastStyleElement.nextElementSibling;else{var io=this._findPlaceholderStyleTag();io?no=io.nextElementSibling:no=to.childNodes[0]}return to.insertBefore(ro,to.contains(no)?no:null),this._lastStyleElement=ro,ro},eo.prototype._findPlaceholderStyleTag=function(){var to=document.head;return to?to.querySelector("style[data-merge-styles]"):null},eo}();function extractStyleParts$1(){for(var eo=[],to=0;to=0)io(co.split(" "));else{var uo=oo.argsFromClassName(co);uo?io(uo):ro.indexOf(co)===-1&&ro.push(co)}else Array.isArray(co)?io(co):typeof co=="object"&&no.push(co)}}return io(eo),{classes:ro,objects:no}}function setRTL$1(eo){_rtl$1!==eo&&(_rtl$1=eo)}function getRTL$2(){return _rtl$1===void 0&&(_rtl$1=typeof document<"u"&&!!document.documentElement&&document.documentElement.getAttribute("dir")==="rtl"),_rtl$1}var _rtl$1;_rtl$1=getRTL$2();function getStyleOptions$1(){return{rtl:getRTL$2()}}var rules$1={};function kebabRules$1(eo,to){var ro=eo[to];ro.charAt(0)!=="-"&&(eo[to]=rules$1[ro]=rules$1[ro]||ro.replace(/([A-Z])/g,"-$1").toLowerCase())}var _vendorSettings$1;function getVendorSettings$1(){var eo;if(!_vendorSettings$1){var to=typeof document<"u"?document:void 0,ro=typeof navigator<"u"?navigator:void 0,no=(eo=ro==null?void 0:ro.userAgent)===null||eo===void 0?void 0:eo.toLowerCase();to?_vendorSettings$1={isWebkit:!!(to&&"WebkitAppearance"in to.documentElement.style),isMoz:!!(no&&no.indexOf("firefox")>-1),isOpera:!!(no&&no.indexOf("opera")>-1),isMs:!!(ro&&(/rv:11.0/i.test(ro.userAgent)||/Edge\/\d./i.test(navigator.userAgent)))}:_vendorSettings$1={isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return _vendorSettings$1}var autoPrefixNames$1={"user-select":1};function prefixRules$1(eo,to){var ro=getVendorSettings$1(),no=eo[to];if(autoPrefixNames$1[no]){var oo=eo[to+1];autoPrefixNames$1[no]&&(ro.isWebkit&&eo.push("-webkit-"+no,oo),ro.isMoz&&eo.push("-moz-"+no,oo),ro.isMs&&eo.push("-ms-"+no,oo),ro.isOpera&&eo.push("-o-"+no,oo))}}var NON_PIXEL_NUMBER_PROPS$1=["column-count","font-weight","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];function provideUnits$1(eo,to){var ro=eo[to],no=eo[to+1];if(typeof no=="number"){var oo=NON_PIXEL_NUMBER_PROPS$1.indexOf(ro)>-1,io=ro.indexOf("--")>-1,so=oo||io?"":"px";eo[to+1]="".concat(no).concat(so)}}var _a$a,LEFT$1="left",RIGHT$1="right",NO_FLIP$1="@noflip",NAME_REPLACEMENTS$1=(_a$a={},_a$a[LEFT$1]=RIGHT$1,_a$a[RIGHT$1]=LEFT$1,_a$a),VALUE_REPLACEMENTS$1={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"};function rtlifyRules$1(eo,to,ro){if(eo.rtl){var no=to[ro];if(!no)return;var oo=to[ro+1];if(typeof oo=="string"&&oo.indexOf(NO_FLIP$1)>=0)to[ro+1]=oo.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(no.indexOf(LEFT$1)>=0)to[ro]=no.replace(LEFT$1,RIGHT$1);else if(no.indexOf(RIGHT$1)>=0)to[ro]=no.replace(RIGHT$1,LEFT$1);else if(String(oo).indexOf(LEFT$1)>=0)to[ro+1]=oo.replace(LEFT$1,RIGHT$1);else if(String(oo).indexOf(RIGHT$1)>=0)to[ro+1]=oo.replace(RIGHT$1,LEFT$1);else if(NAME_REPLACEMENTS$1[no])to[ro]=NAME_REPLACEMENTS$1[no];else if(VALUE_REPLACEMENTS$1[oo])to[ro+1]=VALUE_REPLACEMENTS$1[oo];else switch(no){case"margin":case"padding":to[ro+1]=flipQuad$1(oo);break;case"box-shadow":to[ro+1]=negateNum$1(oo,0);break}}}function negateNum$1(eo,to){var ro=eo.split(" "),no=parseInt(ro[to],10);return ro[0]=ro[0].replace(String(no),String(no*-1)),ro.join(" ")}function flipQuad$1(eo){if(typeof eo=="string"){var to=eo.split(" ");if(to.length===4)return"".concat(to[0]," ").concat(to[3]," ").concat(to[2]," ").concat(to[1])}return eo}function tokenizeWithParentheses$1(eo){for(var to=[],ro=0,no=0,oo=0;ooro&&to.push(eo.substring(ro,oo)),ro=oo+1);break}return ro-1&&to.push([no.index,no.index+no[0].length,no[1].split(",").map(function(oo){return":global(".concat(oo.trim(),")")}).join(", ")]);return to.reverse().reduce(function(oo,io){var so=io[0],ao=io[1],lo=io[2],co=oo.slice(0,so),uo=oo.slice(ao);return co+lo+uo},eo)}function expandSelector$1(eo,to){return eo.indexOf(":global(")>=0?eo.replace(globalSelectorRegExp$1,"$1"):eo.indexOf(":")===0?to+eo:eo.indexOf("&")<0?to+" "+eo:eo}function extractSelector$1(eo,to,ro,no){to===void 0&&(to={__order:[]}),ro.indexOf("@")===0?(ro=ro+"{"+eo,extractRules$1([no],to,ro)):ro.indexOf(",")>-1?expandCommaSeparatedGlobals$1(ro).split(",").map(function(oo){return oo.trim()}).forEach(function(oo){return extractRules$1([no],to,expandSelector$1(oo,eo))}):extractRules$1([no],to,expandSelector$1(ro,eo))}function extractRules$1(eo,to,ro){to===void 0&&(to={__order:[]}),ro===void 0&&(ro="&");var no=Stylesheet$1.getInstance(),oo=to[ro];oo||(oo={},to[ro]=oo,to.__order.push(ro));for(var io=0,so=eo;io0){ro.subComponentStyles={};var ho=ro.subComponentStyles,po=function(go){if(no.hasOwnProperty(go)){var vo=no[go];ho[go]=function(yo){return concatStyleSets.apply(void 0,vo.map(function(xo){return typeof xo=="function"?xo(yo):xo}))}}};for(var co in no)po(co)}return ro}function mergeStyleSets(){for(var eo=[],to=0;to"u")){var to=eo;return to&&to.ownerDocument&&to.ownerDocument.defaultView?to.ownerDocument.defaultView:_window}}var Async=function(){function eo(to,ro){this._timeoutIds=null,this._immediateIds=null,this._intervalIds=null,this._animationFrameIds=null,this._isDisposed=!1,this._parent=to||null,this._onErrorHandler=ro,this._noop=function(){}}return eo.prototype.dispose=function(){var to;if(this._isDisposed=!0,this._parent=null,this._timeoutIds){for(to in this._timeoutIds)this._timeoutIds.hasOwnProperty(to)&&this.clearTimeout(parseInt(to,10));this._timeoutIds=null}if(this._immediateIds){for(to in this._immediateIds)this._immediateIds.hasOwnProperty(to)&&this.clearImmediate(parseInt(to,10));this._immediateIds=null}if(this._intervalIds){for(to in this._intervalIds)this._intervalIds.hasOwnProperty(to)&&this.clearInterval(parseInt(to,10));this._intervalIds=null}if(this._animationFrameIds){for(to in this._animationFrameIds)this._animationFrameIds.hasOwnProperty(to)&&this.cancelAnimationFrame(parseInt(to,10));this._animationFrameIds=null}},eo.prototype.setTimeout=function(to,ro){var no=this,oo=0;return this._isDisposed||(this._timeoutIds||(this._timeoutIds={}),oo=setTimeout(function(){try{no._timeoutIds&&delete no._timeoutIds[oo],to.apply(no._parent)}catch(io){no._logError(io)}},ro),this._timeoutIds[oo]=!0),oo},eo.prototype.clearTimeout=function(to){this._timeoutIds&&this._timeoutIds[to]&&(clearTimeout(to),delete this._timeoutIds[to])},eo.prototype.setImmediate=function(to,ro){var no=this,oo=0,io=getWindow(ro);if(!this._isDisposed){this._immediateIds||(this._immediateIds={});var so=function(){try{no._immediateIds&&delete no._immediateIds[oo],to.apply(no._parent)}catch(ao){no._logError(ao)}};oo=io.setTimeout(so,0),this._immediateIds[oo]=!0}return oo},eo.prototype.clearImmediate=function(to,ro){var no=getWindow(ro);this._immediateIds&&this._immediateIds[to]&&(no.clearTimeout(to),delete this._immediateIds[to])},eo.prototype.setInterval=function(to,ro){var no=this,oo=0;return this._isDisposed||(this._intervalIds||(this._intervalIds={}),oo=setInterval(function(){try{to.apply(no._parent)}catch(io){no._logError(io)}},ro),this._intervalIds[oo]=!0),oo},eo.prototype.clearInterval=function(to){this._intervalIds&&this._intervalIds[to]&&(clearInterval(to),delete this._intervalIds[to])},eo.prototype.throttle=function(to,ro,no){var oo=this;if(this._isDisposed)return this._noop;var io=ro||0,so=!0,ao=!0,lo=0,co,uo,fo=null;no&&typeof no.leading=="boolean"&&(so=no.leading),no&&typeof no.trailing=="boolean"&&(ao=no.trailing);var ho=function(go){var vo=Date.now(),yo=vo-lo,xo=so?io-yo:io;return yo>=io&&(!go||so)?(lo=vo,fo&&(oo.clearTimeout(fo),fo=null),co=to.apply(oo._parent,uo)):fo===null&&ao&&(fo=oo.setTimeout(ho,xo)),co},po=function(){for(var go=[],vo=0;vo=so&&(Oo=!0),uo=Co);var wo=Co-uo,Ro=so-wo,Do=Co-fo,$o=!1;return co!==null&&(Do>=co&&go?$o=!0:Ro=Math.min(Ro,co-Do)),wo>=so||$o||Oo?yo(Co):(go===null||!Ao)&&lo&&(go=oo.setTimeout(xo,Ro)),ho},_o=function(){return!!go},Eo=function(){_o()&&vo(Date.now())},So=function(){return _o()&&yo(Date.now()),ho},ko=function(){for(var Ao=[],Co=0;Co-1)for(var so=ro.split(/[ ,]+/),ao=0;ao"u")){var to=eo;return to&&to.ownerDocument?to.ownerDocument:document}}var _scrollbarWidth,_bodyScrollDisabledCount=0,DisabledScrollClassName=mergeStyles$1({overflow:"hidden !important"}),DATA_IS_SCROLLABLE_ATTRIBUTE="data-is-scrollable",allowScrollOnElement=function(eo,to){if(eo){var ro=0,no=null,oo=function(so){so.targetTouches.length===1&&(ro=so.targetTouches[0].clientY)},io=function(so){if(so.targetTouches.length===1&&(so.stopPropagation(),!!no)){var ao=so.targetTouches[0].clientY-ro,lo=findScrollableParent(so.target);lo&&(no=lo),no.scrollTop===0&&ao>0&&so.preventDefault(),no.scrollHeight-Math.ceil(no.scrollTop)<=no.clientHeight&&ao<0&&so.preventDefault()}};to.on(eo,"touchstart",oo,{passive:!1}),to.on(eo,"touchmove",io,{passive:!1}),no=eo}},allowOverscrollOnElement=function(eo,to){if(eo){var ro=function(no){no.stopPropagation()};to.on(eo,"touchmove",ro,{passive:!1})}},_disableIosBodyScroll=function(eo){eo.preventDefault()};function disableBodyScroll(){var eo=getDocument();eo&&eo.body&&!_bodyScrollDisabledCount&&(eo.body.classList.add(DisabledScrollClassName),eo.body.addEventListener("touchmove",_disableIosBodyScroll,{passive:!1,capture:!1})),_bodyScrollDisabledCount++}function enableBodyScroll(){if(_bodyScrollDisabledCount>0){var eo=getDocument();eo&&eo.body&&_bodyScrollDisabledCount===1&&(eo.body.classList.remove(DisabledScrollClassName),eo.body.removeEventListener("touchmove",_disableIosBodyScroll)),_bodyScrollDisabledCount--}}function getScrollbarWidth(){if(_scrollbarWidth===void 0){var eo=document.createElement("div");eo.style.setProperty("width","100px"),eo.style.setProperty("height","100px"),eo.style.setProperty("overflow","scroll"),eo.style.setProperty("position","absolute"),eo.style.setProperty("top","-9999px"),document.body.appendChild(eo),_scrollbarWidth=eo.offsetWidth-eo.clientWidth,document.body.removeChild(eo)}return _scrollbarWidth}function findScrollableParent(eo){for(var to=eo,ro=getDocument(eo);to&&to!==ro.body;){if(to.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE)==="true")return to;to=to.parentElement}for(to=eo;to&&to!==ro.body;){if(to.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE)!=="false"){var no=getComputedStyle(to),oo=no?no.getPropertyValue("overflow-y"):"";if(oo&&(oo==="scroll"||oo==="auto"))return to}to=to.parentElement}return(!to||to===ro.body)&&(to=getWindow(eo)),to}var _warningCallback=void 0;function warn(eo){console&&console.warn&&console.warn(eo)}var GLOBAL_SETTINGS_PROP_NAME="__globalSettings__",CALLBACK_STATE_PROP_NAME="__callbacks__",_counter=0,GlobalSettings=function(){function eo(){}return eo.getValue=function(to,ro){var no=_getGlobalSettings();return no[to]===void 0&&(no[to]=typeof ro=="function"?ro():ro),no[to]},eo.setValue=function(to,ro){var no=_getGlobalSettings(),oo=no[CALLBACK_STATE_PROP_NAME],io=no[to];if(ro!==io){no[to]=ro;var so={oldValue:io,value:ro,key:to};for(var ao in oo)oo.hasOwnProperty(ao)&&oo[ao](so)}return ro},eo.addChangeListener=function(to){var ro=to.__id__,no=_getCallbacks();ro||(ro=to.__id__=String(_counter++)),no[ro]=to},eo.removeChangeListener=function(to){var ro=_getCallbacks();delete ro[to.__id__]},eo}();function _getGlobalSettings(){var eo,to=getWindow(),ro=to||{};return ro[GLOBAL_SETTINGS_PROP_NAME]||(ro[GLOBAL_SETTINGS_PROP_NAME]=(eo={},eo[CALLBACK_STATE_PROP_NAME]={},eo)),ro[GLOBAL_SETTINGS_PROP_NAME]}function _getCallbacks(){var eo=_getGlobalSettings();return eo[CALLBACK_STATE_PROP_NAME]}var KeyCodes$1={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pauseBreak:19,capslock:20,escape:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,del:46,zero:48,one:49,two:50,three:51,four:52,five:53,six:54,seven:55,eight:56,nine:57,colon:58,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftWindow:91,rightWindow:92,select:93,zero_numpad:96,one_numpad:97,two_numpad:98,three_numpad:99,four_numpad:100,five_numpad:101,six_numpad:102,seven_numpad:103,eight_numpad:104,nine_numpad:105,multiply:106,add:107,subtract:109,decimalPoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrollLock:145,semicolon:186,equalSign:187,comma:188,dash:189,period:190,forwardSlash:191,graveAccent:192,openBracket:219,backSlash:220,closeBracket:221,singleQuote:222},Rectangle=function(){function eo(to,ro,no,oo){to===void 0&&(to=0),ro===void 0&&(ro=0),no===void 0&&(no=0),oo===void 0&&(oo=0),this.top=no,this.bottom=oo,this.left=to,this.right=ro}return Object.defineProperty(eo.prototype,"width",{get:function(){return this.right-this.left},enumerable:!1,configurable:!0}),Object.defineProperty(eo.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!1,configurable:!0}),eo.prototype.equals=function(to){return parseFloat(this.top.toFixed(4))===parseFloat(to.top.toFixed(4))&&parseFloat(this.bottom.toFixed(4))===parseFloat(to.bottom.toFixed(4))&&parseFloat(this.left.toFixed(4))===parseFloat(to.left.toFixed(4))&&parseFloat(this.right.toFixed(4))===parseFloat(to.right.toFixed(4))},eo}();function appendFunction(eo){for(var to=[],ro=1;ro-1&&oo._virtual.children.splice(io,1)}ro._virtual.parent=no||void 0,no&&(no._virtual||(no._virtual={children:[]}),no._virtual.children.push(ro))}var IS_FOCUSABLE_ATTRIBUTE$1="data-is-focusable",IS_VISIBLE_ATTRIBUTE="data-is-visible",FOCUSZONE_ID_ATTRIBUTE$1="data-focuszone-id",FOCUSZONE_SUB_ATTRIBUTE="data-is-sub-focuszone";function getFirstFocusable(eo,to,ro){return getNextElement(eo,to,!0,!1,!1,ro)}function getLastFocusable(eo,to,ro){return getPreviousElement(eo,to,!0,!1,!0,ro)}function getFirstTabbable(eo,to,ro,no){return no===void 0&&(no=!0),getNextElement(eo,to,no,!1,!1,ro,!1,!0)}function getLastTabbable(eo,to,ro,no){return no===void 0&&(no=!0),getPreviousElement(eo,to,no,!1,!0,ro,!1,!0)}function focusFirstChild(eo,to){var ro=getNextElement(eo,eo,!0,!1,!1,!0,void 0,void 0,to);return ro?(focusAsync(ro),!0):!1}function getPreviousElement(eo,to,ro,no,oo,io,so,ao){if(!to||!so&&to===eo)return null;var lo=isElementVisible(to);if(oo&&lo&&(io||!(isElementFocusZone(to)||isElementFocusSubZone(to)))){var co=getPreviousElement(eo,to.lastElementChild,!0,!0,!0,io,so,ao);if(co){if(ao&&isElementTabbable(co,!0)||!ao)return co;var uo=getPreviousElement(eo,co.previousElementSibling,!0,!0,!0,io,so,ao);if(uo)return uo;for(var fo=co.parentElement;fo&&fo!==to;){var ho=getPreviousElement(eo,fo.previousElementSibling,!0,!0,!0,io,so,ao);if(ho)return ho;fo=fo.parentElement}}}if(ro&&lo&&isElementTabbable(to,ao))return to;var po=getPreviousElement(eo,to.previousElementSibling,!0,!0,!0,io,so,ao);return po||(no?null:getPreviousElement(eo,to.parentElement,!0,!1,!1,io,so,ao))}function getNextElement(eo,to,ro,no,oo,io,so,ao,lo){if(!to||to===eo&&oo&&!so)return null;var co=lo?isElementVisibleAndNotHidden:isElementVisible,uo=co(to);if(ro&&uo&&isElementTabbable(to,ao))return to;if(!oo&&uo&&(io||!(isElementFocusZone(to)||isElementFocusSubZone(to)))){var fo=getNextElement(eo,to.firstElementChild,!0,!0,!1,io,so,ao,lo);if(fo)return fo}if(to===eo)return null;var ho=getNextElement(eo,to.nextElementSibling,!0,!0,!1,io,so,ao,lo);return ho||(no?null:getNextElement(eo,to.parentElement,!1,!1,!0,io,so,ao,lo))}function isElementVisible(eo){if(!eo||!eo.getAttribute)return!1;var to=eo.getAttribute(IS_VISIBLE_ATTRIBUTE);return to!=null?to==="true":eo.offsetHeight!==0||eo.offsetParent!==null||eo.isVisible===!0}function isElementVisibleAndNotHidden(eo){return!!eo&&isElementVisible(eo)&&!eo.hidden&&window.getComputedStyle(eo).visibility!=="hidden"}function isElementTabbable(eo,to){if(!eo||eo.disabled)return!1;var ro=0,no=null;eo&&eo.getAttribute&&(no=eo.getAttribute("tabIndex"),no&&(ro=parseInt(no,10)));var oo=eo.getAttribute?eo.getAttribute(IS_FOCUSABLE_ATTRIBUTE$1):null,io=no!==null&&ro>=0,so=!!eo&&oo!=="false"&&(eo.tagName==="A"||eo.tagName==="BUTTON"||eo.tagName==="INPUT"||eo.tagName==="TEXTAREA"||eo.tagName==="SELECT"||oo==="true"||io);return to?ro!==-1&&so:so}function isElementFocusZone(eo){return!!(eo&&eo.getAttribute&&eo.getAttribute(FOCUSZONE_ID_ATTRIBUTE$1))}function isElementFocusSubZone(eo){return!!(eo&&eo.getAttribute&&eo.getAttribute(FOCUSZONE_SUB_ATTRIBUTE)==="true")}function doesElementContainFocus(eo){var to=getDocument(eo),ro=to&&to.activeElement;return!!(ro&&elementContains(eo,ro))}function shouldWrapFocus(eo,to){return elementContainsAttribute(eo,to)!=="true"}var animationId=void 0;function focusAsync(eo){if(eo){var to=getWindow(eo);to&&(animationId!==void 0&&to.cancelAnimationFrame(animationId),animationId=to.requestAnimationFrame(function(){eo&&eo.focus(),animationId=void 0}))}}function getFocusableByIndexPath(eo,to){for(var ro=eo,no=0,oo=to;no(eo.cacheSize||MAX_CACHE_COUNT)){var po=getWindow();!((lo=po==null?void 0:po.FabricConfig)===null||lo===void 0)&&lo.enableClassNameCacheFullWarning&&(console.warn("Styles are being recalculated too frequently. Cache miss rate is ".concat(ro,"/").concat(no,".")),console.trace()),to.clear(),ro=0,eo.disableCaching=!0}return co[retVal]};return io}function _traverseEdge(eo,to){return to=_normalizeValue(to),eo.has(to)||eo.set(to,new Map),eo.get(to)}function _traverseMap(eo,to){if(typeof to=="function"){var ro=to.__cachedInputs__;if(ro)for(var no=0,oo=to.__cachedInputs__;no"u"?null:WeakMap;function resetMemoizations(){_resetCounter++}function memoizeFunction(eo,to,ro){if(to===void 0&&(to=100),ro===void 0&&(ro=!1),!_weakMap)return eo;if(!_initializedStylesheetResets$1){var no=Stylesheet$1.getInstance();no&&no.onReset&&Stylesheet$1.getInstance().onReset(resetMemoizations),_initializedStylesheetResets$1=!0}var oo,io=0,so=_resetCounter;return function(){for(var lo=[],co=0;co0&&io>to)&&(oo=_createNode(),io=0,so=_resetCounter),uo=oo;for(var fo=0;fo=0||lo.indexOf("data-")===0||lo.indexOf("aria-")===0;co&&(!ro||(ro==null?void 0:ro.indexOf(lo))===-1)&&(oo[lo]=eo[lo])}return oo}function initializeComponentRef(eo){extendComponent(eo,{componentDidMount:_onMount,componentDidUpdate:_onUpdate,componentWillUnmount:_onUnmount})}function _onMount(){_setComponentRef(this.props.componentRef,this)}function _onUpdate(eo){eo.componentRef!==this.props.componentRef&&(_setComponentRef(eo.componentRef,null),_setComponentRef(this.props.componentRef,this))}function _onUnmount(){_setComponentRef(this.props.componentRef,null)}function _setComponentRef(eo,to){eo&&(typeof eo=="object"?eo.current=to:typeof eo=="function"&&eo(to))}var _a$9,DirectionalKeyCodes=(_a$9={},_a$9[KeyCodes$1.up]=1,_a$9[KeyCodes$1.down]=1,_a$9[KeyCodes$1.left]=1,_a$9[KeyCodes$1.right]=1,_a$9[KeyCodes$1.home]=1,_a$9[KeyCodes$1.end]=1,_a$9[KeyCodes$1.tab]=1,_a$9[KeyCodes$1.pageUp]=1,_a$9[KeyCodes$1.pageDown]=1,_a$9);function isDirectionalKeyCode(eo){return!!DirectionalKeyCodes[eo]}var IsFocusVisibleClassName="ms-Fabric--isFocusVisible",IsFocusHiddenClassName="ms-Fabric--isFocusHidden";function updateClassList(eo,to){eo&&(eo.classList.add(to?IsFocusVisibleClassName:IsFocusHiddenClassName),eo.classList.remove(to?IsFocusHiddenClassName:IsFocusVisibleClassName))}function setFocusVisibility(eo,to,ro){var no;ro?ro.forEach(function(oo){return updateClassList(oo.current,eo)}):updateClassList((no=getWindow(to))===null||no===void 0?void 0:no.document.body,eo)}var mountCounters=new WeakMap,callbackMap=new WeakMap;function setMountCounters(eo,to){var ro,no=mountCounters.get(eo);return no?ro=no+to:ro=1,mountCounters.set(eo,ro),ro}function setCallbackMap(eo){var to=callbackMap.get(eo);if(to)return to;var ro=function(so){return _onMouseDown(so,eo.registeredProviders)},no=function(so){return _onPointerDown(so,eo.registeredProviders)},oo=function(so){return _onKeyDown(so,eo.registeredProviders)},io=function(so){return _onKeyUp(so,eo.registeredProviders)};return to={onMouseDown:ro,onPointerDown:no,onKeyDown:oo,onKeyUp:io},callbackMap.set(eo,to),to}var FocusRectsContext=reactExports.createContext(void 0);function useFocusRects(eo){var to=reactExports.useContext(FocusRectsContext);reactExports.useEffect(function(){var ro,no,oo,io,so=getWindow(eo==null?void 0:eo.current);if(!(!so||((ro=so.FabricConfig)===null||ro===void 0?void 0:ro.disableFocusRects)===!0)){var ao=so,lo,co,uo,fo;if(!((no=to==null?void 0:to.providerRef)===null||no===void 0)&&no.current&&(!((io=(oo=to==null?void 0:to.providerRef)===null||oo===void 0?void 0:oo.current)===null||io===void 0)&&io.addEventListener)){ao=to.providerRef.current;var ho=setCallbackMap(to);lo=ho.onMouseDown,co=ho.onPointerDown,uo=ho.onKeyDown,fo=ho.onKeyUp}else lo=_onMouseDown,co=_onPointerDown,uo=_onKeyDown,fo=_onKeyUp;var po=setMountCounters(ao,1);return po<=1&&(ao.addEventListener("mousedown",lo,!0),ao.addEventListener("pointerdown",co,!0),ao.addEventListener("keydown",uo,!0),ao.addEventListener("keyup",fo,!0)),function(){var go;!so||((go=so.FabricConfig)===null||go===void 0?void 0:go.disableFocusRects)===!0||(po=setMountCounters(ao,-1),po===0&&(ao.removeEventListener("mousedown",lo,!0),ao.removeEventListener("pointerdown",co,!0),ao.removeEventListener("keydown",uo,!0),ao.removeEventListener("keyup",fo,!0)))}}},[to,eo])}var FocusRects=function(eo){return useFocusRects(eo.rootRef),null};function _onMouseDown(eo,to){setFocusVisibility(!1,eo.target,to)}function _onPointerDown(eo,to){eo.pointerType!=="mouse"&&setFocusVisibility(!1,eo.target,to)}function _onKeyDown(eo,to){isDirectionalKeyCode(eo.which)&&setFocusVisibility(!0,eo.target,to)}function _onKeyUp(eo,to){isDirectionalKeyCode(eo.which)&&setFocusVisibility(!0,eo.target,to)}var FocusRectsProvider=function(eo){var to=eo.providerRef,ro=eo.layerRoot,no=reactExports.useState([])[0],oo=reactExports.useContext(FocusRectsContext),io=oo!==void 0&&!ro,so=reactExports.useMemo(function(){return io?void 0:{providerRef:to,registeredProviders:no,registerProvider:function(ao){no.push(ao),oo==null||oo.registerProvider(ao)},unregisterProvider:function(ao){oo==null||oo.unregisterProvider(ao);var lo=no.indexOf(ao);lo>=0&&no.splice(lo,1)}}},[to,no,oo,io]);return reactExports.useEffect(function(){if(so)return so.registerProvider(so.providerRef),function(){return so.unregisterProvider(so.providerRef)}},[so]),so?reactExports.createElement(FocusRectsContext.Provider,{value:so},eo.children):reactExports.createElement(reactExports.Fragment,null,eo.children)};function getItem(eo){var to=null;try{var ro=getWindow();to=ro?ro.localStorage.getItem(eo):null}catch{}return to}var _language,STORAGE_KEY="language";function getLanguage(eo){if(eo===void 0&&(eo="sessionStorage"),_language===void 0){var to=getDocument(),ro=eo==="localStorage"?getItem(STORAGE_KEY):eo==="sessionStorage"?getItem$1(STORAGE_KEY):void 0;ro&&(_language=ro),_language===void 0&&to&&(_language=to.documentElement.getAttribute("lang")),_language===void 0&&(_language="en")}return _language}function merge$3(eo){for(var to=[],ro=1;ro-1;eo[no]=io?oo:_merge(eo[no]||{},oo,ro)}else eo[no]=oo}return ro.pop(),eo}var isIOS=function(){return!window||!window.navigator||!window.navigator.userAgent?!1:/iPad|iPhone|iPod/i.test(window.navigator.userAgent)},tagsToIgnore=["TEMPLATE","STYLE","SCRIPT"];function modalize(eo){var to=getDocument(eo);if(!to)return function(){};for(var ro=[];eo!==to.body&&eo.parentElement;){for(var no=0,oo=eo.parentElement.children;no"u"||eo){var ro=getWindow(),no=(to=ro==null?void 0:ro.navigator)===null||to===void 0?void 0:to.userAgent;isMacResult=!!no&&no.indexOf("Macintosh")!==-1}return!!isMacResult}function createComposedRenderFunction(eo){var to=createMemoizer(function(ro){var no=createMemoizer(function(oo){return function(io){return ro(io,oo)}});return function(oo,io){return eo(oo,io?no(io):ro)}});return to}var memoizer=createMemoizer(createComposedRenderFunction);function composeRenderFunction(eo,to){return memoizer(eo)(to)}var DefaultFields=["theme","styles"];function styled(eo,to,ro,no,oo){no=no||{scope:"",fields:void 0};var io=no.scope,so=no.fields,ao=so===void 0?DefaultFields:so,lo=reactExports.forwardRef(function(uo,fo){var ho=reactExports.useRef(),po=useCustomizationSettings(ao,io),go=po.styles;po.dir;var vo=__rest$1(po,["styles","dir"]),yo=ro?ro(uo):void 0,xo=ho.current&&ho.current.__cachedInputs__||[],_o=uo.styles;if(!ho.current||go!==xo[1]||_o!==xo[2]){var Eo=function(So){return concatStyleSetsWithProps(So,to,go,_o)};Eo.__cachedInputs__=[to,go,_o],Eo.__noStyleOverride__=!go&&!_o,ho.current=Eo}return reactExports.createElement(eo,__assign$4({ref:fo},vo,yo,uo,{styles:ho.current}))});lo.displayName="Styled".concat(eo.displayName||eo.name);var co=oo?reactExports.memo(lo):lo;return lo.displayName&&(co.displayName=lo.displayName),co}function getPropsWithDefaults(eo,to){for(var ro=__assign$4({},to),no=0,oo=Object.keys(eo);nono?" (+ ".concat(_missingIcons.length-no," more)"):"")),_missingIconsTimer=void 0,_missingIcons=[]},ro)))}function makeSemanticColors(eo,to,ro,no,oo){oo===void 0&&(oo=!1);var io=__assign$4({primaryButtonBorder:"transparent",errorText:no?"#F1707B":"#a4262c",messageText:no?"#F3F2F1":"#323130",messageLink:no?"#6CB8F6":"#005A9E",messageLinkHovered:no?"#82C7FF":"#004578",infoIcon:no?"#C8C6C4":"#605e5c",errorIcon:no?"#F1707B":"#A80000",blockingIcon:no?"#442726":"#FDE7E9",warningIcon:no?"#C8C6C4":"#797775",severeWarningIcon:no?"#FCE100":"#D83B01",successIcon:no?"#92C353":"#107C10",infoBackground:no?"#323130":"#f3f2f1",errorBackground:no?"#442726":"#FDE7E9",blockingBackground:no?"#442726":"#FDE7E9",warningBackground:no?"#433519":"#FFF4CE",severeWarningBackground:no?"#4F2A0F":"#FED9CC",successBackground:no?"#393D1B":"#DFF6DD",warningHighlight:no?"#fff100":"#ffb900",successText:no?"#92c353":"#107C10"},ro),so=getSemanticColors(eo,to,io,no);return _fixDeprecatedSlots(so,oo)}function getSemanticColors(eo,to,ro,no,oo){var io={},so=eo||{},ao=so.white,lo=so.black,co=so.themePrimary,uo=so.themeDark,fo=so.themeDarker,ho=so.themeDarkAlt,po=so.themeLighter,go=so.neutralLight,vo=so.neutralLighter,yo=so.neutralDark,xo=so.neutralQuaternary,_o=so.neutralQuaternaryAlt,Eo=so.neutralPrimary,So=so.neutralSecondary,ko=so.neutralSecondaryAlt,Ao=so.neutralTertiary,Co=so.neutralTertiaryAlt,Oo=so.neutralLighterAlt,wo=so.accent;return ao&&(io.bodyBackground=ao,io.bodyFrameBackground=ao,io.accentButtonText=ao,io.buttonBackground=ao,io.primaryButtonText=ao,io.primaryButtonTextHovered=ao,io.primaryButtonTextPressed=ao,io.inputBackground=ao,io.inputForegroundChecked=ao,io.listBackground=ao,io.menuBackground=ao,io.cardStandoutBackground=ao),lo&&(io.bodyTextChecked=lo,io.buttonTextCheckedHovered=lo),co&&(io.link=co,io.primaryButtonBackground=co,io.inputBackgroundChecked=co,io.inputIcon=co,io.inputFocusBorderAlt=co,io.menuIcon=co,io.menuHeader=co,io.accentButtonBackground=co),uo&&(io.primaryButtonBackgroundPressed=uo,io.inputBackgroundCheckedHovered=uo,io.inputIconHovered=uo),fo&&(io.linkHovered=fo),ho&&(io.primaryButtonBackgroundHovered=ho),po&&(io.inputPlaceholderBackgroundChecked=po),go&&(io.bodyBackgroundChecked=go,io.bodyFrameDivider=go,io.bodyDivider=go,io.variantBorder=go,io.buttonBackgroundCheckedHovered=go,io.buttonBackgroundPressed=go,io.listItemBackgroundChecked=go,io.listHeaderBackgroundPressed=go,io.menuItemBackgroundPressed=go,io.menuItemBackgroundChecked=go),vo&&(io.bodyBackgroundHovered=vo,io.buttonBackgroundHovered=vo,io.buttonBackgroundDisabled=vo,io.buttonBorderDisabled=vo,io.primaryButtonBackgroundDisabled=vo,io.disabledBackground=vo,io.listItemBackgroundHovered=vo,io.listHeaderBackgroundHovered=vo,io.menuItemBackgroundHovered=vo),xo&&(io.primaryButtonTextDisabled=xo,io.disabledSubtext=xo),_o&&(io.listItemBackgroundCheckedHovered=_o),Ao&&(io.disabledBodyText=Ao,io.variantBorderHovered=(ro==null?void 0:ro.variantBorderHovered)||Ao,io.buttonTextDisabled=Ao,io.inputIconDisabled=Ao,io.disabledText=Ao),Eo&&(io.bodyText=Eo,io.actionLink=Eo,io.buttonText=Eo,io.inputBorderHovered=Eo,io.inputText=Eo,io.listText=Eo,io.menuItemText=Eo),Oo&&(io.bodyStandoutBackground=Oo,io.defaultStateBackground=Oo),yo&&(io.actionLinkHovered=yo,io.buttonTextHovered=yo,io.buttonTextChecked=yo,io.buttonTextPressed=yo,io.inputTextHovered=yo,io.menuItemTextHovered=yo),So&&(io.bodySubtext=So,io.focusBorder=So,io.inputBorder=So,io.smallInputBorder=So,io.inputPlaceholderText=So),ko&&(io.buttonBorder=ko),Co&&(io.disabledBodySubtext=Co,io.disabledBorder=Co,io.buttonBackgroundChecked=Co,io.menuDivider=Co),wo&&(io.accentButtonBackground=wo),to!=null&&to.elevation4&&(io.cardShadow=to.elevation4),!no&&(to!=null&&to.elevation8)?io.cardShadowHovered=to.elevation8:io.variantBorderHovered&&(io.cardShadowHovered="0 0 1px "+io.variantBorderHovered),io=__assign$4(__assign$4({},io),ro),io}function _fixDeprecatedSlots(eo,to){var ro="";return to===!0&&(ro=" /* @deprecated */"),eo.listTextColor=eo.listText+ro,eo.menuItemBackgroundChecked+=ro,eo.warningHighlight+=ro,eo.warningText=eo.messageText+ro,eo.successText+=ro,eo}function mergeThemes(eo,to){var ro,no,oo;to===void 0&&(to={});var io=merge$3({},eo,to,{semanticColors:getSemanticColors(to.palette,to.effects,to.semanticColors,to.isInverted===void 0?eo.isInverted:to.isInverted)});if(!((ro=to.palette)===null||ro===void 0)&&ro.themePrimary&&!(!((no=to.palette)===null||no===void 0)&&no.accent)&&(io.palette.accent=to.palette.themePrimary),to.defaultFontStyle)for(var so=0,ao=Object.keys(io.fonts);so"u"?global:window,_styleNonce=_root&&_root.CSPSettings&&_root.CSPSettings.nonce,_themeState=initializeThemeState();function initializeThemeState(){var eo=_root.__themeState__||{theme:void 0,lastStyleElement:void 0,registeredStyles:[]};return eo.runState||(eo=__assign$3(__assign$3({},eo),{perf:{count:0,duration:0},runState:{flushTimer:0,mode:0,buffer:[]}})),eo.registeredThemableStyles||(eo=__assign$3(__assign$3({},eo),{registeredThemableStyles:[]})),_root.__themeState__=eo,eo}function applyThemableStyles(eo,to){_themeState.loadStyles?_themeState.loadStyles(resolveThemableArray(eo).styleString,eo):registerStyles$1(eo)}function loadTheme$1(eo){_themeState.theme=eo,reloadStyles()}function clearStyles(eo){eo===void 0&&(eo=3),(eo===3||eo===2)&&(clearStylesInternal(_themeState.registeredStyles),_themeState.registeredStyles=[]),(eo===3||eo===1)&&(clearStylesInternal(_themeState.registeredThemableStyles),_themeState.registeredThemableStyles=[])}function clearStylesInternal(eo){eo.forEach(function(to){var ro=to&&to.styleElement;ro&&ro.parentElement&&ro.parentElement.removeChild(ro)})}function reloadStyles(){if(_themeState.theme){for(var eo=[],to=0,ro=_themeState.registeredThemableStyles;to0&&(clearStyles(1),applyThemableStyles([].concat.apply([],eo)))}}function resolveThemableArray(eo){var to=_themeState.theme,ro=!1,no=(eo||[]).map(function(oo){var io=oo.theme;if(io){ro=!0;var so=to?to[io]:void 0,ao=oo.defaultValue||"inherit";return to&&!so&&console&&!(io in to)&&typeof DEBUG<"u"&&DEBUG&&console.warn('Theming value not provided for "'.concat(io,'". Falling back to "').concat(ao,'".')),so||ao}else return oo.rawString});return{styleString:no.join(""),themable:ro}}function registerStyles$1(eo){if(!(typeof document>"u")){var to=document.getElementsByTagName("head")[0],ro=document.createElement("style"),no=resolveThemableArray(eo),oo=no.styleString,io=no.themable;ro.setAttribute("data-load-themed-styles","true"),_styleNonce&&ro.setAttribute("nonce",_styleNonce),ro.appendChild(document.createTextNode(oo)),_themeState.perf.count++,to.appendChild(ro);var so=document.createEvent("HTMLEvents");so.initEvent("styleinsert",!0,!1),so.args={newStyle:ro},document.dispatchEvent(so);var ao={styleElement:ro,themableStyle:eo};io?_themeState.registeredThemableStyles.push(ao):_themeState.registeredStyles.push(ao)}}var _theme=createTheme$1({}),_onThemeChangeCallbacks=[],ThemeSettingName="theme";function initializeThemeInCustomizations(){var eo,to,ro,no=getWindow();!((to=no==null?void 0:no.FabricConfig)===null||to===void 0)&&to.legacyTheme?loadTheme(no.FabricConfig.legacyTheme):Customizations.getSettings([ThemeSettingName]).theme||(!((ro=no==null?void 0:no.FabricConfig)===null||ro===void 0)&&ro.theme&&(_theme=createTheme$1(no.FabricConfig.theme)),Customizations.applySettings((eo={},eo[ThemeSettingName]=_theme,eo)))}initializeThemeInCustomizations();function getTheme(eo){return eo===void 0&&(eo=!1),eo===!0&&(_theme=createTheme$1({},eo)),_theme}function loadTheme(eo,to){var ro;return to===void 0&&(to=!1),_theme=createTheme$1(eo,to),loadTheme$1(__assign$4(__assign$4(__assign$4(__assign$4({},_theme.palette),_theme.semanticColors),_theme.effects),_loadFonts(_theme))),Customizations.applySettings((ro={},ro[ThemeSettingName]=_theme,ro)),_onThemeChangeCallbacks.forEach(function(no){try{no(_theme)}catch{}}),_theme}function _loadFonts(eo){for(var to={},ro=0,no=Object.keys(eo.fonts);roto.bottom||eo.leftto.right)}function _getOutOfBoundsEdges(eo,to){var ro=[];return eo.topto.bottom&&ro.push(RectangleEdge.bottom),eo.leftto.right&&ro.push(RectangleEdge.right),ro}function _getEdgeValue(eo,to){return eo[RectangleEdge[to]]}function _setEdgeValue(eo,to,ro){return eo[RectangleEdge[to]]=ro,eo}function _getCenterValue(eo,to){var ro=_getFlankingEdges(to);return(_getEdgeValue(eo,ro.positiveEdge)+_getEdgeValue(eo,ro.negativeEdge))/2}function _getRelativeEdgeValue(eo,to){return eo>0?to:to*-1}function _getRelativeRectEdgeValue(eo,to){return _getRelativeEdgeValue(eo,_getEdgeValue(to,eo))}function _getRelativeEdgeDifference(eo,to,ro){var no=_getEdgeValue(eo,ro)-_getEdgeValue(to,ro);return _getRelativeEdgeValue(ro,no)}function _moveEdge(eo,to,ro,no){no===void 0&&(no=!0);var oo=_getEdgeValue(eo,to)-ro,io=_setEdgeValue(eo,to,ro);return no&&(io=_setEdgeValue(eo,to*-1,_getEdgeValue(eo,to*-1)-oo)),io}function _alignEdges(eo,to,ro,no){return no===void 0&&(no=0),_moveEdge(eo,ro,_getEdgeValue(to,ro)+_getRelativeEdgeValue(ro,no))}function _alignOppositeEdges(eo,to,ro,no){no===void 0&&(no=0);var oo=ro*-1,io=_getRelativeEdgeValue(oo,no);return _moveEdge(eo,ro*-1,_getEdgeValue(to,ro)+io)}function _isEdgeInBounds(eo,to,ro){var no=_getRelativeRectEdgeValue(ro,eo);return no>_getRelativeRectEdgeValue(ro,to)}function _getOutOfBoundsDegree(eo,to){for(var ro=_getOutOfBoundsEdges(eo,to),no=0,oo=0,io=ro;oo=no}function _flipToFit(eo,to,ro,no,oo,io,so){oo===void 0&&(oo=!1),so===void 0&&(so=0);var ao=[RectangleEdge.left,RectangleEdge.right,RectangleEdge.bottom,RectangleEdge.top];getRTL$1()&&(ao[0]*=-1,ao[1]*=-1);for(var lo=eo,co=no.targetEdge,uo=no.alignmentEdge,fo,ho=co,po=uo,go=0;go<4;go++){if(_isEdgeInBounds(lo,ro,co))return{elementRectangle:lo,targetEdge:co,alignmentEdge:uo};if(oo&&_canScrollResizeToFitEdge(to,ro,co,io)){switch(co){case RectangleEdge.bottom:lo.bottom=ro.bottom;break;case RectangleEdge.top:lo.top=ro.top;break}return{elementRectangle:lo,targetEdge:co,alignmentEdge:uo,forcedInBounds:!0}}else{var vo=_getOutOfBoundsDegree(lo,ro);(!fo||vo0&&(ao.indexOf(co*-1)>-1?co=co*-1:(uo=co,co=ao.slice(-1)[0]),lo=_estimatePosition(eo,to,{targetEdge:co,alignmentEdge:uo},so))}}return lo=_estimatePosition(eo,to,{targetEdge:ho,alignmentEdge:po},so),{elementRectangle:lo,targetEdge:ho,alignmentEdge:po}}function _flipAlignmentEdge(eo,to,ro,no){var oo=eo.alignmentEdge,io=eo.targetEdge,so=eo.elementRectangle,ao=oo*-1,lo=_estimatePosition(so,to,{targetEdge:io,alignmentEdge:ao},ro,no);return{elementRectangle:lo,targetEdge:io,alignmentEdge:ao}}function _adjustFitWithinBounds(eo,to,ro,no,oo,io,so,ao,lo){oo===void 0&&(oo=!1),so===void 0&&(so=0);var co=no.alignmentEdge,uo=no.alignTargetEdge,fo={elementRectangle:eo,targetEdge:no.targetEdge,alignmentEdge:co};!ao&&!lo&&(fo=_flipToFit(eo,to,ro,no,oo,io,so));var ho=_getOutOfBoundsEdges(fo.elementRectangle,ro),po=ao?-fo.targetEdge:void 0;if(ho.length>0)if(uo)if(fo.alignmentEdge&&ho.indexOf(fo.alignmentEdge*-1)>-1){var go=_flipAlignmentEdge(fo,to,so,lo);if(_isRectangleWithinBounds(go.elementRectangle,ro))return go;fo=_alignOutOfBoundsEdges(_getOutOfBoundsEdges(go.elementRectangle,ro),fo,ro,po)}else fo=_alignOutOfBoundsEdges(ho,fo,ro,po);else fo=_alignOutOfBoundsEdges(ho,fo,ro,po);return fo}function _alignOutOfBoundsEdges(eo,to,ro,no){for(var oo=0,io=eo;ooMath.abs(_getRelativeEdgeDifference(eo,ro,to*-1))?to*-1:to}function _isEdgeOnBounds(eo,to,ro){return ro!==void 0&&_getEdgeValue(eo,to)===_getEdgeValue(ro,to)}function _finalizeElementPosition(eo,to,ro,no,oo,io,so,ao){var lo={},co=_getRectangleFromElement(to),uo=io?ro:ro*-1,fo=oo||_getFlankingEdges(ro).positiveEdge;return(!so||_isEdgeOnBounds(eo,getOppositeEdge(fo),no))&&(fo=_finalizeReturnEdge(eo,fo,no)),lo[RectangleEdge[uo]]=_getRelativeEdgeDifference(eo,co,uo),lo[RectangleEdge[fo]]=_getRelativeEdgeDifference(eo,co,fo),ao&&(lo[RectangleEdge[uo*-1]]=_getRelativeEdgeDifference(eo,co,uo*-1),lo[RectangleEdge[fo*-1]]=_getRelativeEdgeDifference(eo,co,fo*-1)),lo}function _calculateActualBeakWidthInPixels(eo){return Math.sqrt(eo*eo*2)}function _getPositionData(eo,to,ro){if(eo===void 0&&(eo=DirectionalHint.bottomAutoEdge),ro)return{alignmentEdge:ro.alignmentEdge,isAuto:ro.isAuto,targetEdge:ro.targetEdge};var no=__assign$4({},DirectionalDictionary[eo]);return getRTL$1()?(no.alignmentEdge&&no.alignmentEdge%2===0&&(no.alignmentEdge=no.alignmentEdge*-1),to!==void 0?DirectionalDictionary[to]:no):no}function _getAlignmentData(eo,to,ro,no,oo){return eo.isAuto&&(eo.alignmentEdge=getClosestEdge(eo.targetEdge,to,ro)),eo.alignTargetEdge=oo,eo}function getClosestEdge(eo,to,ro){var no=_getCenterValue(to,eo),oo=_getCenterValue(ro,eo),io=_getFlankingEdges(eo),so=io.positiveEdge,ao=io.negativeEdge;return no<=oo?so:ao}function _positionElementWithinBounds(eo,to,ro,no,oo,io,so,ao,lo){io===void 0&&(io=!1);var co=_estimatePosition(eo,to,no,oo,lo);return _isRectangleWithinBounds(co,ro)?{elementRectangle:co,targetEdge:no.targetEdge,alignmentEdge:no.alignmentEdge}:_adjustFitWithinBounds(co,to,ro,no,io,so,oo,ao,lo)}function _finalizeBeakPosition(eo,to,ro){var no=eo.targetEdge*-1,oo=new Rectangle(0,eo.elementRectangle.width,0,eo.elementRectangle.height),io={},so=_finalizeReturnEdge(eo.elementRectangle,eo.alignmentEdge?eo.alignmentEdge:_getFlankingEdges(no).positiveEdge,ro),ao=_getRelativeEdgeDifference(eo.elementRectangle,eo.targetRectangle,no),lo=ao>Math.abs(_getEdgeValue(to,no));return io[RectangleEdge[no]]=_getEdgeValue(to,no),io[RectangleEdge[so]]=_getRelativeEdgeDifference(to,oo,so),{elementPosition:__assign$4({},io),closestEdge:getClosestEdge(eo.targetEdge,to,oo),targetEdge:no,hideBeak:!lo}}function _positionBeak(eo,to){var ro=to.targetRectangle,no=_getFlankingEdges(to.targetEdge),oo=no.positiveEdge,io=no.negativeEdge,so=_getCenterValue(ro,to.targetEdge),ao=new Rectangle(eo/2,to.elementRectangle.width-eo/2,eo/2,to.elementRectangle.height-eo/2),lo=new Rectangle(0,eo,0,eo);return lo=_moveEdge(lo,to.targetEdge*-1,-eo/2),lo=_centerEdgeToPoint(lo,to.targetEdge*-1,so-_getRelativeRectEdgeValue(oo,to.elementRectangle)),_isEdgeInBounds(lo,ao,oo)?_isEdgeInBounds(lo,ao,io)||(lo=_alignEdges(lo,ao,io)):lo=_alignEdges(lo,ao,oo),lo}function _getRectangleFromElement(eo){var to=eo.getBoundingClientRect();return new Rectangle(to.left,to.right,to.top,to.bottom)}function _getRectangleFromIRect(eo){return new Rectangle(eo.left,eo.right,eo.top,eo.bottom)}function _getTargetRect(eo,to){var ro;if(to){if(to.preventDefault){var no=to;ro=new Rectangle(no.clientX,no.clientX,no.clientY,no.clientY)}else if(to.getBoundingClientRect)ro=_getRectangleFromElement(to);else{var oo=to,io=oo.left||oo.x,so=oo.top||oo.y,ao=oo.right||io,lo=oo.bottom||so;ro=new Rectangle(io,ao,so,lo)}if(!_isRectangleWithinBounds(ro,eo))for(var co=_getOutOfBoundsEdges(ro,eo),uo=0,fo=co;uo=no&&oo&&co.top<=oo&&co.bottom>=oo&&(so={top:co.top,left:co.left,right:co.right,bottom:co.bottom,width:co.width,height:co.height})}return so}function getBoundsFromTargetWindow(eo,to){return _getBoundsFromTargetWindow(eo,to)}function calculateGapSpace(eo,to,ro){return _calculateGapSpace(eo,to,ro)}function getRectangleFromTarget(eo){return _getRectangleFromTarget(eo)}function useAsync(){var eo=reactExports.useRef();return eo.current||(eo.current=new Async),reactExports.useEffect(function(){return function(){var to;(to=eo.current)===null||to===void 0||to.dispose(),eo.current=void 0}},[]),eo.current}function useConst(eo){var to=reactExports.useRef();return to.current===void 0&&(to.current={value:typeof eo=="function"?eo():eo}),to.current.value}function useBoolean(eo){var to=reactExports.useState(eo),ro=to[0],no=to[1],oo=useConst(function(){return function(){no(!0)}}),io=useConst(function(){return function(){no(!1)}}),so=useConst(function(){return function(){no(function(ao){return!ao})}});return[ro,{setTrue:oo,setFalse:io,toggle:so}]}function useEventCallback$2(eo){var to=reactExports.useRef(function(){throw new Error("Cannot call an event handler while rendering")});return useIsomorphicLayoutEffect(function(){to.current=eo},[eo]),useConst(function(){return function(){for(var ro=[],no=0;no0&&co>lo&&(ao=co-lo>1)}oo!==ao&&io(ao)}}),function(){return ro.dispose()}}),oo}function defaultFocusRestorer(eo){var to=eo.originalElement,ro=eo.containsFocus;to&&ro&&to!==getWindow()&&setTimeout(function(){var no;(no=to.focus)===null||no===void 0||no.call(to)},0)}function useRestoreFocus(eo,to){var ro=eo.onRestoreFocus,no=ro===void 0?defaultFocusRestorer:ro,oo=reactExports.useRef(),io=reactExports.useRef(!1);reactExports.useEffect(function(){return oo.current=getDocument().activeElement,doesElementContainFocus(to.current)&&(io.current=!0),function(){var so;no==null||no({originalElement:oo.current,containsFocus:io.current,documentContainsFocus:((so=getDocument())===null||so===void 0?void 0:so.hasFocus())||!1}),oo.current=void 0}},[]),useOnEvent(to,"focus",reactExports.useCallback(function(){io.current=!0},[]),!0),useOnEvent(to,"blur",reactExports.useCallback(function(so){to.current&&so.relatedTarget&&!to.current.contains(so.relatedTarget)&&(io.current=!1)},[]),!0)}function useHideSiblingNodes(eo,to){var ro=String(eo["aria-modal"]).toLowerCase()==="true"&&eo.enableAriaHiddenSiblings;reactExports.useEffect(function(){if(ro&&to.current){var no=modalize(to.current);return no}},[to,ro])}var Popup=reactExports.forwardRef(function(eo,to){var ro=getPropsWithDefaults({shouldRestoreFocus:!0,enableAriaHiddenSiblings:!0},eo),no=reactExports.useRef(),oo=useMergedRefs(no,to);useHideSiblingNodes(ro,no),useRestoreFocus(ro,no);var io=ro.role,so=ro.className,ao=ro.ariaLabel,lo=ro.ariaLabelledBy,co=ro.ariaDescribedBy,uo=ro.style,fo=ro.children,ho=ro.onDismiss,po=useScrollbarAsync(ro,no),go=reactExports.useCallback(function(yo){switch(yo.which){case KeyCodes$1.escape:ho&&(ho(yo),yo.preventDefault(),yo.stopPropagation());break}},[ho]),vo=useWindow();return useOnEvent(vo,"keydown",go),reactExports.createElement("div",__assign$4({ref:oo},getNativeProps(ro,divProperties),{className:so,role:io,"aria-label":ao,"aria-labelledby":lo,"aria-describedby":co,onKeyDown:go,style:__assign$4({overflowY:po?"scroll":void 0,outline:"none"},uo)}),fo)});Popup.displayName="Popup";var _a$7,COMPONENT_NAME$2="CalloutContentBase",ANIMATIONS=(_a$7={},_a$7[RectangleEdge.top]=AnimationClassNames.slideUpIn10,_a$7[RectangleEdge.bottom]=AnimationClassNames.slideDownIn10,_a$7[RectangleEdge.left]=AnimationClassNames.slideLeftIn10,_a$7[RectangleEdge.right]=AnimationClassNames.slideRightIn10,_a$7),BEAK_ORIGIN_POSITION={top:0,left:0},OFF_SCREEN_STYLE={opacity:0,filter:"opacity(0)",pointerEvents:"none"},ARIA_ROLE_ATTRIBUTES=["role","aria-roledescription"],DEFAULT_PROPS$3={preventDismissOnLostFocus:!1,preventDismissOnScroll:!1,preventDismissOnResize:!1,isBeakVisible:!0,beakWidth:16,gapSpace:0,minPagePadding:8,directionalHint:DirectionalHint.bottomAutoEdge},getClassNames$9=classNamesFunction({disableCaching:!0});function useBounds(eo,to,ro){var no=eo.bounds,oo=eo.minPagePadding,io=oo===void 0?DEFAULT_PROPS$3.minPagePadding:oo,so=eo.target,ao=reactExports.useState(!1),lo=ao[0],co=ao[1],uo=reactExports.useRef(),fo=reactExports.useCallback(function(){if(!uo.current||lo){var po=typeof no=="function"?ro?no(so,ro):void 0:no;!po&&ro&&(po=getBoundsFromTargetWindow(to.current,ro),po={top:po.top+io,left:po.left+io,right:po.right-io,bottom:po.bottom-io,width:po.width-io*2,height:po.height-io*2}),uo.current=po,lo&&co(!1)}return uo.current},[no,io,so,to,ro,lo]),ho=useAsync();return useOnEvent(ro,"resize",ho.debounce(function(){co(!0)},500,{leading:!0})),fo}function useMaxHeight(eo,to,ro,no){var oo,io=eo.calloutMaxHeight,so=eo.finalHeight,ao=eo.directionalHint,lo=eo.directionalHintFixed,co=eo.hidden,uo=eo.gapSpace,fo=eo.beakWidth,ho=eo.isBeakVisible,po=reactExports.useState(),go=po[0],vo=po[1],yo=(oo=no==null?void 0:no.elementPosition)!==null&&oo!==void 0?oo:{},xo=yo.top,_o=yo.bottom,Eo=ro!=null&&ro.current?getRectangleFromTarget(ro.current):void 0;return reactExports.useEffect(function(){var So,ko=(So=to())!==null&&So!==void 0?So:{},Ao=ko.top,Co=ko.bottom,Oo;(no==null?void 0:no.targetEdge)===RectangleEdge.top&&(Eo!=null&&Eo.top)&&(Co=Eo.top-calculateGapSpace(ho,fo,uo)),typeof xo=="number"&&Co?Oo=Co-xo:typeof _o=="number"&&typeof Ao=="number"&&Co&&(Oo=Co-Ao-_o),!io&&!co||io&&Oo&&io>Oo?vo(Oo):vo(io||void 0)},[_o,io,so,ao,lo,to,co,no,xo,uo,fo,ho,Eo]),go}function usePositions(eo,to,ro,no,oo,io){var so=reactExports.useState(),ao=so[0],lo=so[1],co=reactExports.useRef(0),uo=reactExports.useRef(),fo=useAsync(),ho=eo.hidden,po=eo.target,go=eo.finalHeight,vo=eo.calloutMaxHeight,yo=eo.onPositioned,xo=eo.directionalHint,_o=eo.hideOverflow,Eo=eo.preferScrollResizePositioning,So=useWindow(),ko=reactExports.useRef(),Ao;ko.current!==io.current&&(ko.current=io.current,Ao=io.current?So==null?void 0:So.getComputedStyle(io.current):void 0);var Co=Ao==null?void 0:Ao.overflowY;return reactExports.useEffect(function(){if(ho)lo(void 0),co.current=0;else{var Oo=fo.requestAnimationFrame(function(){var wo,Ro;if(to.current&&ro){var Do=__assign$4(__assign$4({},eo),{target:no.current,bounds:oo()}),$o=ro.cloneNode(!0);$o.style.maxHeight=vo?"".concat(vo):"",$o.style.visibility="hidden",(wo=ro.parentElement)===null||wo===void 0||wo.appendChild($o);var Mo=uo.current===po?ao:void 0,Po=_o||Co==="clip"||Co==="hidden",Bo=Eo&&!Po,No=go?positionCard(Do,to.current,$o,Mo):positionCallout(Do,to.current,$o,Mo,Bo);(Ro=ro.parentElement)===null||Ro===void 0||Ro.removeChild($o),!ao&&No||ao&&No&&!arePositionsEqual(ao,No)&&co.current<5?(co.current++,lo(No)):co.current>0&&(co.current=0,yo==null||yo(ao))}},ro);return uo.current=po,function(){fo.cancelAnimationFrame(Oo),uo.current=void 0}}},[ho,xo,fo,ro,vo,to,no,go,oo,yo,ao,eo,po,_o,Eo,Co]),ao}function useAutoFocus(eo,to,ro){var no=eo.hidden,oo=eo.setInitialFocus,io=useAsync(),so=!!to;reactExports.useEffect(function(){if(!no&&oo&&so&&ro){var ao=io.requestAnimationFrame(function(){return focusFirstChild(ro)},ro);return function(){return io.cancelAnimationFrame(ao)}}},[no,so,io,ro,oo])}function useDismissHandlers(eo,to,ro,no,oo){var io=eo.hidden,so=eo.onDismiss,ao=eo.preventDismissOnScroll,lo=eo.preventDismissOnResize,co=eo.preventDismissOnLostFocus,uo=eo.dismissOnTargetClick,fo=eo.shouldDismissOnWindowFocus,ho=eo.preventDismissOnEvent,po=reactExports.useRef(!1),go=useAsync(),vo=useConst([function(){po.current=!0},function(){po.current=!1}]),yo=!!to;return reactExports.useEffect(function(){var xo=function(Co){yo&&!ao&&So(Co)},_o=function(Co){!lo&&!(ho&&ho(Co))&&(so==null||so(Co))},Eo=function(Co){co||So(Co)},So=function(Co){var Oo=Co.composedPath?Co.composedPath():[],wo=Oo.length>0?Oo[0]:Co.target,Ro=ro.current&&!elementContains(ro.current,wo);if(Ro&&po.current){po.current=!1;return}if(!no.current&&Ro||Co.target!==oo&&Ro&&(!no.current||"stopPropagation"in no.current||uo||wo!==no.current&&!elementContains(no.current,wo))){if(ho&&ho(Co))return;so==null||so(Co)}},ko=function(Co){fo&&(ho&&!ho(Co)||!ho&&!co)&&!(oo!=null&&oo.document.hasFocus())&&Co.relatedTarget===null&&(so==null||so(Co))},Ao=new Promise(function(Co){go.setTimeout(function(){if(!io&&oo){var Oo=[on$1(oo,"scroll",xo,!0),on$1(oo,"resize",_o,!0),on$1(oo.document.documentElement,"focus",Eo,!0),on$1(oo.document.documentElement,"click",Eo,!0),on$1(oo,"blur",ko,!0)];Co(function(){Oo.forEach(function(wo){return wo()})})}},0)});return function(){Ao.then(function(Co){return Co()})}},[io,go,ro,no,oo,so,fo,uo,co,lo,ao,yo,ho]),vo}var CalloutContentBase=reactExports.memo(reactExports.forwardRef(function(eo,to){var ro=getPropsWithDefaults(DEFAULT_PROPS$3,eo),no=ro.styles,oo=ro.style,io=ro.ariaLabel,so=ro.ariaDescribedBy,ao=ro.ariaLabelledBy,lo=ro.className,co=ro.isBeakVisible,uo=ro.children,fo=ro.beakWidth,ho=ro.calloutWidth,po=ro.calloutMaxWidth,go=ro.calloutMinWidth,vo=ro.doNotLayer,yo=ro.finalHeight,xo=ro.hideOverflow,_o=xo===void 0?!!yo:xo,Eo=ro.backgroundColor,So=ro.calloutMaxHeight,ko=ro.onScroll,Ao=ro.shouldRestoreFocus,Co=Ao===void 0?!0:Ao,Oo=ro.target,wo=ro.hidden,Ro=ro.onLayerMounted,Do=ro.popupProps,$o=reactExports.useRef(null),Mo=reactExports.useRef(null),Po=useMergedRefs(Mo,Do==null?void 0:Do.ref),Bo=reactExports.useState(null),No=Bo[0],Fo=Bo[1],zo=reactExports.useCallback(function(yl){Fo(yl)},[]),qo=useMergedRefs($o,to),Go=useTarget(ro.target,{current:No}),Qo=Go[0],Zo=Go[1],bs=useBounds(ro,Qo,Zo),ks=usePositions(ro,$o,No,Qo,bs,Po),Is=useMaxHeight(ro,bs,Qo,ks),Rs=useDismissHandlers(ro,ks,$o,Qo,Zo),Ts=Rs[0],$s=Rs[1],Os=(ks==null?void 0:ks.elementPosition.top)&&(ks==null?void 0:ks.elementPosition.bottom),Ls=__assign$4(__assign$4({},ks==null?void 0:ks.elementPosition),{maxHeight:Is});if(Os&&(Ls.bottom=void 0),useAutoFocus(ro,ks,No),reactExports.useEffect(function(){wo||Ro==null||Ro()},[wo]),!Zo)return null;var Ks=_o,Js=co&&!!Oo,Ys=getClassNames$9(no,{theme:ro.theme,className:lo,overflowYHidden:Ks,calloutWidth:ho,positions:ks,beakWidth:fo,backgroundColor:Eo,calloutMaxWidth:po,calloutMinWidth:go,doNotLayer:vo}),ga=__assign$4(__assign$4({maxHeight:So||"100%"},oo),Ks&&{overflowY:"hidden"}),$a=ro.hidden?{visibility:"hidden"}:void 0;return reactExports.createElement("div",{ref:qo,className:Ys.container,style:$a},reactExports.createElement("div",__assign$4({},getNativeProps(ro,divProperties,ARIA_ROLE_ATTRIBUTES),{className:css$3(Ys.root,ks&&ks.targetEdge&&ANIMATIONS[ks.targetEdge]),style:ks?__assign$4({},Ls):OFF_SCREEN_STYLE,tabIndex:-1,ref:zo}),Js&&reactExports.createElement("div",{className:Ys.beak,style:getBeakPosition(ks)}),Js&&reactExports.createElement("div",{className:Ys.beakCurtain}),reactExports.createElement(Popup,__assign$4({role:ro.role,"aria-roledescription":ro["aria-roledescription"],ariaDescribedBy:so,ariaLabel:io,ariaLabelledBy:ao,className:Ys.calloutMain,onDismiss:ro.onDismiss,onMouseDown:Ts,onMouseUp:$s,onRestoreFocus:ro.onRestoreFocus,onScroll:ko,shouldRestoreFocus:Co,style:ga},Do,{ref:Po}),uo)))}),function(eo,to){return!to.shouldUpdateWhenHidden&&eo.hidden&&to.hidden?!0:shallowCompare(eo,to)});function getBeakPosition(eo){var to,ro,no=__assign$4(__assign$4({},(to=eo==null?void 0:eo.beakPosition)===null||to===void 0?void 0:to.elementPosition),{display:!((ro=eo==null?void 0:eo.beakPosition)===null||ro===void 0)&&ro.hideBeak?"none":void 0});return!no.top&&!no.bottom&&!no.left&&!no.right&&(no.left=BEAK_ORIGIN_POSITION.left,no.top=BEAK_ORIGIN_POSITION.top),no}function arePositionsEqual(eo,to){return comparePositions(eo.elementPosition,to.elementPosition)&&comparePositions(eo.beakPosition.elementPosition,to.beakPosition.elementPosition)}function comparePositions(eo,to){for(var ro in to)if(to.hasOwnProperty(ro)){var no=eo[ro],oo=to[ro];if(no!==void 0&&oo!==void 0){if(no.toFixed(2)!==oo.toFixed(2))return!1}else return!1}return!0}CalloutContentBase.displayName=COMPONENT_NAME$2;function getBeakStyle(eo){return{height:eo,width:eo}}var GlobalClassNames$8={container:"ms-Callout-container",root:"ms-Callout",beak:"ms-Callout-beak",beakCurtain:"ms-Callout-beakCurtain",calloutMain:"ms-Callout-main"},getStyles$9=function(eo){var to,ro=eo.theme,no=eo.className,oo=eo.overflowYHidden,io=eo.calloutWidth,so=eo.beakWidth,ao=eo.backgroundColor,lo=eo.calloutMaxWidth,co=eo.calloutMinWidth,uo=eo.doNotLayer,fo=getGlobalClassNames(GlobalClassNames$8,ro),ho=ro.semanticColors,po=ro.effects;return{container:[fo.container,{position:"relative"}],root:[fo.root,ro.fonts.medium,{position:"absolute",display:"flex",zIndex:uo?ZIndexes.Layer:void 0,boxSizing:"border-box",borderRadius:po.roundedCorner2,boxShadow:po.elevation16,selectors:(to={},to[HighContrastSelector]={borderWidth:1,borderStyle:"solid",borderColor:"WindowText"},to)},focusClear(),no,!!io&&{width:io},!!lo&&{maxWidth:lo},!!co&&{minWidth:co}],beak:[fo.beak,{position:"absolute",backgroundColor:ho.menuBackground,boxShadow:"inherit",border:"inherit",boxSizing:"border-box",transform:"rotate(45deg)"},getBeakStyle(so),ao&&{backgroundColor:ao}],beakCurtain:[fo.beakCurtain,{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:ho.menuBackground,borderRadius:po.roundedCorner2}],calloutMain:[fo.calloutMain,{backgroundColor:ho.menuBackground,overflowX:"hidden",overflowY:"auto",position:"relative",width:"100%",borderRadius:po.roundedCorner2},oo&&{overflowY:"hidden"},ao&&{backgroundColor:ao}]}},CalloutContent=styled(CalloutContentBase,getStyles$9,void 0,{scope:"CalloutContent"});const PortalCompatContext=reactExports.createContext(void 0),portalCompatContextDefaultValue=()=>()=>{};PortalCompatContext.Provider;function usePortalCompat(){var eo;return(eo=reactExports.useContext(PortalCompatContext))!==null&&eo!==void 0?eo:portalCompatContextDefaultValue}var getClassNames$8=classNamesFunction(),getFabricTheme=memoizeFunction(function(eo,to){return createTheme$1(__assign$4(__assign$4({},eo),{rtl:to}))}),getDir=function(eo){var to=eo.theme,ro=eo.dir,no=getRTL$1(to)?"rtl":"ltr",oo=getRTL$1()?"rtl":"ltr",io=ro||no;return{rootDir:io!==no||io!==oo?io:ro,needsTheme:io!==no}},FabricBase=reactExports.forwardRef(function(eo,to){var ro=eo.className,no=eo.theme,oo=eo.applyTheme,io=eo.applyThemeToBody,so=eo.styles,ao=getClassNames$8(so,{theme:no,applyTheme:oo,className:ro}),lo=reactExports.useRef(null);return useApplyThemeToBody(io,ao,lo),reactExports.createElement(reactExports.Fragment,null,useRenderedContent(eo,ao,lo,to))});FabricBase.displayName="FabricBase";function useRenderedContent(eo,to,ro,no){var oo=to.root,io=eo.as,so=io===void 0?"div":io,ao=eo.dir,lo=eo.theme,co=getNativeProps(eo,divProperties,["dir"]),uo=getDir(eo),fo=uo.rootDir,ho=uo.needsTheme,po=reactExports.createElement(FocusRectsProvider,{providerRef:ro},reactExports.createElement(so,__assign$4({dir:fo},co,{className:oo,ref:useMergedRefs(ro,no)})));return ho&&(po=reactExports.createElement(Customizer,{settings:{theme:getFabricTheme(lo,ao==="rtl")}},po)),po}function useApplyThemeToBody(eo,to,ro){var no=to.bodyThemed;return reactExports.useEffect(function(){if(eo){var oo=getDocument(ro.current);if(oo)return oo.body.classList.add(no),function(){oo.body.classList.remove(no)}}},[no,eo,ro]),ro}var inheritFont={fontFamily:"inherit"},GlobalClassNames$7={root:"ms-Fabric",bodyThemed:"ms-Fabric-bodyThemed"},getStyles$8=function(eo){var to=eo.applyTheme,ro=eo.className,no=eo.preventBlanketFontInheritance,oo=eo.theme,io=getGlobalClassNames(GlobalClassNames$7,oo);return{root:[io.root,oo.fonts.medium,{color:oo.palette.neutralPrimary},!no&&{"& button":inheritFont,"& input":inheritFont,"& textarea":inheritFont},to&&{color:oo.semanticColors.bodyText,backgroundColor:oo.semanticColors.bodyBackground},ro],bodyThemed:[{backgroundColor:oo.semanticColors.bodyBackground}]}},Fabric=styled(FabricBase,getStyles$8,void 0,{scope:"Fabric"}),_layersByHostId={},_layerHostsById={},defaultHostId="fluent-default-layer-host",_defaultHostSelector="#".concat(defaultHostId);function registerLayer(eo,to){_layersByHostId[eo]||(_layersByHostId[eo]=[]),_layersByHostId[eo].push(to);var ro=_layerHostsById[eo];if(ro)for(var no=0,oo=ro;no=0&&(ro.splice(no,1),ro.length===0&&delete _layersByHostId[eo])}var oo=_layerHostsById[eo];if(oo)for(var io=0,so=oo;io0&&to.current.naturalHeight>0||to.current.complete&&SVG_REGEX.test(io):!1;fo&&lo(ImageLoadState.loaded)}}),reactExports.useEffect(function(){ro==null||ro(ao)},[ao]);var co=reactExports.useCallback(function(fo){no==null||no(fo),io&&lo(ImageLoadState.loaded)},[io,no]),uo=reactExports.useCallback(function(fo){oo==null||oo(fo),lo(ImageLoadState.error)},[oo]);return[ao,co,uo]}var ImageBase=reactExports.forwardRef(function(eo,to){var ro=reactExports.useRef(),no=reactExports.useRef(),oo=useLoadState(eo,no),io=oo[0],so=oo[1],ao=oo[2],lo=getNativeProps(eo,imgProperties,["width","height"]),co=eo.src,uo=eo.alt,fo=eo.width,ho=eo.height,po=eo.shouldFadeIn,go=po===void 0?!0:po,vo=eo.shouldStartVisible,yo=eo.className,xo=eo.imageFit,_o=eo.role,Eo=eo.maximizeFrame,So=eo.styles,ko=eo.theme,Ao=eo.loading,Co=useCoverStyle(eo,io,no,ro),Oo=getClassNames$6(So,{theme:ko,className:yo,width:fo,height:ho,maximizeFrame:Eo,shouldFadeIn:go,shouldStartVisible:vo,isLoaded:io===ImageLoadState.loaded||io===ImageLoadState.notLoaded&&eo.shouldStartVisible,isLandscape:Co===ImageCoverStyle.landscape,isCenter:xo===ImageFit.center,isCenterContain:xo===ImageFit.centerContain,isCenterCover:xo===ImageFit.centerCover,isContain:xo===ImageFit.contain,isCover:xo===ImageFit.cover,isNone:xo===ImageFit.none,isError:io===ImageLoadState.error,isNotImageFit:xo===void 0});return reactExports.createElement("div",{className:Oo.root,style:{width:fo,height:ho},ref:ro},reactExports.createElement("img",__assign$4({},lo,{onLoad:so,onError:ao,key:KEY_PREFIX+eo.src||"",className:Oo.image,ref:useMergedRefs(no,to),src:co,alt:uo,role:_o,loading:Ao})))});ImageBase.displayName="ImageBase";function useCoverStyle(eo,to,ro,no){var oo=reactExports.useRef(to),io=reactExports.useRef();return(io===void 0||oo.current===ImageLoadState.notLoaded&&to===ImageLoadState.loaded)&&(io.current=computeCoverStyle(eo,to,ro,no)),oo.current=to,io.current}function computeCoverStyle(eo,to,ro,no){var oo=eo.imageFit,io=eo.width,so=eo.height;if(eo.coverStyle!==void 0)return eo.coverStyle;if(to===ImageLoadState.loaded&&(oo===ImageFit.cover||oo===ImageFit.contain||oo===ImageFit.centerContain||oo===ImageFit.centerCover)&&ro.current&&no.current){var ao=void 0;typeof io=="number"&&typeof so=="number"&&oo!==ImageFit.centerContain&&oo!==ImageFit.centerCover?ao=io/so:ao=no.current.clientWidth/no.current.clientHeight;var lo=ro.current.naturalWidth/ro.current.naturalHeight;if(lo>ao)return ImageCoverStyle.landscape}return ImageCoverStyle.portrait}var GlobalClassNames$5={root:"ms-Image",rootMaximizeFrame:"ms-Image--maximizeFrame",image:"ms-Image-image",imageCenter:"ms-Image-image--center",imageContain:"ms-Image-image--contain",imageCover:"ms-Image-image--cover",imageCenterContain:"ms-Image-image--centerContain",imageCenterCover:"ms-Image-image--centerCover",imageNone:"ms-Image-image--none",imageLandscape:"ms-Image-image--landscape",imagePortrait:"ms-Image-image--portrait"},getStyles$6=function(eo){var to=eo.className,ro=eo.width,no=eo.height,oo=eo.maximizeFrame,io=eo.isLoaded,so=eo.shouldFadeIn,ao=eo.shouldStartVisible,lo=eo.isLandscape,co=eo.isCenter,uo=eo.isContain,fo=eo.isCover,ho=eo.isCenterContain,po=eo.isCenterCover,go=eo.isNone,vo=eo.isError,yo=eo.isNotImageFit,xo=eo.theme,_o=getGlobalClassNames(GlobalClassNames$5,xo),Eo={position:"absolute",left:"50% /* @noflip */",top:"50%",transform:"translate(-50%,-50%)"},So=getWindow(),ko=So!==void 0&&So.navigator.msMaxTouchPoints===void 0,Ao=uo&&lo||fo&&!lo?{width:"100%",height:"auto"}:{width:"auto",height:"100%"};return{root:[_o.root,xo.fonts.medium,{overflow:"hidden"},oo&&[_o.rootMaximizeFrame,{height:"100%",width:"100%"}],io&&so&&!ao&&AnimationClassNames.fadeIn400,(co||uo||fo||ho||po)&&{position:"relative"},to],image:[_o.image,{display:"block",opacity:0},io&&["is-loaded",{opacity:1}],co&&[_o.imageCenter,Eo],uo&&[_o.imageContain,ko&&{width:"100%",height:"100%",objectFit:"contain"},!ko&&Ao,!ko&&Eo],fo&&[_o.imageCover,ko&&{width:"100%",height:"100%",objectFit:"cover"},!ko&&Ao,!ko&&Eo],ho&&[_o.imageCenterContain,lo&&{maxWidth:"100%"},!lo&&{maxHeight:"100%"},Eo],po&&[_o.imageCenterCover,lo&&{maxHeight:"100%"},!lo&&{maxWidth:"100%"},Eo],go&&[_o.imageNone,{width:"auto",height:"auto"}],yo&&[!!ro&&!no&&{height:"auto",width:"100%"},!ro&&!!no&&{height:"100%",width:"auto"},!!ro&&!!no&&{height:"100%",width:"100%"}],lo&&_o.imageLandscape,!lo&&_o.imagePortrait,!io&&"is-notLoaded",so&&"is-fadeIn",vo&&"is-error"]}},Image$1=styled(ImageBase,getStyles$6,void 0,{scope:"Image"},!0);Image$1.displayName="Image";var classNames=mergeStyleSets({root:{display:"inline-block"},placeholder:["ms-Icon-placeHolder",{width:"1em"}],image:["ms-Icon-imageContainer",{overflow:"hidden"}]}),MS_ICON="ms-Icon",getStyles$5=function(eo){var to=eo.className,ro=eo.iconClassName,no=eo.isPlaceholder,oo=eo.isImage,io=eo.styles;return{root:[no&&classNames.placeholder,classNames.root,oo&&classNames.image,ro,to,io&&io.root,io&&io.imageContainer]}},getIconContent=memoizeFunction(function(eo){var to=getIcon(eo)||{subset:{},code:void 0},ro=to.code,no=to.subset;return ro?{children:ro,iconClassName:no.className,fontFamily:no.fontFace&&no.fontFace.fontFamily,mergeImageProps:no.mergeImageProps}:null},void 0,!0),FontIcon=function(eo){var to=eo.iconName,ro=eo.className,no=eo.style,oo=no===void 0?{}:no,io=getIconContent(to)||{},so=io.iconClassName,ao=io.children,lo=io.fontFamily,co=io.mergeImageProps,uo=getNativeProps(eo,htmlElementProperties),fo=eo["aria-label"]||eo.title,ho=eo["aria-label"]||eo["aria-labelledby"]||eo.title?{role:co?void 0:"img"}:{"aria-hidden":!0},po=ao;return co&&typeof ao=="object"&&typeof ao.props=="object"&&fo&&(po=reactExports.cloneElement(ao,{alt:fo})),reactExports.createElement("i",__assign$4({"data-icon-name":to},ho,uo,co?{title:void 0,"aria-label":void 0}:{},{className:css$3(MS_ICON,classNames.root,so,!to&&classNames.placeholder,ro),style:__assign$4({fontFamily:lo},oo)}),po)};memoizeFunction(function(eo,to,ro){return FontIcon({iconName:eo,className:to,"aria-label":ro})});var getClassNames$5=classNamesFunction({cacheSize:100}),IconBase=function(eo){__extends$3(to,eo);function to(ro){var no=eo.call(this,ro)||this;return no._onImageLoadingStateChange=function(oo){no.props.imageProps&&no.props.imageProps.onLoadingStateChange&&no.props.imageProps.onLoadingStateChange(oo),oo===ImageLoadState.error&&no.setState({imageLoadError:!0})},no.state={imageLoadError:!1},no}return to.prototype.render=function(){var ro=this.props,no=ro.children,oo=ro.className,io=ro.styles,so=ro.iconName,ao=ro.imageErrorAs,lo=ro.theme,co=typeof so=="string"&&so.length===0,uo=!!this.props.imageProps||this.props.iconType===IconType.image||this.props.iconType===IconType.Image,fo=getIconContent(so)||{},ho=fo.iconClassName,po=fo.children,go=fo.mergeImageProps,vo=getClassNames$5(io,{theme:lo,className:oo,iconClassName:ho,isImage:uo,isPlaceholder:co}),yo=uo?"span":"i",xo=getNativeProps(this.props,htmlElementProperties,["aria-label"]),_o=this.state.imageLoadError,Eo=__assign$4(__assign$4({},this.props.imageProps),{onLoadingStateChange:this._onImageLoadingStateChange}),So=_o&&ao||Image$1,ko=this.props["aria-label"]||this.props.ariaLabel,Ao=Eo.alt||ko||this.props.title,Co=!!(Ao||this.props["aria-labelledby"]||Eo["aria-label"]||Eo["aria-labelledby"]),Oo=Co?{role:uo||go?void 0:"img","aria-label":uo||go?void 0:Ao}:{"aria-hidden":!0},wo=po;return go&&po&&typeof po=="object"&&Ao&&(wo=reactExports.cloneElement(po,{alt:Ao})),reactExports.createElement(yo,__assign$4({"data-icon-name":so},Oo,xo,go?{title:void 0,"aria-label":void 0}:{},{className:vo.root}),uo?reactExports.createElement(So,__assign$4({},Eo)):no||wo)},to}(reactExports.Component),Icon=styled(IconBase,getStyles$5,void 0,{scope:"Icon"},!0);Icon.displayName="Icon";var FocusZoneTabbableElements={none:0,all:1,inputOnly:2},FocusZoneDirection;(function(eo){eo[eo.vertical=0]="vertical",eo[eo.horizontal=1]="horizontal",eo[eo.bidirectional=2]="bidirectional",eo[eo.domOrder=3]="domOrder"})(FocusZoneDirection||(FocusZoneDirection={}));var IS_FOCUSABLE_ATTRIBUTE="data-is-focusable",IS_ENTER_DISABLED_ATTRIBUTE="data-disable-click-on-enter",FOCUSZONE_ID_ATTRIBUTE="data-focuszone-id",TABINDEX="tabindex",NO_VERTICAL_WRAP="data-no-vertical-wrap",NO_HORIZONTAL_WRAP="data-no-horizontal-wrap",LARGE_DISTANCE_FROM_CENTER=999999999,LARGE_NEGATIVE_DISTANCE_FROM_CENTER=-999999999,focusZoneStyles,focusZoneClass="ms-FocusZone";function raiseClickFromKeyboardEvent(eo,to){var ro;typeof MouseEvent=="function"?ro=new MouseEvent("click",{ctrlKey:to==null?void 0:to.ctrlKey,metaKey:to==null?void 0:to.metaKey,shiftKey:to==null?void 0:to.shiftKey,altKey:to==null?void 0:to.altKey,bubbles:to==null?void 0:to.bubbles,cancelable:to==null?void 0:to.cancelable}):(ro=document.createEvent("MouseEvents"),ro.initMouseEvent("click",to?to.bubbles:!1,to?to.cancelable:!1,window,0,0,0,0,0,to?to.ctrlKey:!1,to?to.altKey:!1,to?to.shiftKey:!1,to?to.metaKey:!1,0,null)),eo.dispatchEvent(ro)}function getRootClass(){return focusZoneStyles||(focusZoneStyles=mergeStyles$1({selectors:{":focus":{outline:"none"}}},focusZoneClass)),focusZoneStyles}var _allInstances={},_outerZones=new Set,ALLOWED_INPUT_TYPES=["text","number","password","email","tel","url","search","textarea"],ALLOW_VIRTUAL_ELEMENTS=!1,FocusZone=function(eo){__extends$3(to,eo);function to(ro){var no=this,oo,io,so,ao;no=eo.call(this,ro)||this,no._root=reactExports.createRef(),no._mergedRef=createMergedRef(),no._onFocus=function(co){if(!no._portalContainsElement(co.target)){var uo=no.props,fo=uo.onActiveElementChanged,ho=uo.doNotAllowFocusEventToPropagate,po=uo.stopFocusPropagation,go=uo.onFocusNotification,vo=uo.onFocus,yo=uo.shouldFocusInnerElementWhenReceivedFocus,xo=uo.defaultTabbableElement,_o=no._isImmediateDescendantOfZone(co.target),Eo;if(_o)Eo=co.target;else for(var So=co.target;So&&So!==no._root.current;){if(isElementTabbable(So)&&no._isImmediateDescendantOfZone(So)){Eo=So;break}So=getParent(So,ALLOW_VIRTUAL_ELEMENTS)}if(yo&&co.target===no._root.current){var ko=xo&&typeof xo=="function"&&no._root.current&&xo(no._root.current);ko&&isElementTabbable(ko)?(Eo=ko,ko.focus()):(no.focus(!0),no._activeElement&&(Eo=null))}var Ao=!no._activeElement;Eo&&Eo!==no._activeElement&&((_o||Ao)&&no._setFocusAlignment(Eo,!0,!0),no._activeElement=Eo,Ao&&no._updateTabIndexes()),fo&&fo(no._activeElement,co),(po||ho)&&co.stopPropagation(),vo?vo(co):go&&go()}},no._onBlur=function(){no._setParkedFocus(!1)},no._onMouseDown=function(co){if(!no._portalContainsElement(co.target)){var uo=no.props.disabled;if(!uo){for(var fo=co.target,ho=[];fo&&fo!==no._root.current;)ho.push(fo),fo=getParent(fo,ALLOW_VIRTUAL_ELEMENTS);for(;ho.length&&(fo=ho.pop(),fo&&isElementTabbable(fo)&&no._setActiveElement(fo,!0),!isElementFocusZone(fo)););}}},no._onKeyDown=function(co,uo){if(!no._portalContainsElement(co.target)){var fo=no.props,ho=fo.direction,po=fo.disabled,go=fo.isInnerZoneKeystroke,vo=fo.pagingSupportDisabled,yo=fo.shouldEnterInnerZone;if(!po&&(no.props.onKeyDown&&no.props.onKeyDown(co),!co.isDefaultPrevented()&&!(no._getDocument().activeElement===no._root.current&&no._isInnerZone))){if((yo&&yo(co)||go&&go(co))&&no._isImmediateDescendantOfZone(co.target)){var xo=no._getFirstInnerZone();if(xo){if(!xo.focus(!0))return}else if(isElementFocusSubZone(co.target)){if(!no.focusElement(getNextElement(co.target,co.target.firstChild,!0)))return}else return}else{if(co.altKey)return;switch(co.which){case KeyCodes$1.space:if(no._shouldRaiseClicksOnSpace&&no._tryInvokeClickForFocusable(co.target,co))break;return;case KeyCodes$1.left:if(ho!==FocusZoneDirection.vertical&&(no._preventDefaultWhenHandled(co),no._moveFocusLeft(uo)))break;return;case KeyCodes$1.right:if(ho!==FocusZoneDirection.vertical&&(no._preventDefaultWhenHandled(co),no._moveFocusRight(uo)))break;return;case KeyCodes$1.up:if(ho!==FocusZoneDirection.horizontal&&(no._preventDefaultWhenHandled(co),no._moveFocusUp()))break;return;case KeyCodes$1.down:if(ho!==FocusZoneDirection.horizontal&&(no._preventDefaultWhenHandled(co),no._moveFocusDown()))break;return;case KeyCodes$1.pageDown:if(!vo&&no._moveFocusPaging(!0))break;return;case KeyCodes$1.pageUp:if(!vo&&no._moveFocusPaging(!1))break;return;case KeyCodes$1.tab:if(no.props.allowTabKey||no.props.handleTabKey===FocusZoneTabbableElements.all||no.props.handleTabKey===FocusZoneTabbableElements.inputOnly&&no._isElementInput(co.target)){var _o=!1;if(no._processingTabKey=!0,ho===FocusZoneDirection.vertical||!no._shouldWrapFocus(no._activeElement,NO_HORIZONTAL_WRAP))_o=co.shiftKey?no._moveFocusUp():no._moveFocusDown();else{var Eo=getRTL$1(uo)?!co.shiftKey:co.shiftKey;_o=Eo?no._moveFocusLeft(uo):no._moveFocusRight(uo)}if(no._processingTabKey=!1,_o)break;no.props.shouldResetActiveElementWhenTabFromZone&&(no._activeElement=null)}return;case KeyCodes$1.home:if(no._isContentEditableElement(co.target)||no._isElementInput(co.target)&&!no._shouldInputLoseFocus(co.target,!1))return!1;var So=no._root.current&&no._root.current.firstChild;if(no._root.current&&So&&no.focusElement(getNextElement(no._root.current,So,!0)))break;return;case KeyCodes$1.end:if(no._isContentEditableElement(co.target)||no._isElementInput(co.target)&&!no._shouldInputLoseFocus(co.target,!0))return!1;var ko=no._root.current&&no._root.current.lastChild;if(no._root.current&&no.focusElement(getPreviousElement(no._root.current,ko,!0,!0,!0)))break;return;case KeyCodes$1.enter:if(no._shouldRaiseClicksOnEnter&&no._tryInvokeClickForFocusable(co.target,co))break;return;default:return}}co.preventDefault(),co.stopPropagation()}}},no._getHorizontalDistanceFromCenter=function(co,uo,fo){var ho=no._focusAlignment.left||no._focusAlignment.x||0,po=Math.floor(fo.top),go=Math.floor(uo.bottom),vo=Math.floor(fo.bottom),yo=Math.floor(uo.top),xo=co&&po>go,_o=!co&&vo=fo.left&&ho<=fo.left+fo.width?0:Math.abs(fo.left+fo.width/2-ho):no._shouldWrapFocus(no._activeElement,NO_VERTICAL_WRAP)?LARGE_DISTANCE_FROM_CENTER:LARGE_NEGATIVE_DISTANCE_FROM_CENTER},initializeComponentRef(no),no._id=getId("FocusZone"),no._focusAlignment={left:0,top:0},no._processingTabKey=!1;var lo=(io=(oo=ro.shouldRaiseClicks)!==null&&oo!==void 0?oo:to.defaultProps.shouldRaiseClicks)!==null&&io!==void 0?io:!0;return no._shouldRaiseClicksOnEnter=(so=ro.shouldRaiseClicksOnEnter)!==null&&so!==void 0?so:lo,no._shouldRaiseClicksOnSpace=(ao=ro.shouldRaiseClicksOnSpace)!==null&&ao!==void 0?ao:lo,no}return to.getOuterZones=function(){return _outerZones.size},to._onKeyDownCapture=function(ro){ro.which===KeyCodes$1.tab&&_outerZones.forEach(function(no){return no._updateTabIndexes()})},to.prototype.componentDidMount=function(){var ro=this._root.current;if(_allInstances[this._id]=this,ro){for(var no=getParent(ro,ALLOW_VIRTUAL_ELEMENTS);no&&no!==this._getDocument().body&&no.nodeType===1;){if(isElementFocusZone(no)){this._isInnerZone=!0;break}no=getParent(no,ALLOW_VIRTUAL_ELEMENTS)}this._isInnerZone||(_outerZones.add(this),this._root.current&&this._root.current.addEventListener("keydown",to._onKeyDownCapture,!0)),this._root.current&&this._root.current.addEventListener("blur",this._onBlur,!0),this._updateTabIndexes(),this.props.defaultTabbableElement&&typeof this.props.defaultTabbableElement=="string"?this._activeElement=this._getDocument().querySelector(this.props.defaultTabbableElement):this.props.defaultActiveElement&&(this._activeElement=this._getDocument().querySelector(this.props.defaultActiveElement)),this.props.shouldFocusOnMount&&this.focus()}},to.prototype.componentDidUpdate=function(){var ro=this._root.current,no=this._getDocument();if((this._activeElement&&!elementContains(this._root.current,this._activeElement,ALLOW_VIRTUAL_ELEMENTS)||this._defaultFocusElement&&!elementContains(this._root.current,this._defaultFocusElement,ALLOW_VIRTUAL_ELEMENTS))&&(this._activeElement=null,this._defaultFocusElement=null,this._updateTabIndexes()),!this.props.preventFocusRestoration&&no&&this._lastIndexPath&&(no.activeElement===no.body||no.activeElement===null||no.activeElement===ro)){var oo=getFocusableByIndexPath(ro,this._lastIndexPath);oo?(this._setActiveElement(oo,!0),oo.focus(),this._setParkedFocus(!1)):this._setParkedFocus(!0)}},to.prototype.componentWillUnmount=function(){delete _allInstances[this._id],this._isInnerZone||(_outerZones.delete(this),this._root.current&&this._root.current.removeEventListener("keydown",to._onKeyDownCapture,!0)),this._root.current&&this._root.current.removeEventListener("blur",this._onBlur,!0),this._activeElement=null,this._defaultFocusElement=null},to.prototype.render=function(){var ro=this,no=this.props,oo=no.as,io=no.elementType,so=no.rootProps,ao=no.ariaDescribedBy,lo=no.ariaLabelledBy,co=no.className,uo=getNativeProps(this.props,htmlElementProperties),fo=oo||io||"div";this._evaluateFocusBeforeRender();var ho=getTheme();return reactExports.createElement(fo,__assign$4({"aria-labelledby":lo,"aria-describedby":ao},uo,so,{className:css$3(getRootClass(),co),ref:this._mergedRef(this.props.elementRef,this._root),"data-focuszone-id":this._id,onKeyDown:function(po){return ro._onKeyDown(po,ho)},onFocus:this._onFocus,onMouseDownCapture:this._onMouseDown}),this.props.children)},to.prototype.focus=function(ro,no){if(ro===void 0&&(ro=!1),no===void 0&&(no=!1),this._root.current)if(!ro&&this._root.current.getAttribute(IS_FOCUSABLE_ATTRIBUTE)==="true"&&this._isInnerZone){var oo=this._getOwnerZone(this._root.current);if(oo!==this._root.current){var io=_allInstances[oo.getAttribute(FOCUSZONE_ID_ATTRIBUTE)];return!!io&&io.focusElement(this._root.current)}return!1}else{if(!ro&&this._activeElement&&elementContains(this._root.current,this._activeElement)&&isElementTabbable(this._activeElement)&&(!no||isElementVisibleAndNotHidden(this._activeElement)))return this._activeElement.focus(),!0;var so=this._root.current.firstChild;return this.focusElement(getNextElement(this._root.current,so,!0,void 0,void 0,void 0,void 0,void 0,no))}return!1},to.prototype.focusLast=function(){if(this._root.current){var ro=this._root.current&&this._root.current.lastChild;return this.focusElement(getPreviousElement(this._root.current,ro,!0,!0,!0))}return!1},to.prototype.focusElement=function(ro,no){var oo=this.props,io=oo.onBeforeFocus,so=oo.shouldReceiveFocus;return so&&!so(ro)||io&&!io(ro)?!1:ro?(this._setActiveElement(ro,no),this._activeElement&&this._activeElement.focus(),!0):!1},to.prototype.setFocusAlignment=function(ro){this._focusAlignment=ro},Object.defineProperty(to.prototype,"defaultFocusElement",{get:function(){return this._defaultFocusElement},enumerable:!1,configurable:!0}),Object.defineProperty(to.prototype,"activeElement",{get:function(){return this._activeElement},enumerable:!1,configurable:!0}),to.prototype._evaluateFocusBeforeRender=function(){var ro=this._root.current,no=this._getDocument();if(no){var oo=no.activeElement;if(oo!==ro){var io=elementContains(ro,oo,!1);this._lastIndexPath=io?getElementIndexPath(ro,oo):void 0}}},to.prototype._setParkedFocus=function(ro){var no=this._root.current;no&&this._isParked!==ro&&(this._isParked=ro,ro?(this.props.allowFocusRoot||(this._parkedTabIndex=no.getAttribute("tabindex"),no.setAttribute("tabindex","-1")),no.focus()):this.props.allowFocusRoot||(this._parkedTabIndex?(no.setAttribute("tabindex",this._parkedTabIndex),this._parkedTabIndex=void 0):no.removeAttribute("tabindex")))},to.prototype._setActiveElement=function(ro,no){var oo=this._activeElement;this._activeElement=ro,oo&&(isElementFocusZone(oo)&&this._updateTabIndexes(oo),oo.tabIndex=-1),this._activeElement&&((!this._focusAlignment||no)&&this._setFocusAlignment(ro,!0,!0),this._activeElement.tabIndex=0)},to.prototype._preventDefaultWhenHandled=function(ro){this.props.preventDefaultWhenHandled&&ro.preventDefault()},to.prototype._tryInvokeClickForFocusable=function(ro,no){var oo=ro;if(oo===this._root.current)return!1;do{if(oo.tagName==="BUTTON"||oo.tagName==="A"||oo.tagName==="INPUT"||oo.tagName==="TEXTAREA"||oo.tagName==="SUMMARY")return!1;if(this._isImmediateDescendantOfZone(oo)&&oo.getAttribute(IS_FOCUSABLE_ATTRIBUTE)==="true"&&oo.getAttribute(IS_ENTER_DISABLED_ATTRIBUTE)!=="true")return raiseClickFromKeyboardEvent(oo,no),!0;oo=getParent(oo,ALLOW_VIRTUAL_ELEMENTS)}while(oo!==this._root.current);return!1},to.prototype._getFirstInnerZone=function(ro){if(ro=ro||this._activeElement||this._root.current,!ro)return null;if(isElementFocusZone(ro))return _allInstances[ro.getAttribute(FOCUSZONE_ID_ATTRIBUTE)];for(var no=ro.firstElementChild;no;){if(isElementFocusZone(no))return _allInstances[no.getAttribute(FOCUSZONE_ID_ATTRIBUTE)];var oo=this._getFirstInnerZone(no);if(oo)return oo;no=no.nextElementSibling}return null},to.prototype._moveFocus=function(ro,no,oo,io){io===void 0&&(io=!0);var so=this._activeElement,ao=-1,lo=void 0,co=!1,uo=this.props.direction===FocusZoneDirection.bidirectional;if(!so||!this._root.current||this._isElementInput(so)&&!this._shouldInputLoseFocus(so,ro))return!1;var fo=uo?so.getBoundingClientRect():null;do if(so=ro?getNextElement(this._root.current,so):getPreviousElement(this._root.current,so),uo){if(so){var ho=so.getBoundingClientRect(),po=no(fo,ho);if(po===-1&&ao===-1){lo=so;break}if(po>-1&&(ao===-1||po=0&&po<0)break}}else{lo=so;break}while(so);if(lo&&lo!==this._activeElement)co=!0,this.focusElement(lo);else if(this.props.isCircularNavigation&&io)return ro?this.focusElement(getNextElement(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(getPreviousElement(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return co},to.prototype._moveFocusDown=function(){var ro=this,no=-1,oo=this._focusAlignment.left||this._focusAlignment.x||0;return this._moveFocus(!0,function(io,so){var ao=-1,lo=Math.floor(so.top),co=Math.floor(io.bottom);return lo=co||lo===no)&&(no=lo,oo>=so.left&&oo<=so.left+so.width?ao=0:ao=Math.abs(so.left+so.width/2-oo)),ao)})?(this._setFocusAlignment(this._activeElement,!1,!0),!0):!1},to.prototype._moveFocusUp=function(){var ro=this,no=-1,oo=this._focusAlignment.left||this._focusAlignment.x||0;return this._moveFocus(!1,function(io,so){var ao=-1,lo=Math.floor(so.bottom),co=Math.floor(so.top),uo=Math.floor(io.top);return lo>uo?ro._shouldWrapFocus(ro._activeElement,NO_VERTICAL_WRAP)?LARGE_DISTANCE_FROM_CENTER:LARGE_NEGATIVE_DISTANCE_FROM_CENTER:((no===-1&&lo<=uo||co===no)&&(no=co,oo>=so.left&&oo<=so.left+so.width?ao=0:ao=Math.abs(so.left+so.width/2-oo)),ao)})?(this._setFocusAlignment(this._activeElement,!1,!0),!0):!1},to.prototype._moveFocusLeft=function(ro){var no=this,oo=this._shouldWrapFocus(this._activeElement,NO_HORIZONTAL_WRAP);return this._moveFocus(getRTL$1(ro),function(io,so){var ao=-1,lo;return getRTL$1(ro)?lo=parseFloat(so.top.toFixed(3))parseFloat(io.top.toFixed(3)),lo&&so.right<=io.right&&no.props.direction!==FocusZoneDirection.vertical?ao=io.right-so.right:oo||(ao=LARGE_NEGATIVE_DISTANCE_FROM_CENTER),ao},void 0,oo)?(this._setFocusAlignment(this._activeElement,!0,!1),!0):!1},to.prototype._moveFocusRight=function(ro){var no=this,oo=this._shouldWrapFocus(this._activeElement,NO_HORIZONTAL_WRAP);return this._moveFocus(!getRTL$1(ro),function(io,so){var ao=-1,lo;return getRTL$1(ro)?lo=parseFloat(so.bottom.toFixed(3))>parseFloat(io.top.toFixed(3)):lo=parseFloat(so.top.toFixed(3))=io.left&&no.props.direction!==FocusZoneDirection.vertical?ao=so.left-io.left:oo||(ao=LARGE_NEGATIVE_DISTANCE_FROM_CENTER),ao},void 0,oo)?(this._setFocusAlignment(this._activeElement,!0,!1),!0):!1},to.prototype._moveFocusPaging=function(ro,no){no===void 0&&(no=!0);var oo=this._activeElement;if(!oo||!this._root.current||this._isElementInput(oo)&&!this._shouldInputLoseFocus(oo,ro))return!1;var io=findScrollableParent(oo);if(!io)return!1;var so=-1,ao=void 0,lo=-1,co=-1,uo=io.clientHeight,fo=oo.getBoundingClientRect();do if(oo=ro?getNextElement(this._root.current,oo):getPreviousElement(this._root.current,oo),oo){var ho=oo.getBoundingClientRect(),po=Math.floor(ho.top),go=Math.floor(fo.bottom),vo=Math.floor(ho.bottom),yo=Math.floor(fo.top),xo=this._getHorizontalDistanceFromCenter(ro,fo,ho),_o=ro&&po>go+uo,Eo=!ro&&vo-1&&(ro&&po>lo?(lo=po,so=xo,ao=oo):!ro&&vo-1){var oo=ro.selectionStart,io=ro.selectionEnd,so=oo!==io,ao=ro.value,lo=ro.readOnly;if(so||oo>0&&!no&&!lo||oo!==ao.length&&no&&!lo||this.props.handleTabKey&&!(this.props.shouldInputLoseFocusOnArrowKey&&this.props.shouldInputLoseFocusOnArrowKey(ro)))return!1}return!0},to.prototype._shouldWrapFocus=function(ro,no){return this.props.checkForNoWrap?shouldWrapFocus(ro,no):!0},to.prototype._portalContainsElement=function(ro){return ro&&!!this._root.current&&portalContainsElement(ro,this._root.current)},to.prototype._getDocument=function(){return getDocument(this._root.current)},to.defaultProps={isCircularNavigation:!1,direction:FocusZoneDirection.bidirectional,shouldRaiseClicks:!0},to}(reactExports.Component),ContextualMenuItemType;(function(eo){eo[eo.Normal=0]="Normal",eo[eo.Divider=1]="Divider",eo[eo.Header=2]="Header",eo[eo.Section=3]="Section"})(ContextualMenuItemType||(ContextualMenuItemType={}));function getIsChecked(eo){return eo.canCheck?!!(eo.isChecked||eo.checked):typeof eo.isChecked=="boolean"?eo.isChecked:typeof eo.checked=="boolean"?eo.checked:null}function hasSubmenu(eo){return!!(eo.subMenuProps||eo.items)}function isItemDisabled(eo){return!!(eo.isDisabled||eo.disabled)}function getMenuItemAriaRole(eo){var to=getIsChecked(eo),ro=to!==null;return ro?"menuitemcheckbox":"menuitem"}var defaultIconRenderer=function(eo){var to=eo.item,ro=eo.classNames,no=to.iconProps;return reactExports.createElement(Icon,__assign$4({},no,{className:ro.icon}))},renderItemIcon=function(eo){var to=eo.item,ro=eo.hasIcons;return ro?to.onRenderIcon?to.onRenderIcon(eo,defaultIconRenderer):defaultIconRenderer(eo):null},renderCheckMarkIcon=function(eo){var to=eo.onCheckmarkClick,ro=eo.item,no=eo.classNames,oo=getIsChecked(ro);if(to){var io=function(so){return to(ro,so)};return reactExports.createElement(Icon,{iconName:ro.canCheck!==!1&&oo?"CheckMark":"",className:no.checkmarkIcon,onClick:io})}return null},renderItemName=function(eo){var to=eo.item,ro=eo.classNames;return to.text||to.name?reactExports.createElement("span",{className:ro.label},to.text||to.name):null},renderSecondaryText=function(eo){var to=eo.item,ro=eo.classNames;return to.secondaryText?reactExports.createElement("span",{className:ro.secondaryText},to.secondaryText):null},renderSubMenuIcon=function(eo){var to=eo.item,ro=eo.classNames,no=eo.theme;return hasSubmenu(to)?reactExports.createElement(Icon,__assign$4({iconName:getRTL$1(no)?"ChevronLeft":"ChevronRight"},to.submenuIconProps,{className:ro.subMenuIcon})):null},ContextualMenuItemBase=function(eo){__extends$3(to,eo);function to(ro){var no=eo.call(this,ro)||this;return no.openSubMenu=function(){var oo=no.props,io=oo.item,so=oo.openSubMenu,ao=oo.getSubmenuTarget;if(ao){var lo=ao();hasSubmenu(io)&&so&&lo&&so(io,lo)}},no.dismissSubMenu=function(){var oo=no.props,io=oo.item,so=oo.dismissSubMenu;hasSubmenu(io)&&so&&so()},no.dismissMenu=function(oo){var io=no.props.dismissMenu;io&&io(void 0,oo)},initializeComponentRef(no),no}return to.prototype.render=function(){var ro=this.props,no=ro.item,oo=ro.classNames,io=no.onRenderContent||this._renderLayout;return reactExports.createElement("div",{className:no.split?oo.linkContentMenu:oo.linkContent},io(this.props,{renderCheckMarkIcon,renderItemIcon,renderItemName,renderSecondaryText,renderSubMenuIcon}))},to.prototype._renderLayout=function(ro,no){return reactExports.createElement(reactExports.Fragment,null,no.renderCheckMarkIcon(ro),no.renderItemIcon(ro),no.renderItemName(ro),no.renderSecondaryText(ro),no.renderSubMenuIcon(ro))},to}(reactExports.Component),getDividerClassNames=memoizeFunction(function(eo){return mergeStyleSets({wrapper:{display:"inline-flex",height:"100%",alignItems:"center"},divider:{width:1,height:"100%",backgroundColor:eo.palette.neutralTertiaryAlt}})}),CONTEXTUAL_MENU_ITEM_HEIGHT=36,MediumScreenSelector$1=getScreenSelector(0,ScreenWidthMaxMedium),getMenuItemStyles=memoizeFunction(function(eo){var to,ro,no,oo,io,so=eo.semanticColors,ao=eo.fonts,lo=eo.palette,co=so.menuItemBackgroundHovered,uo=so.menuItemTextHovered,fo=so.menuItemBackgroundPressed,ho=so.bodyDivider,po={item:[ao.medium,{color:so.bodyText,position:"relative",boxSizing:"border-box"}],divider:{display:"block",height:"1px",backgroundColor:ho,position:"relative"},root:[getFocusStyle(eo),ao.medium,{color:so.bodyText,backgroundColor:"transparent",border:"none",width:"100%",height:CONTEXTUAL_MENU_ITEM_HEIGHT,lineHeight:CONTEXTUAL_MENU_ITEM_HEIGHT,display:"block",cursor:"pointer",padding:"0px 8px 0 4px",textAlign:"left"}],rootDisabled:{color:so.disabledBodyText,cursor:"default",pointerEvents:"none",selectors:(to={},to[HighContrastSelector]={color:"GrayText",opacity:1},to)},rootHovered:{backgroundColor:co,color:uo,selectors:{".ms-ContextualMenu-icon":{color:lo.themeDarkAlt},".ms-ContextualMenu-submenuIcon":{color:lo.neutralPrimary}}},rootFocused:{backgroundColor:lo.white},rootChecked:{selectors:{".ms-ContextualMenu-checkmarkIcon":{color:lo.neutralPrimary}}},rootPressed:{backgroundColor:fo,selectors:{".ms-ContextualMenu-icon":{color:lo.themeDark},".ms-ContextualMenu-submenuIcon":{color:lo.neutralPrimary}}},rootExpanded:{backgroundColor:fo,color:so.bodyTextChecked,selectors:(ro={".ms-ContextualMenu-submenuIcon":(no={},no[HighContrastSelector]={color:"inherit"},no)},ro[HighContrastSelector]=__assign$4({},getHighContrastNoAdjustStyle()),ro)},linkContent:{whiteSpace:"nowrap",height:"inherit",display:"flex",alignItems:"center",maxWidth:"100%"},anchorLink:{padding:"0px 8px 0 4px",textRendering:"auto",color:"inherit",letterSpacing:"normal",wordSpacing:"normal",textTransform:"none",textIndent:"0px",textShadow:"none",textDecoration:"none",boxSizing:"border-box"},label:{margin:"0 4px",verticalAlign:"middle",display:"inline-block",flexGrow:"1",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},secondaryText:{color:eo.palette.neutralSecondary,paddingLeft:"20px",textAlign:"right"},icon:{display:"inline-block",minHeight:"1px",maxHeight:CONTEXTUAL_MENU_ITEM_HEIGHT,fontSize:IconFontSizes.medium,width:IconFontSizes.medium,margin:"0 4px",verticalAlign:"middle",flexShrink:"0",selectors:(oo={},oo[MediumScreenSelector$1]={fontSize:IconFontSizes.large,width:IconFontSizes.large},oo)},iconColor:{color:so.menuIcon},iconDisabled:{color:so.disabledBodyText},checkmarkIcon:{color:so.bodySubtext},subMenuIcon:{height:CONTEXTUAL_MENU_ITEM_HEIGHT,lineHeight:CONTEXTUAL_MENU_ITEM_HEIGHT,color:lo.neutralSecondary,textAlign:"center",display:"inline-block",verticalAlign:"middle",flexShrink:"0",fontSize:IconFontSizes.small,selectors:(io={":hover":{color:lo.neutralPrimary},":active":{color:lo.neutralPrimary}},io[MediumScreenSelector$1]={fontSize:IconFontSizes.medium},io)},splitButtonFlexContainer:[getFocusStyle(eo),{display:"flex",height:CONTEXTUAL_MENU_ITEM_HEIGHT,flexWrap:"nowrap",justifyContent:"center",alignItems:"flex-start"}]};return concatStyleSets(po)}),CONTEXTUAL_SPLIT_MENU_MINWIDTH="28px",MediumScreenSelector=getScreenSelector(0,ScreenWidthMaxMedium),getSplitButtonVerticalDividerClassNames=memoizeFunction(function(eo){var to;return mergeStyleSets(getDividerClassNames(eo),{wrapper:{position:"absolute",right:28,selectors:(to={},to[MediumScreenSelector]={right:32},to)},divider:{height:16,width:1}})}),GlobalClassNames$4={item:"ms-ContextualMenu-item",divider:"ms-ContextualMenu-divider",root:"ms-ContextualMenu-link",isChecked:"is-checked",isExpanded:"is-expanded",isDisabled:"is-disabled",linkContent:"ms-ContextualMenu-linkContent",linkContentMenu:"ms-ContextualMenu-linkContent",icon:"ms-ContextualMenu-icon",iconColor:"ms-ContextualMenu-iconColor",checkmarkIcon:"ms-ContextualMenu-checkmarkIcon",subMenuIcon:"ms-ContextualMenu-submenuIcon",label:"ms-ContextualMenu-itemText",secondaryText:"ms-ContextualMenu-secondaryText",splitMenu:"ms-ContextualMenu-splitMenu",screenReaderText:"ms-ContextualMenu-screenReaderText"},getItemClassNames=memoizeFunction(function(eo,to,ro,no,oo,io,so,ao,lo,co,uo,fo){var ho,po,go,vo,yo=getMenuItemStyles(eo),xo=getGlobalClassNames(GlobalClassNames$4,eo);return mergeStyleSets({item:[xo.item,yo.item,so],divider:[xo.divider,yo.divider,ao],root:[xo.root,yo.root,no&&[xo.isChecked,yo.rootChecked],oo&&yo.anchorLink,ro&&[xo.isExpanded,yo.rootExpanded],to&&[xo.isDisabled,yo.rootDisabled],!to&&!ro&&[{selectors:(ho={":hover":yo.rootHovered,":active":yo.rootPressed},ho[".".concat(IsFocusVisibleClassName," &:focus, .").concat(IsFocusVisibleClassName," &:focus:hover")]=yo.rootFocused,ho[".".concat(IsFocusVisibleClassName," &:hover")]={background:"inherit;"},ho)}],fo],splitPrimary:[yo.root,{width:"calc(100% - ".concat(CONTEXTUAL_SPLIT_MENU_MINWIDTH,")")},no&&["is-checked",yo.rootChecked],(to||uo)&&["is-disabled",yo.rootDisabled],!(to||uo)&&!no&&[{selectors:(po={":hover":yo.rootHovered},po[":hover ~ .".concat(xo.splitMenu)]=yo.rootHovered,po[":active"]=yo.rootPressed,po[".".concat(IsFocusVisibleClassName," &:focus, .").concat(IsFocusVisibleClassName," &:focus:hover")]=yo.rootFocused,po[".".concat(IsFocusVisibleClassName," &:hover")]={background:"inherit;"},po)}]],splitMenu:[xo.splitMenu,yo.root,{flexBasis:"0",padding:"0 8px",minWidth:CONTEXTUAL_SPLIT_MENU_MINWIDTH},ro&&["is-expanded",yo.rootExpanded],to&&["is-disabled",yo.rootDisabled],!to&&!ro&&[{selectors:(go={":hover":yo.rootHovered,":active":yo.rootPressed},go[".".concat(IsFocusVisibleClassName," &:focus, .").concat(IsFocusVisibleClassName," &:focus:hover")]=yo.rootFocused,go[".".concat(IsFocusVisibleClassName," &:hover")]={background:"inherit;"},go)}]],anchorLink:yo.anchorLink,linkContent:[xo.linkContent,yo.linkContent],linkContentMenu:[xo.linkContentMenu,yo.linkContent,{justifyContent:"center"}],icon:[xo.icon,io&&yo.iconColor,yo.icon,lo,to&&[xo.isDisabled,yo.iconDisabled]],iconColor:yo.iconColor,checkmarkIcon:[xo.checkmarkIcon,io&&yo.checkmarkIcon,yo.icon,lo],subMenuIcon:[xo.subMenuIcon,yo.subMenuIcon,co,ro&&{color:eo.palette.neutralPrimary},to&&[yo.iconDisabled]],label:[xo.label,yo.label],secondaryText:[xo.secondaryText,yo.secondaryText],splitContainer:[yo.splitButtonFlexContainer,!to&&!no&&[{selectors:(vo={},vo[".".concat(IsFocusVisibleClassName," &:focus, .").concat(IsFocusVisibleClassName," &:focus:hover")]=yo.rootFocused,vo)}]],screenReaderText:[xo.screenReaderText,yo.screenReaderText,hiddenContentStyle,{visibility:"hidden"}]})}),getItemStyles=function(eo){var to=eo.theme,ro=eo.disabled,no=eo.expanded,oo=eo.checked,io=eo.isAnchorLink,so=eo.knownIcon,ao=eo.itemClassName,lo=eo.dividerClassName,co=eo.iconClassName,uo=eo.subMenuClassName,fo=eo.primaryDisabled,ho=eo.className;return getItemClassNames(to,ro,no,oo,io,so,ao,lo,co,uo,fo,ho)},ContextualMenuItem=styled(ContextualMenuItemBase,getItemStyles,void 0,{scope:"ContextualMenuItem"}),ContextualMenuItemWrapper=function(eo){__extends$3(to,eo);function to(ro){var no=eo.call(this,ro)||this;return no._onItemMouseEnter=function(oo){var io=no.props,so=io.item,ao=io.onItemMouseEnter;ao&&ao(so,oo,oo.currentTarget)},no._onItemClick=function(oo){var io=no.props,so=io.item,ao=io.onItemClickBase;ao&&ao(so,oo,oo.currentTarget)},no._onItemMouseLeave=function(oo){var io=no.props,so=io.item,ao=io.onItemMouseLeave;ao&&ao(so,oo)},no._onItemKeyDown=function(oo){var io=no.props,so=io.item,ao=io.onItemKeyDown;ao&&ao(so,oo)},no._onItemMouseMove=function(oo){var io=no.props,so=io.item,ao=io.onItemMouseMove;ao&&ao(so,oo,oo.currentTarget)},no._getSubmenuTarget=function(){},initializeComponentRef(no),no}return to.prototype.shouldComponentUpdate=function(ro){return!shallowCompare(ro,this.props)},to}(reactExports.Component),KTP_PREFIX="ktp",KTP_SEPARATOR="-",DATAKTP_TARGET="data-ktp-target",DATAKTP_EXECUTE_TARGET="data-ktp-execute-target",KTP_LAYER_ID="ktp-layer-id",KeytipEvents;(function(eo){eo.KEYTIP_ADDED="keytipAdded",eo.KEYTIP_REMOVED="keytipRemoved",eo.KEYTIP_UPDATED="keytipUpdated",eo.PERSISTED_KEYTIP_ADDED="persistedKeytipAdded",eo.PERSISTED_KEYTIP_REMOVED="persistedKeytipRemoved",eo.PERSISTED_KEYTIP_EXECUTE="persistedKeytipExecute",eo.ENTER_KEYTIP_MODE="enterKeytipMode",eo.EXIT_KEYTIP_MODE="exitKeytipMode"})(KeytipEvents||(KeytipEvents={}));var KeytipManager=function(){function eo(){this.keytips={},this.persistedKeytips={},this.sequenceMapping={},this.inKeytipMode=!1,this.shouldEnterKeytipMode=!0,this.delayUpdatingKeytipChange=!1}return eo.getInstance=function(){return this._instance},eo.prototype.init=function(to){this.delayUpdatingKeytipChange=to},eo.prototype.register=function(to,ro){ro===void 0&&(ro=!1);var no=to;ro||(no=this.addParentOverflow(to),this.sequenceMapping[no.keySequences.toString()]=no);var oo=this._getUniqueKtp(no);if(ro?this.persistedKeytips[oo.uniqueID]=oo:this.keytips[oo.uniqueID]=oo,this.inKeytipMode||!this.delayUpdatingKeytipChange){var io=ro?KeytipEvents.PERSISTED_KEYTIP_ADDED:KeytipEvents.KEYTIP_ADDED;EventGroup.raise(this,io,{keytip:no,uniqueID:oo.uniqueID})}return oo.uniqueID},eo.prototype.update=function(to,ro){var no=this.addParentOverflow(to),oo=this._getUniqueKtp(no,ro),io=this.keytips[ro];io&&(oo.keytip.visible=io.keytip.visible,this.keytips[ro]=oo,delete this.sequenceMapping[io.keytip.keySequences.toString()],this.sequenceMapping[oo.keytip.keySequences.toString()]=oo.keytip,(this.inKeytipMode||!this.delayUpdatingKeytipChange)&&EventGroup.raise(this,KeytipEvents.KEYTIP_UPDATED,{keytip:oo.keytip,uniqueID:oo.uniqueID}))},eo.prototype.unregister=function(to,ro,no){no===void 0&&(no=!1),no?delete this.persistedKeytips[ro]:delete this.keytips[ro],!no&&delete this.sequenceMapping[to.keySequences.toString()];var oo=no?KeytipEvents.PERSISTED_KEYTIP_REMOVED:KeytipEvents.KEYTIP_REMOVED;(this.inKeytipMode||!this.delayUpdatingKeytipChange)&&EventGroup.raise(this,oo,{keytip:to,uniqueID:ro})},eo.prototype.enterKeytipMode=function(){EventGroup.raise(this,KeytipEvents.ENTER_KEYTIP_MODE)},eo.prototype.exitKeytipMode=function(){EventGroup.raise(this,KeytipEvents.EXIT_KEYTIP_MODE)},eo.prototype.getKeytips=function(){var to=this;return Object.keys(this.keytips).map(function(ro){return to.keytips[ro].keytip})},eo.prototype.addParentOverflow=function(to){var ro=__spreadArray$1([],to.keySequences,!0);if(ro.pop(),ro.length!==0){var no=this.sequenceMapping[ro.toString()];if(no&&no.overflowSetSequence)return __assign$4(__assign$4({},to),{overflowSetSequence:no.overflowSetSequence})}return to},eo.prototype.menuExecute=function(to,ro){EventGroup.raise(this,KeytipEvents.PERSISTED_KEYTIP_EXECUTE,{overflowButtonSequences:to,keytipSequences:ro})},eo.prototype._getUniqueKtp=function(to,ro){return ro===void 0&&(ro=getId()),{keytip:__assign$4({},to),uniqueID:ro}},eo._instance=new eo,eo}();function sequencesToID(eo){return eo.reduce(function(to,ro){return to+KTP_SEPARATOR+ro.split("").join(KTP_SEPARATOR)},KTP_PREFIX)}function mergeOverflows(eo,to){var ro=to.length,no=__spreadArray$1([],to,!0).pop(),oo=__spreadArray$1([],eo,!0);return addElementAtIndex(oo,ro-1,no)}function getAriaDescribedBy(eo){var to=" "+KTP_LAYER_ID;return eo.length?to+" "+sequencesToID(eo):to}function useKeytipData(eo){var to=reactExports.useRef(),ro=eo.keytipProps?__assign$4({disabled:eo.disabled},eo.keytipProps):void 0,no=useConst(KeytipManager.getInstance()),oo=usePrevious(eo);useIsomorphicLayoutEffect(function(){to.current&&ro&&((oo==null?void 0:oo.keytipProps)!==eo.keytipProps||(oo==null?void 0:oo.disabled)!==eo.disabled)&&no.update(ro,to.current)}),useIsomorphicLayoutEffect(function(){return ro&&(to.current=no.register(ro)),function(){ro&&no.unregister(ro,to.current)}},[]);var io={ariaDescribedBy:void 0,keytipId:void 0};return ro&&(io=getKeytipData(no,ro,eo.ariaDescribedBy)),io}function getKeytipData(eo,to,ro){var no=eo.addParentOverflow(to),oo=mergeAriaAttributeValues(ro,getAriaDescribedBy(no.keySequences)),io=__spreadArray$1([],no.keySequences,!0);no.overflowSetSequence&&(io=mergeOverflows(io,no.overflowSetSequence));var so=sequencesToID(io);return{ariaDescribedBy:oo,keytipId:so}}var KeytipData=function(eo){var to,ro=eo.children,no=__rest$1(eo,["children"]),oo=useKeytipData(no),io=oo.keytipId,so=oo.ariaDescribedBy;return ro((to={},to[DATAKTP_TARGET]=io,to[DATAKTP_EXECUTE_TARGET]=io,to["aria-describedby"]=so,to))},ContextualMenuAnchor=function(eo){__extends$3(to,eo);function to(){var ro=eo!==null&&eo.apply(this,arguments)||this;return ro._anchor=reactExports.createRef(),ro._getMemoizedMenuButtonKeytipProps=memoizeFunction(function(no){return __assign$4(__assign$4({},no),{hasMenu:!0})}),ro._getSubmenuTarget=function(){return ro._anchor.current?ro._anchor.current:void 0},ro._onItemClick=function(no){var oo=ro.props,io=oo.item,so=oo.onItemClick;so&&so(io,no)},ro._renderAriaDescription=function(no,oo){return no?reactExports.createElement("span",{id:ro._ariaDescriptionId,className:oo},no):null},ro}return to.prototype.render=function(){var ro=this,no=this.props,oo=no.item,io=no.classNames,so=no.index,ao=no.focusableElementIndex,lo=no.totalItemCount,co=no.hasCheckmarks,uo=no.hasIcons,fo=no.expandedMenuItemKey,ho=no.onItemClick,po=no.openSubMenu,go=no.dismissSubMenu,vo=no.dismissMenu,yo=ContextualMenuItem;this.props.item.contextualMenuItemAs&&(yo=composeComponentAs(this.props.item.contextualMenuItemAs,yo)),this.props.contextualMenuItemAs&&(yo=composeComponentAs(this.props.contextualMenuItemAs,yo));var xo=oo.rel;oo.target&&oo.target.toLowerCase()==="_blank"&&(xo=xo||"nofollow noopener noreferrer");var _o=hasSubmenu(oo),Eo=getNativeProps(oo,anchorProperties),So=isItemDisabled(oo),ko=oo.itemProps,Ao=oo.ariaDescription,Co=oo.keytipProps;Co&&_o&&(Co=this._getMemoizedMenuButtonKeytipProps(Co)),Ao&&(this._ariaDescriptionId=getId());var Oo=mergeAriaAttributeValues(oo.ariaDescribedBy,Ao?this._ariaDescriptionId:void 0,Eo["aria-describedby"]),wo={"aria-describedby":Oo};return reactExports.createElement("div",null,reactExports.createElement(KeytipData,{keytipProps:oo.keytipProps,ariaDescribedBy:Oo,disabled:So},function(Ro){return reactExports.createElement("a",__assign$4({},wo,Eo,Ro,{ref:ro._anchor,href:oo.href,target:oo.target,rel:xo,className:io.root,role:"menuitem","aria-haspopup":_o||void 0,"aria-expanded":_o?oo.key===fo:void 0,"aria-posinset":ao+1,"aria-setsize":lo,"aria-disabled":isItemDisabled(oo),style:oo.style,onClick:ro._onItemClick,onMouseEnter:ro._onItemMouseEnter,onMouseLeave:ro._onItemMouseLeave,onMouseMove:ro._onItemMouseMove,onKeyDown:_o?ro._onItemKeyDown:void 0}),reactExports.createElement(yo,__assign$4({componentRef:oo.componentRef,item:oo,classNames:io,index:so,onCheckmarkClick:co&&ho?ho:void 0,hasIcons:uo,openSubMenu:po,dismissSubMenu:go,dismissMenu:vo,getSubmenuTarget:ro._getSubmenuTarget},ko)),ro._renderAriaDescription(Ao,io.screenReaderText))}))},to}(ContextualMenuItemWrapper),ContextualMenuButton=function(eo){__extends$3(to,eo);function to(){var ro=eo!==null&&eo.apply(this,arguments)||this;return ro._btn=reactExports.createRef(),ro._getMemoizedMenuButtonKeytipProps=memoizeFunction(function(no){return __assign$4(__assign$4({},no),{hasMenu:!0})}),ro._renderAriaDescription=function(no,oo){return no?reactExports.createElement("span",{id:ro._ariaDescriptionId,className:oo},no):null},ro._getSubmenuTarget=function(){return ro._btn.current?ro._btn.current:void 0},ro}return to.prototype.render=function(){var ro=this,no=this.props,oo=no.item,io=no.classNames,so=no.index,ao=no.focusableElementIndex,lo=no.totalItemCount,co=no.hasCheckmarks,uo=no.hasIcons,fo=no.contextualMenuItemAs,ho=no.expandedMenuItemKey,po=no.onItemMouseDown,go=no.onItemClick,vo=no.openSubMenu,yo=no.dismissSubMenu,xo=no.dismissMenu,_o=ContextualMenuItem;oo.contextualMenuItemAs&&(_o=composeComponentAs(oo.contextualMenuItemAs,_o)),fo&&(_o=composeComponentAs(fo,_o));var Eo=getIsChecked(oo),So=Eo!==null,ko=getMenuItemAriaRole(oo),Ao=hasSubmenu(oo),Co=oo.itemProps,Oo=oo.ariaLabel,wo=oo.ariaDescription,Ro=getNativeProps(oo,buttonProperties);delete Ro.disabled;var Do=oo.role||ko;wo&&(this._ariaDescriptionId=getId());var $o=mergeAriaAttributeValues(oo.ariaDescribedBy,wo?this._ariaDescriptionId:void 0,Ro["aria-describedby"]),Mo={className:io.root,onClick:this._onItemClick,onKeyDown:Ao?this._onItemKeyDown:void 0,onMouseEnter:this._onItemMouseEnter,onMouseLeave:this._onItemMouseLeave,onMouseDown:function(Bo){return po?po(oo,Bo):void 0},onMouseMove:this._onItemMouseMove,href:oo.href,title:oo.title,"aria-label":Oo,"aria-describedby":$o,"aria-haspopup":Ao||void 0,"aria-expanded":Ao?oo.key===ho:void 0,"aria-posinset":ao+1,"aria-setsize":lo,"aria-disabled":isItemDisabled(oo),"aria-checked":(Do==="menuitemcheckbox"||Do==="menuitemradio")&&So?!!Eo:void 0,"aria-selected":Do==="menuitem"&&So?!!Eo:void 0,role:Do,style:oo.style},Po=oo.keytipProps;return Po&&Ao&&(Po=this._getMemoizedMenuButtonKeytipProps(Po)),reactExports.createElement(KeytipData,{keytipProps:Po,ariaDescribedBy:$o,disabled:isItemDisabled(oo)},function(Bo){return reactExports.createElement("button",__assign$4({ref:ro._btn},Ro,Mo,Bo),reactExports.createElement(_o,__assign$4({componentRef:oo.componentRef,item:oo,classNames:io,index:so,onCheckmarkClick:co&&go?go:void 0,hasIcons:uo,openSubMenu:vo,dismissSubMenu:yo,dismissMenu:xo,getSubmenuTarget:ro._getSubmenuTarget},Co)),ro._renderAriaDescription(wo,io.screenReaderText))})},to}(ContextualMenuItemWrapper),getStyles$4=function(eo){var to=eo.theme,ro=eo.getClassNames,no=eo.className;if(!to)throw new Error("Theme is undefined or null.");if(ro){var oo=ro(to);return{wrapper:[oo.wrapper],divider:[oo.divider]}}return{wrapper:[{display:"inline-flex",height:"100%",alignItems:"center"},no],divider:[{width:1,height:"100%",backgroundColor:to.palette.neutralTertiaryAlt}]}},getClassNames$4=classNamesFunction(),VerticalDividerBase=reactExports.forwardRef(function(eo,to){var ro=eo.styles,no=eo.theme,oo=eo.getClassNames,io=eo.className,so=getClassNames$4(ro,{theme:no,getClassNames:oo,className:io});return reactExports.createElement("span",{className:so.wrapper,ref:to},reactExports.createElement("span",{className:so.divider}))});VerticalDividerBase.displayName="VerticalDividerBase";var VerticalDivider=styled(VerticalDividerBase,getStyles$4,void 0,{scope:"VerticalDivider"}),TouchIdleDelay=500,ContextualMenuSplitButton=function(eo){__extends$3(to,eo);function to(ro){var no=eo.call(this,ro)||this;return no._getMemoizedMenuButtonKeytipProps=memoizeFunction(function(oo){return __assign$4(__assign$4({},oo),{hasMenu:!0})}),no._onItemKeyDown=function(oo){var io=no.props,so=io.item,ao=io.onItemKeyDown;oo.which===KeyCodes$1.enter?(no._executeItemClick(oo),oo.preventDefault(),oo.stopPropagation()):ao&&ao(so,oo)},no._getSubmenuTarget=function(){return no._splitButton},no._renderAriaDescription=function(oo,io){return oo?reactExports.createElement("span",{id:no._ariaDescriptionId,className:io},oo):null},no._onItemMouseEnterPrimary=function(oo){var io=no.props,so=io.item,ao=io.onItemMouseEnter;ao&&ao(__assign$4(__assign$4({},so),{subMenuProps:void 0,items:void 0}),oo,no._splitButton)},no._onItemMouseEnterIcon=function(oo){var io=no.props,so=io.item,ao=io.onItemMouseEnter;ao&&ao(so,oo,no._splitButton)},no._onItemMouseMovePrimary=function(oo){var io=no.props,so=io.item,ao=io.onItemMouseMove;ao&&ao(__assign$4(__assign$4({},so),{subMenuProps:void 0,items:void 0}),oo,no._splitButton)},no._onItemMouseMoveIcon=function(oo){var io=no.props,so=io.item,ao=io.onItemMouseMove;ao&&ao(so,oo,no._splitButton)},no._onIconItemClick=function(oo){var io=no.props,so=io.item,ao=io.onItemClickBase;ao&&ao(so,oo,no._splitButton?no._splitButton:oo.currentTarget)},no._executeItemClick=function(oo){var io=no.props,so=io.item,ao=io.executeItemClick,lo=io.onItemClick;if(!(so.disabled||so.isDisabled)){if(no._processingTouch&&!so.canCheck&&lo)return lo(so,oo);ao&&ao(so,oo)}},no._onTouchStart=function(oo){no._splitButton&&!("onpointerdown"in no._splitButton)&&no._handleTouchAndPointerEvent(oo)},no._onPointerDown=function(oo){oo.pointerType==="touch"&&(no._handleTouchAndPointerEvent(oo),oo.preventDefault(),oo.stopImmediatePropagation())},no._async=new Async(no),no._events=new EventGroup(no),no._dismissLabelId=getId(),no}return to.prototype.componentDidMount=function(){this._splitButton&&"onpointerdown"in this._splitButton&&this._events.on(this._splitButton,"pointerdown",this._onPointerDown,!0)},to.prototype.componentWillUnmount=function(){this._async.dispose(),this._events.dispose()},to.prototype.render=function(){var ro=this,no,oo=this.props,io=oo.item,so=oo.classNames,ao=oo.index,lo=oo.focusableElementIndex,co=oo.totalItemCount,uo=oo.hasCheckmarks,fo=oo.hasIcons,ho=oo.onItemMouseLeave,po=oo.expandedMenuItemKey,go=hasSubmenu(io),vo=io.keytipProps;vo&&(vo=this._getMemoizedMenuButtonKeytipProps(vo));var yo=io.ariaDescription;yo&&(this._ariaDescriptionId=getId());var xo=(no=getIsChecked(io))!==null&&no!==void 0?no:void 0;return reactExports.createElement(KeytipData,{keytipProps:vo,disabled:isItemDisabled(io)},function(_o){return reactExports.createElement("div",{"data-ktp-target":_o["data-ktp-target"],ref:function(Eo){return ro._splitButton=Eo},role:getMenuItemAriaRole(io),"aria-label":io.ariaLabel,className:so.splitContainer,"aria-disabled":isItemDisabled(io),"aria-expanded":go?io.key===po:void 0,"aria-haspopup":!0,"aria-describedby":mergeAriaAttributeValues(io.ariaDescribedBy,yo?ro._ariaDescriptionId:void 0,_o["aria-describedby"]),"aria-checked":xo,"aria-posinset":lo+1,"aria-setsize":co,onMouseEnter:ro._onItemMouseEnterPrimary,onMouseLeave:ho?ho.bind(ro,__assign$4(__assign$4({},io),{subMenuProps:null,items:null})):void 0,onMouseMove:ro._onItemMouseMovePrimary,onKeyDown:ro._onItemKeyDown,onClick:ro._executeItemClick,onTouchStart:ro._onTouchStart,tabIndex:0,"data-is-focusable":!0,"aria-roledescription":io["aria-roledescription"]},ro._renderSplitPrimaryButton(io,so,ao,uo,fo),ro._renderSplitDivider(io),ro._renderSplitIconButton(io,so,ao,_o),ro._renderAriaDescription(yo,so.screenReaderText))})},to.prototype._renderSplitPrimaryButton=function(ro,no,oo,io,so){var ao=this.props,lo=ao.contextualMenuItemAs,co=lo===void 0?ContextualMenuItem:lo,uo=ao.onItemClick,fo={key:ro.key,disabled:isItemDisabled(ro)||ro.primaryDisabled,name:ro.name,text:ro.text||ro.name,secondaryText:ro.secondaryText,className:no.splitPrimary,canCheck:ro.canCheck,isChecked:ro.isChecked,checked:ro.checked,iconProps:ro.iconProps,id:this._dismissLabelId,onRenderIcon:ro.onRenderIcon,data:ro.data,"data-is-focusable":!1},ho=ro.itemProps;return reactExports.createElement("button",__assign$4({},getNativeProps(fo,buttonProperties)),reactExports.createElement(co,__assign$4({"data-is-focusable":!1,item:fo,classNames:no,index:oo,onCheckmarkClick:io&&uo?uo:void 0,hasIcons:so},ho)))},to.prototype._renderSplitDivider=function(ro){var no=ro.getSplitButtonVerticalDividerClassNames||getSplitButtonVerticalDividerClassNames;return reactExports.createElement(VerticalDivider,{getClassNames:no})},to.prototype._renderSplitIconButton=function(ro,no,oo,io){var so=this.props,ao=so.onItemMouseLeave,lo=so.onItemMouseDown,co=so.openSubMenu,uo=so.dismissSubMenu,fo=so.dismissMenu,ho=ContextualMenuItem;this.props.item.contextualMenuItemAs&&(ho=composeComponentAs(this.props.item.contextualMenuItemAs,ho)),this.props.contextualMenuItemAs&&(ho=composeComponentAs(this.props.contextualMenuItemAs,ho));var po={onClick:this._onIconItemClick,disabled:isItemDisabled(ro),className:no.splitMenu,subMenuProps:ro.subMenuProps,submenuIconProps:ro.submenuIconProps,split:!0,key:ro.key,"aria-labelledby":this._dismissLabelId},go=__assign$4(__assign$4({},getNativeProps(po,buttonProperties)),{onMouseEnter:this._onItemMouseEnterIcon,onMouseLeave:ao?ao.bind(this,ro):void 0,onMouseDown:function(yo){return lo?lo(ro,yo):void 0},onMouseMove:this._onItemMouseMoveIcon,"data-is-focusable":!1,"data-ktp-execute-target":io["data-ktp-execute-target"],"aria-haspopup":!0}),vo=ro.itemProps;return reactExports.createElement("button",__assign$4({},go),reactExports.createElement(ho,__assign$4({componentRef:ro.componentRef,item:po,classNames:no,index:oo,hasIcons:!1,openSubMenu:co,dismissSubMenu:uo,dismissMenu:fo,getSubmenuTarget:this._getSubmenuTarget},vo)))},to.prototype._handleTouchAndPointerEvent=function(ro){var no=this,oo=this.props.onTap;oo&&oo(ro),this._lastTouchTimeoutId&&(this._async.clearTimeout(this._lastTouchTimeoutId),this._lastTouchTimeoutId=void 0),this._processingTouch=!0,this._lastTouchTimeoutId=this._async.setTimeout(function(){no._processingTouch=!1,no._lastTouchTimeoutId=void 0},TouchIdleDelay)},to}(ContextualMenuItemWrapper),ResponsiveMode;(function(eo){eo[eo.small=0]="small",eo[eo.medium=1]="medium",eo[eo.large=2]="large",eo[eo.xLarge=3]="xLarge",eo[eo.xxLarge=4]="xxLarge",eo[eo.xxxLarge=5]="xxxLarge",eo[eo.unknown=999]="unknown"})(ResponsiveMode||(ResponsiveMode={}));var RESPONSIVE_MAX_CONSTRAINT=[479,639,1023,1365,1919,99999999],_defaultMode,_lastMode;function getInitialResponsiveMode(){var eo;return(eo=_defaultMode??_lastMode)!==null&&eo!==void 0?eo:ResponsiveMode.large}function getWidthOfCurrentWindow(eo){try{return eo.document.documentElement.clientWidth}catch{return eo.innerWidth}}function getResponsiveMode(eo){var to=ResponsiveMode.small;if(eo){try{for(;getWidthOfCurrentWindow(eo)>RESPONSIVE_MAX_CONSTRAINT[to];)to++}catch{to=getInitialResponsiveMode()}_lastMode=to}else throw new Error("Content was rendered in a server environment without providing a default responsive mode. Call setResponsiveMode to define what the responsive mode is.");return to}var useResponsiveMode=function(eo,to){var ro=reactExports.useState(getInitialResponsiveMode()),no=ro[0],oo=ro[1],io=reactExports.useCallback(function(){var ao=getResponsiveMode(getWindow(eo.current));no!==ao&&oo(ao)},[eo,no]),so=useWindow();return useOnEvent(so,"resize",io),reactExports.useEffect(function(){to===void 0&&io()},[to]),to??no},MenuContext=reactExports.createContext({}),getClassNames$3=classNamesFunction(),getContextualMenuItemClassNames=classNamesFunction(),DEFAULT_PROPS$1={items:[],shouldFocusOnMount:!0,gapSpace:0,directionalHint:DirectionalHint.bottomAutoEdge,beakWidth:16};function getItemCount(eo){for(var to=0,ro=0,no=eo;ro0){var Dl=0;return reactExports.createElement("li",{role:"presentation",key:Yo.key||Vs.key||"section-".concat(Ho)},reactExports.createElement("div",__assign$4({},vs),reactExports.createElement("ul",{className:Xo.list,role:"presentation"},Yo.topDivider&&Ys(Ho,Uo,!0,!0),gs&&Js(gs,Vs.key||Ho,Uo,Vs.title),Yo.items.map(function(Al,Tl){var Gl=Os(Al,Tl,Dl,getItemCount(Yo.items),Vo,Lo,Xo);if(Al.itemType!==ContextualMenuItemType.Divider&&Al.itemType!==ContextualMenuItemType.Header){var du=Al.customOnRenderListLength?Al.customOnRenderListLength:1;Dl+=du}return Gl}),Yo.bottomDivider&&Ys(Ho,Uo,!1,!0))))}}},Js=function(Vs,Uo,Xo,Ho){return reactExports.createElement("li",{role:"presentation",title:Ho,key:Uo,className:Xo.item},Vs)},Ys=function(Vs,Uo,Xo,Ho){return Ho||Vs>0?reactExports.createElement("li",{role:"separator",key:"separator-"+Vs+(Xo===void 0?"":Xo?"-top":"-bottom"),className:Uo.divider,"aria-hidden":"true"}):null},ga=function(Vs,Uo,Xo,Ho,Vo,Lo,Yo){if(Vs.onRender)return Vs.onRender(__assign$4({"aria-posinset":Ho+1,"aria-setsize":Vo},Vs),lo);var gs=oo.contextualMenuItemAs,vs={item:Vs,classNames:Uo,index:Xo,focusableElementIndex:Ho,totalItemCount:Vo,hasCheckmarks:Lo,hasIcons:Yo,contextualMenuItemAs:gs,onItemMouseEnter:Go,onItemMouseLeave:Zo,onItemMouseMove:Qo,onItemMouseDown,executeItemClick:Is,onItemKeyDown:zo,expandedMenuItemKey:go,openSubMenu:vo,dismissSubMenu:xo,dismissMenu:lo};if(Vs.href){var hs=ContextualMenuAnchor;return Vs.contextualMenuItemWrapperAs&&(hs=composeComponentAs(Vs.contextualMenuItemWrapperAs,hs)),reactExports.createElement(hs,__assign$4({},vs,{onItemClick:ks}))}if(Vs.split&&hasSubmenu(Vs)){var ws=ContextualMenuSplitButton;return Vs.contextualMenuItemWrapperAs&&(ws=composeComponentAs(Vs.contextualMenuItemWrapperAs,ws)),reactExports.createElement(ws,__assign$4({},vs,{onItemClick:bs,onItemClickBase:Rs,onTap:Ro}))}var Ws=ContextualMenuButton;return Vs.contextualMenuItemWrapperAs&&(Ws=composeComponentAs(Vs.contextualMenuItemWrapperAs,Ws)),reactExports.createElement(Ws,__assign$4({},vs,{onItemClick:bs,onItemClickBase:Rs}))},$a=function(Vs,Uo,Xo,Ho,Vo,Lo){var Yo=ContextualMenuItem;Vs.contextualMenuItemAs&&(Yo=composeComponentAs(Vs.contextualMenuItemAs,Yo)),oo.contextualMenuItemAs&&(Yo=composeComponentAs(oo.contextualMenuItemAs,Yo));var gs=Vs.itemProps,vs=Vs.id,hs=gs&&getNativeProps(gs,divProperties);return reactExports.createElement("div",__assign$4({id:vs,className:Xo.header},hs,{style:Vs.style}),reactExports.createElement(Yo,__assign$4({item:Vs,classNames:Uo,index:Ho,onCheckmarkClick:Vo?bs:void 0,hasIcons:Lo},gs)))},yl=oo.isBeakVisible,Ol=oo.items,Zl=oo.labelElementId,ou=oo.id,_c=oo.className,Fl=oo.beakWidth,na=oo.directionalHint,Sl=oo.directionalHintForRTL,cu=oo.alignTargetEdge,Es=oo.gapSpace,xs=oo.coverTarget,ys=oo.ariaLabel,Cs=oo.doNotLayer,Ps=oo.target,qs=oo.bounds,Ds=oo.useTargetWidth,Fs=oo.useTargetAsMinWidth,Qs=oo.directionalHintFixed,_l=oo.shouldFocusOnMount,xl=oo.shouldFocusOnContainer,Nl=oo.title,eu=oo.styles,su=oo.theme,Pl=oo.calloutProps,hu=oo.onRenderSubMenu,xu=hu===void 0?onDefaultRenderSubMenu:hu,Ql=oo.onRenderMenuList,$l=Ql===void 0?function(Vs,Uo){return Ts(Vs,gu)}:Ql,pu=oo.focusZoneProps,au=oo.getMenuClassNames,gu=au?au(su,_c):getClassNames$3(eu,{theme:su,className:_c}),ru=Bl(Ol);function Bl(Vs){for(var Uo=0,Xo=Vs;Uo0){var Ou=getItemCount(Ol),_h=gu.subComponentStyles?gu.subComponentStyles.callout:void 0;return reactExports.createElement(MenuContext.Consumer,null,function(Vs){return reactExports.createElement(Callout,__assign$4({styles:_h,onRestoreFocus:ho},Pl,{target:Ps||Vs.target,isBeakVisible:yl,beakWidth:Fl,directionalHint:na,directionalHintForRTL:Sl,gapSpace:Es,coverTarget:xs,doNotLayer:Cs,className:css$3("ms-ContextualMenu-Callout",Pl&&Pl.className),setInitialFocus:_l,onDismiss:oo.onDismiss||Vs.onDismiss,onScroll:Co,bounds:qs,directionalHintFixed:Qs,alignTargetEdge:cu,hidden:oo.hidden||Vs.hidden,ref:to}),reactExports.createElement("div",{style:Iu,ref:io,id:ou,className:gu.container,tabIndex:xl?0:-1,onKeyDown:Fo,onKeyUp:No,onFocusCapture:ko,"aria-label":ys,"aria-labelledby":Zl,role:"menu"},Nl&&reactExports.createElement("div",{className:gu.title}," ",Nl," "),Ol&&Ol.length?$s($l({ariaLabel:ys,items:Ol,totalItemCount:Ou,hasCheckmarks:Us,hasIcons:ru,defaultMenuItemRenderer:function(Uo){return Ls(Uo,gu)},labelElementId:Zl},function(Uo,Xo){return Ts(Uo,gu)}),ba):null,mu&&xu(mu,onDefaultRenderSubMenu)),reactExports.createElement(FocusRects,null))})}else return null}),function(eo,to){return!to.shouldUpdateWhenHidden&&eo.hidden&&to.hidden?!0:shallowCompare(eo,to)});ContextualMenuBase.displayName="ContextualMenuBase";function isAltOrMeta(eo){return eo.which===KeyCodes$1.alt||eo.key==="Meta"}function onItemMouseDown(eo,to){var ro;(ro=eo.onMouseDown)===null||ro===void 0||ro.call(eo,eo,to)}function onDefaultRenderSubMenu(eo,to){throw Error("ContextualMenuBase: onRenderSubMenu callback is null or undefined. Please ensure to set `onRenderSubMenu` property either manually or with `styled` helper.")}function findItemByKeyFromItems(eo,to){for(var ro=0,no=to;ro=(No||ResponsiveMode.small)&&reactExports.createElement(Layer,__assign$4({ref:Ts},Nl),reactExports.createElement(Popup,__assign$4({role:Qs?"alertdialog":"dialog",ariaLabelledBy:Do,ariaDescribedBy:Mo,onDismiss:Co,shouldRestoreFocus:!_o,enableAriaHiddenSiblings:Qo,"aria-modal":!zo},Zo),reactExports.createElement("div",{className:xl.root,role:zo?void 0:"document"},!zo&&reactExports.createElement(Overlay,__assign$4({"aria-hidden":!0,isDarkThemed:Ao,onClick:Eo?void 0:Co,allowTouchBodyScroll:lo},wo)),qo?reactExports.createElement(DraggableZone,{handleSelector:qo.dragHandleSelector||"#".concat(Os),preventDragSelector:"button",onStart:xu,onDragChange:Ql,onStop:$l,position:Fl},ru):ru)))||null});ModalBase.displayName="Modal";var Modal=styled(ModalBase,getStyles$2,void 0,{scope:"Modal",fields:["theme","styles","enableAriaHiddenSiblings"]});Modal.displayName="Modal";var assign$1=__assign$4;function withSlots(eo,to){for(var ro=[],no=2;no0)throw new Error("Any module using getSlots must use withSlots. Please see withSlots javadoc for more info.");return _renderSlot(to[so],lo,no[so],no.slots&&no.slots[so],no._defaultStyles&&no._defaultStyles[so],no.theme)};ao.isSlot=!0,ro[so]=ao}};for(var io in to)oo(io);return ro}function _translateShorthand(eo,to){var ro,no;return typeof to=="string"||typeof to=="number"||typeof to=="boolean"?no=(ro={},ro[eo]=to,ro):no=to,no}function _constructFinalProps(eo,to){for(var ro=[],no=2;no2)return{rowGap:{value:0,unit:"px"},columnGap:{value:0,unit:"px"}};if(ro.length===2)return{rowGap:_getValueUnitGap(_getThemedSpacing(ro[0],to)),columnGap:_getValueUnitGap(_getThemedSpacing(ro[1],to))};var no=_getValueUnitGap(_getThemedSpacing(eo,to));return{rowGap:no,columnGap:no}},parsePadding=function(eo,to){if(eo===void 0||typeof eo=="number"||eo==="")return eo;var ro=eo.split(" ");return ro.length<2?_getThemedSpacing(eo,to):ro.reduce(function(no,oo){return _getThemedSpacing(no,to)+" "+_getThemedSpacing(oo,to)})},nameMap={start:"flex-start",end:"flex-end"},GlobalClassNames={root:"ms-Stack",inner:"ms-Stack-inner",child:"ms-Stack-child"},styles$2=function(eo,to,ro){var no,oo,io,so,ao,lo,co,uo,fo,ho,po,go,vo,yo=eo.className,xo=eo.disableShrink,_o=eo.enableScopedSelectors,Eo=eo.grow,So=eo.horizontal,ko=eo.horizontalAlign,Ao=eo.reversed,Co=eo.verticalAlign,Oo=eo.verticalFill,wo=eo.wrap,Ro=getGlobalClassNames(GlobalClassNames,to),Do=ro&&ro.childrenGap?ro.childrenGap:eo.gap,$o=ro&&ro.maxHeight?ro.maxHeight:eo.maxHeight,Mo=ro&&ro.maxWidth?ro.maxWidth:eo.maxWidth,Po=ro&&ro.padding?ro.padding:eo.padding,Bo=parseGap(Do,to),No=Bo.rowGap,Fo=Bo.columnGap,zo="".concat(-.5*Fo.value).concat(Fo.unit),qo="".concat(-.5*No.value).concat(No.unit),Go={textOverflow:"ellipsis"},Qo="> "+(_o?"."+GlobalClassNames.child:"*"),Zo=(no={},no["".concat(Qo,":not(.").concat(GlobalClassNames$1.root,")")]={flexShrink:0},no);return wo?{root:[Ro.root,{flexWrap:"wrap",maxWidth:Mo,maxHeight:$o,width:"auto",overflow:"visible",height:"100%"},ko&&(oo={},oo[So?"justifyContent":"alignItems"]=nameMap[ko]||ko,oo),Co&&(io={},io[So?"alignItems":"justifyContent"]=nameMap[Co]||Co,io),yo,{display:"flex"},So&&{height:Oo?"100%":"auto"}],inner:[Ro.inner,(so={display:"flex",flexWrap:"wrap",marginLeft:zo,marginRight:zo,marginTop:qo,marginBottom:qo,overflow:"visible",boxSizing:"border-box",padding:parsePadding(Po,to),width:Fo.value===0?"100%":"calc(100% + ".concat(Fo.value).concat(Fo.unit,")"),maxWidth:"100vw"},so[Qo]=__assign$4({margin:"".concat(.5*No.value).concat(No.unit," ").concat(.5*Fo.value).concat(Fo.unit)},Go),so),xo&&Zo,ko&&(ao={},ao[So?"justifyContent":"alignItems"]=nameMap[ko]||ko,ao),Co&&(lo={},lo[So?"alignItems":"justifyContent"]=nameMap[Co]||Co,lo),So&&(co={flexDirection:Ao?"row-reverse":"row",height:No.value===0?"100%":"calc(100% + ".concat(No.value).concat(No.unit,")")},co[Qo]={maxWidth:Fo.value===0?"100%":"calc(100% - ".concat(Fo.value).concat(Fo.unit,")")},co),!So&&(uo={flexDirection:Ao?"column-reverse":"column",height:"calc(100% + ".concat(No.value).concat(No.unit,")")},uo[Qo]={maxHeight:No.value===0?"100%":"calc(100% - ".concat(No.value).concat(No.unit,")")},uo)]}:{root:[Ro.root,(fo={display:"flex",flexDirection:So?Ao?"row-reverse":"row":Ao?"column-reverse":"column",flexWrap:"nowrap",width:"auto",height:Oo?"100%":"auto",maxWidth:Mo,maxHeight:$o,padding:parsePadding(Po,to),boxSizing:"border-box"},fo[Qo]=Go,fo),xo&&Zo,Eo&&{flexGrow:Eo===!0?1:Eo},ko&&(ho={},ho[So?"justifyContent":"alignItems"]=nameMap[ko]||ko,ho),Co&&(po={},po[So?"alignItems":"justifyContent"]=nameMap[Co]||Co,po),So&&Fo.value>0&&(go={},go[Ao?"".concat(Qo,":not(:last-child)"):"".concat(Qo,":not(:first-child)")]={marginLeft:"".concat(Fo.value).concat(Fo.unit)},go),!So&&No.value>0&&(vo={},vo[Ao?"".concat(Qo,":not(:last-child)"):"".concat(Qo,":not(:first-child)")]={marginTop:"".concat(No.value).concat(No.unit)},vo),yo]}},StackView=function(eo){var to=eo.as,ro=to===void 0?"div":to,no=eo.disableShrink,oo=no===void 0?!1:no,io=eo.doNotRenderFalsyValues,so=io===void 0?!1:io,ao=eo.enableScopedSelectors,lo=ao===void 0?!1:ao,co=eo.wrap,uo=__rest$1(eo,["as","disableShrink","doNotRenderFalsyValues","enableScopedSelectors","wrap"]),fo=_processStackChildren(eo.children,{disableShrink:oo,enableScopedSelectors:lo,doNotRenderFalsyValues:so}),ho=getNativeProps(uo,htmlElementProperties),po=getSlots(eo,{root:ro,inner:"div"});return co?withSlots(po.root,__assign$4({},ho),withSlots(po.inner,null,fo)):withSlots(po.root,__assign$4({},ho),fo)};function _processStackChildren(eo,to){var ro=to.disableShrink,no=to.enableScopedSelectors,oo=to.doNotRenderFalsyValues,io=reactExports.Children.toArray(eo);return io=reactExports.Children.map(io,function(so){if(!so)return oo?null:so;if(!reactExports.isValidElement(so))return so;if(so.type===reactExports.Fragment)return so.props.children?_processStackChildren(so.props.children,{disableShrink:ro,enableScopedSelectors:no,doNotRenderFalsyValues:oo}):null;var ao=so,lo={};_isStackItem(so)&&(lo={shrink:!ro});var co=ao.props.className;return reactExports.cloneElement(ao,__assign$4(__assign$4(__assign$4(__assign$4({},lo),ao.props),co&&{className:co}),no&&{className:css$3(GlobalClassNames.child,co)}))}),io}function _isStackItem(eo){return!!eo&&typeof eo=="object"&&!!eo.type&&eo.type.displayName===StackItem.displayName}var StackStatics={Item:StackItem},Stack$2=createComponent(StackView,{displayName:"Stack",styles:styles$2,statics:StackStatics});const AzureContentSafetyIcon="data:image/svg+xml,%3csvg%20id='uuid-40011f3f-22d0-4882-8376-afe2ef514a7e'%20xmlns='http://www.w3.org/2000/svg'%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%3e%3cdefs%3e%3clinearGradient%20id='uuid-5c4dfc33-1236-40a5-b487-5c8d33e4013b'%20x1='12.062'%20y1='5.427'%20x2='12.062'%20y2='3.991'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2376bc2d'/%3e%3cstop%20offset='1'%20stop-color='%2386d633'/%3e%3c/linearGradient%3e%3clinearGradient%20id='uuid-5dc2ae3c-3a23-47ff-9dc1-e087ff0e2742'%20x1='2.902'%20y1='6.762'%20x2='9.455'%20y2='6.762'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23e6e6e6'/%3e%3cstop%20offset='1'%20stop-color='%23999'/%3e%3c/linearGradient%3e%3clinearGradient%20id='uuid-d781b8b0-afbe-4f6e-a478-ee1974441cbf'%20x1='-1288.505'%20y1='-521.774'%20x2='-1284.777'%20y2='-521.774'%20gradientTransform='translate(-512.319%201291.819)%20rotate(90)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2386d633'/%3e%3cstop%20offset='1'%20stop-color='%2376bc2d'/%3e%3c/linearGradient%3e%3clinearGradient%20id='uuid-efb884ed-afc6-4667-82f2-34983e82b107'%20x1='2.902'%20y1='11.544'%20x2='9.455'%20y2='11.544'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23e6e6e6'/%3e%3cstop%20offset='1'%20stop-color='%23999'/%3e%3c/linearGradient%3e%3clinearGradient%20id='uuid-e8c8c19d-aa6c-48ed-823e-cfec5a014d78'%20x1='-274.183'%20y1='-521.774'%20x2='-279.397'%20y2='-521.774'%20gradientTransform='translate(-512.319%20-263.224)%20rotate(-90)%20scale(1%20-1)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23faa21d'/%3e%3cstop%20offset='.999'%20stop-color='%23f78d1e'/%3e%3c/linearGradient%3e%3clinearGradient%20id='uuid-7a6a88dd-1778-43da-9238-45bfc5a17b3e'%20x1='-140.646'%20y1='13.626'%20x2='-143.764'%20y2='4.784'%20gradientTransform='translate(149.182)%20skewX(-19.425)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2350e6ff'/%3e%3cstop%20offset='1'%20stop-color='%239cebff'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='m16.62,4.541l-2.765-1.597c-.129-.075-.291.019-.291.168v.822h-6.158v1.55h6.158v.822c0,.149.161.242.291.168l2.765-1.597c.129-.075.129-.261,0-.336Z'%20fill='url(%23uuid-5c4dfc33-1236-40a5-b487-5c8d33e4013b)'/%3e%3cpath%20d='m4.495,9.616h-1.592v-4.634c-.002-.591.476-1.071,1.067-1.073,0,0,.001,0,.002,0h5.484v1.592h-4.96v4.115Z'%20fill='url(%23uuid-5dc2ae3c-3a23-47ff-9dc1-e087ff0e2742)'/%3e%3ccircle%20cx='9.455'%20cy='4.603'%20r='2.607'%20fill='url(%23uuid-d781b8b0-afbe-4f6e-a478-ee1974441cbf)'/%3e%3cpath%20d='m9.455,14.4H3.971c-.591,0-1.07-.48-1.069-1.071,0,0,0-.001,0-.002v-4.638h1.592v4.115h4.96v1.596Z'%20fill='url(%23uuid-efb884ed-afc6-4667-82f2-34983e82b107)'/%3e%3ccircle%20cx='9.455'%20cy='13.397'%20r='2.607'%20fill='url(%23uuid-e8c8c19d-aa6c-48ed-823e-cfec5a014d78)'/%3e%3cpath%20d='m5.008,12.097H1.696c-.272,0-.453-.301-.405-.673l.584-4.534c.048-.372.307-.673.578-.673h3.312c.272,0,.453.301.405.673l-.584,4.534c-.048.372-.307.673-.578.673Z'%20fill='url(%23uuid-7a6a88dd-1778-43da-9238-45bfc5a17b3e)'/%3e%3cpath%20d='m.362,3.138C.162,3.138,0,2.976,0,2.777h0V.361C0,.162.162,0,.362,0h2.266c.2,0,.362.162.362.361,0,.199-.162.361-.362.361H.724v2.053c0,.199-.161.362-.361.362,0,0,0,0-.001,0Zm17.638-.361V.361C18,.162,17.838,0,17.638,0h-2.266c-.2,0-.362.162-.362.361s.162.361.362.361h1.904v2.053c0,.199.162.361.362.361.2,0,.361-.162.362-.361h0ZM2.99,17.639c0-.199-.162-.361-.362-.361H.724v-2.053c0-.199-.162-.361-.362-.361-.2,0-.362.162-.362.361v2.415c0,.199.163.36.362.36h2.266c.2,0,.362-.162.362-.361Zm15.01.001v-2.415c0-.199-.162-.361-.362-.361-.2,0-.361.162-.362.361v2.053h-1.904c-.2,0-.362.162-.362.362,0,.199.162.361.362.361h2.266c.199,0,.361-.161.362-.36Z'%20fill='%2376bc2d'/%3e%3c/svg%3e",BingLogoIcon="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20234%20343.41'%3e%3cdefs%3e%3clinearGradient%20id='a'%20x1='-29.25'%20y1='662.02'%20x2='-23.09'%20y2='658.46'%20gradientTransform='matrix(24.45,%200,%200,%20-24.45,%20967.18,%2016420.97)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2337bdff'/%3e%3cstop%20offset='0.18'%20stop-color='%2333bffd'/%3e%3cstop%20offset='0.36'%20stop-color='%2328c5f5'/%3e%3cstop%20offset='0.53'%20stop-color='%2315d0e9'/%3e%3cstop%20offset='0.55'%20stop-color='%2312d1e7'/%3e%3cstop%20offset='0.59'%20stop-color='%231cd2e5'/%3e%3cstop%20offset='0.77'%20stop-color='%2342d8dc'/%3e%3cstop%20offset='0.91'%20stop-color='%2359dbd6'/%3e%3cstop%20offset='1'%20stop-color='%2362dcd4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='b'%20x1='-32.86'%20y1='656.68'%20x2='-23.89'%20y2='656.68'%20gradientTransform='matrix(24.45,%200,%200,%20-24.45,%20967.18,%2016420.97)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2339d2ff'/%3e%3cstop%20offset='0.15'%20stop-color='%2338cefe'/%3e%3cstop%20offset='0.29'%20stop-color='%2335c3fa'/%3e%3cstop%20offset='0.43'%20stop-color='%232fb0f3'/%3e%3cstop%20offset='0.55'%20stop-color='%23299aeb'/%3e%3cstop%20offset='0.58'%20stop-color='%232692ec'/%3e%3cstop%20offset='0.76'%20stop-color='%231a6cf1'/%3e%3cstop%20offset='0.91'%20stop-color='%231355f4'/%3e%3cstop%20offset='1'%20stop-color='%23104cf5'/%3e%3c/linearGradient%3e%3clinearGradient%20id='c'%20x1='-31.2'%20y1='655.9'%20x2='-31.2'%20y2='667.89'%20gradientTransform='matrix(24.45,%200,%200,%20-24.45,%20967.18,%2016420.97)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%231b48ef'/%3e%3cstop%20offset='0.12'%20stop-color='%231c51f0'/%3e%3cstop%20offset='0.32'%20stop-color='%231e69f5'/%3e%3cstop%20offset='0.57'%20stop-color='%232190fb'/%3e%3cstop%20offset='1'%20stop-color='%2326b8f4'/%3e%3c/linearGradient%3e%3cclipPath%20id='d'%20transform='translate(-163%20-82.94)'%3e%3crect%20x='163.02'%20y='288.38'%20width='227.17'%20height='140.76'%20style='fill:none'/%3e%3c/clipPath%3e%3clinearGradient%20id='e'%20x1='-31.08'%20y1='654.47'%20x2='-25.54'%20y2='660'%20gradientTransform='matrix(24.45,%200,%200,%20-24.45,%20967.18,%2016420.97)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23fff'/%3e%3cstop%20offset='0.37'%20stop-color='%23fdfdfd'/%3e%3cstop%20offset='0.51'%20stop-color='%23f6f6f6'/%3e%3cstop%20offset='0.6'%20stop-color='%23ebebeb'/%3e%3cstop%20offset='0.68'%20stop-color='%23dadada'/%3e%3cstop%20offset='0.75'%20stop-color='%23c4c4c4'/%3e%3cstop%20offset='0.81'%20stop-color='%23a8a8a8'/%3e%3cstop%20offset='0.86'%20stop-color='%23888'/%3e%3cstop%20offset='0.91'%20stop-color='%23626262'/%3e%3cstop%20offset='0.95'%20stop-color='%23373737'/%3e%3cstop%20offset='0.99'%20stop-color='%23090909'/%3e%3cstop%20offset='1'/%3e%3c/linearGradient%3e%3cclipPath%20id='f'%20transform='translate(-163%20-82.94)'%3e%3crect%20x='163.02'%20y='82.87'%20width='86.51'%20height='302.96'%20style='fill:none'/%3e%3c/clipPath%3e%3clinearGradient%20id='g'%20x1='-31.2'%20y1='668.1'%20x2='-31.2'%20y2='656.02'%20xlink:href='%23e'/%3e%3c/defs%3e%3ctitle%3ebing-logo%3c/title%3e%3cpath%20d='M397,303.4a92.73,92.73,0,0,1-24.84,63.16,41.81,41.81,0,0,0,4.5-6,38.11,38.11,0,0,0,2.69-5.08,17.7,17.7,0,0,0,.74-1.78,17.25,17.25,0,0,0,.65-1.78c.21-.56.39-1.14.55-1.72s.33-1.2.46-1.81l.07-.21c.14-.6.25-1.2.37-1.81s.23-1.25.33-1.88v0c.09-.58.16-1.16.21-1.76a40,40,0,0,0,.21-4.13A41.41,41.41,0,0,0,377,317.11a36.51,36.51,0,0,0-2.85-4.17,39.93,39.93,0,0,0-4-4.43,41.45,41.45,0,0,0-12.36-8.28,38.78,38.78,0,0,0-6.22-2.14l-.09,0-.74-.25-10.81-3.71v0l-28.27-9.72c-.09,0-.21,0-.28,0l-1.77-.65A26.23,26.23,0,0,1,296.29,272L286,245.62l-11.83-30.16-2.27-5.82-.58-1.18a13.35,13.35,0,0,1-1-5.08,12,12,0,0,1,0-1.35,13.19,13.19,0,0,1,18.26-10.79l52.69,27,10.39,5.31A91.11,91.11,0,0,1,367,235a92.45,92.45,0,0,1,29.79,61.87C396.91,299.06,397,301.22,397,303.4Z'%20transform='translate(-163%20-82.94)'%20style='fill:url(%23a)'/%3e%3cpath%20d='M382.91,338.56a42.8,42.8,0,0,1-.72,7.82c-.14.67-.28,1.35-.44,2-.3,1.2-.62,2.36-1,3.53-.21.6-.42,1.2-.65,1.78s-.49,1.18-.74,1.78a38.1,38.1,0,0,1-2.69,5.08,42.22,42.22,0,0,1-4.5,6c-7.68,8.49-33.75,23.63-43.36,29.79l-21.33,13c-15.63,9.63-30.41,16.45-49,16.91-.88,0-1.74,0-2.6,0-1.2,0-2.39,0-3.57-.07a92.86,92.86,0,0,1-74.92-43.17,91.58,91.58,0,0,1-13.68-38.67,41.13,41.13,0,0,0,60,28.95l.14-.07,2.09-1.25,8.49-5,10.81-6.4v-.3l1.39-.83,96.71-57.29,7.44-4.41.74.25.09,0a38.31,38.31,0,0,1,6.22,2.14,41.45,41.45,0,0,1,12.36,8.28,40,40,0,0,1,4,4.43,37,37,0,0,1,2.85,4.17A41.64,41.64,0,0,1,382.91,338.56Z'%20transform='translate(-163%20-82.94)'%20style='fill:url(%23b)'/%3e%3cpath%20d='M245.24,147.35l0,213.29L234.39,367l-8.5,5-2.09,1.27a.24.24,0,0,0-.13.06,41.13,41.13,0,0,1-60-28.94c-.16-.89-.28-1.81-.38-2.7-.13-1.68-.22-3.33-.25-5v-240a13.77,13.77,0,0,1,21.46-11.41l42.07,27.48a5.55,5.55,0,0,0,.73.51A41.14,41.14,0,0,1,245.24,147.35Z'%20transform='translate(-163%20-82.94)'%20style='fill:url(%23c)'/%3e%3cg%20style='opacity:0.14900000393390656;isolation:isolate'%3e%3cg%20style='clip-path:url(%23d)'%3e%3cpath%20d='M382.91,338.56a42.8,42.8,0,0,1-.72,7.82c-.14.67-.28,1.35-.44,2-.3,1.2-.62,2.36-1,3.53-.21.6-.42,1.2-.65,1.78s-.49,1.18-.74,1.78a38.1,38.1,0,0,1-2.69,5.08,41.81,41.81,0,0,1-4.5,6c-7.68,8.49-33.75,23.63-43.36,29.79l-21.33,13c-15.63,9.63-30.41,16.45-49,16.91-.88,0-1.74,0-2.6,0-1.2,0-2.39,0-3.57-.07a92.86,92.86,0,0,1-74.92-43.17,91.58,91.58,0,0,1-13.68-38.67,41.13,41.13,0,0,0,60,28.95l.14-.07,2.09-1.25,8.49-5,10.81-6.4v-.3l1.39-.83,96.71-57.29,7.44-4.41.74.25.09,0a38.31,38.31,0,0,1,6.22,2.14,41.45,41.45,0,0,1,12.36,8.28,40,40,0,0,1,4,4.43,37,37,0,0,1,2.85,4.17A41.64,41.64,0,0,1,382.91,338.56Z'%20transform='translate(-163%20-82.94)'%20style='fill:url(%23e)'/%3e%3c/g%3e%3c/g%3e%3cg%20style='opacity:0.09799999743700027;isolation:isolate'%3e%3cg%20style='clip-path:url(%23f)'%3e%3cpath%20d='M245.24,147.35l0,213.29L234.39,367l-8.5,5-2.09,1.27a.24.24,0,0,0-.13.06,41.13,41.13,0,0,1-60-28.94c-.16-.89-.28-1.81-.38-2.7-.13-1.68-.22-3.33-.25-5v-240a13.77,13.77,0,0,1,21.46-11.41l42.07,27.48a5.55,5.55,0,0,0,.73.51A41.14,41.14,0,0,1,245.24,147.35Z'%20transform='translate(-163%20-82.94)'%20style='fill:url(%23g)'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",DefaultIcon=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 18 18",children:[jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"a5efbc52-c9a4-425f-9d94-50e000195659",x1:"9",y1:"18.967",x2:"9",y2:"3.398",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{offset:"0",stopColor:"#0078d4"}),jsxRuntimeExports.jsx("stop",{offset:"0.156",stopColor:"#1380da"}),jsxRuntimeExports.jsx("stop",{offset:"0.528",stopColor:"#3c91e5"}),jsxRuntimeExports.jsx("stop",{offset:"0.822",stopColor:"#559cec"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#5ea0ef"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"a110d41d-e4ca-48ee-9efe-328e60a20dcc",x1:"9",y1:"5.019",x2:"9",y2:"13.676",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{offset:"0.22",stopColor:"#fff"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#e6e6e6"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"bcf81335-a15c-4e8a-85c4-cb14c4ef74b0",x1:"8.991",y1:"2.883",x2:"8.991",y2:"11.32",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{offset:"0.22",stopColor:"#fff"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#e6e6e6"})]})]}),jsxRuntimeExports.jsx("g",{id:"b5d797c5-507f-4358-b61e-ca040c36ef52",children:jsxRuntimeExports.jsxs("g",{children:[jsxRuntimeExports.jsx("path",{d:"M.038,9.142,4.4,16.69a.285.285,0,0,0,.246.142h8.716a.285.285,0,0,0,.246-.142l4.358-7.548a.283.283,0,0,0,0-.284L13.6,1.31a.285.285,0,0,0-.246-.142H4.642A.285.285,0,0,0,4.4,1.31L.038,8.858A.283.283,0,0,0,.038,9.142Z",fill:"url(#a5efbc52-c9a4-425f-9d94-50e000195659)"}),jsxRuntimeExports.jsxs("g",{children:[jsxRuntimeExports.jsx("path",{id:"a81cd782-d573-434f-a6f1-758ffbb6f88b",d:"M12.239,6.083l.048.042a.085.085,0,0,0,.115,0l.447-.374.808-1.334a.083.083,0,0,0,0-.1l-.138-.145a.085.085,0,0,0-.1,0l-1.273.863L11.78,5.5a.086.086,0,0,0,0,.109l.049.048L9.2,8.394l-.543-.6-.6.6a1.093,1.093,0,0,1-.26.911.945.945,0,0,1-.826.3L4.376,12.232a.163.163,0,0,0,0,.231l0,.005,1.255,1.3a.162.162,0,0,0,.23.011l.011-.011L8.4,11.14a1.037,1.037,0,0,1,.3-.869.964.964,0,0,1,.826-.3l.6-.6L9.6,8.78Z",opacity:"0.4",fill:"url(#a110d41d-e4ca-48ee-9efe-328e60a20dcc)"}),jsxRuntimeExports.jsx("path",{d:"M13.283,12.057l-.6-.645L8.648,7.278h0l-.2-.218a2.242,2.242,0,0,0-.525-2.2,2.067,2.067,0,0,0-1.865-.6.09.09,0,0,0-.065.11.088.088,0,0,0,.017.035l1.05,1.068a.091.091,0,0,1,0,.085L6.808,6.65a.084.084,0,0,1-.061.06l-1.074.3a.084.084,0,0,1-.084,0l-1.02-1.08a.084.084,0,0,0-.145.054,2.19,2.19,0,0,0,.6,1.919,2.035,2.035,0,0,0,2.034.543l.036.043.23.235h0l4.592,4.828a.954.954,0,0,0,1.34.048l.048-.048a1.017,1.017,0,0,0,.284-.724A1.117,1.117,0,0,0,13.283,12.057Z",fill:"url(#bcf81335-a15c-4e8a-85c4-cb14c4ef74b0)"})]})]})})]}),OpenAIIcon$1=()=>jsxRuntimeExports.jsxs("svg",{fill:"currentColor",width:"16px",height:"16px",viewBox:"0 0 2048 2048",role:"img",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("title",{children:"OpenAI icon"}),jsxRuntimeExports.jsx("path",{d:"M832 676l575 288v760l-575 288-575-288V964l575-288zm0 144l-368 184 368 183 368-183-368-184zm-447 825l383 191v-538l-383-191v538zm894 0v-538l-383 191v538l383-191zm577-733q14 0 23 9t9 23q0 23 9 43t24 36 35 24 44 9q14 0 23 9t9 23q0 14-9 23t-23 9q-23 0-43 9t-36 24-24 35-9 44q0 14-9 23t-23 9q-14 0-23-9t-9-23q0-23-9-43t-24-36-35-24-44-9q-14 0-23-9t-9-23q0-14 9-23t23-9q23 0 43-9t36-24 24-35 9-44q0-14 9-23t23-9zM704 496q-14 0-23-9t-9-23q0-23-9-43t-24-36-35-24-44-9q-14 0-23-9t-9-23q0-14 9-23t23-9q23 0 43-9t36-24 24-35 9-44q0-14 9-23t23-9q14 0 23 9t9 23q0 23 9 43t24 36 35 24 44 9q14 0 23 9t9 23q0 14-9 23t-23 9q-23 0-43 9t-36 24-24 35-9 44q0 14-9 23t-23 9zm1206-48q0 23-15 38t-39 16q-27 0-57 11t-58 28-54 37-45 40q-19 19-39 44t-38 54-28 59-11 57q0 23-15 38t-39 16q-23 0-38-15t-16-39q0-27-11-57t-28-58-37-54-40-45q-19-19-44-39t-54-38-59-28-57-11q-23 0-38-15t-16-39q0-23 15-38t39-16q27 0 57-11t58-28 54-37 45-40q19-19 39-44t38-54 28-59 11-57q0-23 15-38t39-16q23 0 38 15t16 39q0 27 11 57t28 58 37 54 40 45q19 19 44 39t54 38 59 28 57 11q23 0 38 15t16 39zm-438 212q38-65 92-119t120-93q-65-38-119-92t-93-120q-38 65-92 119t-120 93q65 38 119 92t93 120z"})]}),PromptIcon=()=>jsxRuntimeExports.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9.5 6.50238C9.5 6.22624 9.72386 6.00238 10 6.00238C10.2761 6.00238 10.5 6.22624 10.5 6.50238V7.50391C10.5 7.78005 10.2761 8.00391 10 8.00391C9.72386 8.00391 9.5 7.78005 9.5 7.50391V6.50238ZM12.8506 7.44332C12.6553 7.24806 12.3388 7.24806 12.1435 7.44332L11.4353 8.15151C11.2401 8.34677 11.2401 8.66335 11.4353 8.85861C11.6306 9.05388 11.9472 9.05388 12.1424 8.85861L12.8506 8.15043C13.0459 7.95517 13.0459 7.63858 12.8506 7.44332ZM7.8521 7.44332C7.65684 7.24806 7.34026 7.24806 7.145 7.44332C6.94973 7.63858 6.94973 7.95517 7.145 8.15043L7.85318 8.85861C8.04844 9.05388 8.36503 9.05388 8.56029 8.85861C8.75555 8.66335 8.75555 8.34677 8.56029 8.15151L7.8521 7.44332ZM10 2C13.3137 2 16 4.59693 16 7.80041C16 9.47737 15.2546 11.0164 13.7961 12.3942C13.7324 12.4544 13.6831 12.5269 13.6512 12.6065L13.6251 12.6883L12.6891 16.6051C12.5048 17.3763 11.8236 17.935 11.0181 17.9947L10.8748 18H9.12546C8.30655 18 7.59 17.4839 7.34866 16.7385L7.31108 16.6047L6.37626 12.6886C6.34955 12.5766 6.29016 12.4745 6.20516 12.3942C4.8153 11.0819 4.07265 9.62354 4.00507 8.03903L4 7.80041L4.00321 7.60894C4.1077 4.49409 6.75257 2 10 2ZM7.955 15L8.27386 16.3344L8.30004 16.4305C8.39695 16.7298 8.67583 16.9517 9.0116 16.993L9.12546 17L10.8379 17.0007L10.9442 16.9974C11.2865 16.9721 11.5726 16.7609 11.6854 16.4718L11.7165 16.3727L12.045 15H7.955ZM10 3C7.36782 3 5.21188 4.95301 5.0151 7.41357L5.00307 7.62569L4.99977 7.77916L5.00416 7.99642C5.05977 9.30026 5.67758 10.5208 6.89167 11.6671C7.07995 11.8449 7.22191 12.0647 7.30572 12.3078L7.34894 12.4564L7.716 14H9.50024V9.49707C9.50024 9.22093 9.7241 8.99707 10.0002 8.99707C10.2764 8.99707 10.5002 9.22093 10.5002 9.49707V14H12.285L12.6722 12.3851L12.7231 12.2343C12.8091 12.0198 12.9409 11.8265 13.1094 11.6673C14.3825 10.4646 15 9.18054 15 7.80041C15 5.15693 12.7689 3 10 3Z",fill:"currentColor"})}),PythonIcon=()=>jsxRuntimeExports.jsxs("svg",{width:"16px",height:"16px",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.0164 2C10.8193 2 9.03825 3.72453 9.03825 5.85185V8.51852H15.9235V9.25926H5.97814C3.78107 9.25926 2 10.9838 2 13.1111L2 18.8889C2 21.0162 3.78107 22.7407 5.97814 22.7407H8.27322V19.4815C8.27322 17.3542 10.0543 15.6296 12.2514 15.6296H19.5956C21.4547 15.6296 22.9617 14.1704 22.9617 12.3704V5.85185C22.9617 3.72453 21.1807 2 18.9836 2H13.0164ZM12.0984 6.74074C12.8589 6.74074 13.4754 6.14378 13.4754 5.40741C13.4754 4.67103 12.8589 4.07407 12.0984 4.07407C11.3378 4.07407 10.7213 4.67103 10.7213 5.40741C10.7213 6.14378 11.3378 6.74074 12.0984 6.74074Z",fill:"#327EBD"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.9834 30C21.1805 30 22.9616 28.2755 22.9616 26.1482V23.4815L16.0763 23.4815L16.0763 22.7408L26.0217 22.7408C28.2188 22.7408 29.9998 21.0162 29.9998 18.8889V13.1111C29.9998 10.9838 28.2188 9.25928 26.0217 9.25928L23.7266 9.25928V12.5185C23.7266 14.6459 21.9455 16.3704 19.7485 16.3704L12.4042 16.3704C10.5451 16.3704 9.03809 17.8296 9.03809 19.6296L9.03809 26.1482C9.03809 28.2755 10.8192 30 13.0162 30H18.9834ZM19.9015 25.2593C19.1409 25.2593 18.5244 25.8562 18.5244 26.5926C18.5244 27.329 19.1409 27.9259 19.9015 27.9259C20.662 27.9259 21.2785 27.329 21.2785 26.5926C21.2785 25.8562 20.662 25.2593 19.9015 25.2593Z",fill:"#FFDA4B"})]}),TypeScriptIcon="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20aria-label='TypeScript'%20role='img'%20viewBox='0%200%20512%20512'%3e%3crect%20width='512'%20height='512'%20rx='15%25'%20fill='%233178c6'/%3e%3cpath%20fill='%23ffffff'%20d='m233%20284h64v-41H118v41h64v183h51zm84%20173c8.1%204.2%2018%207.3%2029%209.4s23%203.1%2035%203.1c12%200%2023-1.1%2034-3.4c11-2.3%2020-6.1%2028-11c8.1-5.3%2015-12%2019-21s7.1-19%207.1-32c0-9.1-1.4-17-4.1-24s-6.6-13-12-18c-5.1-5.3-11-10-18-14s-15-8.2-24-12c-6.6-2.7-12-5.3-18-7.9c-5.2-2.6-9.7-5.2-13-7.8c-3.7-2.7-6.5-5.5-8.5-8.4c-2-3-3-6.3-3-10c0-3.4.89-6.5%202.7-9.3s4.3-5.1%207.5-7.1c3.2-2%207.2-3.5%2012-4.6c4.7-1.1%209.9-1.6%2016-1.6c4.2%200%208.6.31%2013%20.94c4.6.63%209.3%201.6%2014%202.9c4.7%201.3%209.3%202.9%2014%204.9c4.4%202%208.5%204.3%2012%206.9v-47c-7.6-2.9-16-5.1-25-6.5s-19-2.1-31-2.1c-12%200-23%201.3-34%203.8s-20%206.5-28%2012c-8.1%205.4-14%2012-19%2021c-4.7%208.4-7%2018-7%2030c0%2015%204.3%2028%2013%2038c8.6%2011%2022%2019%2039%2027c6.9%202.8%2013%205.6%2019%208.3s11%205.5%2015%208.4c4.3%202.9%207.7%206.1%2010%209.5c2.5%203.4%203.8%207.4%203.8%2012c0%203.2-.78%206.2-2.3%209s-3.9%205.2-7.1%207.2s-7.1%203.6-12%204.8c-4.7%201.1-10%201.7-17%201.7c-11%200-22-1.9-32-5.7c-11-3.8-21-9.5-28.1-15.44z'/%3e%3c/svg%3e",VectorSearchIcon=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 18 18",role:"img",children:[jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsxs("linearGradient",{id:"fb5d9d20-fc2c-4e2c-bffd-dc236176d8b2",x1:"-6428.21",y1:"9646.124",x2:"-6428.21",y2:"9617.899",gradientTransform:"matrix(0.5, 0, 0, -0.5, 3224.856, 4823.856)",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{offset:"0",stopColor:"#5ea0ef"}),jsxRuntimeExports.jsx("stop",{offset:"0.178",stopColor:"#589eed"}),jsxRuntimeExports.jsx("stop",{offset:"0.406",stopColor:"#4897e9"}),jsxRuntimeExports.jsx("stop",{offset:"0.662",stopColor:"#2e8ce1"}),jsxRuntimeExports.jsx("stop",{offset:"0.936",stopColor:"#0a7cd7"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#0078d4"})]})}),jsxRuntimeExports.jsx("g",{id:"a05a9809-540f-4ec8-9a73-07896b5e7f5c",children:jsxRuntimeExports.jsxs("g",{children:[jsxRuntimeExports.jsx("path",{d:"M8.438,10.379h4.234v4.234H8.438ZM3.5,4.734H7.732V.5H4.086a.588.588,0,0,0-.588.588Zm.588,9.879H7.732V10.379H3.5v3.646A.588.588,0,0,0,4.086,14.613ZM3.5,9.674H7.732V5.44H3.5Zm9.88,4.939h3.646a.588.588,0,0,0,.588-.588V10.379H13.378ZM8.438,9.674h4.234V5.44H8.438Zm4.94,0h4.234V5.44H13.378Zm0-9.174V4.734h4.234V1.088A.588.588,0,0,0,17.024.5ZM8.438,4.734h4.234V.5H8.438Z",fill:"url(#fb5d9d20-fc2c-4e2c-bffd-dc236176d8b2)"}),jsxRuntimeExports.jsx("rect",{x:"-0.212",y:"14.751",width:"5.457",height:"1.243",rx:"0.581",transform:"translate(-10.133 6.282) rotate(-45)",fill:"#198ab3"}),jsxRuntimeExports.jsx("circle",{cx:"5.959",cy:"11.709",r:"3.744",fill:"#50e6ff"}),jsxRuntimeExports.jsx("circle",{cx:"5.952",cy:"11.642",r:"2.94",fill:"#fff"})]})})]}),DEFAULT_SIZE$1=16,toolsIcons={PromptFlowToolAzureContentSafety:jsxRuntimeExports.jsx(AzureContentSafetyIcon,{width:DEFAULT_SIZE$1,height:DEFAULT_SIZE$1}),PromptFlowToolSerpAPI:jsxRuntimeExports.jsx(DefaultIcon,{}),PromptFlowToolBing:jsxRuntimeExports.jsx(BingLogoIcon,{width:DEFAULT_SIZE$1,height:DEFAULT_SIZE$1}),PromptFlowToolAzureContentModerator:jsxRuntimeExports.jsx(AzureContentSafetyIcon,{width:DEFAULT_SIZE$1,height:DEFAULT_SIZE$1}),PromptFlowToolVectorIndexLookupByText:jsxRuntimeExports.jsx(VectorSearchIcon,{}),PromptFlowToolFaissIndexLookup:jsxRuntimeExports.jsx(VectorSearchIcon,{}),PromptFlowToolVectorDBLookup:jsxRuntimeExports.jsx(VectorSearchIcon,{}),PromptFlowToolVectorSearch:jsxRuntimeExports.jsx(VectorSearchIcon,{}),PromptFlowToolLlm:jsxRuntimeExports.jsx(OpenAIIcon$1,{}),PromptFlowToolPython:jsxRuntimeExports.jsx(PythonIcon,{}),PromptFlowToolTypeScript:jsxRuntimeExports.jsx(TypeScriptIcon,{width:DEFAULT_SIZE$1,height:DEFAULT_SIZE$1}),PromptFlowToolPrompt:jsxRuntimeExports.jsx(PromptIcon,{}),PromptFlowToolDefault:jsxRuntimeExports.jsx(DefaultIcon,{})};registerIcons({icons:{...toolsIcons}});var getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),rnds8=new Uint8Array(16);function rng(){if(!getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}var byteToHex=[];for(var i$4=0;i$4<256;++i$4)byteToHex[i$4]=(i$4+256).toString(16).substr(1);function bytesToUuid(eo,to){var ro=to||0,no=byteToHex;return[no[eo[ro++]],no[eo[ro++]],no[eo[ro++]],no[eo[ro++]],"-",no[eo[ro++]],no[eo[ro++]],"-",no[eo[ro++]],no[eo[ro++]],"-",no[eo[ro++]],no[eo[ro++]],"-",no[eo[ro++]],no[eo[ro++]],no[eo[ro++]],no[eo[ro++]],no[eo[ro++]],no[eo[ro++]]].join("")}function v4(eo,to,ro){var no=to&&ro||0;typeof eo=="string"&&(to=eo==="binary"?new Array(16):null,eo=null),eo=eo||{};var oo=eo.random||(eo.rng||rng)();if(oo[6]=oo[6]&15|64,oo[8]=oo[8]&63|128,to)for(var io=0;io<16;++io)to[no+io]=oo[io];return to||bytesToUuid(oo)}var toposort$1={exports:{}};toposort$1.exports=function(eo){return toposort(uniqueNodes(eo),eo)};toposort$1.exports.array=toposort;function toposort(eo,to){for(var ro=eo.length,no=new Array(ro),oo={},io=ro;io--;)oo[io]||so(eo[io],io,[]);return no;function so(ao,lo,co){if(co.indexOf(ao)>=0){var uo;try{uo=", node was:"+JSON.stringify(ao)}catch{uo=""}throw new Error("Cyclic dependency"+uo)}if(!~eo.indexOf(ao))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(ao));if(!oo[lo]){oo[lo]=!0;var fo=to.filter(function(go){return go[0]===ao});if(lo=fo.length){var ho=co.concat(ao);do{var po=fo[--lo][1];so(po,eo.indexOf(po),ho)}while(lo)}no[--ro]=ao}}}function uniqueNodes(eo){for(var to=[],ro=0,no=eo.length;ro1?ro-1:0),oo=1;oo2&&arguments[2]!==void 0?arguments[2]:stringToLowerCase;setPrototypeOf&&setPrototypeOf(eo,null);let no=to.length;for(;no--;){let oo=to[no];if(typeof oo=="string"){const io=ro(oo);io!==oo&&(isFrozen(to)||(to[no]=io),oo=io)}eo[oo]=!0}return eo}function cleanArray(eo){for(let to=0;to/gm),TMPLIT_EXPR=seal(/\${[\w\W]*}/gm),DATA_ATTR=seal(/^data-[\-\w.\u00B7-\uFFFF]/),ARIA_ATTR=seal(/^aria-[\-\w]+$/),IS_ALLOWED_URI=seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),IS_SCRIPT_OR_DATA=seal(/^(?:\w+script|data):/i),ATTR_WHITESPACE=seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),DOCTYPE_NAME=seal(/^html$/i);var EXPRESSIONS=Object.freeze({__proto__:null,MUSTACHE_EXPR,ERB_EXPR,TMPLIT_EXPR,DATA_ATTR,ARIA_ATTR,IS_ALLOWED_URI,IS_SCRIPT_OR_DATA,ATTR_WHITESPACE,DOCTYPE_NAME});const getGlobal=function(){return typeof window>"u"?null:window},_createTrustedTypesPolicy=function(to,ro){if(typeof to!="object"||typeof to.createPolicy!="function")return null;let no=null;const oo="data-tt-policy-suffix";ro&&ro.hasAttribute(oo)&&(no=ro.getAttribute(oo));const io="dompurify"+(no?"#"+no:"");try{return to.createPolicy(io,{createHTML(so){return so},createScriptURL(so){return so}})}catch{return console.warn("TrustedTypes policy "+io+" could not be created."),null}};function createDOMPurify(){let eo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:getGlobal();const to=Vo=>createDOMPurify(Vo);if(to.version="3.0.9",to.removed=[],!eo||!eo.document||eo.document.nodeType!==9)return to.isSupported=!1,to;let{document:ro}=eo;const no=ro,oo=no.currentScript,{DocumentFragment:io,HTMLTemplateElement:so,Node:ao,Element:lo,NodeFilter:co,NamedNodeMap:uo=eo.NamedNodeMap||eo.MozNamedAttrMap,HTMLFormElement:fo,DOMParser:ho,trustedTypes:po}=eo,go=lo.prototype,vo=lookupGetter(go,"cloneNode"),yo=lookupGetter(go,"nextSibling"),xo=lookupGetter(go,"childNodes"),_o=lookupGetter(go,"parentNode");if(typeof so=="function"){const Vo=ro.createElement("template");Vo.content&&Vo.content.ownerDocument&&(ro=Vo.content.ownerDocument)}let Eo,So="";const{implementation:ko,createNodeIterator:Ao,createDocumentFragment:Co,getElementsByTagName:Oo}=ro,{importNode:wo}=no;let Ro={};to.isSupported=typeof entries=="function"&&typeof _o=="function"&&ko&&ko.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Do,ERB_EXPR:$o,TMPLIT_EXPR:Mo,DATA_ATTR:Po,ARIA_ATTR:Bo,IS_SCRIPT_OR_DATA:No,ATTR_WHITESPACE:Fo}=EXPRESSIONS;let{IS_ALLOWED_URI:zo}=EXPRESSIONS,qo=null;const Go=addToSet({},[...html$1,...svg$1,...svgFilters,...mathMl$1,...text]);let Qo=null;const Zo=addToSet({},[...html$2,...svg$2,...mathMl,...xml]);let bs=Object.seal(create$4(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ks=null,Is=null,Rs=!0,Ts=!0,$s=!1,Os=!0,Ls=!1,Ks=!1,Js=!1,Ys=!1,ga=!1,$a=!1,yl=!1,Ol=!0,Zl=!1;const ou="user-content-";let _c=!0,Fl=!1,na={},Sl=null;const cu=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Es=null;const xs=addToSet({},["audio","video","img","source","image","track"]);let ys=null;const Cs=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ps="http://www.w3.org/1998/Math/MathML",qs="http://www.w3.org/2000/svg",Ds="http://www.w3.org/1999/xhtml";let Fs=Ds,Qs=!1,_l=null;const xl=addToSet({},[Ps,qs,Ds],stringToString);let Nl=null;const eu=["application/xhtml+xml","text/html"],su="text/html";let Pl=null,hu=null;const xu=ro.createElement("form"),Ql=function(Lo){return Lo instanceof RegExp||Lo instanceof Function},$l=function(){let Lo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(hu&&hu===Lo)){if((!Lo||typeof Lo!="object")&&(Lo={}),Lo=clone(Lo),Nl=eu.indexOf(Lo.PARSER_MEDIA_TYPE)===-1?su:Lo.PARSER_MEDIA_TYPE,Pl=Nl==="application/xhtml+xml"?stringToString:stringToLowerCase,qo=objectHasOwnProperty(Lo,"ALLOWED_TAGS")?addToSet({},Lo.ALLOWED_TAGS,Pl):Go,Qo=objectHasOwnProperty(Lo,"ALLOWED_ATTR")?addToSet({},Lo.ALLOWED_ATTR,Pl):Zo,_l=objectHasOwnProperty(Lo,"ALLOWED_NAMESPACES")?addToSet({},Lo.ALLOWED_NAMESPACES,stringToString):xl,ys=objectHasOwnProperty(Lo,"ADD_URI_SAFE_ATTR")?addToSet(clone(Cs),Lo.ADD_URI_SAFE_ATTR,Pl):Cs,Es=objectHasOwnProperty(Lo,"ADD_DATA_URI_TAGS")?addToSet(clone(xs),Lo.ADD_DATA_URI_TAGS,Pl):xs,Sl=objectHasOwnProperty(Lo,"FORBID_CONTENTS")?addToSet({},Lo.FORBID_CONTENTS,Pl):cu,ks=objectHasOwnProperty(Lo,"FORBID_TAGS")?addToSet({},Lo.FORBID_TAGS,Pl):{},Is=objectHasOwnProperty(Lo,"FORBID_ATTR")?addToSet({},Lo.FORBID_ATTR,Pl):{},na=objectHasOwnProperty(Lo,"USE_PROFILES")?Lo.USE_PROFILES:!1,Rs=Lo.ALLOW_ARIA_ATTR!==!1,Ts=Lo.ALLOW_DATA_ATTR!==!1,$s=Lo.ALLOW_UNKNOWN_PROTOCOLS||!1,Os=Lo.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ls=Lo.SAFE_FOR_TEMPLATES||!1,Ks=Lo.WHOLE_DOCUMENT||!1,ga=Lo.RETURN_DOM||!1,$a=Lo.RETURN_DOM_FRAGMENT||!1,yl=Lo.RETURN_TRUSTED_TYPE||!1,Ys=Lo.FORCE_BODY||!1,Ol=Lo.SANITIZE_DOM!==!1,Zl=Lo.SANITIZE_NAMED_PROPS||!1,_c=Lo.KEEP_CONTENT!==!1,Fl=Lo.IN_PLACE||!1,zo=Lo.ALLOWED_URI_REGEXP||IS_ALLOWED_URI,Fs=Lo.NAMESPACE||Ds,bs=Lo.CUSTOM_ELEMENT_HANDLING||{},Lo.CUSTOM_ELEMENT_HANDLING&&Ql(Lo.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(bs.tagNameCheck=Lo.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Lo.CUSTOM_ELEMENT_HANDLING&&Ql(Lo.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(bs.attributeNameCheck=Lo.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Lo.CUSTOM_ELEMENT_HANDLING&&typeof Lo.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(bs.allowCustomizedBuiltInElements=Lo.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ls&&(Ts=!1),$a&&(ga=!0),na&&(qo=addToSet({},text),Qo=[],na.html===!0&&(addToSet(qo,html$1),addToSet(Qo,html$2)),na.svg===!0&&(addToSet(qo,svg$1),addToSet(Qo,svg$2),addToSet(Qo,xml)),na.svgFilters===!0&&(addToSet(qo,svgFilters),addToSet(Qo,svg$2),addToSet(Qo,xml)),na.mathMl===!0&&(addToSet(qo,mathMl$1),addToSet(Qo,mathMl),addToSet(Qo,xml))),Lo.ADD_TAGS&&(qo===Go&&(qo=clone(qo)),addToSet(qo,Lo.ADD_TAGS,Pl)),Lo.ADD_ATTR&&(Qo===Zo&&(Qo=clone(Qo)),addToSet(Qo,Lo.ADD_ATTR,Pl)),Lo.ADD_URI_SAFE_ATTR&&addToSet(ys,Lo.ADD_URI_SAFE_ATTR,Pl),Lo.FORBID_CONTENTS&&(Sl===cu&&(Sl=clone(Sl)),addToSet(Sl,Lo.FORBID_CONTENTS,Pl)),_c&&(qo["#text"]=!0),Ks&&addToSet(qo,["html","head","body"]),qo.table&&(addToSet(qo,["tbody"]),delete ks.tbody),Lo.TRUSTED_TYPES_POLICY){if(typeof Lo.TRUSTED_TYPES_POLICY.createHTML!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Lo.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Eo=Lo.TRUSTED_TYPES_POLICY,So=Eo.createHTML("")}else Eo===void 0&&(Eo=_createTrustedTypesPolicy(po,oo)),Eo!==null&&typeof So=="string"&&(So=Eo.createHTML(""));freeze&&freeze(Lo),hu=Lo}},pu=addToSet({},["mi","mo","mn","ms","mtext"]),au=addToSet({},["foreignobject","desc","title","annotation-xml"]),gu=addToSet({},["title","style","font","a","script"]),ru=addToSet({},[...svg$1,...svgFilters,...svgDisallowed]),Bl=addToSet({},[...mathMl$1,...mathMlDisallowed]),ba=function(Lo){let Yo=_o(Lo);(!Yo||!Yo.tagName)&&(Yo={namespaceURI:Fs,tagName:"template"});const gs=stringToLowerCase(Lo.tagName),vs=stringToLowerCase(Yo.tagName);return _l[Lo.namespaceURI]?Lo.namespaceURI===qs?Yo.namespaceURI===Ds?gs==="svg":Yo.namespaceURI===Ps?gs==="svg"&&(vs==="annotation-xml"||pu[vs]):!!ru[gs]:Lo.namespaceURI===Ps?Yo.namespaceURI===Ds?gs==="math":Yo.namespaceURI===qs?gs==="math"&&au[vs]:!!Bl[gs]:Lo.namespaceURI===Ds?Yo.namespaceURI===qs&&!au[vs]||Yo.namespaceURI===Ps&&!pu[vs]?!1:!Bl[gs]&&(gu[gs]||!ru[gs]):!!(Nl==="application/xhtml+xml"&&_l[Lo.namespaceURI]):!1},Us=function(Lo){arrayPush(to.removed,{element:Lo});try{Lo.parentNode.removeChild(Lo)}catch{Lo.remove()}},mu=function(Lo,Yo){try{arrayPush(to.removed,{attribute:Yo.getAttributeNode(Lo),from:Yo})}catch{arrayPush(to.removed,{attribute:null,from:Yo})}if(Yo.removeAttribute(Lo),Lo==="is"&&!Qo[Lo])if(ga||$a)try{Us(Yo)}catch{}else try{Yo.setAttribute(Lo,"")}catch{}},Iu=function(Lo){let Yo=null,gs=null;if(Ys)Lo=""+Lo;else{const ws=stringMatch(Lo,/^[\r\n\t ]+/);gs=ws&&ws[0]}Nl==="application/xhtml+xml"&&Fs===Ds&&(Lo=''+Lo+"");const vs=Eo?Eo.createHTML(Lo):Lo;if(Fs===Ds)try{Yo=new ho().parseFromString(vs,Nl)}catch{}if(!Yo||!Yo.documentElement){Yo=ko.createDocument(Fs,"template",null);try{Yo.documentElement.innerHTML=Qs?So:vs}catch{}}const hs=Yo.body||Yo.documentElement;return Lo&&gs&&hs.insertBefore(ro.createTextNode(gs),hs.childNodes[0]||null),Fs===Ds?Oo.call(Yo,Ks?"html":"body")[0]:Ks?Yo.documentElement:hs},uu=function(Lo){return Ao.call(Lo.ownerDocument||Lo,Lo,co.SHOW_ELEMENT|co.SHOW_COMMENT|co.SHOW_TEXT,null)},up=function(Lo){return Lo instanceof fo&&(typeof Lo.nodeName!="string"||typeof Lo.textContent!="string"||typeof Lo.removeChild!="function"||!(Lo.attributes instanceof uo)||typeof Lo.removeAttribute!="function"||typeof Lo.setAttribute!="function"||typeof Lo.namespaceURI!="string"||typeof Lo.insertBefore!="function"||typeof Lo.hasChildNodes!="function")},qu=function(Lo){return typeof ao=="function"&&Lo instanceof ao},Ou=function(Lo,Yo,gs){Ro[Lo]&&arrayForEach(Ro[Lo],vs=>{vs.call(to,Yo,gs,hu)})},_h=function(Lo){let Yo=null;if(Ou("beforeSanitizeElements",Lo,null),up(Lo))return Us(Lo),!0;const gs=Pl(Lo.nodeName);if(Ou("uponSanitizeElement",Lo,{tagName:gs,allowedTags:qo}),Lo.hasChildNodes()&&!qu(Lo.firstElementChild)&®ExpTest(/<[/\w]/g,Lo.innerHTML)&®ExpTest(/<[/\w]/g,Lo.textContent))return Us(Lo),!0;if(!qo[gs]||ks[gs]){if(!ks[gs]&&Uo(gs)&&(bs.tagNameCheck instanceof RegExp&®ExpTest(bs.tagNameCheck,gs)||bs.tagNameCheck instanceof Function&&bs.tagNameCheck(gs)))return!1;if(_c&&!Sl[gs]){const vs=_o(Lo)||Lo.parentNode,hs=xo(Lo)||Lo.childNodes;if(hs&&vs){const ws=hs.length;for(let Ws=ws-1;Ws>=0;--Ws)vs.insertBefore(vo(hs[Ws],!0),yo(Lo))}}return Us(Lo),!0}return Lo instanceof lo&&!ba(Lo)||(gs==="noscript"||gs==="noembed"||gs==="noframes")&®ExpTest(/<\/no(script|embed|frames)/i,Lo.innerHTML)?(Us(Lo),!0):(Ls&&Lo.nodeType===3&&(Yo=Lo.textContent,arrayForEach([Do,$o,Mo],vs=>{Yo=stringReplace(Yo,vs," ")}),Lo.textContent!==Yo&&(arrayPush(to.removed,{element:Lo.cloneNode()}),Lo.textContent=Yo)),Ou("afterSanitizeElements",Lo,null),!1)},Vs=function(Lo,Yo,gs){if(Ol&&(Yo==="id"||Yo==="name")&&(gs in ro||gs in xu))return!1;if(!(Ts&&!Is[Yo]&®ExpTest(Po,Yo))){if(!(Rs&®ExpTest(Bo,Yo))){if(!Qo[Yo]||Is[Yo]){if(!(Uo(Lo)&&(bs.tagNameCheck instanceof RegExp&®ExpTest(bs.tagNameCheck,Lo)||bs.tagNameCheck instanceof Function&&bs.tagNameCheck(Lo))&&(bs.attributeNameCheck instanceof RegExp&®ExpTest(bs.attributeNameCheck,Yo)||bs.attributeNameCheck instanceof Function&&bs.attributeNameCheck(Yo))||Yo==="is"&&bs.allowCustomizedBuiltInElements&&(bs.tagNameCheck instanceof RegExp&®ExpTest(bs.tagNameCheck,gs)||bs.tagNameCheck instanceof Function&&bs.tagNameCheck(gs))))return!1}else if(!ys[Yo]){if(!regExpTest(zo,stringReplace(gs,Fo,""))){if(!((Yo==="src"||Yo==="xlink:href"||Yo==="href")&&Lo!=="script"&&stringIndexOf(gs,"data:")===0&&Es[Lo])){if(!($s&&!regExpTest(No,stringReplace(gs,Fo,"")))){if(gs)return!1}}}}}}return!0},Uo=function(Lo){return Lo!=="annotation-xml"&&Lo.indexOf("-")>0},Xo=function(Lo){Ou("beforeSanitizeAttributes",Lo,null);const{attributes:Yo}=Lo;if(!Yo)return;const gs={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Qo};let vs=Yo.length;for(;vs--;){const hs=Yo[vs],{name:ws,namespaceURI:Ws,value:Rl}=hs,Dl=Pl(ws);let Al=ws==="value"?Rl:stringTrim(Rl);if(gs.attrName=Dl,gs.attrValue=Al,gs.keepAttr=!0,gs.forceKeepAttr=void 0,Ou("uponSanitizeAttribute",Lo,gs),Al=gs.attrValue,gs.forceKeepAttr||(mu(ws,Lo),!gs.keepAttr))continue;if(!Os&®ExpTest(/\/>/i,Al)){mu(ws,Lo);continue}Ls&&arrayForEach([Do,$o,Mo],Gl=>{Al=stringReplace(Al,Gl," ")});const Tl=Pl(Lo.nodeName);if(Vs(Tl,Dl,Al)){if(Zl&&(Dl==="id"||Dl==="name")&&(mu(ws,Lo),Al=ou+Al),Eo&&typeof po=="object"&&typeof po.getAttributeType=="function"&&!Ws)switch(po.getAttributeType(Tl,Dl)){case"TrustedHTML":{Al=Eo.createHTML(Al);break}case"TrustedScriptURL":{Al=Eo.createScriptURL(Al);break}}try{Ws?Lo.setAttributeNS(Ws,ws,Al):Lo.setAttribute(ws,Al),arrayPop(to.removed)}catch{}}}Ou("afterSanitizeAttributes",Lo,null)},Ho=function Vo(Lo){let Yo=null;const gs=uu(Lo);for(Ou("beforeSanitizeShadowDOM",Lo,null);Yo=gs.nextNode();)Ou("uponSanitizeShadowNode",Yo,null),!_h(Yo)&&(Yo.content instanceof io&&Vo(Yo.content),Xo(Yo));Ou("afterSanitizeShadowDOM",Lo,null)};return to.sanitize=function(Vo){let Lo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Yo=null,gs=null,vs=null,hs=null;if(Qs=!Vo,Qs&&(Vo=""),typeof Vo!="string"&&!qu(Vo))if(typeof Vo.toString=="function"){if(Vo=Vo.toString(),typeof Vo!="string")throw typeErrorCreate("dirty is not a string, aborting")}else throw typeErrorCreate("toString is not a function");if(!to.isSupported)return Vo;if(Js||$l(Lo),to.removed=[],typeof Vo=="string"&&(Fl=!1),Fl){if(Vo.nodeName){const Rl=Pl(Vo.nodeName);if(!qo[Rl]||ks[Rl])throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place")}}else if(Vo instanceof ao)Yo=Iu(""),gs=Yo.ownerDocument.importNode(Vo,!0),gs.nodeType===1&&gs.nodeName==="BODY"||gs.nodeName==="HTML"?Yo=gs:Yo.appendChild(gs);else{if(!ga&&!Ls&&!Ks&&Vo.indexOf("<")===-1)return Eo&&yl?Eo.createHTML(Vo):Vo;if(Yo=Iu(Vo),!Yo)return ga?null:yl?So:""}Yo&&Ys&&Us(Yo.firstChild);const ws=uu(Fl?Vo:Yo);for(;vs=ws.nextNode();)_h(vs)||(vs.content instanceof io&&Ho(vs.content),Xo(vs));if(Fl)return Vo;if(ga){if($a)for(hs=Co.call(Yo.ownerDocument);Yo.firstChild;)hs.appendChild(Yo.firstChild);else hs=Yo;return(Qo.shadowroot||Qo.shadowrootmode)&&(hs=wo.call(no,hs,!0)),hs}let Ws=Ks?Yo.outerHTML:Yo.innerHTML;return Ks&&qo["!doctype"]&&Yo.ownerDocument&&Yo.ownerDocument.doctype&&Yo.ownerDocument.doctype.name&®ExpTest(DOCTYPE_NAME,Yo.ownerDocument.doctype.name)&&(Ws=" `+Ws),Ls&&arrayForEach([Do,$o,Mo],Rl=>{Ws=stringReplace(Ws,Rl," ")}),Eo&&yl?Eo.createHTML(Ws):Ws},to.setConfig=function(){let Vo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$l(Vo),Js=!0},to.clearConfig=function(){hu=null,Js=!1},to.isValidAttribute=function(Vo,Lo,Yo){hu||$l({});const gs=Pl(Vo),vs=Pl(Lo);return Vs(gs,vs,Yo)},to.addHook=function(Vo,Lo){typeof Lo=="function"&&(Ro[Vo]=Ro[Vo]||[],arrayPush(Ro[Vo],Lo))},to.removeHook=function(Vo){if(Ro[Vo])return arrayPop(Ro[Vo])},to.removeHooks=function(Vo){Ro[Vo]&&(Ro[Vo]=[])},to.removeAllHooks=function(){Ro={}},to}var purify=createDOMPurify(),eventemitter3={exports:{}};(function(eo){var to=Object.prototype.hasOwnProperty,ro="~";function no(){}Object.create&&(no.prototype=Object.create(null),new no().__proto__||(ro=!1));function oo(lo,co,uo){this.fn=lo,this.context=co,this.once=uo||!1}function io(lo,co,uo,fo,ho){if(typeof uo!="function")throw new TypeError("The listener must be a function");var po=new oo(uo,fo||lo,ho),go=ro?ro+co:co;return lo._events[go]?lo._events[go].fn?lo._events[go]=[lo._events[go],po]:lo._events[go].push(po):(lo._events[go]=po,lo._eventsCount++),lo}function so(lo,co){--lo._eventsCount===0?lo._events=new no:delete lo._events[co]}function ao(){this._events=new no,this._eventsCount=0}ao.prototype.eventNames=function(){var co=[],uo,fo;if(this._eventsCount===0)return co;for(fo in uo=this._events)to.call(uo,fo)&&co.push(ro?fo.slice(1):fo);return Object.getOwnPropertySymbols?co.concat(Object.getOwnPropertySymbols(uo)):co},ao.prototype.listeners=function(co){var uo=ro?ro+co:co,fo=this._events[uo];if(!fo)return[];if(fo.fn)return[fo.fn];for(var ho=0,po=fo.length,go=new Array(po);ho{no.current=!1}:eo,to)}var l$4=he$1;function D$3(){}function h$4(eo,to,ro,no){return De$1(eo,no)||be$1(eo,to,ro,no)}function De$1(eo,to){return eo.editor.getModel(te$1(eo,to))}function be$1(eo,to,ro,no){return eo.editor.createModel(to,ro,no?te$1(eo,no):void 0)}function te$1(eo,to){return eo.Uri.parse(to)}function Oe$1({original:eo,modified:to,language:ro,originalLanguage:no,modifiedLanguage:oo,originalModelPath:io,modifiedModelPath:so,keepCurrentOriginalModel:ao=!1,keepCurrentModifiedModel:lo=!1,theme:co="light",loading:uo="Loading...",options:fo={},height:ho="100%",width:po="100%",className:go,wrapperProps:vo={},beforeMount:yo=D$3,onMount:xo=D$3}){let[_o,Eo]=reactExports.useState(!1),[So,ko]=reactExports.useState(!0),Ao=reactExports.useRef(null),Co=reactExports.useRef(null),Oo=reactExports.useRef(null),wo=reactExports.useRef(xo),Ro=reactExports.useRef(yo),Do=reactExports.useRef(!1);k$3(()=>{let Bo=loader.init();return Bo.then(No=>(Co.current=No)&&ko(!1)).catch(No=>(No==null?void 0:No.type)!=="cancelation"&&console.error("Monaco initialization: error:",No)),()=>Ao.current?Po():Bo.cancel()}),l$4(()=>{if(Ao.current&&Co.current){let Bo=Ao.current.getOriginalEditor(),No=h$4(Co.current,eo||"",no||ro||"text",io||"");No!==Bo.getModel()&&Bo.setModel(No)}},[io],_o),l$4(()=>{if(Ao.current&&Co.current){let Bo=Ao.current.getModifiedEditor(),No=h$4(Co.current,to||"",oo||ro||"text",so||"");No!==Bo.getModel()&&Bo.setModel(No)}},[so],_o),l$4(()=>{let Bo=Ao.current.getModifiedEditor();Bo.getOption(Co.current.editor.EditorOption.readOnly)?Bo.setValue(to||""):to!==Bo.getValue()&&(Bo.executeEdits("",[{range:Bo.getModel().getFullModelRange(),text:to||"",forceMoveMarkers:!0}]),Bo.pushUndoStop())},[to],_o),l$4(()=>{var Bo,No;(No=(Bo=Ao.current)==null?void 0:Bo.getModel())==null||No.original.setValue(eo||"")},[eo],_o),l$4(()=>{let{original:Bo,modified:No}=Ao.current.getModel();Co.current.editor.setModelLanguage(Bo,no||ro||"text"),Co.current.editor.setModelLanguage(No,oo||ro||"text")},[ro,no,oo],_o),l$4(()=>{var Bo;(Bo=Co.current)==null||Bo.editor.setTheme(co)},[co],_o),l$4(()=>{var Bo;(Bo=Ao.current)==null||Bo.updateOptions(fo)},[fo],_o);let $o=reactExports.useCallback(()=>{var Fo;if(!Co.current)return;Ro.current(Co.current);let Bo=h$4(Co.current,eo||"",no||ro||"text",io||""),No=h$4(Co.current,to||"",oo||ro||"text",so||"");(Fo=Ao.current)==null||Fo.setModel({original:Bo,modified:No})},[ro,to,oo,eo,no,io,so]),Mo=reactExports.useCallback(()=>{var Bo;!Do.current&&Oo.current&&(Ao.current=Co.current.editor.createDiffEditor(Oo.current,{automaticLayout:!0,...fo}),$o(),(Bo=Co.current)==null||Bo.editor.setTheme(co),Eo(!0),Do.current=!0)},[fo,co,$o]);reactExports.useEffect(()=>{_o&&wo.current(Ao.current,Co.current)},[_o]),reactExports.useEffect(()=>{!So&&!_o&&Mo()},[So,_o,Mo]);function Po(){var No,Fo,zo,qo;let Bo=(No=Ao.current)==null?void 0:No.getModel();ao||((Fo=Bo==null?void 0:Bo.original)==null||Fo.dispose()),lo||((zo=Bo==null?void 0:Bo.modified)==null||zo.dispose()),(qo=Ao.current)==null||qo.dispose()}return React.createElement(H$2,{width:po,height:ho,isEditorReady:_o,loading:uo,_ref:Oo,className:go,wrapperProps:vo})}var ie$3=Oe$1;reactExports.memo(ie$3);function He$1(eo){let to=reactExports.useRef();return reactExports.useEffect(()=>{to.current=eo},[eo]),to.current}var se$1=He$1,_$6=new Map;function Ve$1({defaultValue:eo,defaultLanguage:to,defaultPath:ro,value:no,language:oo,path:io,theme:so="light",line:ao,loading:lo="Loading...",options:co={},overrideServices:uo={},saveViewState:fo=!0,keepCurrentModel:ho=!1,width:po="100%",height:go="100%",className:vo,wrapperProps:yo={},beforeMount:xo=D$3,onMount:_o=D$3,onChange:Eo,onValidate:So=D$3}){let[ko,Ao]=reactExports.useState(!1),[Co,Oo]=reactExports.useState(!0),wo=reactExports.useRef(null),Ro=reactExports.useRef(null),Do=reactExports.useRef(null),$o=reactExports.useRef(_o),Mo=reactExports.useRef(xo),Po=reactExports.useRef(),Bo=reactExports.useRef(no),No=se$1(io),Fo=reactExports.useRef(!1),zo=reactExports.useRef(!1);k$3(()=>{let Qo=loader.init();return Qo.then(Zo=>(wo.current=Zo)&&Oo(!1)).catch(Zo=>(Zo==null?void 0:Zo.type)!=="cancelation"&&console.error("Monaco initialization: error:",Zo)),()=>Ro.current?Go():Qo.cancel()}),l$4(()=>{var Zo,bs,ks,Is;let Qo=h$4(wo.current,eo||no||"",to||oo||"",io||ro||"");Qo!==((Zo=Ro.current)==null?void 0:Zo.getModel())&&(fo&&_$6.set(No,(bs=Ro.current)==null?void 0:bs.saveViewState()),(ks=Ro.current)==null||ks.setModel(Qo),fo&&((Is=Ro.current)==null||Is.restoreViewState(_$6.get(io))))},[io],ko),l$4(()=>{var Qo;(Qo=Ro.current)==null||Qo.updateOptions(co)},[co],ko),l$4(()=>{!Ro.current||no===void 0||(Ro.current.getOption(wo.current.editor.EditorOption.readOnly)?Ro.current.setValue(no):no!==Ro.current.getValue()&&(zo.current=!0,Ro.current.executeEdits("",[{range:Ro.current.getModel().getFullModelRange(),text:no,forceMoveMarkers:!0}]),Ro.current.pushUndoStop(),zo.current=!1))},[no],ko),l$4(()=>{var Zo,bs;let Qo=(Zo=Ro.current)==null?void 0:Zo.getModel();Qo&&oo&&((bs=wo.current)==null||bs.editor.setModelLanguage(Qo,oo))},[oo],ko),l$4(()=>{var Qo;ao!==void 0&&((Qo=Ro.current)==null||Qo.revealLine(ao))},[ao],ko),l$4(()=>{var Qo;(Qo=wo.current)==null||Qo.editor.setTheme(so)},[so],ko);let qo=reactExports.useCallback(()=>{var Qo;if(!(!Do.current||!wo.current)&&!Fo.current){Mo.current(wo.current);let Zo=io||ro,bs=h$4(wo.current,no||eo||"",to||oo||"",Zo||"");Ro.current=(Qo=wo.current)==null?void 0:Qo.editor.create(Do.current,{model:bs,automaticLayout:!0,...co},uo),fo&&Ro.current.restoreViewState(_$6.get(Zo)),wo.current.editor.setTheme(so),ao!==void 0&&Ro.current.revealLine(ao),Ao(!0),Fo.current=!0}},[eo,to,ro,no,oo,io,co,uo,fo,so,ao]);reactExports.useEffect(()=>{ko&&$o.current(Ro.current,wo.current)},[ko]),reactExports.useEffect(()=>{!Co&&!ko&&qo()},[Co,ko,qo]),Bo.current=no,reactExports.useEffect(()=>{var Qo,Zo;ko&&Eo&&((Qo=Po.current)==null||Qo.dispose(),Po.current=(Zo=Ro.current)==null?void 0:Zo.onDidChangeModelContent(bs=>{zo.current||Eo(Ro.current.getValue(),bs)}))},[ko,Eo]),reactExports.useEffect(()=>{if(ko){let Qo=wo.current.editor.onDidChangeMarkers(Zo=>{var ks;let bs=(ks=Ro.current.getModel())==null?void 0:ks.uri;if(bs&&Zo.find(Is=>Is.path===bs.path)){let Is=wo.current.editor.getModelMarkers({resource:bs});So==null||So(Is)}});return()=>{Qo==null||Qo.dispose()}}return()=>{}},[ko,So]);function Go(){var Qo,Zo;(Qo=Po.current)==null||Qo.dispose(),ho?fo&&_$6.set(io,Ro.current.saveViewState()):(Zo=Ro.current.getModel())==null||Zo.dispose(),Ro.current.dispose()}return React.createElement(H$2,{width:po,height:go,isEditorReady:ko,loading:lo,_ref:Do,className:vo,wrapperProps:yo})}var fe$1=Ve$1,de$1=reactExports.memo(fe$1),Ft$1=de$1;const JinjaSyntaxHighlighter=({value:eo,theme:to,onMount:ro})=>jsxRuntimeExports.jsx(Ft$1,{value:eo,theme:to,options:{readOnly:!0,minimap:{enabled:!1}},defaultLanguage:"jinja2",onMount:(no,oo)=>{oo.languages.register({id:"jinja2"}),oo.languages.setLanguageConfiguration("jinja2",{comments:{blockComment:["{#","#}"]},brackets:[["{#","#}"],["{%","%}"],["{{","}}"],["{","}"]],folding:{markers:{start:/\{%\s*(block|for|if)/,end:/\{%\s*end(block|for|if)/}}}),oo.languages.setMonarchTokensProvider("jinja2",{tokenizer:{root:[[/\{\{/,"delimiter"],[/\}\}/,"delimiter"],[/\{#/,"comment"],[/#\}/,"comment"],[/\{%/,"control"],[/%\}/,"control"],[/\b(if|else|elif|endif|for|endfor|set|extends|include|block|endblock|macro|endmacro)\b/,"keyword"],[/\b(length|list|lower|upper|trim|truncate|replace|round|urlencode|urlize)\b/,"filter"],[/\b(\+|-|\*|\/|%|\*\*|\/\/)\b/,"operator"],[/\b(\d+|\d*\.\d+)\b/,"number"],[/(^user:|^# user:|^system:|^# system:|^assistant:|^# assistant:)/,"keyword"]]}}),ro==null||ro(no)}});mergeStyleSets({root:{},header:{display:"flex",alignItems:"center",cursor:"pointer","&:hover":{backgroundColor:"var(--vscode-editor-inactiveSelectionBackground)"}},toggleButton:{marginRight:"0.5em",userSelect:"none"},body:{overflowY:"hidden",height:"fit-content"}});const locStringsInjectionToken=createInjectionToken("locStrings",{}),useLocStrings=()=>{const[eo]=useInjected(locStringsInjectionToken);return eo};var BuildInEventName=(eo=>(eo.exception="exception",eo["function.inputs"]="promptflow.function.inputs",eo["function.output"]="promptflow.function.output",eo["embedding.embeddings"]="promptflow.embedding.embeddings",eo["retrieval.query"]="promptflow.retrieval.query",eo["retrieval.documents"]="promptflow.retrieval.documents",eo["llm.generated_message"]="promptflow.llm.generated_message",eo["prompt.template"]="promptflow.prompt.template",eo))(BuildInEventName||{});const EventNameToAttribute={"promptflow.function.inputs":"inputs","promptflow.function.output":"output"},safeJSONParse=eo=>{try{return JSON.parse(eo)}catch{return eo}},safeJSONParseV2=eo=>{try{return JSON.parse(eo)}catch{return eo}};function isJsonl(eo){return eo.split(` -`).every(ro=>{try{return JSON.parse(ro),!0}catch{return!1}})}const isValidJson=eo=>{if(typeof eo!="string")return!1;try{return JSON.parse(eo),!0}catch{return!1}};function formatDecimal(eo){return Math.abs(eo=Math.round(eo))>=1e21?eo.toLocaleString("en").replace(/,/g,""):eo.toString(10)}function formatDecimalParts(eo,to){if((ro=(eo=to?eo.toExponential(to-1):eo.toExponential()).indexOf("e"))<0)return null;var ro,no=eo.slice(0,ro);return[no.length>1?no[0]+no.slice(2):no,+eo.slice(ro+1)]}function exponent(eo){return eo=formatDecimalParts(Math.abs(eo)),eo?eo[1]:NaN}function formatGroup(eo,to){return function(ro,no){for(var oo=ro.length,io=[],so=0,ao=eo[0],lo=0;oo>0&&ao>0&&(lo+ao+1>no&&(ao=Math.max(1,no-lo)),io.push(ro.substring(oo-=ao,oo+ao)),!((lo+=ao+1)>no));)ao=eo[so=(so+1)%eo.length];return io.reverse().join(to)}}function formatNumerals(eo){return function(to){return to.replace(/[0-9]/g,function(ro){return eo[+ro]})}}var re$2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function formatSpecifier(eo){if(!(to=re$2.exec(eo)))throw new Error("invalid format: "+eo);var to;return new FormatSpecifier({fill:to[1],align:to[2],sign:to[3],symbol:to[4],zero:to[5],width:to[6],comma:to[7],precision:to[8]&&to[8].slice(1),trim:to[9],type:to[10]})}formatSpecifier.prototype=FormatSpecifier.prototype;function FormatSpecifier(eo){this.fill=eo.fill===void 0?" ":eo.fill+"",this.align=eo.align===void 0?">":eo.align+"",this.sign=eo.sign===void 0?"-":eo.sign+"",this.symbol=eo.symbol===void 0?"":eo.symbol+"",this.zero=!!eo.zero,this.width=eo.width===void 0?void 0:+eo.width,this.comma=!!eo.comma,this.precision=eo.precision===void 0?void 0:+eo.precision,this.trim=!!eo.trim,this.type=eo.type===void 0?"":eo.type+""}FormatSpecifier.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function formatTrim(eo){e:for(var to=eo.length,ro=1,no=-1,oo;ro0&&(no=0);break}return no>0?eo.slice(0,no)+eo.slice(oo+1):eo}var prefixExponent;function formatPrefixAuto(eo,to){var ro=formatDecimalParts(eo,to);if(!ro)return eo+"";var no=ro[0],oo=ro[1],io=oo-(prefixExponent=Math.max(-8,Math.min(8,Math.floor(oo/3)))*3)+1,so=no.length;return io===so?no:io>so?no+new Array(io-so+1).join("0"):io>0?no.slice(0,io)+"."+no.slice(io):"0."+new Array(1-io).join("0")+formatDecimalParts(eo,Math.max(0,to+io-1))[0]}function formatRounded(eo,to){var ro=formatDecimalParts(eo,to);if(!ro)return eo+"";var no=ro[0],oo=ro[1];return oo<0?"0."+new Array(-oo).join("0")+no:no.length>oo+1?no.slice(0,oo+1)+"."+no.slice(oo+1):no+new Array(oo-no.length+2).join("0")}const formatTypes={"%":(eo,to)=>(eo*100).toFixed(to),b:eo=>Math.round(eo).toString(2),c:eo=>eo+"",d:formatDecimal,e:(eo,to)=>eo.toExponential(to),f:(eo,to)=>eo.toFixed(to),g:(eo,to)=>eo.toPrecision(to),o:eo=>Math.round(eo).toString(8),p:(eo,to)=>formatRounded(eo*100,to),r:formatRounded,s:formatPrefixAuto,X:eo=>Math.round(eo).toString(16).toUpperCase(),x:eo=>Math.round(eo).toString(16)};function identity(eo){return eo}var map=Array.prototype.map,prefixes=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function formatLocale(eo){var to=eo.grouping===void 0||eo.thousands===void 0?identity:formatGroup(map.call(eo.grouping,Number),eo.thousands+""),ro=eo.currency===void 0?"":eo.currency[0]+"",no=eo.currency===void 0?"":eo.currency[1]+"",oo=eo.decimal===void 0?".":eo.decimal+"",io=eo.numerals===void 0?identity:formatNumerals(map.call(eo.numerals,String)),so=eo.percent===void 0?"%":eo.percent+"",ao=eo.minus===void 0?"−":eo.minus+"",lo=eo.nan===void 0?"NaN":eo.nan+"";function co(fo){fo=formatSpecifier(fo);var ho=fo.fill,po=fo.align,go=fo.sign,vo=fo.symbol,yo=fo.zero,xo=fo.width,_o=fo.comma,Eo=fo.precision,So=fo.trim,ko=fo.type;ko==="n"?(_o=!0,ko="g"):formatTypes[ko]||(Eo===void 0&&(Eo=12),So=!0,ko="g"),(yo||ho==="0"&&po==="=")&&(yo=!0,ho="0",po="=");var Ao=vo==="$"?ro:vo==="#"&&/[boxX]/.test(ko)?"0"+ko.toLowerCase():"",Co=vo==="$"?no:/[%p]/.test(ko)?so:"",Oo=formatTypes[ko],wo=/[defgprs%]/.test(ko);Eo=Eo===void 0?6:/[gprs]/.test(ko)?Math.max(1,Math.min(21,Eo)):Math.max(0,Math.min(20,Eo));function Ro(Do){var $o=Ao,Mo=Co,Po,Bo,No;if(ko==="c")Mo=Oo(Do)+Mo,Do="";else{Do=+Do;var Fo=Do<0||1/Do<0;if(Do=isNaN(Do)?lo:Oo(Math.abs(Do),Eo),So&&(Do=formatTrim(Do)),Fo&&+Do==0&&go!=="+"&&(Fo=!1),$o=(Fo?go==="("?go:ao:go==="-"||go==="("?"":go)+$o,Mo=(ko==="s"?prefixes[8+prefixExponent/3]:"")+Mo+(Fo&&go==="("?")":""),wo){for(Po=-1,Bo=Do.length;++PoNo||No>57){Mo=(No===46?oo+Do.slice(Po+1):Do.slice(Po))+Mo,Do=Do.slice(0,Po);break}}}_o&&!yo&&(Do=to(Do,1/0));var zo=$o.length+Do.length+Mo.length,qo=zo>1)+$o+Do+Mo+qo.slice(zo);break;default:Do=qo+$o+Do+Mo;break}return io(Do)}return Ro.toString=function(){return fo+""},Ro}function uo(fo,ho){var po=co((fo=formatSpecifier(fo),fo.type="f",fo)),go=Math.max(-8,Math.min(8,Math.floor(exponent(ho)/3)))*3,vo=Math.pow(10,-go),yo=prefixes[8+go/3];return function(xo){return po(vo*xo)+yo}}return{format:co,formatPrefix:uo}}var locale,format;defaultLocale({thousands:",",grouping:[3],currency:["$",""]});function defaultLocale(eo){return locale=formatLocale(eo),format=locale.format,locale.formatPrefix,locale}function formatInt(eo){return Math.abs(eo)<1e6?format(",")(eo):format("0.2s")(eo)}function formatFloat(eo){const to=Math.abs(eo);return to===0?"0.00":to<.01?format(".2e")(eo):to<1e3?format("0.2f")(eo):format("0.2s")(eo)}function formatNumber$1(eo){return Number.isInteger(eo)?formatInt(eo):formatFloat(eo)}function createNumberFormatter(eo){return to=>typeof to!="number"?"--":eo(to)}const intFormatter=createNumberFormatter(formatInt),floatFormatter=createNumberFormatter(formatFloat),timeFormat=eo=>(eo&&!eo.endsWith("Z")&&(eo+="Z"),eo?new Date(eo).toLocaleString([],{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"--"),latencyFormatInMS=eo=>{if(eo===void 0||eo<0)return"N/A";if(eo<6e4)return format(".3f")(eo/1e3)+"s";{const to=Math.floor(eo/6e4);eo%=6e4;const ro=eo/1e3;return`${to}min ${Math.floor(ro)}s`}},parseHttpSpanAttributes=eo=>{var no;const to=eo==null?void 0:eo.attributes;if(!to||((no=to.span_type)==null?void 0:no.toLowerCase())!=="http")return;const ro={response:{headers:{}},request:{headers:{}}};return Object.entries(to).forEach(([oo,io])=>{const so=oo.toLowerCase();if(so==="url.full"){ro.urlFull=io;return}const[ao,lo,co,...uo]=so.split(".");if(ao==="http")switch(lo){case"request":co==="header"?ro.request.headers[uo.join(".")]=io:ro.request[[co,...uo].join(".")]=io;break;case"response":co==="header"?ro.response.headers[uo.join(".")]=io:ro.response[[co,...uo].join(".")]=io;break;case"status_code":ro.status_code=io;break;case"method":ro.method=io;break;default:ro[oo.substring(5)]=io}}),ro},convertToTraceListRow=eo=>{var ro,no,oo;const to=eo.end_time&&eo.start_time?Date.parse(eo.end_time)-Date.parse(eo.start_time):0;return{...eo,latency:to,total_tokens:(ro=eo==null?void 0:eo.cumulative_token_count)==null?void 0:ro.total,prompt_tokens:(no=eo==null?void 0:eo.cumulative_token_count)==null?void 0:no.prompt,completion_tokens:(oo=eo==null?void 0:eo.cumulative_token_count)==null?void 0:oo.completion}};var AutoRefreshInterval=(eo=>(eo.OFF="OFF",eo["30s"]="30s",eo["1m"]="1m",eo["5m"]="5m",eo["10m"]="10m",eo))(AutoRefreshInterval||{});const AUTO_REFRESH_LIST=["OFF","30s","1m","5m"],REFRESH_INTERVAL_MAP={OFF:0,"30s":3e4,"1m":6e4,"5m":3e5,"10m":6e5};var _a$1;const initialTableColumnNames={normalColumns:[],evaluationColumns:[]};var ViewStatus=(eo=>(eo.loading="loading",eo.loaded="loaded",eo.error="error",eo.hidden="hidden",eo))(ViewStatus||{});const nv=class nv{constructor(to){this.selectedSpanId$=new State$1(void 0),this.selectedTraceId$=new State$1(void 0),this.selectedLLMMessage$=new State$1(void 0),this.spans$=new ObservableMap,this.traces$=new ObservableOrderedMap,this.tableColumnNames$=new State$1(initialTableColumnNames),this.tableHiddenColumnKeys$=new State$1([]),this.isTraceDetailOpen$=new State$1(!1),this.isGanttChartOpen$=new State$1(!1),this.showTraceDetailRightPanel$=new State$1(!0),this.traceListStatus$=new State$1("loading"),this.traceDetailStatus$=new State$1("loading"),this.traceListShowMetrics$=new State$1(!0),this.traceFilterChanged$=new State$1(!1),this.messagesBySpanId$=new ObservableOrderedMap,this.sortColumn$=new State$1(void 0),this.sortableColumns=[],this.traceDetailHistoryTraceList$=new State$1([]),this.traceDetailEvaluationTraces$=new ObservableMap,this.loadSummariesError$=new State$1(void 0),this.traceListAutoRefreshInterval$=new State$1(AutoRefreshInterval.OFF),this.isLazyLoadSpan=!0,this.spanEventsLoadStatus$=new ObservableMap,this.spanRawJsonLoadCache$=new ObservableMap;const{traceListConfig:ro,spanConfig:no}=to||{};ro&&(this.traceListColumnModifier=ro.columnModifier,ro.showMetrics!==void 0&&this.traceListShowMetrics$.setState(ro.showMetrics),ro.defaultHiddenColumnKeys!==void 0&&this.tableHiddenColumnKeys$.setState(ro.defaultHiddenColumnKeys),ro.sortableColumns&&(this.sortableColumns=ro.sortableColumns)),no&&(this._fetchSpanEvent=no.fetchSpanEvent,this.isLazyLoadSpan=no.isLazyLoadSpan??!0),this.selectedTrace$=Computed$1.fromStates([this.selectedTraceId$,this.traces$],([oo,io])=>oo&&io.get(oo)||void 0),this.selectedTraceId$.subscribe(oo=>{var so;if(!oo)return;const io=this.traces$.get(oo);(so=this._traceDetailDidOpenCallback)==null||so.call(this,oo,io)}),this.isTraceDetailOpen$.subscribe(oo=>{var ao;const io=this.selectedTraceId$.getSnapshot(),so=this.selectedTrace$.getSnapshot();!oo&&io&&((ao=this._traceDetailDidCloseCallback)==null||ao.call(this,io,so),this.clearDetail())}),this.sortColumn$.subscribe(oo=>{var io;(io=this._traceListSortColumnDidChangeCallback)==null||io.call(this,oo)}),this.traceDetailTitle$=Computed$1.fromStates([this.selectedTraceId$,this.traces$],([oo,io])=>{if(!oo)return"";const so=io.get(oo);return(so==null?void 0:so.name)??""})}traceDetailDidOpen(to){this._traceDetailDidOpenCallback=to}traceDetailDidClose(to){this._traceDetailDidCloseCallback=to}onTraceDetailCopyUrl(to){this._traceDetailCopyUrlCallback=to}traceListSortColumnDidChange(to){this._traceListSortColumnDidChangeCallback=to}onRefreshSpans(to){this._refreshSpansCallback=to}setOnRefreshTraces(to){this._refreshTracesCallback=to}traceDetailCopyUrl(){const to=this.selectedTraceId$.getSnapshot(),ro=this.selectedTrace$.getSnapshot();return to&&this._traceDetailCopyUrlCallback?(this._traceDetailCopyUrlCallback(to,ro),!0):!1}refreshSpans(){var no;const to=this.selectedTraceId$.getSnapshot(),ro=this.selectedTrace$.getSnapshot();to&&(this.spanEventsLoadStatus$.clear(),this.spanRawJsonLoadCache$.clear(),(no=this._refreshSpansCallback)==null||no.call(this,to,ro))}refreshTraces(){var to;(to=this._refreshTracesCallback)==null||to.call(this)}clear(){this.traces$.clear(),this.spans$.clear()}clearDetail(){this.traceDetailStatus$.setState("hidden"),this.isGanttChartOpen$.setState(!1),this.selectedTraceId$.setState(void 0),this.selectedLLMMessage$.next(void 0),this.spanEventsLoadStatus$.clear(),this.spanRawJsonLoadCache$.clear(),this.clearDetailHistoryTrace()}clearDetailHistoryTrace(){this.traceDetailHistoryTraceList$.next([]);const to=this.traceDetailEvaluationTraces$.getSnapshot().keys();for(const ro of to){const no=this.traces$.get(ro);no&&no.__is_ui_evaluation__&&this.traces$.delete(ro)}this.traceDetailEvaluationTraces$.clear()}appendTraces(to,ro){to.forEach(no=>{if(no.trace_id!==void 0){const oo=this.traces$.get(no.trace_id);(oo&&oo.__is_ui_evaluation__||!oo&&this.traceDetailEvaluationTraces$.get(no.trace_id))&&(no.__is_ui_evaluation__=!0),ro?this.traces$.set(no.trace_id,no).sortByValue(ro):this.traces$.set(no.trace_id,no)}})}appendSpans(to){to.forEach(ro=>{var lo,co;const no=(lo=ro==null?void 0:ro.context)==null?void 0:lo.trace_id,oo=(co=ro==null?void 0:ro.context)==null?void 0:co.span_id;if(!no||!oo)return;const io=this.spans$.get(no)||new ObservableOrderedMap,so=this.spanEventsLoadStatus$.getSnapshot().keys(),ao=this.spanRawJsonLoadCache$.getSnapshot().keys();this.spanEventsLoadStatus$.deleteAll(Array.from(so).filter(uo=>uo.includes(oo))),this.spanRawJsonLoadCache$.deleteAll(Array.from(ao).filter(uo=>uo.includes(oo))),this.spans$.set(no,io.set(oo,ro))})}toggleIsGanttChartOpen(){this.isGanttChartOpen$.setState(!this.isGanttChartOpen$.getSnapshot())}getTraceById(to){return to?this.traces$.get(to):void 0}setTraceListStatus(to){this.traceListStatus$.setState(to),to!=="error"&&this.loadSummariesError$.setState(void 0)}setTraceDetailStatus(to){this.traceDetailStatus$.setState(to)}setTraceDetailOpen(to,ro){this.isTraceDetailOpen$.setState(to),this.selectedTraceId$.setState(to?ro:void 0)}sortTraces(to){this.traces$.sortByValue(to)}fetchSpanEvent(to){var ro;return((ro=this._fetchSpanEvent)==null?void 0:ro.call(this,to))??Promise.resolve({status:"success"})}detailNavigateTo(to,ro){if(ro!==void 0){const io=this.traceDetailHistoryTraceList$.getSnapshot().slice(0,ro);this.traceDetailHistoryTraceList$.setState(io),this.selectedTraceId$.setState(to.trace_id);return}const no=this.selectedTrace$.getSnapshot();no&&this.traceDetailHistoryTraceList$.setState([...this.traceDetailHistoryTraceList$.getSnapshot(),no]),to.trace_id&&this.traceDetailEvaluationTraces$.set(to.trace_id,!0),this.selectedTraceId$.setState(to.trace_id)}};_a$1=SINGLETON,nv[_a$1]=!0;let TraceViewModel=nv;const TraceViewModelToken=createInjectionToken("TraceViewModel",new TraceViewModel),useLoadSpanEvents=(eo,to,ro)=>{const no=useTraceViewModel(),oo=useSpanEventsLoadStatus();return reactExports.useMemo(()=>createLoadSpanEvents(no,oo,eo,to,ro),[no,oo,eo,to,ro])},createLoadSpanEvents=(eo,to,ro,no,oo)=>{const io=(so,ao,lo)=>{var uo;const{data:co}=so;if((uo=ao.events)!=null&&uo[lo]){const fo=typeof co=="string"?safeJSONParseV2(co):co;typeof fo=="object"&&(fo.name=ao.events[lo].name??"",ao.events[lo]=fo)}};return({onCompleted:so,forceRefresh:ao})=>{var co,uo,fo,ho;if(!((co=ro==null?void 0:ro.events)!=null&&co.length)||!eo.isLazyLoadSpan){so();return}if(oo!==void 0){const po=(uo=ro.external_event_data_uris)==null?void 0:uo[oo];if(!po){so();return}const go=`${(fo=ro.context)==null?void 0:fo.span_id}__${po}`;if(to.get(go)==="success"){so();return}if(!ao&&to.has(go)){so(to.get(go)==="error"?new Error("load error"):void 0);return}eo.fetchSpanEvent(po).then(vo=>{vo.status==="error"?(to.set(go,"error"),so(new Error("load error"))):(io(vo,ro,oo),to.set(go,"success"),so())});return}const lo=`${(ho=ro.context)==null?void 0:ho.span_id}__${no}`;if(!ao&&to.has(lo)){so(to.get(lo)==="error"?new Error("load error"):void 0);return}Promise.all(ro.events.map((po,go)=>{var vo,yo;if(po.name===no){const xo=(vo=ro.external_event_data_uris)==null?void 0:vo[go];if(!xo)return Promise.resolve({status:"success"});const _o=`${(yo=ro.context)==null?void 0:yo.span_id}__${xo}`;return to.get(_o)==="success"?Promise.resolve({status:"success"}):!ao&&to.has(_o)?Promise.resolve({status:to.get(_o)==="error"?"error":"success"}):eo.fetchSpanEvent(xo).then(Eo=>(Eo.status==="error"?to.set(_o,"error"):(io(Eo,ro,go),to.set(_o,"success")),Eo))}}).filter(po=>po!==void 0)).then(po=>{if(po.some(go=>(go==null?void 0:go.status)==="error")){to.set(lo,"error"),so(new Error("load error"));return}to.set(lo,"success"),so()})}},getSpanEventsWithPayload=(eo,to)=>{var ro;return((ro=eo==null?void 0:eo.events)==null?void 0:ro.filter(no=>no.name===to).map(no=>{var oo;return{...no,attributes:safeJSONParse(((oo=no.attributes)==null?void 0:oo.payload)??"")}}))??[]},useLoadSpans=(eo,to)=>{const ro=useTraceViewModel(),no=useSpanEventsLoadStatus(),oo=[];for(const ao of eo)if(ao!==void 0)for(const lo of to)oo.push(createLoadSpanEvents(ro,no,ao,lo));const io=reactExports.useMemo(()=>eo,[...eo]),so=reactExports.useMemo(()=>to.join(","),[to]);return reactExports.useMemo(()=>({onCompleted:ao,forceRefresh:lo})=>{Promise.all(oo.map(co=>new Promise((uo,fo)=>{co({onCompleted:ho=>{if(ho){fo();return}uo(void 0)},forceRefresh:lo})}))).then(()=>{ao()}).catch(()=>{ao(new Error("load error"))})},[io,so])},useFetchSpanRawJson=eo=>{const to=useTraceViewModel(),ro=useSpanRawJsonLoadCache();return reactExports.useMemo(()=>{const no=eo==null?void 0:eo.span_json_uri;return({onCompleted:oo})=>{var ao;if(!no){oo(void 0,void 0);return}const io=`${(ao=eo==null?void 0:eo.context)==null?void 0:ao.span_id}__${no}`,so=ro.get(io);if(so){oo(void 0,so);return}to.fetchSpanEvent(no).then(lo=>{lo.status==="success"?(ro.set(io,lo.data),oo(void 0,lo.data)):oo(new Error("load error"))})}},[to,ro,eo])},useTraceViewModel=()=>{const[eo]=useInjected(TraceViewModelToken);return eo},useSelectedSpanId=()=>{const eo=useTraceViewModel();return useState(eo.selectedSpanId$)},useSelectedSpan=()=>{var no;const eo=useTraceViewModel(),to=useSelectedSpanId(),ro=useSelectedTraceId();if(!(!to||!ro))return(no=eo.spans$.get(ro))==null?void 0:no.get(to)},useParentSpanOfSelectedSpan=()=>{var no;const eo=useTraceViewModel(),to=useSelectedTraceId(),ro=useSelectedSpan();if(!(!ro||!to||!ro.parent_id))return(no=eo.spans$.get(to))==null?void 0:no.get(ro.parent_id)},useSetSelectedSpanId=()=>useSetState(useTraceViewModel().selectedSpanId$),useSelectedTraceId=()=>useState(useTraceViewModel().selectedTraceId$),useSetSelectedTraceId=()=>useSetState(useTraceViewModel().selectedTraceId$),useSelectedTrace=()=>{const eo=useTraceViewModel();return useState(eo.selectedTrace$)},useSpansOfSelectedTrace=()=>{const eo=useTraceViewModel(),to=useSelectedTraceId(),ro=useState(eo.spans$.get(to??"")??new ObservableOrderedMap);return Array.from(ro.values())},useTraces=()=>{const eo=useState(useTraceViewModel().traces$);return reactExports.useMemo(()=>Array.from(eo.values()).filter(to=>!to.__is_ui_evaluation__),[eo])},useTraceNavigation=()=>{var uo;const eo=useTraceViewModel(),to=useTraces(),ro=useSelectedTraceId(),oo=((uo=useTraceDetailHistoryTraces()[0])==null?void 0:uo.trace_id)??ro,io=to.findIndex(fo=>fo.trace_id===oo),so=io>0,ao=io{so&&(eo.clearDetailHistoryTrace(),eo.selectedTraceId$.setState(to[io-1].trace_id))},[so,io,to,eo]),co=reactExports.useCallback(()=>{ao&&(eo.clearDetailHistoryTrace(),eo.selectedTraceId$.setState(to[io+1].trace_id))},[ao,io,to,eo]);return{hasPreviousTrace:so,hasNextTrace:ao,goToPreviousTrace:lo,goToNextTrace:co}},useEvaluationSpansOfSelectedSpan=()=>{const eo=useTraceViewModel(),to=[],ro=useSelectedTrace();return ro?(Object.keys(ro.evaluations??[]).forEach(no=>{var io,so;const oo=(io=ro==null?void 0:ro.evaluations)==null?void 0:io[no];if(oo){const ao=Array.from(((so=eo.spans$.get(oo.trace_id??""))==null?void 0:so.getState().values())??[]);to.push({evaluationName:oo.name??no,evaluationTraces:ao})}}),to):[]},useRootSpanIdOfSelectedSpans=()=>{const eo=useSelectedTrace();return eo==null?void 0:eo.root_span_id},useTableColumnNames=()=>useState(useTraceViewModel().tableColumnNames$),useSetTableColumnNames=()=>useSetState(useTraceViewModel().tableColumnNames$),useTableHiddenColumnKeys=()=>useState(useTraceViewModel().tableHiddenColumnKeys$),useSetTableHiddenColumnKeys=()=>useSetState(useTraceViewModel().tableHiddenColumnKeys$),useIsTraceDetailOpen=()=>useState(useTraceViewModel().isTraceDetailOpen$),useSetIsTraceDetailOpen=()=>useSetState(useTraceViewModel().isTraceDetailOpen$),useShowTraceDetailRightPanel=()=>useState(useTraceViewModel().showTraceDetailRightPanel$),useSetShowTraceDetailRightPanel=()=>useSetState(useTraceViewModel().showTraceDetailRightPanel$),useTraceDetailRefreshKey=()=>{const eo=useTraceViewModel(),to=useSelectedTraceId(),ro=useState(eo.spans$),no=Array.from(useState(ro.get(to??"")??new ObservableOrderedMap).keys());return`${to}-${no.join("-")}`},useIsGanttChartOpen=()=>useState(useTraceViewModel().isGanttChartOpen$),useTraceListColumnModifier=()=>useTraceViewModel().traceListColumnModifier,useTraceListShowMetrics=()=>useState(useTraceViewModel().traceListShowMetrics$),useTraceFilterChanged=()=>useState(useTraceViewModel().traceFilterChanged$),useSetTraceFilterChanged=()=>useSetState(useTraceViewModel().traceFilterChanged$),getSpanMessages=(eo,to,ro)=>{var po,go,vo,yo,xo;const no=to?(po=eo.spans$.get(to))==null?void 0:po.get(ro):void 0,oo=getSpanEventsWithPayload(no,BuildInEventName["function.inputs"])[0],io=getSpanEventsWithPayload(no,BuildInEventName["function.output"])[0],so=getSpanEventsWithPayload(no,BuildInEventName["llm.generated_message"])[0];if(!to)return{inputMessages:[],outputMessages:[],tools:[]};const ao=oo?oo.attributes:safeJSONParse(((go=no==null?void 0:no.attributes)==null?void 0:go.inputs)??"{}"),lo=(vo=no==null?void 0:no.attributes)==null?void 0:vo["llm.generated_message"],co=(so==null?void 0:so.attributes)??(lo?safeJSONParse(lo):void 0),uo=(ao==null?void 0:ao.tools)??[],fo=(ao==null?void 0:ao.messages)??[];let ho=[];if(co)typeof co=="string"?ho=[{content:co,role:"",tools:uo}]:ho=[co].map(_o=>({..._o,tools:uo}));else{const _o=io?io.attributes:safeJSONParse(((yo=no==null?void 0:no.attributes)==null?void 0:yo.output)??"{}");ho=((xo=_o==null?void 0:_o.choices)==null?void 0:xo.reduce((Eo,So)=>So.message?[...Eo,{...So.message,tools:uo}]:So.text?[...Eo,{content:So.text,role:"",tools:uo}]:Eo,[]))??[]}return{inputMessages:fo,outputMessages:ho,tools:uo}},useMessagesBySpanId=eo=>{const to=useTraceViewModel(),ro=useState(to.selectedTraceId$);return getSpanMessages(to,ro,eo)},useMessagesOfSelectedSpan=()=>{const eo=useSelectedSpanId();return useMessagesBySpanId(eo??"")},useGetAllTraces=()=>{const eo=useTraceViewModel();return reactExports.useCallback(()=>Array.from(eo.traces$.getState().values()),[eo.traces$])},useGetAllSpans=()=>{const eo=useTraceViewModel();return reactExports.useCallback(()=>{const to=[];return eo.spans$.getState().forEach(no=>{no.getState().forEach(io=>{to.push(io)})}),to},[eo.spans$])},useSortColumn=()=>{const eo=useTraceViewModel();return useState(eo.sortColumn$)},useSetSortColumn=()=>useSetState(useTraceViewModel().sortColumn$),useSortableColumns=()=>useTraceViewModel().sortableColumns,useSelectedTraceTitle=()=>useState(useTraceViewModel().traceDetailTitle$),useSpanEventsLoadStatus=()=>useTraceViewModel().spanEventsLoadStatus$,useSpanRawJsonLoadCache=()=>useTraceViewModel().spanRawJsonLoadCache$,useIsLazyLoadSpan=()=>useTraceViewModel().isLazyLoadSpan,useSelectedLLMMessage=()=>{const eo=useTraceViewModel();return useState(eo.selectedLLMMessage$)},useSetSelectedLLMMessage=()=>{const eo=useTraceViewModel();return useSetState(eo.selectedLLMMessage$)},useTraceDetailHistoryTraces=()=>{const eo=useTraceViewModel();return useState(eo.traceDetailHistoryTraceList$)},useGetTraceByLineRunId=()=>{const eo=useTraces();return reactExports.useCallback(to=>eo.find(ro=>ro.line_run_id===to),[eo])},useLoadSummariesError=()=>useState(useTraceViewModel().loadSummariesError$),useSetLoadSummariesError=()=>useSetState(useTraceViewModel().loadSummariesError$),useTraceListAutoRefreshInterval=()=>useState(useTraceViewModel().traceListAutoRefreshInterval$),useSetTraceListAutoRefreshInterval=()=>useSetState(useTraceViewModel().traceListAutoRefreshInterval$),StreamSwitcher=({isStreaming:eo,style:to,onIsStreamingChange:ro,labelName:no})=>{const oo=useLocStrings();return jsxRuntimeExports.jsx(Switch,{label:no||oo.Streaming,labelPosition:"before",checked:eo,onChange:(io,so)=>ro(so.checked),style:to})};var UISize=(eo=>(eo.extraSmall="extra-small",eo.small="small",eo.normal="normal",eo.large="large",eo))(UISize||{});const genStatusChecker=eo=>to=>to===void 0?!1:to.toLowerCase()===eo.toLowerCase(),checkStatus=(eo,to)=>eo===void 0?!1:eo.toLowerCase()===to.toLowerCase(),useUISize=eo=>{const{textSize:to,iconSize:ro,gap:no}=reactExports.useMemo(()=>{switch(eo){case UISize.extraSmall:return{textSize:200,iconSize:"12px",gap:"2px"};case UISize.small:return{textSize:300,iconSize:"16px",gap:"2px"};case UISize.large:return{textSize:500,iconSize:"26px",gap:"5px"};case UISize.normal:default:return{textSize:400,iconSize:"20px",gap:"5px"}}},[eo]);return{textSize:to,iconSize:ro,gap:no}},LatencyText=({startTimeISOString:eo,endTimeISOString:to,size:ro,tipTextSize:no,isLoading:oo=!1})=>{const io=useClasses$w(),so=eo?new Date(eo):void 0,ao=to?new Date(to):void 0,lo=so&&ao?ao.getTime()-so.getTime():void 0,co=latencyFormatInMS(lo),{textSize:uo,iconSize:fo,gap:ho}=useUISize(ro);return jsxRuntimeExports.jsx(Tooltip,{content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Text$2,{size:no,weight:"bold",block:!0,children:"Start Time"}),jsxRuntimeExports.jsx(Text$2,{size:no,block:!0,children:timeFormat(eo)}),jsxRuntimeExports.jsx(Text$2,{size:no,weight:"bold",block:!0,children:"End Time"}),jsxRuntimeExports.jsx(Text$2,{size:no,block:!0,children:timeFormat(to)})]}),relationship:"label",children:jsxRuntimeExports.jsxs("div",{className:io.wrapper,style:{gap:ho},children:[jsxRuntimeExports.jsx(Clock20Regular,{style:{height:fo,width:fo}}),oo?jsxRuntimeExports.jsx(SkeletonItem,{style:{width:fo,height:fo}}):jsxRuntimeExports.jsx(Text$2,{size:uo,className:io.text,children:co})]})})},useClasses$w=makeStyles({wrapper:{display:"inline-flex",flexDirection:"row",alignItems:"center"},text:{color:tokens.colorNeutralForeground3,fontWeight:600,whiteSpace:"nowrap"}}),MetricTag=({tag:eo,maxValueLength:to=20})=>{const ro=useClasses$v(),[no,oo]=React.useState(!0),io=reactExports.useMemo(()=>{if(typeof eo.value=="number")return formatNumber$1(eo.value);{const so=eo.value.toString();return no&&so.length>to?so.substring(0,to)+"...":so}},[eo.value,no,to]);return jsxRuntimeExports.jsxs(Badge$2,{className:ro.wrapper,size:"medium",shape:"rounded",appearance:"outline",onClick:()=>oo(!no),children:[jsxRuntimeExports.jsxs("span",{className:ro.name,children:[eo.name," "]}),jsxRuntimeExports.jsx("span",{className:ro.data,children:io})]})},useClasses$v=makeStyles({wrapper:{display:"inline-flex",fontSize:"12px",cursor:"pointer",...shorthands.padding("0px","8px","1px"),...shorthands.borderColor(tokens.colorPaletteGreenBorder2),...shorthands.gap("0.5rem")},name:{color:tokens.colorPaletteGreenBorder2,fontWeight:tokens.fontWeightRegular},data:{color:tokens.colorNeutralForeground1,fontWeight:tokens.fontWeightRegular}});function TokenText({token:eo,info:to,size:ro=UISize.normal,isLoading:no=!1}){const oo=useClasses$u(),io=typeof eo=="number"?intFormatter(eo):eo,{textSize:so,iconSize:ao,gap:lo}=useUISize(ro),co=no?jsxRuntimeExports.jsx(SkeletonItem,{style:{width:ao,height:ao}}):jsxRuntimeExports.jsx(Text$2,{size:so,className:oo.text,children:io});return jsxRuntimeExports.jsxs("div",{className:oo.wrapper,style:{gap:lo},children:[jsxRuntimeExports.jsx(NumberCircle020Regular,{style:{height:ao,width:ao}}),to?jsxRuntimeExports.jsx(Tooltip,{content:to,relationship:"description",children:co}):co]})}const useClasses$u=makeStyles({wrapper:{display:"inline-flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},text:{color:tokens.colorNeutralForeground3,fontWeight:600}}),NodeToken=({span:eo,showDetail:to=!0,size:ro})=>{const{"llm.usage.total_tokens":no,"llm.usage.prompt_tokens":oo,"llm.usage.completion_tokens":io}=eo.attributes||{};return no===void 0?null:jsxRuntimeExports.jsx(TokenText,{token:no,size:ro,info:to?jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",rowGap:6},children:[jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Total tokens",value:no}}),jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Prompt tokens",value:oo??0}}),jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Completion tokens",value:io??0}})]}):void 0})},SummaryToken=({trace:eo,showDetail:to=!0,size:ro,isLoading:no=!1})=>{const{total_tokens:oo,prompt_tokens:io,completion_tokens:so}=eo;return oo===void 0?null:jsxRuntimeExports.jsx(TokenText,{token:oo,size:ro,isLoading:no,info:to?jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",rowGap:6},children:[jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Total tokens",value:oo}}),io!==void 0&&jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Prompt tokens",value:io}}),so!==void 0&&jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Completion tokens",value:so}})]}):void 0})},getStatusTextByStatusCode=eo=>(eo==null?void 0:eo.toLowerCase())==="ok"||(eo==null?void 0:eo.toLowerCase())==="completed"?"Completed":eo||"unknown";function StatusText({statusCode:eo,showText:to=!1,size:ro,tooltipContent:no}){const oo=useClasses$t(),io=getStatusTextByStatusCode(eo),{textSize:so,iconSize:ao,gap:lo}=useUISize(ro),co=reactExports.useMemo(()=>({width:ao,height:ao}),[ao]),[uo,fo]=reactExports.useMemo(()=>{switch(eo==null?void 0:eo.toLowerCase()){case"ok":case"completed":return[jsxRuntimeExports.jsx(CheckmarkCircle20Filled,{style:co},"ok"),tokens.colorPaletteGreenForeground1];case"error":return[jsxRuntimeExports.jsx(DismissCircle20Filled,{style:co},"error"),tokens.colorPaletteRedForeground1];case"unset":return[jsxRuntimeExports.jsx(ErrorCircle20Filled,{style:co},"unset"),tokens.colorPaletteYellowForeground1];case"running":return[jsxRuntimeExports.jsx(ArrowClockwiseDashes20Filled,{className:oo.rotate,style:co},"running"),tokens.colorPaletteYellowForeground1];default:return[jsxRuntimeExports.jsx(QuestionCircle20Filled,{},"unknown"),tokens.colorPaletteYellowForeground1]}},[oo.rotate,co,eo]);return jsxRuntimeExports.jsx(Tooltip,{content:no??io??"",relationship:"label",children:jsxRuntimeExports.jsxs("div",{className:oo.wrapper,style:{color:fo,gap:to?lo:0},children:[uo,to&&jsxRuntimeExports.jsx(Text$2,{size:so,children:io})]})})}const useClasses$t=makeStyles({wrapper:{display:"inline-flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},rotate:{animationDuration:"2s",animationTimingFunction:"linear",animationIterationCount:"infinite",animationName:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}}}),useClasses$s=makeStyles({root:{display:"flex",fontSize:tokens.fontSizeBase200,marginLeft:"8px",...shorthands.gap("8px","column")}}),TraceSystemMetrics=()=>{const eo=useSelectedTrace(),to=useClasses$s();if(!eo)return null;const ro=checkStatus(eo.status,"running"),no=checkStatus(eo.status,"error");return jsxRuntimeExports.jsxs("div",{className:to.root,children:[jsxRuntimeExports.jsx(StatusText,{statusCode:eo.status,size:UISize.normal,showText:!0}),jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:eo.start_time,endTimeISOString:eo.end_time,size:UISize.normal,isLoading:ro}),!no&&jsxRuntimeExports.jsx(SummaryToken,{trace:convertToTraceListRow(eo),size:UISize.normal,isLoading:ro})]})},useClasses$r=makeStyles({title:{...shorthands.flex(1),...shorthands.padding("0"),lineHeight:"28px",fontSize:"20px",fontWeight:600},button:{fontSize:"20px",fontWeight:600,...shorthands.padding("0")},normalItem:{display:"flex",fontSize:"20px",fontWeight:600}}),TraceDetailTitle=({preTitleSlot:eo})=>{const to=useSelectedTraceTitle(),ro=useClasses$r(),no=useTraceDetailHistoryTraces(),oo=useTraceViewModel();return jsxRuntimeExports.jsxs(Breadcrumb,{className:ro.title,size:"large",children:[eo,no.length?no.map((io,so)=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(BreadcrumbItem,{children:jsxRuntimeExports.jsx(BreadcrumbButton,{className:ro.button,onClick:()=>{oo.detailNavigateTo(io,so)},children:jsxRuntimeExports.jsx("span",{children:io.name},io.trace_id)})},`${io.trace_id}-0`),jsxRuntimeExports.jsx(BreadcrumbDivider,{},`${io.trace_id}-1`)]})):null,jsxRuntimeExports.jsx(BreadcrumbItem,{children:jsxRuntimeExports.jsxs("div",{className:ro.normalItem,children:[to,jsxRuntimeExports.jsx(TraceSystemMetrics,{})]})})]})};function constant(eo){return()=>eo}const useClasses$q=makeStyles({header:{display:"flex",width:"100%",boxSizing:"border-box",...shorthands.padding("12px","20px")},divider:{height:"100%",...shorthands.flex("none"),...shorthands.padding(0,tokens.spacingHorizontalM)},navigation:{display:"flex",alignItems:"center",...shorthands.gap(tokens.spacingHorizontalS)},navigationItem:{"@media (max-width: 1020px)":{display:"none"}},navigationItemSmall:{minWidth:"auto","@media (min-width: 1020px)":{display:"none"}},time:{display:"flex",alignItems:"center",paddingRight:tokens.spacingHorizontalL,...shorthands.flex("0 1 auto"),"@media (max-width: 1020px)":{display:"none"}},timeSmall:{display:"flex",alignItems:"center",...shorthands.flex("0 1 auto"),"@media (min-width: 1020px)":{display:"none"}}}),TraceNavigation=({showPreviousTraceArrow:eo=constant(!0),showNextTraceArrow:to=constant(!0),goToNextTrace:ro,goToPreviousTrace:no})=>{const oo=useLocStrings(),io=useClasses$q(),so=useSelectedTrace(),{hasPreviousTrace:ao,hasNextTrace:lo,goToPreviousTrace:co,goToNextTrace:uo}=useTraceNavigation(),fo=ro||uo,ho=no||co;return ao||lo?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:io.navigation,children:[ao&&eo(so)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Button$2,{className:io.navigationItem,icon:jsxRuntimeExports.jsx(ArrowUp20Regular,{}),onClick:ho,appearance:"subtle",children:[oo["Previous trace"]," "]}),jsxRuntimeExports.jsx(Tooltip,{relationship:"description",content:oo["Previous trace"],children:jsxRuntimeExports.jsx(Button$2,{className:io.navigationItemSmall,icon:jsxRuntimeExports.jsx(ArrowUp20Regular,{}),onClick:ho,appearance:"subtle"})})]}),lo&&to(so)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Button$2,{className:io.navigationItem,icon:jsxRuntimeExports.jsx(ArrowDown20Regular,{}),onClick:fo,appearance:"subtle",children:[oo["Next trace"]," "]}),jsxRuntimeExports.jsx(Tooltip,{relationship:"description",content:oo["Next trace"],children:jsxRuntimeExports.jsx(Button$2,{className:io.navigationItemSmall,icon:jsxRuntimeExports.jsx(ArrowDown20Regular,{}),onClick:fo,appearance:"subtle"})})]})]}),jsxRuntimeExports.jsx(Divider$2,{vertical:!0,className:io.divider})]}):null},TraceDetailHeader=({setIsTraceDetailOpen:eo,showRefresh:to=!0,showGantt:ro=!1,showCopyUrl:no=!1,showStreamSwitch:oo=!1,showCloseAction:io=!0,showNavigation:so=!0,isStreaming:ao,traceNavigationProps:lo,onIsStreamingChange:co,preTitleSlot:uo})=>{const fo=useClasses$p(),ho=useLocStrings(),po=useTraceViewModel(),go=useIsGanttChartOpen(),[vo,yo]=React.useState("Copy URL"),xo=useSelectedTrace(),_o=xo!=null&&xo.start_time?timeFormat(xo.start_time):void 0;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:fo.header,children:[jsxRuntimeExports.jsx(TraceDetailTitle,{preTitleSlot:uo}),_o&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("time",{className:fo.time,children:[ho.Created_on,": ",_o]}),jsxRuntimeExports.jsx(Tooltip,{relationship:"description",content:ho.Created_on,children:jsxRuntimeExports.jsx("time",{className:fo.timeSmall,children:_o})})]}),jsxRuntimeExports.jsx(Divider$2,{vertical:!0,className:fo.divider}),so&&jsxRuntimeExports.jsx(TraceNavigation,{...lo}),oo&&ao!==void 0&&co!==void 0&&jsxRuntimeExports.jsx(StreamSwitcher,{style:{marginRight:"16px",marginTop:"4px"},isStreaming:ao,onIsStreamingChange:co}),no?jsxRuntimeExports.jsx(Tooltip,{content:ho[`${vo}`],relationship:"description",children:jsxRuntimeExports.jsx(Button$2,{appearance:"subtle","aria-label":"Copy URL",icon:jsxRuntimeExports.jsx(Share20Regular,{}),onMouseEnter:()=>{yo("Copy URL")},onClick:()=>{if(po.traceDetailCopyUrl()){yo("Copied!");return}const Eo=window.location.href;if(navigator.clipboard)navigator.clipboard.writeText(Eo),yo("Copied!");else{const So=document.createElement("textarea");So.value=Eo,document.body.appendChild(So),So.select();try{document.execCommand("copy"),yo("Copied!")}catch(ko){console.error("Fallback: Oops, unable to copy",ko),yo("Oops, unable to copy!")}document.body.removeChild(So)}}})}):null,to?jsxRuntimeExports.jsx(Tooltip,{content:ho["Refresh Data"],relationship:"description",children:jsxRuntimeExports.jsx(Button$2,{appearance:"subtle","aria-label":"Refresh",icon:jsxRuntimeExports.jsx(ArrowClockwise16Regular,{}),onClick:()=>po.refreshSpans()})}):null,ro?jsxRuntimeExports.jsx(Tooltip,{content:ho[go?"Hide Gantt":"Show Gantt"],relationship:"description",children:jsxRuntimeExports.jsx(Button$2,{style:{color:go?tokens.colorBrandForeground1:""},appearance:"subtle","aria-label":"Close",icon:jsxRuntimeExports.jsx(GanttChart20Regular,{}),onClick:()=>po.toggleIsGanttChartOpen()})}):null,io&&jsxRuntimeExports.jsx(Button$2,{appearance:"subtle","aria-label":"Close",icon:jsxRuntimeExports.jsx(Dismiss20Regular,{}),onClick:()=>eo(!1)})]}),jsxRuntimeExports.jsx(Divider$2,{})]})},useClasses$p=makeStyles({header:{display:"flex",width:"100%",boxSizing:"border-box",...shorthands.padding("12px","20px")},divider:{height:"100%",...shorthands.flex("none"),...shorthands.padding(0,tokens.spacingHorizontalM)},navigation:{display:"flex",alignItems:"center",...shorthands.gap(tokens.spacingHorizontalS)},navigationItem:{"@media (max-width: 1020px)":{display:"none"}},navigationItemSmall:{minWidth:"auto","@media (min-width: 1020px)":{display:"none"}},time:{display:"flex",alignItems:"center",paddingRight:tokens.spacingHorizontalL,...shorthands.flex("0 1 auto"),"@media (max-width: 1020px)":{display:"none"}},timeSmall:{display:"flex",alignItems:"center",...shorthands.flex("0 1 auto"),"@media (min-width: 1020px)":{display:"none"}}}),useDebugFunctions=()=>{const eo=useGetAllTraces(),to=useGetAllSpans(),ro=useSelectedTrace(),no=useSpansOfSelectedTrace();reactExports.useEffect(()=>{window.printTracesAndSpans=()=>{const oo=eo();console.log("traces",oo);const io=to();console.log("spans",io)},window.printSelectedTrace=()=>{console.log("selectedTrace",ro)},window.printSpansOfSelectedTrace=()=>{console.log("spansOfSelectedTrace",no)}},[eo,to,ro,no])},traceDetailErrorInjectionToken=createInjectionToken("traceDetailErrorInjectionToken",()=>{const eo=useLocStrings();return jsxRuntimeExports.jsx(MessageBar,{intent:"error",children:eo.Failed_to_load_trace})}),traceDetailLoadingInjectionToken=createInjectionToken("traceDetailLoadingInjectionToken",Loading),traceListErrorInjectionToken=createInjectionToken("traceListErrorInjectionToken",()=>{const eo=useLocStrings();return jsxRuntimeExports.jsx(MessageBar,{intent:"error",children:eo.Failed_to_load_traces})}),traceListLoadingInjectionToken=createInjectionToken("traceListLoadingInjectionToken",Loading),useTraceListViewStatus=()=>{const eo=useTraceViewModel();return useState(eo.traceListStatus$)},useTraceDetailViewStatus=()=>{const eo=useTraceViewModel();return useState(eo.traceDetailStatus$)},useTraceListLoadingComponent=()=>{const[eo]=useInjected(traceListLoadingInjectionToken);return eo},useTraceListErrorComponent=()=>{const[eo]=useInjected(traceListErrorInjectionToken);return eo},useTraceDetailLoadingComponent=()=>{const[eo]=useInjected(traceDetailLoadingInjectionToken);return eo},useTraceDetailErrorComponent=()=>{const[eo]=useInjected(traceDetailErrorInjectionToken);return eo},TREE_NODE_WIDTH=400,TREE_NODE_INDENT=48,TraceViewThemeContext=reactExports.createContext(!1),useIsDark=()=>reactExports.useContext(TraceViewThemeContext),sortTraceByStartTimeAsc$1=(eo,to)=>eo.start_time&&to.start_time?Date.parse(eo.start_time)-Date.parse(to.start_time):1,spansToGanttTasks=({spans:eo,parentSpanId:to})=>{const ro=new Map,no=new Set(eo.map(ao=>{var lo;return(lo=ao.context)==null?void 0:lo.span_id}).filter(ao=>!!ao)),oo=new Set;eo.forEach(ao=>{var lo,co;(lo=ao.context)!=null&&lo.span_id&&(ao.parent_id&&ao.parent_id!==to&&no.has(ao.parent_id)?ro.has(ao.parent_id)?ro.get(ao.parent_id).push(ao):ro.set(ao.parent_id,[ao]):oo.add((co=ao.context)==null?void 0:co.span_id))});const io=eo.filter(ao=>{var lo,co;return((lo=ao.context)==null?void 0:lo.span_id)&&oo.has((co=ao.context)==null?void 0:co.span_id)}).sort((ao,lo)=>Date.parse(ao.start_time??"")??0-Date.parse(lo.start_time??"")??0),so=ao=>ao.sort(sortTraceByStartTimeAsc$1).map(lo=>{var co,uo;return{startTime:Date.parse(lo.start_time??""),endTime:Date.parse(lo.end_time??""),id:((co=lo.context)==null?void 0:co.span_id)??"",name:lo.name??"",children:so(ro.get(((uo=lo.context)==null?void 0:uo.span_id)??"")??[])}});return so(io)},useStyles$j=makeStyles({grid:{height:"100%"},selectedRow:{backgroundColor:tokens.colorNeutralBackground2Selected}}),GanttView=()=>{const eo=useSpansOfSelectedTrace(),to=reactExports.useMemo(()=>new GanttViewModel,[]),ro=useSelectedSpanId(),no=useSetSelectedSpanId(),io=useIsDark()?"rdg-dark":"rdg-light",so=useStyles$j(),ao=reactExports.useRef(null);return reactExports.useEffect(()=>{to.setTasks(spansToGanttTasks({spans:eo})),to.selectedRowId$.subscribe(lo=>{lo&&lo!==ro&&no(lo)}),to.expandAllRows()},[eo.length]),reactExports.useEffect(()=>{var fo,ho;if(to.selectedRowId$.getSnapshot()===ro)return;to.selectedRowId$.next(ro);const co=[];let uo=eo.find(po=>{var go;return((go=po.context)==null?void 0:go.span_id)===ro});for(;uo;)((fo=uo.context)==null?void 0:fo.span_id)!==ro&&co.unshift(((ho=uo.context)==null?void 0:ho.span_id)??""),uo=eo.find(po=>{var go;return((go=po.context)==null?void 0:go.span_id)===(uo==null?void 0:uo.parent_id)});co.forEach(po=>{const go=to.rows$.getSnapshot().find(vo=>vo.id===po);go!=null&&go.isExpanded||to.toggleRow(po)})},[ro]),jsxRuntimeExports.jsx(Gantt,{viewModel:to,gridRef:ao,styles:{grid:mergeClasses(so.grid,io),selectedRow:so.selectedRow},getColumns:lo=>lo.map(co=>co.key==="name"?{...co,name:"span",width:180}:co.key==="duration"?{...co,name:"latency",width:60,renderHeaderCell(){return jsxRuntimeExports.jsx("div",{style:{textAlign:"right"},children:"latency"})},renderCell({row:uo}){return jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:new Date(uo.startTime).toISOString(),endTimeISOString:new Date(uo.endTime).toISOString(),size:UISize.extraSmall})}}:co)})},useNodeDetailClasses=makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%"},detailHeaderWrapper:{display:"flex",boxSizing:"border-box",width:"100%",...shorthands.padding("12px","12px",0,"12px"),flexDirection:"row",alignItems:"center",...shorthands.gap("12px")},detailHeaderTitle:{flexGrow:1,flexShrink:1,...shorthands.overflow("hidden"),whiteSpace:"nowrap",textOverflow:"ellipsis"},header:{display:"flex",height:"50px",boxSizing:"border-box",alignItems:"center",justifyContent:"flex-start",...shorthands.padding("6px","12px")},headerModalName:{color:tokens.colorNeutralForeground3,fontSize:"12px",fontWeight:600,lineHeight:"16px"},headerSpan:{marginRight:"10px"},headerTitle:{...shorthands.overflow("hidden"),textOverflow:"ellipsis",whiteSpace:"nowrap",marginRight:"4px",...shorthands.flex(0,1,"auto")},divider:{...shorthands.flex("none"),...shorthands.padding(0)},headerRight:{marginLeft:"auto",display:"flex",alignItems:"center",...shorthands.gap("12px")},tabDivider:{...shorthands.flex("none"),...shorthands.padding(0,"12px")},layout:{...shorthands.flex(1),display:"flex",flexDirection:"row",...shorthands.overflow("hidden")},layoutLeft:{...shorthands.flex(1),display:"flex",flexDirection:"column",...shorthands.overflow("hidden")},layoutRight:{height:"100%",...shorthands.overflow("hidden")},content:{...shorthands.flex(1),...shorthands.padding("12px"),...shorthands.overflow("auto")},panels:{...shorthands.padding(0,"10px"),"& th":{textAlign:"left",...shorthands.padding(0,"30px",0,0)}},cardWrapper:{backgroundColor:tokens.colorNeutralBackground3},cardTitle:{fontSize:"16px",fontWeight:600},innerCardWrapper:{...shorthands.padding("16px"),...shorthands.border("1px","solid",tokens.colorNeutralForeground1),...shorthands.borderRadius("8px")}}),useRetrievalNodeDetailClasses=makeStyles({accordionHeader:{"& button":{...shorthands.padding(0),fontWeight:600}}}),getSpanType=eo=>{var ro;const to=(ro=eo==null?void 0:eo.attributes)==null?void 0:ro.span_type;return to==null?void 0:to.split(".").pop()},useHasPromptTemplate=eo=>{const to=useSelectedSpan(),ro=reactExports.useMemo(()=>{var io;return(io=getSpanType(to))==null?void 0:io.toLocaleLowerCase()},[to]),no=useParentSpanOfSelectedSpan(),oo=reactExports.useCallback(io=>{eo(io)},[eo]);reactExports.useEffect(()=>{if(ro!=="llm"){oo(!1);return}const io=(no==null?void 0:no.attributes)||{},ao=getSpanEventsWithPayload(no,BuildInEventName["prompt.template"]).length>0||Object.prototype.hasOwnProperty.call(io,"prompt.template");oo(ao)},[ro,no,oo])},useHasLLMParameters=eo=>{const to=useSelectedSpan(),ro=reactExports.useMemo(()=>{var io;return(io=getSpanType(to))==null?void 0:io.toLocaleLowerCase()},[to]),no=useParentSpanOfSelectedSpan(),oo=reactExports.useCallback(io=>{eo(io)},[eo]);reactExports.useEffect(()=>{if(ro!=="llm"){oo(!1);return}const io=(no==null?void 0:no.attributes)||{},ao=getSpanEventsWithPayload(no,BuildInEventName["prompt.template"]).length>0||Object.prototype.hasOwnProperty.call(io,"prompt.variables");oo(ao)},[ro,no,oo])},useHasInputsOrOutput=eo=>{const to=useSelectedSpan(),ro=reactExports.useCallback(no=>{eo(no)},[eo]);reactExports.useEffect(()=>{var co;const no=(co=getSpanType(to))==null?void 0:co.toLocaleLowerCase(),oo=(to==null?void 0:to.attributes)||{},io=getSpanEventsWithPayload(to,BuildInEventName["function.inputs"]),so=getSpanEventsWithPayload(to,BuildInEventName["function.output"]),ao=io.length>0||Object.prototype.hasOwnProperty.call(oo,EventNameToAttribute[BuildInEventName["function.inputs"]]),lo=so.length>0||Object.prototype.hasOwnProperty.call(oo,EventNameToAttribute[BuildInEventName["function.output"]]);if(!no&&!ao&&!lo){ro(!1);return}ro(!0)},[to,ro])};function isObject(eo){return Object.prototype.toString.call(eo)==="[object Object]"}function objectSize(eo){return Array.isArray(eo)?eo.length:isObject(eo)?Object.keys(eo).length:0}function stringifyForCopying(eo,to){if(typeof eo=="string")return eo;try{return JSON.stringify(eo,(ro,no)=>{switch(typeof no){case"bigint":return String(no)+"n";case"number":case"boolean":case"object":case"string":return no;default:return String(no)}},to)}catch(ro){return`${ro.name}: ${ro.message}`||"JSON.stringify failed"}}function isCollapsed(eo,to,ro,no,oo,io){if(io&&io.collapsed!==void 0)return!!io.collapsed;if(typeof no=="boolean")return no;if(typeof no=="number"&&to>no)return!0;const so=objectSize(eo);if(typeof no=="function"){const ao=safeCall(no,[{node:eo,depth:to,indexOrName:ro,size:so}]);if(typeof ao=="boolean")return ao}return!!(Array.isArray(eo)&&so>oo||isObject(eo)&&so>oo)}function isCollapsed_largeArray(eo,to,ro,no,oo,io){if(io&&io.collapsed!==void 0)return!!io.collapsed;if(typeof no=="boolean")return no;if(typeof no=="number"&&to>no)return!0;const so=Math.ceil(eo.length/100);if(typeof no=="function"){const ao=safeCall(no,[{node:eo,depth:to,indexOrName:ro,size:so}]);if(typeof ao=="boolean")return ao}return!!(Array.isArray(eo)&&so>oo||isObject(eo)&&so>oo)}function ifDisplay(eo,to,ro){return typeof eo=="boolean"?eo:!!(typeof eo=="number"&&to>eo||eo==="collapsed"&&ro||eo==="expanded"&&!ro)}function safeCall(eo,to){try{return eo(...to)}catch(ro){reportError(ro)}}function editableAdd(eo){if(eo===!0||isObject(eo)&&eo.add===!0)return!0}function editableEdit(eo){if(eo===!0||isObject(eo)&&eo.edit===!0)return!0}function editableDelete(eo){if(eo===!0||isObject(eo)&&eo.delete===!0)return!0}function isReactComponent(eo){return typeof eo=="function"}function customAdd(eo){return!eo||eo.add===void 0||!!eo.add}function customEdit(eo){return!eo||eo.edit===void 0||!!eo.edit}function customDelete(eo){return!eo||eo.delete===void 0||!!eo.delete}function customCopy(eo){return!eo||eo.enableClipboard===void 0||!!eo.enableClipboard}function customMatchesURL(eo){return!eo||eo.matchesURL===void 0||!!eo.matchesURL}function resolveEvalFailedNewValue(eo,to){return eo==="string"?to.trim().replace(/^\"([\s\S]+?)\"$/,"$1"):to}var _path$8;function _extends$8(){return _extends$8=Object.assign?Object.assign.bind():function(eo){for(var to=1;to{oo.stopPropagation();const io=to(eo);typeof io=="string"&&io&&navigator.clipboard.writeText(io),no(!0),setTimeout(()=>no(!1),3e3)},className:"json-view--copy"})}function NameValue({indexOrName:eo,value:to,depth:ro,parent:no,deleteHandle:oo,editHandle:io}){return jsxRuntimeExports.jsxs("div",Object.assign({className:"json-view--pair"},{children:[jsxRuntimeExports.jsx("span",Object.assign({className:typeof eo=="number"?"json-view--index":"json-view--property"},{children:eo})),":"," ",jsxRuntimeExports.jsx(JsonNode,{node:to,depth:ro+1,deleteHandle:oo,editHandle:io,parent:no,indexOrName:eo})]}))}var _path$5,_path2$4;function _extends$5(){return _extends$5=Object.assign?Object.assign.bind():function(eo){for(var to=1;to{eo[_o]=Eo,co&&co({newValue:Eo,oldValue:So,depth:ro,src:lo,indexOrName:_o,parentType:"array"}),uo&&uo({type:"edit",depth:ro,src:lo,indexOrName:_o,parentType:"array"}),fo()},[to,co,uo,fo]),yo=_o=>{eo.splice(_o,1),fo()},xo=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!po&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>go(!0),className:"jv-size-chevron"},{children:[ifDisplay(ho,ro,po)&&jsxRuntimeExports.jsxs("span",Object.assign({className:"jv-size"},{children:[objectSize(to)," Items"]})),jsxRuntimeExports.jsx(SvgAngleDown,{className:"jv-chevron"})]})),!po&&ao&&customCopy(io)&&jsxRuntimeExports.jsx(CopyButton$1,{node:to})]});return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{children:"["}),xo,po?jsxRuntimeExports.jsxs("button",Object.assign({onClick:()=>go(!1),className:"jv-button"},{children:[so," ... ",so+to.length-1]})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:to.map((_o,Eo)=>jsxRuntimeExports.jsx(NameValue,{indexOrName:Eo+so,value:_o,depth:ro,parent:to,deleteHandle:yo,editHandle:vo},String(no)+String(Eo)))})),jsxRuntimeExports.jsx("span",{children:"]"})]})}function LargeArray({node:eo,depth:to,deleteHandle:ro,indexOrName:no,customOptions:oo}){const io=[];for(let $o=0;$o{_o(isCollapsed_largeArray(eo,to,no,so,lo,oo))},[so,lo]);const[Eo,So]=reactExports.useState(!1),ko=()=>{So(!1),ro&&ro(no),uo&&uo({value:eo,depth:to,src:fo,indexOrName:no,parentType:"array"}),go&&go({type:"delete",depth:to,src:fo,indexOrName:no,parentType:"array"})},[Ao,Co]=reactExports.useState(!1),Oo=()=>{const $o=eo;$o.push(null),ho&&ho({indexOrName:$o.length-1,depth:to,src:fo,parentType:"array"}),go&&go({type:"add",indexOrName:$o.length-1,depth:to,src:fo,parentType:"array"}),vo()},wo=Eo||Ao,Ro=()=>{So(!1),Co(!1)},Do=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!xo&&!wo&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>_o(!0),className:"jv-size-chevron"},{children:[ifDisplay(yo,to,xo)&&jsxRuntimeExports.jsxs("span",Object.assign({className:"jv-size"},{children:[eo.length," Items"]})),jsxRuntimeExports.jsx(SvgAngleDown,{className:"jv-chevron"})]})),wo&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:Ao?Oo:ko}),wo&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:Ro}),!xo&&!wo&&ao&&customCopy(oo)&&jsxRuntimeExports.jsx(CopyButton$1,{node:eo}),!xo&&!wo&&editableAdd(co)&&customAdd(oo)&&jsxRuntimeExports.jsx(SvgAddSquare,{className:"json-view--edit",onClick:()=>{Oo()}}),!xo&&!wo&&editableDelete(co)&&customDelete(oo)&&ro&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>So(!0)})]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"["}),Do,xo?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>_o(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:io.map(($o,Mo)=>jsxRuntimeExports.jsx(LargeArrayNode,{originNode:eo,node:$o,depth:to,index:Mo,startIndex:Mo*100},String(no)+String(Mo)))})),jsxRuntimeExports.jsx("span",{children:"]"}),xo&&ifDisplay(yo,to,xo)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>_o(!1),className:"jv-size"},{children:[eo.length," Items"]}))]})}function ObjectNode({node:eo,depth:to,indexOrName:ro,deleteHandle:no,customOptions:oo}){const{collapsed:io,enableClipboard:so,ignoreLargeArray:ao,collapseObjectsAfterLength:lo,editable:co,onDelete:uo,src:fo,onAdd:ho,onEdit:po,onChange:go,forceUpdate:vo,displaySize:yo}=reactExports.useContext(JsonViewContext);if(!ao&&Array.isArray(eo)&&eo.length>100)return jsxRuntimeExports.jsx(LargeArray,{node:eo,depth:to,indexOrName:ro,deleteHandle:no,customOptions:oo});const xo=isObject(eo),[_o,Eo]=reactExports.useState(isCollapsed(eo,to,ro,io,lo,oo));reactExports.useEffect(()=>{Eo(isCollapsed(eo,to,ro,io,lo,oo))},[io,lo]);const So=reactExports.useCallback((Fo,zo,qo)=>{Array.isArray(eo)?eo[+Fo]=zo:eo&&(eo[Fo]=zo),po&&po({newValue:zo,oldValue:qo,depth:to,src:fo,indexOrName:Fo,parentType:xo?"object":"array"}),go&&go({type:"edit",depth:to,src:fo,indexOrName:Fo,parentType:xo?"object":"array"}),vo()},[eo,po,go,vo]),ko=Fo=>{Array.isArray(eo)?eo.splice(+Fo,1):eo&&delete eo[Fo],vo()},[Ao,Co]=reactExports.useState(!1),Oo=()=>{Co(!1),no&&no(ro),uo&&uo({value:eo,depth:to,src:fo,indexOrName:ro,parentType:xo?"object":"array"}),go&&go({type:"delete",depth:to,src:fo,indexOrName:ro,parentType:xo?"object":"array"})},[wo,Ro]=reactExports.useState(!1),Do=reactExports.useRef(null),$o=()=>{var Fo;if(xo){const zo=(Fo=Do.current)===null||Fo===void 0?void 0:Fo.value;zo&&(eo[zo]=null,Do.current&&(Do.current.value=""),Ro(!1),ho&&ho({indexOrName:zo,depth:to,src:fo,parentType:"object"}),go&&go({type:"add",indexOrName:zo,depth:to,src:fo,parentType:"object"}))}else if(Array.isArray(eo)){const zo=eo;zo.push(null),ho&&ho({indexOrName:zo.length-1,depth:to,src:fo,parentType:"array"}),go&&go({type:"add",indexOrName:zo.length-1,depth:to,src:fo,parentType:"array"})}vo()},Mo=Fo=>{Fo.key==="Enter"?(Fo.preventDefault(),$o()):Fo.key==="Escape"&&Bo()},Po=Ao||wo,Bo=()=>{Co(!1),Ro(!1)},No=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!_o&&!Po&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>Eo(!0),className:"jv-size-chevron"},{children:[ifDisplay(yo,to,_o)&&jsxRuntimeExports.jsxs("span",Object.assign({className:"jv-size"},{children:[objectSize(eo)," Items"]})),jsxRuntimeExports.jsx(SvgAngleDown,{className:"jv-chevron"})]})),wo&&xo&&jsxRuntimeExports.jsx("input",{className:"json-view--input",placeholder:"property",ref:Do,onKeyDown:Mo}),Po&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:wo?$o:Oo}),Po&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:Bo}),!_o&&!Po&&so&&customCopy(oo)&&jsxRuntimeExports.jsx(CopyButton$1,{node:eo}),!_o&&!Po&&editableAdd(co)&&customAdd(oo)&&jsxRuntimeExports.jsx(SvgAddSquare,{className:"json-view--edit",onClick:()=>{xo?(Ro(!0),setTimeout(()=>{var Fo;return(Fo=Do.current)===null||Fo===void 0?void 0:Fo.focus()})):$o()}}),!_o&&!Po&&editableDelete(co)&&customDelete(oo)&&no&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>Co(!0)})]});return Array.isArray(eo)?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"["}),No,_o?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>Eo(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:eo.map((Fo,zo)=>jsxRuntimeExports.jsx(NameValue,{indexOrName:zo,value:Fo,depth:to,parent:eo,deleteHandle:ko,editHandle:So},String(ro)+String(zo)))})),jsxRuntimeExports.jsx("span",{children:"]"}),_o&&ifDisplay(yo,to,_o)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>Eo(!1),className:"jv-size"},{children:[objectSize(eo)," Items"]}))]}):xo?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"{"}),No,_o?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>Eo(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:Object.entries(eo).map(([Fo,zo])=>jsxRuntimeExports.jsx(NameValue,{indexOrName:Fo,value:zo,depth:to,parent:eo,deleteHandle:ko,editHandle:So},String(ro)+String(Fo)))})),jsxRuntimeExports.jsx("span",{children:"}"}),_o&&ifDisplay(yo,to,_o)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>Eo(!1),className:"jv-size"},{children:[objectSize(eo)," Items"]}))]}):null}const LongString=React.forwardRef(({str:eo,className:to,ctrlClick:ro},no)=>{let{collapseStringMode:oo,collapseStringsAfterLength:io,customizeCollapseStringUI:so}=reactExports.useContext(JsonViewContext);const[ao,lo]=reactExports.useState(!0),co=reactExports.useRef(null);io=io>0?io:0;const uo=eo.replace(/\s+/g," "),fo=typeof so=="function"?so(uo,ao):typeof so=="string"?so:"...",ho=po=>{var go;if((po.ctrlKey||po.metaKey)&&ro)ro(po);else{const vo=window.getSelection();if(vo&&vo.anchorOffset!==vo.focusOffset&&((go=vo.anchorNode)===null||go===void 0?void 0:go.parentElement)===co.current)return;lo(!ao)}};if(eo.length<=io)return jsxRuntimeExports.jsxs("span",Object.assign({ref:co,className:to,onClick:ro},{children:['"',eo,'"']}));if(oo==="address")return eo.length<=10?jsxRuntimeExports.jsxs("span",Object.assign({ref:co,className:to,onClick:ro},{children:['"',eo,'"']})):jsxRuntimeExports.jsxs("span",Object.assign({ref:co,onClick:ho,className:to+" cursor-pointer"},{children:['"',ao?[uo.slice(0,6),fo,uo.slice(-4)]:eo,'"']}));if(oo==="directly")return jsxRuntimeExports.jsxs("span",Object.assign({ref:co,onClick:ho,className:to+" cursor-pointer"},{children:['"',ao?[uo.slice(0,io),fo]:eo,'"']}));if(oo==="word"){let po=io,go=io+1,vo=uo,yo=1;for(;;){if(/\W/.test(eo[po])){vo=eo.slice(0,po);break}if(/\W/.test(eo[go])){vo=eo.slice(0,go);break}if(yo===6){vo=eo.slice(0,io);break}yo++,po--,go++}return jsxRuntimeExports.jsxs("span",Object.assign({ref:co,onClick:ho,className:to+" cursor-pointer"},{children:['"',ao?[vo,fo]:eo,'"']}))}return jsxRuntimeExports.jsxs("span",Object.assign({ref:co,className:to},{children:['"',eo,'"']}))});var _path$1;function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(eo){for(var to=1;to{setEditing(!0),setTimeout(()=>{var eo,to;(eo=window.getSelection())===null||eo===void 0||eo.selectAllChildren(valueRef.current),(to=valueRef.current)===null||to===void 0||to.focus()})},done=reactExports.useCallback(()=>{let newValue=valueRef.current.innerText;try{(newValue==="{}"||newValue==="[]")&&(newValue=`(${newValue})`);const evalValue=eval(newValue);editHandle&&editHandle(indexOrName,evalValue,node)}catch(eo){const to=resolveEvalFailedNewValue(type,newValue);editHandle&&editHandle(indexOrName,to,node)}setEditing(!1)},[editHandle]),cancel=()=>{setEditing(!1),setDeleting(!1)},deleteHandle=()=>{setDeleting(!1),_deleteHandle&&_deleteHandle(indexOrName),onDelete&&onDelete({value:node,depth,src,indexOrName,parentType:Array.isArray(parent)?"array":"object"}),onChange&&onChange({depth,src,indexOrName,parentType:Array.isArray(parent)?"array":"object",type:"delete"})},handleKeyDown=reactExports.useCallback(eo=>{eo.key==="Enter"?(eo.preventDefault(),done()):eo.key==="Escape"&&cancel()},[done]),isEditing=editing||deleting,ctrlClick=!isEditing&&editableEdit(editable)&&customEdit(customReturn)&&editHandle?eo=>{(eo.ctrlKey||eo.metaKey)&&edit()}:void 0,Icons=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[isEditing&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:deleting?deleteHandle:done}),isEditing&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:cancel}),!isEditing&&enableClipboard&&customCopy(customReturn)&&jsxRuntimeExports.jsx(CopyButton$1,{node}),!isEditing&&matchesURL&&type==="string"&&urlRegExp.test(node)&&customMatchesURL(customReturn)&&jsxRuntimeExports.jsx("a",Object.assign({href:node,target:"_blank",className:"json-view--link"},{children:jsxRuntimeExports.jsx(SvgLink,{})})),!isEditing&&editableEdit(editable)&&customEdit(customReturn)&&editHandle&&jsxRuntimeExports.jsx(SvgEdit,{className:"json-view--edit",onClick:edit}),!isEditing&&editableDelete(editable)&&customDelete(customReturn)&&_deleteHandle&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>setDeleting(!0)})]});let className="json-view--string";switch(typeof(customReturn==null?void 0:customReturn.className)=="string"&&(className+=" "+customReturn.className),type){case"number":case"bigint":className="json-view--number";break;case"boolean":className="json-view--boolean";break;case"object":className="json-view--null";break}deleting&&(className+=" json-view--deleting");let displayValue=String(node);type==="bigint"&&(displayValue+="n");const EditingElement=reactExports.useMemo(()=>jsxRuntimeExports.jsx("span",{contentEditable:!0,className,dangerouslySetInnerHTML:{__html:type==="string"?`"${displayValue}"`:displayValue},ref:valueRef,onKeyDown:handleKeyDown}),[displayValue,type,handleKeyDown]);return type==="string"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[editing?EditingElement:node.length>collapseStringsAfterLength?jsxRuntimeExports.jsx(LongString,{str:node,ref:valueRef,className,ctrlClick}):jsxRuntimeExports.jsxs("span",Object.assign({className,onClick:ctrlClick},{children:['"',displayValue,'"']})),Icons]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[editing?EditingElement:jsxRuntimeExports.jsx("span",Object.assign({className,onClick:ctrlClick},{children:displayValue})),Icons]})}}const defaultURLRegExp=/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,JsonViewContext=reactExports.createContext({src:void 0,collapseStringsAfterLength:99,collapseStringMode:"directly",customizeCollapseStringUI:void 0,collapseObjectsAfterLength:20,collapsed:!1,enableClipboard:!0,editable:!1,onEdit:void 0,onDelete:void 0,onAdd:void 0,onChange:void 0,forceUpdate:()=>{},customizeNode:void 0,customizeCopy:()=>{},displaySize:void 0,matchesURL:!1,urlRegExp:defaultURLRegExp,ignoreLargeArray:!1});function JsonView({src:eo,collapseStringsAfterLength:to=99,collapseStringMode:ro="directly",customizeCollapseStringUI:no,collapseObjectsAfterLength:oo=99,collapsed:io,enableClipboard:so=!0,editable:ao=!1,onEdit:lo,onDelete:co,onAdd:uo,onChange:fo,dark:ho=!1,theme:po="default",customizeNode:go,customizeCopy:vo=stringifyForCopying,displaySize:yo,style:xo,className:_o,matchesURL:Eo=!1,urlRegExp:So=defaultURLRegExp,ignoreLargeArray:ko=!1}){const[Ao,Co]=reactExports.useState(0),Oo=reactExports.useCallback(()=>Co(Do=>++Do),[]),[wo,Ro]=reactExports.useState(eo);return reactExports.useEffect(()=>Ro(eo),[eo]),jsxRuntimeExports.jsx(JsonViewContext.Provider,Object.assign({value:{src:wo,collapseStringsAfterLength:to,collapseStringMode:ro,customizeCollapseStringUI:no,collapseObjectsAfterLength:oo,collapsed:io,enableClipboard:so,editable:ao,onEdit:lo,onDelete:co,onAdd:uo,onChange:fo,forceUpdate:Oo,customizeNode:go,customizeCopy:vo,displaySize:yo,matchesURL:Eo,urlRegExp:So,ignoreLargeArray:ko}},{children:jsxRuntimeExports.jsx("code",Object.assign({className:"json-view"+(ho?" dark":"")+(po&&po!=="default"?" json-view_"+po:"")+(_o?" "+_o:""),style:xo},{children:jsxRuntimeExports.jsx(JsonNode,{node:wo,depth:1,editHandle:(Do,$o,Mo)=>{Ro($o),lo&&lo({newValue:$o,oldValue:Mo,depth:1,src:wo,indexOrName:Do,parentType:null}),fo&&fo({type:"edit",depth:1,src:wo,indexOrName:Do,parentType:null})},deleteHandle:()=>{Ro(void 0),co&&co({value:wo,depth:1,src:wo,indexOrName:"",parentType:null}),fo&&fo({depth:1,src:wo,indexOrName:"",parentType:null,type:"delete"})}})}))}))}const ImageViewer=({src:eo,width:to=100,height:ro=100,enablePopUpImageViewer:no=!0})=>{const[oo,io]=reactExports.useState(!1),so=useClasses$o(),[ao,lo]=reactExports.useState(!1),co=eo.startsWith('"')&&eo.endsWith('"')?eo.slice(1,-1):eo,uo=()=>{io(!0)},fo=()=>{io(!1)},ho=()=>{no&&lo(!0)},po=()=>{io(!1),lo(!1)};return jsxRuntimeExports.jsxs("div",{className:so.container,style:{maxWidth:`${to}px`,maxHeight:`${ro}px`},onMouseEnter:no?uo:void 0,onMouseLeave:no?fo:void 0,children:[jsxRuntimeExports.jsx(Image$2,{src:co,className:so.image,onClick:ho,fit:"contain",alt:"image"}),no&&jsxRuntimeExports.jsxs(Dialog,{open:ao,children:[jsxRuntimeExports.jsx(DialogTrigger,{disableButtonEnhancement:!0,children:jsxRuntimeExports.jsx(Button$2,{className:so.button,onClick:ho,size:"small",style:{display:oo?"block":"none"},children:"View"})}),jsxRuntimeExports.jsx(DialogSurface,{children:jsxRuntimeExports.jsxs(DialogBody,{children:[jsxRuntimeExports.jsx(DialogTitle,{children:"Image Viewer"}),jsxRuntimeExports.jsx(DialogContent,{children:jsxRuntimeExports.jsx(Image$2,{src:co,className:so.image,onClick:ho,fit:"contain",alt:"image"})}),jsxRuntimeExports.jsx(DialogActions,{children:jsxRuntimeExports.jsx(Button$2,{appearance:"secondary",onClick:po,children:"Close"})})]})})]})]})},useClasses$o=makeStyles({container:{position:"relative",display:"inline-block"},image:{cursor:"pointer",maxWidth:"100%",maxHeight:"calc(100% - 20px)"},button:{position:"absolute",top:"50%",left:"50%",cursor:"pointer",transform:"translate(-50%, -50%)"}}),JsonViewer=eo=>{const{src:to,disableCustomCollapse:ro,customizeNode:no,enablePopUpImageViewer:oo,...io}=eo,[so,ao]=React.useState(to);React.useEffect(()=>{if(typeof to=="string")try{const co=JSON.parse(to);ao(co)}catch{if(isJsonl(to)){const uo=safelyParseJsonLines(to);ao(uo)}else ao(to)}},[to]);const lo=co=>{const{node:uo}=co,fo=no&&no(co);if(fo)return fo;if(isImageValue(uo))return jsxRuntimeExports.jsx(ImageViewer,{src:uo,enablePopUpImageViewer:oo})};return jsxRuntimeExports.jsx(JsonView,{src:so,customizeCollapseStringUI:ro?void 0:()=>jsxRuntimeExports.jsx(ExpandButton,{}),customizeNode:lo,...io})},isImageValue=eo=>!!(typeof eo=="string"&&(eo.startsWith("data:image/")||eo.startsWith('"data:image/'))),ExpandButton=()=>{const eo=useClasses$n();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["...",jsxRuntimeExports.jsxs("div",{className:eo.btn,children:[jsxRuntimeExports.jsx(ChevronDown16Regular,{className:eo.icon}),jsxRuntimeExports.jsx("span",{className:eo.text,children:"view all"})]})]})},useClasses$n=makeStyles({btn:{display:"inline-flex",pointer:"cursor",alignItems:"center",...shorthands.padding(0),paddingLeft:"4px",...shorthands.margin(0),fontWeight:400,color:"#A3BEE9"},icon:{height:"12px",width:"12px",...shorthands.padding(0),...shorthands.margin(0)},text:{fontSize:"12px",...shorthands.padding(0),...shorthands.margin(0)}}),JsonNodeCard=({title:eo,src:to,wrapperStyle:ro={},status:no=ViewStatus.loaded,errorTip:oo=null,jsonViewerProps:io={}})=>{let so="";if(typeof to=="string")try{so=JSON.parse(to)}catch{so=to}else typeof to=="object"&&(so=to);const ao=useIsDark();return jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12,...ro},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:eo})})}),no===ViewStatus.loading&&jsxRuntimeExports.jsx(Spinner,{size:"tiny"}),no===ViewStatus.loaded&&jsxRuntimeExports.jsx(JsonViewer,{src:so,theme:"vscode",dark:ao,collapseStringsAfterLength:300,...io}),no===ViewStatus.error&&oo]})},DefaultNodeInfo=()=>{var go,vo,yo,xo;const eo=useSelectedSpan(),to=(go=getSpanType(eo))==null?void 0:go.toLocaleLowerCase(),ro=useLocStrings(),[no,oo]=reactExports.useState(ViewStatus.loading),[io,so]=reactExports.useState(ViewStatus.loading),ao=getSpanEventsWithPayload(eo,BuildInEventName["function.inputs"]),lo=getSpanEventsWithPayload(eo,BuildInEventName["llm.generated_message"]),co=useLoadSpanEvents(eo,BuildInEventName["function.inputs"]),uo=useLoadSpanEvents(eo,BuildInEventName["llm.generated_message"]);let fo=getSpanEventsWithPayload(eo,BuildInEventName["function.output"]),ho=useLoadSpanEvents(eo,BuildInEventName["function.output"]);to==="llm"&&lo.length>0&&(fo=lo,ho=uo);let po=(vo=eo==null?void 0:eo.attributes)==null?void 0:vo.output;return to==="llm"&&(po=po??((yo=eo==null?void 0:eo.attributes)==null?void 0:yo["llm.generated_message"])),reactExports.useEffect(()=>{oo(ViewStatus.loading),co({onCompleted:_o=>{oo(_o?ViewStatus.error:ViewStatus.loaded)}}),so(ViewStatus.loading),ho({onCompleted:_o=>{so(_o?ViewStatus.error:ViewStatus.loaded)}})},[co,ho]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ao.length>0?jsxRuntimeExports.jsx(JsonNodeCard,{title:ro.Input,status:no,src:ao.length===1?ao[0].attributes:ao,errorTip:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{oo(ViewStatus.loading),co({onCompleted:_o=>{oo(_o?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})}):jsxRuntimeExports.jsx(JsonNodeCard,{title:ro.Input,src:(xo=eo==null?void 0:eo.attributes)==null?void 0:xo.inputs}),fo.length>0?jsxRuntimeExports.jsx(JsonNodeCard,{title:ro.Output,status:io,src:fo.length===1?fo[0].attributes:fo,errorTip:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{so(ViewStatus.loading),ho({onCompleted:_o=>{so(_o?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})}):jsxRuntimeExports.jsx(JsonNodeCard,{title:ro.Output,src:po})]})},DefaultNodeLoadError=({onRetry:eo})=>{const to=useLocStrings();return jsxRuntimeExports.jsx(Button$2,{appearance:"transparent",icon:jsxRuntimeExports.jsx(ErrorCircle16Filled,{style:{color:tokens.colorStatusDangerForeground1}}),style:{fontWeight:400},onClick:eo,children:to["Failed to load, click to try again"]})},CollapsibleTextArea=({children:eo})=>{const[to,ro]=reactExports.useState(!0),no=useClasses$m();return jsxRuntimeExports.jsxs("div",{className:no.wrapper,children:[jsxRuntimeExports.jsx(Button$2,{icon:to?jsxRuntimeExports.jsx(TextWrapOff16Regular,{}):jsxRuntimeExports.jsx(TextWrap16Regular,{}),onClick:()=>ro(!to),size:"small"}),jsxRuntimeExports.jsx("pre",{className:`${to&&no.wrap} ${no.pre}`,children:eo})]})},useClasses$m=makeStyles({wrapper:{width:"95%",height:"100%",paddingLeft:tokens.spacingHorizontalM,color:tokens.colorNeutralForeground1,display:"flex",flexDirection:"column"},wrap:{wordBreak:"break-all",whiteSpace:"pre-wrap"},pre:{marginTop:0}}),ErrorsTab=()=>{var lo;const eo=useClasses$l(),to=useSelectedSpan(),ro=((lo=to==null?void 0:to.events)==null?void 0:lo.filter(co=>co.name===BuildInEventName.exception))??[],no=useIsDark(),oo=useLocStrings(),[io,so]=reactExports.useState(ViewStatus.loading),ao=useLoadSpanEvents(to,BuildInEventName.exception);return reactExports.useEffect(()=>{so(ViewStatus.loading),ao({onCompleted:co=>{so(co?ViewStatus.error:ViewStatus.loaded)}})},[ao]),ro.length===0?jsxRuntimeExports.jsxs("div",{className:eo.emptyWrapper,children:[jsxRuntimeExports.jsx(ShieldCheckmark24Regular,{}),jsxRuntimeExports.jsxs(Text$2,{className:eo.emptyText,children:[" ",oo.No_Exception_Found]})]}):io===ViewStatus.loading?jsxRuntimeExports.jsx("div",{className:eo.emptyWrapper,children:jsxRuntimeExports.jsx(Spinner,{size:"tiny"})}):io===ViewStatus.error?jsxRuntimeExports.jsx("div",{className:eo.emptyWrapper,children:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{so(ViewStatus.loading),ao({onCompleted:co=>{so(co?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ro.map((co,uo)=>jsxRuntimeExports.jsx(Card,{className:eo.wrapper,children:jsxRuntimeExports.jsx(JsonViewer,{src:co,collapseStringsAfterLength:1e4,theme:"vscode",dark:no,customizeNode:({node:fo,indexOrName:ho})=>{if(ho==="exception.message"||ho==="exception.stacktrace")return jsxRuntimeExports.jsx(CollapsibleTextArea,{children:fo})}})},uo))})},useClasses$l=makeStyles({wrapper:{marginBottom:tokens.spacingVerticalM},emptyWrapper:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%"},emptyText:{paddingTop:tokens.spacingVerticalM}}),isElementOverflow=eo=>eo.scrollHeight>eo.clientHeight||eo.scrollWidth>eo.clientWidth,NodeEvalOutput=()=>{const eo=useClasses$k(),to=useLocStrings(),ro=useSelectedTrace(),no=reactExports.useMemo(()=>{const oo=(ro==null?void 0:ro.evaluations)??{};return Object.values(oo).sort((io,so)=>io.start_time&&so.start_time?new Date(io.start_time).getTime()>new Date(so.start_time).getTime()?-1:1:0)},[ro]);return jsxRuntimeExports.jsxs("div",{className:eo.wrapper,children:[jsxRuntimeExports.jsx("div",{className:eo.title,children:to.Evaluation_output}),jsxRuntimeExports.jsx("div",{className:eo.content,children:no.map((oo,io)=>jsxRuntimeExports.jsx(EvalOutputItem,{trace:oo},`${oo.name}_${io}`))})]})},EvalOutputItem=({trace:eo})=>{const to=useClasses$k(),ro=useLocStrings(),[no,oo]=reactExports.useState(!1),io=useTraceViewModel(),so=checkStatus(eo.status,"error");return jsxRuntimeExports.jsxs("div",{className:mergeClasses(to.item,no?to.itemHover:""),onMouseEnter:()=>{oo(!0)},onMouseLeave:()=>{oo(!1)},onClick:()=>{io.detailNavigateTo(eo)},children:[jsxRuntimeExports.jsx("div",{className:to.itemTitle,children:eo.name}),eo.start_time?jsxRuntimeExports.jsxs("div",{className:to.itemTime,children:[jsxRuntimeExports.jsx(Clock12Regular,{}),jsxRuntimeExports.jsxs("span",{children:[ro.Created_on,": ",timeFormat(eo.start_time)]})]}):null,so?jsxRuntimeExports.jsxs("div",{className:to.itemError,children:[jsxRuntimeExports.jsx(DismissCircle12Filled,{className:to.errorColor}),jsxRuntimeExports.jsx("span",{children:ro["Evaluation run failed"]})]}):jsxRuntimeExports.jsx("div",{className:to.itemContent,children:typeof eo.outputs=="object"&&Object.entries(eo.outputs).map(([ao,lo])=>jsxRuntimeExports.jsx(EvalOutputItemMetric,{k:ao,v:lo,setIsHover:oo},ao))})]})},EvalOutputItemMetric=({k:eo,v:to,setIsHover:ro})=>{const no=useClasses$k(),oo=reactExports.useRef(null),[io,so]=reactExports.useState(!1),ao=jsxRuntimeExports.jsxs("div",{ref:oo,className:no.itemMetric,onMouseEnter:()=>{ro(!1)},onMouseLeave:()=>{ro(!0)},onClick:lo=>(lo.preventDefault(),lo.stopPropagation(),!1),children:[eo,": ",to]});return reactExports.useEffect(()=>{const lo=oo.current?isElementOverflow(oo.current):!1;so(lo)},[]),io?jsxRuntimeExports.jsx(Tooltip,{content:jsxRuntimeExports.jsxs("div",{children:[eo,":",jsxRuntimeExports.jsx("br",{}),to]}),relationship:"description",positioning:"below",children:ao}):ao},useClasses$k=makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%"},title:{height:"52px",boxSizing:"border-box",...shorthands.padding("16px"),fontSize:"14px",fontWeight:600},content:{...shorthands.flex(1),...shorthands.overflow("auto"),...shorthands.padding("0","16px")},item:{position:"relative",width:"200px",...shorthands.border("1px","solid",tokens.colorNeutralStroke2),...shorthands.borderRadius("4px"),marginBottom:"16px",...shorthands.padding("12px"),fontSize:"12px",cursor:"pointer"},itemHover:{backgroundColor:tokens.colorNeutralBackground1Hover},itemTitle:{height:"16px",lineHeight:"16px",color:tokens.colorNeutralForeground2},itemTime:{display:"flex",alignItems:"center",...shorthands.gap("4px"),marginTop:"8px","& span":{color:tokens.colorNeutralForeground2}},itemError:{display:"flex",alignItems:"center",...shorthands.gap("4px"),marginTop:"8px","& span":{color:tokens.colorNeutralForeground2,fontWeight:600}},itemContent:{...shorthands.overflow("hidden"),marginLeft:"-8px"},itemMetric:{float:"left",width:"fit-content",maxWidth:"100%",marginTop:"8px",marginLeft:"8px",...shorthands.padding("2px","8px"),display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",textOverflow:"ellipsis",wordBreak:"break-all",...shorthands.overflow("hidden"),...shorthands.border("1px","solid",tokens.colorNeutralStroke1),...shorthands.borderRadius("4px"),backgroundColor:tokens.colorNeutralBackground1},errorColor:{color:tokens.colorPaletteRedForeground1}}),NodeRawCard=()=>{const eo=useSelectedSpan(),to=useSpanEventsLoadStatus(),ro=useIsLazyLoadSpan(),no=useLocStrings(),[,oo]=reactExports.useReducer(fo=>fo+1,0),io=!!(eo!=null&&eo.span_json_uri),[so,ao]=reactExports.useState(ViewStatus.loading),[lo,co]=reactExports.useState(void 0),uo=useFetchSpanRawJson(eo);return reactExports.useEffect(()=>{if(!io){ao(ViewStatus.loaded);return}ao(ViewStatus.loading),uo({onCompleted:(fo,ho)=>{if(fo){ao(ViewStatus.error);return}ao(ViewStatus.loaded),co(ho)}})},[io,uo]),jsxRuntimeExports.jsx(JsonNodeCard,{title:no.Raw_JSON,src:io?lo:eo,status:so,errorTip:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{ao(ViewStatus.loading),uo({onCompleted:(fo,ho)=>{if(fo){ao(ViewStatus.error);return}ao(ViewStatus.loaded),co(ho)}})}}),jsonViewerProps:{customizeNode:({depth:fo,indexOrName:ho,node:po})=>{var vo,yo;if(io)return;if(fo===3&&typeof ho=="number"&&typeof po.name=="string"&&typeof po.timestamp=="string"&&typeof po.attributes=="object"){const xo=`${(vo=eo==null?void 0:eo.context)==null?void 0:vo.span_id}__${(yo=eo==null?void 0:eo.external_event_data_uris)==null?void 0:yo[ho]}`;return!ro||to.get(xo)==="success"?void 0:jsxRuntimeExports.jsx(NodeEventItem,{name:po.name,index:ho,timestamp:po.timestamp,forceUpdate:oo})}}}})},NodeEventItem=({index:eo,name:to,timestamp:ro,forceUpdate:no})=>{const oo=useSelectedSpan(),io=useLocStrings(),so=useLoadSpanEvents(oo,to,eo),[ao,lo]=reactExports.useState(ViewStatus.hidden);if(ao===ViewStatus.loaded)return no(),null;let co=io.load_all;return ao===ViewStatus.loading?co=io.loading:ao===ViewStatus.error&&(co=io["Failed to load, click to try again"]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"{"}),jsxRuntimeExports.jsxs("div",{style:{paddingLeft:"1em"},children:[jsxRuntimeExports.jsx("span",{style:{color:"var(--json-property)"},children:"name:"}),jsxRuntimeExports.jsx("span",{style:{color:"var(--json-string)"},children:` "${to}",`})]}),jsxRuntimeExports.jsxs("div",{style:{paddingLeft:"1em"},children:[jsxRuntimeExports.jsx("span",{style:{color:"var(--json-property)"},children:"timestamp:"}),jsxRuntimeExports.jsx("span",{style:{color:"var(--json-string)"},children:` "${ro}",`})]}),jsxRuntimeExports.jsx("div",{style:{paddingLeft:"1em"},children:jsxRuntimeExports.jsxs(Button$2,{size:"small",appearance:"transparent",style:{padding:0,color:"rgb(163, 190, 233)",justifyContent:"flex-start"},onClick:()=>{lo(ViewStatus.loading),so({onCompleted:uo=>{lo(uo?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})},children:["... ",co]})}),jsxRuntimeExports.jsx("span",{children:"}"})]})},GeneralErrorBar=({title:eo,message:to,onClick:ro})=>{const no=useClasses$j();return jsxRuntimeExports.jsx(MessageBar,{intent:"error",onClick:ro,className:no.bar,children:jsxRuntimeExports.jsxs(MessageBarBody,{className:no.body,children:[jsxRuntimeExports.jsxs(MessageBarTitle,{children:[" ",eo]}),to&&jsxRuntimeExports.jsx(Tooltip,{content:to||"",relationship:"description",children:jsxRuntimeExports.jsxs("span",{className:no.text,children:[" ",to]})})]})})},useClasses$j=makeStyles({bar:{cursor:"pointer",display:"flex",justifyContent:"start",itemAlign:"center",...shorthands.margin("8px","8px",0,"8px"),...shorthands.padding("8px")},body:{display:"flex",...shorthands.flex(0,1,"auto"),...shorthands.overflow("hidden")},text:{...shorthands.flex(0,1,"auto"),...shorthands.overflow("hidden"),whiteSpace:"nowrap",textOverflow:"ellipsis",paddingLeft:"6px"}}),SpanDetailErrorMessageBar=({setSelectedTab:eo})=>{var no,oo;const to=useSelectedSpan(),ro=useLocStrings();return((oo=(no=to==null?void 0:to.status)==null?void 0:no.status_code)==null?void 0:oo.toLowerCase())==="error"?jsxRuntimeExports.jsx(GeneralErrorBar,{title:ro.Error,message:to.status.description,onClick:()=>{eo("error")}}):null},OverflowMenuItem=eo=>{const{tab:to,onClick:ro}=eo;return useIsOverflowItemVisible(to.key)?null:jsxRuntimeExports.jsx(MenuItem,{onClick:ro,children:jsxRuntimeExports.jsxs("div",{children:[to.name,to.icon&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[" ",to.icon]})]})},to.key)},useOverflowMenuStyles=makeStyles({menu:{backgroundColor:tokens.colorNeutralBackground1},menuButton:{alignSelf:"center"}}),MoreHorizontal=bundleIcon$1(MoreHorizontalFilled,MoreHorizontalRegular),OverflowMenu=eo=>{const{onTabSelect:to,tabs:ro}=eo,{ref:no,isOverflowing:oo,overflowCount:io}=useOverflowMenu(),so=useOverflowMenuStyles(),ao=lo=>{to==null||to(lo)};return oo?jsxRuntimeExports.jsxs(Menu,{hasIcons:!0,children:[jsxRuntimeExports.jsx(MenuTrigger,{disableButtonEnhancement:!0,children:jsxRuntimeExports.jsx(Button$2,{appearance:"transparent",className:so.menuButton,ref:no,icon:jsxRuntimeExports.jsx(MoreHorizontal,{}),"aria-label":`${io} more tabs`,role:"tab"})}),jsxRuntimeExports.jsx(MenuPopover,{children:jsxRuntimeExports.jsx(MenuList,{className:so.menu,children:ro.map(lo=>jsxRuntimeExports.jsx(OverflowMenuItem,{tab:lo,onClick:()=>ao(lo.key)},lo.key))})})]}):null},SpanDetailTabs=({tabs:eo,selectedTab:to,setSelectedTab:ro})=>jsxRuntimeExports.jsx(Overflow,{minimumVisible:1,children:jsxRuntimeExports.jsxs(TabList,{selectedValue:to,onTabSelect:(no,oo)=>{ro(oo.value)},children:[eo.map(no=>jsxRuntimeExports.jsx(OverflowItem,{id:no.key,priority:no.key===to?2:1,children:jsxRuntimeExports.jsxs(Tab$1,{value:no.key,children:[no.name,no.icon&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[" ",no.icon]})]})},no.key)),jsxRuntimeExports.jsx(OverflowMenu,{onTabSelect:ro,tabs:eo})]})}),DefaultSpanDetailContent=({showEvaluationPanel:eo,showLogs:to,renderLogsPivot:ro})=>{var vo;const no=useSelectedSpan(),oo=useSelectedTrace(),[io,so]=reactExports.useState("input_output"),ao=useNodeDetailClasses(),lo=useLocStrings(),co=(vo=no==null?void 0:no.events)==null?void 0:vo.filter(yo=>yo.name===BuildInEventName.exception),uo=(co==null?void 0:co.length)??0,[fo,ho]=reactExports.useState(!1);useHasInputsOrOutput(yo=>ho(yo));const po=[...fo?[{key:"input_output",name:lo["Input_&_Output"]}]:[],{key:"raw",name:lo.Raw_JSON},{key:"error",name:lo.Exception,icon:jsxRuntimeExports.jsx(CounterBadge,{appearance:"filled",color:uo>0?"danger":"informative",count:uo,size:"small",showZero:!0})}],go=to&&no&&oo&&(ro==null?void 0:ro({currentSpan:no,currentTrace:oo}));return go&&po.push({key:"logs",name:lo.Logs}),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:ao.layoutLeft,children:[jsxRuntimeExports.jsx(SpanDetailTabs,{tabs:po,selectedTab:io,setSelectedTab:so}),jsxRuntimeExports.jsx(SpanDetailErrorMessageBar,{setSelectedTab:so}),jsxRuntimeExports.jsxs("div",{className:ao.content,children:[io==="input_output"&&jsxRuntimeExports.jsx(DefaultNodeInfo,{}),io==="raw"&&jsxRuntimeExports.jsx(NodeRawCard,{}),io==="error"&&jsxRuntimeExports.jsx(ErrorsTab,{}),io==="logs"&&go]})]}),eo&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$2,{vertical:!0,className:ao.divider}),jsxRuntimeExports.jsx("div",{className:ao.layoutRight,children:jsxRuntimeExports.jsx(NodeEvalOutput,{})})]})]})},BlockquoteType="blockquote",BreakType="break",CodeType="code",DefinitionType="definition",DeleteType="delete",EmphasisType="emphasis",HeadingType="heading",HtmlType="html";var HtmlContentType;(function(eo){eo.CDATA="cdata",eo.Closing="closing",eo.Comment="comment",eo.Declaration="declaration",eo.Instruction="instruction",eo.Open="open"})(HtmlContentType||(HtmlContentType={}));const ImageReferenceType="imageReference",ImageType$1="image",InlineCodeType="inlineCode",LinkReferenceType="linkReference",LinkType="link",ListItemType="listItem";var TaskStatus;(function(eo){eo.TODO="todo",eo.DOING="doing",eo.DONE="done"})(TaskStatus||(TaskStatus={}));const ListType="list",ParagraphType$1="paragraph",StrongType="strong",TableCellType="tableCell",TableRowType="tableRow",TableType="table",TextType$1="text",ThematicBreakType="thematicBreak";var AsciiCodePoint;(function(eo){eo[eo.NUL=0]="NUL",eo[eo.SOH=1]="SOH",eo[eo.STX=2]="STX",eo[eo.ETX=3]="ETX",eo[eo.EOT=4]="EOT",eo[eo.ENQ=5]="ENQ",eo[eo.ACK=6]="ACK",eo[eo.BEL=7]="BEL",eo[eo.BS=8]="BS",eo[eo.HT=9]="HT",eo[eo.LF=10]="LF",eo[eo.VT=11]="VT",eo[eo.FF=12]="FF",eo[eo.CR=13]="CR",eo[eo.SO=14]="SO",eo[eo.SI=15]="SI",eo[eo.DLE=16]="DLE",eo[eo.DC1=17]="DC1",eo[eo.DC2=18]="DC2",eo[eo.DC3=19]="DC3",eo[eo.DC4=20]="DC4",eo[eo.NAK=21]="NAK",eo[eo.SYN=22]="SYN",eo[eo.ETB=23]="ETB",eo[eo.CAN=24]="CAN",eo[eo.EM=25]="EM",eo[eo.SUB=26]="SUB",eo[eo.ESC=27]="ESC",eo[eo.FS=28]="FS",eo[eo.GS=29]="GS",eo[eo.RS=30]="RS",eo[eo.US=31]="US",eo[eo.SPACE=32]="SPACE",eo[eo.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",eo[eo.DOUBLE_QUOTE=34]="DOUBLE_QUOTE",eo[eo.NUMBER_SIGN=35]="NUMBER_SIGN",eo[eo.DOLLAR_SIGN=36]="DOLLAR_SIGN",eo[eo.PERCENT_SIGN=37]="PERCENT_SIGN",eo[eo.AMPERSAND=38]="AMPERSAND",eo[eo.SINGLE_QUOTE=39]="SINGLE_QUOTE",eo[eo.OPEN_PARENTHESIS=40]="OPEN_PARENTHESIS",eo[eo.CLOSE_PARENTHESIS=41]="CLOSE_PARENTHESIS",eo[eo.ASTERISK=42]="ASTERISK",eo[eo.PLUS_SIGN=43]="PLUS_SIGN",eo[eo.COMMA=44]="COMMA",eo[eo.MINUS_SIGN=45]="MINUS_SIGN",eo[eo.DOT=46]="DOT",eo[eo.SLASH=47]="SLASH",eo[eo.DIGIT0=48]="DIGIT0",eo[eo.DIGIT1=49]="DIGIT1",eo[eo.DIGIT2=50]="DIGIT2",eo[eo.DIGIT3=51]="DIGIT3",eo[eo.DIGIT4=52]="DIGIT4",eo[eo.DIGIT5=53]="DIGIT5",eo[eo.DIGIT6=54]="DIGIT6",eo[eo.DIGIT7=55]="DIGIT7",eo[eo.DIGIT8=56]="DIGIT8",eo[eo.DIGIT9=57]="DIGIT9",eo[eo.COLON=58]="COLON",eo[eo.SEMICOLON=59]="SEMICOLON",eo[eo.OPEN_ANGLE=60]="OPEN_ANGLE",eo[eo.EQUALS_SIGN=61]="EQUALS_SIGN",eo[eo.CLOSE_ANGLE=62]="CLOSE_ANGLE",eo[eo.QUESTION_MARK=63]="QUESTION_MARK",eo[eo.AT_SIGN=64]="AT_SIGN",eo[eo.UPPERCASE_A=65]="UPPERCASE_A",eo[eo.UPPERCASE_B=66]="UPPERCASE_B",eo[eo.UPPERCASE_C=67]="UPPERCASE_C",eo[eo.UPPERCASE_D=68]="UPPERCASE_D",eo[eo.UPPERCASE_E=69]="UPPERCASE_E",eo[eo.UPPERCASE_F=70]="UPPERCASE_F",eo[eo.UPPERCASE_G=71]="UPPERCASE_G",eo[eo.UPPERCASE_H=72]="UPPERCASE_H",eo[eo.UPPERCASE_I=73]="UPPERCASE_I",eo[eo.UPPERCASE_J=74]="UPPERCASE_J",eo[eo.UPPERCASE_K=75]="UPPERCASE_K",eo[eo.UPPERCASE_L=76]="UPPERCASE_L",eo[eo.UPPERCASE_M=77]="UPPERCASE_M",eo[eo.UPPERCASE_N=78]="UPPERCASE_N",eo[eo.UPPERCASE_O=79]="UPPERCASE_O",eo[eo.UPPERCASE_P=80]="UPPERCASE_P",eo[eo.UPPERCASE_Q=81]="UPPERCASE_Q",eo[eo.UPPERCASE_R=82]="UPPERCASE_R",eo[eo.UPPERCASE_S=83]="UPPERCASE_S",eo[eo.UPPERCASE_T=84]="UPPERCASE_T",eo[eo.UPPERCASE_U=85]="UPPERCASE_U",eo[eo.UPPERCASE_V=86]="UPPERCASE_V",eo[eo.UPPERCASE_W=87]="UPPERCASE_W",eo[eo.UPPERCASE_X=88]="UPPERCASE_X",eo[eo.UPPERCASE_Y=89]="UPPERCASE_Y",eo[eo.UPPERCASE_Z=90]="UPPERCASE_Z",eo[eo.OPEN_BRACKET=91]="OPEN_BRACKET",eo[eo.BACKSLASH=92]="BACKSLASH",eo[eo.CLOSE_BRACKET=93]="CLOSE_BRACKET",eo[eo.CARET=94]="CARET",eo[eo.UNDERSCORE=95]="UNDERSCORE",eo[eo.BACKTICK=96]="BACKTICK",eo[eo.LOWERCASE_A=97]="LOWERCASE_A",eo[eo.LOWERCASE_B=98]="LOWERCASE_B",eo[eo.LOWERCASE_C=99]="LOWERCASE_C",eo[eo.LOWERCASE_D=100]="LOWERCASE_D",eo[eo.LOWERCASE_E=101]="LOWERCASE_E",eo[eo.LOWERCASE_F=102]="LOWERCASE_F",eo[eo.LOWERCASE_G=103]="LOWERCASE_G",eo[eo.LOWERCASE_H=104]="LOWERCASE_H",eo[eo.LOWERCASE_I=105]="LOWERCASE_I",eo[eo.LOWERCASE_J=106]="LOWERCASE_J",eo[eo.LOWERCASE_K=107]="LOWERCASE_K",eo[eo.LOWERCASE_L=108]="LOWERCASE_L",eo[eo.LOWERCASE_M=109]="LOWERCASE_M",eo[eo.LOWERCASE_N=110]="LOWERCASE_N",eo[eo.LOWERCASE_O=111]="LOWERCASE_O",eo[eo.LOWERCASE_P=112]="LOWERCASE_P",eo[eo.LOWERCASE_Q=113]="LOWERCASE_Q",eo[eo.LOWERCASE_R=114]="LOWERCASE_R",eo[eo.LOWERCASE_S=115]="LOWERCASE_S",eo[eo.LOWERCASE_T=116]="LOWERCASE_T",eo[eo.LOWERCASE_U=117]="LOWERCASE_U",eo[eo.LOWERCASE_V=118]="LOWERCASE_V",eo[eo.LOWERCASE_W=119]="LOWERCASE_W",eo[eo.LOWERCASE_X=120]="LOWERCASE_X",eo[eo.LOWERCASE_Y=121]="LOWERCASE_Y",eo[eo.LOWERCASE_Z=122]="LOWERCASE_Z",eo[eo.OPEN_BRACE=123]="OPEN_BRACE",eo[eo.VERTICAL_SLASH=124]="VERTICAL_SLASH",eo[eo.CLOSE_BRACE=125]="CLOSE_BRACE",eo[eo.TILDE=126]="TILDE",eo[eo.DELETE=127]="DELETE"})(AsciiCodePoint||(AsciiCodePoint={}));const foldingCaseCodeMap={µ:"μ",À:"à",Á:"á",Â:"â",Ã:"ã",Ä:"ä",Å:"å",Æ:"æ",Ç:"ç",È:"è",É:"é",Ê:"ê",Ë:"ë",Ì:"ì",Í:"í",Î:"î",Ï:"ï",Ð:"ð",Ñ:"ñ",Ò:"ò",Ó:"ó",Ô:"ô",Õ:"õ",Ö:"ö",Ø:"ø",Ù:"ù",Ú:"ú",Û:"û",Ü:"ü",Ý:"ý",Þ:"þ",Ā:"ā",Ă:"ă",Ą:"ą",Ć:"ć",Ĉ:"ĉ",Ċ:"ċ",Č:"č",Ď:"ď",Đ:"đ",Ē:"ē",Ĕ:"ĕ",Ė:"ė",Ę:"ę",Ě:"ě",Ĝ:"ĝ",Ğ:"ğ",Ġ:"ġ",Ģ:"ģ",Ĥ:"ĥ",Ħ:"ħ",Ĩ:"ĩ",Ī:"ī",Ĭ:"ĭ",Į:"į",IJ:"ij",Ĵ:"ĵ",Ķ:"ķ",Ĺ:"ĺ",Ļ:"ļ",Ľ:"ľ",Ŀ:"ŀ",Ł:"ł",Ń:"ń",Ņ:"ņ",Ň:"ň",Ŋ:"ŋ",Ō:"ō",Ŏ:"ŏ",Ő:"ő",Œ:"œ",Ŕ:"ŕ",Ŗ:"ŗ",Ř:"ř",Ś:"ś",Ŝ:"ŝ",Ş:"ş",Š:"š",Ţ:"ţ",Ť:"ť",Ŧ:"ŧ",Ũ:"ũ",Ū:"ū",Ŭ:"ŭ",Ů:"ů",Ű:"ű",Ų:"ų",Ŵ:"ŵ",Ŷ:"ŷ",Ÿ:"ÿ",Ź:"ź",Ż:"ż",Ž:"ž",ſ:"s",Ɓ:"ɓ",Ƃ:"ƃ",Ƅ:"ƅ",Ɔ:"ɔ",Ƈ:"ƈ",Ɖ:"ɖ",Ɗ:"ɗ",Ƌ:"ƌ",Ǝ:"ǝ",Ə:"ə",Ɛ:"ɛ",Ƒ:"ƒ",Ɠ:"ɠ",Ɣ:"ɣ",Ɩ:"ɩ",Ɨ:"ɨ",Ƙ:"ƙ",Ɯ:"ɯ",Ɲ:"ɲ",Ɵ:"ɵ",Ơ:"ơ",Ƣ:"ƣ",Ƥ:"ƥ",Ʀ:"ʀ",Ƨ:"ƨ",Ʃ:"ʃ",Ƭ:"ƭ",Ʈ:"ʈ",Ư:"ư",Ʊ:"ʊ",Ʋ:"ʋ",Ƴ:"ƴ",Ƶ:"ƶ",Ʒ:"ʒ",Ƹ:"ƹ",Ƽ:"ƽ",DŽ:"dž",Dž:"dž",LJ:"lj",Lj:"lj",NJ:"nj",Nj:"nj",Ǎ:"ǎ",Ǐ:"ǐ",Ǒ:"ǒ",Ǔ:"ǔ",Ǖ:"ǖ",Ǘ:"ǘ",Ǚ:"ǚ",Ǜ:"ǜ",Ǟ:"ǟ",Ǡ:"ǡ",Ǣ:"ǣ",Ǥ:"ǥ",Ǧ:"ǧ",Ǩ:"ǩ",Ǫ:"ǫ",Ǭ:"ǭ",Ǯ:"ǯ",DZ:"dz",Dz:"dz",Ǵ:"ǵ",Ƕ:"ƕ",Ƿ:"ƿ",Ǹ:"ǹ",Ǻ:"ǻ",Ǽ:"ǽ",Ǿ:"ǿ",Ȁ:"ȁ",Ȃ:"ȃ",Ȅ:"ȅ",Ȇ:"ȇ",Ȉ:"ȉ",Ȋ:"ȋ",Ȍ:"ȍ",Ȏ:"ȏ",Ȑ:"ȑ",Ȓ:"ȓ",Ȕ:"ȕ",Ȗ:"ȗ",Ș:"ș",Ț:"ț",Ȝ:"ȝ",Ȟ:"ȟ","Ƞ":"ƞ",Ȣ:"ȣ",Ȥ:"ȥ",Ȧ:"ȧ",Ȩ:"ȩ",Ȫ:"ȫ",Ȭ:"ȭ",Ȯ:"ȯ",Ȱ:"ȱ",Ȳ:"ȳ","Ⱥ":"ⱥ","Ȼ":"ȼ","Ƚ":"ƚ","Ⱦ":"ⱦ","Ɂ":"ɂ","Ƀ":"ƀ","Ʉ":"ʉ","Ʌ":"ʌ","Ɇ":"ɇ","Ɉ":"ɉ","Ɋ":"ɋ","Ɍ":"ɍ","Ɏ":"ɏ","ͅ":"ι","Ͱ":"ͱ","Ͳ":"ͳ","Ͷ":"ͷ","Ϳ":"ϳ",Ά:"ά",Έ:"έ",Ή:"ή",Ί:"ί",Ό:"ό",Ύ:"ύ",Ώ:"ώ",Α:"α",Β:"β",Γ:"γ",Δ:"δ",Ε:"ε",Ζ:"ζ",Η:"η",Θ:"θ",Ι:"ι",Κ:"κ",Λ:"λ",Μ:"μ",Ν:"ν",Ξ:"ξ",Ο:"ο",Π:"π",Ρ:"ρ",Σ:"σ",Τ:"τ",Υ:"υ",Φ:"φ",Χ:"χ",Ψ:"ψ",Ω:"ω",Ϊ:"ϊ",Ϋ:"ϋ",ς:"σ","Ϗ":"ϗ",ϐ:"β",ϑ:"θ",ϕ:"φ",ϖ:"π","Ϙ":"ϙ",Ϛ:"ϛ",Ϝ:"ϝ",Ϟ:"ϟ",Ϡ:"ϡ",Ϣ:"ϣ",Ϥ:"ϥ",Ϧ:"ϧ",Ϩ:"ϩ",Ϫ:"ϫ",Ϭ:"ϭ",Ϯ:"ϯ",ϰ:"κ",ϱ:"ρ","ϴ":"θ","ϵ":"ε","Ϸ":"ϸ","Ϲ":"ϲ","Ϻ":"ϻ","Ͻ":"ͻ","Ͼ":"ͼ","Ͽ":"ͽ",Ѐ:"ѐ",Ё:"ё",Ђ:"ђ",Ѓ:"ѓ",Є:"є",Ѕ:"ѕ",І:"і",Ї:"ї",Ј:"ј",Љ:"љ",Њ:"њ",Ћ:"ћ",Ќ:"ќ",Ѝ:"ѝ",Ў:"ў",Џ:"џ",А:"а",Б:"б",В:"в",Г:"г",Д:"д",Е:"е",Ж:"ж",З:"з",И:"и",Й:"й",К:"к",Л:"л",М:"м",Н:"н",О:"о",П:"п",Р:"р",С:"с",Т:"т",У:"у",Ф:"ф",Х:"х",Ц:"ц",Ч:"ч",Ш:"ш",Щ:"щ",Ъ:"ъ",Ы:"ы",Ь:"ь",Э:"э",Ю:"ю",Я:"я",Ѡ:"ѡ",Ѣ:"ѣ",Ѥ:"ѥ",Ѧ:"ѧ",Ѩ:"ѩ",Ѫ:"ѫ",Ѭ:"ѭ",Ѯ:"ѯ",Ѱ:"ѱ",Ѳ:"ѳ",Ѵ:"ѵ",Ѷ:"ѷ",Ѹ:"ѹ",Ѻ:"ѻ",Ѽ:"ѽ",Ѿ:"ѿ",Ҁ:"ҁ","Ҋ":"ҋ",Ҍ:"ҍ",Ҏ:"ҏ",Ґ:"ґ",Ғ:"ғ",Ҕ:"ҕ",Җ:"җ",Ҙ:"ҙ",Қ:"қ",Ҝ:"ҝ",Ҟ:"ҟ",Ҡ:"ҡ",Ң:"ң",Ҥ:"ҥ",Ҧ:"ҧ",Ҩ:"ҩ",Ҫ:"ҫ",Ҭ:"ҭ",Ү:"ү",Ұ:"ұ",Ҳ:"ҳ",Ҵ:"ҵ",Ҷ:"ҷ",Ҹ:"ҹ",Һ:"һ",Ҽ:"ҽ",Ҿ:"ҿ",Ӏ:"ӏ",Ӂ:"ӂ",Ӄ:"ӄ","Ӆ":"ӆ",Ӈ:"ӈ","Ӊ":"ӊ",Ӌ:"ӌ","Ӎ":"ӎ",Ӑ:"ӑ",Ӓ:"ӓ",Ӕ:"ӕ",Ӗ:"ӗ",Ә:"ә",Ӛ:"ӛ",Ӝ:"ӝ",Ӟ:"ӟ",Ӡ:"ӡ",Ӣ:"ӣ",Ӥ:"ӥ",Ӧ:"ӧ",Ө:"ө",Ӫ:"ӫ",Ӭ:"ӭ",Ӯ:"ӯ",Ӱ:"ӱ",Ӳ:"ӳ",Ӵ:"ӵ","Ӷ":"ӷ",Ӹ:"ӹ","Ӻ":"ӻ","Ӽ":"ӽ","Ӿ":"ӿ","Ԁ":"ԁ","Ԃ":"ԃ","Ԅ":"ԅ","Ԇ":"ԇ","Ԉ":"ԉ","Ԋ":"ԋ","Ԍ":"ԍ","Ԏ":"ԏ","Ԑ":"ԑ","Ԓ":"ԓ","Ԕ":"ԕ","Ԗ":"ԗ","Ԙ":"ԙ","Ԛ":"ԛ","Ԝ":"ԝ","Ԟ":"ԟ","Ԡ":"ԡ","Ԣ":"ԣ","Ԥ":"ԥ","Ԧ":"ԧ","Ԩ":"ԩ","Ԫ":"ԫ","Ԭ":"ԭ","Ԯ":"ԯ",Ա:"ա",Բ:"բ",Գ:"գ",Դ:"դ",Ե:"ե",Զ:"զ",Է:"է",Ը:"ը",Թ:"թ",Ժ:"ժ",Ի:"ի",Լ:"լ",Խ:"խ",Ծ:"ծ",Կ:"կ",Հ:"հ",Ձ:"ձ",Ղ:"ղ",Ճ:"ճ",Մ:"մ",Յ:"յ",Ն:"ն",Շ:"շ",Ո:"ո",Չ:"չ",Պ:"պ",Ջ:"ջ",Ռ:"ռ",Ս:"ս",Վ:"վ",Տ:"տ",Ր:"ր",Ց:"ց",Ւ:"ւ",Փ:"փ",Ք:"ք",Օ:"օ",Ֆ:"ֆ",Ⴀ:"ⴀ",Ⴁ:"ⴁ",Ⴂ:"ⴂ",Ⴃ:"ⴃ",Ⴄ:"ⴄ",Ⴅ:"ⴅ",Ⴆ:"ⴆ",Ⴇ:"ⴇ",Ⴈ:"ⴈ",Ⴉ:"ⴉ",Ⴊ:"ⴊ",Ⴋ:"ⴋ",Ⴌ:"ⴌ",Ⴍ:"ⴍ",Ⴎ:"ⴎ",Ⴏ:"ⴏ",Ⴐ:"ⴐ",Ⴑ:"ⴑ",Ⴒ:"ⴒ",Ⴓ:"ⴓ",Ⴔ:"ⴔ",Ⴕ:"ⴕ",Ⴖ:"ⴖ",Ⴗ:"ⴗ",Ⴘ:"ⴘ",Ⴙ:"ⴙ",Ⴚ:"ⴚ",Ⴛ:"ⴛ",Ⴜ:"ⴜ",Ⴝ:"ⴝ",Ⴞ:"ⴞ",Ⴟ:"ⴟ",Ⴠ:"ⴠ",Ⴡ:"ⴡ",Ⴢ:"ⴢ",Ⴣ:"ⴣ",Ⴤ:"ⴤ",Ⴥ:"ⴥ","Ⴧ":"ⴧ","Ⴭ":"ⴭ",Ḁ:"ḁ",Ḃ:"ḃ",Ḅ:"ḅ",Ḇ:"ḇ",Ḉ:"ḉ",Ḋ:"ḋ",Ḍ:"ḍ",Ḏ:"ḏ",Ḑ:"ḑ",Ḓ:"ḓ",Ḕ:"ḕ",Ḗ:"ḗ",Ḙ:"ḙ",Ḛ:"ḛ",Ḝ:"ḝ",Ḟ:"ḟ",Ḡ:"ḡ",Ḣ:"ḣ",Ḥ:"ḥ",Ḧ:"ḧ",Ḩ:"ḩ",Ḫ:"ḫ",Ḭ:"ḭ",Ḯ:"ḯ",Ḱ:"ḱ",Ḳ:"ḳ",Ḵ:"ḵ",Ḷ:"ḷ",Ḹ:"ḹ",Ḻ:"ḻ",Ḽ:"ḽ",Ḿ:"ḿ",Ṁ:"ṁ",Ṃ:"ṃ",Ṅ:"ṅ",Ṇ:"ṇ",Ṉ:"ṉ",Ṋ:"ṋ",Ṍ:"ṍ",Ṏ:"ṏ",Ṑ:"ṑ",Ṓ:"ṓ",Ṕ:"ṕ",Ṗ:"ṗ",Ṙ:"ṙ",Ṛ:"ṛ",Ṝ:"ṝ",Ṟ:"ṟ",Ṡ:"ṡ",Ṣ:"ṣ",Ṥ:"ṥ",Ṧ:"ṧ",Ṩ:"ṩ",Ṫ:"ṫ",Ṭ:"ṭ",Ṯ:"ṯ",Ṱ:"ṱ",Ṳ:"ṳ",Ṵ:"ṵ",Ṷ:"ṷ",Ṹ:"ṹ",Ṻ:"ṻ",Ṽ:"ṽ",Ṿ:"ṿ",Ẁ:"ẁ",Ẃ:"ẃ",Ẅ:"ẅ",Ẇ:"ẇ",Ẉ:"ẉ",Ẋ:"ẋ",Ẍ:"ẍ",Ẏ:"ẏ",Ẑ:"ẑ",Ẓ:"ẓ",Ẕ:"ẕ",ẛ:"ṡ",Ạ:"ạ",Ả:"ả",Ấ:"ấ",Ầ:"ầ",Ẩ:"ẩ",Ẫ:"ẫ",Ậ:"ậ",Ắ:"ắ",Ằ:"ằ",Ẳ:"ẳ",Ẵ:"ẵ",Ặ:"ặ",Ẹ:"ẹ",Ẻ:"ẻ",Ẽ:"ẽ",Ế:"ế",Ề:"ề",Ể:"ể",Ễ:"ễ",Ệ:"ệ",Ỉ:"ỉ",Ị:"ị",Ọ:"ọ",Ỏ:"ỏ",Ố:"ố",Ồ:"ồ",Ổ:"ổ",Ỗ:"ỗ",Ộ:"ộ",Ớ:"ớ",Ờ:"ờ",Ở:"ở",Ỡ:"ỡ",Ợ:"ợ",Ụ:"ụ",Ủ:"ủ",Ứ:"ứ",Ừ:"ừ",Ử:"ử",Ữ:"ữ",Ự:"ự",Ỳ:"ỳ",Ỵ:"ỵ",Ỷ:"ỷ",Ỹ:"ỹ","Ỻ":"ỻ","Ỽ":"ỽ","Ỿ":"ỿ",Ἀ:"ἀ",Ἁ:"ἁ",Ἂ:"ἂ",Ἃ:"ἃ",Ἄ:"ἄ",Ἅ:"ἅ",Ἆ:"ἆ",Ἇ:"ἇ",Ἐ:"ἐ",Ἑ:"ἑ",Ἒ:"ἒ",Ἓ:"ἓ",Ἔ:"ἔ",Ἕ:"ἕ",Ἠ:"ἠ",Ἡ:"ἡ",Ἢ:"ἢ",Ἣ:"ἣ",Ἤ:"ἤ",Ἥ:"ἥ",Ἦ:"ἦ",Ἧ:"ἧ",Ἰ:"ἰ",Ἱ:"ἱ",Ἲ:"ἲ",Ἳ:"ἳ",Ἴ:"ἴ",Ἵ:"ἵ",Ἶ:"ἶ",Ἷ:"ἷ",Ὀ:"ὀ",Ὁ:"ὁ",Ὂ:"ὂ",Ὃ:"ὃ",Ὄ:"ὄ",Ὅ:"ὅ",Ὑ:"ὑ",Ὓ:"ὓ",Ὕ:"ὕ",Ὗ:"ὗ",Ὠ:"ὠ",Ὡ:"ὡ",Ὢ:"ὢ",Ὣ:"ὣ",Ὤ:"ὤ",Ὥ:"ὥ",Ὦ:"ὦ",Ὧ:"ὧ",Ᾰ:"ᾰ",Ᾱ:"ᾱ",Ὰ:"ὰ",Ά:"ά",ι:"ι",Ὲ:"ὲ",Έ:"έ",Ὴ:"ὴ",Ή:"ή",Ῐ:"ῐ",Ῑ:"ῑ",Ὶ:"ὶ",Ί:"ί",Ῠ:"ῠ",Ῡ:"ῡ",Ὺ:"ὺ",Ύ:"ύ",Ῥ:"ῥ",Ὸ:"ὸ",Ό:"ό",Ὼ:"ὼ",Ώ:"ώ",Ω:"ω",K:"k",Å:"å","Ⅎ":"ⅎ","Ⅰ":"ⅰ","Ⅱ":"ⅱ","Ⅲ":"ⅲ","Ⅳ":"ⅳ","Ⅴ":"ⅴ","Ⅵ":"ⅵ","Ⅶ":"ⅶ","Ⅷ":"ⅷ","Ⅸ":"ⅸ","Ⅹ":"ⅹ","Ⅺ":"ⅺ","Ⅻ":"ⅻ","Ⅼ":"ⅼ","Ⅽ":"ⅽ","Ⅾ":"ⅾ","Ⅿ":"ⅿ","Ↄ":"ↄ","Ⓐ":"ⓐ","Ⓑ":"ⓑ","Ⓒ":"ⓒ","Ⓓ":"ⓓ","Ⓔ":"ⓔ","Ⓕ":"ⓕ","Ⓖ":"ⓖ","Ⓗ":"ⓗ","Ⓘ":"ⓘ","Ⓙ":"ⓙ","Ⓚ":"ⓚ","Ⓛ":"ⓛ","Ⓜ":"ⓜ","Ⓝ":"ⓝ","Ⓞ":"ⓞ","Ⓟ":"ⓟ","Ⓠ":"ⓠ","Ⓡ":"ⓡ","Ⓢ":"ⓢ","Ⓣ":"ⓣ","Ⓤ":"ⓤ","Ⓥ":"ⓥ","Ⓦ":"ⓦ","Ⓧ":"ⓧ","Ⓨ":"ⓨ","Ⓩ":"ⓩ","Ⰰ":"ⰰ","Ⰱ":"ⰱ","Ⰲ":"ⰲ","Ⰳ":"ⰳ","Ⰴ":"ⰴ","Ⰵ":"ⰵ","Ⰶ":"ⰶ","Ⰷ":"ⰷ","Ⰸ":"ⰸ","Ⰹ":"ⰹ","Ⰺ":"ⰺ","Ⰻ":"ⰻ","Ⰼ":"ⰼ","Ⰽ":"ⰽ","Ⰾ":"ⰾ","Ⰿ":"ⰿ","Ⱀ":"ⱀ","Ⱁ":"ⱁ","Ⱂ":"ⱂ","Ⱃ":"ⱃ","Ⱄ":"ⱄ","Ⱅ":"ⱅ","Ⱆ":"ⱆ","Ⱇ":"ⱇ","Ⱈ":"ⱈ","Ⱉ":"ⱉ","Ⱊ":"ⱊ","Ⱋ":"ⱋ","Ⱌ":"ⱌ","Ⱍ":"ⱍ","Ⱎ":"ⱎ","Ⱏ":"ⱏ","Ⱐ":"ⱐ","Ⱑ":"ⱑ","Ⱒ":"ⱒ","Ⱓ":"ⱓ","Ⱔ":"ⱔ","Ⱕ":"ⱕ","Ⱖ":"ⱖ","Ⱗ":"ⱗ","Ⱘ":"ⱘ","Ⱙ":"ⱙ","Ⱚ":"ⱚ","Ⱛ":"ⱛ","Ⱜ":"ⱜ","Ⱝ":"ⱝ","Ⱞ":"ⱞ","Ⱡ":"ⱡ","Ɫ":"ɫ","Ᵽ":"ᵽ","Ɽ":"ɽ","Ⱨ":"ⱨ","Ⱪ":"ⱪ","Ⱬ":"ⱬ","Ɑ":"ɑ","Ɱ":"ɱ","Ɐ":"ɐ","Ɒ":"ɒ","Ⱳ":"ⱳ","Ⱶ":"ⱶ","Ȿ":"ȿ","Ɀ":"ɀ","Ⲁ":"ⲁ","Ⲃ":"ⲃ","Ⲅ":"ⲅ","Ⲇ":"ⲇ","Ⲉ":"ⲉ","Ⲋ":"ⲋ","Ⲍ":"ⲍ","Ⲏ":"ⲏ","Ⲑ":"ⲑ","Ⲓ":"ⲓ","Ⲕ":"ⲕ","Ⲗ":"ⲗ","Ⲙ":"ⲙ","Ⲛ":"ⲛ","Ⲝ":"ⲝ","Ⲟ":"ⲟ","Ⲡ":"ⲡ","Ⲣ":"ⲣ","Ⲥ":"ⲥ","Ⲧ":"ⲧ","Ⲩ":"ⲩ","Ⲫ":"ⲫ","Ⲭ":"ⲭ","Ⲯ":"ⲯ","Ⲱ":"ⲱ","Ⲳ":"ⲳ","Ⲵ":"ⲵ","Ⲷ":"ⲷ","Ⲹ":"ⲹ","Ⲻ":"ⲻ","Ⲽ":"ⲽ","Ⲿ":"ⲿ","Ⳁ":"ⳁ","Ⳃ":"ⳃ","Ⳅ":"ⳅ","Ⳇ":"ⳇ","Ⳉ":"ⳉ","Ⳋ":"ⳋ","Ⳍ":"ⳍ","Ⳏ":"ⳏ","Ⳑ":"ⳑ","Ⳓ":"ⳓ","Ⳕ":"ⳕ","Ⳗ":"ⳗ","Ⳙ":"ⳙ","Ⳛ":"ⳛ","Ⳝ":"ⳝ","Ⳟ":"ⳟ","Ⳡ":"ⳡ","Ⳣ":"ⳣ","Ⳬ":"ⳬ","Ⳮ":"ⳮ","Ⳳ":"ⳳ","Ꙁ":"ꙁ","Ꙃ":"ꙃ","Ꙅ":"ꙅ","Ꙇ":"ꙇ","Ꙉ":"ꙉ","Ꙋ":"ꙋ","Ꙍ":"ꙍ","Ꙏ":"ꙏ","Ꙑ":"ꙑ","Ꙓ":"ꙓ","Ꙕ":"ꙕ","Ꙗ":"ꙗ","Ꙙ":"ꙙ","Ꙛ":"ꙛ","Ꙝ":"ꙝ","Ꙟ":"ꙟ","Ꙡ":"ꙡ","Ꙣ":"ꙣ","Ꙥ":"ꙥ","Ꙧ":"ꙧ","Ꙩ":"ꙩ","Ꙫ":"ꙫ","Ꙭ":"ꙭ","Ꚁ":"ꚁ","Ꚃ":"ꚃ","Ꚅ":"ꚅ","Ꚇ":"ꚇ","Ꚉ":"ꚉ","Ꚋ":"ꚋ","Ꚍ":"ꚍ","Ꚏ":"ꚏ","Ꚑ":"ꚑ","Ꚓ":"ꚓ","Ꚕ":"ꚕ","Ꚗ":"ꚗ","Ꚙ":"ꚙ","Ꚛ":"ꚛ","Ꜣ":"ꜣ","Ꜥ":"ꜥ","Ꜧ":"ꜧ","Ꜩ":"ꜩ","Ꜫ":"ꜫ","Ꜭ":"ꜭ","Ꜯ":"ꜯ","Ꜳ":"ꜳ","Ꜵ":"ꜵ","Ꜷ":"ꜷ","Ꜹ":"ꜹ","Ꜻ":"ꜻ","Ꜽ":"ꜽ","Ꜿ":"ꜿ","Ꝁ":"ꝁ","Ꝃ":"ꝃ","Ꝅ":"ꝅ","Ꝇ":"ꝇ","Ꝉ":"ꝉ","Ꝋ":"ꝋ","Ꝍ":"ꝍ","Ꝏ":"ꝏ","Ꝑ":"ꝑ","Ꝓ":"ꝓ","Ꝕ":"ꝕ","Ꝗ":"ꝗ","Ꝙ":"ꝙ","Ꝛ":"ꝛ","Ꝝ":"ꝝ","Ꝟ":"ꝟ","Ꝡ":"ꝡ","Ꝣ":"ꝣ","Ꝥ":"ꝥ","Ꝧ":"ꝧ","Ꝩ":"ꝩ","Ꝫ":"ꝫ","Ꝭ":"ꝭ","Ꝯ":"ꝯ","Ꝺ":"ꝺ","Ꝼ":"ꝼ","Ᵹ":"ᵹ","Ꝿ":"ꝿ","Ꞁ":"ꞁ","Ꞃ":"ꞃ","Ꞅ":"ꞅ","Ꞇ":"ꞇ","Ꞌ":"ꞌ","Ɥ":"ɥ","Ꞑ":"ꞑ","Ꞓ":"ꞓ","Ꞗ":"ꞗ","Ꞙ":"ꞙ","Ꞛ":"ꞛ","Ꞝ":"ꞝ","Ꞟ":"ꞟ","Ꞡ":"ꞡ","Ꞣ":"ꞣ","Ꞥ":"ꞥ","Ꞧ":"ꞧ","Ꞩ":"ꞩ","Ɦ":"ɦ","Ɜ":"ɜ","Ɡ":"ɡ","Ɬ":"ɬ","Ʞ":"ʞ","Ʇ":"ʇ",A:"a",B:"b",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",J:"j",K:"k",L:"l",M:"m",N:"n",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",U:"u",V:"v",W:"w",X:"x",Y:"y",Z:"z","𐐀":"𐐨","𐐁":"𐐩","𐐂":"𐐪","𐐃":"𐐫","𐐄":"𐐬","𐐅":"𐐭","𐐆":"𐐮","𐐇":"𐐯","𐐈":"𐐰","𐐉":"𐐱","𐐊":"𐐲","𐐋":"𐐳","𐐌":"𐐴","𐐍":"𐐵","𐐎":"𐐶","𐐏":"𐐷","𐐐":"𐐸","𐐑":"𐐹","𐐒":"𐐺","𐐓":"𐐻","𐐔":"𐐼","𐐕":"𐐽","𐐖":"𐐾","𐐗":"𐐿","𐐘":"𐑀","𐐙":"𐑁","𐐚":"𐑂","𐐛":"𐑃","𐐜":"𐑄","𐐝":"𐑅","𐐞":"𐑆","𐐟":"𐑇","𐐠":"𐑈","𐐡":"𐑉","𐐢":"𐑊","𐐣":"𐑋","𐐤":"𐑌","𐐥":"𐑍","𐐦":"𐑎","𐐧":"𐑏","𑢠":"𑣀","𑢡":"𑣁","𑢢":"𑣂","𑢣":"𑣃","𑢤":"𑣄","𑢥":"𑣅","𑢦":"𑣆","𑢧":"𑣇","𑢨":"𑣈","𑢩":"𑣉","𑢪":"𑣊","𑢫":"𑣋","𑢬":"𑣌","𑢭":"𑣍","𑢮":"𑣎","𑢯":"𑣏","𑢰":"𑣐","𑢱":"𑣑","𑢲":"𑣒","𑢳":"𑣓","𑢴":"𑣔","𑢵":"𑣕","𑢶":"𑣖","𑢷":"𑣗","𑢸":"𑣘","𑢹":"𑣙","𑢺":"𑣚","𑢻":"𑣛","𑢼":"𑣜","𑢽":"𑣝","𑢾":"𑣞","𑢿":"𑣟",ß:"ss",İ:"i̇",ʼn:"ʼn",ǰ:"ǰ",ΐ:"ΐ",ΰ:"ΰ",և:"եւ",ẖ:"ẖ",ẗ:"ẗ",ẘ:"ẘ",ẙ:"ẙ",ẚ:"aʾ","ẞ":"ss",ὐ:"ὐ",ὒ:"ὒ",ὔ:"ὔ",ὖ:"ὖ",ᾀ:"ἀι",ᾁ:"ἁι",ᾂ:"ἂι",ᾃ:"ἃι",ᾄ:"ἄι",ᾅ:"ἅι",ᾆ:"ἆι",ᾇ:"ἇι",ᾈ:"ἀι",ᾉ:"ἁι",ᾊ:"ἂι",ᾋ:"ἃι",ᾌ:"ἄι",ᾍ:"ἅι",ᾎ:"ἆι",ᾏ:"ἇι",ᾐ:"ἠι",ᾑ:"ἡι",ᾒ:"ἢι",ᾓ:"ἣι",ᾔ:"ἤι",ᾕ:"ἥι",ᾖ:"ἦι",ᾗ:"ἧι",ᾘ:"ἠι",ᾙ:"ἡι",ᾚ:"ἢι",ᾛ:"ἣι",ᾜ:"ἤι",ᾝ:"ἥι",ᾞ:"ἦι",ᾟ:"ἧι",ᾠ:"ὠι",ᾡ:"ὡι",ᾢ:"ὢι",ᾣ:"ὣι",ᾤ:"ὤι",ᾥ:"ὥι",ᾦ:"ὦι",ᾧ:"ὧι",ᾨ:"ὠι",ᾩ:"ὡι",ᾪ:"ὢι",ᾫ:"ὣι",ᾬ:"ὤι",ᾭ:"ὥι",ᾮ:"ὦι",ᾯ:"ὧι",ᾲ:"ὰι",ᾳ:"αι",ᾴ:"άι",ᾶ:"ᾶ",ᾷ:"ᾶι",ᾼ:"αι",ῂ:"ὴι",ῃ:"ηι",ῄ:"ήι",ῆ:"ῆ",ῇ:"ῆι",ῌ:"ηι",ῒ:"ῒ",ΐ:"ΐ",ῖ:"ῖ",ῗ:"ῗ",ῢ:"ῢ",ΰ:"ΰ",ῤ:"ῤ",ῦ:"ῦ",ῧ:"ῧ",ῲ:"ὼι",ῳ:"ωι",ῴ:"ώι",ῶ:"ῶ",ῷ:"ῶι",ῼ:"ωι",ff:"ff",fi:"fi",fl:"fl",ffi:"ffi",ffl:"ffl",ſt:"st",st:"st",ﬓ:"մն",ﬔ:"մե",ﬕ:"մի",ﬖ:"վն",ﬗ:"մխ"},entityReferences=[{key:[65,69,108,105,103,59],value:"Æ"},{key:[65,77,80,59],value:"&"},{key:[65,97,99,117,116,101,59],value:"Á"},{key:[65,98,114,101,118,101,59],value:"Ă"},{key:[65,99,105,114,99,59],value:"Â"},{key:[65,99,121,59],value:"А"},{key:[65,102,114,59],value:"𝔄"},{key:[65,103,114,97,118,101,59],value:"À"},{key:[65,108,112,104,97,59],value:"Α"},{key:[65,109,97,99,114,59],value:"Ā"},{key:[65,110,100,59],value:"⩓"},{key:[65,111,103,111,110,59],value:"Ą"},{key:[65,111,112,102,59],value:"𝔸"},{key:[65,112,112,108,121,70,117,110,99,116,105,111,110,59],value:"⁡"},{key:[65,114,105,110,103,59],value:"Å"},{key:[65,115,99,114,59],value:"𝒜"},{key:[65,115,115,105,103,110,59],value:"≔"},{key:[65,116,105,108,100,101,59],value:"Ã"},{key:[65,117,109,108,59],value:"Ä"},{key:[66,97,99,107,115,108,97,115,104,59],value:"∖"},{key:[66,97,114,118,59],value:"⫧"},{key:[66,97,114,119,101,100,59],value:"⌆"},{key:[66,99,121,59],value:"Б"},{key:[66,101,99,97,117,115,101,59],value:"∵"},{key:[66,101,114,110,111,117,108,108,105,115,59],value:"ℬ"},{key:[66,101,116,97,59],value:"Β"},{key:[66,102,114,59],value:"𝔅"},{key:[66,111,112,102,59],value:"𝔹"},{key:[66,114,101,118,101,59],value:"˘"},{key:[66,115,99,114,59],value:"ℬ"},{key:[66,117,109,112,101,113,59],value:"≎"},{key:[67,72,99,121,59],value:"Ч"},{key:[67,79,80,89,59],value:"©"},{key:[67,97,99,117,116,101,59],value:"Ć"},{key:[67,97,112,59],value:"⋒"},{key:[67,97,112,105,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59],value:"ⅅ"},{key:[67,97,121,108,101,121,115,59],value:"ℭ"},{key:[67,99,97,114,111,110,59],value:"Č"},{key:[67,99,101,100,105,108,59],value:"Ç"},{key:[67,99,105,114,99,59],value:"Ĉ"},{key:[67,99,111,110,105,110,116,59],value:"∰"},{key:[67,100,111,116,59],value:"Ċ"},{key:[67,101,100,105,108,108,97,59],value:"¸"},{key:[67,101,110,116,101,114,68,111,116,59],value:"·"},{key:[67,102,114,59],value:"ℭ"},{key:[67,104,105,59],value:"Χ"},{key:[67,105,114,99,108,101,68,111,116,59],value:"⊙"},{key:[67,105,114,99,108,101,77,105,110,117,115,59],value:"⊖"},{key:[67,105,114,99,108,101,80,108,117,115,59],value:"⊕"},{key:[67,105,114,99,108,101,84,105,109,101,115,59],value:"⊗"},{key:[67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∲"},{key:[67,108,111,115,101,67,117,114,108,121,68,111,117,98,108,101,81,117,111,116,101,59],value:"”"},{key:[67,108,111,115,101,67,117,114,108,121,81,117,111,116,101,59],value:"’"},{key:[67,111,108,111,110,59],value:"∷"},{key:[67,111,108,111,110,101,59],value:"⩴"},{key:[67,111,110,103,114,117,101,110,116,59],value:"≡"},{key:[67,111,110,105,110,116,59],value:"∯"},{key:[67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∮"},{key:[67,111,112,102,59],value:"ℂ"},{key:[67,111,112,114,111,100,117,99,116,59],value:"∐"},{key:[67,111,117,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∳"},{key:[67,114,111,115,115,59],value:"⨯"},{key:[67,115,99,114,59],value:"𝒞"},{key:[67,117,112,59],value:"⋓"},{key:[67,117,112,67,97,112,59],value:"≍"},{key:[68,68,59],value:"ⅅ"},{key:[68,68,111,116,114,97,104,100,59],value:"⤑"},{key:[68,74,99,121,59],value:"Ђ"},{key:[68,83,99,121,59],value:"Ѕ"},{key:[68,90,99,121,59],value:"Џ"},{key:[68,97,103,103,101,114,59],value:"‡"},{key:[68,97,114,114,59],value:"↡"},{key:[68,97,115,104,118,59],value:"⫤"},{key:[68,99,97,114,111,110,59],value:"Ď"},{key:[68,99,121,59],value:"Д"},{key:[68,101,108,59],value:"∇"},{key:[68,101,108,116,97,59],value:"Δ"},{key:[68,102,114,59],value:"𝔇"},{key:[68,105,97,99,114,105,116,105,99,97,108,65,99,117,116,101,59],value:"´"},{key:[68,105,97,99,114,105,116,105,99,97,108,68,111,116,59],value:"˙"},{key:[68,105,97,99,114,105,116,105,99,97,108,68,111,117,98,108,101,65,99,117,116,101,59],value:"˝"},{key:[68,105,97,99,114,105,116,105,99,97,108,71,114,97,118,101,59],value:"`"},{key:[68,105,97,99,114,105,116,105,99,97,108,84,105,108,100,101,59],value:"˜"},{key:[68,105,97,109,111,110,100,59],value:"⋄"},{key:[68,105,102,102,101,114,101,110,116,105,97,108,68,59],value:"ⅆ"},{key:[68,111,112,102,59],value:"𝔻"},{key:[68,111,116,59],value:"¨"},{key:[68,111,116,68,111,116,59],value:"⃜"},{key:[68,111,116,69,113,117,97,108,59],value:"≐"},{key:[68,111,117,98,108,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∯"},{key:[68,111,117,98,108,101,68,111,116,59],value:"¨"},{key:[68,111,117,98,108,101,68,111,119,110,65,114,114,111,119,59],value:"⇓"},{key:[68,111,117,98,108,101,76,101,102,116,65,114,114,111,119,59],value:"⇐"},{key:[68,111,117,98,108,101,76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"⇔"},{key:[68,111,117,98,108,101,76,101,102,116,84,101,101,59],value:"⫤"},{key:[68,111,117,98,108,101,76,111,110,103,76,101,102,116,65,114,114,111,119,59],value:"⟸"},{key:[68,111,117,98,108,101,76,111,110,103,76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"⟺"},{key:[68,111,117,98,108,101,76,111,110,103,82,105,103,104,116,65,114,114,111,119,59],value:"⟹"},{key:[68,111,117,98,108,101,82,105,103,104,116,65,114,114,111,119,59],value:"⇒"},{key:[68,111,117,98,108,101,82,105,103,104,116,84,101,101,59],value:"⊨"},{key:[68,111,117,98,108,101,85,112,65,114,114,111,119,59],value:"⇑"},{key:[68,111,117,98,108,101,85,112,68,111,119,110,65,114,114,111,119,59],value:"⇕"},{key:[68,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59],value:"∥"},{key:[68,111,119,110,65,114,114,111,119,59],value:"↓"},{key:[68,111,119,110,65,114,114,111,119,66,97,114,59],value:"⤓"},{key:[68,111,119,110,65,114,114,111,119,85,112,65,114,114,111,119,59],value:"⇵"},{key:[68,111,119,110,66,114,101,118,101,59],value:"̑"},{key:[68,111,119,110,76,101,102,116,82,105,103,104,116,86,101,99,116,111,114,59],value:"⥐"},{key:[68,111,119,110,76,101,102,116,84,101,101,86,101,99,116,111,114,59],value:"⥞"},{key:[68,111,119,110,76,101,102,116,86,101,99,116,111,114,59],value:"↽"},{key:[68,111,119,110,76,101,102,116,86,101,99,116,111,114,66,97,114,59],value:"⥖"},{key:[68,111,119,110,82,105,103,104,116,84,101,101,86,101,99,116,111,114,59],value:"⥟"},{key:[68,111,119,110,82,105,103,104,116,86,101,99,116,111,114,59],value:"⇁"},{key:[68,111,119,110,82,105,103,104,116,86,101,99,116,111,114,66,97,114,59],value:"⥗"},{key:[68,111,119,110,84,101,101,59],value:"⊤"},{key:[68,111,119,110,84,101,101,65,114,114,111,119,59],value:"↧"},{key:[68,111,119,110,97,114,114,111,119,59],value:"⇓"},{key:[68,115,99,114,59],value:"𝒟"},{key:[68,115,116,114,111,107,59],value:"Đ"},{key:[69,78,71,59],value:"Ŋ"},{key:[69,84,72,59],value:"Ð"},{key:[69,97,99,117,116,101,59],value:"É"},{key:[69,99,97,114,111,110,59],value:"Ě"},{key:[69,99,105,114,99,59],value:"Ê"},{key:[69,99,121,59],value:"Э"},{key:[69,100,111,116,59],value:"Ė"},{key:[69,102,114,59],value:"𝔈"},{key:[69,103,114,97,118,101,59],value:"È"},{key:[69,108,101,109,101,110,116,59],value:"∈"},{key:[69,109,97,99,114,59],value:"Ē"},{key:[69,109,112,116,121,83,109,97,108,108,83,113,117,97,114,101,59],value:"◻"},{key:[69,109,112,116,121,86,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59],value:"▫"},{key:[69,111,103,111,110,59],value:"Ę"},{key:[69,111,112,102,59],value:"𝔼"},{key:[69,112,115,105,108,111,110,59],value:"Ε"},{key:[69,113,117,97,108,59],value:"⩵"},{key:[69,113,117,97,108,84,105,108,100,101,59],value:"≂"},{key:[69,113,117,105,108,105,98,114,105,117,109,59],value:"⇌"},{key:[69,115,99,114,59],value:"ℰ"},{key:[69,115,105,109,59],value:"⩳"},{key:[69,116,97,59],value:"Η"},{key:[69,117,109,108,59],value:"Ë"},{key:[69,120,105,115,116,115,59],value:"∃"},{key:[69,120,112,111,110,101,110,116,105,97,108,69,59],value:"ⅇ"},{key:[70,99,121,59],value:"Ф"},{key:[70,102,114,59],value:"𝔉"},{key:[70,105,108,108,101,100,83,109,97,108,108,83,113,117,97,114,101,59],value:"◼"},{key:[70,105,108,108,101,100,86,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59],value:"▪"},{key:[70,111,112,102,59],value:"𝔽"},{key:[70,111,114,65,108,108,59],value:"∀"},{key:[70,111,117,114,105,101,114,116,114,102,59],value:"ℱ"},{key:[70,115,99,114,59],value:"ℱ"},{key:[71,74,99,121,59],value:"Ѓ"},{key:[71,84,59],value:">"},{key:[71,97,109,109,97,59],value:"Γ"},{key:[71,97,109,109,97,100,59],value:"Ϝ"},{key:[71,98,114,101,118,101,59],value:"Ğ"},{key:[71,99,101,100,105,108,59],value:"Ģ"},{key:[71,99,105,114,99,59],value:"Ĝ"},{key:[71,99,121,59],value:"Г"},{key:[71,100,111,116,59],value:"Ġ"},{key:[71,102,114,59],value:"𝔊"},{key:[71,103,59],value:"⋙"},{key:[71,111,112,102,59],value:"𝔾"},{key:[71,114,101,97,116,101,114,69,113,117,97,108,59],value:"≥"},{key:[71,114,101,97,116,101,114,69,113,117,97,108,76,101,115,115,59],value:"⋛"},{key:[71,114,101,97,116,101,114,70,117,108,108,69,113,117,97,108,59],value:"≧"},{key:[71,114,101,97,116,101,114,71,114,101,97,116,101,114,59],value:"⪢"},{key:[71,114,101,97,116,101,114,76,101,115,115,59],value:"≷"},{key:[71,114,101,97,116,101,114,83,108,97,110,116,69,113,117,97,108,59],value:"⩾"},{key:[71,114,101,97,116,101,114,84,105,108,100,101,59],value:"≳"},{key:[71,115,99,114,59],value:"𝒢"},{key:[71,116,59],value:"≫"},{key:[72,65,82,68,99,121,59],value:"Ъ"},{key:[72,97,99,101,107,59],value:"ˇ"},{key:[72,97,116,59],value:"^"},{key:[72,99,105,114,99,59],value:"Ĥ"},{key:[72,102,114,59],value:"ℌ"},{key:[72,105,108,98,101,114,116,83,112,97,99,101,59],value:"ℋ"},{key:[72,111,112,102,59],value:"ℍ"},{key:[72,111,114,105,122,111,110,116,97,108,76,105,110,101,59],value:"─"},{key:[72,115,99,114,59],value:"ℋ"},{key:[72,115,116,114,111,107,59],value:"Ħ"},{key:[72,117,109,112,68,111,119,110,72,117,109,112,59],value:"≎"},{key:[72,117,109,112,69,113,117,97,108,59],value:"≏"},{key:[73,69,99,121,59],value:"Е"},{key:[73,74,108,105,103,59],value:"IJ"},{key:[73,79,99,121,59],value:"Ё"},{key:[73,97,99,117,116,101,59],value:"Í"},{key:[73,99,105,114,99,59],value:"Î"},{key:[73,99,121,59],value:"И"},{key:[73,100,111,116,59],value:"İ"},{key:[73,102,114,59],value:"ℑ"},{key:[73,103,114,97,118,101,59],value:"Ì"},{key:[73,109,59],value:"ℑ"},{key:[73,109,97,99,114,59],value:"Ī"},{key:[73,109,97,103,105,110,97,114,121,73,59],value:"ⅈ"},{key:[73,109,112,108,105,101,115,59],value:"⇒"},{key:[73,110,116,59],value:"∬"},{key:[73,110,116,101,103,114,97,108,59],value:"∫"},{key:[73,110,116,101,114,115,101,99,116,105,111,110,59],value:"⋂"},{key:[73,110,118,105,115,105,98,108,101,67,111,109,109,97,59],value:"⁣"},{key:[73,110,118,105,115,105,98,108,101,84,105,109,101,115,59],value:"⁢"},{key:[73,111,103,111,110,59],value:"Į"},{key:[73,111,112,102,59],value:"𝕀"},{key:[73,111,116,97,59],value:"Ι"},{key:[73,115,99,114,59],value:"ℐ"},{key:[73,116,105,108,100,101,59],value:"Ĩ"},{key:[73,117,107,99,121,59],value:"І"},{key:[73,117,109,108,59],value:"Ï"},{key:[74,99,105,114,99,59],value:"Ĵ"},{key:[74,99,121,59],value:"Й"},{key:[74,102,114,59],value:"𝔍"},{key:[74,111,112,102,59],value:"𝕁"},{key:[74,115,99,114,59],value:"𝒥"},{key:[74,115,101,114,99,121,59],value:"Ј"},{key:[74,117,107,99,121,59],value:"Є"},{key:[75,72,99,121,59],value:"Х"},{key:[75,74,99,121,59],value:"Ќ"},{key:[75,97,112,112,97,59],value:"Κ"},{key:[75,99,101,100,105,108,59],value:"Ķ"},{key:[75,99,121,59],value:"К"},{key:[75,102,114,59],value:"𝔎"},{key:[75,111,112,102,59],value:"𝕂"},{key:[75,115,99,114,59],value:"𝒦"},{key:[76,74,99,121,59],value:"Љ"},{key:[76,84,59],value:"<"},{key:[76,97,99,117,116,101,59],value:"Ĺ"},{key:[76,97,109,98,100,97,59],value:"Λ"},{key:[76,97,110,103,59],value:"⟪"},{key:[76,97,112,108,97,99,101,116,114,102,59],value:"ℒ"},{key:[76,97,114,114,59],value:"↞"},{key:[76,99,97,114,111,110,59],value:"Ľ"},{key:[76,99,101,100,105,108,59],value:"Ļ"},{key:[76,99,121,59],value:"Л"},{key:[76,101,102,116,65,110,103,108,101,66,114,97,99,107,101,116,59],value:"⟨"},{key:[76,101,102,116,65,114,114,111,119,59],value:"←"},{key:[76,101,102,116,65,114,114,111,119,66,97,114,59],value:"⇤"},{key:[76,101,102,116,65,114,114,111,119,82,105,103,104,116,65,114,114,111,119,59],value:"⇆"},{key:[76,101,102,116,67,101,105,108,105,110,103,59],value:"⌈"},{key:[76,101,102,116,68,111,117,98,108,101,66,114,97,99,107,101,116,59],value:"⟦"},{key:[76,101,102,116,68,111,119,110,84,101,101,86,101,99,116,111,114,59],value:"⥡"},{key:[76,101,102,116,68,111,119,110,86,101,99,116,111,114,59],value:"⇃"},{key:[76,101,102,116,68,111,119,110,86,101,99,116,111,114,66,97,114,59],value:"⥙"},{key:[76,101,102,116,70,108,111,111,114,59],value:"⌊"},{key:[76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"↔"},{key:[76,101,102,116,82,105,103,104,116,86,101,99,116,111,114,59],value:"⥎"},{key:[76,101,102,116,84,101,101,59],value:"⊣"},{key:[76,101,102,116,84,101,101,65,114,114,111,119,59],value:"↤"},{key:[76,101,102,116,84,101,101,86,101,99,116,111,114,59],value:"⥚"},{key:[76,101,102,116,84,114,105,97,110,103,108,101,59],value:"⊲"},{key:[76,101,102,116,84,114,105,97,110,103,108,101,66,97,114,59],value:"⧏"},{key:[76,101,102,116,84,114,105,97,110,103,108,101,69,113,117,97,108,59],value:"⊴"},{key:[76,101,102,116,85,112,68,111,119,110,86,101,99,116,111,114,59],value:"⥑"},{key:[76,101,102,116,85,112,84,101,101,86,101,99,116,111,114,59],value:"⥠"},{key:[76,101,102,116,85,112,86,101,99,116,111,114,59],value:"↿"},{key:[76,101,102,116,85,112,86,101,99,116,111,114,66,97,114,59],value:"⥘"},{key:[76,101,102,116,86,101,99,116,111,114,59],value:"↼"},{key:[76,101,102,116,86,101,99,116,111,114,66,97,114,59],value:"⥒"},{key:[76,101,102,116,97,114,114,111,119,59],value:"⇐"},{key:[76,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"⇔"},{key:[76,101,115,115,69,113,117,97,108,71,114,101,97,116,101,114,59],value:"⋚"},{key:[76,101,115,115,70,117,108,108,69,113,117,97,108,59],value:"≦"},{key:[76,101,115,115,71,114,101,97,116,101,114,59],value:"≶"},{key:[76,101,115,115,76,101,115,115,59],value:"⪡"},{key:[76,101,115,115,83,108,97,110,116,69,113,117,97,108,59],value:"⩽"},{key:[76,101,115,115,84,105,108,100,101,59],value:"≲"},{key:[76,102,114,59],value:"𝔏"},{key:[76,108,59],value:"⋘"},{key:[76,108,101,102,116,97,114,114,111,119,59],value:"⇚"},{key:[76,109,105,100,111,116,59],value:"Ŀ"},{key:[76,111,110,103,76,101,102,116,65,114,114,111,119,59],value:"⟵"},{key:[76,111,110,103,76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"⟷"},{key:[76,111,110,103,82,105,103,104,116,65,114,114,111,119,59],value:"⟶"},{key:[76,111,110,103,108,101,102,116,97,114,114,111,119,59],value:"⟸"},{key:[76,111,110,103,108,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"⟺"},{key:[76,111,110,103,114,105,103,104,116,97,114,114,111,119,59],value:"⟹"},{key:[76,111,112,102,59],value:"𝕃"},{key:[76,111,119,101,114,76,101,102,116,65,114,114,111,119,59],value:"↙"},{key:[76,111,119,101,114,82,105,103,104,116,65,114,114,111,119,59],value:"↘"},{key:[76,115,99,114,59],value:"ℒ"},{key:[76,115,104,59],value:"↰"},{key:[76,115,116,114,111,107,59],value:"Ł"},{key:[76,116,59],value:"≪"},{key:[77,97,112,59],value:"⤅"},{key:[77,99,121,59],value:"М"},{key:[77,101,100,105,117,109,83,112,97,99,101,59],value:" "},{key:[77,101,108,108,105,110,116,114,102,59],value:"ℳ"},{key:[77,102,114,59],value:"𝔐"},{key:[77,105,110,117,115,80,108,117,115,59],value:"∓"},{key:[77,111,112,102,59],value:"𝕄"},{key:[77,115,99,114,59],value:"ℳ"},{key:[77,117,59],value:"Μ"},{key:[78,74,99,121,59],value:"Њ"},{key:[78,97,99,117,116,101,59],value:"Ń"},{key:[78,99,97,114,111,110,59],value:"Ň"},{key:[78,99,101,100,105,108,59],value:"Ņ"},{key:[78,99,121,59],value:"Н"},{key:[78,101,103,97,116,105,118,101,77,101,100,105,117,109,83,112,97,99,101,59],value:"​"},{key:[78,101,103,97,116,105,118,101,84,104,105,99,107,83,112,97,99,101,59],value:"​"},{key:[78,101,103,97,116,105,118,101,84,104,105,110,83,112,97,99,101,59],value:"​"},{key:[78,101,103,97,116,105,118,101,86,101,114,121,84,104,105,110,83,112,97,99,101,59],value:"​"},{key:[78,101,115,116,101,100,71,114,101,97,116,101,114,71,114,101,97,116,101,114,59],value:"≫"},{key:[78,101,115,116,101,100,76,101,115,115,76,101,115,115,59],value:"≪"},{key:[78,101,119,76,105,110,101,59],value:` +`).every(ro=>{try{return JSON.parse(ro),!0}catch{return!1}})}const isValidJson=eo=>{if(typeof eo!="string")return!1;try{return JSON.parse(eo),!0}catch{return!1}};function formatDecimal(eo){return Math.abs(eo=Math.round(eo))>=1e21?eo.toLocaleString("en").replace(/,/g,""):eo.toString(10)}function formatDecimalParts(eo,to){if((ro=(eo=to?eo.toExponential(to-1):eo.toExponential()).indexOf("e"))<0)return null;var ro,no=eo.slice(0,ro);return[no.length>1?no[0]+no.slice(2):no,+eo.slice(ro+1)]}function exponent(eo){return eo=formatDecimalParts(Math.abs(eo)),eo?eo[1]:NaN}function formatGroup(eo,to){return function(ro,no){for(var oo=ro.length,io=[],so=0,ao=eo[0],lo=0;oo>0&&ao>0&&(lo+ao+1>no&&(ao=Math.max(1,no-lo)),io.push(ro.substring(oo-=ao,oo+ao)),!((lo+=ao+1)>no));)ao=eo[so=(so+1)%eo.length];return io.reverse().join(to)}}function formatNumerals(eo){return function(to){return to.replace(/[0-9]/g,function(ro){return eo[+ro]})}}var re$2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function formatSpecifier(eo){if(!(to=re$2.exec(eo)))throw new Error("invalid format: "+eo);var to;return new FormatSpecifier({fill:to[1],align:to[2],sign:to[3],symbol:to[4],zero:to[5],width:to[6],comma:to[7],precision:to[8]&&to[8].slice(1),trim:to[9],type:to[10]})}formatSpecifier.prototype=FormatSpecifier.prototype;function FormatSpecifier(eo){this.fill=eo.fill===void 0?" ":eo.fill+"",this.align=eo.align===void 0?">":eo.align+"",this.sign=eo.sign===void 0?"-":eo.sign+"",this.symbol=eo.symbol===void 0?"":eo.symbol+"",this.zero=!!eo.zero,this.width=eo.width===void 0?void 0:+eo.width,this.comma=!!eo.comma,this.precision=eo.precision===void 0?void 0:+eo.precision,this.trim=!!eo.trim,this.type=eo.type===void 0?"":eo.type+""}FormatSpecifier.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function formatTrim(eo){e:for(var to=eo.length,ro=1,no=-1,oo;ro0&&(no=0);break}return no>0?eo.slice(0,no)+eo.slice(oo+1):eo}var prefixExponent;function formatPrefixAuto(eo,to){var ro=formatDecimalParts(eo,to);if(!ro)return eo+"";var no=ro[0],oo=ro[1],io=oo-(prefixExponent=Math.max(-8,Math.min(8,Math.floor(oo/3)))*3)+1,so=no.length;return io===so?no:io>so?no+new Array(io-so+1).join("0"):io>0?no.slice(0,io)+"."+no.slice(io):"0."+new Array(1-io).join("0")+formatDecimalParts(eo,Math.max(0,to+io-1))[0]}function formatRounded(eo,to){var ro=formatDecimalParts(eo,to);if(!ro)return eo+"";var no=ro[0],oo=ro[1];return oo<0?"0."+new Array(-oo).join("0")+no:no.length>oo+1?no.slice(0,oo+1)+"."+no.slice(oo+1):no+new Array(oo-no.length+2).join("0")}const formatTypes={"%":(eo,to)=>(eo*100).toFixed(to),b:eo=>Math.round(eo).toString(2),c:eo=>eo+"",d:formatDecimal,e:(eo,to)=>eo.toExponential(to),f:(eo,to)=>eo.toFixed(to),g:(eo,to)=>eo.toPrecision(to),o:eo=>Math.round(eo).toString(8),p:(eo,to)=>formatRounded(eo*100,to),r:formatRounded,s:formatPrefixAuto,X:eo=>Math.round(eo).toString(16).toUpperCase(),x:eo=>Math.round(eo).toString(16)};function identity(eo){return eo}var map=Array.prototype.map,prefixes=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function formatLocale(eo){var to=eo.grouping===void 0||eo.thousands===void 0?identity:formatGroup(map.call(eo.grouping,Number),eo.thousands+""),ro=eo.currency===void 0?"":eo.currency[0]+"",no=eo.currency===void 0?"":eo.currency[1]+"",oo=eo.decimal===void 0?".":eo.decimal+"",io=eo.numerals===void 0?identity:formatNumerals(map.call(eo.numerals,String)),so=eo.percent===void 0?"%":eo.percent+"",ao=eo.minus===void 0?"−":eo.minus+"",lo=eo.nan===void 0?"NaN":eo.nan+"";function co(fo){fo=formatSpecifier(fo);var ho=fo.fill,po=fo.align,go=fo.sign,vo=fo.symbol,yo=fo.zero,xo=fo.width,_o=fo.comma,Eo=fo.precision,So=fo.trim,ko=fo.type;ko==="n"?(_o=!0,ko="g"):formatTypes[ko]||(Eo===void 0&&(Eo=12),So=!0,ko="g"),(yo||ho==="0"&&po==="=")&&(yo=!0,ho="0",po="=");var Ao=vo==="$"?ro:vo==="#"&&/[boxX]/.test(ko)?"0"+ko.toLowerCase():"",Co=vo==="$"?no:/[%p]/.test(ko)?so:"",Oo=formatTypes[ko],wo=/[defgprs%]/.test(ko);Eo=Eo===void 0?6:/[gprs]/.test(ko)?Math.max(1,Math.min(21,Eo)):Math.max(0,Math.min(20,Eo));function Ro(Do){var $o=Ao,Mo=Co,Po,Bo,No;if(ko==="c")Mo=Oo(Do)+Mo,Do="";else{Do=+Do;var Fo=Do<0||1/Do<0;if(Do=isNaN(Do)?lo:Oo(Math.abs(Do),Eo),So&&(Do=formatTrim(Do)),Fo&&+Do==0&&go!=="+"&&(Fo=!1),$o=(Fo?go==="("?go:ao:go==="-"||go==="("?"":go)+$o,Mo=(ko==="s"?prefixes[8+prefixExponent/3]:"")+Mo+(Fo&&go==="("?")":""),wo){for(Po=-1,Bo=Do.length;++PoNo||No>57){Mo=(No===46?oo+Do.slice(Po+1):Do.slice(Po))+Mo,Do=Do.slice(0,Po);break}}}_o&&!yo&&(Do=to(Do,1/0));var zo=$o.length+Do.length+Mo.length,qo=zo>1)+$o+Do+Mo+qo.slice(zo);break;default:Do=qo+$o+Do+Mo;break}return io(Do)}return Ro.toString=function(){return fo+""},Ro}function uo(fo,ho){var po=co((fo=formatSpecifier(fo),fo.type="f",fo)),go=Math.max(-8,Math.min(8,Math.floor(exponent(ho)/3)))*3,vo=Math.pow(10,-go),yo=prefixes[8+go/3];return function(xo){return po(vo*xo)+yo}}return{format:co,formatPrefix:uo}}var locale,format;defaultLocale({thousands:",",grouping:[3],currency:["$",""]});function defaultLocale(eo){return locale=formatLocale(eo),format=locale.format,locale.formatPrefix,locale}function formatInt(eo){return Math.abs(eo)<1e6?format(",")(eo):format("0.2s")(eo)}function formatFloat(eo){const to=Math.abs(eo);return to===0?"0.00":to<.01?format(".2e")(eo):to<1e3?format("0.2f")(eo):format("0.2s")(eo)}function formatNumber$1(eo){return Number.isInteger(eo)?formatInt(eo):formatFloat(eo)}function createNumberFormatter(eo){return to=>typeof to!="number"?"--":eo(to)}const intFormatter=createNumberFormatter(formatInt),floatFormatter=createNumberFormatter(formatFloat),timeFormat=eo=>(eo&&!eo.endsWith("Z")&&(eo+="Z"),eo?new Date(eo).toLocaleString([],{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"--"),latencyFormatInMS=eo=>{if(eo===void 0||eo<0)return"N/A";if(eo<6e4)return format(".3f")(eo/1e3)+"s";{const to=Math.floor(eo/6e4);eo%=6e4;const ro=eo/1e3;return`${to}min ${Math.floor(ro)}s`}},parseHttpSpanAttributes=eo=>{var no;const to=eo==null?void 0:eo.attributes;if(!to||((no=to.span_type)==null?void 0:no.toLowerCase())!=="http")return;const ro={response:{headers:{}},request:{headers:{}}};return Object.entries(to).forEach(([oo,io])=>{const so=oo.toLowerCase();if(so==="url.full"){ro.urlFull=io;return}const[ao,lo,co,...uo]=so.split(".");if(ao==="http")switch(lo){case"request":co==="header"?ro.request.headers[uo.join(".")]=io:ro.request[[co,...uo].join(".")]=io;break;case"response":co==="header"?ro.response.headers[uo.join(".")]=io:ro.response[[co,...uo].join(".")]=io;break;case"status_code":ro.status_code=io;break;case"method":ro.method=io;break;default:ro[oo.substring(5)]=io}}),ro},convertToTraceListRow=eo=>{var ro,no,oo;const to=eo.end_time&&eo.start_time?Date.parse(eo.end_time)-Date.parse(eo.start_time):0;return{...eo,latency:to,total_tokens:(ro=eo==null?void 0:eo.cumulative_token_count)==null?void 0:ro.total,prompt_tokens:(no=eo==null?void 0:eo.cumulative_token_count)==null?void 0:no.prompt,completion_tokens:(oo=eo==null?void 0:eo.cumulative_token_count)==null?void 0:oo.completion}};var AutoRefreshInterval=(eo=>(eo.OFF="OFF",eo["30s"]="30s",eo["1m"]="1m",eo["5m"]="5m",eo["10m"]="10m",eo))(AutoRefreshInterval||{});const AUTO_REFRESH_LIST=["OFF","30s","1m","5m"],REFRESH_INTERVAL_MAP={OFF:0,"30s":3e4,"1m":6e4,"5m":3e5,"10m":6e5};var _a$1;const initialTableColumnNames={normalColumns:[],evaluationColumns:[]};var ViewStatus=(eo=>(eo.loading="loading",eo.loaded="loaded",eo.error="error",eo.hidden="hidden",eo))(ViewStatus||{});const nv=class nv{constructor(to){this.selectedSpanId$=new State$1(void 0),this.selectedTraceId$=new State$1(void 0),this.selectedLLMMessage$=new State$1(void 0),this.spans$=new ObservableMap,this.traces$=new ObservableOrderedMap,this.tableColumnNames$=new State$1(initialTableColumnNames),this.tableHiddenColumnKeys$=new State$1([]),this.isTraceDetailOpen$=new State$1(!1),this.isGanttChartOpen$=new State$1(!1),this.showTraceDetailRightPanel$=new State$1(!0),this.traceListStatus$=new State$1("loading"),this.traceDetailStatus$=new State$1("loading"),this.traceListShowMetrics$=new State$1(!0),this.traceFilterChanged$=new State$1(!1),this.messagesBySpanId$=new ObservableOrderedMap,this.sortColumn$=new State$1(void 0),this.sortableColumns=[],this.traceDetailHistoryTraceList$=new State$1([]),this.traceDetailEvaluationTraces$=new ObservableMap,this.loadSummariesError$=new State$1(void 0),this.traceListAutoRefreshInterval$=new State$1(AutoRefreshInterval.OFF),this.isLazyLoadSpan=!0,this.spanEventsLoadStatus$=new ObservableMap,this.spanRawJsonLoadCache$=new ObservableMap;const{traceListConfig:ro,spanConfig:no}=to||{};ro&&(this.traceListColumnModifier=ro.columnModifier,ro.showMetrics!==void 0&&this.traceListShowMetrics$.setState(ro.showMetrics),ro.defaultHiddenColumnKeys!==void 0&&this.tableHiddenColumnKeys$.setState(ro.defaultHiddenColumnKeys),ro.sortableColumns&&(this.sortableColumns=ro.sortableColumns)),no&&(this._fetchSpanEvent=no.fetchSpanEvent,this.isLazyLoadSpan=no.isLazyLoadSpan??!0),this.selectedTrace$=Computed$1.fromStates([this.selectedTraceId$,this.traces$],([oo,io])=>oo&&io.get(oo)||void 0),this.selectedTraceId$.subscribe(oo=>{var so;if(!oo)return;const io=this.traces$.get(oo);(so=this._traceDetailDidOpenCallback)==null||so.call(this,oo,io)}),this.isTraceDetailOpen$.subscribe(oo=>{var ao;const io=this.selectedTraceId$.getSnapshot(),so=this.selectedTrace$.getSnapshot();!oo&&io&&((ao=this._traceDetailDidCloseCallback)==null||ao.call(this,io,so),this.clearDetail())}),this.sortColumn$.subscribe(oo=>{var io;(io=this._traceListSortColumnDidChangeCallback)==null||io.call(this,oo)}),this.traceDetailTitle$=Computed$1.fromStates([this.selectedTraceId$,this.traces$],([oo,io])=>{if(!oo)return"";const so=io.get(oo);return(so==null?void 0:so.name)??""})}traceDetailDidOpen(to){this._traceDetailDidOpenCallback=to}traceDetailDidClose(to){this._traceDetailDidCloseCallback=to}onTraceDetailCopyUrl(to){this._traceDetailCopyUrlCallback=to}traceListSortColumnDidChange(to){this._traceListSortColumnDidChangeCallback=to}onRefreshSpans(to){this._refreshSpansCallback=to}setOnRefreshTraces(to){this._refreshTracesCallback=to}traceDetailCopyUrl(){const to=this.selectedTraceId$.getSnapshot(),ro=this.selectedTrace$.getSnapshot();return to&&this._traceDetailCopyUrlCallback?(this._traceDetailCopyUrlCallback(to,ro),!0):!1}refreshSpans(){var no;const to=this.selectedTraceId$.getSnapshot(),ro=this.selectedTrace$.getSnapshot();to&&(this.spanEventsLoadStatus$.clear(),this.spanRawJsonLoadCache$.clear(),(no=this._refreshSpansCallback)==null||no.call(this,to,ro))}refreshTraces(){var to;(to=this._refreshTracesCallback)==null||to.call(this)}clear(){this.traces$.clear(),this.spans$.clear()}clearDetail(){this.traceDetailStatus$.setState("hidden"),this.isGanttChartOpen$.setState(!1),this.selectedTraceId$.setState(void 0),this.selectedLLMMessage$.next(void 0),this.spanEventsLoadStatus$.clear(),this.spanRawJsonLoadCache$.clear(),this.clearDetailHistoryTrace()}clearDetailHistoryTrace(){this.traceDetailHistoryTraceList$.next([]);const to=this.traceDetailEvaluationTraces$.getSnapshot().keys();for(const ro of to){const no=this.traces$.get(ro);no&&no.__is_ui_evaluation__&&this.traces$.delete(ro)}this.traceDetailEvaluationTraces$.clear()}appendTraces(to,ro){to.forEach(no=>{if(no.trace_id!==void 0){const oo=this.traces$.get(no.trace_id);(oo&&oo.__is_ui_evaluation__||!oo&&this.traceDetailEvaluationTraces$.get(no.trace_id))&&(no.__is_ui_evaluation__=!0),ro?this.traces$.set(no.trace_id,no).sortByValue(ro):this.traces$.set(no.trace_id,no)}})}appendSpans(to){to.forEach(ro=>{var lo,co;const no=(lo=ro==null?void 0:ro.context)==null?void 0:lo.trace_id,oo=(co=ro==null?void 0:ro.context)==null?void 0:co.span_id;if(!no||!oo)return;const io=this.spans$.get(no)||new ObservableOrderedMap,so=this.spanEventsLoadStatus$.getSnapshot().keys(),ao=this.spanRawJsonLoadCache$.getSnapshot().keys();this.spanEventsLoadStatus$.deleteAll(Array.from(so).filter(uo=>uo.includes(oo))),this.spanRawJsonLoadCache$.deleteAll(Array.from(ao).filter(uo=>uo.includes(oo))),this.spans$.set(no,io.set(oo,ro))})}toggleIsGanttChartOpen(){this.isGanttChartOpen$.setState(!this.isGanttChartOpen$.getSnapshot())}getTraceById(to){return to?this.traces$.get(to):void 0}setTraceListStatus(to){this.traceListStatus$.setState(to),to!=="error"&&this.loadSummariesError$.setState(void 0)}setTraceDetailStatus(to){this.traceDetailStatus$.setState(to)}setTraceDetailOpen(to,ro){this.isTraceDetailOpen$.setState(to),this.selectedTraceId$.setState(to?ro:void 0)}sortTraces(to){this.traces$.sortByValue(to)}fetchSpanEvent(to){var ro;return((ro=this._fetchSpanEvent)==null?void 0:ro.call(this,to))??Promise.resolve({status:"success"})}detailNavigateTo(to,ro){if(ro!==void 0){const io=this.traceDetailHistoryTraceList$.getSnapshot().slice(0,ro);this.traceDetailHistoryTraceList$.setState(io),this.selectedTraceId$.setState(to.trace_id);return}const no=this.selectedTrace$.getSnapshot();no&&this.traceDetailHistoryTraceList$.setState([...this.traceDetailHistoryTraceList$.getSnapshot(),no]),to.trace_id&&this.traceDetailEvaluationTraces$.set(to.trace_id,!0),this.selectedTraceId$.setState(to.trace_id)}};_a$1=SINGLETON,nv[_a$1]=!0;let TraceViewModel=nv;const TraceViewModelToken=createInjectionToken("TraceViewModel",new TraceViewModel),useLoadSpanEvents=(eo,to,ro)=>{const no=useTraceViewModel(),oo=useSpanEventsLoadStatus();return reactExports.useMemo(()=>createLoadSpanEvents(no,oo,eo,to,ro),[no,oo,eo,to,ro])},createLoadSpanEvents=(eo,to,ro,no,oo)=>{const io=(so,ao,lo)=>{var uo;const{data:co}=so;if((uo=ao.events)!=null&&uo[lo]){const fo=typeof co=="string"?safeJSONParseV2(co):co;typeof fo=="object"&&(fo.name=ao.events[lo].name??"",ao.events[lo]=fo)}};return({onCompleted:so,forceRefresh:ao})=>{var co,uo,fo,ho;if(!((co=ro==null?void 0:ro.events)!=null&&co.length)||!eo.isLazyLoadSpan){so();return}if(oo!==void 0){const po=(uo=ro.external_event_data_uris)==null?void 0:uo[oo];if(!po){so();return}const go=`${(fo=ro.context)==null?void 0:fo.span_id}__${po}`;if(to.get(go)==="success"){so();return}if(!ao&&to.has(go)){so(to.get(go)==="error"?new Error("load error"):void 0);return}eo.fetchSpanEvent(po).then(vo=>{vo.status==="error"?(to.set(go,"error"),so(new Error("load error"))):(io(vo,ro,oo),to.set(go,"success"),so())});return}const lo=`${(ho=ro.context)==null?void 0:ho.span_id}__${no}`;if(!ao&&to.has(lo)){so(to.get(lo)==="error"?new Error("load error"):void 0);return}Promise.all(ro.events.map((po,go)=>{var vo,yo;if(po.name===no){const xo=(vo=ro.external_event_data_uris)==null?void 0:vo[go];if(!xo)return Promise.resolve({status:"success"});const _o=`${(yo=ro.context)==null?void 0:yo.span_id}__${xo}`;return to.get(_o)==="success"?Promise.resolve({status:"success"}):!ao&&to.has(_o)?Promise.resolve({status:to.get(_o)==="error"?"error":"success"}):eo.fetchSpanEvent(xo).then(Eo=>(Eo.status==="error"?to.set(_o,"error"):(io(Eo,ro,go),to.set(_o,"success")),Eo))}}).filter(po=>po!==void 0)).then(po=>{if(po.some(go=>(go==null?void 0:go.status)==="error")){to.set(lo,"error"),so(new Error("load error"));return}to.set(lo,"success"),so()})}},getSpanEventsWithPayload=(eo,to)=>{var ro;return((ro=eo==null?void 0:eo.events)==null?void 0:ro.filter(no=>no.name===to).map(no=>{var oo;return{...no,attributes:safeJSONParse(((oo=no.attributes)==null?void 0:oo.payload)??"")}}))??[]},useLoadSpans=(eo,to)=>{const ro=useTraceViewModel(),no=useSpanEventsLoadStatus(),oo=[];for(const ao of eo)if(ao!==void 0)for(const lo of to)oo.push(createLoadSpanEvents(ro,no,ao,lo));const io=reactExports.useMemo(()=>eo,[...eo]),so=reactExports.useMemo(()=>to.join(","),[to]);return reactExports.useMemo(()=>({onCompleted:ao,forceRefresh:lo})=>{Promise.all(oo.map(co=>new Promise((uo,fo)=>{co({onCompleted:ho=>{if(ho){fo();return}uo(void 0)},forceRefresh:lo})}))).then(()=>{ao()}).catch(()=>{ao(new Error("load error"))})},[io,so])},useFetchSpanRawJson=eo=>{const to=useTraceViewModel(),ro=useSpanRawJsonLoadCache();return reactExports.useMemo(()=>{const no=eo==null?void 0:eo.span_json_uri;return({onCompleted:oo})=>{var ao;if(!no){oo(void 0,void 0);return}const io=`${(ao=eo==null?void 0:eo.context)==null?void 0:ao.span_id}__${no}`,so=ro.get(io);if(so){oo(void 0,so);return}to.fetchSpanEvent(no).then(lo=>{lo.status==="success"?(ro.set(io,lo.data),oo(void 0,lo.data)):oo(new Error("load error"))})}},[to,ro,eo])},useTraceViewModel=()=>{const[eo]=useInjected(TraceViewModelToken);return eo},useSelectedSpanId=()=>{const eo=useTraceViewModel();return useState(eo.selectedSpanId$)},useSelectedSpan=()=>{var no;const eo=useTraceViewModel(),to=useSelectedSpanId(),ro=useSelectedTraceId();if(!(!to||!ro))return(no=eo.spans$.get(ro))==null?void 0:no.get(to)},useParentSpanOfSelectedSpan=()=>{var no;const eo=useTraceViewModel(),to=useSelectedTraceId(),ro=useSelectedSpan();if(!(!ro||!to||!ro.parent_id))return(no=eo.spans$.get(to))==null?void 0:no.get(ro.parent_id)},useSetSelectedSpanId=()=>useSetState(useTraceViewModel().selectedSpanId$),useSelectedTraceId=()=>useState(useTraceViewModel().selectedTraceId$),useSetSelectedTraceId=()=>useSetState(useTraceViewModel().selectedTraceId$),useSelectedTrace=()=>{const eo=useTraceViewModel();return useState(eo.selectedTrace$)},useSpansOfSelectedTrace=()=>{const eo=useTraceViewModel(),to=useSelectedTraceId(),ro=useState(eo.spans$.get(to??"")??new ObservableOrderedMap);return Array.from(ro.values())},useTraces=()=>{const eo=useState(useTraceViewModel().traces$);return reactExports.useMemo(()=>Array.from(eo.values()).filter(to=>!to.__is_ui_evaluation__),[eo])},useTraceNavigation=()=>{var uo;const eo=useTraceViewModel(),to=useTraces(),ro=useSelectedTraceId(),oo=((uo=useTraceDetailHistoryTraces()[0])==null?void 0:uo.trace_id)??ro,io=to.findIndex(fo=>fo.trace_id===oo),so=io>0,ao=io{so&&(eo.clearDetailHistoryTrace(),eo.selectedTraceId$.setState(to[io-1].trace_id))},[so,io,to,eo]),co=reactExports.useCallback(()=>{ao&&(eo.clearDetailHistoryTrace(),eo.selectedTraceId$.setState(to[io+1].trace_id))},[ao,io,to,eo]);return{hasPreviousTrace:so,hasNextTrace:ao,goToPreviousTrace:lo,goToNextTrace:co}},useEvaluationSpansOfSelectedSpan=()=>{const eo=useTraceViewModel(),to=[],ro=useSelectedTrace();return ro?(Object.keys(ro.evaluations??[]).forEach(no=>{var io,so;const oo=(io=ro==null?void 0:ro.evaluations)==null?void 0:io[no];if(oo){const ao=Array.from(((so=eo.spans$.get(oo.trace_id??""))==null?void 0:so.getState().values())??[]);to.push({evaluationName:oo.name??no,evaluationTraces:ao})}}),to):[]},useRootSpanIdOfSelectedSpans=()=>{const eo=useSelectedTrace();return eo==null?void 0:eo.root_span_id},useTableColumnNames=()=>useState(useTraceViewModel().tableColumnNames$),useSetTableColumnNames=()=>useSetState(useTraceViewModel().tableColumnNames$),useTableHiddenColumnKeys=()=>useState(useTraceViewModel().tableHiddenColumnKeys$),useSetTableHiddenColumnKeys=()=>useSetState(useTraceViewModel().tableHiddenColumnKeys$),useIsTraceDetailOpen=()=>useState(useTraceViewModel().isTraceDetailOpen$),useSetIsTraceDetailOpen=()=>useSetState(useTraceViewModel().isTraceDetailOpen$),useShowTraceDetailRightPanel=()=>useState(useTraceViewModel().showTraceDetailRightPanel$),useSetShowTraceDetailRightPanel=()=>useSetState(useTraceViewModel().showTraceDetailRightPanel$),useTraceDetailRefreshKey=()=>{const eo=useTraceViewModel(),to=useSelectedTraceId(),ro=useState(eo.spans$),no=Array.from(useState(ro.get(to??"")??new ObservableOrderedMap).keys());return`${to}-${no.join("-")}`},useIsGanttChartOpen=()=>useState(useTraceViewModel().isGanttChartOpen$),useTraceListColumnModifier=()=>useTraceViewModel().traceListColumnModifier,useTraceListShowMetrics=()=>useState(useTraceViewModel().traceListShowMetrics$),useTraceFilterChanged=()=>useState(useTraceViewModel().traceFilterChanged$),useSetTraceFilterChanged=()=>useSetState(useTraceViewModel().traceFilterChanged$),getSpanMessages=(eo,to,ro)=>{var po,go,vo,yo,xo;const no=to?(po=eo.spans$.get(to))==null?void 0:po.get(ro):void 0,oo=getSpanEventsWithPayload(no,BuildInEventName["function.inputs"])[0],io=getSpanEventsWithPayload(no,BuildInEventName["function.output"])[0],so=getSpanEventsWithPayload(no,BuildInEventName["llm.generated_message"])[0];if(!to)return{inputMessages:[],outputMessages:[],tools:[]};const ao=oo?oo.attributes:safeJSONParse(((go=no==null?void 0:no.attributes)==null?void 0:go.inputs)??"{}"),lo=(vo=no==null?void 0:no.attributes)==null?void 0:vo["llm.generated_message"],co=(so==null?void 0:so.attributes)??(lo?safeJSONParse(lo):void 0),uo=(ao==null?void 0:ao.tools)??[],fo=(ao==null?void 0:ao.messages)??[];let ho=[];if(co)typeof co=="string"?ho=[{content:co,role:"",tools:uo}]:ho=[co].map(_o=>({..._o,tools:uo}));else{const _o=io?io.attributes:safeJSONParse(((yo=no==null?void 0:no.attributes)==null?void 0:yo.output)??"{}");ho=((xo=_o==null?void 0:_o.choices)==null?void 0:xo.reduce((Eo,So)=>So.message?[...Eo,{...So.message,tools:uo}]:So.text?[...Eo,{content:So.text,role:"",tools:uo}]:Eo,[]))??[]}return{inputMessages:fo,outputMessages:ho,tools:uo}},useMessagesBySpanId=eo=>{const to=useTraceViewModel(),ro=useState(to.selectedTraceId$);return getSpanMessages(to,ro,eo)},useMessagesOfSelectedSpan=()=>{const eo=useSelectedSpanId();return useMessagesBySpanId(eo??"")},useGetAllTraces=()=>{const eo=useTraceViewModel();return reactExports.useCallback(()=>Array.from(eo.traces$.getState().values()),[eo.traces$])},useGetAllSpans=()=>{const eo=useTraceViewModel();return reactExports.useCallback(()=>{const to=[];return eo.spans$.getState().forEach(no=>{no.getState().forEach(io=>{to.push(io)})}),to},[eo.spans$])},useSortColumn=()=>{const eo=useTraceViewModel();return useState(eo.sortColumn$)},useSetSortColumn=()=>useSetState(useTraceViewModel().sortColumn$),useSortableColumns=()=>useTraceViewModel().sortableColumns,useSelectedTraceTitle=()=>useState(useTraceViewModel().traceDetailTitle$),useSpanEventsLoadStatus=()=>useTraceViewModel().spanEventsLoadStatus$,useSpanRawJsonLoadCache=()=>useTraceViewModel().spanRawJsonLoadCache$,useIsLazyLoadSpan=()=>useTraceViewModel().isLazyLoadSpan,useSelectedLLMMessage=()=>{const eo=useTraceViewModel();return useState(eo.selectedLLMMessage$)},useSetSelectedLLMMessage=()=>{const eo=useTraceViewModel();return useSetState(eo.selectedLLMMessage$)},useTraceDetailHistoryTraces=()=>{const eo=useTraceViewModel();return useState(eo.traceDetailHistoryTraceList$)},useGetTraceByLineRunId=()=>{const eo=useTraces();return reactExports.useCallback(to=>eo.find(ro=>ro.line_run_id===to),[eo])},useLoadSummariesError=()=>useState(useTraceViewModel().loadSummariesError$),useSetLoadSummariesError=()=>useSetState(useTraceViewModel().loadSummariesError$),useTraceListAutoRefreshInterval=()=>useState(useTraceViewModel().traceListAutoRefreshInterval$),useSetTraceListAutoRefreshInterval=()=>useSetState(useTraceViewModel().traceListAutoRefreshInterval$),StreamSwitcher=({isStreaming:eo,style:to,onIsStreamingChange:ro,labelName:no})=>{const oo=useLocStrings();return jsxRuntimeExports.jsx(Switch,{label:no||oo.Streaming,labelPosition:"before",checked:eo,onChange:(io,so)=>ro(so.checked),style:to})};var UISize=(eo=>(eo.extraSmall="extra-small",eo.small="small",eo.normal="normal",eo.large="large",eo))(UISize||{});const genStatusChecker=eo=>to=>to===void 0?!1:to.toLowerCase()===eo.toLowerCase(),checkStatus=(eo,to)=>eo===void 0?!1:eo.toLowerCase()===to.toLowerCase(),useUISize=eo=>{const{textSize:to,iconSize:ro,gap:no}=reactExports.useMemo(()=>{switch(eo){case UISize.extraSmall:return{textSize:200,iconSize:"12px",gap:"2px"};case UISize.small:return{textSize:300,iconSize:"16px",gap:"2px"};case UISize.large:return{textSize:500,iconSize:"26px",gap:"5px"};case UISize.normal:default:return{textSize:400,iconSize:"20px",gap:"5px"}}},[eo]);return{textSize:to,iconSize:ro,gap:no}},LatencyText=({startTimeISOString:eo,endTimeISOString:to,size:ro,tipTextSize:no,isLoading:oo=!1})=>{const io=useClasses$w(),so=eo?new Date(eo):void 0,ao=to?new Date(to):void 0,lo=so&&ao?ao.getTime()-so.getTime():void 0,co=latencyFormatInMS(lo),{textSize:uo,iconSize:fo,gap:ho}=useUISize(ro);return jsxRuntimeExports.jsx(Tooltip,{content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Text$2,{size:no,weight:"bold",block:!0,children:"Start Time"}),jsxRuntimeExports.jsx(Text$2,{size:no,block:!0,children:timeFormat(eo)}),jsxRuntimeExports.jsx(Text$2,{size:no,weight:"bold",block:!0,children:"End Time"}),jsxRuntimeExports.jsx(Text$2,{size:no,block:!0,children:timeFormat(to)})]}),relationship:"label",children:jsxRuntimeExports.jsxs("div",{className:io.wrapper,style:{gap:ho},children:[jsxRuntimeExports.jsx(Clock20Regular,{style:{height:fo,width:fo}}),oo?jsxRuntimeExports.jsx(SkeletonItem,{style:{width:fo,height:fo}}):jsxRuntimeExports.jsx(Text$2,{size:uo,className:io.text,children:co})]})})},useClasses$w=makeStyles({wrapper:{display:"inline-flex",flexDirection:"row",alignItems:"center"},text:{color:tokens.colorNeutralForeground3,fontWeight:600,whiteSpace:"nowrap"}}),MetricTag=({tag:eo,maxValueLength:to=20})=>{const ro=useClasses$v(),[no,oo]=React.useState(!0),io=reactExports.useMemo(()=>{if(typeof eo.value=="number")return formatNumber$1(eo.value);{const so=eo.value.toString();return no&&so.length>to?so.substring(0,to)+"...":so}},[eo.value,no,to]);return jsxRuntimeExports.jsxs(Badge$2,{className:ro.wrapper,size:"medium",shape:"rounded",appearance:"outline",onClick:()=>oo(!no),children:[jsxRuntimeExports.jsxs("span",{className:ro.name,children:[eo.name," "]}),jsxRuntimeExports.jsx("span",{className:ro.data,children:io})]})},useClasses$v=makeStyles({wrapper:{display:"inline-flex",fontSize:"12px",cursor:"pointer",...shorthands.padding("0px","8px","1px"),...shorthands.borderColor(tokens.colorPaletteGreenBorder2),...shorthands.gap("0.5rem")},name:{color:tokens.colorPaletteGreenBorder2,fontWeight:tokens.fontWeightRegular},data:{color:tokens.colorNeutralForeground1,fontWeight:tokens.fontWeightRegular}});function TokenText({token:eo,info:to,size:ro=UISize.normal,isLoading:no=!1}){const oo=useClasses$u(),io=typeof eo=="number"?intFormatter(eo):eo,{textSize:so,iconSize:ao,gap:lo}=useUISize(ro),co=no?jsxRuntimeExports.jsx(SkeletonItem,{style:{width:ao,height:ao}}):jsxRuntimeExports.jsx(Text$2,{size:so,className:oo.text,children:io});return jsxRuntimeExports.jsxs("div",{className:oo.wrapper,style:{gap:lo},children:[jsxRuntimeExports.jsx(NumberCircle020Regular,{style:{height:ao,width:ao}}),to?jsxRuntimeExports.jsx(Tooltip,{content:to,relationship:"description",children:co}):co]})}const useClasses$u=makeStyles({wrapper:{display:"inline-flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},text:{color:tokens.colorNeutralForeground3,fontWeight:600}}),NodeToken=({span:eo,showDetail:to=!0,size:ro})=>{const{"llm.usage.total_tokens":no,"llm.usage.prompt_tokens":oo,"llm.usage.completion_tokens":io}=eo.attributes||{};return no===void 0?null:jsxRuntimeExports.jsx(TokenText,{token:no,size:ro,info:to?jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",rowGap:6},children:[jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Total tokens",value:no}}),jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Prompt tokens",value:oo??0}}),jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Completion tokens",value:io??0}})]}):void 0})},SummaryToken=({trace:eo,showDetail:to=!0,size:ro,isLoading:no=!1})=>{const{total_tokens:oo,prompt_tokens:io,completion_tokens:so}=eo;return oo===void 0?null:jsxRuntimeExports.jsx(TokenText,{token:oo,size:ro,isLoading:no,info:to?jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",rowGap:6},children:[jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Total tokens",value:oo}}),io!==void 0&&jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Prompt tokens",value:io}}),so!==void 0&&jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Completion tokens",value:so}})]}):void 0})},getStatusTextByStatusCode=eo=>(eo==null?void 0:eo.toLowerCase())==="ok"||(eo==null?void 0:eo.toLowerCase())==="completed"?"Completed":eo||"unknown";function StatusText({statusCode:eo,showText:to=!1,size:ro,tooltipContent:no}){const oo=useClasses$t(),io=getStatusTextByStatusCode(eo),{textSize:so,iconSize:ao,gap:lo}=useUISize(ro),co=reactExports.useMemo(()=>({width:ao,height:ao}),[ao]),[uo,fo]=reactExports.useMemo(()=>{switch(eo==null?void 0:eo.toLowerCase()){case"ok":case"completed":return[jsxRuntimeExports.jsx(CheckmarkCircle20Filled,{style:co},"ok"),tokens.colorPaletteGreenForeground1];case"error":return[jsxRuntimeExports.jsx(DismissCircle20Filled,{style:co},"error"),tokens.colorPaletteRedForeground1];case"unset":return[jsxRuntimeExports.jsx(ErrorCircle20Filled,{style:co},"unset"),tokens.colorPaletteYellowForeground1];case"running":return[jsxRuntimeExports.jsx(ArrowClockwiseDashes20Filled,{className:oo.rotate,style:co},"running"),tokens.colorPaletteYellowForeground1];default:return[jsxRuntimeExports.jsx(QuestionCircle20Filled,{},"unknown"),tokens.colorPaletteYellowForeground1]}},[oo.rotate,co,eo]);return jsxRuntimeExports.jsx(Tooltip,{content:no??io??"",relationship:"label",children:jsxRuntimeExports.jsxs("div",{className:oo.wrapper,style:{color:fo,gap:to?lo:0},children:[uo,to&&jsxRuntimeExports.jsx(Text$2,{size:so,children:io})]})})}const useClasses$t=makeStyles({wrapper:{display:"inline-flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},rotate:{animationDuration:"2s",animationTimingFunction:"linear",animationIterationCount:"infinite",animationName:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}}}),useClasses$s=makeStyles({root:{display:"flex",fontSize:tokens.fontSizeBase200,marginLeft:"8px",...shorthands.gap("8px","column")}}),TraceSystemMetrics=()=>{const eo=useSelectedTrace(),to=useClasses$s();if(!eo)return null;const ro=checkStatus(eo.status,"running"),no=checkStatus(eo.status,"error");return jsxRuntimeExports.jsxs("div",{className:to.root,children:[jsxRuntimeExports.jsx(StatusText,{statusCode:eo.status,size:UISize.normal,showText:!0}),jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:eo.start_time,endTimeISOString:eo.end_time,size:UISize.normal,isLoading:ro}),!no&&jsxRuntimeExports.jsx(SummaryToken,{trace:convertToTraceListRow(eo),size:UISize.normal,isLoading:ro})]})},useClasses$r=makeStyles({title:{...shorthands.flex(1),...shorthands.padding("0"),lineHeight:"28px",fontSize:"20px",fontWeight:600},button:{fontSize:"20px",fontWeight:600,...shorthands.padding("0")},normalItem:{display:"flex",fontSize:"20px",fontWeight:600}}),TraceDetailTitle=({preTitleSlot:eo})=>{const to=useSelectedTraceTitle(),ro=useClasses$r(),no=useTraceDetailHistoryTraces(),oo=useTraceViewModel();return jsxRuntimeExports.jsxs(Breadcrumb,{className:ro.title,size:"large",children:[eo,no.length?no.map((io,so)=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(BreadcrumbItem,{children:jsxRuntimeExports.jsx(BreadcrumbButton,{className:ro.button,onClick:()=>{oo.detailNavigateTo(io,so)},children:jsxRuntimeExports.jsx("span",{children:io.name},io.trace_id)})},`${io.trace_id}-0`),jsxRuntimeExports.jsx(BreadcrumbDivider,{},`${io.trace_id}-1`)]})):null,jsxRuntimeExports.jsx(BreadcrumbItem,{children:jsxRuntimeExports.jsxs("div",{className:ro.normalItem,children:[to,jsxRuntimeExports.jsx(TraceSystemMetrics,{})]})})]})},useClasses$q=makeStyles({header:{display:"flex",width:"100%",boxSizing:"border-box",...shorthands.padding("12px","20px")},divider:{height:"100%",...shorthands.flex("none"),...shorthands.padding(0,tokens.spacingHorizontalM)},navigation:{display:"flex",alignItems:"center",...shorthands.gap(tokens.spacingHorizontalS)},navigationItem:{"@media (max-width: 1020px)":{display:"none"}},navigationItemSmall:{minWidth:"auto","@media (min-width: 1020px)":{display:"none"}},time:{display:"flex",alignItems:"center",paddingRight:tokens.spacingHorizontalL,...shorthands.flex("0 1 auto"),"@media (max-width: 1020px)":{display:"none"}},timeSmall:{display:"flex",alignItems:"center",...shorthands.flex("0 1 auto"),"@media (min-width: 1020px)":{display:"none"}}}),TraceNavigation=({showPreviousTraceArrow:eo,showNextTraceArrow:to,goToNextTrace:ro,goToPreviousTrace:no})=>{const oo=useLocStrings(),io=useClasses$q(),so=useSelectedTrace(),{hasPreviousTrace:ao,hasNextTrace:lo,goToPreviousTrace:co,goToNextTrace:uo}=useTraceNavigation(),fo=ro||uo,ho=no||co,po=eo?eo(so):ao,go=to?to(so):lo;return po||go?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:io.navigation,children:[po&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Button$2,{className:io.navigationItem,icon:jsxRuntimeExports.jsx(ArrowUp20Regular,{}),onClick:ho,appearance:"subtle",children:[oo["Previous trace"]," "]}),jsxRuntimeExports.jsx(Tooltip,{relationship:"description",content:oo["Previous trace"],children:jsxRuntimeExports.jsx(Button$2,{className:io.navigationItemSmall,icon:jsxRuntimeExports.jsx(ArrowUp20Regular,{}),onClick:ho,appearance:"subtle"})})]}),go&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Button$2,{className:io.navigationItem,icon:jsxRuntimeExports.jsx(ArrowDown20Regular,{}),onClick:fo,appearance:"subtle",children:[oo["Next trace"]," "]}),jsxRuntimeExports.jsx(Tooltip,{relationship:"description",content:oo["Next trace"],children:jsxRuntimeExports.jsx(Button$2,{className:io.navigationItemSmall,icon:jsxRuntimeExports.jsx(ArrowDown20Regular,{}),onClick:fo,appearance:"subtle"})})]})]}),jsxRuntimeExports.jsx(Divider$2,{vertical:!0,className:io.divider})]}):null},TraceDetailHeader=({setIsTraceDetailOpen:eo,showRefresh:to=!0,showGantt:ro=!1,showCopyUrl:no=!1,showStreamSwitch:oo=!1,showCloseAction:io=!0,showNavigation:so=!0,isStreaming:ao,traceNavigationProps:lo,onIsStreamingChange:co,preTitleSlot:uo})=>{const fo=useClasses$p(),ho=useLocStrings(),po=useTraceViewModel(),go=useIsGanttChartOpen(),[vo,yo]=React.useState("Copy URL"),xo=useSelectedTrace(),_o=xo!=null&&xo.start_time?timeFormat(xo.start_time):void 0;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:fo.header,children:[jsxRuntimeExports.jsx(TraceDetailTitle,{preTitleSlot:uo}),_o&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("time",{className:fo.time,children:[ho.Created_on,": ",_o]}),jsxRuntimeExports.jsx(Tooltip,{relationship:"description",content:ho.Created_on,children:jsxRuntimeExports.jsx("time",{className:fo.timeSmall,children:_o})})]}),jsxRuntimeExports.jsx(Divider$2,{vertical:!0,className:fo.divider}),so&&jsxRuntimeExports.jsx(TraceNavigation,{...lo}),oo&&ao!==void 0&&co!==void 0&&jsxRuntimeExports.jsx(StreamSwitcher,{style:{marginRight:"16px",marginTop:"4px"},isStreaming:ao,onIsStreamingChange:co}),no?jsxRuntimeExports.jsx(Tooltip,{content:ho[`${vo}`],relationship:"description",children:jsxRuntimeExports.jsx(Button$2,{appearance:"subtle","aria-label":"Copy URL",icon:jsxRuntimeExports.jsx(Share20Regular,{}),onMouseEnter:()=>{yo("Copy URL")},onClick:()=>{if(po.traceDetailCopyUrl()){yo("Copied!");return}const Eo=window.location.href;if(navigator.clipboard)navigator.clipboard.writeText(Eo),yo("Copied!");else{const So=document.createElement("textarea");So.value=Eo,document.body.appendChild(So),So.select();try{document.execCommand("copy"),yo("Copied!")}catch(ko){console.error("Fallback: Oops, unable to copy",ko),yo("Oops, unable to copy!")}document.body.removeChild(So)}}})}):null,to?jsxRuntimeExports.jsx(Tooltip,{content:ho["Refresh Data"],relationship:"description",children:jsxRuntimeExports.jsx(Button$2,{appearance:"subtle","aria-label":"Refresh",icon:jsxRuntimeExports.jsx(ArrowClockwise16Regular,{}),onClick:()=>po.refreshSpans()})}):null,ro?jsxRuntimeExports.jsx(Tooltip,{content:ho[go?"Hide Gantt":"Show Gantt"],relationship:"description",children:jsxRuntimeExports.jsx(Button$2,{style:{color:go?tokens.colorBrandForeground1:""},appearance:"subtle","aria-label":"Close",icon:jsxRuntimeExports.jsx(GanttChart20Regular,{}),onClick:()=>po.toggleIsGanttChartOpen()})}):null,io&&jsxRuntimeExports.jsx(Button$2,{appearance:"subtle","aria-label":"Close",icon:jsxRuntimeExports.jsx(Dismiss20Regular,{}),onClick:()=>eo(!1)})]}),jsxRuntimeExports.jsx(Divider$2,{})]})},useClasses$p=makeStyles({header:{display:"flex",width:"100%",boxSizing:"border-box",...shorthands.padding("12px","20px")},divider:{height:"100%",...shorthands.flex("none"),...shorthands.padding(0,tokens.spacingHorizontalM)},navigation:{display:"flex",alignItems:"center",...shorthands.gap(tokens.spacingHorizontalS)},navigationItem:{"@media (max-width: 1020px)":{display:"none"}},navigationItemSmall:{minWidth:"auto","@media (min-width: 1020px)":{display:"none"}},time:{display:"flex",alignItems:"center",paddingRight:tokens.spacingHorizontalL,...shorthands.flex("0 1 auto"),"@media (max-width: 1020px)":{display:"none"}},timeSmall:{display:"flex",alignItems:"center",...shorthands.flex("0 1 auto"),"@media (min-width: 1020px)":{display:"none"}}}),useDebugFunctions=()=>{const eo=useGetAllTraces(),to=useGetAllSpans(),ro=useSelectedTrace(),no=useSpansOfSelectedTrace();reactExports.useEffect(()=>{window.printTracesAndSpans=()=>{const oo=eo();console.log("traces",oo);const io=to();console.log("spans",io)},window.printSelectedTrace=()=>{console.log("selectedTrace",ro)},window.printSpansOfSelectedTrace=()=>{console.log("spansOfSelectedTrace",no)}},[eo,to,ro,no])},traceDetailErrorInjectionToken=createInjectionToken("traceDetailErrorInjectionToken",()=>{const eo=useLocStrings();return jsxRuntimeExports.jsx(MessageBar,{intent:"error",children:eo.Failed_to_load_trace})}),traceDetailLoadingInjectionToken=createInjectionToken("traceDetailLoadingInjectionToken",Loading),traceListErrorInjectionToken=createInjectionToken("traceListErrorInjectionToken",()=>{const eo=useLocStrings();return jsxRuntimeExports.jsx(MessageBar,{intent:"error",children:eo.Failed_to_load_traces})}),traceListLoadingInjectionToken=createInjectionToken("traceListLoadingInjectionToken",Loading),useTraceListViewStatus=()=>{const eo=useTraceViewModel();return useState(eo.traceListStatus$)},useTraceDetailViewStatus=()=>{const eo=useTraceViewModel();return useState(eo.traceDetailStatus$)},useTraceListLoadingComponent=()=>{const[eo]=useInjected(traceListLoadingInjectionToken);return eo},useTraceListErrorComponent=()=>{const[eo]=useInjected(traceListErrorInjectionToken);return eo},useTraceDetailLoadingComponent=()=>{const[eo]=useInjected(traceDetailLoadingInjectionToken);return eo},useTraceDetailErrorComponent=()=>{const[eo]=useInjected(traceDetailErrorInjectionToken);return eo},TREE_NODE_WIDTH=400,TREE_NODE_INDENT=48,TraceViewThemeContext=reactExports.createContext(!1),useIsDark=()=>reactExports.useContext(TraceViewThemeContext),sortTraceByStartTimeAsc$1=(eo,to)=>eo.start_time&&to.start_time?Date.parse(eo.start_time)-Date.parse(to.start_time):1,spansToGanttTasks=({spans:eo,parentSpanId:to})=>{const ro=new Map,no=new Set(eo.map(ao=>{var lo;return(lo=ao.context)==null?void 0:lo.span_id}).filter(ao=>!!ao)),oo=new Set;eo.forEach(ao=>{var lo,co;(lo=ao.context)!=null&&lo.span_id&&(ao.parent_id&&ao.parent_id!==to&&no.has(ao.parent_id)?ro.has(ao.parent_id)?ro.get(ao.parent_id).push(ao):ro.set(ao.parent_id,[ao]):oo.add((co=ao.context)==null?void 0:co.span_id))});const io=eo.filter(ao=>{var lo,co;return((lo=ao.context)==null?void 0:lo.span_id)&&oo.has((co=ao.context)==null?void 0:co.span_id)}).sort((ao,lo)=>Date.parse(ao.start_time??"")??0-Date.parse(lo.start_time??"")??0),so=ao=>ao.sort(sortTraceByStartTimeAsc$1).map(lo=>{var co,uo;return{startTime:Date.parse(lo.start_time??""),endTime:Date.parse(lo.end_time??""),id:((co=lo.context)==null?void 0:co.span_id)??"",name:lo.name??"",children:so(ro.get(((uo=lo.context)==null?void 0:uo.span_id)??"")??[])}});return so(io)},useStyles$j=makeStyles({grid:{height:"100%"},selectedRow:{backgroundColor:tokens.colorNeutralBackground2Selected}}),GanttView=()=>{const eo=useSpansOfSelectedTrace(),to=reactExports.useMemo(()=>new GanttViewModel,[]),ro=useSelectedSpanId(),no=useSetSelectedSpanId(),io=useIsDark()?"rdg-dark":"rdg-light",so=useStyles$j(),ao=reactExports.useRef(null);return reactExports.useEffect(()=>{to.setTasks(spansToGanttTasks({spans:eo})),to.selectedRowId$.subscribe(lo=>{lo&&lo!==ro&&no(lo)}),to.expandAllRows()},[eo.length]),reactExports.useEffect(()=>{var fo,ho;if(to.selectedRowId$.getSnapshot()===ro)return;to.selectedRowId$.next(ro);const co=[];let uo=eo.find(po=>{var go;return((go=po.context)==null?void 0:go.span_id)===ro});for(;uo;)((fo=uo.context)==null?void 0:fo.span_id)!==ro&&co.unshift(((ho=uo.context)==null?void 0:ho.span_id)??""),uo=eo.find(po=>{var go;return((go=po.context)==null?void 0:go.span_id)===(uo==null?void 0:uo.parent_id)});co.forEach(po=>{const go=to.rows$.getSnapshot().find(vo=>vo.id===po);go!=null&&go.isExpanded||to.toggleRow(po)})},[ro]),jsxRuntimeExports.jsx(Gantt,{viewModel:to,gridRef:ao,styles:{grid:mergeClasses(so.grid,io),selectedRow:so.selectedRow},getColumns:lo=>lo.map(co=>co.key==="name"?{...co,name:"span",width:180}:co.key==="duration"?{...co,name:"latency",width:60,renderHeaderCell(){return jsxRuntimeExports.jsx("div",{style:{textAlign:"right"},children:"latency"})},renderCell({row:uo}){return jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:new Date(uo.startTime).toISOString(),endTimeISOString:new Date(uo.endTime).toISOString(),size:UISize.extraSmall})}}:co)})},useNodeDetailClasses=makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%"},detailHeaderWrapper:{display:"flex",boxSizing:"border-box",width:"100%",...shorthands.padding("12px","12px",0,"12px"),flexDirection:"row",alignItems:"center",...shorthands.gap("12px")},detailHeaderTitle:{flexGrow:1,flexShrink:1,...shorthands.overflow("hidden"),whiteSpace:"nowrap",textOverflow:"ellipsis"},header:{display:"flex",height:"50px",boxSizing:"border-box",alignItems:"center",justifyContent:"flex-start",...shorthands.padding("6px","12px")},headerModalName:{color:tokens.colorNeutralForeground3,fontSize:"12px",fontWeight:600,lineHeight:"16px"},headerSpan:{marginRight:"10px"},headerTitle:{...shorthands.overflow("hidden"),textOverflow:"ellipsis",whiteSpace:"nowrap",marginRight:"4px",...shorthands.flex(0,1,"auto")},divider:{...shorthands.flex("none"),...shorthands.padding(0)},headerRight:{marginLeft:"auto",display:"flex",alignItems:"center",...shorthands.gap("12px")},tabDivider:{...shorthands.flex("none"),...shorthands.padding(0,"12px")},layout:{...shorthands.flex(1),display:"flex",flexDirection:"row",...shorthands.overflow("hidden")},layoutLeft:{...shorthands.flex(1),display:"flex",flexDirection:"column",...shorthands.overflow("hidden")},layoutRight:{height:"100%",...shorthands.overflow("hidden")},content:{...shorthands.flex(1),...shorthands.padding("12px"),...shorthands.overflow("auto")},panels:{...shorthands.padding(0,"10px"),"& th":{textAlign:"left",...shorthands.padding(0,"30px",0,0)}},cardWrapper:{backgroundColor:tokens.colorNeutralBackground3},cardTitle:{fontSize:"16px",fontWeight:600},innerCardWrapper:{...shorthands.padding("16px"),...shorthands.border("1px","solid",tokens.colorNeutralForeground1),...shorthands.borderRadius("8px")}}),useRetrievalNodeDetailClasses=makeStyles({accordionHeader:{"& button":{...shorthands.padding(0),fontWeight:600}}}),getSpanType=eo=>{var ro;const to=(ro=eo==null?void 0:eo.attributes)==null?void 0:ro.span_type;return to==null?void 0:to.split(".").pop()},useHasPromptTemplate=eo=>{const to=useSelectedSpan(),ro=reactExports.useMemo(()=>{var io;return(io=getSpanType(to))==null?void 0:io.toLocaleLowerCase()},[to]),no=useParentSpanOfSelectedSpan(),oo=reactExports.useCallback(io=>{eo(io)},[eo]);reactExports.useEffect(()=>{if(ro!=="llm"){oo(!1);return}const io=(no==null?void 0:no.attributes)||{},ao=getSpanEventsWithPayload(no,BuildInEventName["prompt.template"]).length>0||Object.prototype.hasOwnProperty.call(io,"prompt.template");oo(ao)},[ro,no,oo])},useHasLLMParameters=eo=>{const to=useSelectedSpan(),ro=reactExports.useMemo(()=>{var io;return(io=getSpanType(to))==null?void 0:io.toLocaleLowerCase()},[to]),no=useParentSpanOfSelectedSpan(),oo=reactExports.useCallback(io=>{eo(io)},[eo]);reactExports.useEffect(()=>{if(ro!=="llm"){oo(!1);return}const io=(no==null?void 0:no.attributes)||{},ao=getSpanEventsWithPayload(no,BuildInEventName["prompt.template"]).length>0||Object.prototype.hasOwnProperty.call(io,"prompt.variables");oo(ao)},[ro,no,oo])},useHasInputsOrOutput=eo=>{const to=useSelectedSpan(),ro=reactExports.useCallback(no=>{eo(no)},[eo]);reactExports.useEffect(()=>{var co;const no=(co=getSpanType(to))==null?void 0:co.toLocaleLowerCase(),oo=(to==null?void 0:to.attributes)||{},io=getSpanEventsWithPayload(to,BuildInEventName["function.inputs"]),so=getSpanEventsWithPayload(to,BuildInEventName["function.output"]),ao=io.length>0||Object.prototype.hasOwnProperty.call(oo,EventNameToAttribute[BuildInEventName["function.inputs"]]),lo=so.length>0||Object.prototype.hasOwnProperty.call(oo,EventNameToAttribute[BuildInEventName["function.output"]]);if(!no&&!ao&&!lo){ro(!1);return}ro(!0)},[to,ro])};function isObject(eo){return Object.prototype.toString.call(eo)==="[object Object]"}function objectSize(eo){return Array.isArray(eo)?eo.length:isObject(eo)?Object.keys(eo).length:0}function stringifyForCopying(eo,to){if(typeof eo=="string")return eo;try{return JSON.stringify(eo,(ro,no)=>{switch(typeof no){case"bigint":return String(no)+"n";case"number":case"boolean":case"object":case"string":return no;default:return String(no)}},to)}catch(ro){return`${ro.name}: ${ro.message}`||"JSON.stringify failed"}}function isCollapsed(eo,to,ro,no,oo,io){if(io&&io.collapsed!==void 0)return!!io.collapsed;if(typeof no=="boolean")return no;if(typeof no=="number"&&to>no)return!0;const so=objectSize(eo);if(typeof no=="function"){const ao=safeCall(no,[{node:eo,depth:to,indexOrName:ro,size:so}]);if(typeof ao=="boolean")return ao}return!!(Array.isArray(eo)&&so>oo||isObject(eo)&&so>oo)}function isCollapsed_largeArray(eo,to,ro,no,oo,io){if(io&&io.collapsed!==void 0)return!!io.collapsed;if(typeof no=="boolean")return no;if(typeof no=="number"&&to>no)return!0;const so=Math.ceil(eo.length/100);if(typeof no=="function"){const ao=safeCall(no,[{node:eo,depth:to,indexOrName:ro,size:so}]);if(typeof ao=="boolean")return ao}return!!(Array.isArray(eo)&&so>oo||isObject(eo)&&so>oo)}function ifDisplay(eo,to,ro){return typeof eo=="boolean"?eo:!!(typeof eo=="number"&&to>eo||eo==="collapsed"&&ro||eo==="expanded"&&!ro)}function safeCall(eo,to){try{return eo(...to)}catch(ro){reportError(ro)}}function editableAdd(eo){if(eo===!0||isObject(eo)&&eo.add===!0)return!0}function editableEdit(eo){if(eo===!0||isObject(eo)&&eo.edit===!0)return!0}function editableDelete(eo){if(eo===!0||isObject(eo)&&eo.delete===!0)return!0}function isReactComponent(eo){return typeof eo=="function"}function customAdd(eo){return!eo||eo.add===void 0||!!eo.add}function customEdit(eo){return!eo||eo.edit===void 0||!!eo.edit}function customDelete(eo){return!eo||eo.delete===void 0||!!eo.delete}function customCopy(eo){return!eo||eo.enableClipboard===void 0||!!eo.enableClipboard}function customMatchesURL(eo){return!eo||eo.matchesURL===void 0||!!eo.matchesURL}function resolveEvalFailedNewValue(eo,to){return eo==="string"?to.trim().replace(/^\"([\s\S]+?)\"$/,"$1"):to}var _path$8;function _extends$8(){return _extends$8=Object.assign?Object.assign.bind():function(eo){for(var to=1;to{oo.stopPropagation();const io=to(eo);typeof io=="string"&&io&&navigator.clipboard.writeText(io),no(!0),setTimeout(()=>no(!1),3e3)},className:"json-view--copy"})}function NameValue({indexOrName:eo,value:to,depth:ro,parent:no,deleteHandle:oo,editHandle:io}){return jsxRuntimeExports.jsxs("div",Object.assign({className:"json-view--pair"},{children:[jsxRuntimeExports.jsx("span",Object.assign({className:typeof eo=="number"?"json-view--index":"json-view--property"},{children:eo})),":"," ",jsxRuntimeExports.jsx(JsonNode,{node:to,depth:ro+1,deleteHandle:oo,editHandle:io,parent:no,indexOrName:eo})]}))}var _path$5,_path2$4;function _extends$5(){return _extends$5=Object.assign?Object.assign.bind():function(eo){for(var to=1;to{eo[_o]=Eo,co&&co({newValue:Eo,oldValue:So,depth:ro,src:lo,indexOrName:_o,parentType:"array"}),uo&&uo({type:"edit",depth:ro,src:lo,indexOrName:_o,parentType:"array"}),fo()},[to,co,uo,fo]),yo=_o=>{eo.splice(_o,1),fo()},xo=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!po&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>go(!0),className:"jv-size-chevron"},{children:[ifDisplay(ho,ro,po)&&jsxRuntimeExports.jsxs("span",Object.assign({className:"jv-size"},{children:[objectSize(to)," Items"]})),jsxRuntimeExports.jsx(SvgAngleDown,{className:"jv-chevron"})]})),!po&&ao&&customCopy(io)&&jsxRuntimeExports.jsx(CopyButton$1,{node:to})]});return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{children:"["}),xo,po?jsxRuntimeExports.jsxs("button",Object.assign({onClick:()=>go(!1),className:"jv-button"},{children:[so," ... ",so+to.length-1]})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:to.map((_o,Eo)=>jsxRuntimeExports.jsx(NameValue,{indexOrName:Eo+so,value:_o,depth:ro,parent:to,deleteHandle:yo,editHandle:vo},String(no)+String(Eo)))})),jsxRuntimeExports.jsx("span",{children:"]"})]})}function LargeArray({node:eo,depth:to,deleteHandle:ro,indexOrName:no,customOptions:oo}){const io=[];for(let $o=0;$o{_o(isCollapsed_largeArray(eo,to,no,so,lo,oo))},[so,lo]);const[Eo,So]=reactExports.useState(!1),ko=()=>{So(!1),ro&&ro(no),uo&&uo({value:eo,depth:to,src:fo,indexOrName:no,parentType:"array"}),go&&go({type:"delete",depth:to,src:fo,indexOrName:no,parentType:"array"})},[Ao,Co]=reactExports.useState(!1),Oo=()=>{const $o=eo;$o.push(null),ho&&ho({indexOrName:$o.length-1,depth:to,src:fo,parentType:"array"}),go&&go({type:"add",indexOrName:$o.length-1,depth:to,src:fo,parentType:"array"}),vo()},wo=Eo||Ao,Ro=()=>{So(!1),Co(!1)},Do=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!xo&&!wo&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>_o(!0),className:"jv-size-chevron"},{children:[ifDisplay(yo,to,xo)&&jsxRuntimeExports.jsxs("span",Object.assign({className:"jv-size"},{children:[eo.length," Items"]})),jsxRuntimeExports.jsx(SvgAngleDown,{className:"jv-chevron"})]})),wo&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:Ao?Oo:ko}),wo&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:Ro}),!xo&&!wo&&ao&&customCopy(oo)&&jsxRuntimeExports.jsx(CopyButton$1,{node:eo}),!xo&&!wo&&editableAdd(co)&&customAdd(oo)&&jsxRuntimeExports.jsx(SvgAddSquare,{className:"json-view--edit",onClick:()=>{Oo()}}),!xo&&!wo&&editableDelete(co)&&customDelete(oo)&&ro&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>So(!0)})]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"["}),Do,xo?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>_o(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:io.map(($o,Mo)=>jsxRuntimeExports.jsx(LargeArrayNode,{originNode:eo,node:$o,depth:to,index:Mo,startIndex:Mo*100},String(no)+String(Mo)))})),jsxRuntimeExports.jsx("span",{children:"]"}),xo&&ifDisplay(yo,to,xo)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>_o(!1),className:"jv-size"},{children:[eo.length," Items"]}))]})}function ObjectNode({node:eo,depth:to,indexOrName:ro,deleteHandle:no,customOptions:oo}){const{collapsed:io,enableClipboard:so,ignoreLargeArray:ao,collapseObjectsAfterLength:lo,editable:co,onDelete:uo,src:fo,onAdd:ho,onEdit:po,onChange:go,forceUpdate:vo,displaySize:yo}=reactExports.useContext(JsonViewContext);if(!ao&&Array.isArray(eo)&&eo.length>100)return jsxRuntimeExports.jsx(LargeArray,{node:eo,depth:to,indexOrName:ro,deleteHandle:no,customOptions:oo});const xo=isObject(eo),[_o,Eo]=reactExports.useState(isCollapsed(eo,to,ro,io,lo,oo));reactExports.useEffect(()=>{Eo(isCollapsed(eo,to,ro,io,lo,oo))},[io,lo]);const So=reactExports.useCallback((Fo,zo,qo)=>{Array.isArray(eo)?eo[+Fo]=zo:eo&&(eo[Fo]=zo),po&&po({newValue:zo,oldValue:qo,depth:to,src:fo,indexOrName:Fo,parentType:xo?"object":"array"}),go&&go({type:"edit",depth:to,src:fo,indexOrName:Fo,parentType:xo?"object":"array"}),vo()},[eo,po,go,vo]),ko=Fo=>{Array.isArray(eo)?eo.splice(+Fo,1):eo&&delete eo[Fo],vo()},[Ao,Co]=reactExports.useState(!1),Oo=()=>{Co(!1),no&&no(ro),uo&&uo({value:eo,depth:to,src:fo,indexOrName:ro,parentType:xo?"object":"array"}),go&&go({type:"delete",depth:to,src:fo,indexOrName:ro,parentType:xo?"object":"array"})},[wo,Ro]=reactExports.useState(!1),Do=reactExports.useRef(null),$o=()=>{var Fo;if(xo){const zo=(Fo=Do.current)===null||Fo===void 0?void 0:Fo.value;zo&&(eo[zo]=null,Do.current&&(Do.current.value=""),Ro(!1),ho&&ho({indexOrName:zo,depth:to,src:fo,parentType:"object"}),go&&go({type:"add",indexOrName:zo,depth:to,src:fo,parentType:"object"}))}else if(Array.isArray(eo)){const zo=eo;zo.push(null),ho&&ho({indexOrName:zo.length-1,depth:to,src:fo,parentType:"array"}),go&&go({type:"add",indexOrName:zo.length-1,depth:to,src:fo,parentType:"array"})}vo()},Mo=Fo=>{Fo.key==="Enter"?(Fo.preventDefault(),$o()):Fo.key==="Escape"&&Bo()},Po=Ao||wo,Bo=()=>{Co(!1),Ro(!1)},No=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!_o&&!Po&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>Eo(!0),className:"jv-size-chevron"},{children:[ifDisplay(yo,to,_o)&&jsxRuntimeExports.jsxs("span",Object.assign({className:"jv-size"},{children:[objectSize(eo)," Items"]})),jsxRuntimeExports.jsx(SvgAngleDown,{className:"jv-chevron"})]})),wo&&xo&&jsxRuntimeExports.jsx("input",{className:"json-view--input",placeholder:"property",ref:Do,onKeyDown:Mo}),Po&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:wo?$o:Oo}),Po&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:Bo}),!_o&&!Po&&so&&customCopy(oo)&&jsxRuntimeExports.jsx(CopyButton$1,{node:eo}),!_o&&!Po&&editableAdd(co)&&customAdd(oo)&&jsxRuntimeExports.jsx(SvgAddSquare,{className:"json-view--edit",onClick:()=>{xo?(Ro(!0),setTimeout(()=>{var Fo;return(Fo=Do.current)===null||Fo===void 0?void 0:Fo.focus()})):$o()}}),!_o&&!Po&&editableDelete(co)&&customDelete(oo)&&no&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>Co(!0)})]});return Array.isArray(eo)?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"["}),No,_o?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>Eo(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:eo.map((Fo,zo)=>jsxRuntimeExports.jsx(NameValue,{indexOrName:zo,value:Fo,depth:to,parent:eo,deleteHandle:ko,editHandle:So},String(ro)+String(zo)))})),jsxRuntimeExports.jsx("span",{children:"]"}),_o&&ifDisplay(yo,to,_o)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>Eo(!1),className:"jv-size"},{children:[objectSize(eo)," Items"]}))]}):xo?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"{"}),No,_o?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>Eo(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:Object.entries(eo).map(([Fo,zo])=>jsxRuntimeExports.jsx(NameValue,{indexOrName:Fo,value:zo,depth:to,parent:eo,deleteHandle:ko,editHandle:So},String(ro)+String(Fo)))})),jsxRuntimeExports.jsx("span",{children:"}"}),_o&&ifDisplay(yo,to,_o)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>Eo(!1),className:"jv-size"},{children:[objectSize(eo)," Items"]}))]}):null}const LongString=React.forwardRef(({str:eo,className:to,ctrlClick:ro},no)=>{let{collapseStringMode:oo,collapseStringsAfterLength:io,customizeCollapseStringUI:so}=reactExports.useContext(JsonViewContext);const[ao,lo]=reactExports.useState(!0),co=reactExports.useRef(null);io=io>0?io:0;const uo=eo.replace(/\s+/g," "),fo=typeof so=="function"?so(uo,ao):typeof so=="string"?so:"...",ho=po=>{var go;if((po.ctrlKey||po.metaKey)&&ro)ro(po);else{const vo=window.getSelection();if(vo&&vo.anchorOffset!==vo.focusOffset&&((go=vo.anchorNode)===null||go===void 0?void 0:go.parentElement)===co.current)return;lo(!ao)}};if(eo.length<=io)return jsxRuntimeExports.jsxs("span",Object.assign({ref:co,className:to,onClick:ro},{children:['"',eo,'"']}));if(oo==="address")return eo.length<=10?jsxRuntimeExports.jsxs("span",Object.assign({ref:co,className:to,onClick:ro},{children:['"',eo,'"']})):jsxRuntimeExports.jsxs("span",Object.assign({ref:co,onClick:ho,className:to+" cursor-pointer"},{children:['"',ao?[uo.slice(0,6),fo,uo.slice(-4)]:eo,'"']}));if(oo==="directly")return jsxRuntimeExports.jsxs("span",Object.assign({ref:co,onClick:ho,className:to+" cursor-pointer"},{children:['"',ao?[uo.slice(0,io),fo]:eo,'"']}));if(oo==="word"){let po=io,go=io+1,vo=uo,yo=1;for(;;){if(/\W/.test(eo[po])){vo=eo.slice(0,po);break}if(/\W/.test(eo[go])){vo=eo.slice(0,go);break}if(yo===6){vo=eo.slice(0,io);break}yo++,po--,go++}return jsxRuntimeExports.jsxs("span",Object.assign({ref:co,onClick:ho,className:to+" cursor-pointer"},{children:['"',ao?[vo,fo]:eo,'"']}))}return jsxRuntimeExports.jsxs("span",Object.assign({ref:co,className:to},{children:['"',eo,'"']}))});var _path$1;function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(eo){for(var to=1;to{setEditing(!0),setTimeout(()=>{var eo,to;(eo=window.getSelection())===null||eo===void 0||eo.selectAllChildren(valueRef.current),(to=valueRef.current)===null||to===void 0||to.focus()})},done=reactExports.useCallback(()=>{let newValue=valueRef.current.innerText;try{(newValue==="{}"||newValue==="[]")&&(newValue=`(${newValue})`);const evalValue=eval(newValue);editHandle&&editHandle(indexOrName,evalValue,node)}catch(eo){const to=resolveEvalFailedNewValue(type,newValue);editHandle&&editHandle(indexOrName,to,node)}setEditing(!1)},[editHandle]),cancel=()=>{setEditing(!1),setDeleting(!1)},deleteHandle=()=>{setDeleting(!1),_deleteHandle&&_deleteHandle(indexOrName),onDelete&&onDelete({value:node,depth,src,indexOrName,parentType:Array.isArray(parent)?"array":"object"}),onChange&&onChange({depth,src,indexOrName,parentType:Array.isArray(parent)?"array":"object",type:"delete"})},handleKeyDown=reactExports.useCallback(eo=>{eo.key==="Enter"?(eo.preventDefault(),done()):eo.key==="Escape"&&cancel()},[done]),isEditing=editing||deleting,ctrlClick=!isEditing&&editableEdit(editable)&&customEdit(customReturn)&&editHandle?eo=>{(eo.ctrlKey||eo.metaKey)&&edit()}:void 0,Icons=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[isEditing&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:deleting?deleteHandle:done}),isEditing&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:cancel}),!isEditing&&enableClipboard&&customCopy(customReturn)&&jsxRuntimeExports.jsx(CopyButton$1,{node}),!isEditing&&matchesURL&&type==="string"&&urlRegExp.test(node)&&customMatchesURL(customReturn)&&jsxRuntimeExports.jsx("a",Object.assign({href:node,target:"_blank",className:"json-view--link"},{children:jsxRuntimeExports.jsx(SvgLink,{})})),!isEditing&&editableEdit(editable)&&customEdit(customReturn)&&editHandle&&jsxRuntimeExports.jsx(SvgEdit,{className:"json-view--edit",onClick:edit}),!isEditing&&editableDelete(editable)&&customDelete(customReturn)&&_deleteHandle&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>setDeleting(!0)})]});let className="json-view--string";switch(typeof(customReturn==null?void 0:customReturn.className)=="string"&&(className+=" "+customReturn.className),type){case"number":case"bigint":className="json-view--number";break;case"boolean":className="json-view--boolean";break;case"object":className="json-view--null";break}deleting&&(className+=" json-view--deleting");let displayValue=String(node);type==="bigint"&&(displayValue+="n");const EditingElement=reactExports.useMemo(()=>jsxRuntimeExports.jsx("span",{contentEditable:!0,className,dangerouslySetInnerHTML:{__html:type==="string"?`"${displayValue}"`:displayValue},ref:valueRef,onKeyDown:handleKeyDown}),[displayValue,type,handleKeyDown]);return type==="string"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[editing?EditingElement:node.length>collapseStringsAfterLength?jsxRuntimeExports.jsx(LongString,{str:node,ref:valueRef,className,ctrlClick}):jsxRuntimeExports.jsxs("span",Object.assign({className,onClick:ctrlClick},{children:['"',displayValue,'"']})),Icons]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[editing?EditingElement:jsxRuntimeExports.jsx("span",Object.assign({className,onClick:ctrlClick},{children:displayValue})),Icons]})}}const defaultURLRegExp=/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,JsonViewContext=reactExports.createContext({src:void 0,collapseStringsAfterLength:99,collapseStringMode:"directly",customizeCollapseStringUI:void 0,collapseObjectsAfterLength:20,collapsed:!1,enableClipboard:!0,editable:!1,onEdit:void 0,onDelete:void 0,onAdd:void 0,onChange:void 0,forceUpdate:()=>{},customizeNode:void 0,customizeCopy:()=>{},displaySize:void 0,matchesURL:!1,urlRegExp:defaultURLRegExp,ignoreLargeArray:!1});function JsonView({src:eo,collapseStringsAfterLength:to=99,collapseStringMode:ro="directly",customizeCollapseStringUI:no,collapseObjectsAfterLength:oo=99,collapsed:io,enableClipboard:so=!0,editable:ao=!1,onEdit:lo,onDelete:co,onAdd:uo,onChange:fo,dark:ho=!1,theme:po="default",customizeNode:go,customizeCopy:vo=stringifyForCopying,displaySize:yo,style:xo,className:_o,matchesURL:Eo=!1,urlRegExp:So=defaultURLRegExp,ignoreLargeArray:ko=!1}){const[Ao,Co]=reactExports.useState(0),Oo=reactExports.useCallback(()=>Co(Do=>++Do),[]),[wo,Ro]=reactExports.useState(eo);return reactExports.useEffect(()=>Ro(eo),[eo]),jsxRuntimeExports.jsx(JsonViewContext.Provider,Object.assign({value:{src:wo,collapseStringsAfterLength:to,collapseStringMode:ro,customizeCollapseStringUI:no,collapseObjectsAfterLength:oo,collapsed:io,enableClipboard:so,editable:ao,onEdit:lo,onDelete:co,onAdd:uo,onChange:fo,forceUpdate:Oo,customizeNode:go,customizeCopy:vo,displaySize:yo,matchesURL:Eo,urlRegExp:So,ignoreLargeArray:ko}},{children:jsxRuntimeExports.jsx("code",Object.assign({className:"json-view"+(ho?" dark":"")+(po&&po!=="default"?" json-view_"+po:"")+(_o?" "+_o:""),style:xo},{children:jsxRuntimeExports.jsx(JsonNode,{node:wo,depth:1,editHandle:(Do,$o,Mo)=>{Ro($o),lo&&lo({newValue:$o,oldValue:Mo,depth:1,src:wo,indexOrName:Do,parentType:null}),fo&&fo({type:"edit",depth:1,src:wo,indexOrName:Do,parentType:null})},deleteHandle:()=>{Ro(void 0),co&&co({value:wo,depth:1,src:wo,indexOrName:"",parentType:null}),fo&&fo({depth:1,src:wo,indexOrName:"",parentType:null,type:"delete"})}})}))}))}const ImageViewer=({src:eo,width:to=100,height:ro=100,enablePopUpImageViewer:no=!0})=>{const[oo,io]=reactExports.useState(!1),so=useClasses$o(),[ao,lo]=reactExports.useState(!1),co=eo.startsWith('"')&&eo.endsWith('"')?eo.slice(1,-1):eo,uo=()=>{io(!0)},fo=()=>{io(!1)},ho=()=>{no&&lo(!0)},po=()=>{io(!1),lo(!1)};return jsxRuntimeExports.jsxs("div",{className:so.container,style:{maxWidth:`${to}px`,maxHeight:`${ro}px`},onMouseEnter:no?uo:void 0,onMouseLeave:no?fo:void 0,children:[jsxRuntimeExports.jsx(Image$2,{src:co,className:so.image,onClick:ho,fit:"contain",alt:"image"}),no&&jsxRuntimeExports.jsxs(Dialog,{open:ao,children:[jsxRuntimeExports.jsx(DialogTrigger,{disableButtonEnhancement:!0,children:jsxRuntimeExports.jsx(Button$2,{className:so.button,onClick:ho,size:"small",style:{display:oo?"block":"none"},children:"View"})}),jsxRuntimeExports.jsx(DialogSurface,{children:jsxRuntimeExports.jsxs(DialogBody,{children:[jsxRuntimeExports.jsx(DialogTitle,{children:"Image Viewer"}),jsxRuntimeExports.jsx(DialogContent,{children:jsxRuntimeExports.jsx(Image$2,{src:co,className:so.image,onClick:ho,fit:"contain",alt:"image"})}),jsxRuntimeExports.jsx(DialogActions,{children:jsxRuntimeExports.jsx(Button$2,{appearance:"secondary",onClick:po,children:"Close"})})]})})]})]})},useClasses$o=makeStyles({container:{position:"relative",display:"inline-block"},image:{cursor:"pointer",maxWidth:"100%",maxHeight:"calc(100% - 20px)"},button:{position:"absolute",top:"50%",left:"50%",cursor:"pointer",transform:"translate(-50%, -50%)"}}),JsonViewer=eo=>{const{src:to,disableCustomCollapse:ro,customizeNode:no,enablePopUpImageViewer:oo,...io}=eo,[so,ao]=React.useState(to);React.useEffect(()=>{if(typeof to=="string")try{const co=JSON.parse(to);ao(co)}catch{if(isJsonl(to)){const uo=safelyParseJsonLines(to);ao(uo)}else ao(to)}},[to]);const lo=co=>{const{node:uo}=co,fo=no&&no(co);if(fo)return fo;if(isImageValue(uo))return jsxRuntimeExports.jsx(ImageViewer,{src:uo,enablePopUpImageViewer:oo})};return jsxRuntimeExports.jsx(JsonView,{src:so,customizeCollapseStringUI:ro?void 0:()=>jsxRuntimeExports.jsx(ExpandButton,{}),customizeNode:lo,...io})},isImageValue=eo=>!!(typeof eo=="string"&&(eo.startsWith("data:image/")||eo.startsWith('"data:image/'))),ExpandButton=()=>{const eo=useClasses$n();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["...",jsxRuntimeExports.jsxs("div",{className:eo.btn,children:[jsxRuntimeExports.jsx(ChevronDown16Regular,{className:eo.icon}),jsxRuntimeExports.jsx("span",{className:eo.text,children:"view all"})]})]})},useClasses$n=makeStyles({btn:{display:"inline-flex",pointer:"cursor",alignItems:"center",...shorthands.padding(0),paddingLeft:"4px",...shorthands.margin(0),fontWeight:400,color:"#A3BEE9"},icon:{height:"12px",width:"12px",...shorthands.padding(0),...shorthands.margin(0)},text:{fontSize:"12px",...shorthands.padding(0),...shorthands.margin(0)}}),JsonNodeCard=({title:eo,src:to,wrapperStyle:ro={},status:no=ViewStatus.loaded,errorTip:oo=null,jsonViewerProps:io={}})=>{let so="";if(typeof to=="string")try{so=JSON.parse(to)}catch{so=to}else typeof to=="object"&&(so=to);const ao=useIsDark();return jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12,...ro},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:eo})})}),no===ViewStatus.loading&&jsxRuntimeExports.jsx(Spinner,{size:"tiny"}),no===ViewStatus.loaded&&jsxRuntimeExports.jsx(JsonViewer,{src:so,theme:"vscode",dark:ao,collapseStringsAfterLength:300,...io}),no===ViewStatus.error&&oo]})},DefaultNodeInfo=()=>{var go,vo,yo,xo;const eo=useSelectedSpan(),to=(go=getSpanType(eo))==null?void 0:go.toLocaleLowerCase(),ro=useLocStrings(),[no,oo]=reactExports.useState(ViewStatus.loading),[io,so]=reactExports.useState(ViewStatus.loading),ao=getSpanEventsWithPayload(eo,BuildInEventName["function.inputs"]),lo=getSpanEventsWithPayload(eo,BuildInEventName["llm.generated_message"]),co=useLoadSpanEvents(eo,BuildInEventName["function.inputs"]),uo=useLoadSpanEvents(eo,BuildInEventName["llm.generated_message"]);let fo=getSpanEventsWithPayload(eo,BuildInEventName["function.output"]),ho=useLoadSpanEvents(eo,BuildInEventName["function.output"]);to==="llm"&&lo.length>0&&(fo=lo,ho=uo);let po=(vo=eo==null?void 0:eo.attributes)==null?void 0:vo.output;return to==="llm"&&(po=po??((yo=eo==null?void 0:eo.attributes)==null?void 0:yo["llm.generated_message"])),reactExports.useEffect(()=>{oo(ViewStatus.loading),co({onCompleted:_o=>{oo(_o?ViewStatus.error:ViewStatus.loaded)}}),so(ViewStatus.loading),ho({onCompleted:_o=>{so(_o?ViewStatus.error:ViewStatus.loaded)}})},[co,ho]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ao.length>0?jsxRuntimeExports.jsx(JsonNodeCard,{title:ro.Input,status:no,src:ao.length===1?ao[0].attributes:ao,errorTip:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{oo(ViewStatus.loading),co({onCompleted:_o=>{oo(_o?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})}):jsxRuntimeExports.jsx(JsonNodeCard,{title:ro.Input,src:(xo=eo==null?void 0:eo.attributes)==null?void 0:xo.inputs}),fo.length>0?jsxRuntimeExports.jsx(JsonNodeCard,{title:ro.Output,status:io,src:fo.length===1?fo[0].attributes:fo,errorTip:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{so(ViewStatus.loading),ho({onCompleted:_o=>{so(_o?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})}):jsxRuntimeExports.jsx(JsonNodeCard,{title:ro.Output,src:po})]})},DefaultNodeLoadError=({onRetry:eo})=>{const to=useLocStrings();return jsxRuntimeExports.jsx(Button$2,{appearance:"transparent",icon:jsxRuntimeExports.jsx(ErrorCircle16Filled,{style:{color:tokens.colorStatusDangerForeground1}}),style:{fontWeight:400},onClick:eo,children:to["Failed to load, click to try again"]})},CollapsibleTextArea=({children:eo})=>{const[to,ro]=reactExports.useState(!0),no=useClasses$m();return jsxRuntimeExports.jsxs("div",{className:no.wrapper,children:[jsxRuntimeExports.jsx(Button$2,{icon:to?jsxRuntimeExports.jsx(TextWrapOff16Regular,{}):jsxRuntimeExports.jsx(TextWrap16Regular,{}),onClick:()=>ro(!to),size:"small"}),jsxRuntimeExports.jsx("pre",{className:`${to&&no.wrap} ${no.pre}`,children:eo})]})},useClasses$m=makeStyles({wrapper:{width:"95%",height:"100%",paddingLeft:tokens.spacingHorizontalM,color:tokens.colorNeutralForeground1,display:"flex",flexDirection:"column"},wrap:{wordBreak:"break-all",whiteSpace:"pre-wrap"},pre:{marginTop:0}}),ErrorsTab=()=>{var lo;const eo=useClasses$l(),to=useSelectedSpan(),ro=((lo=to==null?void 0:to.events)==null?void 0:lo.filter(co=>co.name===BuildInEventName.exception))??[],no=useIsDark(),oo=useLocStrings(),[io,so]=reactExports.useState(ViewStatus.loading),ao=useLoadSpanEvents(to,BuildInEventName.exception);return reactExports.useEffect(()=>{so(ViewStatus.loading),ao({onCompleted:co=>{so(co?ViewStatus.error:ViewStatus.loaded)}})},[ao]),ro.length===0?jsxRuntimeExports.jsxs("div",{className:eo.emptyWrapper,children:[jsxRuntimeExports.jsx(ShieldCheckmark24Regular,{}),jsxRuntimeExports.jsxs(Text$2,{className:eo.emptyText,children:[" ",oo.No_Exception_Found]})]}):io===ViewStatus.loading?jsxRuntimeExports.jsx("div",{className:eo.emptyWrapper,children:jsxRuntimeExports.jsx(Spinner,{size:"tiny"})}):io===ViewStatus.error?jsxRuntimeExports.jsx("div",{className:eo.emptyWrapper,children:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{so(ViewStatus.loading),ao({onCompleted:co=>{so(co?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ro.map((co,uo)=>jsxRuntimeExports.jsx(Card,{className:eo.wrapper,children:jsxRuntimeExports.jsx(JsonViewer,{src:co,collapseStringsAfterLength:1e4,theme:"vscode",dark:no,customizeNode:({node:fo,indexOrName:ho})=>{if(ho==="exception.message"||ho==="exception.stacktrace")return jsxRuntimeExports.jsx(CollapsibleTextArea,{children:fo})}})},uo))})},useClasses$l=makeStyles({wrapper:{marginBottom:tokens.spacingVerticalM},emptyWrapper:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%"},emptyText:{paddingTop:tokens.spacingVerticalM}}),isElementOverflow=eo=>eo.scrollHeight>eo.clientHeight||eo.scrollWidth>eo.clientWidth,NodeEvalOutput=()=>{const eo=useClasses$k(),to=useLocStrings(),ro=useSelectedTrace(),no=reactExports.useMemo(()=>{const oo=(ro==null?void 0:ro.evaluations)??{};return Object.values(oo).sort((io,so)=>io.start_time&&so.start_time?new Date(io.start_time).getTime()>new Date(so.start_time).getTime()?-1:1:0)},[ro]);return jsxRuntimeExports.jsxs("div",{className:eo.wrapper,children:[jsxRuntimeExports.jsx("div",{className:eo.title,children:to.Evaluation_output}),jsxRuntimeExports.jsx("div",{className:eo.content,children:no.map((oo,io)=>jsxRuntimeExports.jsx(EvalOutputItem,{trace:oo},`${oo.name}_${io}`))})]})},EvalOutputItem=({trace:eo})=>{const to=useClasses$k(),ro=useLocStrings(),[no,oo]=reactExports.useState(!1),io=useTraceViewModel(),so=checkStatus(eo.status,"error");return jsxRuntimeExports.jsxs("div",{className:mergeClasses(to.item,no?to.itemHover:""),onMouseEnter:()=>{oo(!0)},onMouseLeave:()=>{oo(!1)},onClick:()=>{io.detailNavigateTo(eo)},children:[jsxRuntimeExports.jsx("div",{className:to.itemTitle,children:eo.name}),eo.start_time?jsxRuntimeExports.jsxs("div",{className:to.itemTime,children:[jsxRuntimeExports.jsx(Clock12Regular,{}),jsxRuntimeExports.jsxs("span",{children:[ro.Created_on,": ",timeFormat(eo.start_time)]})]}):null,so?jsxRuntimeExports.jsxs("div",{className:to.itemError,children:[jsxRuntimeExports.jsx(DismissCircle12Filled,{className:to.errorColor}),jsxRuntimeExports.jsx("span",{children:ro["Evaluation run failed"]})]}):jsxRuntimeExports.jsx("div",{className:to.itemContent,children:eo.outputs!==null&&typeof eo.outputs=="object"&&Object.entries(eo.outputs).map(([ao,lo])=>jsxRuntimeExports.jsx(EvalOutputItemMetric,{k:ao,v:lo,setIsHover:oo},ao))})]})},EvalOutputItemMetric=({k:eo,v:to,setIsHover:ro})=>{const no=useClasses$k(),oo=reactExports.useRef(null),[io,so]=reactExports.useState(!1),ao=jsxRuntimeExports.jsxs("div",{ref:oo,className:no.itemMetric,onMouseEnter:()=>{ro(!1)},onMouseLeave:()=>{ro(!0)},onClick:lo=>(lo.preventDefault(),lo.stopPropagation(),!1),children:[eo,": ",to]});return reactExports.useEffect(()=>{const lo=oo.current?isElementOverflow(oo.current):!1;so(lo)},[]),io?jsxRuntimeExports.jsx(Tooltip,{content:jsxRuntimeExports.jsxs("div",{children:[eo,":",jsxRuntimeExports.jsx("br",{}),to]}),relationship:"description",positioning:"below",children:ao}):ao},useClasses$k=makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%"},title:{height:"52px",boxSizing:"border-box",...shorthands.padding("16px"),fontSize:"14px",fontWeight:600},content:{...shorthands.flex(1),...shorthands.overflow("auto"),...shorthands.padding("0","16px")},item:{position:"relative",width:"200px",...shorthands.border("1px","solid",tokens.colorNeutralStroke2),...shorthands.borderRadius("4px"),marginBottom:"16px",...shorthands.padding("12px"),fontSize:"12px",cursor:"pointer"},itemHover:{backgroundColor:tokens.colorNeutralBackground1Hover},itemTitle:{height:"16px",lineHeight:"16px",color:tokens.colorNeutralForeground2},itemTime:{display:"flex",alignItems:"center",...shorthands.gap("4px"),marginTop:"8px","& span":{color:tokens.colorNeutralForeground2}},itemError:{display:"flex",alignItems:"center",...shorthands.gap("4px"),marginTop:"8px","& span":{color:tokens.colorNeutralForeground2,fontWeight:600}},itemContent:{...shorthands.overflow("hidden"),marginLeft:"-8px"},itemMetric:{float:"left",width:"fit-content",maxWidth:"100%",marginTop:"8px",marginLeft:"8px",...shorthands.padding("2px","8px"),display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",textOverflow:"ellipsis",wordBreak:"break-all",...shorthands.overflow("hidden"),...shorthands.border("1px","solid",tokens.colorNeutralStroke1),...shorthands.borderRadius("4px"),backgroundColor:tokens.colorNeutralBackground1},errorColor:{color:tokens.colorPaletteRedForeground1}}),NodeRawCard=()=>{const eo=useSelectedSpan(),to=useSpanEventsLoadStatus(),ro=useIsLazyLoadSpan(),no=useLocStrings(),[,oo]=reactExports.useReducer(fo=>fo+1,0),io=!!(eo!=null&&eo.span_json_uri),[so,ao]=reactExports.useState(ViewStatus.loading),[lo,co]=reactExports.useState(void 0),uo=useFetchSpanRawJson(eo);return reactExports.useEffect(()=>{if(!io){ao(ViewStatus.loaded);return}ao(ViewStatus.loading),uo({onCompleted:(fo,ho)=>{if(fo){ao(ViewStatus.error);return}co(ho),ao(ViewStatus.loaded)}})},[io,uo]),jsxRuntimeExports.jsx(JsonNodeCard,{title:no.Raw_JSON,src:io?lo:eo,status:so,errorTip:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{ao(ViewStatus.loading),uo({onCompleted:(fo,ho)=>{if(fo){ao(ViewStatus.error);return}ao(ViewStatus.loaded),co(ho)}})}}),jsonViewerProps:{customizeNode:({depth:fo,indexOrName:ho,node:po})=>{var vo,yo;if(io)return;if(fo===3&&typeof ho=="number"&&typeof po.name=="string"&&typeof po.timestamp=="string"&&typeof po.attributes=="object"){const xo=`${(vo=eo==null?void 0:eo.context)==null?void 0:vo.span_id}__${(yo=eo==null?void 0:eo.external_event_data_uris)==null?void 0:yo[ho]}`;return!ro||to.get(xo)==="success"?void 0:jsxRuntimeExports.jsx(NodeEventItem,{name:po.name,index:ho,timestamp:po.timestamp,forceUpdate:oo})}}}})},NodeEventItem=({index:eo,name:to,timestamp:ro,forceUpdate:no})=>{const oo=useSelectedSpan(),io=useLocStrings(),so=useLoadSpanEvents(oo,to,eo),[ao,lo]=reactExports.useState(ViewStatus.hidden);if(ao===ViewStatus.loaded)return no(),null;let co=io.load_all;return ao===ViewStatus.loading?co=io.loading:ao===ViewStatus.error&&(co=io["Failed to load, click to try again"]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"{"}),jsxRuntimeExports.jsxs("div",{style:{paddingLeft:"1em"},children:[jsxRuntimeExports.jsx("span",{style:{color:"var(--json-property)"},children:"name:"}),jsxRuntimeExports.jsx("span",{style:{color:"var(--json-string)"},children:` "${to}",`})]}),jsxRuntimeExports.jsxs("div",{style:{paddingLeft:"1em"},children:[jsxRuntimeExports.jsx("span",{style:{color:"var(--json-property)"},children:"timestamp:"}),jsxRuntimeExports.jsx("span",{style:{color:"var(--json-string)"},children:` "${ro}",`})]}),jsxRuntimeExports.jsx("div",{style:{paddingLeft:"1em"},children:jsxRuntimeExports.jsxs(Button$2,{size:"small",appearance:"transparent",style:{padding:0,color:"rgb(163, 190, 233)",justifyContent:"flex-start"},onClick:()=>{lo(ViewStatus.loading),so({onCompleted:uo=>{lo(uo?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})},children:["... ",co]})}),jsxRuntimeExports.jsx("span",{children:"}"})]})},GeneralErrorBar=({title:eo,message:to,onClick:ro})=>{const no=useClasses$j();return jsxRuntimeExports.jsx(MessageBar,{intent:"error",onClick:ro,className:no.bar,children:jsxRuntimeExports.jsxs(MessageBarBody,{className:no.body,children:[jsxRuntimeExports.jsxs(MessageBarTitle,{children:[" ",eo]}),to&&jsxRuntimeExports.jsx(Tooltip,{content:to||"",relationship:"description",children:jsxRuntimeExports.jsxs("span",{className:no.text,children:[" ",to]})})]})})},useClasses$j=makeStyles({bar:{cursor:"pointer",display:"flex",justifyContent:"start",itemAlign:"center",...shorthands.margin("8px","8px",0,"8px"),...shorthands.padding("8px")},body:{display:"flex",...shorthands.flex(0,1,"auto"),...shorthands.overflow("hidden")},text:{...shorthands.flex(0,1,"auto"),...shorthands.overflow("hidden"),whiteSpace:"nowrap",textOverflow:"ellipsis",paddingLeft:"6px"}}),SpanDetailErrorMessageBar=({setSelectedTab:eo})=>{var no,oo;const to=useSelectedSpan(),ro=useLocStrings();return((oo=(no=to==null?void 0:to.status)==null?void 0:no.status_code)==null?void 0:oo.toLowerCase())==="error"?jsxRuntimeExports.jsx(GeneralErrorBar,{title:ro.Error,message:to.status.description,onClick:()=>{eo("error")}}):null},OverflowMenuItem=eo=>{const{tab:to,onClick:ro}=eo;return useIsOverflowItemVisible(to.key)?null:jsxRuntimeExports.jsx(MenuItem,{onClick:ro,children:jsxRuntimeExports.jsxs("div",{children:[to.name,to.icon&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[" ",to.icon]})]})},to.key)},useOverflowMenuStyles=makeStyles({menu:{backgroundColor:tokens.colorNeutralBackground1},menuButton:{alignSelf:"center"}}),MoreHorizontal=bundleIcon$1(MoreHorizontalFilled,MoreHorizontalRegular),OverflowMenu=eo=>{const{onTabSelect:to,tabs:ro}=eo,{ref:no,isOverflowing:oo,overflowCount:io}=useOverflowMenu(),so=useOverflowMenuStyles(),ao=lo=>{to==null||to(lo)};return oo?jsxRuntimeExports.jsxs(Menu,{hasIcons:!0,children:[jsxRuntimeExports.jsx(MenuTrigger,{disableButtonEnhancement:!0,children:jsxRuntimeExports.jsx(Button$2,{appearance:"transparent",className:so.menuButton,ref:no,icon:jsxRuntimeExports.jsx(MoreHorizontal,{}),"aria-label":`${io} more tabs`,role:"tab"})}),jsxRuntimeExports.jsx(MenuPopover,{children:jsxRuntimeExports.jsx(MenuList,{className:so.menu,children:ro.map(lo=>jsxRuntimeExports.jsx(OverflowMenuItem,{tab:lo,onClick:()=>ao(lo.key)},lo.key))})})]}):null},SpanDetailTabs=({tabs:eo,selectedTab:to,setSelectedTab:ro})=>jsxRuntimeExports.jsx(Overflow,{minimumVisible:1,children:jsxRuntimeExports.jsxs(TabList,{selectedValue:to,onTabSelect:(no,oo)=>{ro(oo.value)},children:[eo.map(no=>jsxRuntimeExports.jsx(OverflowItem,{id:no.key,priority:no.key===to?2:1,children:jsxRuntimeExports.jsxs(Tab$1,{value:no.key,children:[no.name,no.icon&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[" ",no.icon]})]})},no.key)),jsxRuntimeExports.jsx(OverflowMenu,{onTabSelect:ro,tabs:eo})]})}),DefaultSpanDetailContent=({showEvaluationPanel:eo,showLogs:to,renderLogsPivot:ro})=>{var vo;const no=useSelectedSpan(),oo=useSelectedTrace(),[io,so]=reactExports.useState("input_output"),ao=useNodeDetailClasses(),lo=useLocStrings(),co=(vo=no==null?void 0:no.events)==null?void 0:vo.filter(yo=>yo.name===BuildInEventName.exception),uo=(co==null?void 0:co.length)??0,[fo,ho]=reactExports.useState(!1);useHasInputsOrOutput(yo=>{ho(yo),yo||so("raw")});const po=[...fo?[{key:"input_output",name:lo["Input_&_Output"]}]:[],{key:"raw",name:lo.Raw_JSON},{key:"error",name:lo.Exception,icon:jsxRuntimeExports.jsx(CounterBadge,{appearance:"filled",color:uo>0?"danger":"informative",count:uo,size:"small",showZero:!0})}],go=to&&no&&oo&&(ro==null?void 0:ro({currentSpan:no,currentTrace:oo}));return go&&po.push({key:"logs",name:lo.Logs}),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:ao.layoutLeft,children:[jsxRuntimeExports.jsx(SpanDetailTabs,{tabs:po,selectedTab:io,setSelectedTab:so}),jsxRuntimeExports.jsx(SpanDetailErrorMessageBar,{setSelectedTab:so}),jsxRuntimeExports.jsxs("div",{className:ao.content,children:[io==="input_output"&&jsxRuntimeExports.jsx(DefaultNodeInfo,{}),io==="raw"&&jsxRuntimeExports.jsx(NodeRawCard,{}),io==="error"&&jsxRuntimeExports.jsx(ErrorsTab,{}),io==="logs"&&go]})]}),eo&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$2,{vertical:!0,className:ao.divider}),jsxRuntimeExports.jsx("div",{className:ao.layoutRight,children:jsxRuntimeExports.jsx(NodeEvalOutput,{})})]})]})},BlockquoteType="blockquote",BreakType="break",CodeType="code",DefinitionType="definition",DeleteType="delete",EmphasisType="emphasis",HeadingType="heading",HtmlType="html";var HtmlContentType;(function(eo){eo.CDATA="cdata",eo.Closing="closing",eo.Comment="comment",eo.Declaration="declaration",eo.Instruction="instruction",eo.Open="open"})(HtmlContentType||(HtmlContentType={}));const ImageReferenceType="imageReference",ImageType$1="image",InlineCodeType="inlineCode",LinkReferenceType="linkReference",LinkType="link",ListItemType="listItem";var TaskStatus;(function(eo){eo.TODO="todo",eo.DOING="doing",eo.DONE="done"})(TaskStatus||(TaskStatus={}));const ListType="list",ParagraphType$1="paragraph",StrongType="strong",TableCellType="tableCell",TableRowType="tableRow",TableType="table",TextType$1="text",ThematicBreakType="thematicBreak";var AsciiCodePoint;(function(eo){eo[eo.NUL=0]="NUL",eo[eo.SOH=1]="SOH",eo[eo.STX=2]="STX",eo[eo.ETX=3]="ETX",eo[eo.EOT=4]="EOT",eo[eo.ENQ=5]="ENQ",eo[eo.ACK=6]="ACK",eo[eo.BEL=7]="BEL",eo[eo.BS=8]="BS",eo[eo.HT=9]="HT",eo[eo.LF=10]="LF",eo[eo.VT=11]="VT",eo[eo.FF=12]="FF",eo[eo.CR=13]="CR",eo[eo.SO=14]="SO",eo[eo.SI=15]="SI",eo[eo.DLE=16]="DLE",eo[eo.DC1=17]="DC1",eo[eo.DC2=18]="DC2",eo[eo.DC3=19]="DC3",eo[eo.DC4=20]="DC4",eo[eo.NAK=21]="NAK",eo[eo.SYN=22]="SYN",eo[eo.ETB=23]="ETB",eo[eo.CAN=24]="CAN",eo[eo.EM=25]="EM",eo[eo.SUB=26]="SUB",eo[eo.ESC=27]="ESC",eo[eo.FS=28]="FS",eo[eo.GS=29]="GS",eo[eo.RS=30]="RS",eo[eo.US=31]="US",eo[eo.SPACE=32]="SPACE",eo[eo.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",eo[eo.DOUBLE_QUOTE=34]="DOUBLE_QUOTE",eo[eo.NUMBER_SIGN=35]="NUMBER_SIGN",eo[eo.DOLLAR_SIGN=36]="DOLLAR_SIGN",eo[eo.PERCENT_SIGN=37]="PERCENT_SIGN",eo[eo.AMPERSAND=38]="AMPERSAND",eo[eo.SINGLE_QUOTE=39]="SINGLE_QUOTE",eo[eo.OPEN_PARENTHESIS=40]="OPEN_PARENTHESIS",eo[eo.CLOSE_PARENTHESIS=41]="CLOSE_PARENTHESIS",eo[eo.ASTERISK=42]="ASTERISK",eo[eo.PLUS_SIGN=43]="PLUS_SIGN",eo[eo.COMMA=44]="COMMA",eo[eo.MINUS_SIGN=45]="MINUS_SIGN",eo[eo.DOT=46]="DOT",eo[eo.SLASH=47]="SLASH",eo[eo.DIGIT0=48]="DIGIT0",eo[eo.DIGIT1=49]="DIGIT1",eo[eo.DIGIT2=50]="DIGIT2",eo[eo.DIGIT3=51]="DIGIT3",eo[eo.DIGIT4=52]="DIGIT4",eo[eo.DIGIT5=53]="DIGIT5",eo[eo.DIGIT6=54]="DIGIT6",eo[eo.DIGIT7=55]="DIGIT7",eo[eo.DIGIT8=56]="DIGIT8",eo[eo.DIGIT9=57]="DIGIT9",eo[eo.COLON=58]="COLON",eo[eo.SEMICOLON=59]="SEMICOLON",eo[eo.OPEN_ANGLE=60]="OPEN_ANGLE",eo[eo.EQUALS_SIGN=61]="EQUALS_SIGN",eo[eo.CLOSE_ANGLE=62]="CLOSE_ANGLE",eo[eo.QUESTION_MARK=63]="QUESTION_MARK",eo[eo.AT_SIGN=64]="AT_SIGN",eo[eo.UPPERCASE_A=65]="UPPERCASE_A",eo[eo.UPPERCASE_B=66]="UPPERCASE_B",eo[eo.UPPERCASE_C=67]="UPPERCASE_C",eo[eo.UPPERCASE_D=68]="UPPERCASE_D",eo[eo.UPPERCASE_E=69]="UPPERCASE_E",eo[eo.UPPERCASE_F=70]="UPPERCASE_F",eo[eo.UPPERCASE_G=71]="UPPERCASE_G",eo[eo.UPPERCASE_H=72]="UPPERCASE_H",eo[eo.UPPERCASE_I=73]="UPPERCASE_I",eo[eo.UPPERCASE_J=74]="UPPERCASE_J",eo[eo.UPPERCASE_K=75]="UPPERCASE_K",eo[eo.UPPERCASE_L=76]="UPPERCASE_L",eo[eo.UPPERCASE_M=77]="UPPERCASE_M",eo[eo.UPPERCASE_N=78]="UPPERCASE_N",eo[eo.UPPERCASE_O=79]="UPPERCASE_O",eo[eo.UPPERCASE_P=80]="UPPERCASE_P",eo[eo.UPPERCASE_Q=81]="UPPERCASE_Q",eo[eo.UPPERCASE_R=82]="UPPERCASE_R",eo[eo.UPPERCASE_S=83]="UPPERCASE_S",eo[eo.UPPERCASE_T=84]="UPPERCASE_T",eo[eo.UPPERCASE_U=85]="UPPERCASE_U",eo[eo.UPPERCASE_V=86]="UPPERCASE_V",eo[eo.UPPERCASE_W=87]="UPPERCASE_W",eo[eo.UPPERCASE_X=88]="UPPERCASE_X",eo[eo.UPPERCASE_Y=89]="UPPERCASE_Y",eo[eo.UPPERCASE_Z=90]="UPPERCASE_Z",eo[eo.OPEN_BRACKET=91]="OPEN_BRACKET",eo[eo.BACKSLASH=92]="BACKSLASH",eo[eo.CLOSE_BRACKET=93]="CLOSE_BRACKET",eo[eo.CARET=94]="CARET",eo[eo.UNDERSCORE=95]="UNDERSCORE",eo[eo.BACKTICK=96]="BACKTICK",eo[eo.LOWERCASE_A=97]="LOWERCASE_A",eo[eo.LOWERCASE_B=98]="LOWERCASE_B",eo[eo.LOWERCASE_C=99]="LOWERCASE_C",eo[eo.LOWERCASE_D=100]="LOWERCASE_D",eo[eo.LOWERCASE_E=101]="LOWERCASE_E",eo[eo.LOWERCASE_F=102]="LOWERCASE_F",eo[eo.LOWERCASE_G=103]="LOWERCASE_G",eo[eo.LOWERCASE_H=104]="LOWERCASE_H",eo[eo.LOWERCASE_I=105]="LOWERCASE_I",eo[eo.LOWERCASE_J=106]="LOWERCASE_J",eo[eo.LOWERCASE_K=107]="LOWERCASE_K",eo[eo.LOWERCASE_L=108]="LOWERCASE_L",eo[eo.LOWERCASE_M=109]="LOWERCASE_M",eo[eo.LOWERCASE_N=110]="LOWERCASE_N",eo[eo.LOWERCASE_O=111]="LOWERCASE_O",eo[eo.LOWERCASE_P=112]="LOWERCASE_P",eo[eo.LOWERCASE_Q=113]="LOWERCASE_Q",eo[eo.LOWERCASE_R=114]="LOWERCASE_R",eo[eo.LOWERCASE_S=115]="LOWERCASE_S",eo[eo.LOWERCASE_T=116]="LOWERCASE_T",eo[eo.LOWERCASE_U=117]="LOWERCASE_U",eo[eo.LOWERCASE_V=118]="LOWERCASE_V",eo[eo.LOWERCASE_W=119]="LOWERCASE_W",eo[eo.LOWERCASE_X=120]="LOWERCASE_X",eo[eo.LOWERCASE_Y=121]="LOWERCASE_Y",eo[eo.LOWERCASE_Z=122]="LOWERCASE_Z",eo[eo.OPEN_BRACE=123]="OPEN_BRACE",eo[eo.VERTICAL_SLASH=124]="VERTICAL_SLASH",eo[eo.CLOSE_BRACE=125]="CLOSE_BRACE",eo[eo.TILDE=126]="TILDE",eo[eo.DELETE=127]="DELETE"})(AsciiCodePoint||(AsciiCodePoint={}));const foldingCaseCodeMap={µ:"μ",À:"à",Á:"á",Â:"â",Ã:"ã",Ä:"ä",Å:"å",Æ:"æ",Ç:"ç",È:"è",É:"é",Ê:"ê",Ë:"ë",Ì:"ì",Í:"í",Î:"î",Ï:"ï",Ð:"ð",Ñ:"ñ",Ò:"ò",Ó:"ó",Ô:"ô",Õ:"õ",Ö:"ö",Ø:"ø",Ù:"ù",Ú:"ú",Û:"û",Ü:"ü",Ý:"ý",Þ:"þ",Ā:"ā",Ă:"ă",Ą:"ą",Ć:"ć",Ĉ:"ĉ",Ċ:"ċ",Č:"č",Ď:"ď",Đ:"đ",Ē:"ē",Ĕ:"ĕ",Ė:"ė",Ę:"ę",Ě:"ě",Ĝ:"ĝ",Ğ:"ğ",Ġ:"ġ",Ģ:"ģ",Ĥ:"ĥ",Ħ:"ħ",Ĩ:"ĩ",Ī:"ī",Ĭ:"ĭ",Į:"į",IJ:"ij",Ĵ:"ĵ",Ķ:"ķ",Ĺ:"ĺ",Ļ:"ļ",Ľ:"ľ",Ŀ:"ŀ",Ł:"ł",Ń:"ń",Ņ:"ņ",Ň:"ň",Ŋ:"ŋ",Ō:"ō",Ŏ:"ŏ",Ő:"ő",Œ:"œ",Ŕ:"ŕ",Ŗ:"ŗ",Ř:"ř",Ś:"ś",Ŝ:"ŝ",Ş:"ş",Š:"š",Ţ:"ţ",Ť:"ť",Ŧ:"ŧ",Ũ:"ũ",Ū:"ū",Ŭ:"ŭ",Ů:"ů",Ű:"ű",Ų:"ų",Ŵ:"ŵ",Ŷ:"ŷ",Ÿ:"ÿ",Ź:"ź",Ż:"ż",Ž:"ž",ſ:"s",Ɓ:"ɓ",Ƃ:"ƃ",Ƅ:"ƅ",Ɔ:"ɔ",Ƈ:"ƈ",Ɖ:"ɖ",Ɗ:"ɗ",Ƌ:"ƌ",Ǝ:"ǝ",Ə:"ə",Ɛ:"ɛ",Ƒ:"ƒ",Ɠ:"ɠ",Ɣ:"ɣ",Ɩ:"ɩ",Ɨ:"ɨ",Ƙ:"ƙ",Ɯ:"ɯ",Ɲ:"ɲ",Ɵ:"ɵ",Ơ:"ơ",Ƣ:"ƣ",Ƥ:"ƥ",Ʀ:"ʀ",Ƨ:"ƨ",Ʃ:"ʃ",Ƭ:"ƭ",Ʈ:"ʈ",Ư:"ư",Ʊ:"ʊ",Ʋ:"ʋ",Ƴ:"ƴ",Ƶ:"ƶ",Ʒ:"ʒ",Ƹ:"ƹ",Ƽ:"ƽ",DŽ:"dž",Dž:"dž",LJ:"lj",Lj:"lj",NJ:"nj",Nj:"nj",Ǎ:"ǎ",Ǐ:"ǐ",Ǒ:"ǒ",Ǔ:"ǔ",Ǖ:"ǖ",Ǘ:"ǘ",Ǚ:"ǚ",Ǜ:"ǜ",Ǟ:"ǟ",Ǡ:"ǡ",Ǣ:"ǣ",Ǥ:"ǥ",Ǧ:"ǧ",Ǩ:"ǩ",Ǫ:"ǫ",Ǭ:"ǭ",Ǯ:"ǯ",DZ:"dz",Dz:"dz",Ǵ:"ǵ",Ƕ:"ƕ",Ƿ:"ƿ",Ǹ:"ǹ",Ǻ:"ǻ",Ǽ:"ǽ",Ǿ:"ǿ",Ȁ:"ȁ",Ȃ:"ȃ",Ȅ:"ȅ",Ȇ:"ȇ",Ȉ:"ȉ",Ȋ:"ȋ",Ȍ:"ȍ",Ȏ:"ȏ",Ȑ:"ȑ",Ȓ:"ȓ",Ȕ:"ȕ",Ȗ:"ȗ",Ș:"ș",Ț:"ț",Ȝ:"ȝ",Ȟ:"ȟ","Ƞ":"ƞ",Ȣ:"ȣ",Ȥ:"ȥ",Ȧ:"ȧ",Ȩ:"ȩ",Ȫ:"ȫ",Ȭ:"ȭ",Ȯ:"ȯ",Ȱ:"ȱ",Ȳ:"ȳ","Ⱥ":"ⱥ","Ȼ":"ȼ","Ƚ":"ƚ","Ⱦ":"ⱦ","Ɂ":"ɂ","Ƀ":"ƀ","Ʉ":"ʉ","Ʌ":"ʌ","Ɇ":"ɇ","Ɉ":"ɉ","Ɋ":"ɋ","Ɍ":"ɍ","Ɏ":"ɏ","ͅ":"ι","Ͱ":"ͱ","Ͳ":"ͳ","Ͷ":"ͷ","Ϳ":"ϳ",Ά:"ά",Έ:"έ",Ή:"ή",Ί:"ί",Ό:"ό",Ύ:"ύ",Ώ:"ώ",Α:"α",Β:"β",Γ:"γ",Δ:"δ",Ε:"ε",Ζ:"ζ",Η:"η",Θ:"θ",Ι:"ι",Κ:"κ",Λ:"λ",Μ:"μ",Ν:"ν",Ξ:"ξ",Ο:"ο",Π:"π",Ρ:"ρ",Σ:"σ",Τ:"τ",Υ:"υ",Φ:"φ",Χ:"χ",Ψ:"ψ",Ω:"ω",Ϊ:"ϊ",Ϋ:"ϋ",ς:"σ","Ϗ":"ϗ",ϐ:"β",ϑ:"θ",ϕ:"φ",ϖ:"π","Ϙ":"ϙ",Ϛ:"ϛ",Ϝ:"ϝ",Ϟ:"ϟ",Ϡ:"ϡ",Ϣ:"ϣ",Ϥ:"ϥ",Ϧ:"ϧ",Ϩ:"ϩ",Ϫ:"ϫ",Ϭ:"ϭ",Ϯ:"ϯ",ϰ:"κ",ϱ:"ρ","ϴ":"θ","ϵ":"ε","Ϸ":"ϸ","Ϲ":"ϲ","Ϻ":"ϻ","Ͻ":"ͻ","Ͼ":"ͼ","Ͽ":"ͽ",Ѐ:"ѐ",Ё:"ё",Ђ:"ђ",Ѓ:"ѓ",Є:"є",Ѕ:"ѕ",І:"і",Ї:"ї",Ј:"ј",Љ:"љ",Њ:"њ",Ћ:"ћ",Ќ:"ќ",Ѝ:"ѝ",Ў:"ў",Џ:"џ",А:"а",Б:"б",В:"в",Г:"г",Д:"д",Е:"е",Ж:"ж",З:"з",И:"и",Й:"й",К:"к",Л:"л",М:"м",Н:"н",О:"о",П:"п",Р:"р",С:"с",Т:"т",У:"у",Ф:"ф",Х:"х",Ц:"ц",Ч:"ч",Ш:"ш",Щ:"щ",Ъ:"ъ",Ы:"ы",Ь:"ь",Э:"э",Ю:"ю",Я:"я",Ѡ:"ѡ",Ѣ:"ѣ",Ѥ:"ѥ",Ѧ:"ѧ",Ѩ:"ѩ",Ѫ:"ѫ",Ѭ:"ѭ",Ѯ:"ѯ",Ѱ:"ѱ",Ѳ:"ѳ",Ѵ:"ѵ",Ѷ:"ѷ",Ѹ:"ѹ",Ѻ:"ѻ",Ѽ:"ѽ",Ѿ:"ѿ",Ҁ:"ҁ","Ҋ":"ҋ",Ҍ:"ҍ",Ҏ:"ҏ",Ґ:"ґ",Ғ:"ғ",Ҕ:"ҕ",Җ:"җ",Ҙ:"ҙ",Қ:"қ",Ҝ:"ҝ",Ҟ:"ҟ",Ҡ:"ҡ",Ң:"ң",Ҥ:"ҥ",Ҧ:"ҧ",Ҩ:"ҩ",Ҫ:"ҫ",Ҭ:"ҭ",Ү:"ү",Ұ:"ұ",Ҳ:"ҳ",Ҵ:"ҵ",Ҷ:"ҷ",Ҹ:"ҹ",Һ:"һ",Ҽ:"ҽ",Ҿ:"ҿ",Ӏ:"ӏ",Ӂ:"ӂ",Ӄ:"ӄ","Ӆ":"ӆ",Ӈ:"ӈ","Ӊ":"ӊ",Ӌ:"ӌ","Ӎ":"ӎ",Ӑ:"ӑ",Ӓ:"ӓ",Ӕ:"ӕ",Ӗ:"ӗ",Ә:"ә",Ӛ:"ӛ",Ӝ:"ӝ",Ӟ:"ӟ",Ӡ:"ӡ",Ӣ:"ӣ",Ӥ:"ӥ",Ӧ:"ӧ",Ө:"ө",Ӫ:"ӫ",Ӭ:"ӭ",Ӯ:"ӯ",Ӱ:"ӱ",Ӳ:"ӳ",Ӵ:"ӵ","Ӷ":"ӷ",Ӹ:"ӹ","Ӻ":"ӻ","Ӽ":"ӽ","Ӿ":"ӿ","Ԁ":"ԁ","Ԃ":"ԃ","Ԅ":"ԅ","Ԇ":"ԇ","Ԉ":"ԉ","Ԋ":"ԋ","Ԍ":"ԍ","Ԏ":"ԏ","Ԑ":"ԑ","Ԓ":"ԓ","Ԕ":"ԕ","Ԗ":"ԗ","Ԙ":"ԙ","Ԛ":"ԛ","Ԝ":"ԝ","Ԟ":"ԟ","Ԡ":"ԡ","Ԣ":"ԣ","Ԥ":"ԥ","Ԧ":"ԧ","Ԩ":"ԩ","Ԫ":"ԫ","Ԭ":"ԭ","Ԯ":"ԯ",Ա:"ա",Բ:"բ",Գ:"գ",Դ:"դ",Ե:"ե",Զ:"զ",Է:"է",Ը:"ը",Թ:"թ",Ժ:"ժ",Ի:"ի",Լ:"լ",Խ:"խ",Ծ:"ծ",Կ:"կ",Հ:"հ",Ձ:"ձ",Ղ:"ղ",Ճ:"ճ",Մ:"մ",Յ:"յ",Ն:"ն",Շ:"շ",Ո:"ո",Չ:"չ",Պ:"պ",Ջ:"ջ",Ռ:"ռ",Ս:"ս",Վ:"վ",Տ:"տ",Ր:"ր",Ց:"ց",Ւ:"ւ",Փ:"փ",Ք:"ք",Օ:"օ",Ֆ:"ֆ",Ⴀ:"ⴀ",Ⴁ:"ⴁ",Ⴂ:"ⴂ",Ⴃ:"ⴃ",Ⴄ:"ⴄ",Ⴅ:"ⴅ",Ⴆ:"ⴆ",Ⴇ:"ⴇ",Ⴈ:"ⴈ",Ⴉ:"ⴉ",Ⴊ:"ⴊ",Ⴋ:"ⴋ",Ⴌ:"ⴌ",Ⴍ:"ⴍ",Ⴎ:"ⴎ",Ⴏ:"ⴏ",Ⴐ:"ⴐ",Ⴑ:"ⴑ",Ⴒ:"ⴒ",Ⴓ:"ⴓ",Ⴔ:"ⴔ",Ⴕ:"ⴕ",Ⴖ:"ⴖ",Ⴗ:"ⴗ",Ⴘ:"ⴘ",Ⴙ:"ⴙ",Ⴚ:"ⴚ",Ⴛ:"ⴛ",Ⴜ:"ⴜ",Ⴝ:"ⴝ",Ⴞ:"ⴞ",Ⴟ:"ⴟ",Ⴠ:"ⴠ",Ⴡ:"ⴡ",Ⴢ:"ⴢ",Ⴣ:"ⴣ",Ⴤ:"ⴤ",Ⴥ:"ⴥ","Ⴧ":"ⴧ","Ⴭ":"ⴭ",Ḁ:"ḁ",Ḃ:"ḃ",Ḅ:"ḅ",Ḇ:"ḇ",Ḉ:"ḉ",Ḋ:"ḋ",Ḍ:"ḍ",Ḏ:"ḏ",Ḑ:"ḑ",Ḓ:"ḓ",Ḕ:"ḕ",Ḗ:"ḗ",Ḙ:"ḙ",Ḛ:"ḛ",Ḝ:"ḝ",Ḟ:"ḟ",Ḡ:"ḡ",Ḣ:"ḣ",Ḥ:"ḥ",Ḧ:"ḧ",Ḩ:"ḩ",Ḫ:"ḫ",Ḭ:"ḭ",Ḯ:"ḯ",Ḱ:"ḱ",Ḳ:"ḳ",Ḵ:"ḵ",Ḷ:"ḷ",Ḹ:"ḹ",Ḻ:"ḻ",Ḽ:"ḽ",Ḿ:"ḿ",Ṁ:"ṁ",Ṃ:"ṃ",Ṅ:"ṅ",Ṇ:"ṇ",Ṉ:"ṉ",Ṋ:"ṋ",Ṍ:"ṍ",Ṏ:"ṏ",Ṑ:"ṑ",Ṓ:"ṓ",Ṕ:"ṕ",Ṗ:"ṗ",Ṙ:"ṙ",Ṛ:"ṛ",Ṝ:"ṝ",Ṟ:"ṟ",Ṡ:"ṡ",Ṣ:"ṣ",Ṥ:"ṥ",Ṧ:"ṧ",Ṩ:"ṩ",Ṫ:"ṫ",Ṭ:"ṭ",Ṯ:"ṯ",Ṱ:"ṱ",Ṳ:"ṳ",Ṵ:"ṵ",Ṷ:"ṷ",Ṹ:"ṹ",Ṻ:"ṻ",Ṽ:"ṽ",Ṿ:"ṿ",Ẁ:"ẁ",Ẃ:"ẃ",Ẅ:"ẅ",Ẇ:"ẇ",Ẉ:"ẉ",Ẋ:"ẋ",Ẍ:"ẍ",Ẏ:"ẏ",Ẑ:"ẑ",Ẓ:"ẓ",Ẕ:"ẕ",ẛ:"ṡ",Ạ:"ạ",Ả:"ả",Ấ:"ấ",Ầ:"ầ",Ẩ:"ẩ",Ẫ:"ẫ",Ậ:"ậ",Ắ:"ắ",Ằ:"ằ",Ẳ:"ẳ",Ẵ:"ẵ",Ặ:"ặ",Ẹ:"ẹ",Ẻ:"ẻ",Ẽ:"ẽ",Ế:"ế",Ề:"ề",Ể:"ể",Ễ:"ễ",Ệ:"ệ",Ỉ:"ỉ",Ị:"ị",Ọ:"ọ",Ỏ:"ỏ",Ố:"ố",Ồ:"ồ",Ổ:"ổ",Ỗ:"ỗ",Ộ:"ộ",Ớ:"ớ",Ờ:"ờ",Ở:"ở",Ỡ:"ỡ",Ợ:"ợ",Ụ:"ụ",Ủ:"ủ",Ứ:"ứ",Ừ:"ừ",Ử:"ử",Ữ:"ữ",Ự:"ự",Ỳ:"ỳ",Ỵ:"ỵ",Ỷ:"ỷ",Ỹ:"ỹ","Ỻ":"ỻ","Ỽ":"ỽ","Ỿ":"ỿ",Ἀ:"ἀ",Ἁ:"ἁ",Ἂ:"ἂ",Ἃ:"ἃ",Ἄ:"ἄ",Ἅ:"ἅ",Ἆ:"ἆ",Ἇ:"ἇ",Ἐ:"ἐ",Ἑ:"ἑ",Ἒ:"ἒ",Ἓ:"ἓ",Ἔ:"ἔ",Ἕ:"ἕ",Ἠ:"ἠ",Ἡ:"ἡ",Ἢ:"ἢ",Ἣ:"ἣ",Ἤ:"ἤ",Ἥ:"ἥ",Ἦ:"ἦ",Ἧ:"ἧ",Ἰ:"ἰ",Ἱ:"ἱ",Ἲ:"ἲ",Ἳ:"ἳ",Ἴ:"ἴ",Ἵ:"ἵ",Ἶ:"ἶ",Ἷ:"ἷ",Ὀ:"ὀ",Ὁ:"ὁ",Ὂ:"ὂ",Ὃ:"ὃ",Ὄ:"ὄ",Ὅ:"ὅ",Ὑ:"ὑ",Ὓ:"ὓ",Ὕ:"ὕ",Ὗ:"ὗ",Ὠ:"ὠ",Ὡ:"ὡ",Ὢ:"ὢ",Ὣ:"ὣ",Ὤ:"ὤ",Ὥ:"ὥ",Ὦ:"ὦ",Ὧ:"ὧ",Ᾰ:"ᾰ",Ᾱ:"ᾱ",Ὰ:"ὰ",Ά:"ά",ι:"ι",Ὲ:"ὲ",Έ:"έ",Ὴ:"ὴ",Ή:"ή",Ῐ:"ῐ",Ῑ:"ῑ",Ὶ:"ὶ",Ί:"ί",Ῠ:"ῠ",Ῡ:"ῡ",Ὺ:"ὺ",Ύ:"ύ",Ῥ:"ῥ",Ὸ:"ὸ",Ό:"ό",Ὼ:"ὼ",Ώ:"ώ",Ω:"ω",K:"k",Å:"å","Ⅎ":"ⅎ","Ⅰ":"ⅰ","Ⅱ":"ⅱ","Ⅲ":"ⅲ","Ⅳ":"ⅳ","Ⅴ":"ⅴ","Ⅵ":"ⅵ","Ⅶ":"ⅶ","Ⅷ":"ⅷ","Ⅸ":"ⅸ","Ⅹ":"ⅹ","Ⅺ":"ⅺ","Ⅻ":"ⅻ","Ⅼ":"ⅼ","Ⅽ":"ⅽ","Ⅾ":"ⅾ","Ⅿ":"ⅿ","Ↄ":"ↄ","Ⓐ":"ⓐ","Ⓑ":"ⓑ","Ⓒ":"ⓒ","Ⓓ":"ⓓ","Ⓔ":"ⓔ","Ⓕ":"ⓕ","Ⓖ":"ⓖ","Ⓗ":"ⓗ","Ⓘ":"ⓘ","Ⓙ":"ⓙ","Ⓚ":"ⓚ","Ⓛ":"ⓛ","Ⓜ":"ⓜ","Ⓝ":"ⓝ","Ⓞ":"ⓞ","Ⓟ":"ⓟ","Ⓠ":"ⓠ","Ⓡ":"ⓡ","Ⓢ":"ⓢ","Ⓣ":"ⓣ","Ⓤ":"ⓤ","Ⓥ":"ⓥ","Ⓦ":"ⓦ","Ⓧ":"ⓧ","Ⓨ":"ⓨ","Ⓩ":"ⓩ","Ⰰ":"ⰰ","Ⰱ":"ⰱ","Ⰲ":"ⰲ","Ⰳ":"ⰳ","Ⰴ":"ⰴ","Ⰵ":"ⰵ","Ⰶ":"ⰶ","Ⰷ":"ⰷ","Ⰸ":"ⰸ","Ⰹ":"ⰹ","Ⰺ":"ⰺ","Ⰻ":"ⰻ","Ⰼ":"ⰼ","Ⰽ":"ⰽ","Ⰾ":"ⰾ","Ⰿ":"ⰿ","Ⱀ":"ⱀ","Ⱁ":"ⱁ","Ⱂ":"ⱂ","Ⱃ":"ⱃ","Ⱄ":"ⱄ","Ⱅ":"ⱅ","Ⱆ":"ⱆ","Ⱇ":"ⱇ","Ⱈ":"ⱈ","Ⱉ":"ⱉ","Ⱊ":"ⱊ","Ⱋ":"ⱋ","Ⱌ":"ⱌ","Ⱍ":"ⱍ","Ⱎ":"ⱎ","Ⱏ":"ⱏ","Ⱐ":"ⱐ","Ⱑ":"ⱑ","Ⱒ":"ⱒ","Ⱓ":"ⱓ","Ⱔ":"ⱔ","Ⱕ":"ⱕ","Ⱖ":"ⱖ","Ⱗ":"ⱗ","Ⱘ":"ⱘ","Ⱙ":"ⱙ","Ⱚ":"ⱚ","Ⱛ":"ⱛ","Ⱜ":"ⱜ","Ⱝ":"ⱝ","Ⱞ":"ⱞ","Ⱡ":"ⱡ","Ɫ":"ɫ","Ᵽ":"ᵽ","Ɽ":"ɽ","Ⱨ":"ⱨ","Ⱪ":"ⱪ","Ⱬ":"ⱬ","Ɑ":"ɑ","Ɱ":"ɱ","Ɐ":"ɐ","Ɒ":"ɒ","Ⱳ":"ⱳ","Ⱶ":"ⱶ","Ȿ":"ȿ","Ɀ":"ɀ","Ⲁ":"ⲁ","Ⲃ":"ⲃ","Ⲅ":"ⲅ","Ⲇ":"ⲇ","Ⲉ":"ⲉ","Ⲋ":"ⲋ","Ⲍ":"ⲍ","Ⲏ":"ⲏ","Ⲑ":"ⲑ","Ⲓ":"ⲓ","Ⲕ":"ⲕ","Ⲗ":"ⲗ","Ⲙ":"ⲙ","Ⲛ":"ⲛ","Ⲝ":"ⲝ","Ⲟ":"ⲟ","Ⲡ":"ⲡ","Ⲣ":"ⲣ","Ⲥ":"ⲥ","Ⲧ":"ⲧ","Ⲩ":"ⲩ","Ⲫ":"ⲫ","Ⲭ":"ⲭ","Ⲯ":"ⲯ","Ⲱ":"ⲱ","Ⲳ":"ⲳ","Ⲵ":"ⲵ","Ⲷ":"ⲷ","Ⲹ":"ⲹ","Ⲻ":"ⲻ","Ⲽ":"ⲽ","Ⲿ":"ⲿ","Ⳁ":"ⳁ","Ⳃ":"ⳃ","Ⳅ":"ⳅ","Ⳇ":"ⳇ","Ⳉ":"ⳉ","Ⳋ":"ⳋ","Ⳍ":"ⳍ","Ⳏ":"ⳏ","Ⳑ":"ⳑ","Ⳓ":"ⳓ","Ⳕ":"ⳕ","Ⳗ":"ⳗ","Ⳙ":"ⳙ","Ⳛ":"ⳛ","Ⳝ":"ⳝ","Ⳟ":"ⳟ","Ⳡ":"ⳡ","Ⳣ":"ⳣ","Ⳬ":"ⳬ","Ⳮ":"ⳮ","Ⳳ":"ⳳ","Ꙁ":"ꙁ","Ꙃ":"ꙃ","Ꙅ":"ꙅ","Ꙇ":"ꙇ","Ꙉ":"ꙉ","Ꙋ":"ꙋ","Ꙍ":"ꙍ","Ꙏ":"ꙏ","Ꙑ":"ꙑ","Ꙓ":"ꙓ","Ꙕ":"ꙕ","Ꙗ":"ꙗ","Ꙙ":"ꙙ","Ꙛ":"ꙛ","Ꙝ":"ꙝ","Ꙟ":"ꙟ","Ꙡ":"ꙡ","Ꙣ":"ꙣ","Ꙥ":"ꙥ","Ꙧ":"ꙧ","Ꙩ":"ꙩ","Ꙫ":"ꙫ","Ꙭ":"ꙭ","Ꚁ":"ꚁ","Ꚃ":"ꚃ","Ꚅ":"ꚅ","Ꚇ":"ꚇ","Ꚉ":"ꚉ","Ꚋ":"ꚋ","Ꚍ":"ꚍ","Ꚏ":"ꚏ","Ꚑ":"ꚑ","Ꚓ":"ꚓ","Ꚕ":"ꚕ","Ꚗ":"ꚗ","Ꚙ":"ꚙ","Ꚛ":"ꚛ","Ꜣ":"ꜣ","Ꜥ":"ꜥ","Ꜧ":"ꜧ","Ꜩ":"ꜩ","Ꜫ":"ꜫ","Ꜭ":"ꜭ","Ꜯ":"ꜯ","Ꜳ":"ꜳ","Ꜵ":"ꜵ","Ꜷ":"ꜷ","Ꜹ":"ꜹ","Ꜻ":"ꜻ","Ꜽ":"ꜽ","Ꜿ":"ꜿ","Ꝁ":"ꝁ","Ꝃ":"ꝃ","Ꝅ":"ꝅ","Ꝇ":"ꝇ","Ꝉ":"ꝉ","Ꝋ":"ꝋ","Ꝍ":"ꝍ","Ꝏ":"ꝏ","Ꝑ":"ꝑ","Ꝓ":"ꝓ","Ꝕ":"ꝕ","Ꝗ":"ꝗ","Ꝙ":"ꝙ","Ꝛ":"ꝛ","Ꝝ":"ꝝ","Ꝟ":"ꝟ","Ꝡ":"ꝡ","Ꝣ":"ꝣ","Ꝥ":"ꝥ","Ꝧ":"ꝧ","Ꝩ":"ꝩ","Ꝫ":"ꝫ","Ꝭ":"ꝭ","Ꝯ":"ꝯ","Ꝺ":"ꝺ","Ꝼ":"ꝼ","Ᵹ":"ᵹ","Ꝿ":"ꝿ","Ꞁ":"ꞁ","Ꞃ":"ꞃ","Ꞅ":"ꞅ","Ꞇ":"ꞇ","Ꞌ":"ꞌ","Ɥ":"ɥ","Ꞑ":"ꞑ","Ꞓ":"ꞓ","Ꞗ":"ꞗ","Ꞙ":"ꞙ","Ꞛ":"ꞛ","Ꞝ":"ꞝ","Ꞟ":"ꞟ","Ꞡ":"ꞡ","Ꞣ":"ꞣ","Ꞥ":"ꞥ","Ꞧ":"ꞧ","Ꞩ":"ꞩ","Ɦ":"ɦ","Ɜ":"ɜ","Ɡ":"ɡ","Ɬ":"ɬ","Ʞ":"ʞ","Ʇ":"ʇ",A:"a",B:"b",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",J:"j",K:"k",L:"l",M:"m",N:"n",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",U:"u",V:"v",W:"w",X:"x",Y:"y",Z:"z","𐐀":"𐐨","𐐁":"𐐩","𐐂":"𐐪","𐐃":"𐐫","𐐄":"𐐬","𐐅":"𐐭","𐐆":"𐐮","𐐇":"𐐯","𐐈":"𐐰","𐐉":"𐐱","𐐊":"𐐲","𐐋":"𐐳","𐐌":"𐐴","𐐍":"𐐵","𐐎":"𐐶","𐐏":"𐐷","𐐐":"𐐸","𐐑":"𐐹","𐐒":"𐐺","𐐓":"𐐻","𐐔":"𐐼","𐐕":"𐐽","𐐖":"𐐾","𐐗":"𐐿","𐐘":"𐑀","𐐙":"𐑁","𐐚":"𐑂","𐐛":"𐑃","𐐜":"𐑄","𐐝":"𐑅","𐐞":"𐑆","𐐟":"𐑇","𐐠":"𐑈","𐐡":"𐑉","𐐢":"𐑊","𐐣":"𐑋","𐐤":"𐑌","𐐥":"𐑍","𐐦":"𐑎","𐐧":"𐑏","𑢠":"𑣀","𑢡":"𑣁","𑢢":"𑣂","𑢣":"𑣃","𑢤":"𑣄","𑢥":"𑣅","𑢦":"𑣆","𑢧":"𑣇","𑢨":"𑣈","𑢩":"𑣉","𑢪":"𑣊","𑢫":"𑣋","𑢬":"𑣌","𑢭":"𑣍","𑢮":"𑣎","𑢯":"𑣏","𑢰":"𑣐","𑢱":"𑣑","𑢲":"𑣒","𑢳":"𑣓","𑢴":"𑣔","𑢵":"𑣕","𑢶":"𑣖","𑢷":"𑣗","𑢸":"𑣘","𑢹":"𑣙","𑢺":"𑣚","𑢻":"𑣛","𑢼":"𑣜","𑢽":"𑣝","𑢾":"𑣞","𑢿":"𑣟",ß:"ss",İ:"i̇",ʼn:"ʼn",ǰ:"ǰ",ΐ:"ΐ",ΰ:"ΰ",և:"եւ",ẖ:"ẖ",ẗ:"ẗ",ẘ:"ẘ",ẙ:"ẙ",ẚ:"aʾ","ẞ":"ss",ὐ:"ὐ",ὒ:"ὒ",ὔ:"ὔ",ὖ:"ὖ",ᾀ:"ἀι",ᾁ:"ἁι",ᾂ:"ἂι",ᾃ:"ἃι",ᾄ:"ἄι",ᾅ:"ἅι",ᾆ:"ἆι",ᾇ:"ἇι",ᾈ:"ἀι",ᾉ:"ἁι",ᾊ:"ἂι",ᾋ:"ἃι",ᾌ:"ἄι",ᾍ:"ἅι",ᾎ:"ἆι",ᾏ:"ἇι",ᾐ:"ἠι",ᾑ:"ἡι",ᾒ:"ἢι",ᾓ:"ἣι",ᾔ:"ἤι",ᾕ:"ἥι",ᾖ:"ἦι",ᾗ:"ἧι",ᾘ:"ἠι",ᾙ:"ἡι",ᾚ:"ἢι",ᾛ:"ἣι",ᾜ:"ἤι",ᾝ:"ἥι",ᾞ:"ἦι",ᾟ:"ἧι",ᾠ:"ὠι",ᾡ:"ὡι",ᾢ:"ὢι",ᾣ:"ὣι",ᾤ:"ὤι",ᾥ:"ὥι",ᾦ:"ὦι",ᾧ:"ὧι",ᾨ:"ὠι",ᾩ:"ὡι",ᾪ:"ὢι",ᾫ:"ὣι",ᾬ:"ὤι",ᾭ:"ὥι",ᾮ:"ὦι",ᾯ:"ὧι",ᾲ:"ὰι",ᾳ:"αι",ᾴ:"άι",ᾶ:"ᾶ",ᾷ:"ᾶι",ᾼ:"αι",ῂ:"ὴι",ῃ:"ηι",ῄ:"ήι",ῆ:"ῆ",ῇ:"ῆι",ῌ:"ηι",ῒ:"ῒ",ΐ:"ΐ",ῖ:"ῖ",ῗ:"ῗ",ῢ:"ῢ",ΰ:"ΰ",ῤ:"ῤ",ῦ:"ῦ",ῧ:"ῧ",ῲ:"ὼι",ῳ:"ωι",ῴ:"ώι",ῶ:"ῶ",ῷ:"ῶι",ῼ:"ωι",ff:"ff",fi:"fi",fl:"fl",ffi:"ffi",ffl:"ffl",ſt:"st",st:"st",ﬓ:"մն",ﬔ:"մե",ﬕ:"մի",ﬖ:"վն",ﬗ:"մխ"},entityReferences=[{key:[65,69,108,105,103,59],value:"Æ"},{key:[65,77,80,59],value:"&"},{key:[65,97,99,117,116,101,59],value:"Á"},{key:[65,98,114,101,118,101,59],value:"Ă"},{key:[65,99,105,114,99,59],value:"Â"},{key:[65,99,121,59],value:"А"},{key:[65,102,114,59],value:"𝔄"},{key:[65,103,114,97,118,101,59],value:"À"},{key:[65,108,112,104,97,59],value:"Α"},{key:[65,109,97,99,114,59],value:"Ā"},{key:[65,110,100,59],value:"⩓"},{key:[65,111,103,111,110,59],value:"Ą"},{key:[65,111,112,102,59],value:"𝔸"},{key:[65,112,112,108,121,70,117,110,99,116,105,111,110,59],value:"⁡"},{key:[65,114,105,110,103,59],value:"Å"},{key:[65,115,99,114,59],value:"𝒜"},{key:[65,115,115,105,103,110,59],value:"≔"},{key:[65,116,105,108,100,101,59],value:"Ã"},{key:[65,117,109,108,59],value:"Ä"},{key:[66,97,99,107,115,108,97,115,104,59],value:"∖"},{key:[66,97,114,118,59],value:"⫧"},{key:[66,97,114,119,101,100,59],value:"⌆"},{key:[66,99,121,59],value:"Б"},{key:[66,101,99,97,117,115,101,59],value:"∵"},{key:[66,101,114,110,111,117,108,108,105,115,59],value:"ℬ"},{key:[66,101,116,97,59],value:"Β"},{key:[66,102,114,59],value:"𝔅"},{key:[66,111,112,102,59],value:"𝔹"},{key:[66,114,101,118,101,59],value:"˘"},{key:[66,115,99,114,59],value:"ℬ"},{key:[66,117,109,112,101,113,59],value:"≎"},{key:[67,72,99,121,59],value:"Ч"},{key:[67,79,80,89,59],value:"©"},{key:[67,97,99,117,116,101,59],value:"Ć"},{key:[67,97,112,59],value:"⋒"},{key:[67,97,112,105,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59],value:"ⅅ"},{key:[67,97,121,108,101,121,115,59],value:"ℭ"},{key:[67,99,97,114,111,110,59],value:"Č"},{key:[67,99,101,100,105,108,59],value:"Ç"},{key:[67,99,105,114,99,59],value:"Ĉ"},{key:[67,99,111,110,105,110,116,59],value:"∰"},{key:[67,100,111,116,59],value:"Ċ"},{key:[67,101,100,105,108,108,97,59],value:"¸"},{key:[67,101,110,116,101,114,68,111,116,59],value:"·"},{key:[67,102,114,59],value:"ℭ"},{key:[67,104,105,59],value:"Χ"},{key:[67,105,114,99,108,101,68,111,116,59],value:"⊙"},{key:[67,105,114,99,108,101,77,105,110,117,115,59],value:"⊖"},{key:[67,105,114,99,108,101,80,108,117,115,59],value:"⊕"},{key:[67,105,114,99,108,101,84,105,109,101,115,59],value:"⊗"},{key:[67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∲"},{key:[67,108,111,115,101,67,117,114,108,121,68,111,117,98,108,101,81,117,111,116,101,59],value:"”"},{key:[67,108,111,115,101,67,117,114,108,121,81,117,111,116,101,59],value:"’"},{key:[67,111,108,111,110,59],value:"∷"},{key:[67,111,108,111,110,101,59],value:"⩴"},{key:[67,111,110,103,114,117,101,110,116,59],value:"≡"},{key:[67,111,110,105,110,116,59],value:"∯"},{key:[67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∮"},{key:[67,111,112,102,59],value:"ℂ"},{key:[67,111,112,114,111,100,117,99,116,59],value:"∐"},{key:[67,111,117,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∳"},{key:[67,114,111,115,115,59],value:"⨯"},{key:[67,115,99,114,59],value:"𝒞"},{key:[67,117,112,59],value:"⋓"},{key:[67,117,112,67,97,112,59],value:"≍"},{key:[68,68,59],value:"ⅅ"},{key:[68,68,111,116,114,97,104,100,59],value:"⤑"},{key:[68,74,99,121,59],value:"Ђ"},{key:[68,83,99,121,59],value:"Ѕ"},{key:[68,90,99,121,59],value:"Џ"},{key:[68,97,103,103,101,114,59],value:"‡"},{key:[68,97,114,114,59],value:"↡"},{key:[68,97,115,104,118,59],value:"⫤"},{key:[68,99,97,114,111,110,59],value:"Ď"},{key:[68,99,121,59],value:"Д"},{key:[68,101,108,59],value:"∇"},{key:[68,101,108,116,97,59],value:"Δ"},{key:[68,102,114,59],value:"𝔇"},{key:[68,105,97,99,114,105,116,105,99,97,108,65,99,117,116,101,59],value:"´"},{key:[68,105,97,99,114,105,116,105,99,97,108,68,111,116,59],value:"˙"},{key:[68,105,97,99,114,105,116,105,99,97,108,68,111,117,98,108,101,65,99,117,116,101,59],value:"˝"},{key:[68,105,97,99,114,105,116,105,99,97,108,71,114,97,118,101,59],value:"`"},{key:[68,105,97,99,114,105,116,105,99,97,108,84,105,108,100,101,59],value:"˜"},{key:[68,105,97,109,111,110,100,59],value:"⋄"},{key:[68,105,102,102,101,114,101,110,116,105,97,108,68,59],value:"ⅆ"},{key:[68,111,112,102,59],value:"𝔻"},{key:[68,111,116,59],value:"¨"},{key:[68,111,116,68,111,116,59],value:"⃜"},{key:[68,111,116,69,113,117,97,108,59],value:"≐"},{key:[68,111,117,98,108,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∯"},{key:[68,111,117,98,108,101,68,111,116,59],value:"¨"},{key:[68,111,117,98,108,101,68,111,119,110,65,114,114,111,119,59],value:"⇓"},{key:[68,111,117,98,108,101,76,101,102,116,65,114,114,111,119,59],value:"⇐"},{key:[68,111,117,98,108,101,76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"⇔"},{key:[68,111,117,98,108,101,76,101,102,116,84,101,101,59],value:"⫤"},{key:[68,111,117,98,108,101,76,111,110,103,76,101,102,116,65,114,114,111,119,59],value:"⟸"},{key:[68,111,117,98,108,101,76,111,110,103,76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"⟺"},{key:[68,111,117,98,108,101,76,111,110,103,82,105,103,104,116,65,114,114,111,119,59],value:"⟹"},{key:[68,111,117,98,108,101,82,105,103,104,116,65,114,114,111,119,59],value:"⇒"},{key:[68,111,117,98,108,101,82,105,103,104,116,84,101,101,59],value:"⊨"},{key:[68,111,117,98,108,101,85,112,65,114,114,111,119,59],value:"⇑"},{key:[68,111,117,98,108,101,85,112,68,111,119,110,65,114,114,111,119,59],value:"⇕"},{key:[68,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59],value:"∥"},{key:[68,111,119,110,65,114,114,111,119,59],value:"↓"},{key:[68,111,119,110,65,114,114,111,119,66,97,114,59],value:"⤓"},{key:[68,111,119,110,65,114,114,111,119,85,112,65,114,114,111,119,59],value:"⇵"},{key:[68,111,119,110,66,114,101,118,101,59],value:"̑"},{key:[68,111,119,110,76,101,102,116,82,105,103,104,116,86,101,99,116,111,114,59],value:"⥐"},{key:[68,111,119,110,76,101,102,116,84,101,101,86,101,99,116,111,114,59],value:"⥞"},{key:[68,111,119,110,76,101,102,116,86,101,99,116,111,114,59],value:"↽"},{key:[68,111,119,110,76,101,102,116,86,101,99,116,111,114,66,97,114,59],value:"⥖"},{key:[68,111,119,110,82,105,103,104,116,84,101,101,86,101,99,116,111,114,59],value:"⥟"},{key:[68,111,119,110,82,105,103,104,116,86,101,99,116,111,114,59],value:"⇁"},{key:[68,111,119,110,82,105,103,104,116,86,101,99,116,111,114,66,97,114,59],value:"⥗"},{key:[68,111,119,110,84,101,101,59],value:"⊤"},{key:[68,111,119,110,84,101,101,65,114,114,111,119,59],value:"↧"},{key:[68,111,119,110,97,114,114,111,119,59],value:"⇓"},{key:[68,115,99,114,59],value:"𝒟"},{key:[68,115,116,114,111,107,59],value:"Đ"},{key:[69,78,71,59],value:"Ŋ"},{key:[69,84,72,59],value:"Ð"},{key:[69,97,99,117,116,101,59],value:"É"},{key:[69,99,97,114,111,110,59],value:"Ě"},{key:[69,99,105,114,99,59],value:"Ê"},{key:[69,99,121,59],value:"Э"},{key:[69,100,111,116,59],value:"Ė"},{key:[69,102,114,59],value:"𝔈"},{key:[69,103,114,97,118,101,59],value:"È"},{key:[69,108,101,109,101,110,116,59],value:"∈"},{key:[69,109,97,99,114,59],value:"Ē"},{key:[69,109,112,116,121,83,109,97,108,108,83,113,117,97,114,101,59],value:"◻"},{key:[69,109,112,116,121,86,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59],value:"▫"},{key:[69,111,103,111,110,59],value:"Ę"},{key:[69,111,112,102,59],value:"𝔼"},{key:[69,112,115,105,108,111,110,59],value:"Ε"},{key:[69,113,117,97,108,59],value:"⩵"},{key:[69,113,117,97,108,84,105,108,100,101,59],value:"≂"},{key:[69,113,117,105,108,105,98,114,105,117,109,59],value:"⇌"},{key:[69,115,99,114,59],value:"ℰ"},{key:[69,115,105,109,59],value:"⩳"},{key:[69,116,97,59],value:"Η"},{key:[69,117,109,108,59],value:"Ë"},{key:[69,120,105,115,116,115,59],value:"∃"},{key:[69,120,112,111,110,101,110,116,105,97,108,69,59],value:"ⅇ"},{key:[70,99,121,59],value:"Ф"},{key:[70,102,114,59],value:"𝔉"},{key:[70,105,108,108,101,100,83,109,97,108,108,83,113,117,97,114,101,59],value:"◼"},{key:[70,105,108,108,101,100,86,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59],value:"▪"},{key:[70,111,112,102,59],value:"𝔽"},{key:[70,111,114,65,108,108,59],value:"∀"},{key:[70,111,117,114,105,101,114,116,114,102,59],value:"ℱ"},{key:[70,115,99,114,59],value:"ℱ"},{key:[71,74,99,121,59],value:"Ѓ"},{key:[71,84,59],value:">"},{key:[71,97,109,109,97,59],value:"Γ"},{key:[71,97,109,109,97,100,59],value:"Ϝ"},{key:[71,98,114,101,118,101,59],value:"Ğ"},{key:[71,99,101,100,105,108,59],value:"Ģ"},{key:[71,99,105,114,99,59],value:"Ĝ"},{key:[71,99,121,59],value:"Г"},{key:[71,100,111,116,59],value:"Ġ"},{key:[71,102,114,59],value:"𝔊"},{key:[71,103,59],value:"⋙"},{key:[71,111,112,102,59],value:"𝔾"},{key:[71,114,101,97,116,101,114,69,113,117,97,108,59],value:"≥"},{key:[71,114,101,97,116,101,114,69,113,117,97,108,76,101,115,115,59],value:"⋛"},{key:[71,114,101,97,116,101,114,70,117,108,108,69,113,117,97,108,59],value:"≧"},{key:[71,114,101,97,116,101,114,71,114,101,97,116,101,114,59],value:"⪢"},{key:[71,114,101,97,116,101,114,76,101,115,115,59],value:"≷"},{key:[71,114,101,97,116,101,114,83,108,97,110,116,69,113,117,97,108,59],value:"⩾"},{key:[71,114,101,97,116,101,114,84,105,108,100,101,59],value:"≳"},{key:[71,115,99,114,59],value:"𝒢"},{key:[71,116,59],value:"≫"},{key:[72,65,82,68,99,121,59],value:"Ъ"},{key:[72,97,99,101,107,59],value:"ˇ"},{key:[72,97,116,59],value:"^"},{key:[72,99,105,114,99,59],value:"Ĥ"},{key:[72,102,114,59],value:"ℌ"},{key:[72,105,108,98,101,114,116,83,112,97,99,101,59],value:"ℋ"},{key:[72,111,112,102,59],value:"ℍ"},{key:[72,111,114,105,122,111,110,116,97,108,76,105,110,101,59],value:"─"},{key:[72,115,99,114,59],value:"ℋ"},{key:[72,115,116,114,111,107,59],value:"Ħ"},{key:[72,117,109,112,68,111,119,110,72,117,109,112,59],value:"≎"},{key:[72,117,109,112,69,113,117,97,108,59],value:"≏"},{key:[73,69,99,121,59],value:"Е"},{key:[73,74,108,105,103,59],value:"IJ"},{key:[73,79,99,121,59],value:"Ё"},{key:[73,97,99,117,116,101,59],value:"Í"},{key:[73,99,105,114,99,59],value:"Î"},{key:[73,99,121,59],value:"И"},{key:[73,100,111,116,59],value:"İ"},{key:[73,102,114,59],value:"ℑ"},{key:[73,103,114,97,118,101,59],value:"Ì"},{key:[73,109,59],value:"ℑ"},{key:[73,109,97,99,114,59],value:"Ī"},{key:[73,109,97,103,105,110,97,114,121,73,59],value:"ⅈ"},{key:[73,109,112,108,105,101,115,59],value:"⇒"},{key:[73,110,116,59],value:"∬"},{key:[73,110,116,101,103,114,97,108,59],value:"∫"},{key:[73,110,116,101,114,115,101,99,116,105,111,110,59],value:"⋂"},{key:[73,110,118,105,115,105,98,108,101,67,111,109,109,97,59],value:"⁣"},{key:[73,110,118,105,115,105,98,108,101,84,105,109,101,115,59],value:"⁢"},{key:[73,111,103,111,110,59],value:"Į"},{key:[73,111,112,102,59],value:"𝕀"},{key:[73,111,116,97,59],value:"Ι"},{key:[73,115,99,114,59],value:"ℐ"},{key:[73,116,105,108,100,101,59],value:"Ĩ"},{key:[73,117,107,99,121,59],value:"І"},{key:[73,117,109,108,59],value:"Ï"},{key:[74,99,105,114,99,59],value:"Ĵ"},{key:[74,99,121,59],value:"Й"},{key:[74,102,114,59],value:"𝔍"},{key:[74,111,112,102,59],value:"𝕁"},{key:[74,115,99,114,59],value:"𝒥"},{key:[74,115,101,114,99,121,59],value:"Ј"},{key:[74,117,107,99,121,59],value:"Є"},{key:[75,72,99,121,59],value:"Х"},{key:[75,74,99,121,59],value:"Ќ"},{key:[75,97,112,112,97,59],value:"Κ"},{key:[75,99,101,100,105,108,59],value:"Ķ"},{key:[75,99,121,59],value:"К"},{key:[75,102,114,59],value:"𝔎"},{key:[75,111,112,102,59],value:"𝕂"},{key:[75,115,99,114,59],value:"𝒦"},{key:[76,74,99,121,59],value:"Љ"},{key:[76,84,59],value:"<"},{key:[76,97,99,117,116,101,59],value:"Ĺ"},{key:[76,97,109,98,100,97,59],value:"Λ"},{key:[76,97,110,103,59],value:"⟪"},{key:[76,97,112,108,97,99,101,116,114,102,59],value:"ℒ"},{key:[76,97,114,114,59],value:"↞"},{key:[76,99,97,114,111,110,59],value:"Ľ"},{key:[76,99,101,100,105,108,59],value:"Ļ"},{key:[76,99,121,59],value:"Л"},{key:[76,101,102,116,65,110,103,108,101,66,114,97,99,107,101,116,59],value:"⟨"},{key:[76,101,102,116,65,114,114,111,119,59],value:"←"},{key:[76,101,102,116,65,114,114,111,119,66,97,114,59],value:"⇤"},{key:[76,101,102,116,65,114,114,111,119,82,105,103,104,116,65,114,114,111,119,59],value:"⇆"},{key:[76,101,102,116,67,101,105,108,105,110,103,59],value:"⌈"},{key:[76,101,102,116,68,111,117,98,108,101,66,114,97,99,107,101,116,59],value:"⟦"},{key:[76,101,102,116,68,111,119,110,84,101,101,86,101,99,116,111,114,59],value:"⥡"},{key:[76,101,102,116,68,111,119,110,86,101,99,116,111,114,59],value:"⇃"},{key:[76,101,102,116,68,111,119,110,86,101,99,116,111,114,66,97,114,59],value:"⥙"},{key:[76,101,102,116,70,108,111,111,114,59],value:"⌊"},{key:[76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"↔"},{key:[76,101,102,116,82,105,103,104,116,86,101,99,116,111,114,59],value:"⥎"},{key:[76,101,102,116,84,101,101,59],value:"⊣"},{key:[76,101,102,116,84,101,101,65,114,114,111,119,59],value:"↤"},{key:[76,101,102,116,84,101,101,86,101,99,116,111,114,59],value:"⥚"},{key:[76,101,102,116,84,114,105,97,110,103,108,101,59],value:"⊲"},{key:[76,101,102,116,84,114,105,97,110,103,108,101,66,97,114,59],value:"⧏"},{key:[76,101,102,116,84,114,105,97,110,103,108,101,69,113,117,97,108,59],value:"⊴"},{key:[76,101,102,116,85,112,68,111,119,110,86,101,99,116,111,114,59],value:"⥑"},{key:[76,101,102,116,85,112,84,101,101,86,101,99,116,111,114,59],value:"⥠"},{key:[76,101,102,116,85,112,86,101,99,116,111,114,59],value:"↿"},{key:[76,101,102,116,85,112,86,101,99,116,111,114,66,97,114,59],value:"⥘"},{key:[76,101,102,116,86,101,99,116,111,114,59],value:"↼"},{key:[76,101,102,116,86,101,99,116,111,114,66,97,114,59],value:"⥒"},{key:[76,101,102,116,97,114,114,111,119,59],value:"⇐"},{key:[76,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"⇔"},{key:[76,101,115,115,69,113,117,97,108,71,114,101,97,116,101,114,59],value:"⋚"},{key:[76,101,115,115,70,117,108,108,69,113,117,97,108,59],value:"≦"},{key:[76,101,115,115,71,114,101,97,116,101,114,59],value:"≶"},{key:[76,101,115,115,76,101,115,115,59],value:"⪡"},{key:[76,101,115,115,83,108,97,110,116,69,113,117,97,108,59],value:"⩽"},{key:[76,101,115,115,84,105,108,100,101,59],value:"≲"},{key:[76,102,114,59],value:"𝔏"},{key:[76,108,59],value:"⋘"},{key:[76,108,101,102,116,97,114,114,111,119,59],value:"⇚"},{key:[76,109,105,100,111,116,59],value:"Ŀ"},{key:[76,111,110,103,76,101,102,116,65,114,114,111,119,59],value:"⟵"},{key:[76,111,110,103,76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"⟷"},{key:[76,111,110,103,82,105,103,104,116,65,114,114,111,119,59],value:"⟶"},{key:[76,111,110,103,108,101,102,116,97,114,114,111,119,59],value:"⟸"},{key:[76,111,110,103,108,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"⟺"},{key:[76,111,110,103,114,105,103,104,116,97,114,114,111,119,59],value:"⟹"},{key:[76,111,112,102,59],value:"𝕃"},{key:[76,111,119,101,114,76,101,102,116,65,114,114,111,119,59],value:"↙"},{key:[76,111,119,101,114,82,105,103,104,116,65,114,114,111,119,59],value:"↘"},{key:[76,115,99,114,59],value:"ℒ"},{key:[76,115,104,59],value:"↰"},{key:[76,115,116,114,111,107,59],value:"Ł"},{key:[76,116,59],value:"≪"},{key:[77,97,112,59],value:"⤅"},{key:[77,99,121,59],value:"М"},{key:[77,101,100,105,117,109,83,112,97,99,101,59],value:" "},{key:[77,101,108,108,105,110,116,114,102,59],value:"ℳ"},{key:[77,102,114,59],value:"𝔐"},{key:[77,105,110,117,115,80,108,117,115,59],value:"∓"},{key:[77,111,112,102,59],value:"𝕄"},{key:[77,115,99,114,59],value:"ℳ"},{key:[77,117,59],value:"Μ"},{key:[78,74,99,121,59],value:"Њ"},{key:[78,97,99,117,116,101,59],value:"Ń"},{key:[78,99,97,114,111,110,59],value:"Ň"},{key:[78,99,101,100,105,108,59],value:"Ņ"},{key:[78,99,121,59],value:"Н"},{key:[78,101,103,97,116,105,118,101,77,101,100,105,117,109,83,112,97,99,101,59],value:"​"},{key:[78,101,103,97,116,105,118,101,84,104,105,99,107,83,112,97,99,101,59],value:"​"},{key:[78,101,103,97,116,105,118,101,84,104,105,110,83,112,97,99,101,59],value:"​"},{key:[78,101,103,97,116,105,118,101,86,101,114,121,84,104,105,110,83,112,97,99,101,59],value:"​"},{key:[78,101,115,116,101,100,71,114,101,97,116,101,114,71,114,101,97,116,101,114,59],value:"≫"},{key:[78,101,115,116,101,100,76,101,115,115,76,101,115,115,59],value:"≪"},{key:[78,101,119,76,105,110,101,59],value:` `},{key:[78,102,114,59],value:"𝔑"},{key:[78,111,66,114,101,97,107,59],value:"⁠"},{key:[78,111,110,66,114,101,97,107,105,110,103,83,112,97,99,101,59],value:" "},{key:[78,111,112,102,59],value:"ℕ"},{key:[78,111,116,59],value:"⫬"},{key:[78,111,116,67,111,110,103,114,117,101,110,116,59],value:"≢"},{key:[78,111,116,67,117,112,67,97,112,59],value:"≭"},{key:[78,111,116,68,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59],value:"∦"},{key:[78,111,116,69,108,101,109,101,110,116,59],value:"∉"},{key:[78,111,116,69,113,117,97,108,59],value:"≠"},{key:[78,111,116,69,113,117,97,108,84,105,108,100,101,59],value:"≂̸"},{key:[78,111,116,69,120,105,115,116,115,59],value:"∄"},{key:[78,111,116,71,114,101,97,116,101,114,59],value:"≯"},{key:[78,111,116,71,114,101,97,116,101,114,69,113,117,97,108,59],value:"≱"},{key:[78,111,116,71,114,101,97,116,101,114,70,117,108,108,69,113,117,97,108,59],value:"≧̸"},{key:[78,111,116,71,114,101,97,116,101,114,71,114,101,97,116,101,114,59],value:"≫̸"},{key:[78,111,116,71,114,101,97,116,101,114,76,101,115,115,59],value:"≹"},{key:[78,111,116,71,114,101,97,116,101,114,83,108,97,110,116,69,113,117,97,108,59],value:"⩾̸"},{key:[78,111,116,71,114,101,97,116,101,114,84,105,108,100,101,59],value:"≵"},{key:[78,111,116,72,117,109,112,68,111,119,110,72,117,109,112,59],value:"≎̸"},{key:[78,111,116,72,117,109,112,69,113,117,97,108,59],value:"≏̸"},{key:[78,111,116,76,101,102,116,84,114,105,97,110,103,108,101,59],value:"⋪"},{key:[78,111,116,76,101,102,116,84,114,105,97,110,103,108,101,66,97,114,59],value:"⧏̸"},{key:[78,111,116,76,101,102,116,84,114,105,97,110,103,108,101,69,113,117,97,108,59],value:"⋬"},{key:[78,111,116,76,101,115,115,59],value:"≮"},{key:[78,111,116,76,101,115,115,69,113,117,97,108,59],value:"≰"},{key:[78,111,116,76,101,115,115,71,114,101,97,116,101,114,59],value:"≸"},{key:[78,111,116,76,101,115,115,76,101,115,115,59],value:"≪̸"},{key:[78,111,116,76,101,115,115,83,108,97,110,116,69,113,117,97,108,59],value:"⩽̸"},{key:[78,111,116,76,101,115,115,84,105,108,100,101,59],value:"≴"},{key:[78,111,116,78,101,115,116,101,100,71,114,101,97,116,101,114,71,114,101,97,116,101,114,59],value:"⪢̸"},{key:[78,111,116,78,101,115,116,101,100,76,101,115,115,76,101,115,115,59],value:"⪡̸"},{key:[78,111,116,80,114,101,99,101,100,101,115,59],value:"⊀"},{key:[78,111,116,80,114,101,99,101,100,101,115,69,113,117,97,108,59],value:"⪯̸"},{key:[78,111,116,80,114,101,99,101,100,101,115,83,108,97,110,116,69,113,117,97,108,59],value:"⋠"},{key:[78,111,116,82,101,118,101,114,115,101,69,108,101,109,101,110,116,59],value:"∌"},{key:[78,111,116,82,105,103,104,116,84,114,105,97,110,103,108,101,59],value:"⋫"},{key:[78,111,116,82,105,103,104,116,84,114,105,97,110,103,108,101,66,97,114,59],value:"⧐̸"},{key:[78,111,116,82,105,103,104,116,84,114,105,97,110,103,108,101,69,113,117,97,108,59],value:"⋭"},{key:[78,111,116,83,113,117,97,114,101,83,117,98,115,101,116,59],value:"⊏̸"},{key:[78,111,116,83,113,117,97,114,101,83,117,98,115,101,116,69,113,117,97,108,59],value:"⋢"},{key:[78,111,116,83,113,117,97,114,101,83,117,112,101,114,115,101,116,59],value:"⊐̸"},{key:[78,111,116,83,113,117,97,114,101,83,117,112,101,114,115,101,116,69,113,117,97,108,59],value:"⋣"},{key:[78,111,116,83,117,98,115,101,116,59],value:"⊂⃒"},{key:[78,111,116,83,117,98,115,101,116,69,113,117,97,108,59],value:"⊈"},{key:[78,111,116,83,117,99,99,101,101,100,115,59],value:"⊁"},{key:[78,111,116,83,117,99,99,101,101,100,115,69,113,117,97,108,59],value:"⪰̸"},{key:[78,111,116,83,117,99,99,101,101,100,115,83,108,97,110,116,69,113,117,97,108,59],value:"⋡"},{key:[78,111,116,83,117,99,99,101,101,100,115,84,105,108,100,101,59],value:"≿̸"},{key:[78,111,116,83,117,112,101,114,115,101,116,59],value:"⊃⃒"},{key:[78,111,116,83,117,112,101,114,115,101,116,69,113,117,97,108,59],value:"⊉"},{key:[78,111,116,84,105,108,100,101,59],value:"≁"},{key:[78,111,116,84,105,108,100,101,69,113,117,97,108,59],value:"≄"},{key:[78,111,116,84,105,108,100,101,70,117,108,108,69,113,117,97,108,59],value:"≇"},{key:[78,111,116,84,105,108,100,101,84,105,108,100,101,59],value:"≉"},{key:[78,111,116,86,101,114,116,105,99,97,108,66,97,114,59],value:"∤"},{key:[78,115,99,114,59],value:"𝒩"},{key:[78,116,105,108,100,101,59],value:"Ñ"},{key:[78,117,59],value:"Ν"},{key:[79,69,108,105,103,59],value:"Œ"},{key:[79,97,99,117,116,101,59],value:"Ó"},{key:[79,99,105,114,99,59],value:"Ô"},{key:[79,99,121,59],value:"О"},{key:[79,100,98,108,97,99,59],value:"Ő"},{key:[79,102,114,59],value:"𝔒"},{key:[79,103,114,97,118,101,59],value:"Ò"},{key:[79,109,97,99,114,59],value:"Ō"},{key:[79,109,101,103,97,59],value:"Ω"},{key:[79,109,105,99,114,111,110,59],value:"Ο"},{key:[79,111,112,102,59],value:"𝕆"},{key:[79,112,101,110,67,117,114,108,121,68,111,117,98,108,101,81,117,111,116,101,59],value:"“"},{key:[79,112,101,110,67,117,114,108,121,81,117,111,116,101,59],value:"‘"},{key:[79,114,59],value:"⩔"},{key:[79,115,99,114,59],value:"𝒪"},{key:[79,115,108,97,115,104,59],value:"Ø"},{key:[79,116,105,108,100,101,59],value:"Õ"},{key:[79,116,105,109,101,115,59],value:"⨷"},{key:[79,117,109,108,59],value:"Ö"},{key:[79,118,101,114,66,97,114,59],value:"‾"},{key:[79,118,101,114,66,114,97,99,101,59],value:"⏞"},{key:[79,118,101,114,66,114,97,99,107,101,116,59],value:"⎴"},{key:[79,118,101,114,80,97,114,101,110,116,104,101,115,105,115,59],value:"⏜"},{key:[80,97,114,116,105,97,108,68,59],value:"∂"},{key:[80,99,121,59],value:"П"},{key:[80,102,114,59],value:"𝔓"},{key:[80,104,105,59],value:"Φ"},{key:[80,105,59],value:"Π"},{key:[80,108,117,115,77,105,110,117,115,59],value:"±"},{key:[80,111,105,110,99,97,114,101,112,108,97,110,101,59],value:"ℌ"},{key:[80,111,112,102,59],value:"ℙ"},{key:[80,114,59],value:"⪻"},{key:[80,114,101,99,101,100,101,115,59],value:"≺"},{key:[80,114,101,99,101,100,101,115,69,113,117,97,108,59],value:"⪯"},{key:[80,114,101,99,101,100,101,115,83,108,97,110,116,69,113,117,97,108,59],value:"≼"},{key:[80,114,101,99,101,100,101,115,84,105,108,100,101,59],value:"≾"},{key:[80,114,105,109,101,59],value:"″"},{key:[80,114,111,100,117,99,116,59],value:"∏"},{key:[80,114,111,112,111,114,116,105,111,110,59],value:"∷"},{key:[80,114,111,112,111,114,116,105,111,110,97,108,59],value:"∝"},{key:[80,115,99,114,59],value:"𝒫"},{key:[80,115,105,59],value:"Ψ"},{key:[81,85,79,84,59],value:'"'},{key:[81,102,114,59],value:"𝔔"},{key:[81,111,112,102,59],value:"ℚ"},{key:[81,115,99,114,59],value:"𝒬"},{key:[82,66,97,114,114,59],value:"⤐"},{key:[82,69,71,59],value:"®"},{key:[82,97,99,117,116,101,59],value:"Ŕ"},{key:[82,97,110,103,59],value:"⟫"},{key:[82,97,114,114,59],value:"↠"},{key:[82,97,114,114,116,108,59],value:"⤖"},{key:[82,99,97,114,111,110,59],value:"Ř"},{key:[82,99,101,100,105,108,59],value:"Ŗ"},{key:[82,99,121,59],value:"Р"},{key:[82,101,59],value:"ℜ"},{key:[82,101,118,101,114,115,101,69,108,101,109,101,110,116,59],value:"∋"},{key:[82,101,118,101,114,115,101,69,113,117,105,108,105,98,114,105,117,109,59],value:"⇋"},{key:[82,101,118,101,114,115,101,85,112,69,113,117,105,108,105,98,114,105,117,109,59],value:"⥯"},{key:[82,102,114,59],value:"ℜ"},{key:[82,104,111,59],value:"Ρ"},{key:[82,105,103,104,116,65,110,103,108,101,66,114,97,99,107,101,116,59],value:"⟩"},{key:[82,105,103,104,116,65,114,114,111,119,59],value:"→"},{key:[82,105,103,104,116,65,114,114,111,119,66,97,114,59],value:"⇥"},{key:[82,105,103,104,116,65,114,114,111,119,76,101,102,116,65,114,114,111,119,59],value:"⇄"},{key:[82,105,103,104,116,67,101,105,108,105,110,103,59],value:"⌉"},{key:[82,105,103,104,116,68,111,117,98,108,101,66,114,97,99,107,101,116,59],value:"⟧"},{key:[82,105,103,104,116,68,111,119,110,84,101,101,86,101,99,116,111,114,59],value:"⥝"},{key:[82,105,103,104,116,68,111,119,110,86,101,99,116,111,114,59],value:"⇂"},{key:[82,105,103,104,116,68,111,119,110,86,101,99,116,111,114,66,97,114,59],value:"⥕"},{key:[82,105,103,104,116,70,108,111,111,114,59],value:"⌋"},{key:[82,105,103,104,116,84,101,101,59],value:"⊢"},{key:[82,105,103,104,116,84,101,101,65,114,114,111,119,59],value:"↦"},{key:[82,105,103,104,116,84,101,101,86,101,99,116,111,114,59],value:"⥛"},{key:[82,105,103,104,116,84,114,105,97,110,103,108,101,59],value:"⊳"},{key:[82,105,103,104,116,84,114,105,97,110,103,108,101,66,97,114,59],value:"⧐"},{key:[82,105,103,104,116,84,114,105,97,110,103,108,101,69,113,117,97,108,59],value:"⊵"},{key:[82,105,103,104,116,85,112,68,111,119,110,86,101,99,116,111,114,59],value:"⥏"},{key:[82,105,103,104,116,85,112,84,101,101,86,101,99,116,111,114,59],value:"⥜"},{key:[82,105,103,104,116,85,112,86,101,99,116,111,114,59],value:"↾"},{key:[82,105,103,104,116,85,112,86,101,99,116,111,114,66,97,114,59],value:"⥔"},{key:[82,105,103,104,116,86,101,99,116,111,114,59],value:"⇀"},{key:[82,105,103,104,116,86,101,99,116,111,114,66,97,114,59],value:"⥓"},{key:[82,105,103,104,116,97,114,114,111,119,59],value:"⇒"},{key:[82,111,112,102,59],value:"ℝ"},{key:[82,111,117,110,100,73,109,112,108,105,101,115,59],value:"⥰"},{key:[82,114,105,103,104,116,97,114,114,111,119,59],value:"⇛"},{key:[82,115,99,114,59],value:"ℛ"},{key:[82,115,104,59],value:"↱"},{key:[82,117,108,101,68,101,108,97,121,101,100,59],value:"⧴"},{key:[83,72,67,72,99,121,59],value:"Щ"},{key:[83,72,99,121,59],value:"Ш"},{key:[83,79,70,84,99,121,59],value:"Ь"},{key:[83,97,99,117,116,101,59],value:"Ś"},{key:[83,99,59],value:"⪼"},{key:[83,99,97,114,111,110,59],value:"Š"},{key:[83,99,101,100,105,108,59],value:"Ş"},{key:[83,99,105,114,99,59],value:"Ŝ"},{key:[83,99,121,59],value:"С"},{key:[83,102,114,59],value:"𝔖"},{key:[83,104,111,114,116,68,111,119,110,65,114,114,111,119,59],value:"↓"},{key:[83,104,111,114,116,76,101,102,116,65,114,114,111,119,59],value:"←"},{key:[83,104,111,114,116,82,105,103,104,116,65,114,114,111,119,59],value:"→"},{key:[83,104,111,114,116,85,112,65,114,114,111,119,59],value:"↑"},{key:[83,105,103,109,97,59],value:"Σ"},{key:[83,109,97,108,108,67,105,114,99,108,101,59],value:"∘"},{key:[83,111,112,102,59],value:"𝕊"},{key:[83,113,114,116,59],value:"√"},{key:[83,113,117,97,114,101,59],value:"□"},{key:[83,113,117,97,114,101,73,110,116,101,114,115,101,99,116,105,111,110,59],value:"⊓"},{key:[83,113,117,97,114,101,83,117,98,115,101,116,59],value:"⊏"},{key:[83,113,117,97,114,101,83,117,98,115,101,116,69,113,117,97,108,59],value:"⊑"},{key:[83,113,117,97,114,101,83,117,112,101,114,115,101,116,59],value:"⊐"},{key:[83,113,117,97,114,101,83,117,112,101,114,115,101,116,69,113,117,97,108,59],value:"⊒"},{key:[83,113,117,97,114,101,85,110,105,111,110,59],value:"⊔"},{key:[83,115,99,114,59],value:"𝒮"},{key:[83,116,97,114,59],value:"⋆"},{key:[83,117,98,59],value:"⋐"},{key:[83,117,98,115,101,116,59],value:"⋐"},{key:[83,117,98,115,101,116,69,113,117,97,108,59],value:"⊆"},{key:[83,117,99,99,101,101,100,115,59],value:"≻"},{key:[83,117,99,99,101,101,100,115,69,113,117,97,108,59],value:"⪰"},{key:[83,117,99,99,101,101,100,115,83,108,97,110,116,69,113,117,97,108,59],value:"≽"},{key:[83,117,99,99,101,101,100,115,84,105,108,100,101,59],value:"≿"},{key:[83,117,99,104,84,104,97,116,59],value:"∋"},{key:[83,117,109,59],value:"∑"},{key:[83,117,112,59],value:"⋑"},{key:[83,117,112,101,114,115,101,116,59],value:"⊃"},{key:[83,117,112,101,114,115,101,116,69,113,117,97,108,59],value:"⊇"},{key:[83,117,112,115,101,116,59],value:"⋑"},{key:[84,72,79,82,78,59],value:"Þ"},{key:[84,82,65,68,69,59],value:"™"},{key:[84,83,72,99,121,59],value:"Ћ"},{key:[84,83,99,121,59],value:"Ц"},{key:[84,97,98,59],value:" "},{key:[84,97,117,59],value:"Τ"},{key:[84,99,97,114,111,110,59],value:"Ť"},{key:[84,99,101,100,105,108,59],value:"Ţ"},{key:[84,99,121,59],value:"Т"},{key:[84,102,114,59],value:"𝔗"},{key:[84,104,101,114,101,102,111,114,101,59],value:"∴"},{key:[84,104,101,116,97,59],value:"Θ"},{key:[84,104,105,99,107,83,112,97,99,101,59],value:"  "},{key:[84,104,105,110,83,112,97,99,101,59],value:" "},{key:[84,105,108,100,101,59],value:"∼"},{key:[84,105,108,100,101,69,113,117,97,108,59],value:"≃"},{key:[84,105,108,100,101,70,117,108,108,69,113,117,97,108,59],value:"≅"},{key:[84,105,108,100,101,84,105,108,100,101,59],value:"≈"},{key:[84,111,112,102,59],value:"𝕋"},{key:[84,114,105,112,108,101,68,111,116,59],value:"⃛"},{key:[84,115,99,114,59],value:"𝒯"},{key:[84,115,116,114,111,107,59],value:"Ŧ"},{key:[85,97,99,117,116,101,59],value:"Ú"},{key:[85,97,114,114,59],value:"↟"},{key:[85,97,114,114,111,99,105,114,59],value:"⥉"},{key:[85,98,114,99,121,59],value:"Ў"},{key:[85,98,114,101,118,101,59],value:"Ŭ"},{key:[85,99,105,114,99,59],value:"Û"},{key:[85,99,121,59],value:"У"},{key:[85,100,98,108,97,99,59],value:"Ű"},{key:[85,102,114,59],value:"𝔘"},{key:[85,103,114,97,118,101,59],value:"Ù"},{key:[85,109,97,99,114,59],value:"Ū"},{key:[85,110,100,101,114,66,97,114,59],value:"_"},{key:[85,110,100,101,114,66,114,97,99,101,59],value:"⏟"},{key:[85,110,100,101,114,66,114,97,99,107,101,116,59],value:"⎵"},{key:[85,110,100,101,114,80,97,114,101,110,116,104,101,115,105,115,59],value:"⏝"},{key:[85,110,105,111,110,59],value:"⋃"},{key:[85,110,105,111,110,80,108,117,115,59],value:"⊎"},{key:[85,111,103,111,110,59],value:"Ų"},{key:[85,111,112,102,59],value:"𝕌"},{key:[85,112,65,114,114,111,119,59],value:"↑"},{key:[85,112,65,114,114,111,119,66,97,114,59],value:"⤒"},{key:[85,112,65,114,114,111,119,68,111,119,110,65,114,114,111,119,59],value:"⇅"},{key:[85,112,68,111,119,110,65,114,114,111,119,59],value:"↕"},{key:[85,112,69,113,117,105,108,105,98,114,105,117,109,59],value:"⥮"},{key:[85,112,84,101,101,59],value:"⊥"},{key:[85,112,84,101,101,65,114,114,111,119,59],value:"↥"},{key:[85,112,97,114,114,111,119,59],value:"⇑"},{key:[85,112,100,111,119,110,97,114,114,111,119,59],value:"⇕"},{key:[85,112,112,101,114,76,101,102,116,65,114,114,111,119,59],value:"↖"},{key:[85,112,112,101,114,82,105,103,104,116,65,114,114,111,119,59],value:"↗"},{key:[85,112,115,105,59],value:"ϒ"},{key:[85,112,115,105,108,111,110,59],value:"Υ"},{key:[85,114,105,110,103,59],value:"Ů"},{key:[85,115,99,114,59],value:"𝒰"},{key:[85,116,105,108,100,101,59],value:"Ũ"},{key:[85,117,109,108,59],value:"Ü"},{key:[86,68,97,115,104,59],value:"⊫"},{key:[86,98,97,114,59],value:"⫫"},{key:[86,99,121,59],value:"В"},{key:[86,100,97,115,104,59],value:"⊩"},{key:[86,100,97,115,104,108,59],value:"⫦"},{key:[86,101,101,59],value:"⋁"},{key:[86,101,114,98,97,114,59],value:"‖"},{key:[86,101,114,116,59],value:"‖"},{key:[86,101,114,116,105,99,97,108,66,97,114,59],value:"∣"},{key:[86,101,114,116,105,99,97,108,76,105,110,101,59],value:"|"},{key:[86,101,114,116,105,99,97,108,83,101,112,97,114,97,116,111,114,59],value:"❘"},{key:[86,101,114,116,105,99,97,108,84,105,108,100,101,59],value:"≀"},{key:[86,101,114,121,84,104,105,110,83,112,97,99,101,59],value:" "},{key:[86,102,114,59],value:"𝔙"},{key:[86,111,112,102,59],value:"𝕍"},{key:[86,115,99,114,59],value:"𝒱"},{key:[86,118,100,97,115,104,59],value:"⊪"},{key:[87,99,105,114,99,59],value:"Ŵ"},{key:[87,101,100,103,101,59],value:"⋀"},{key:[87,102,114,59],value:"𝔚"},{key:[87,111,112,102,59],value:"𝕎"},{key:[87,115,99,114,59],value:"𝒲"},{key:[88,102,114,59],value:"𝔛"},{key:[88,105,59],value:"Ξ"},{key:[88,111,112,102,59],value:"𝕏"},{key:[88,115,99,114,59],value:"𝒳"},{key:[89,65,99,121,59],value:"Я"},{key:[89,73,99,121,59],value:"Ї"},{key:[89,85,99,121,59],value:"Ю"},{key:[89,97,99,117,116,101,59],value:"Ý"},{key:[89,99,105,114,99,59],value:"Ŷ"},{key:[89,99,121,59],value:"Ы"},{key:[89,102,114,59],value:"𝔜"},{key:[89,111,112,102,59],value:"𝕐"},{key:[89,115,99,114,59],value:"𝒴"},{key:[89,117,109,108,59],value:"Ÿ"},{key:[90,72,99,121,59],value:"Ж"},{key:[90,97,99,117,116,101,59],value:"Ź"},{key:[90,99,97,114,111,110,59],value:"Ž"},{key:[90,99,121,59],value:"З"},{key:[90,100,111,116,59],value:"Ż"},{key:[90,101,114,111,87,105,100,116,104,83,112,97,99,101,59],value:"​"},{key:[90,101,116,97,59],value:"Ζ"},{key:[90,102,114,59],value:"ℨ"},{key:[90,111,112,102,59],value:"ℤ"},{key:[90,115,99,114,59],value:"𝒵"},{key:[97,97,99,117,116,101,59],value:"á"},{key:[97,98,114,101,118,101,59],value:"ă"},{key:[97,99,59],value:"∾"},{key:[97,99,69,59],value:"∾̳"},{key:[97,99,100,59],value:"∿"},{key:[97,99,105,114,99,59],value:"â"},{key:[97,99,117,116,101,59],value:"´"},{key:[97,99,121,59],value:"а"},{key:[97,101,108,105,103,59],value:"æ"},{key:[97,102,59],value:"⁡"},{key:[97,102,114,59],value:"𝔞"},{key:[97,103,114,97,118,101,59],value:"à"},{key:[97,108,101,102,115,121,109,59],value:"ℵ"},{key:[97,108,101,112,104,59],value:"ℵ"},{key:[97,108,112,104,97,59],value:"α"},{key:[97,109,97,99,114,59],value:"ā"},{key:[97,109,97,108,103,59],value:"⨿"},{key:[97,109,112,59],value:"&"},{key:[97,110,100,59],value:"∧"},{key:[97,110,100,97,110,100,59],value:"⩕"},{key:[97,110,100,100,59],value:"⩜"},{key:[97,110,100,115,108,111,112,101,59],value:"⩘"},{key:[97,110,100,118,59],value:"⩚"},{key:[97,110,103,59],value:"∠"},{key:[97,110,103,101,59],value:"⦤"},{key:[97,110,103,108,101,59],value:"∠"},{key:[97,110,103,109,115,100,59],value:"∡"},{key:[97,110,103,109,115,100,97,97,59],value:"⦨"},{key:[97,110,103,109,115,100,97,98,59],value:"⦩"},{key:[97,110,103,109,115,100,97,99,59],value:"⦪"},{key:[97,110,103,109,115,100,97,100,59],value:"⦫"},{key:[97,110,103,109,115,100,97,101,59],value:"⦬"},{key:[97,110,103,109,115,100,97,102,59],value:"⦭"},{key:[97,110,103,109,115,100,97,103,59],value:"⦮"},{key:[97,110,103,109,115,100,97,104,59],value:"⦯"},{key:[97,110,103,114,116,59],value:"∟"},{key:[97,110,103,114,116,118,98,59],value:"⊾"},{key:[97,110,103,114,116,118,98,100,59],value:"⦝"},{key:[97,110,103,115,112,104,59],value:"∢"},{key:[97,110,103,115,116,59],value:"Å"},{key:[97,110,103,122,97,114,114,59],value:"⍼"},{key:[97,111,103,111,110,59],value:"ą"},{key:[97,111,112,102,59],value:"𝕒"},{key:[97,112,59],value:"≈"},{key:[97,112,69,59],value:"⩰"},{key:[97,112,97,99,105,114,59],value:"⩯"},{key:[97,112,101,59],value:"≊"},{key:[97,112,105,100,59],value:"≋"},{key:[97,112,111,115,59],value:"'"},{key:[97,112,112,114,111,120,59],value:"≈"},{key:[97,112,112,114,111,120,101,113,59],value:"≊"},{key:[97,114,105,110,103,59],value:"å"},{key:[97,115,99,114,59],value:"𝒶"},{key:[97,115,116,59],value:"*"},{key:[97,115,121,109,112,59],value:"≈"},{key:[97,115,121,109,112,101,113,59],value:"≍"},{key:[97,116,105,108,100,101,59],value:"ã"},{key:[97,117,109,108,59],value:"ä"},{key:[97,119,99,111,110,105,110,116,59],value:"∳"},{key:[97,119,105,110,116,59],value:"⨑"},{key:[98,78,111,116,59],value:"⫭"},{key:[98,97,99,107,99,111,110,103,59],value:"≌"},{key:[98,97,99,107,101,112,115,105,108,111,110,59],value:"϶"},{key:[98,97,99,107,112,114,105,109,101,59],value:"‵"},{key:[98,97,99,107,115,105,109,59],value:"∽"},{key:[98,97,99,107,115,105,109,101,113,59],value:"⋍"},{key:[98,97,114,118,101,101,59],value:"⊽"},{key:[98,97,114,119,101,100,59],value:"⌅"},{key:[98,97,114,119,101,100,103,101,59],value:"⌅"},{key:[98,98,114,107,59],value:"⎵"},{key:[98,98,114,107,116,98,114,107,59],value:"⎶"},{key:[98,99,111,110,103,59],value:"≌"},{key:[98,99,121,59],value:"б"},{key:[98,100,113,117,111,59],value:"„"},{key:[98,101,99,97,117,115,59],value:"∵"},{key:[98,101,99,97,117,115,101,59],value:"∵"},{key:[98,101,109,112,116,121,118,59],value:"⦰"},{key:[98,101,112,115,105,59],value:"϶"},{key:[98,101,114,110,111,117,59],value:"ℬ"},{key:[98,101,116,97,59],value:"β"},{key:[98,101,116,104,59],value:"ℶ"},{key:[98,101,116,119,101,101,110,59],value:"≬"},{key:[98,102,114,59],value:"𝔟"},{key:[98,105,103,99,97,112,59],value:"⋂"},{key:[98,105,103,99,105,114,99,59],value:"◯"},{key:[98,105,103,99,117,112,59],value:"⋃"},{key:[98,105,103,111,100,111,116,59],value:"⨀"},{key:[98,105,103,111,112,108,117,115,59],value:"⨁"},{key:[98,105,103,111,116,105,109,101,115,59],value:"⨂"},{key:[98,105,103,115,113,99,117,112,59],value:"⨆"},{key:[98,105,103,115,116,97,114,59],value:"★"},{key:[98,105,103,116,114,105,97,110,103,108,101,100,111,119,110,59],value:"▽"},{key:[98,105,103,116,114,105,97,110,103,108,101,117,112,59],value:"△"},{key:[98,105,103,117,112,108,117,115,59],value:"⨄"},{key:[98,105,103,118,101,101,59],value:"⋁"},{key:[98,105,103,119,101,100,103,101,59],value:"⋀"},{key:[98,107,97,114,111,119,59],value:"⤍"},{key:[98,108,97,99,107,108,111,122,101,110,103,101,59],value:"⧫"},{key:[98,108,97,99,107,115,113,117,97,114,101,59],value:"▪"},{key:[98,108,97,99,107,116,114,105,97,110,103,108,101,59],value:"▴"},{key:[98,108,97,99,107,116,114,105,97,110,103,108,101,100,111,119,110,59],value:"▾"},{key:[98,108,97,99,107,116,114,105,97,110,103,108,101,108,101,102,116,59],value:"◂"},{key:[98,108,97,99,107,116,114,105,97,110,103,108,101,114,105,103,104,116,59],value:"▸"},{key:[98,108,97,110,107,59],value:"␣"},{key:[98,108,107,49,50,59],value:"▒"},{key:[98,108,107,49,52,59],value:"░"},{key:[98,108,107,51,52,59],value:"▓"},{key:[98,108,111,99,107,59],value:"█"},{key:[98,110,101,59],value:"=⃥"},{key:[98,110,101,113,117,105,118,59],value:"≡⃥"},{key:[98,110,111,116,59],value:"⌐"},{key:[98,111,112,102,59],value:"𝕓"},{key:[98,111,116,59],value:"⊥"},{key:[98,111,116,116,111,109,59],value:"⊥"},{key:[98,111,119,116,105,101,59],value:"⋈"},{key:[98,111,120,68,76,59],value:"╗"},{key:[98,111,120,68,82,59],value:"╔"},{key:[98,111,120,68,108,59],value:"╖"},{key:[98,111,120,68,114,59],value:"╓"},{key:[98,111,120,72,59],value:"═"},{key:[98,111,120,72,68,59],value:"╦"},{key:[98,111,120,72,85,59],value:"╩"},{key:[98,111,120,72,100,59],value:"╤"},{key:[98,111,120,72,117,59],value:"╧"},{key:[98,111,120,85,76,59],value:"╝"},{key:[98,111,120,85,82,59],value:"╚"},{key:[98,111,120,85,108,59],value:"╜"},{key:[98,111,120,85,114,59],value:"╙"},{key:[98,111,120,86,59],value:"║"},{key:[98,111,120,86,72,59],value:"╬"},{key:[98,111,120,86,76,59],value:"╣"},{key:[98,111,120,86,82,59],value:"╠"},{key:[98,111,120,86,104,59],value:"╫"},{key:[98,111,120,86,108,59],value:"╢"},{key:[98,111,120,86,114,59],value:"╟"},{key:[98,111,120,98,111,120,59],value:"⧉"},{key:[98,111,120,100,76,59],value:"╕"},{key:[98,111,120,100,82,59],value:"╒"},{key:[98,111,120,100,108,59],value:"┐"},{key:[98,111,120,100,114,59],value:"┌"},{key:[98,111,120,104,59],value:"─"},{key:[98,111,120,104,68,59],value:"╥"},{key:[98,111,120,104,85,59],value:"╨"},{key:[98,111,120,104,100,59],value:"┬"},{key:[98,111,120,104,117,59],value:"┴"},{key:[98,111,120,109,105,110,117,115,59],value:"⊟"},{key:[98,111,120,112,108,117,115,59],value:"⊞"},{key:[98,111,120,116,105,109,101,115,59],value:"⊠"},{key:[98,111,120,117,76,59],value:"╛"},{key:[98,111,120,117,82,59],value:"╘"},{key:[98,111,120,117,108,59],value:"┘"},{key:[98,111,120,117,114,59],value:"└"},{key:[98,111,120,118,59],value:"│"},{key:[98,111,120,118,72,59],value:"╪"},{key:[98,111,120,118,76,59],value:"╡"},{key:[98,111,120,118,82,59],value:"╞"},{key:[98,111,120,118,104,59],value:"┼"},{key:[98,111,120,118,108,59],value:"┤"},{key:[98,111,120,118,114,59],value:"├"},{key:[98,112,114,105,109,101,59],value:"‵"},{key:[98,114,101,118,101,59],value:"˘"},{key:[98,114,118,98,97,114,59],value:"¦"},{key:[98,115,99,114,59],value:"𝒷"},{key:[98,115,101,109,105,59],value:"⁏"},{key:[98,115,105,109,59],value:"∽"},{key:[98,115,105,109,101,59],value:"⋍"},{key:[98,115,111,108,59],value:"\\"},{key:[98,115,111,108,98,59],value:"⧅"},{key:[98,115,111,108,104,115,117,98,59],value:"⟈"},{key:[98,117,108,108,59],value:"•"},{key:[98,117,108,108,101,116,59],value:"•"},{key:[98,117,109,112,59],value:"≎"},{key:[98,117,109,112,69,59],value:"⪮"},{key:[98,117,109,112,101,59],value:"≏"},{key:[98,117,109,112,101,113,59],value:"≏"},{key:[99,97,99,117,116,101,59],value:"ć"},{key:[99,97,112,59],value:"∩"},{key:[99,97,112,97,110,100,59],value:"⩄"},{key:[99,97,112,98,114,99,117,112,59],value:"⩉"},{key:[99,97,112,99,97,112,59],value:"⩋"},{key:[99,97,112,99,117,112,59],value:"⩇"},{key:[99,97,112,100,111,116,59],value:"⩀"},{key:[99,97,112,115,59],value:"∩︀"},{key:[99,97,114,101,116,59],value:"⁁"},{key:[99,97,114,111,110,59],value:"ˇ"},{key:[99,99,97,112,115,59],value:"⩍"},{key:[99,99,97,114,111,110,59],value:"č"},{key:[99,99,101,100,105,108,59],value:"ç"},{key:[99,99,105,114,99,59],value:"ĉ"},{key:[99,99,117,112,115,59],value:"⩌"},{key:[99,99,117,112,115,115,109,59],value:"⩐"},{key:[99,100,111,116,59],value:"ċ"},{key:[99,101,100,105,108,59],value:"¸"},{key:[99,101,109,112,116,121,118,59],value:"⦲"},{key:[99,101,110,116,59],value:"¢"},{key:[99,101,110,116,101,114,100,111,116,59],value:"·"},{key:[99,102,114,59],value:"𝔠"},{key:[99,104,99,121,59],value:"ч"},{key:[99,104,101,99,107,59],value:"✓"},{key:[99,104,101,99,107,109,97,114,107,59],value:"✓"},{key:[99,104,105,59],value:"χ"},{key:[99,105,114,59],value:"○"},{key:[99,105,114,69,59],value:"⧃"},{key:[99,105,114,99,59],value:"ˆ"},{key:[99,105,114,99,101,113,59],value:"≗"},{key:[99,105,114,99,108,101,97,114,114,111,119,108,101,102,116,59],value:"↺"},{key:[99,105,114,99,108,101,97,114,114,111,119,114,105,103,104,116,59],value:"↻"},{key:[99,105,114,99,108,101,100,82,59],value:"®"},{key:[99,105,114,99,108,101,100,83,59],value:"Ⓢ"},{key:[99,105,114,99,108,101,100,97,115,116,59],value:"⊛"},{key:[99,105,114,99,108,101,100,99,105,114,99,59],value:"⊚"},{key:[99,105,114,99,108,101,100,100,97,115,104,59],value:"⊝"},{key:[99,105,114,101,59],value:"≗"},{key:[99,105,114,102,110,105,110,116,59],value:"⨐"},{key:[99,105,114,109,105,100,59],value:"⫯"},{key:[99,105,114,115,99,105,114,59],value:"⧂"},{key:[99,108,117,98,115,59],value:"♣"},{key:[99,108,117,98,115,117,105,116,59],value:"♣"},{key:[99,111,108,111,110,59],value:":"},{key:[99,111,108,111,110,101,59],value:"≔"},{key:[99,111,108,111,110,101,113,59],value:"≔"},{key:[99,111,109,109,97,59],value:","},{key:[99,111,109,109,97,116,59],value:"@"},{key:[99,111,109,112,59],value:"∁"},{key:[99,111,109,112,102,110,59],value:"∘"},{key:[99,111,109,112,108,101,109,101,110,116,59],value:"∁"},{key:[99,111,109,112,108,101,120,101,115,59],value:"ℂ"},{key:[99,111,110,103,59],value:"≅"},{key:[99,111,110,103,100,111,116,59],value:"⩭"},{key:[99,111,110,105,110,116,59],value:"∮"},{key:[99,111,112,102,59],value:"𝕔"},{key:[99,111,112,114,111,100,59],value:"∐"},{key:[99,111,112,121,59],value:"©"},{key:[99,111,112,121,115,114,59],value:"℗"},{key:[99,114,97,114,114,59],value:"↵"},{key:[99,114,111,115,115,59],value:"✗"},{key:[99,115,99,114,59],value:"𝒸"},{key:[99,115,117,98,59],value:"⫏"},{key:[99,115,117,98,101,59],value:"⫑"},{key:[99,115,117,112,59],value:"⫐"},{key:[99,115,117,112,101,59],value:"⫒"},{key:[99,116,100,111,116,59],value:"⋯"},{key:[99,117,100,97,114,114,108,59],value:"⤸"},{key:[99,117,100,97,114,114,114,59],value:"⤵"},{key:[99,117,101,112,114,59],value:"⋞"},{key:[99,117,101,115,99,59],value:"⋟"},{key:[99,117,108,97,114,114,59],value:"↶"},{key:[99,117,108,97,114,114,112,59],value:"⤽"},{key:[99,117,112,59],value:"∪"},{key:[99,117,112,98,114,99,97,112,59],value:"⩈"},{key:[99,117,112,99,97,112,59],value:"⩆"},{key:[99,117,112,99,117,112,59],value:"⩊"},{key:[99,117,112,100,111,116,59],value:"⊍"},{key:[99,117,112,111,114,59],value:"⩅"},{key:[99,117,112,115,59],value:"∪︀"},{key:[99,117,114,97,114,114,59],value:"↷"},{key:[99,117,114,97,114,114,109,59],value:"⤼"},{key:[99,117,114,108,121,101,113,112,114,101,99,59],value:"⋞"},{key:[99,117,114,108,121,101,113,115,117,99,99,59],value:"⋟"},{key:[99,117,114,108,121,118,101,101,59],value:"⋎"},{key:[99,117,114,108,121,119,101,100,103,101,59],value:"⋏"},{key:[99,117,114,114,101,110,59],value:"¤"},{key:[99,117,114,118,101,97,114,114,111,119,108,101,102,116,59],value:"↶"},{key:[99,117,114,118,101,97,114,114,111,119,114,105,103,104,116,59],value:"↷"},{key:[99,117,118,101,101,59],value:"⋎"},{key:[99,117,119,101,100,59],value:"⋏"},{key:[99,119,99,111,110,105,110,116,59],value:"∲"},{key:[99,119,105,110,116,59],value:"∱"},{key:[99,121,108,99,116,121,59],value:"⌭"},{key:[100,65,114,114,59],value:"⇓"},{key:[100,72,97,114,59],value:"⥥"},{key:[100,97,103,103,101,114,59],value:"†"},{key:[100,97,108,101,116,104,59],value:"ℸ"},{key:[100,97,114,114,59],value:"↓"},{key:[100,97,115,104,59],value:"‐"},{key:[100,97,115,104,118,59],value:"⊣"},{key:[100,98,107,97,114,111,119,59],value:"⤏"},{key:[100,98,108,97,99,59],value:"˝"},{key:[100,99,97,114,111,110,59],value:"ď"},{key:[100,99,121,59],value:"д"},{key:[100,100,59],value:"ⅆ"},{key:[100,100,97,103,103,101,114,59],value:"‡"},{key:[100,100,97,114,114,59],value:"⇊"},{key:[100,100,111,116,115,101,113,59],value:"⩷"},{key:[100,101,103,59],value:"°"},{key:[100,101,108,116,97,59],value:"δ"},{key:[100,101,109,112,116,121,118,59],value:"⦱"},{key:[100,102,105,115,104,116,59],value:"⥿"},{key:[100,102,114,59],value:"𝔡"},{key:[100,104,97,114,108,59],value:"⇃"},{key:[100,104,97,114,114,59],value:"⇂"},{key:[100,105,97,109,59],value:"⋄"},{key:[100,105,97,109,111,110,100,59],value:"⋄"},{key:[100,105,97,109,111,110,100,115,117,105,116,59],value:"♦"},{key:[100,105,97,109,115,59],value:"♦"},{key:[100,105,101,59],value:"¨"},{key:[100,105,103,97,109,109,97,59],value:"ϝ"},{key:[100,105,115,105,110,59],value:"⋲"},{key:[100,105,118,59],value:"÷"},{key:[100,105,118,105,100,101,59],value:"÷"},{key:[100,105,118,105,100,101,111,110,116,105,109,101,115,59],value:"⋇"},{key:[100,105,118,111,110,120,59],value:"⋇"},{key:[100,106,99,121,59],value:"ђ"},{key:[100,108,99,111,114,110,59],value:"⌞"},{key:[100,108,99,114,111,112,59],value:"⌍"},{key:[100,111,108,108,97,114,59],value:"$"},{key:[100,111,112,102,59],value:"𝕕"},{key:[100,111,116,59],value:"˙"},{key:[100,111,116,101,113,59],value:"≐"},{key:[100,111,116,101,113,100,111,116,59],value:"≑"},{key:[100,111,116,109,105,110,117,115,59],value:"∸"},{key:[100,111,116,112,108,117,115,59],value:"∔"},{key:[100,111,116,115,113,117,97,114,101,59],value:"⊡"},{key:[100,111,117,98,108,101,98,97,114,119,101,100,103,101,59],value:"⌆"},{key:[100,111,119,110,97,114,114,111,119,59],value:"↓"},{key:[100,111,119,110,100,111,119,110,97,114,114,111,119,115,59],value:"⇊"},{key:[100,111,119,110,104,97,114,112,111,111,110,108,101,102,116,59],value:"⇃"},{key:[100,111,119,110,104,97,114,112,111,111,110,114,105,103,104,116,59],value:"⇂"},{key:[100,114,98,107,97,114,111,119,59],value:"⤐"},{key:[100,114,99,111,114,110,59],value:"⌟"},{key:[100,114,99,114,111,112,59],value:"⌌"},{key:[100,115,99,114,59],value:"𝒹"},{key:[100,115,99,121,59],value:"ѕ"},{key:[100,115,111,108,59],value:"⧶"},{key:[100,115,116,114,111,107,59],value:"đ"},{key:[100,116,100,111,116,59],value:"⋱"},{key:[100,116,114,105,59],value:"▿"},{key:[100,116,114,105,102,59],value:"▾"},{key:[100,117,97,114,114,59],value:"⇵"},{key:[100,117,104,97,114,59],value:"⥯"},{key:[100,119,97,110,103,108,101,59],value:"⦦"},{key:[100,122,99,121,59],value:"џ"},{key:[100,122,105,103,114,97,114,114,59],value:"⟿"},{key:[101,68,68,111,116,59],value:"⩷"},{key:[101,68,111,116,59],value:"≑"},{key:[101,97,99,117,116,101,59],value:"é"},{key:[101,97,115,116,101,114,59],value:"⩮"},{key:[101,99,97,114,111,110,59],value:"ě"},{key:[101,99,105,114,59],value:"≖"},{key:[101,99,105,114,99,59],value:"ê"},{key:[101,99,111,108,111,110,59],value:"≕"},{key:[101,99,121,59],value:"э"},{key:[101,100,111,116,59],value:"ė"},{key:[101,101,59],value:"ⅇ"},{key:[101,102,68,111,116,59],value:"≒"},{key:[101,102,114,59],value:"𝔢"},{key:[101,103,59],value:"⪚"},{key:[101,103,114,97,118,101,59],value:"è"},{key:[101,103,115,59],value:"⪖"},{key:[101,103,115,100,111,116,59],value:"⪘"},{key:[101,108,59],value:"⪙"},{key:[101,108,105,110,116,101,114,115,59],value:"⏧"},{key:[101,108,108,59],value:"ℓ"},{key:[101,108,115,59],value:"⪕"},{key:[101,108,115,100,111,116,59],value:"⪗"},{key:[101,109,97,99,114,59],value:"ē"},{key:[101,109,112,116,121,59],value:"∅"},{key:[101,109,112,116,121,115,101,116,59],value:"∅"},{key:[101,109,112,116,121,118,59],value:"∅"},{key:[101,109,115,112,49,51,59],value:" "},{key:[101,109,115,112,49,52,59],value:" "},{key:[101,109,115,112,59],value:" "},{key:[101,110,103,59],value:"ŋ"},{key:[101,110,115,112,59],value:" "},{key:[101,111,103,111,110,59],value:"ę"},{key:[101,111,112,102,59],value:"𝕖"},{key:[101,112,97,114,59],value:"⋕"},{key:[101,112,97,114,115,108,59],value:"⧣"},{key:[101,112,108,117,115,59],value:"⩱"},{key:[101,112,115,105,59],value:"ε"},{key:[101,112,115,105,108,111,110,59],value:"ε"},{key:[101,112,115,105,118,59],value:"ϵ"},{key:[101,113,99,105,114,99,59],value:"≖"},{key:[101,113,99,111,108,111,110,59],value:"≕"},{key:[101,113,115,105,109,59],value:"≂"},{key:[101,113,115,108,97,110,116,103,116,114,59],value:"⪖"},{key:[101,113,115,108,97,110,116,108,101,115,115,59],value:"⪕"},{key:[101,113,117,97,108,115,59],value:"="},{key:[101,113,117,101,115,116,59],value:"≟"},{key:[101,113,117,105,118,59],value:"≡"},{key:[101,113,117,105,118,68,68,59],value:"⩸"},{key:[101,113,118,112,97,114,115,108,59],value:"⧥"},{key:[101,114,68,111,116,59],value:"≓"},{key:[101,114,97,114,114,59],value:"⥱"},{key:[101,115,99,114,59],value:"ℯ"},{key:[101,115,100,111,116,59],value:"≐"},{key:[101,115,105,109,59],value:"≂"},{key:[101,116,97,59],value:"η"},{key:[101,116,104,59],value:"ð"},{key:[101,117,109,108,59],value:"ë"},{key:[101,117,114,111,59],value:"€"},{key:[101,120,99,108,59],value:"!"},{key:[101,120,105,115,116,59],value:"∃"},{key:[101,120,112,101,99,116,97,116,105,111,110,59],value:"ℰ"},{key:[101,120,112,111,110,101,110,116,105,97,108,101,59],value:"ⅇ"},{key:[102,97,108,108,105,110,103,100,111,116,115,101,113,59],value:"≒"},{key:[102,99,121,59],value:"ф"},{key:[102,101,109,97,108,101,59],value:"♀"},{key:[102,102,105,108,105,103,59],value:"ffi"},{key:[102,102,108,105,103,59],value:"ff"},{key:[102,102,108,108,105,103,59],value:"ffl"},{key:[102,102,114,59],value:"𝔣"},{key:[102,105,108,105,103,59],value:"fi"},{key:[102,106,108,105,103,59],value:"fj"},{key:[102,108,97,116,59],value:"♭"},{key:[102,108,108,105,103,59],value:"fl"},{key:[102,108,116,110,115,59],value:"▱"},{key:[102,110,111,102,59],value:"ƒ"},{key:[102,111,112,102,59],value:"𝕗"},{key:[102,111,114,97,108,108,59],value:"∀"},{key:[102,111,114,107,59],value:"⋔"},{key:[102,111,114,107,118,59],value:"⫙"},{key:[102,112,97,114,116,105,110,116,59],value:"⨍"},{key:[102,114,97,99,49,50,59],value:"½"},{key:[102,114,97,99,49,51,59],value:"⅓"},{key:[102,114,97,99,49,52,59],value:"¼"},{key:[102,114,97,99,49,53,59],value:"⅕"},{key:[102,114,97,99,49,54,59],value:"⅙"},{key:[102,114,97,99,49,56,59],value:"⅛"},{key:[102,114,97,99,50,51,59],value:"⅔"},{key:[102,114,97,99,50,53,59],value:"⅖"},{key:[102,114,97,99,51,52,59],value:"¾"},{key:[102,114,97,99,51,53,59],value:"⅗"},{key:[102,114,97,99,51,56,59],value:"⅜"},{key:[102,114,97,99,52,53,59],value:"⅘"},{key:[102,114,97,99,53,54,59],value:"⅚"},{key:[102,114,97,99,53,56,59],value:"⅝"},{key:[102,114,97,99,55,56,59],value:"⅞"},{key:[102,114,97,115,108,59],value:"⁄"},{key:[102,114,111,119,110,59],value:"⌢"},{key:[102,115,99,114,59],value:"𝒻"},{key:[103,69,59],value:"≧"},{key:[103,69,108,59],value:"⪌"},{key:[103,97,99,117,116,101,59],value:"ǵ"},{key:[103,97,109,109,97,59],value:"γ"},{key:[103,97,109,109,97,100,59],value:"ϝ"},{key:[103,97,112,59],value:"⪆"},{key:[103,98,114,101,118,101,59],value:"ğ"},{key:[103,99,105,114,99,59],value:"ĝ"},{key:[103,99,121,59],value:"г"},{key:[103,100,111,116,59],value:"ġ"},{key:[103,101,59],value:"≥"},{key:[103,101,108,59],value:"⋛"},{key:[103,101,113,59],value:"≥"},{key:[103,101,113,113,59],value:"≧"},{key:[103,101,113,115,108,97,110,116,59],value:"⩾"},{key:[103,101,115,59],value:"⩾"},{key:[103,101,115,99,99,59],value:"⪩"},{key:[103,101,115,100,111,116,59],value:"⪀"},{key:[103,101,115,100,111,116,111,59],value:"⪂"},{key:[103,101,115,100,111,116,111,108,59],value:"⪄"},{key:[103,101,115,108,59],value:"⋛︀"},{key:[103,101,115,108,101,115,59],value:"⪔"},{key:[103,102,114,59],value:"𝔤"},{key:[103,103,59],value:"≫"},{key:[103,103,103,59],value:"⋙"},{key:[103,105,109,101,108,59],value:"ℷ"},{key:[103,106,99,121,59],value:"ѓ"},{key:[103,108,59],value:"≷"},{key:[103,108,69,59],value:"⪒"},{key:[103,108,97,59],value:"⪥"},{key:[103,108,106,59],value:"⪤"},{key:[103,110,69,59],value:"≩"},{key:[103,110,97,112,59],value:"⪊"},{key:[103,110,97,112,112,114,111,120,59],value:"⪊"},{key:[103,110,101,59],value:"⪈"},{key:[103,110,101,113,59],value:"⪈"},{key:[103,110,101,113,113,59],value:"≩"},{key:[103,110,115,105,109,59],value:"⋧"},{key:[103,111,112,102,59],value:"𝕘"},{key:[103,114,97,118,101,59],value:"`"},{key:[103,115,99,114,59],value:"ℊ"},{key:[103,115,105,109,59],value:"≳"},{key:[103,115,105,109,101,59],value:"⪎"},{key:[103,115,105,109,108,59],value:"⪐"},{key:[103,116,59],value:">"},{key:[103,116,99,99,59],value:"⪧"},{key:[103,116,99,105,114,59],value:"⩺"},{key:[103,116,100,111,116,59],value:"⋗"},{key:[103,116,108,80,97,114,59],value:"⦕"},{key:[103,116,113,117,101,115,116,59],value:"⩼"},{key:[103,116,114,97,112,112,114,111,120,59],value:"⪆"},{key:[103,116,114,97,114,114,59],value:"⥸"},{key:[103,116,114,100,111,116,59],value:"⋗"},{key:[103,116,114,101,113,108,101,115,115,59],value:"⋛"},{key:[103,116,114,101,113,113,108,101,115,115,59],value:"⪌"},{key:[103,116,114,108,101,115,115,59],value:"≷"},{key:[103,116,114,115,105,109,59],value:"≳"},{key:[103,118,101,114,116,110,101,113,113,59],value:"≩︀"},{key:[103,118,110,69,59],value:"≩︀"},{key:[104,65,114,114,59],value:"⇔"},{key:[104,97,105,114,115,112,59],value:" "},{key:[104,97,108,102,59],value:"½"},{key:[104,97,109,105,108,116,59],value:"ℋ"},{key:[104,97,114,100,99,121,59],value:"ъ"},{key:[104,97,114,114,59],value:"↔"},{key:[104,97,114,114,99,105,114,59],value:"⥈"},{key:[104,97,114,114,119,59],value:"↭"},{key:[104,98,97,114,59],value:"ℏ"},{key:[104,99,105,114,99,59],value:"ĥ"},{key:[104,101,97,114,116,115,59],value:"♥"},{key:[104,101,97,114,116,115,117,105,116,59],value:"♥"},{key:[104,101,108,108,105,112,59],value:"…"},{key:[104,101,114,99,111,110,59],value:"⊹"},{key:[104,102,114,59],value:"𝔥"},{key:[104,107,115,101,97,114,111,119,59],value:"⤥"},{key:[104,107,115,119,97,114,111,119,59],value:"⤦"},{key:[104,111,97,114,114,59],value:"⇿"},{key:[104,111,109,116,104,116,59],value:"∻"},{key:[104,111,111,107,108,101,102,116,97,114,114,111,119,59],value:"↩"},{key:[104,111,111,107,114,105,103,104,116,97,114,114,111,119,59],value:"↪"},{key:[104,111,112,102,59],value:"𝕙"},{key:[104,111,114,98,97,114,59],value:"―"},{key:[104,115,99,114,59],value:"𝒽"},{key:[104,115,108,97,115,104,59],value:"ℏ"},{key:[104,115,116,114,111,107,59],value:"ħ"},{key:[104,121,98,117,108,108,59],value:"⁃"},{key:[104,121,112,104,101,110,59],value:"‐"},{key:[105,97,99,117,116,101,59],value:"í"},{key:[105,99,59],value:"⁣"},{key:[105,99,105,114,99,59],value:"î"},{key:[105,99,121,59],value:"и"},{key:[105,101,99,121,59],value:"е"},{key:[105,101,120,99,108,59],value:"¡"},{key:[105,102,102,59],value:"⇔"},{key:[105,102,114,59],value:"𝔦"},{key:[105,103,114,97,118,101,59],value:"ì"},{key:[105,105,59],value:"ⅈ"},{key:[105,105,105,105,110,116,59],value:"⨌"},{key:[105,105,105,110,116,59],value:"∭"},{key:[105,105,110,102,105,110,59],value:"⧜"},{key:[105,105,111,116,97,59],value:"℩"},{key:[105,106,108,105,103,59],value:"ij"},{key:[105,109,97,99,114,59],value:"ī"},{key:[105,109,97,103,101,59],value:"ℑ"},{key:[105,109,97,103,108,105,110,101,59],value:"ℐ"},{key:[105,109,97,103,112,97,114,116,59],value:"ℑ"},{key:[105,109,97,116,104,59],value:"ı"},{key:[105,109,111,102,59],value:"⊷"},{key:[105,109,112,101,100,59],value:"Ƶ"},{key:[105,110,59],value:"∈"},{key:[105,110,99,97,114,101,59],value:"℅"},{key:[105,110,102,105,110,59],value:"∞"},{key:[105,110,102,105,110,116,105,101,59],value:"⧝"},{key:[105,110,111,100,111,116,59],value:"ı"},{key:[105,110,116,59],value:"∫"},{key:[105,110,116,99,97,108,59],value:"⊺"},{key:[105,110,116,101,103,101,114,115,59],value:"ℤ"},{key:[105,110,116,101,114,99,97,108,59],value:"⊺"},{key:[105,110,116,108,97,114,104,107,59],value:"⨗"},{key:[105,110,116,112,114,111,100,59],value:"⨼"},{key:[105,111,99,121,59],value:"ё"},{key:[105,111,103,111,110,59],value:"į"},{key:[105,111,112,102,59],value:"𝕚"},{key:[105,111,116,97,59],value:"ι"},{key:[105,112,114,111,100,59],value:"⨼"},{key:[105,113,117,101,115,116,59],value:"¿"},{key:[105,115,99,114,59],value:"𝒾"},{key:[105,115,105,110,59],value:"∈"},{key:[105,115,105,110,69,59],value:"⋹"},{key:[105,115,105,110,100,111,116,59],value:"⋵"},{key:[105,115,105,110,115,59],value:"⋴"},{key:[105,115,105,110,115,118,59],value:"⋳"},{key:[105,115,105,110,118,59],value:"∈"},{key:[105,116,59],value:"⁢"},{key:[105,116,105,108,100,101,59],value:"ĩ"},{key:[105,117,107,99,121,59],value:"і"},{key:[105,117,109,108,59],value:"ï"},{key:[106,99,105,114,99,59],value:"ĵ"},{key:[106,99,121,59],value:"й"},{key:[106,102,114,59],value:"𝔧"},{key:[106,109,97,116,104,59],value:"ȷ"},{key:[106,111,112,102,59],value:"𝕛"},{key:[106,115,99,114,59],value:"𝒿"},{key:[106,115,101,114,99,121,59],value:"ј"},{key:[106,117,107,99,121,59],value:"є"},{key:[107,97,112,112,97,59],value:"κ"},{key:[107,97,112,112,97,118,59],value:"ϰ"},{key:[107,99,101,100,105,108,59],value:"ķ"},{key:[107,99,121,59],value:"к"},{key:[107,102,114,59],value:"𝔨"},{key:[107,103,114,101,101,110,59],value:"ĸ"},{key:[107,104,99,121,59],value:"х"},{key:[107,106,99,121,59],value:"ќ"},{key:[107,111,112,102,59],value:"𝕜"},{key:[107,115,99,114,59],value:"𝓀"},{key:[108,65,97,114,114,59],value:"⇚"},{key:[108,65,114,114,59],value:"⇐"},{key:[108,65,116,97,105,108,59],value:"⤛"},{key:[108,66,97,114,114,59],value:"⤎"},{key:[108,69,59],value:"≦"},{key:[108,69,103,59],value:"⪋"},{key:[108,72,97,114,59],value:"⥢"},{key:[108,97,99,117,116,101,59],value:"ĺ"},{key:[108,97,101,109,112,116,121,118,59],value:"⦴"},{key:[108,97,103,114,97,110,59],value:"ℒ"},{key:[108,97,109,98,100,97,59],value:"λ"},{key:[108,97,110,103,59],value:"⟨"},{key:[108,97,110,103,100,59],value:"⦑"},{key:[108,97,110,103,108,101,59],value:"⟨"},{key:[108,97,112,59],value:"⪅"},{key:[108,97,113,117,111,59],value:"«"},{key:[108,97,114,114,59],value:"←"},{key:[108,97,114,114,98,59],value:"⇤"},{key:[108,97,114,114,98,102,115,59],value:"⤟"},{key:[108,97,114,114,102,115,59],value:"⤝"},{key:[108,97,114,114,104,107,59],value:"↩"},{key:[108,97,114,114,108,112,59],value:"↫"},{key:[108,97,114,114,112,108,59],value:"⤹"},{key:[108,97,114,114,115,105,109,59],value:"⥳"},{key:[108,97,114,114,116,108,59],value:"↢"},{key:[108,97,116,59],value:"⪫"},{key:[108,97,116,97,105,108,59],value:"⤙"},{key:[108,97,116,101,59],value:"⪭"},{key:[108,97,116,101,115,59],value:"⪭︀"},{key:[108,98,97,114,114,59],value:"⤌"},{key:[108,98,98,114,107,59],value:"❲"},{key:[108,98,114,97,99,101,59],value:"{ "},{key:[108,98,114,97,99,107,59],value:"["},{key:[108,98,114,107,101,59],value:"⦋"},{key:[108,98,114,107,115,108,100,59],value:"⦏"},{key:[108,98,114,107,115,108,117,59],value:"⦍"},{key:[108,99,97,114,111,110,59],value:"ľ"},{key:[108,99,101,100,105,108,59],value:"ļ"},{key:[108,99,101,105,108,59],value:"⌈"},{key:[108,99,117,98,59],value:"{ "},{key:[108,99,121,59],value:"л"},{key:[108,100,99,97,59],value:"⤶"},{key:[108,100,113,117,111,59],value:"“"},{key:[108,100,113,117,111,114,59],value:"„"},{key:[108,100,114,100,104,97,114,59],value:"⥧"},{key:[108,100,114,117,115,104,97,114,59],value:"⥋"},{key:[108,100,115,104,59],value:"↲"},{key:[108,101,59],value:"≤"},{key:[108,101,102,116,97,114,114,111,119,59],value:"←"},{key:[108,101,102,116,97,114,114,111,119,116,97,105,108,59],value:"↢"},{key:[108,101,102,116,104,97,114,112,111,111,110,100,111,119,110,59],value:"↽"},{key:[108,101,102,116,104,97,114,112,111,111,110,117,112,59],value:"↼"},{key:[108,101,102,116,108,101,102,116,97,114,114,111,119,115,59],value:"⇇"},{key:[108,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"↔"},{key:[108,101,102,116,114,105,103,104,116,97,114,114,111,119,115,59],value:"⇆"},{key:[108,101,102,116,114,105,103,104,116,104,97,114,112,111,111,110,115,59],value:"⇋"},{key:[108,101,102,116,114,105,103,104,116,115,113,117,105,103,97,114,114,111,119,59],value:"↭"},{key:[108,101,102,116,116,104,114,101,101,116,105,109,101,115,59],value:"⋋"},{key:[108,101,103,59],value:"⋚"},{key:[108,101,113,59],value:"≤"},{key:[108,101,113,113,59],value:"≦"},{key:[108,101,113,115,108,97,110,116,59],value:"⩽"},{key:[108,101,115,59],value:"⩽"},{key:[108,101,115,99,99,59],value:"⪨"},{key:[108,101,115,100,111,116,59],value:"⩿"},{key:[108,101,115,100,111,116,111,59],value:"⪁"},{key:[108,101,115,100,111,116,111,114,59],value:"⪃"},{key:[108,101,115,103,59],value:"⋚︀"},{key:[108,101,115,103,101,115,59],value:"⪓"},{key:[108,101,115,115,97,112,112,114,111,120,59],value:"⪅"},{key:[108,101,115,115,100,111,116,59],value:"⋖"},{key:[108,101,115,115,101,113,103,116,114,59],value:"⋚"},{key:[108,101,115,115,101,113,113,103,116,114,59],value:"⪋"},{key:[108,101,115,115,103,116,114,59],value:"≶"},{key:[108,101,115,115,115,105,109,59],value:"≲"},{key:[108,102,105,115,104,116,59],value:"⥼"},{key:[108,102,108,111,111,114,59],value:"⌊"},{key:[108,102,114,59],value:"𝔩"},{key:[108,103,59],value:"≶"},{key:[108,103,69,59],value:"⪑"},{key:[108,104,97,114,100,59],value:"↽"},{key:[108,104,97,114,117,59],value:"↼"},{key:[108,104,97,114,117,108,59],value:"⥪"},{key:[108,104,98,108,107,59],value:"▄"},{key:[108,106,99,121,59],value:"љ"},{key:[108,108,59],value:"≪"},{key:[108,108,97,114,114,59],value:"⇇"},{key:[108,108,99,111,114,110,101,114,59],value:"⌞"},{key:[108,108,104,97,114,100,59],value:"⥫"},{key:[108,108,116,114,105,59],value:"◺"},{key:[108,109,105,100,111,116,59],value:"ŀ"},{key:[108,109,111,117,115,116,59],value:"⎰"},{key:[108,109,111,117,115,116,97,99,104,101,59],value:"⎰"},{key:[108,110,69,59],value:"≨"},{key:[108,110,97,112,59],value:"⪉"},{key:[108,110,97,112,112,114,111,120,59],value:"⪉"},{key:[108,110,101,59],value:"⪇"},{key:[108,110,101,113,59],value:"⪇"},{key:[108,110,101,113,113,59],value:"≨"},{key:[108,110,115,105,109,59],value:"⋦"},{key:[108,111,97,110,103,59],value:"⟬"},{key:[108,111,97,114,114,59],value:"⇽"},{key:[108,111,98,114,107,59],value:"⟦"},{key:[108,111,110,103,108,101,102,116,97,114,114,111,119,59],value:"⟵"},{key:[108,111,110,103,108,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"⟷"},{key:[108,111,110,103,109,97,112,115,116,111,59],value:"⟼"},{key:[108,111,110,103,114,105,103,104,116,97,114,114,111,119,59],value:"⟶"},{key:[108,111,111,112,97,114,114,111,119,108,101,102,116,59],value:"↫"},{key:[108,111,111,112,97,114,114,111,119,114,105,103,104,116,59],value:"↬"},{key:[108,111,112,97,114,59],value:"⦅"},{key:[108,111,112,102,59],value:"𝕝"},{key:[108,111,112,108,117,115,59],value:"⨭"},{key:[108,111,116,105,109,101,115,59],value:"⨴"},{key:[108,111,119,97,115,116,59],value:"∗"},{key:[108,111,119,98,97,114,59],value:"_"},{key:[108,111,122,59],value:"◊"},{key:[108,111,122,101,110,103,101,59],value:"◊"},{key:[108,111,122,102,59],value:"⧫"},{key:[108,112,97,114,59],value:"("},{key:[108,112,97,114,108,116,59],value:"⦓"},{key:[108,114,97,114,114,59],value:"⇆"},{key:[108,114,99,111,114,110,101,114,59],value:"⌟"},{key:[108,114,104,97,114,59],value:"⇋"},{key:[108,114,104,97,114,100,59],value:"⥭"},{key:[108,114,109,59],value:"‎"},{key:[108,114,116,114,105,59],value:"⊿"},{key:[108,115,97,113,117,111,59],value:"‹"},{key:[108,115,99,114,59],value:"𝓁"},{key:[108,115,104,59],value:"↰"},{key:[108,115,105,109,59],value:"≲"},{key:[108,115,105,109,101,59],value:"⪍"},{key:[108,115,105,109,103,59],value:"⪏"},{key:[108,115,113,98,59],value:"["},{key:[108,115,113,117,111,59],value:"‘"},{key:[108,115,113,117,111,114,59],value:"‚"},{key:[108,115,116,114,111,107,59],value:"ł"},{key:[108,116,59],value:"<"},{key:[108,116,99,99,59],value:"⪦"},{key:[108,116,99,105,114,59],value:"⩹"},{key:[108,116,100,111,116,59],value:"⋖"},{key:[108,116,104,114,101,101,59],value:"⋋"},{key:[108,116,105,109,101,115,59],value:"⋉"},{key:[108,116,108,97,114,114,59],value:"⥶"},{key:[108,116,113,117,101,115,116,59],value:"⩻"},{key:[108,116,114,80,97,114,59],value:"⦖"},{key:[108,116,114,105,59],value:"◃"},{key:[108,116,114,105,101,59],value:"⊴"},{key:[108,116,114,105,102,59],value:"◂"},{key:[108,117,114,100,115,104,97,114,59],value:"⥊"},{key:[108,117,114,117,104,97,114,59],value:"⥦"},{key:[108,118,101,114,116,110,101,113,113,59],value:"≨︀"},{key:[108,118,110,69,59],value:"≨︀"},{key:[109,68,68,111,116,59],value:"∺"},{key:[109,97,99,114,59],value:"¯"},{key:[109,97,108,101,59],value:"♂"},{key:[109,97,108,116,59],value:"✠"},{key:[109,97,108,116,101,115,101,59],value:"✠"},{key:[109,97,112,59],value:"↦"},{key:[109,97,112,115,116,111,59],value:"↦"},{key:[109,97,112,115,116,111,100,111,119,110,59],value:"↧"},{key:[109,97,112,115,116,111,108,101,102,116,59],value:"↤"},{key:[109,97,112,115,116,111,117,112,59],value:"↥"},{key:[109,97,114,107,101,114,59],value:"▮"},{key:[109,99,111,109,109,97,59],value:"⨩"},{key:[109,99,121,59],value:"м"},{key:[109,100,97,115,104,59],value:"—"},{key:[109,101,97,115,117,114,101,100,97,110,103,108,101,59],value:"∡"},{key:[109,102,114,59],value:"𝔪"},{key:[109,104,111,59],value:"℧"},{key:[109,105,99,114,111,59],value:"µ"},{key:[109,105,100,59],value:"∣"},{key:[109,105,100,97,115,116,59],value:"*"},{key:[109,105,100,99,105,114,59],value:"⫰"},{key:[109,105,100,100,111,116,59],value:"·"},{key:[109,105,110,117,115,59],value:"−"},{key:[109,105,110,117,115,98,59],value:"⊟"},{key:[109,105,110,117,115,100,59],value:"∸"},{key:[109,105,110,117,115,100,117,59],value:"⨪"},{key:[109,108,99,112,59],value:"⫛"},{key:[109,108,100,114,59],value:"…"},{key:[109,110,112,108,117,115,59],value:"∓"},{key:[109,111,100,101,108,115,59],value:"⊧"},{key:[109,111,112,102,59],value:"𝕞"},{key:[109,112,59],value:"∓"},{key:[109,115,99,114,59],value:"𝓂"},{key:[109,115,116,112,111,115,59],value:"∾"},{key:[109,117,59],value:"μ"},{key:[109,117,108,116,105,109,97,112,59],value:"⊸"},{key:[109,117,109,97,112,59],value:"⊸"},{key:[110,71,103,59],value:"⋙̸"},{key:[110,71,116,59],value:"≫⃒"},{key:[110,71,116,118,59],value:"≫̸"},{key:[110,76,101,102,116,97,114,114,111,119,59],value:"⇍"},{key:[110,76,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"⇎"},{key:[110,76,108,59],value:"⋘̸"},{key:[110,76,116,59],value:"≪⃒"},{key:[110,76,116,118,59],value:"≪̸"},{key:[110,82,105,103,104,116,97,114,114,111,119,59],value:"⇏"},{key:[110,86,68,97,115,104,59],value:"⊯"},{key:[110,86,100,97,115,104,59],value:"⊮"},{key:[110,97,98,108,97,59],value:"∇"},{key:[110,97,99,117,116,101,59],value:"ń"},{key:[110,97,110,103,59],value:"∠⃒"},{key:[110,97,112,59],value:"≉"},{key:[110,97,112,69,59],value:"⩰̸"},{key:[110,97,112,105,100,59],value:"≋̸"},{key:[110,97,112,111,115,59],value:"ʼn"},{key:[110,97,112,112,114,111,120,59],value:"≉"},{key:[110,97,116,117,114,59],value:"♮"},{key:[110,97,116,117,114,97,108,59],value:"♮"},{key:[110,97,116,117,114,97,108,115,59],value:"ℕ"},{key:[110,98,115,112,59],value:" "},{key:[110,98,117,109,112,59],value:"≎̸"},{key:[110,98,117,109,112,101,59],value:"≏̸"},{key:[110,99,97,112,59],value:"⩃"},{key:[110,99,97,114,111,110,59],value:"ň"},{key:[110,99,101,100,105,108,59],value:"ņ"},{key:[110,99,111,110,103,59],value:"≇"},{key:[110,99,111,110,103,100,111,116,59],value:"⩭̸"},{key:[110,99,117,112,59],value:"⩂"},{key:[110,99,121,59],value:"н"},{key:[110,100,97,115,104,59],value:"–"},{key:[110,101,59],value:"≠"},{key:[110,101,65,114,114,59],value:"⇗"},{key:[110,101,97,114,104,107,59],value:"⤤"},{key:[110,101,97,114,114,59],value:"↗"},{key:[110,101,97,114,114,111,119,59],value:"↗"},{key:[110,101,100,111,116,59],value:"≐̸"},{key:[110,101,113,117,105,118,59],value:"≢"},{key:[110,101,115,101,97,114,59],value:"⤨"},{key:[110,101,115,105,109,59],value:"≂̸"},{key:[110,101,120,105,115,116,59],value:"∄"},{key:[110,101,120,105,115,116,115,59],value:"∄"},{key:[110,102,114,59],value:"𝔫"},{key:[110,103,69,59],value:"≧̸"},{key:[110,103,101,59],value:"≱"},{key:[110,103,101,113,59],value:"≱"},{key:[110,103,101,113,113,59],value:"≧̸"},{key:[110,103,101,113,115,108,97,110,116,59],value:"⩾̸"},{key:[110,103,101,115,59],value:"⩾̸"},{key:[110,103,115,105,109,59],value:"≵"},{key:[110,103,116,59],value:"≯"},{key:[110,103,116,114,59],value:"≯"},{key:[110,104,65,114,114,59],value:"⇎"},{key:[110,104,97,114,114,59],value:"↮"},{key:[110,104,112,97,114,59],value:"⫲"},{key:[110,105,59],value:"∋"},{key:[110,105,115,59],value:"⋼"},{key:[110,105,115,100,59],value:"⋺"},{key:[110,105,118,59],value:"∋"},{key:[110,106,99,121,59],value:"њ"},{key:[110,108,65,114,114,59],value:"⇍"},{key:[110,108,69,59],value:"≦̸"},{key:[110,108,97,114,114,59],value:"↚"},{key:[110,108,100,114,59],value:"‥"},{key:[110,108,101,59],value:"≰"},{key:[110,108,101,102,116,97,114,114,111,119,59],value:"↚"},{key:[110,108,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"↮"},{key:[110,108,101,113,59],value:"≰"},{key:[110,108,101,113,113,59],value:"≦̸"},{key:[110,108,101,113,115,108,97,110,116,59],value:"⩽̸"},{key:[110,108,101,115,59],value:"⩽̸"},{key:[110,108,101,115,115,59],value:"≮"},{key:[110,108,115,105,109,59],value:"≴"},{key:[110,108,116,59],value:"≮"},{key:[110,108,116,114,105,59],value:"⋪"},{key:[110,108,116,114,105,101,59],value:"⋬"},{key:[110,109,105,100,59],value:"∤"},{key:[110,111,112,102,59],value:"𝕟"},{key:[110,111,116,59],value:"¬"},{key:[110,111,116,105,110,59],value:"∉"},{key:[110,111,116,105,110,69,59],value:"⋹̸"},{key:[110,111,116,105,110,100,111,116,59],value:"⋵̸"},{key:[110,111,116,105,110,118,97,59],value:"∉"},{key:[110,111,116,105,110,118,98,59],value:"⋷"},{key:[110,111,116,105,110,118,99,59],value:"⋶"},{key:[110,111,116,110,105,59],value:"∌"},{key:[110,111,116,110,105,118,97,59],value:"∌"},{key:[110,111,116,110,105,118,98,59],value:"⋾"},{key:[110,111,116,110,105,118,99,59],value:"⋽"},{key:[110,112,97,114,59],value:"∦"},{key:[110,112,97,114,97,108,108,101,108,59],value:"∦"},{key:[110,112,97,114,115,108,59],value:"⫽⃥"},{key:[110,112,97,114,116,59],value:"∂̸"},{key:[110,112,111,108,105,110,116,59],value:"⨔"},{key:[110,112,114,59],value:"⊀"},{key:[110,112,114,99,117,101,59],value:"⋠"},{key:[110,112,114,101,59],value:"⪯̸"},{key:[110,112,114,101,99,59],value:"⊀"},{key:[110,112,114,101,99,101,113,59],value:"⪯̸"},{key:[110,114,65,114,114,59],value:"⇏"},{key:[110,114,97,114,114,59],value:"↛"},{key:[110,114,97,114,114,99,59],value:"⤳̸"},{key:[110,114,97,114,114,119,59],value:"↝̸"},{key:[110,114,105,103,104,116,97,114,114,111,119,59],value:"↛"},{key:[110,114,116,114,105,59],value:"⋫"},{key:[110,114,116,114,105,101,59],value:"⋭"},{key:[110,115,99,59],value:"⊁"},{key:[110,115,99,99,117,101,59],value:"⋡"},{key:[110,115,99,101,59],value:"⪰̸"},{key:[110,115,99,114,59],value:"𝓃"},{key:[110,115,104,111,114,116,109,105,100,59],value:"∤"},{key:[110,115,104,111,114,116,112,97,114,97,108,108,101,108,59],value:"∦"},{key:[110,115,105,109,59],value:"≁"},{key:[110,115,105,109,101,59],value:"≄"},{key:[110,115,105,109,101,113,59],value:"≄"},{key:[110,115,109,105,100,59],value:"∤"},{key:[110,115,112,97,114,59],value:"∦"},{key:[110,115,113,115,117,98,101,59],value:"⋢"},{key:[110,115,113,115,117,112,101,59],value:"⋣"},{key:[110,115,117,98,59],value:"⊄"},{key:[110,115,117,98,69,59],value:"⫅̸"},{key:[110,115,117,98,101,59],value:"⊈"},{key:[110,115,117,98,115,101,116,59],value:"⊂⃒"},{key:[110,115,117,98,115,101,116,101,113,59],value:"⊈"},{key:[110,115,117,98,115,101,116,101,113,113,59],value:"⫅̸"},{key:[110,115,117,99,99,59],value:"⊁"},{key:[110,115,117,99,99,101,113,59],value:"⪰̸"},{key:[110,115,117,112,59],value:"⊅"},{key:[110,115,117,112,69,59],value:"⫆̸"},{key:[110,115,117,112,101,59],value:"⊉"},{key:[110,115,117,112,115,101,116,59],value:"⊃⃒"},{key:[110,115,117,112,115,101,116,101,113,59],value:"⊉"},{key:[110,115,117,112,115,101,116,101,113,113,59],value:"⫆̸"},{key:[110,116,103,108,59],value:"≹"},{key:[110,116,105,108,100,101,59],value:"ñ"},{key:[110,116,108,103,59],value:"≸"},{key:[110,116,114,105,97,110,103,108,101,108,101,102,116,59],value:"⋪"},{key:[110,116,114,105,97,110,103,108,101,108,101,102,116,101,113,59],value:"⋬"},{key:[110,116,114,105,97,110,103,108,101,114,105,103,104,116,59],value:"⋫"},{key:[110,116,114,105,97,110,103,108,101,114,105,103,104,116,101,113,59],value:"⋭"},{key:[110,117,59],value:"ν"},{key:[110,117,109,59],value:"#"},{key:[110,117,109,101,114,111,59],value:"№"},{key:[110,117,109,115,112,59],value:" "},{key:[110,118,68,97,115,104,59],value:"⊭"},{key:[110,118,72,97,114,114,59],value:"⤄"},{key:[110,118,97,112,59],value:"≍⃒"},{key:[110,118,100,97,115,104,59],value:"⊬"},{key:[110,118,103,101,59],value:"≥⃒"},{key:[110,118,103,116,59],value:">⃒"},{key:[110,118,105,110,102,105,110,59],value:"⧞"},{key:[110,118,108,65,114,114,59],value:"⤂"},{key:[110,118,108,101,59],value:"≤⃒"},{key:[110,118,108,116,59],value:"<⃒"},{key:[110,118,108,116,114,105,101,59],value:"⊴⃒"},{key:[110,118,114,65,114,114,59],value:"⤃"},{key:[110,118,114,116,114,105,101,59],value:"⊵⃒"},{key:[110,118,115,105,109,59],value:"∼⃒"},{key:[110,119,65,114,114,59],value:"⇖"},{key:[110,119,97,114,104,107,59],value:"⤣"},{key:[110,119,97,114,114,59],value:"↖"},{key:[110,119,97,114,114,111,119,59],value:"↖"},{key:[110,119,110,101,97,114,59],value:"⤧"},{key:[111,83,59],value:"Ⓢ"},{key:[111,97,99,117,116,101,59],value:"ó"},{key:[111,97,115,116,59],value:"⊛"},{key:[111,99,105,114,59],value:"⊚"},{key:[111,99,105,114,99,59],value:"ô"},{key:[111,99,121,59],value:"о"},{key:[111,100,97,115,104,59],value:"⊝"},{key:[111,100,98,108,97,99,59],value:"ő"},{key:[111,100,105,118,59],value:"⨸"},{key:[111,100,111,116,59],value:"⊙"},{key:[111,100,115,111,108,100,59],value:"⦼"},{key:[111,101,108,105,103,59],value:"œ"},{key:[111,102,99,105,114,59],value:"⦿"},{key:[111,102,114,59],value:"𝔬"},{key:[111,103,111,110,59],value:"˛"},{key:[111,103,114,97,118,101,59],value:"ò"},{key:[111,103,116,59],value:"⧁"},{key:[111,104,98,97,114,59],value:"⦵"},{key:[111,104,109,59],value:"Ω"},{key:[111,105,110,116,59],value:"∮"},{key:[111,108,97,114,114,59],value:"↺"},{key:[111,108,99,105,114,59],value:"⦾"},{key:[111,108,99,114,111,115,115,59],value:"⦻"},{key:[111,108,105,110,101,59],value:"‾"},{key:[111,108,116,59],value:"⧀"},{key:[111,109,97,99,114,59],value:"ō"},{key:[111,109,101,103,97,59],value:"ω"},{key:[111,109,105,99,114,111,110,59],value:"ο"},{key:[111,109,105,100,59],value:"⦶"},{key:[111,109,105,110,117,115,59],value:"⊖"},{key:[111,111,112,102,59],value:"𝕠"},{key:[111,112,97,114,59],value:"⦷"},{key:[111,112,101,114,112,59],value:"⦹"},{key:[111,112,108,117,115,59],value:"⊕"},{key:[111,114,59],value:"∨"},{key:[111,114,97,114,114,59],value:"↻"},{key:[111,114,100,59],value:"⩝"},{key:[111,114,100,101,114,59],value:"ℴ"},{key:[111,114,100,101,114,111,102,59],value:"ℴ"},{key:[111,114,100,102,59],value:"ª"},{key:[111,114,100,109,59],value:"º"},{key:[111,114,105,103,111,102,59],value:"⊶"},{key:[111,114,111,114,59],value:"⩖"},{key:[111,114,115,108,111,112,101,59],value:"⩗"},{key:[111,114,118,59],value:"⩛"},{key:[111,115,99,114,59],value:"ℴ"},{key:[111,115,108,97,115,104,59],value:"ø"},{key:[111,115,111,108,59],value:"⊘"},{key:[111,116,105,108,100,101,59],value:"õ"},{key:[111,116,105,109,101,115,59],value:"⊗"},{key:[111,116,105,109,101,115,97,115,59],value:"⨶"},{key:[111,117,109,108,59],value:"ö"},{key:[111,118,98,97,114,59],value:"⌽"},{key:[112,97,114,59],value:"∥"},{key:[112,97,114,97,59],value:"¶"},{key:[112,97,114,97,108,108,101,108,59],value:"∥"},{key:[112,97,114,115,105,109,59],value:"⫳"},{key:[112,97,114,115,108,59],value:"⫽"},{key:[112,97,114,116,59],value:"∂"},{key:[112,99,121,59],value:"п"},{key:[112,101,114,99,110,116,59],value:"%"},{key:[112,101,114,105,111,100,59],value:"."},{key:[112,101,114,109,105,108,59],value:"‰"},{key:[112,101,114,112,59],value:"⊥"},{key:[112,101,114,116,101,110,107,59],value:"‱"},{key:[112,102,114,59],value:"𝔭"},{key:[112,104,105,59],value:"φ"},{key:[112,104,105,118,59],value:"ϕ"},{key:[112,104,109,109,97,116,59],value:"ℳ"},{key:[112,104,111,110,101,59],value:"☎"},{key:[112,105,59],value:"π"},{key:[112,105,116,99,104,102,111,114,107,59],value:"⋔"},{key:[112,105,118,59],value:"ϖ"},{key:[112,108,97,110,99,107,59],value:"ℏ"},{key:[112,108,97,110,99,107,104,59],value:"ℎ"},{key:[112,108,97,110,107,118,59],value:"ℏ"},{key:[112,108,117,115,59],value:"+"},{key:[112,108,117,115,97,99,105,114,59],value:"⨣"},{key:[112,108,117,115,98,59],value:"⊞"},{key:[112,108,117,115,99,105,114,59],value:"⨢"},{key:[112,108,117,115,100,111,59],value:"∔"},{key:[112,108,117,115,100,117,59],value:"⨥"},{key:[112,108,117,115,101,59],value:"⩲"},{key:[112,108,117,115,109,110,59],value:"±"},{key:[112,108,117,115,115,105,109,59],value:"⨦"},{key:[112,108,117,115,116,119,111,59],value:"⨧"},{key:[112,109,59],value:"±"},{key:[112,111,105,110,116,105,110,116,59],value:"⨕"},{key:[112,111,112,102,59],value:"𝕡"},{key:[112,111,117,110,100,59],value:"£"},{key:[112,114,59],value:"≺"},{key:[112,114,69,59],value:"⪳"},{key:[112,114,97,112,59],value:"⪷"},{key:[112,114,99,117,101,59],value:"≼"},{key:[112,114,101,59],value:"⪯"},{key:[112,114,101,99,59],value:"≺"},{key:[112,114,101,99,97,112,112,114,111,120,59],value:"⪷"},{key:[112,114,101,99,99,117,114,108,121,101,113,59],value:"≼"},{key:[112,114,101,99,101,113,59],value:"⪯"},{key:[112,114,101,99,110,97,112,112,114,111,120,59],value:"⪹"},{key:[112,114,101,99,110,101,113,113,59],value:"⪵"},{key:[112,114,101,99,110,115,105,109,59],value:"⋨"},{key:[112,114,101,99,115,105,109,59],value:"≾"},{key:[112,114,105,109,101,59],value:"′"},{key:[112,114,105,109,101,115,59],value:"ℙ"},{key:[112,114,110,69,59],value:"⪵"},{key:[112,114,110,97,112,59],value:"⪹"},{key:[112,114,110,115,105,109,59],value:"⋨"},{key:[112,114,111,100,59],value:"∏"},{key:[112,114,111,102,97,108,97,114,59],value:"⌮"},{key:[112,114,111,102,108,105,110,101,59],value:"⌒"},{key:[112,114,111,102,115,117,114,102,59],value:"⌓"},{key:[112,114,111,112,59],value:"∝"},{key:[112,114,111,112,116,111,59],value:"∝"},{key:[112,114,115,105,109,59],value:"≾"},{key:[112,114,117,114,101,108,59],value:"⊰"},{key:[112,115,99,114,59],value:"𝓅"},{key:[112,115,105,59],value:"ψ"},{key:[112,117,110,99,115,112,59],value:" "},{key:[113,102,114,59],value:"𝔮"},{key:[113,105,110,116,59],value:"⨌"},{key:[113,111,112,102,59],value:"𝕢"},{key:[113,112,114,105,109,101,59],value:"⁗"},{key:[113,115,99,114,59],value:"𝓆"},{key:[113,117,97,116,101,114,110,105,111,110,115,59],value:"ℍ"},{key:[113,117,97,116,105,110,116,59],value:"⨖"},{key:[113,117,101,115,116,59],value:"?"},{key:[113,117,101,115,116,101,113,59],value:"≟"},{key:[113,117,111,116,59],value:'"'},{key:[114,65,97,114,114,59],value:"⇛"},{key:[114,65,114,114,59],value:"⇒"},{key:[114,65,116,97,105,108,59],value:"⤜"},{key:[114,66,97,114,114,59],value:"⤏"},{key:[114,72,97,114,59],value:"⥤"},{key:[114,97,99,101,59],value:"∽̱"},{key:[114,97,99,117,116,101,59],value:"ŕ"},{key:[114,97,100,105,99,59],value:"√"},{key:[114,97,101,109,112,116,121,118,59],value:"⦳"},{key:[114,97,110,103,59],value:"⟩"},{key:[114,97,110,103,100,59],value:"⦒"},{key:[114,97,110,103,101,59],value:"⦥"},{key:[114,97,110,103,108,101,59],value:"⟩"},{key:[114,97,113,117,111,59],value:"»"},{key:[114,97,114,114,59],value:"→"},{key:[114,97,114,114,97,112,59],value:"⥵"},{key:[114,97,114,114,98,59],value:"⇥"},{key:[114,97,114,114,98,102,115,59],value:"⤠"},{key:[114,97,114,114,99,59],value:"⤳"},{key:[114,97,114,114,102,115,59],value:"⤞"},{key:[114,97,114,114,104,107,59],value:"↪"},{key:[114,97,114,114,108,112,59],value:"↬"},{key:[114,97,114,114,112,108,59],value:"⥅"},{key:[114,97,114,114,115,105,109,59],value:"⥴"},{key:[114,97,114,114,116,108,59],value:"↣"},{key:[114,97,114,114,119,59],value:"↝"},{key:[114,97,116,97,105,108,59],value:"⤚"},{key:[114,97,116,105,111,59],value:"∶"},{key:[114,97,116,105,111,110,97,108,115,59],value:"ℚ"},{key:[114,98,97,114,114,59],value:"⤍"},{key:[114,98,98,114,107,59],value:"❳"},{key:[114,98,114,97,99,101,59],value:" }"},{key:[114,98,114,97,99,107,59],value:"]"},{key:[114,98,114,107,101,59],value:"⦌"},{key:[114,98,114,107,115,108,100,59],value:"⦎"},{key:[114,98,114,107,115,108,117,59],value:"⦐"},{key:[114,99,97,114,111,110,59],value:"ř"},{key:[114,99,101,100,105,108,59],value:"ŗ"},{key:[114,99,101,105,108,59],value:"⌉"},{key:[114,99,117,98,59],value:" }"},{key:[114,99,121,59],value:"р"},{key:[114,100,99,97,59],value:"⤷"},{key:[114,100,108,100,104,97,114,59],value:"⥩"},{key:[114,100,113,117,111,59],value:"”"},{key:[114,100,113,117,111,114,59],value:"”"},{key:[114,100,115,104,59],value:"↳"},{key:[114,101,97,108,59],value:"ℜ"},{key:[114,101,97,108,105,110,101,59],value:"ℛ"},{key:[114,101,97,108,112,97,114,116,59],value:"ℜ"},{key:[114,101,97,108,115,59],value:"ℝ"},{key:[114,101,99,116,59],value:"▭"},{key:[114,101,103,59],value:"®"},{key:[114,102,105,115,104,116,59],value:"⥽"},{key:[114,102,108,111,111,114,59],value:"⌋"},{key:[114,102,114,59],value:"𝔯"},{key:[114,104,97,114,100,59],value:"⇁"},{key:[114,104,97,114,117,59],value:"⇀"},{key:[114,104,97,114,117,108,59],value:"⥬"},{key:[114,104,111,59],value:"ρ"},{key:[114,104,111,118,59],value:"ϱ"},{key:[114,105,103,104,116,97,114,114,111,119,59],value:"→"},{key:[114,105,103,104,116,97,114,114,111,119,116,97,105,108,59],value:"↣"},{key:[114,105,103,104,116,104,97,114,112,111,111,110,100,111,119,110,59],value:"⇁"},{key:[114,105,103,104,116,104,97,114,112,111,111,110,117,112,59],value:"⇀"},{key:[114,105,103,104,116,108,101,102,116,97,114,114,111,119,115,59],value:"⇄"},{key:[114,105,103,104,116,108,101,102,116,104,97,114,112,111,111,110,115,59],value:"⇌"},{key:[114,105,103,104,116,114,105,103,104,116,97,114,114,111,119,115,59],value:"⇉"},{key:[114,105,103,104,116,115,113,117,105,103,97,114,114,111,119,59],value:"↝"},{key:[114,105,103,104,116,116,104,114,101,101,116,105,109,101,115,59],value:"⋌"},{key:[114,105,110,103,59],value:"˚"},{key:[114,105,115,105,110,103,100,111,116,115,101,113,59],value:"≓"},{key:[114,108,97,114,114,59],value:"⇄"},{key:[114,108,104,97,114,59],value:"⇌"},{key:[114,108,109,59],value:"‏"},{key:[114,109,111,117,115,116,59],value:"⎱"},{key:[114,109,111,117,115,116,97,99,104,101,59],value:"⎱"},{key:[114,110,109,105,100,59],value:"⫮"},{key:[114,111,97,110,103,59],value:"⟭"},{key:[114,111,97,114,114,59],value:"⇾"},{key:[114,111,98,114,107,59],value:"⟧"},{key:[114,111,112,97,114,59],value:"⦆"},{key:[114,111,112,102,59],value:"𝕣"},{key:[114,111,112,108,117,115,59],value:"⨮"},{key:[114,111,116,105,109,101,115,59],value:"⨵"},{key:[114,112,97,114,59],value:")"},{key:[114,112,97,114,103,116,59],value:"⦔"},{key:[114,112,112,111,108,105,110,116,59],value:"⨒"},{key:[114,114,97,114,114,59],value:"⇉"},{key:[114,115,97,113,117,111,59],value:"›"},{key:[114,115,99,114,59],value:"𝓇"},{key:[114,115,104,59],value:"↱"},{key:[114,115,113,98,59],value:"]"},{key:[114,115,113,117,111,59],value:"’"},{key:[114,115,113,117,111,114,59],value:"’"},{key:[114,116,104,114,101,101,59],value:"⋌"},{key:[114,116,105,109,101,115,59],value:"⋊"},{key:[114,116,114,105,59],value:"▹"},{key:[114,116,114,105,101,59],value:"⊵"},{key:[114,116,114,105,102,59],value:"▸"},{key:[114,116,114,105,108,116,114,105,59],value:"⧎"},{key:[114,117,108,117,104,97,114,59],value:"⥨"},{key:[114,120,59],value:"℞"},{key:[115,97,99,117,116,101,59],value:"ś"},{key:[115,98,113,117,111,59],value:"‚"},{key:[115,99,59],value:"≻"},{key:[115,99,69,59],value:"⪴"},{key:[115,99,97,112,59],value:"⪸"},{key:[115,99,97,114,111,110,59],value:"š"},{key:[115,99,99,117,101,59],value:"≽"},{key:[115,99,101,59],value:"⪰"},{key:[115,99,101,100,105,108,59],value:"ş"},{key:[115,99,105,114,99,59],value:"ŝ"},{key:[115,99,110,69,59],value:"⪶"},{key:[115,99,110,97,112,59],value:"⪺"},{key:[115,99,110,115,105,109,59],value:"⋩"},{key:[115,99,112,111,108,105,110,116,59],value:"⨓"},{key:[115,99,115,105,109,59],value:"≿"},{key:[115,99,121,59],value:"с"},{key:[115,100,111,116,59],value:"⋅"},{key:[115,100,111,116,98,59],value:"⊡"},{key:[115,100,111,116,101,59],value:"⩦"},{key:[115,101,65,114,114,59],value:"⇘"},{key:[115,101,97,114,104,107,59],value:"⤥"},{key:[115,101,97,114,114,59],value:"↘"},{key:[115,101,97,114,114,111,119,59],value:"↘"},{key:[115,101,99,116,59],value:"§"},{key:[115,101,109,105,59],value:";"},{key:[115,101,115,119,97,114,59],value:"⤩"},{key:[115,101,116,109,105,110,117,115,59],value:"∖"},{key:[115,101,116,109,110,59],value:"∖"},{key:[115,101,120,116,59],value:"✶"},{key:[115,102,114,59],value:"𝔰"},{key:[115,102,114,111,119,110,59],value:"⌢"},{key:[115,104,97,114,112,59],value:"♯"},{key:[115,104,99,104,99,121,59],value:"щ"},{key:[115,104,99,121,59],value:"ш"},{key:[115,104,111,114,116,109,105,100,59],value:"∣"},{key:[115,104,111,114,116,112,97,114,97,108,108,101,108,59],value:"∥"},{key:[115,104,121,59],value:"­"},{key:[115,105,103,109,97,59],value:"σ"},{key:[115,105,103,109,97,102,59],value:"ς"},{key:[115,105,103,109,97,118,59],value:"ς"},{key:[115,105,109,59],value:"∼"},{key:[115,105,109,100,111,116,59],value:"⩪"},{key:[115,105,109,101,59],value:"≃"},{key:[115,105,109,101,113,59],value:"≃"},{key:[115,105,109,103,59],value:"⪞"},{key:[115,105,109,103,69,59],value:"⪠"},{key:[115,105,109,108,59],value:"⪝"},{key:[115,105,109,108,69,59],value:"⪟"},{key:[115,105,109,110,101,59],value:"≆"},{key:[115,105,109,112,108,117,115,59],value:"⨤"},{key:[115,105,109,114,97,114,114,59],value:"⥲"},{key:[115,108,97,114,114,59],value:"←"},{key:[115,109,97,108,108,115,101,116,109,105,110,117,115,59],value:"∖"},{key:[115,109,97,115,104,112,59],value:"⨳"},{key:[115,109,101,112,97,114,115,108,59],value:"⧤"},{key:[115,109,105,100,59],value:"∣"},{key:[115,109,105,108,101,59],value:"⌣"},{key:[115,109,116,59],value:"⪪"},{key:[115,109,116,101,59],value:"⪬"},{key:[115,109,116,101,115,59],value:"⪬︀"},{key:[115,111,102,116,99,121,59],value:"ь"},{key:[115,111,108,59],value:"/"},{key:[115,111,108,98,59],value:"⧄"},{key:[115,111,108,98,97,114,59],value:"⌿"},{key:[115,111,112,102,59],value:"𝕤"},{key:[115,112,97,100,101,115,59],value:"♠"},{key:[115,112,97,100,101,115,117,105,116,59],value:"♠"},{key:[115,112,97,114,59],value:"∥"},{key:[115,113,99,97,112,59],value:"⊓"},{key:[115,113,99,97,112,115,59],value:"⊓︀"},{key:[115,113,99,117,112,59],value:"⊔"},{key:[115,113,99,117,112,115,59],value:"⊔︀"},{key:[115,113,115,117,98,59],value:"⊏"},{key:[115,113,115,117,98,101,59],value:"⊑"},{key:[115,113,115,117,98,115,101,116,59],value:"⊏"},{key:[115,113,115,117,98,115,101,116,101,113,59],value:"⊑"},{key:[115,113,115,117,112,59],value:"⊐"},{key:[115,113,115,117,112,101,59],value:"⊒"},{key:[115,113,115,117,112,115,101,116,59],value:"⊐"},{key:[115,113,115,117,112,115,101,116,101,113,59],value:"⊒"},{key:[115,113,117,59],value:"□"},{key:[115,113,117,97,114,101,59],value:"□"},{key:[115,113,117,97,114,102,59],value:"▪"},{key:[115,113,117,102,59],value:"▪"},{key:[115,114,97,114,114,59],value:"→"},{key:[115,115,99,114,59],value:"𝓈"},{key:[115,115,101,116,109,110,59],value:"∖"},{key:[115,115,109,105,108,101,59],value:"⌣"},{key:[115,115,116,97,114,102,59],value:"⋆"},{key:[115,116,97,114,59],value:"☆"},{key:[115,116,97,114,102,59],value:"★"},{key:[115,116,114,97,105,103,104,116,101,112,115,105,108,111,110,59],value:"ϵ"},{key:[115,116,114,97,105,103,104,116,112,104,105,59],value:"ϕ"},{key:[115,116,114,110,115,59],value:"¯"},{key:[115,117,98,59],value:"⊂"},{key:[115,117,98,69,59],value:"⫅"},{key:[115,117,98,100,111,116,59],value:"⪽"},{key:[115,117,98,101,59],value:"⊆"},{key:[115,117,98,101,100,111,116,59],value:"⫃"},{key:[115,117,98,109,117,108,116,59],value:"⫁"},{key:[115,117,98,110,69,59],value:"⫋"},{key:[115,117,98,110,101,59],value:"⊊"},{key:[115,117,98,112,108,117,115,59],value:"⪿"},{key:[115,117,98,114,97,114,114,59],value:"⥹"},{key:[115,117,98,115,101,116,59],value:"⊂"},{key:[115,117,98,115,101,116,101,113,59],value:"⊆"},{key:[115,117,98,115,101,116,101,113,113,59],value:"⫅"},{key:[115,117,98,115,101,116,110,101,113,59],value:"⊊"},{key:[115,117,98,115,101,116,110,101,113,113,59],value:"⫋"},{key:[115,117,98,115,105,109,59],value:"⫇"},{key:[115,117,98,115,117,98,59],value:"⫕"},{key:[115,117,98,115,117,112,59],value:"⫓"},{key:[115,117,99,99,59],value:"≻"},{key:[115,117,99,99,97,112,112,114,111,120,59],value:"⪸"},{key:[115,117,99,99,99,117,114,108,121,101,113,59],value:"≽"},{key:[115,117,99,99,101,113,59],value:"⪰"},{key:[115,117,99,99,110,97,112,112,114,111,120,59],value:"⪺"},{key:[115,117,99,99,110,101,113,113,59],value:"⪶"},{key:[115,117,99,99,110,115,105,109,59],value:"⋩"},{key:[115,117,99,99,115,105,109,59],value:"≿"},{key:[115,117,109,59],value:"∑"},{key:[115,117,110,103,59],value:"♪"},{key:[115,117,112,49,59],value:"¹"},{key:[115,117,112,50,59],value:"²"},{key:[115,117,112,51,59],value:"³"},{key:[115,117,112,59],value:"⊃"},{key:[115,117,112,69,59],value:"⫆"},{key:[115,117,112,100,111,116,59],value:"⪾"},{key:[115,117,112,100,115,117,98,59],value:"⫘"},{key:[115,117,112,101,59],value:"⊇"},{key:[115,117,112,101,100,111,116,59],value:"⫄"},{key:[115,117,112,104,115,111,108,59],value:"⟉"},{key:[115,117,112,104,115,117,98,59],value:"⫗"},{key:[115,117,112,108,97,114,114,59],value:"⥻"},{key:[115,117,112,109,117,108,116,59],value:"⫂"},{key:[115,117,112,110,69,59],value:"⫌"},{key:[115,117,112,110,101,59],value:"⊋"},{key:[115,117,112,112,108,117,115,59],value:"⫀"},{key:[115,117,112,115,101,116,59],value:"⊃"},{key:[115,117,112,115,101,116,101,113,59],value:"⊇"},{key:[115,117,112,115,101,116,101,113,113,59],value:"⫆"},{key:[115,117,112,115,101,116,110,101,113,59],value:"⊋"},{key:[115,117,112,115,101,116,110,101,113,113,59],value:"⫌"},{key:[115,117,112,115,105,109,59],value:"⫈"},{key:[115,117,112,115,117,98,59],value:"⫔"},{key:[115,117,112,115,117,112,59],value:"⫖"},{key:[115,119,65,114,114,59],value:"⇙"},{key:[115,119,97,114,104,107,59],value:"⤦"},{key:[115,119,97,114,114,59],value:"↙"},{key:[115,119,97,114,114,111,119,59],value:"↙"},{key:[115,119,110,119,97,114,59],value:"⤪"},{key:[115,122,108,105,103,59],value:"ß"},{key:[116,97,114,103,101,116,59],value:"⌖"},{key:[116,97,117,59],value:"τ"},{key:[116,98,114,107,59],value:"⎴"},{key:[116,99,97,114,111,110,59],value:"ť"},{key:[116,99,101,100,105,108,59],value:"ţ"},{key:[116,99,121,59],value:"т"},{key:[116,100,111,116,59],value:"⃛"},{key:[116,101,108,114,101,99,59],value:"⌕"},{key:[116,102,114,59],value:"𝔱"},{key:[116,104,101,114,101,52,59],value:"∴"},{key:[116,104,101,114,101,102,111,114,101,59],value:"∴"},{key:[116,104,101,116,97,59],value:"θ"},{key:[116,104,101,116,97,115,121,109,59],value:"ϑ"},{key:[116,104,101,116,97,118,59],value:"ϑ"},{key:[116,104,105,99,107,97,112,112,114,111,120,59],value:"≈"},{key:[116,104,105,99,107,115,105,109,59],value:"∼"},{key:[116,104,105,110,115,112,59],value:" "},{key:[116,104,107,97,112,59],value:"≈"},{key:[116,104,107,115,105,109,59],value:"∼"},{key:[116,104,111,114,110,59],value:"þ"},{key:[116,105,108,100,101,59],value:"˜"},{key:[116,105,109,101,115,59],value:"×"},{key:[116,105,109,101,115,98,59],value:"⊠"},{key:[116,105,109,101,115,98,97,114,59],value:"⨱"},{key:[116,105,109,101,115,100,59],value:"⨰"},{key:[116,105,110,116,59],value:"∭"},{key:[116,111,101,97,59],value:"⤨"},{key:[116,111,112,59],value:"⊤"},{key:[116,111,112,98,111,116,59],value:"⌶"},{key:[116,111,112,99,105,114,59],value:"⫱"},{key:[116,111,112,102,59],value:"𝕥"},{key:[116,111,112,102,111,114,107,59],value:"⫚"},{key:[116,111,115,97,59],value:"⤩"},{key:[116,112,114,105,109,101,59],value:"‴"},{key:[116,114,97,100,101,59],value:"™"},{key:[116,114,105,97,110,103,108,101,59],value:"▵"},{key:[116,114,105,97,110,103,108,101,100,111,119,110,59],value:"▿"},{key:[116,114,105,97,110,103,108,101,108,101,102,116,59],value:"◃"},{key:[116,114,105,97,110,103,108,101,108,101,102,116,101,113,59],value:"⊴"},{key:[116,114,105,97,110,103,108,101,113,59],value:"≜"},{key:[116,114,105,97,110,103,108,101,114,105,103,104,116,59],value:"▹"},{key:[116,114,105,97,110,103,108,101,114,105,103,104,116,101,113,59],value:"⊵"},{key:[116,114,105,100,111,116,59],value:"◬"},{key:[116,114,105,101,59],value:"≜"},{key:[116,114,105,109,105,110,117,115,59],value:"⨺"},{key:[116,114,105,112,108,117,115,59],value:"⨹"},{key:[116,114,105,115,98,59],value:"⧍"},{key:[116,114,105,116,105,109,101,59],value:"⨻"},{key:[116,114,112,101,122,105,117,109,59],value:"⏢"},{key:[116,115,99,114,59],value:"𝓉"},{key:[116,115,99,121,59],value:"ц"},{key:[116,115,104,99,121,59],value:"ћ"},{key:[116,115,116,114,111,107,59],value:"ŧ"},{key:[116,119,105,120,116,59],value:"≬"},{key:[116,119,111,104,101,97,100,108,101,102,116,97,114,114,111,119,59],value:"↞"},{key:[116,119,111,104,101,97,100,114,105,103,104,116,97,114,114,111,119,59],value:"↠"},{key:[117,65,114,114,59],value:"⇑"},{key:[117,72,97,114,59],value:"⥣"},{key:[117,97,99,117,116,101,59],value:"ú"},{key:[117,97,114,114,59],value:"↑"},{key:[117,98,114,99,121,59],value:"ў"},{key:[117,98,114,101,118,101,59],value:"ŭ"},{key:[117,99,105,114,99,59],value:"û"},{key:[117,99,121,59],value:"у"},{key:[117,100,97,114,114,59],value:"⇅"},{key:[117,100,98,108,97,99,59],value:"ű"},{key:[117,100,104,97,114,59],value:"⥮"},{key:[117,102,105,115,104,116,59],value:"⥾"},{key:[117,102,114,59],value:"𝔲"},{key:[117,103,114,97,118,101,59],value:"ù"},{key:[117,104,97,114,108,59],value:"↿"},{key:[117,104,97,114,114,59],value:"↾"},{key:[117,104,98,108,107,59],value:"▀"},{key:[117,108,99,111,114,110,59],value:"⌜"},{key:[117,108,99,111,114,110,101,114,59],value:"⌜"},{key:[117,108,99,114,111,112,59],value:"⌏"},{key:[117,108,116,114,105,59],value:"◸"},{key:[117,109,97,99,114,59],value:"ū"},{key:[117,109,108,59],value:"¨"},{key:[117,111,103,111,110,59],value:"ų"},{key:[117,111,112,102,59],value:"𝕦"},{key:[117,112,97,114,114,111,119,59],value:"↑"},{key:[117,112,100,111,119,110,97,114,114,111,119,59],value:"↕"},{key:[117,112,104,97,114,112,111,111,110,108,101,102,116,59],value:"↿"},{key:[117,112,104,97,114,112,111,111,110,114,105,103,104,116,59],value:"↾"},{key:[117,112,108,117,115,59],value:"⊎"},{key:[117,112,115,105,59],value:"υ"},{key:[117,112,115,105,104,59],value:"ϒ"},{key:[117,112,115,105,108,111,110,59],value:"υ"},{key:[117,112,117,112,97,114,114,111,119,115,59],value:"⇈"},{key:[117,114,99,111,114,110,59],value:"⌝"},{key:[117,114,99,111,114,110,101,114,59],value:"⌝"},{key:[117,114,99,114,111,112,59],value:"⌎"},{key:[117,114,105,110,103,59],value:"ů"},{key:[117,114,116,114,105,59],value:"◹"},{key:[117,115,99,114,59],value:"𝓊"},{key:[117,116,100,111,116,59],value:"⋰"},{key:[117,116,105,108,100,101,59],value:"ũ"},{key:[117,116,114,105,59],value:"▵"},{key:[117,116,114,105,102,59],value:"▴"},{key:[117,117,97,114,114,59],value:"⇈"},{key:[117,117,109,108,59],value:"ü"},{key:[117,119,97,110,103,108,101,59],value:"⦧"},{key:[118,65,114,114,59],value:"⇕"},{key:[118,66,97,114,59],value:"⫨"},{key:[118,66,97,114,118,59],value:"⫩"},{key:[118,68,97,115,104,59],value:"⊨"},{key:[118,97,110,103,114,116,59],value:"⦜"},{key:[118,97,114,101,112,115,105,108,111,110,59],value:"ϵ"},{key:[118,97,114,107,97,112,112,97,59],value:"ϰ"},{key:[118,97,114,110,111,116,104,105,110,103,59],value:"∅"},{key:[118,97,114,112,104,105,59],value:"ϕ"},{key:[118,97,114,112,105,59],value:"ϖ"},{key:[118,97,114,112,114,111,112,116,111,59],value:"∝"},{key:[118,97,114,114,59],value:"↕"},{key:[118,97,114,114,104,111,59],value:"ϱ"},{key:[118,97,114,115,105,103,109,97,59],value:"ς"},{key:[118,97,114,115,117,98,115,101,116,110,101,113,59],value:"⊊︀"},{key:[118,97,114,115,117,98,115,101,116,110,101,113,113,59],value:"⫋︀"},{key:[118,97,114,115,117,112,115,101,116,110,101,113,59],value:"⊋︀"},{key:[118,97,114,115,117,112,115,101,116,110,101,113,113,59],value:"⫌︀"},{key:[118,97,114,116,104,101,116,97,59],value:"ϑ"},{key:[118,97,114,116,114,105,97,110,103,108,101,108,101,102,116,59],value:"⊲"},{key:[118,97,114,116,114,105,97,110,103,108,101,114,105,103,104,116,59],value:"⊳"},{key:[118,99,121,59],value:"в"},{key:[118,100,97,115,104,59],value:"⊢"},{key:[118,101,101,59],value:"∨"},{key:[118,101,101,98,97,114,59],value:"⊻"},{key:[118,101,101,101,113,59],value:"≚"},{key:[118,101,108,108,105,112,59],value:"⋮"},{key:[118,101,114,98,97,114,59],value:"|"},{key:[118,101,114,116,59],value:"|"},{key:[118,102,114,59],value:"𝔳"},{key:[118,108,116,114,105,59],value:"⊲"},{key:[118,110,115,117,98,59],value:"⊂⃒"},{key:[118,110,115,117,112,59],value:"⊃⃒"},{key:[118,111,112,102,59],value:"𝕧"},{key:[118,112,114,111,112,59],value:"∝"},{key:[118,114,116,114,105,59],value:"⊳"},{key:[118,115,99,114,59],value:"𝓋"},{key:[118,115,117,98,110,69,59],value:"⫋︀"},{key:[118,115,117,98,110,101,59],value:"⊊︀"},{key:[118,115,117,112,110,69,59],value:"⫌︀"},{key:[118,115,117,112,110,101,59],value:"⊋︀"},{key:[118,122,105,103,122,97,103,59],value:"⦚"},{key:[119,99,105,114,99,59],value:"ŵ"},{key:[119,101,100,98,97,114,59],value:"⩟"},{key:[119,101,100,103,101,59],value:"∧"},{key:[119,101,100,103,101,113,59],value:"≙"},{key:[119,101,105,101,114,112,59],value:"℘"},{key:[119,102,114,59],value:"𝔴"},{key:[119,111,112,102,59],value:"𝕨"},{key:[119,112,59],value:"℘"},{key:[119,114,59],value:"≀"},{key:[119,114,101,97,116,104,59],value:"≀"},{key:[119,115,99,114,59],value:"𝓌"},{key:[120,99,97,112,59],value:"⋂"},{key:[120,99,105,114,99,59],value:"◯"},{key:[120,99,117,112,59],value:"⋃"},{key:[120,100,116,114,105,59],value:"▽"},{key:[120,102,114,59],value:"𝔵"},{key:[120,104,65,114,114,59],value:"⟺"},{key:[120,104,97,114,114,59],value:"⟷"},{key:[120,105,59],value:"ξ"},{key:[120,108,65,114,114,59],value:"⟸"},{key:[120,108,97,114,114,59],value:"⟵"},{key:[120,109,97,112,59],value:"⟼"},{key:[120,110,105,115,59],value:"⋻"},{key:[120,111,100,111,116,59],value:"⨀"},{key:[120,111,112,102,59],value:"𝕩"},{key:[120,111,112,108,117,115,59],value:"⨁"},{key:[120,111,116,105,109,101,59],value:"⨂"},{key:[120,114,65,114,114,59],value:"⟹"},{key:[120,114,97,114,114,59],value:"⟶"},{key:[120,115,99,114,59],value:"𝓍"},{key:[120,115,113,99,117,112,59],value:"⨆"},{key:[120,117,112,108,117,115,59],value:"⨄"},{key:[120,117,116,114,105,59],value:"△"},{key:[120,118,101,101,59],value:"⋁"},{key:[120,119,101,100,103,101,59],value:"⋀"},{key:[121,97,99,117,116,101,59],value:"ý"},{key:[121,97,99,121,59],value:"я"},{key:[121,99,105,114,99,59],value:"ŷ"},{key:[121,99,121,59],value:"ы"},{key:[121,101,110,59],value:"¥"},{key:[121,102,114,59],value:"𝔶"},{key:[121,105,99,121,59],value:"ї"},{key:[121,111,112,102,59],value:"𝕪"},{key:[121,115,99,114,59],value:"𝓎"},{key:[121,117,99,121,59],value:"ю"},{key:[121,117,109,108,59],value:"ÿ"},{key:[122,97,99,117,116,101,59],value:"ź"},{key:[122,99,97,114,111,110,59],value:"ž"},{key:[122,99,121,59],value:"з"},{key:[122,100,111,116,59],value:"ż"},{key:[122,101,101,116,114,102,59],value:"ℨ"},{key:[122,101,116,97,59],value:"ζ"},{key:[122,102,114,59],value:"𝔷"},{key:[122,104,99,121,59],value:"ж"},{key:[122,105,103,114,97,114,114,59],value:"⇝"},{key:[122,111,112,102,59],value:"𝕫"},{key:[122,115,99,114,59],value:"𝓏"},{key:[122,119,106,59],value:"‍"},{key:[122,119,110,106,59],value:"‌"}];var UnicodePcCodePoint;(function(eo){eo[eo.LOW_LINE=95]="LOW_LINE",eo[eo.UNDERTIE=8255]="UNDERTIE",eo[eo.CHARACTER_TIE=8256]="CHARACTER_TIE",eo[eo.INVERTED_UNDERTIE=8276]="INVERTED_UNDERTIE",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LOW_LINE=65075]="PRESENTATION_FORM_FOR_VERTICAL_LOW_LINE",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_WAVY_LOW_LINE=65076]="PRESENTATION_FORM_FOR_VERTICAL_WAVY_LOW_LINE",eo[eo.DASHED_LOW_LINE=65101]="DASHED_LOW_LINE",eo[eo.CENTRELINE_LOW_LINE=65102]="CENTRELINE_LOW_LINE",eo[eo.WAVY_LOW_LINE=65103]="WAVY_LOW_LINE",eo[eo.FULLWIDTH_LOW_LINE=65343]="FULLWIDTH_LOW_LINE"})(UnicodePcCodePoint||(UnicodePcCodePoint={}));var UnicodePdCodePoint;(function(eo){eo[eo.HYPHEN_MINUS=45]="HYPHEN_MINUS",eo[eo.ARMENIAN_HYPHEN=1418]="ARMENIAN_HYPHEN",eo[eo.HEBREW_PUNCTUATION_MAQAF=1470]="HEBREW_PUNCTUATION_MAQAF",eo[eo.CANADIAN_SYLLABICS_HYPHEN=5120]="CANADIAN_SYLLABICS_HYPHEN",eo[eo.MONGOLIAN_TODO_SOFT_HYPHEN=6150]="MONGOLIAN_TODO_SOFT_HYPHEN",eo[eo.HYPHEN=8208]="HYPHEN",eo[eo.NON_BREAKING_HYPHEN=8209]="NON_BREAKING_HYPHEN",eo[eo.FIGURE_DASH=8210]="FIGURE_DASH",eo[eo.EN_DASH=8211]="EN_DASH",eo[eo.EM_DASH=8212]="EM_DASH",eo[eo.HORIZONTAL_BAR=8213]="HORIZONTAL_BAR",eo[eo.DOUBLE_OBLIQUE_HYPHEN=11799]="DOUBLE_OBLIQUE_HYPHEN",eo[eo.HYPHEN_WITH_DIAERESIS=11802]="HYPHEN_WITH_DIAERESIS",eo[eo.TWO_EM_DASH=11834]="TWO_EM_DASH",eo[eo.THREE_EM_DASH=11835]="THREE_EM_DASH",eo[eo.DOUBLE_HYPHEN=11840]="DOUBLE_HYPHEN",eo[eo.WAVE_DASH=12316]="WAVE_DASH",eo[eo.WAVY_DASH=12336]="WAVY_DASH",eo[eo.KATAKANA_HIRAGANA_DOUBLE_HYPHEN=12448]="KATAKANA_HIRAGANA_DOUBLE_HYPHEN",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_EM_DASH=65073]="PRESENTATION_FORM_FOR_VERTICAL_EM_DASH",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_EN_DASH=65074]="PRESENTATION_FORM_FOR_VERTICAL_EN_DASH",eo[eo.SMALL_EM_DASH=65112]="SMALL_EM_DASH",eo[eo.SMALL_HYPHEN_MINUS=65123]="SMALL_HYPHEN_MINUS",eo[eo.FULLWIDTH_HYPHEN_MINUS=65293]="FULLWIDTH_HYPHEN_MINUS",eo[eo.YEZIDI_HYPHENATION_MARK=69293]="YEZIDI_HYPHENATION_MARK"})(UnicodePdCodePoint||(UnicodePdCodePoint={}));var UnicodePeCodePoint;(function(eo){eo[eo.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",eo[eo.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",eo[eo.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",eo[eo.TIBETAN_MARK_GUG_RTAGS_GYAS=3899]="TIBETAN_MARK_GUG_RTAGS_GYAS",eo[eo.TIBETAN_MARK_ANG_KHANG_GYAS=3901]="TIBETAN_MARK_ANG_KHANG_GYAS",eo[eo.OGHAM_REVERSED_FEATHER_MARK=5788]="OGHAM_REVERSED_FEATHER_MARK",eo[eo.RIGHT_SQUARE_BRACKET_WITH_QUILL=8262]="RIGHT_SQUARE_BRACKET_WITH_QUILL",eo[eo.SUPERSCRIPT_RIGHT_PARENTHESIS=8318]="SUPERSCRIPT_RIGHT_PARENTHESIS",eo[eo.SUBSCRIPT_RIGHT_PARENTHESIS=8334]="SUBSCRIPT_RIGHT_PARENTHESIS",eo[eo.RIGHT_CEILING=8969]="RIGHT_CEILING",eo[eo.RIGHT_FLOOR=8971]="RIGHT_FLOOR",eo[eo.RIGHT_POINTING_ANGLE_BRACKET=9002]="RIGHT_POINTING_ANGLE_BRACKET",eo[eo.MEDIUM_RIGHT_PARENTHESIS_ORNAMENT=10089]="MEDIUM_RIGHT_PARENTHESIS_ORNAMENT",eo[eo.MEDIUM_FLATTENED_RIGHT_PARENTHESIS_ORNAMENT=10091]="MEDIUM_FLATTENED_RIGHT_PARENTHESIS_ORNAMENT",eo[eo.MEDIUM_RIGHT_POINTING_ANGLE_BRACKET_ORNAMENT=10093]="MEDIUM_RIGHT_POINTING_ANGLE_BRACKET_ORNAMENT",eo[eo.HEAVY_RIGHT_POINTING_ANGLE_QUOTATION_MARK_ORNAMENT=10095]="HEAVY_RIGHT_POINTING_ANGLE_QUOTATION_MARK_ORNAMENT",eo[eo.HEAVY_RIGHT_POINTING_ANGLE_BRACKET_ORNAMENT=10097]="HEAVY_RIGHT_POINTING_ANGLE_BRACKET_ORNAMENT",eo[eo.LIGHT_RIGHT_TORTOISE_SHELL_BRACKET_ORNAMENT=10099]="LIGHT_RIGHT_TORTOISE_SHELL_BRACKET_ORNAMENT",eo[eo.MEDIUM_RIGHT_CURLY_BRACKET_ORNAMENT=10101]="MEDIUM_RIGHT_CURLY_BRACKET_ORNAMENT",eo[eo.RIGHT_S_SHAPED_BAG_DELIMITER=10182]="RIGHT_S_SHAPED_BAG_DELIMITER",eo[eo.MATHEMATICAL_RIGHT_WHITE_SQUARE_BRACKET=10215]="MATHEMATICAL_RIGHT_WHITE_SQUARE_BRACKET",eo[eo.MATHEMATICAL_RIGHT_ANGLE_BRACKET=10217]="MATHEMATICAL_RIGHT_ANGLE_BRACKET",eo[eo.MATHEMATICAL_RIGHT_DOUBLE_ANGLE_BRACKET=10219]="MATHEMATICAL_RIGHT_DOUBLE_ANGLE_BRACKET",eo[eo.MATHEMATICAL_RIGHT_WHITE_TORTOISE_SHELL_BRACKET=10221]="MATHEMATICAL_RIGHT_WHITE_TORTOISE_SHELL_BRACKET",eo[eo.MATHEMATICAL_RIGHT_FLATTENED_PARENTHESIS=10223]="MATHEMATICAL_RIGHT_FLATTENED_PARENTHESIS",eo[eo.RIGHT_WHITE_CURLY_BRACKET=10628]="RIGHT_WHITE_CURLY_BRACKET",eo[eo.RIGHT_WHITE_PARENTHESIS=10630]="RIGHT_WHITE_PARENTHESIS",eo[eo.Z_NOTATION_RIGHT_IMAGE_BRACKET=10632]="Z_NOTATION_RIGHT_IMAGE_BRACKET",eo[eo.Z_NOTATION_RIGHT_BINDING_BRACKET=10634]="Z_NOTATION_RIGHT_BINDING_BRACKET",eo[eo.RIGHT_SQUARE_BRACKET_WITH_UNDERBAR=10636]="RIGHT_SQUARE_BRACKET_WITH_UNDERBAR",eo[eo.RIGHT_SQUARE_BRACKET_WITH_TICK_IN_BOTTOM_CORNER=10638]="RIGHT_SQUARE_BRACKET_WITH_TICK_IN_BOTTOM_CORNER",eo[eo.RIGHT_SQUARE_BRACKET_WITH_TICK_IN_TOP_CORNER=10640]="RIGHT_SQUARE_BRACKET_WITH_TICK_IN_TOP_CORNER",eo[eo.RIGHT_ANGLE_BRACKET_WITH_DOT=10642]="RIGHT_ANGLE_BRACKET_WITH_DOT",eo[eo.RIGHT_ARC_GREATER_THAN_BRACKET=10644]="RIGHT_ARC_GREATER_THAN_BRACKET",eo[eo.DOUBLE_RIGHT_ARC_LESS_THAN_BRACKET=10646]="DOUBLE_RIGHT_ARC_LESS_THAN_BRACKET",eo[eo.RIGHT_BLACK_TORTOISE_SHELL_BRACKET=10648]="RIGHT_BLACK_TORTOISE_SHELL_BRACKET",eo[eo.RIGHT_WIGGLY_FENCE=10713]="RIGHT_WIGGLY_FENCE",eo[eo.RIGHT_DOUBLE_WIGGLY_FENCE=10715]="RIGHT_DOUBLE_WIGGLY_FENCE",eo[eo.RIGHT_POINTING_CURVED_ANGLE_BRACKET=10749]="RIGHT_POINTING_CURVED_ANGLE_BRACKET",eo[eo.TOP_RIGHT_HALF_BRACKET=11811]="TOP_RIGHT_HALF_BRACKET",eo[eo.BOTTOM_RIGHT_HALF_BRACKET=11813]="BOTTOM_RIGHT_HALF_BRACKET",eo[eo.RIGHT_SIDEWAYS_U_BRACKET=11815]="RIGHT_SIDEWAYS_U_BRACKET",eo[eo.RIGHT_DOUBLE_PARENTHESIS=11817]="RIGHT_DOUBLE_PARENTHESIS",eo[eo.RIGHT_ANGLE_BRACKET=12297]="RIGHT_ANGLE_BRACKET",eo[eo.RIGHT_DOUBLE_ANGLE_BRACKET=12299]="RIGHT_DOUBLE_ANGLE_BRACKET",eo[eo.RIGHT_CORNER_BRACKET=12301]="RIGHT_CORNER_BRACKET",eo[eo.RIGHT_WHITE_CORNER_BRACKET=12303]="RIGHT_WHITE_CORNER_BRACKET",eo[eo.RIGHT_BLACK_LENTICULAR_BRACKET=12305]="RIGHT_BLACK_LENTICULAR_BRACKET",eo[eo.RIGHT_TORTOISE_SHELL_BRACKET=12309]="RIGHT_TORTOISE_SHELL_BRACKET",eo[eo.RIGHT_WHITE_LENTICULAR_BRACKET=12311]="RIGHT_WHITE_LENTICULAR_BRACKET",eo[eo.RIGHT_WHITE_TORTOISE_SHELL_BRACKET=12313]="RIGHT_WHITE_TORTOISE_SHELL_BRACKET",eo[eo.RIGHT_WHITE_SQUARE_BRACKET=12315]="RIGHT_WHITE_SQUARE_BRACKET",eo[eo.DOUBLE_PRIME_QUOTATION_MARK=12318]="DOUBLE_PRIME_QUOTATION_MARK",eo[eo.LOW_DOUBLE_PRIME_QUOTATION_MARK=12319]="LOW_DOUBLE_PRIME_QUOTATION_MARK",eo[eo.ORNATE_LEFT_PARENTHESIS=64830]="ORNATE_LEFT_PARENTHESIS",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_WHITE_LENTICULAR_BRAKCET=65048]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_WHITE_LENTICULAR_BRAKCET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_PARENTHESIS=65078]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_PARENTHESIS",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_CURLY_BRACKET=65080]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_CURLY_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_TORTOISE_SHELL_BRACKET=65082]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_TORTOISE_SHELL_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_BLACK_LENTICULAR_BRACKET=65084]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_BLACK_LENTICULAR_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_DOUBLE_ANGLE_BRACKET=65086]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_DOUBLE_ANGLE_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_ANGLE_BRACKET=65088]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_ANGLE_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_CORNER_BRACKET=65090]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_CORNER_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_WHITE_CORNER_BRACKET=65092]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_WHITE_CORNER_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_SQUARE_BRACKET=65096]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_SQUARE_BRACKET",eo[eo.SMALL_RIGHT_PARENTHESIS=65114]="SMALL_RIGHT_PARENTHESIS",eo[eo.SMALL_RIGHT_CURLY_BRACKET=65116]="SMALL_RIGHT_CURLY_BRACKET",eo[eo.SMALL_RIGHT_TORTOISE_SHELL_BRACKET=65118]="SMALL_RIGHT_TORTOISE_SHELL_BRACKET",eo[eo.FULLWIDTH_RIGHT_PARENTHESIS=65289]="FULLWIDTH_RIGHT_PARENTHESIS",eo[eo.FULLWIDTH_RIGHT_SQUARE_BRACKET=65341]="FULLWIDTH_RIGHT_SQUARE_BRACKET",eo[eo.FULLWIDTH_RIGHT_CURLY_BRACKET=65373]="FULLWIDTH_RIGHT_CURLY_BRACKET",eo[eo.FULLWIDTH_RIGHT_WHITE_PARENTHESIS=65376]="FULLWIDTH_RIGHT_WHITE_PARENTHESIS",eo[eo.HALFWIDTH_RIGHT_CORNER_BRACKET=65379]="HALFWIDTH_RIGHT_CORNER_BRACKET"})(UnicodePeCodePoint||(UnicodePeCodePoint={}));var UnicodePfCodePoint;(function(eo){eo[eo.RIGHT_POINTING_DOUBLE_ANGLE_QUOTATION_MARK=187]="RIGHT_POINTING_DOUBLE_ANGLE_QUOTATION_MARK",eo[eo.RIGHT_SINGLE_QUOTATION_MARK=8217]="RIGHT_SINGLE_QUOTATION_MARK",eo[eo.RIGHT_DOUBLE_QUOTATION_MARK=8221]="RIGHT_DOUBLE_QUOTATION_MARK",eo[eo.SINGLE_RIGHT_POINTING_ANGLE_QUOTATION_MARK=8250]="SINGLE_RIGHT_POINTING_ANGLE_QUOTATION_MARK",eo[eo.RIGHT_SUBSTITUTION_BRACKET=11779]="RIGHT_SUBSTITUTION_BRACKET",eo[eo.RIGHT_DOTTED_SUBSTITUTION_BRACKET=11781]="RIGHT_DOTTED_SUBSTITUTION_BRACKET",eo[eo.RIGHT_TRANSPOSITION_BRACKET=11786]="RIGHT_TRANSPOSITION_BRACKET",eo[eo.RIGHT_RAISED_OMISSION_BRACKET=11789]="RIGHT_RAISED_OMISSION_BRACKET",eo[eo.RIGHT_LOW_PARAPHRASE_BRACKET=11805]="RIGHT_LOW_PARAPHRASE_BRACKET",eo[eo.RIGHT_VERTICAL_BAR_WITH_QUILL=11809]="RIGHT_VERTICAL_BAR_WITH_QUILL"})(UnicodePfCodePoint||(UnicodePfCodePoint={}));var UnicodePiCodePoint;(function(eo){eo[eo.LEFT_POINTING_DOUBLE_ANGLE_QUOTATION_MARK=171]="LEFT_POINTING_DOUBLE_ANGLE_QUOTATION_MARK",eo[eo.LEFT_SINGLE_QUOTATION_MARK=8216]="LEFT_SINGLE_QUOTATION_MARK",eo[eo.SINGLE_HIGH_REVERSED_9_QUOTATION_MARK=8219]="SINGLE_HIGH_REVERSED_9_QUOTATION_MARK",eo[eo.LEFT_DOUBLE_QUOTATION_MARK=8220]="LEFT_DOUBLE_QUOTATION_MARK",eo[eo.DOUBLE_HIGH_REVERSED_9_QUOTATION_MARK=8223]="DOUBLE_HIGH_REVERSED_9_QUOTATION_MARK",eo[eo.SINGLE_LEFT_POINTING_ANGLE_QUOTATION_MARK=8249]="SINGLE_LEFT_POINTING_ANGLE_QUOTATION_MARK",eo[eo.LEFT_SUBSTITUTION_BRACKET=11778]="LEFT_SUBSTITUTION_BRACKET",eo[eo.LEFT_DOTTED_SUBSTITUTION_BRACKET=11780]="LEFT_DOTTED_SUBSTITUTION_BRACKET",eo[eo.LEFT_TRANSPOSITION_BRACKET=11785]="LEFT_TRANSPOSITION_BRACKET",eo[eo.LEFT_RAISED_OMISSION_BRACKET=11788]="LEFT_RAISED_OMISSION_BRACKET",eo[eo.LEFT_LOW_PARAPHRASE_BRACKET=11804]="LEFT_LOW_PARAPHRASE_BRACKET",eo[eo.LEFT_VERTICAL_BAR_WITH_QUILL=11808]="LEFT_VERTICAL_BAR_WITH_QUILL"})(UnicodePiCodePoint||(UnicodePiCodePoint={}));var UnicodePoCodePoint;(function(eo){eo[eo.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",eo[eo.QUOTATION_MARK=34]="QUOTATION_MARK",eo[eo.NUMBER_SIGN=35]="NUMBER_SIGN",eo[eo.PERCENT_SIGN=37]="PERCENT_SIGN",eo[eo.AMPERSAND=38]="AMPERSAND",eo[eo.APOSTROPHE=39]="APOSTROPHE",eo[eo.ASTERISK=42]="ASTERISK",eo[eo.COMMA=44]="COMMA",eo[eo.FULL_STOP=46]="FULL_STOP",eo[eo.SOLIDUS=47]="SOLIDUS",eo[eo.COLON=58]="COLON",eo[eo.SEMICOLON=59]="SEMICOLON",eo[eo.QUESTION_MARK=63]="QUESTION_MARK",eo[eo.COMMERCIAL_AT=64]="COMMERCIAL_AT",eo[eo.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",eo[eo.INVERTED_EXCLAMATION_MARK=161]="INVERTED_EXCLAMATION_MARK",eo[eo.SECTION_SIGN=167]="SECTION_SIGN",eo[eo.PILCROW_SIGN=182]="PILCROW_SIGN",eo[eo.MIDDLE_DOT=183]="MIDDLE_DOT",eo[eo.INVERTED_QUESTION_MARK=191]="INVERTED_QUESTION_MARK",eo[eo.GREEK_QUESTION_MARK=894]="GREEK_QUESTION_MARK",eo[eo.GREEK_ANO_TELEIA=903]="GREEK_ANO_TELEIA",eo[eo.ARMENIAN_APOSTROPHE=1370]="ARMENIAN_APOSTROPHE",eo[eo.ARMENIAN_EMPHASIS_MARK=1371]="ARMENIAN_EMPHASIS_MARK",eo[eo.ARMENIAN_EXCLAMATION_MARK=1372]="ARMENIAN_EXCLAMATION_MARK",eo[eo.ARMENIAN_COMMA=1373]="ARMENIAN_COMMA",eo[eo.ARMENIAN_QUESTION_MARK=1374]="ARMENIAN_QUESTION_MARK",eo[eo.ARMENIAN_ABBREVIATION_MARK=1375]="ARMENIAN_ABBREVIATION_MARK",eo[eo.ARMENIAN_FULL_STOP=1417]="ARMENIAN_FULL_STOP",eo[eo.HEBREW_PUNCTUATION_PASEQ=1472]="HEBREW_PUNCTUATION_PASEQ",eo[eo.HEBREW_PUNCTUATION_SOF_PASUQ=1475]="HEBREW_PUNCTUATION_SOF_PASUQ",eo[eo.HEBREW_PUNCTUATION_NUN_HAFUKHA=1478]="HEBREW_PUNCTUATION_NUN_HAFUKHA",eo[eo.HEBREW_PUNCTUATION_GERESH=1523]="HEBREW_PUNCTUATION_GERESH",eo[eo.HEBREW_PUNCTUATION_GERSHAYIM=1524]="HEBREW_PUNCTUATION_GERSHAYIM",eo[eo.ARABIC_INDIC_PER_MILLE_SIGN=1545]="ARABIC_INDIC_PER_MILLE_SIGN",eo[eo.ARABIC_INDIC_PER_TEN_THOUSAND_SIGN=1546]="ARABIC_INDIC_PER_TEN_THOUSAND_SIGN",eo[eo.ARABIC_COMMA=1548]="ARABIC_COMMA",eo[eo.ARABIC_DATE_SEPARATOR=1549]="ARABIC_DATE_SEPARATOR",eo[eo.ARABIC_SEMICOLON=1563]="ARABIC_SEMICOLON",eo[eo.ARABIC_TRIPLE_DOT_PUNCTUATION_MARK=1566]="ARABIC_TRIPLE_DOT_PUNCTUATION_MARK",eo[eo.ARABIC_QUESTION_MARK=1567]="ARABIC_QUESTION_MARK",eo[eo.ARABIC_PERCENT_SIGN=1642]="ARABIC_PERCENT_SIGN",eo[eo.ARABIC_DECIMAL_SEPARATOR=1643]="ARABIC_DECIMAL_SEPARATOR",eo[eo.ARABIC_THOUSANDS_SEPARATOR=1644]="ARABIC_THOUSANDS_SEPARATOR",eo[eo.ARABIC_FIVE_POINTED_STAR=1645]="ARABIC_FIVE_POINTED_STAR",eo[eo.ARABIC_FULL_STOP=1748]="ARABIC_FULL_STOP",eo[eo.SYRIAC_END_OF_PARAGRAPH=1792]="SYRIAC_END_OF_PARAGRAPH",eo[eo.SYRIAC_SUPRALINEAR_FULL_STOP=1793]="SYRIAC_SUPRALINEAR_FULL_STOP",eo[eo.SYRIAC_SUBLINEAR_FULL_STOP=1794]="SYRIAC_SUBLINEAR_FULL_STOP",eo[eo.SYRIAC_SUPRALINEAR_COLON=1795]="SYRIAC_SUPRALINEAR_COLON",eo[eo.SYRIAC_SUBLINEAR_COLON=1796]="SYRIAC_SUBLINEAR_COLON",eo[eo.SYRIAC_HORIZONTAL_COLON=1797]="SYRIAC_HORIZONTAL_COLON",eo[eo.SYRIAC_COLON_SKEWED_LEFT=1798]="SYRIAC_COLON_SKEWED_LEFT",eo[eo.SYRIAC_COLON_SKEWED_RIGHT=1799]="SYRIAC_COLON_SKEWED_RIGHT",eo[eo.SYRIAC_SUPRALINEAR_COLON_SKEWED_LEFT=1800]="SYRIAC_SUPRALINEAR_COLON_SKEWED_LEFT",eo[eo.SYRIAC_SUBLINEAR_COLON_SKEWED_RIGHT=1801]="SYRIAC_SUBLINEAR_COLON_SKEWED_RIGHT",eo[eo.SYRIAC_CONTRACTION=1802]="SYRIAC_CONTRACTION",eo[eo.SYRIAC_HARKLEAN_OBELUS=1803]="SYRIAC_HARKLEAN_OBELUS",eo[eo.SYRIAC_HARKLEAN_METOBELUS=1804]="SYRIAC_HARKLEAN_METOBELUS",eo[eo.SYRIAC_HARKLEAN_ASTERISCUS=1805]="SYRIAC_HARKLEAN_ASTERISCUS",eo[eo.NKO_SYMBOL_GBAKURUNEN=2039]="NKO_SYMBOL_GBAKURUNEN",eo[eo.NKO_COMMA=2040]="NKO_COMMA",eo[eo.NKO_EXCLAMATION_MARK=2041]="NKO_EXCLAMATION_MARK",eo[eo.SAMARITAN_PUNCTUATION_NEQUDAA=2096]="SAMARITAN_PUNCTUATION_NEQUDAA",eo[eo.SAMARITAN_PUNCTUATION_AFSAAQ=2097]="SAMARITAN_PUNCTUATION_AFSAAQ",eo[eo.SAMARITAN_PUNCTUATION_ANGED=2098]="SAMARITAN_PUNCTUATION_ANGED",eo[eo.SAMARITAN_PUNCTUATION_BAU=2099]="SAMARITAN_PUNCTUATION_BAU",eo[eo.SAMARITAN_PUNCTUATION_ATMAAU=2100]="SAMARITAN_PUNCTUATION_ATMAAU",eo[eo.SAMARITAN_PUNCTUATION_SHIYYAALAA=2101]="SAMARITAN_PUNCTUATION_SHIYYAALAA",eo[eo.SAMARITAN_ABBREVIATION_MARK=2102]="SAMARITAN_ABBREVIATION_MARK",eo[eo.SAMARITAN_PUNCTUATION_MELODIC_QITSA=2103]="SAMARITAN_PUNCTUATION_MELODIC_QITSA",eo[eo.SAMARITAN_PUNCTUATION_ZIQAA=2104]="SAMARITAN_PUNCTUATION_ZIQAA",eo[eo.SAMARITAN_PUNCTUATION_QITSA=2105]="SAMARITAN_PUNCTUATION_QITSA",eo[eo.SAMARITAN_PUNCTUATION_ZAEF=2106]="SAMARITAN_PUNCTUATION_ZAEF",eo[eo.SAMARITAN_PUNCTUATION_TURU=2107]="SAMARITAN_PUNCTUATION_TURU",eo[eo.SAMARITAN_PUNCTUATION_ARKAANU=2108]="SAMARITAN_PUNCTUATION_ARKAANU",eo[eo.SAMARITAN_PUNCTUATION_SOF_MASHFAAT=2109]="SAMARITAN_PUNCTUATION_SOF_MASHFAAT",eo[eo.SAMARITAN_PUNCTUATION_ANNAAU=2110]="SAMARITAN_PUNCTUATION_ANNAAU",eo[eo.MANDAIC_PUNCTUATION=2142]="MANDAIC_PUNCTUATION",eo[eo.DEVANAGARI_DANDA=2404]="DEVANAGARI_DANDA",eo[eo.DEVANAGARI_DOUBLE_DANDA=2405]="DEVANAGARI_DOUBLE_DANDA",eo[eo.DEVANAGARI_ABBREVIATION_SIGN=2416]="DEVANAGARI_ABBREVIATION_SIGN",eo[eo.BENGALI_ABBREVIATION_SIGN=2557]="BENGALI_ABBREVIATION_SIGN",eo[eo.GURMUKHI_ABBREVIATION_SIGN=2678]="GURMUKHI_ABBREVIATION_SIGN",eo[eo.GUJARATI_ABBREVIATION_SIGN=2800]="GUJARATI_ABBREVIATION_SIGN",eo[eo.TELUGU_SIGN_SIDDHAM=3191]="TELUGU_SIGN_SIDDHAM",eo[eo.KANNADA_SIGN_SIDDHAM=3204]="KANNADA_SIGN_SIDDHAM",eo[eo.SINHALA_PUNCTUATION_KUNDDALIYA=3572]="SINHALA_PUNCTUATION_KUNDDALIYA",eo[eo.THAI_CHARACTER_FONGMAN=3663]="THAI_CHARACTER_FONGMAN",eo[eo.THAI_CHARACTER_ANGKHANKHU=3674]="THAI_CHARACTER_ANGKHANKHU",eo[eo.THAI_CHARACTER_KHOMUT=3675]="THAI_CHARACTER_KHOMUT",eo[eo.TIBETAN_MARK_INITIAL_YIG_MGO_MDUN_MA=3844]="TIBETAN_MARK_INITIAL_YIG_MGO_MDUN_MA",eo[eo.TIBETAN_MARK_CLOSING_YIG_MGO_SGAB_MA=3845]="TIBETAN_MARK_CLOSING_YIG_MGO_SGAB_MA",eo[eo.TIBETAN_MARK_CARET_YIG_MGO_PHUR_SHAD_MA=3846]="TIBETAN_MARK_CARET_YIG_MGO_PHUR_SHAD_MA",eo[eo.TIBETAN_MARK_YIG_MGO_TSHEG_SHAD_MA=3847]="TIBETAN_MARK_YIG_MGO_TSHEG_SHAD_MA",eo[eo.TIBETAN_MARK_SBRUL_SHAD=3848]="TIBETAN_MARK_SBRUL_SHAD",eo[eo.TIBETAN_MARK_BSKUR_YIG_MGO=3849]="TIBETAN_MARK_BSKUR_YIG_MGO",eo[eo.TIBETAN_MARK_BKA__SHOG_YIG_MGO=3850]="TIBETAN_MARK_BKA__SHOG_YIG_MGO",eo[eo.TIBETAN_MARK_INTERSYLLABIC_TSHEG=3851]="TIBETAN_MARK_INTERSYLLABIC_TSHEG",eo[eo.TIBETAN_MARK_DELIMITER_TSHEG_BSTAR=3852]="TIBETAN_MARK_DELIMITER_TSHEG_BSTAR",eo[eo.TIBETAN_MARK_SHAD=3853]="TIBETAN_MARK_SHAD",eo[eo.TIBETAN_MARK_NYIS_SHAD=3854]="TIBETAN_MARK_NYIS_SHAD",eo[eo.TIBETAN_MARK_TSHEG_SHAD=3855]="TIBETAN_MARK_TSHEG_SHAD",eo[eo.TIBETAN_MARK_NYIS_TSHEG_SHAD=3856]="TIBETAN_MARK_NYIS_TSHEG_SHAD",eo[eo.TIBETAN_MARK_RIN_CHEN_SPUNGS_SHAD=3857]="TIBETAN_MARK_RIN_CHEN_SPUNGS_SHAD",eo[eo.TIBETAN_MARK_RGYA_GRAM_SHAD=3858]="TIBETAN_MARK_RGYA_GRAM_SHAD",eo[eo.TIBETAN_MARK_GTER_TSHEG=3860]="TIBETAN_MARK_GTER_TSHEG",eo[eo.TIBETAN_MARK_PALUTA=3973]="TIBETAN_MARK_PALUTA",eo[eo.TIBETAN_MARK_BSKA__SHOG_GI_MGO_RGYAN=4048]="TIBETAN_MARK_BSKA__SHOG_GI_MGO_RGYAN",eo[eo.TIBETAN_MARK_MNYAM_YIG_GI_MGO_RGYAN=4049]="TIBETAN_MARK_MNYAM_YIG_GI_MGO_RGYAN",eo[eo.TIBETAN_MARK_NYIS_TSHEG=4050]="TIBETAN_MARK_NYIS_TSHEG",eo[eo.TIBETAN_MARK_INITIAL_BRDA_RNYING_YIG_MGO_MDUN_MA=4051]="TIBETAN_MARK_INITIAL_BRDA_RNYING_YIG_MGO_MDUN_MA",eo[eo.TIBETAN_MARK_CLOSING_BRDA_RNYING_YIG_MGO_SGAB_MA=4052]="TIBETAN_MARK_CLOSING_BRDA_RNYING_YIG_MGO_SGAB_MA",eo[eo.TIBETAN_MARK_LEADING_MCHAN_RTAGS=4057]="TIBETAN_MARK_LEADING_MCHAN_RTAGS",eo[eo.TIBETAN_MARK_TRAILING_MCHAN_RTAGS=4058]="TIBETAN_MARK_TRAILING_MCHAN_RTAGS",eo[eo.MYANMAR_SIGN_LITTLE_SECTION=4170]="MYANMAR_SIGN_LITTLE_SECTION",eo[eo.MYANMAR_SIGN_SECTION=4171]="MYANMAR_SIGN_SECTION",eo[eo.MYANMAR_SYMBOL_LOCATIVE=4172]="MYANMAR_SYMBOL_LOCATIVE",eo[eo.MYANMAR_SYMBOL_COMPLETED=4173]="MYANMAR_SYMBOL_COMPLETED",eo[eo.MYANMAR_SYMBOL_AFOREMENTIONED=4174]="MYANMAR_SYMBOL_AFOREMENTIONED",eo[eo.MYANMAR_SYMBOL_GENITIVE=4175]="MYANMAR_SYMBOL_GENITIVE",eo[eo.GEORGIAN_PARAGRAPH_SEPARATOR=4347]="GEORGIAN_PARAGRAPH_SEPARATOR",eo[eo.ETHIOPIC_SECTION_MARK=4960]="ETHIOPIC_SECTION_MARK",eo[eo.ETHIOPIC_WORDSPACE=4961]="ETHIOPIC_WORDSPACE",eo[eo.ETHIOPIC_FULL_STOP=4962]="ETHIOPIC_FULL_STOP",eo[eo.ETHIOPIC_COMMA=4963]="ETHIOPIC_COMMA",eo[eo.ETHIOPIC_SEMICOLON=4964]="ETHIOPIC_SEMICOLON",eo[eo.ETHIOPIC_COLON=4965]="ETHIOPIC_COLON",eo[eo.ETHIOPIC_PREFACE_COLON=4966]="ETHIOPIC_PREFACE_COLON",eo[eo.ETHIOPIC_QUESTION_MARK=4967]="ETHIOPIC_QUESTION_MARK",eo[eo.ETHIOPIC_PARAGRAPH_SEPARATOR=4968]="ETHIOPIC_PARAGRAPH_SEPARATOR",eo[eo.CANADIAN_SYLLABICS_FULL_STOP=5742]="CANADIAN_SYLLABICS_FULL_STOP",eo[eo.RUNIC_SINGLE_PUNCTUATION=5867]="RUNIC_SINGLE_PUNCTUATION",eo[eo.RUNIC_MULTIPLE_PUNCTUATION=5868]="RUNIC_MULTIPLE_PUNCTUATION",eo[eo.RUNIC_CROSS_PUNCTUATION=5869]="RUNIC_CROSS_PUNCTUATION",eo[eo.PHILIPPINE_SINGLE_PUNCTUATION=5941]="PHILIPPINE_SINGLE_PUNCTUATION",eo[eo.PHILIPPINE_DOUBLE_PUNCTUATION=5942]="PHILIPPINE_DOUBLE_PUNCTUATION",eo[eo.KHMER_SIGN_KHAN=6100]="KHMER_SIGN_KHAN",eo[eo.KHMER_SIGN_BARIYOOSAN=6101]="KHMER_SIGN_BARIYOOSAN",eo[eo.KHMER_SIGN_CAMNUC_PII_KUUH=6102]="KHMER_SIGN_CAMNUC_PII_KUUH",eo[eo.KHMER_SIGN_BEYYAL=6104]="KHMER_SIGN_BEYYAL",eo[eo.KHMER_SIGN_PHNAEK_MUAN=6105]="KHMER_SIGN_PHNAEK_MUAN",eo[eo.KHMER_SIGN_KOOMUUT=6106]="KHMER_SIGN_KOOMUUT",eo[eo.MONGOLIAN_BIRGA=6144]="MONGOLIAN_BIRGA",eo[eo.MONGOLIAN_ELLIPSIS=6145]="MONGOLIAN_ELLIPSIS",eo[eo.MONGOLIAN_COMMA=6146]="MONGOLIAN_COMMA",eo[eo.MONGOLIAN_FULL_STOP=6147]="MONGOLIAN_FULL_STOP",eo[eo.MONGOLIAN_COLON=6148]="MONGOLIAN_COLON",eo[eo.MONGOLIAN_FOUR_DOTS=6149]="MONGOLIAN_FOUR_DOTS",eo[eo.MONGOLIAN_SIBE_SYLLABLE_BOUNDARY_MARKER=6151]="MONGOLIAN_SIBE_SYLLABLE_BOUNDARY_MARKER",eo[eo.MONGOLIAN_MANCHU_COMMA=6152]="MONGOLIAN_MANCHU_COMMA",eo[eo.MONGOLIAN_MANCHU_FULL_STOP=6153]="MONGOLIAN_MANCHU_FULL_STOP",eo[eo.MONGOLIAN_NIRUGU=6154]="MONGOLIAN_NIRUGU",eo[eo.LIMBU_EXCLAMATION_MARK=6468]="LIMBU_EXCLAMATION_MARK",eo[eo.LIMBU_QUESTION_MARK=6469]="LIMBU_QUESTION_MARK",eo[eo.BUGINESE_PALLAWA=6686]="BUGINESE_PALLAWA",eo[eo.BUGINESE_END_OF_SECTION=6687]="BUGINESE_END_OF_SECTION",eo[eo.TAI_THAM_SIGN_WIANG=6816]="TAI_THAM_SIGN_WIANG",eo[eo.TAI_THAM_SIGN_WIANGWAAK=6817]="TAI_THAM_SIGN_WIANGWAAK",eo[eo.TAI_THAM_SIGN_SAWAN=6818]="TAI_THAM_SIGN_SAWAN",eo[eo.TAI_THAM_SIGN_KEOW=6819]="TAI_THAM_SIGN_KEOW",eo[eo.TAI_THAM_SIGN_HOY=6820]="TAI_THAM_SIGN_HOY",eo[eo.TAI_THAM_SIGN_DOKMAI=6821]="TAI_THAM_SIGN_DOKMAI",eo[eo.TAI_THAM_SIGN_REVERSED_ROTATED_RANA=6822]="TAI_THAM_SIGN_REVERSED_ROTATED_RANA",eo[eo.TAI_THAM_SIGN_KAAN=6824]="TAI_THAM_SIGN_KAAN",eo[eo.TAI_THAM_SIGN_KAANKUU=6825]="TAI_THAM_SIGN_KAANKUU",eo[eo.TAI_THAM_SIGN_SATKAAN=6826]="TAI_THAM_SIGN_SATKAAN",eo[eo.TAI_THAM_SIGN_SATKAANKUU=6827]="TAI_THAM_SIGN_SATKAANKUU",eo[eo.TAI_THAM_SIGN_HANG=6828]="TAI_THAM_SIGN_HANG",eo[eo.TAI_THAM_SIGN_CAANG=6829]="TAI_THAM_SIGN_CAANG",eo[eo.BALINESE_PANTI=7002]="BALINESE_PANTI",eo[eo.BALINESE_PAMADA=7003]="BALINESE_PAMADA",eo[eo.BALINESE_WINDU=7004]="BALINESE_WINDU",eo[eo.BALINESE_CARIK_PAMUNGKAH=7005]="BALINESE_CARIK_PAMUNGKAH",eo[eo.BALINESE_CARIK_SIKI=7006]="BALINESE_CARIK_SIKI",eo[eo.BALINESE_CARIK_PAREREN=7007]="BALINESE_CARIK_PAREREN",eo[eo.BALINESE_PAMENENG=7008]="BALINESE_PAMENENG",eo[eo.BATAK_SYMBOL_BINDU_NA_METEK=7164]="BATAK_SYMBOL_BINDU_NA_METEK",eo[eo.BATAK_SYMBOL_BINDU_PINARBORAS=7165]="BATAK_SYMBOL_BINDU_PINARBORAS",eo[eo.BATAK_SYMBOL_BINDU_JUDUL=7166]="BATAK_SYMBOL_BINDU_JUDUL",eo[eo.BATAK_SYMBOL_BINDU_PANGOLAT=7167]="BATAK_SYMBOL_BINDU_PANGOLAT",eo[eo.LEPCHA_PUNCTUATION_TA_ROL=7227]="LEPCHA_PUNCTUATION_TA_ROL",eo[eo.LEPCHA_PUNCTUATION_NYET_THYOOM_TA_ROL=7228]="LEPCHA_PUNCTUATION_NYET_THYOOM_TA_ROL",eo[eo.LEPCHA_PUNCTUATION_CER_WA=7229]="LEPCHA_PUNCTUATION_CER_WA",eo[eo.LEPCHA_PUNCTUATION_TSHOOK_CER_WA=7230]="LEPCHA_PUNCTUATION_TSHOOK_CER_WA",eo[eo.LEPCHA_PUNCTUATION_TSHOOK=7231]="LEPCHA_PUNCTUATION_TSHOOK",eo[eo.OL_CHIKI_PUNCTUATION_MUCAAD=7294]="OL_CHIKI_PUNCTUATION_MUCAAD",eo[eo.OL_CHIKI_PUNCTUATION_DOUBLE_MUCAAD=7295]="OL_CHIKI_PUNCTUATION_DOUBLE_MUCAAD",eo[eo.SUNDANESE_PUNCTUATION_BINDU_SURYA=7360]="SUNDANESE_PUNCTUATION_BINDU_SURYA",eo[eo.SUNDANESE_PUNCTUATION_BINDU_PANGLONG=7361]="SUNDANESE_PUNCTUATION_BINDU_PANGLONG",eo[eo.SUNDANESE_PUNCTUATION_BINDU_PURNAMA=7362]="SUNDANESE_PUNCTUATION_BINDU_PURNAMA",eo[eo.SUNDANESE_PUNCTUATION_BINDU_CAKRA=7363]="SUNDANESE_PUNCTUATION_BINDU_CAKRA",eo[eo.SUNDANESE_PUNCTUATION_BINDU_LEU_SATANGA=7364]="SUNDANESE_PUNCTUATION_BINDU_LEU_SATANGA",eo[eo.SUNDANESE_PUNCTUATION_BINDU_KA_SATANGA=7365]="SUNDANESE_PUNCTUATION_BINDU_KA_SATANGA",eo[eo.SUNDANESE_PUNCTUATION_BINDU_DA_SATANGA=7366]="SUNDANESE_PUNCTUATION_BINDU_DA_SATANGA",eo[eo.SUNDANESE_PUNCTUATION_BINDU_BA_SATANGA=7367]="SUNDANESE_PUNCTUATION_BINDU_BA_SATANGA",eo[eo.VEDIC_SIGN_NIHSHVASA=7379]="VEDIC_SIGN_NIHSHVASA",eo[eo.DOUBLE_VERTICAL_LINE=8214]="DOUBLE_VERTICAL_LINE",eo[eo.DOUBLE_LOW_LINE=8215]="DOUBLE_LOW_LINE",eo[eo.DAGGER=8224]="DAGGER",eo[eo.DOUBLE_DAGGER=8225]="DOUBLE_DAGGER",eo[eo.BULLET=8226]="BULLET",eo[eo.TRIANGULAR_BULLET=8227]="TRIANGULAR_BULLET",eo[eo.ONE_DOT_LEADER=8228]="ONE_DOT_LEADER",eo[eo.TWO_DOT_LEADER=8229]="TWO_DOT_LEADER",eo[eo.HORIZONTAL_ELLIPSIS=8230]="HORIZONTAL_ELLIPSIS",eo[eo.HYPHENATION_POINT=8231]="HYPHENATION_POINT",eo[eo.PER_MILLE_SIGN=8240]="PER_MILLE_SIGN",eo[eo.PER_TEN_THOUSAND_SIGN=8241]="PER_TEN_THOUSAND_SIGN",eo[eo.PRIME=8242]="PRIME",eo[eo.DOUBLE_PRIME=8243]="DOUBLE_PRIME",eo[eo.TRIPLE_PRIME=8244]="TRIPLE_PRIME",eo[eo.REVERSED_PRIME=8245]="REVERSED_PRIME",eo[eo.REVERSED_DOUBLE_PRIME=8246]="REVERSED_DOUBLE_PRIME",eo[eo.REVERSED_TRIPLE_PRIME=8247]="REVERSED_TRIPLE_PRIME",eo[eo.CARET=8248]="CARET",eo[eo.REFERENCE_MARK=8251]="REFERENCE_MARK",eo[eo.DOUBLE_EXCLAMATION_MARK=8252]="DOUBLE_EXCLAMATION_MARK",eo[eo.INTERROBANG=8253]="INTERROBANG",eo[eo.OVERLINE=8254]="OVERLINE",eo[eo.CARET_INSERTION_POINT=8257]="CARET_INSERTION_POINT",eo[eo.ASTERISM=8258]="ASTERISM",eo[eo.HYPHEN_BULLET=8259]="HYPHEN_BULLET",eo[eo.DOUBLE_QUESTION_MARK=8263]="DOUBLE_QUESTION_MARK",eo[eo.QUESTION_EXCLAMATION_MARK=8264]="QUESTION_EXCLAMATION_MARK",eo[eo.EXCLAMATION_QUESTION_MARK=8265]="EXCLAMATION_QUESTION_MARK",eo[eo.TIRONIAN_SIGN_ET=8266]="TIRONIAN_SIGN_ET",eo[eo.REVERSED_PILCROW_SIGN=8267]="REVERSED_PILCROW_SIGN",eo[eo.BLACK_LEFTWARDS_BULLET=8268]="BLACK_LEFTWARDS_BULLET",eo[eo.BLACK_RIGHTWARDS_BULLET=8269]="BLACK_RIGHTWARDS_BULLET",eo[eo.LOW_ASTERISK=8270]="LOW_ASTERISK",eo[eo.REVERSED_SEMICOLON=8271]="REVERSED_SEMICOLON",eo[eo.CLOSE_UP=8272]="CLOSE_UP",eo[eo.TWO_ASTERISKS_ALIGNED_VERTICALLY=8273]="TWO_ASTERISKS_ALIGNED_VERTICALLY",eo[eo.SWUNG_DASH=8275]="SWUNG_DASH",eo[eo.FLOWER_PUNCTUATION_MARK=8277]="FLOWER_PUNCTUATION_MARK",eo[eo.THREE_DOT_PUNCTUATION=8278]="THREE_DOT_PUNCTUATION",eo[eo.QUADRUPLE_PRIME=8279]="QUADRUPLE_PRIME",eo[eo.FOUR_DOT_PUNCTUATION=8280]="FOUR_DOT_PUNCTUATION",eo[eo.FIVE_DOT_PUNCTUATION=8281]="FIVE_DOT_PUNCTUATION",eo[eo.TWO_DOT_PUNCTUATION=8282]="TWO_DOT_PUNCTUATION",eo[eo.FOUR_DOT_MARK=8283]="FOUR_DOT_MARK",eo[eo.DOTTED_CROSS=8284]="DOTTED_CROSS",eo[eo.TRICOLON=8285]="TRICOLON",eo[eo.VERTICAL_FOUR_DOTS=8286]="VERTICAL_FOUR_DOTS",eo[eo.COPTIC_OLD_NUBIAN_FULL_STOP=11513]="COPTIC_OLD_NUBIAN_FULL_STOP",eo[eo.COPTIC_OLD_NUBIAN_DIRECT_QUESTION_MARK=11514]="COPTIC_OLD_NUBIAN_DIRECT_QUESTION_MARK",eo[eo.COPTIC_OLD_NUBIAN_INDIRECT_QUESTION_MARK=11515]="COPTIC_OLD_NUBIAN_INDIRECT_QUESTION_MARK",eo[eo.COPTIC_OLD_NUBIAN_VERSE_DIVIDER=11516]="COPTIC_OLD_NUBIAN_VERSE_DIVIDER",eo[eo.COPTIC_FULL_STOP=11518]="COPTIC_FULL_STOP",eo[eo.COPTIC_MORPHOLOGICAL_DIVIDER=11519]="COPTIC_MORPHOLOGICAL_DIVIDER",eo[eo.TIFINAGH_SEPARATOR_MARK=11632]="TIFINAGH_SEPARATOR_MARK",eo[eo.RIGHT_ANGLE_SUBSTITUTION_MARKER=11776]="RIGHT_ANGLE_SUBSTITUTION_MARKER",eo[eo.RIGHT_ANGLE_DOTTED_SUBSTITUTION_MARKER=11777]="RIGHT_ANGLE_DOTTED_SUBSTITUTION_MARKER",eo[eo.RAISED_INTERPOLATION_MARKER=11782]="RAISED_INTERPOLATION_MARKER",eo[eo.RAISED_DOTTED_INTERPOLATION_MARKER=11783]="RAISED_DOTTED_INTERPOLATION_MARKER",eo[eo.DOTTED_TRANSPOSITION_MARKER=11784]="DOTTED_TRANSPOSITION_MARKER",eo[eo.RAISED_SQUARE=11787]="RAISED_SQUARE",eo[eo.EDITORIAL_CORONIS=11790]="EDITORIAL_CORONIS",eo[eo.PARAGRAPHOS=11791]="PARAGRAPHOS",eo[eo.FORKED_PARAGRAPHOS=11792]="FORKED_PARAGRAPHOS",eo[eo.REVERSED_FORKED_PARAGRAPHOS=11793]="REVERSED_FORKED_PARAGRAPHOS",eo[eo.HYPODIASTOLE=11794]="HYPODIASTOLE",eo[eo.DOTTED_OBELOS=11795]="DOTTED_OBELOS",eo[eo.DOWNWARDS_ANCORA=11796]="DOWNWARDS_ANCORA",eo[eo.UPWARDS_ANCORA=11797]="UPWARDS_ANCORA",eo[eo.DOTTED_RIGHT_POINTING_ANGLE=11798]="DOTTED_RIGHT_POINTING_ANGLE",eo[eo.INVERTED_INTERROBANG=11800]="INVERTED_INTERROBANG",eo[eo.PALM_BRANCH=11801]="PALM_BRANCH",eo[eo.TILDE_WITH_RING_ABOVE=11803]="TILDE_WITH_RING_ABOVE",eo[eo.TILDE_WITH_DOT_ABOVE=11806]="TILDE_WITH_DOT_ABOVE",eo[eo.TILDE_WITH_DOT_BELOW=11807]="TILDE_WITH_DOT_BELOW",eo[eo.TWO_DOTS_OVER_ONE_DOT_PUNCTUATION=11818]="TWO_DOTS_OVER_ONE_DOT_PUNCTUATION",eo[eo.ONE_DOT_OVER_TWO_DOTS_PUNCTUATION=11819]="ONE_DOT_OVER_TWO_DOTS_PUNCTUATION",eo[eo.SQUARED_FOUR_DOT_PUNCTUATION=11820]="SQUARED_FOUR_DOT_PUNCTUATION",eo[eo.FIVE_DOT_MARK=11821]="FIVE_DOT_MARK",eo[eo.REVERSED_QUESTION_MARK=11822]="REVERSED_QUESTION_MARK",eo[eo.RING_POINT=11824]="RING_POINT",eo[eo.WORD_SEPARATOR_MIDDLE_DOT=11825]="WORD_SEPARATOR_MIDDLE_DOT",eo[eo.TURNED_COMMA=11826]="TURNED_COMMA",eo[eo.RAISED_DOT=11827]="RAISED_DOT",eo[eo.RAISED_COMMA=11828]="RAISED_COMMA",eo[eo.TURNED_SEMICOLON=11829]="TURNED_SEMICOLON",eo[eo.DAGGER_WITH_LEFT_GUARD=11830]="DAGGER_WITH_LEFT_GUARD",eo[eo.DAGGER_WITH_RIGHT_GUARD=11831]="DAGGER_WITH_RIGHT_GUARD",eo[eo.TURNED_DAGGER=11832]="TURNED_DAGGER",eo[eo.TOP_HALF_SECTION_SIGN=11833]="TOP_HALF_SECTION_SIGN",eo[eo.STENOGRAPHIC_FULL_STOP=11836]="STENOGRAPHIC_FULL_STOP",eo[eo.VERTICAL_SIX_DOTS=11837]="VERTICAL_SIX_DOTS",eo[eo.WIGGLY_VERTICAL_LINE=11838]="WIGGLY_VERTICAL_LINE",eo[eo.CAPITULUM=11839]="CAPITULUM",eo[eo.REVERSED_COMMA=11841]="REVERSED_COMMA",eo[eo.DASH_WITH_LEFT_UPTURN=11843]="DASH_WITH_LEFT_UPTURN",eo[eo.DOUBLE_SUSPENSION_MARK=11844]="DOUBLE_SUSPENSION_MARK",eo[eo.INVERTED_LOW_KAVYKA=11845]="INVERTED_LOW_KAVYKA",eo[eo.INVERTED_LOW_KAVYKA_WITH_KAVYKA_ABOVE=11846]="INVERTED_LOW_KAVYKA_WITH_KAVYKA_ABOVE",eo[eo.LOW_KAVYKA=11847]="LOW_KAVYKA",eo[eo.LOW_KAVYKA_WITH_DOT=11848]="LOW_KAVYKA_WITH_DOT",eo[eo.DOUBLE_STACKED_COMMA=11849]="DOUBLE_STACKED_COMMA",eo[eo.DOTTED_SOLIDUS=11850]="DOTTED_SOLIDUS",eo[eo.TRIPLE_DAGGER=11851]="TRIPLE_DAGGER",eo[eo.MEDIEVAL_COMMA=11852]="MEDIEVAL_COMMA",eo[eo.PARAGRAPHUS_MARK=11853]="PARAGRAPHUS_MARK",eo[eo.PUNCTUS_ELEVATUS_MARK=11854]="PUNCTUS_ELEVATUS_MARK",eo[eo.CORNISH_VERSE_DIVIDER=11855]="CORNISH_VERSE_DIVIDER",eo[eo.TIRONIAN_SIGN_CAPITAL_ET=11858]="TIRONIAN_SIGN_CAPITAL_ET",eo[eo.IDEOGRAPHIC_COMMA=12289]="IDEOGRAPHIC_COMMA",eo[eo.IDEOGRAPHIC_FULL_STOP=12290]="IDEOGRAPHIC_FULL_STOP",eo[eo.DITTO_MARK=12291]="DITTO_MARK",eo[eo.PART_ALTERNATION_MARK=12349]="PART_ALTERNATION_MARK",eo[eo.KATAKANA_MIDDLE_DOT=12539]="KATAKANA_MIDDLE_DOT",eo[eo.LISU_PUNCTUATION_COMMA=42238]="LISU_PUNCTUATION_COMMA",eo[eo.LISU_PUNCTUATION_FULL_STOP=42239]="LISU_PUNCTUATION_FULL_STOP",eo[eo.VAI_COMMA=42509]="VAI_COMMA",eo[eo.VAI_FULL_STOP=42510]="VAI_FULL_STOP",eo[eo.VAI_QUESTION_MARK=42511]="VAI_QUESTION_MARK",eo[eo.SLAVONIC_ASTERISK=42611]="SLAVONIC_ASTERISK",eo[eo.CYRILLIC_KAVYKA=42622]="CYRILLIC_KAVYKA",eo[eo.BAMUM_NJAEMLI=42738]="BAMUM_NJAEMLI",eo[eo.BAMUM_FULL_STOP=42739]="BAMUM_FULL_STOP",eo[eo.BAMUM_COLON=42740]="BAMUM_COLON",eo[eo.BAMUM_COMMA=42741]="BAMUM_COMMA",eo[eo.BAMUM_SEMICOLON=42742]="BAMUM_SEMICOLON",eo[eo.BAMUM_QUESTION_MARK=42743]="BAMUM_QUESTION_MARK",eo[eo.PHAGS_PA_SINGLE_HEAD_MARK=43124]="PHAGS_PA_SINGLE_HEAD_MARK",eo[eo.PHAGS_PA_DOUBLE_HEAD_MARK=43125]="PHAGS_PA_DOUBLE_HEAD_MARK",eo[eo.PHAGS_PA_MARK_SHAD=43126]="PHAGS_PA_MARK_SHAD",eo[eo.PHAGS_PA_MARK_DOUBLE_SHAD=43127]="PHAGS_PA_MARK_DOUBLE_SHAD",eo[eo.SAURASHTRA_DANDA=43214]="SAURASHTRA_DANDA",eo[eo.SAURASHTRA_DOUBLE_DANDA=43215]="SAURASHTRA_DOUBLE_DANDA",eo[eo.DEVANAGARI_SIGN_PUSHPIKA=43256]="DEVANAGARI_SIGN_PUSHPIKA",eo[eo.DEVANAGARI_GAP_FILLER=43257]="DEVANAGARI_GAP_FILLER",eo[eo.DEVANAGARI_CARET=43258]="DEVANAGARI_CARET",eo[eo.DEVANAGARI_SIGN_SIDDHAM=43260]="DEVANAGARI_SIGN_SIDDHAM",eo[eo.KAYAH_LI_SIGN_CWI=43310]="KAYAH_LI_SIGN_CWI",eo[eo.KAYAH_LI_SIGN_SHYA=43311]="KAYAH_LI_SIGN_SHYA",eo[eo.REJANG_SECTION_MARK=43359]="REJANG_SECTION_MARK",eo[eo.JAVANESE_LEFT_RERENGGAN=43457]="JAVANESE_LEFT_RERENGGAN",eo[eo.JAVANESE_RIGHT_RERENGGAN=43458]="JAVANESE_RIGHT_RERENGGAN",eo[eo.JAVANESE_PADA_ANDAP=43459]="JAVANESE_PADA_ANDAP",eo[eo.JAVANESE_PADA_MADYA=43460]="JAVANESE_PADA_MADYA",eo[eo.JAVANESE_PADA_LUHUR=43461]="JAVANESE_PADA_LUHUR",eo[eo.JAVANESE_PADA_WINDU=43462]="JAVANESE_PADA_WINDU",eo[eo.JAVANESE_PADA_PANGKAT=43463]="JAVANESE_PADA_PANGKAT",eo[eo.JAVANESE_PADA_LINGSA=43464]="JAVANESE_PADA_LINGSA",eo[eo.JAVANESE_PADA_LUNGSI=43465]="JAVANESE_PADA_LUNGSI",eo[eo.JAVANESE_PADA_ADEG=43466]="JAVANESE_PADA_ADEG",eo[eo.JAVANESE_PADA_ADEG_ADEG=43467]="JAVANESE_PADA_ADEG_ADEG",eo[eo.JAVANESE_PADA_PISELEH=43468]="JAVANESE_PADA_PISELEH",eo[eo.JAVANESE_TURNED_PADA_PISELEH=43469]="JAVANESE_TURNED_PADA_PISELEH",eo[eo.JAVANESE_PADA_TIRTA_TUMETES=43486]="JAVANESE_PADA_TIRTA_TUMETES",eo[eo.JAVANESE_PADA_ISEN_ISEN=43487]="JAVANESE_PADA_ISEN_ISEN",eo[eo.CHAM_PUNCTUATION_SPIRAL=43612]="CHAM_PUNCTUATION_SPIRAL",eo[eo.CHAM_PUNCTUATION_DANDA=43613]="CHAM_PUNCTUATION_DANDA",eo[eo.CHAM_PUNCTUATION_DOUBLE_DANDA=43614]="CHAM_PUNCTUATION_DOUBLE_DANDA",eo[eo.CHAM_PUNCTUATION_TRIPLE_DANDA=43615]="CHAM_PUNCTUATION_TRIPLE_DANDA",eo[eo.TAI_VIET_SYMBOL_HO_HOI=43742]="TAI_VIET_SYMBOL_HO_HOI",eo[eo.TAI_VIET_SYMBOL_KOI_KOI=43743]="TAI_VIET_SYMBOL_KOI_KOI",eo[eo.MEETEI_MAYEK_CHEIKHAN=43760]="MEETEI_MAYEK_CHEIKHAN",eo[eo.MEETEI_MAYEK_AHANG_KHUDAM=43761]="MEETEI_MAYEK_AHANG_KHUDAM",eo[eo.MEETEI_MAYEK_CHEIKHEI=44011]="MEETEI_MAYEK_CHEIKHEI",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_COMMA=65040]="PRESENTATION_FORM_FOR_VERTICAL_COMMA",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_IDEOGRAPHIC_COMMA=65041]="PRESENTATION_FORM_FOR_VERTICAL_IDEOGRAPHIC_COMMA",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_IDEOGRAPHIC_FULL_STOP=65042]="PRESENTATION_FORM_FOR_VERTICAL_IDEOGRAPHIC_FULL_STOP",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_COLON=65043]="PRESENTATION_FORM_FOR_VERTICAL_COLON",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_SEMICOLON=65044]="PRESENTATION_FORM_FOR_VERTICAL_SEMICOLON",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_EXCLAMATION_MARK=65045]="PRESENTATION_FORM_FOR_VERTICAL_EXCLAMATION_MARK",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_QUESTION_MARK=65046]="PRESENTATION_FORM_FOR_VERTICAL_QUESTION_MARK",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_HORIZONTAL_ELLIPSIS=65049]="PRESENTATION_FORM_FOR_VERTICAL_HORIZONTAL_ELLIPSIS",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_TWO_DOT_LEADER=65072]="PRESENTATION_FORM_FOR_VERTICAL_TWO_DOT_LEADER",eo[eo.SESAME_DOT=65093]="SESAME_DOT",eo[eo.WHITE_SESAME_DOT=65094]="WHITE_SESAME_DOT",eo[eo.DASHED_OVERLINE=65097]="DASHED_OVERLINE",eo[eo.CENTRELINE_OVERLINE=65098]="CENTRELINE_OVERLINE",eo[eo.WAVY_OVERLINE=65099]="WAVY_OVERLINE",eo[eo.DOUBLE_WAVY_OVERLINE=65100]="DOUBLE_WAVY_OVERLINE",eo[eo.SMALL_COMMA=65104]="SMALL_COMMA",eo[eo.SMALL_IDEOGRAPHIC_COMMA=65105]="SMALL_IDEOGRAPHIC_COMMA",eo[eo.SMALL_FULL_STOP=65106]="SMALL_FULL_STOP",eo[eo.SMALL_SEMICOLON=65108]="SMALL_SEMICOLON",eo[eo.SMALL_COLON=65109]="SMALL_COLON",eo[eo.SMALL_QUESTION_MARK=65110]="SMALL_QUESTION_MARK",eo[eo.SMALL_EXCLAMATION_MARK=65111]="SMALL_EXCLAMATION_MARK",eo[eo.SMALL_NUMBER_SIGN=65119]="SMALL_NUMBER_SIGN",eo[eo.SMALL_AMPERSAND=65120]="SMALL_AMPERSAND",eo[eo.SMALL_ASTERISK=65121]="SMALL_ASTERISK",eo[eo.SMALL_REVERSE_SOLIDUS=65128]="SMALL_REVERSE_SOLIDUS",eo[eo.SMALL_PERCENT_SIGN=65130]="SMALL_PERCENT_SIGN",eo[eo.SMALL_COMMERCIAL_AT=65131]="SMALL_COMMERCIAL_AT",eo[eo.FULLWIDTH_EXCLAMATION_MARK=65281]="FULLWIDTH_EXCLAMATION_MARK",eo[eo.FULLWIDTH_QUOTATION_MARK=65282]="FULLWIDTH_QUOTATION_MARK",eo[eo.FULLWIDTH_NUMBER_SIGN=65283]="FULLWIDTH_NUMBER_SIGN",eo[eo.FULLWIDTH_PERCENT_SIGN=65285]="FULLWIDTH_PERCENT_SIGN",eo[eo.FULLWIDTH_AMPERSAND=65286]="FULLWIDTH_AMPERSAND",eo[eo.FULLWIDTH_APOSTROPHE=65287]="FULLWIDTH_APOSTROPHE",eo[eo.FULLWIDTH_ASTERISK=65290]="FULLWIDTH_ASTERISK",eo[eo.FULLWIDTH_COMMA=65292]="FULLWIDTH_COMMA",eo[eo.FULLWIDTH_FULL_STOP=65294]="FULLWIDTH_FULL_STOP",eo[eo.FULLWIDTH_SOLIDUS=65295]="FULLWIDTH_SOLIDUS",eo[eo.FULLWIDTH_COLON=65306]="FULLWIDTH_COLON",eo[eo.FULLWIDTH_SEMICOLON=65307]="FULLWIDTH_SEMICOLON",eo[eo.FULLWIDTH_QUESTION_MARK=65311]="FULLWIDTH_QUESTION_MARK",eo[eo.FULLWIDTH_COMMERCIAL_AT=65312]="FULLWIDTH_COMMERCIAL_AT",eo[eo.FULLWIDTH_REVERSE_SOLIDUS=65340]="FULLWIDTH_REVERSE_SOLIDUS",eo[eo.HALFWIDTH_IDEOGRAPHIC_FULL_STOP=65377]="HALFWIDTH_IDEOGRAPHIC_FULL_STOP",eo[eo.HALFWIDTH_IDEOGRAPHIC_COMMA=65380]="HALFWIDTH_IDEOGRAPHIC_COMMA",eo[eo.HALFWIDTH_KATAKANA_MIDDLE_DOT=65381]="HALFWIDTH_KATAKANA_MIDDLE_DOT",eo[eo.AEGEAN_WORD_SEPARATOR_LINE=65792]="AEGEAN_WORD_SEPARATOR_LINE",eo[eo.AEGEAN_WORD_SEPARATOR_DOT=65793]="AEGEAN_WORD_SEPARATOR_DOT",eo[eo.AEGEAN_CHECK_MARK=65794]="AEGEAN_CHECK_MARK",eo[eo.UGARITIC_WORD_DIVIDER=66463]="UGARITIC_WORD_DIVIDER",eo[eo.OLD_PERSIAN_WORD_DIVIDER=66512]="OLD_PERSIAN_WORD_DIVIDER",eo[eo.CAUCASIAN_ALBANIAN_CITATION_MARK=66927]="CAUCASIAN_ALBANIAN_CITATION_MARK",eo[eo.IMPERIAL_ARAMAIC_SECTION_SIGN=67671]="IMPERIAL_ARAMAIC_SECTION_SIGN",eo[eo.PHOENICIAN_WORD_SEPARATOR=67871]="PHOENICIAN_WORD_SEPARATOR",eo[eo.LYDIAN_TRIANGULAR_MARK=67903]="LYDIAN_TRIANGULAR_MARK",eo[eo.KHAROSHTHI_PUNCTUATION_DOT=68176]="KHAROSHTHI_PUNCTUATION_DOT",eo[eo.KHAROSHTHI_PUNCTUATION_SMALL_CIRCLE=68177]="KHAROSHTHI_PUNCTUATION_SMALL_CIRCLE",eo[eo.KHAROSHTHI_PUNCTUATION_CIRCLE=68178]="KHAROSHTHI_PUNCTUATION_CIRCLE",eo[eo.KHAROSHTHI_PUNCTUATION_CRESCENT_BAR=68179]="KHAROSHTHI_PUNCTUATION_CRESCENT_BAR",eo[eo.KHAROSHTHI_PUNCTUATION_MANGALAM=68180]="KHAROSHTHI_PUNCTUATION_MANGALAM",eo[eo.KHAROSHTHI_PUNCTUATION_LOTUS=68181]="KHAROSHTHI_PUNCTUATION_LOTUS",eo[eo.KHAROSHTHI_PUNCTUATION_DANDA=68182]="KHAROSHTHI_PUNCTUATION_DANDA",eo[eo.KHAROSHTHI_PUNCTUATION_DOUBLE_DANDA=68183]="KHAROSHTHI_PUNCTUATION_DOUBLE_DANDA",eo[eo.KHAROSHTHI_PUNCTUATION_LINES=68184]="KHAROSHTHI_PUNCTUATION_LINES",eo[eo.OLD_SOUTH_ARABIAN_NUMERIC_INDICATOR=68223]="OLD_SOUTH_ARABIAN_NUMERIC_INDICATOR",eo[eo.MANICHAEAN_PUNCTUATION_STAR=68336]="MANICHAEAN_PUNCTUATION_STAR",eo[eo.MANICHAEAN_PUNCTUATION_FLEURON=68337]="MANICHAEAN_PUNCTUATION_FLEURON",eo[eo.MANICHAEAN_PUNCTUATION_DOUBLE_DOT_WITHIN_DOT=68338]="MANICHAEAN_PUNCTUATION_DOUBLE_DOT_WITHIN_DOT",eo[eo.MANICHAEAN_PUNCTUATION_DOT_WITHIN_DOT=68339]="MANICHAEAN_PUNCTUATION_DOT_WITHIN_DOT",eo[eo.MANICHAEAN_PUNCTUATION_DOT=68340]="MANICHAEAN_PUNCTUATION_DOT",eo[eo.MANICHAEAN_PUNCTUATION_TWO_DOTS=68341]="MANICHAEAN_PUNCTUATION_TWO_DOTS",eo[eo.MANICHAEAN_PUNCTUATION_LINE_FILLER=68342]="MANICHAEAN_PUNCTUATION_LINE_FILLER",eo[eo.AVESTAN_ABBREVIATION_MARK=68409]="AVESTAN_ABBREVIATION_MARK",eo[eo.TINY_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION=68410]="TINY_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION",eo[eo.SMALL_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION=68411]="SMALL_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION",eo[eo.LARGE_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION=68412]="LARGE_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION",eo[eo.LARGE_ONE_DOT_OVER_TWO_DOTS_PUNCTUATION=68413]="LARGE_ONE_DOT_OVER_TWO_DOTS_PUNCTUATION",eo[eo.LARGE_TWO_RINGS_OVER_ONE_RING_PUNCTUATION=68414]="LARGE_TWO_RINGS_OVER_ONE_RING_PUNCTUATION",eo[eo.LARGE_ONE_RING_OVER_TWO_RINGS_PUNCTUATION=68415]="LARGE_ONE_RING_OVER_TWO_RINGS_PUNCTUATION",eo[eo.PSALTER_PAHLAVI_SECTION_MARK=68505]="PSALTER_PAHLAVI_SECTION_MARK",eo[eo.PSALTER_PAHLAVI_TURNED_SECTION_MARK=68506]="PSALTER_PAHLAVI_TURNED_SECTION_MARK",eo[eo.PSALTER_PAHLAVI_FOUR_DOTS_WITH_CROSS=68507]="PSALTER_PAHLAVI_FOUR_DOTS_WITH_CROSS",eo[eo.PSALTER_PAHLAVI_FOUR_DOTS_WITH_DOT=68508]="PSALTER_PAHLAVI_FOUR_DOTS_WITH_DOT",eo[eo.SOGDIAN_PUNCTUATION_TWO_VERTICAL_BARS=69461]="SOGDIAN_PUNCTUATION_TWO_VERTICAL_BARS",eo[eo.SOGDIAN_PUNCTUATION_TWO_VERTICAL_BARS_WITH_DOTS=69462]="SOGDIAN_PUNCTUATION_TWO_VERTICAL_BARS_WITH_DOTS",eo[eo.SOGDIAN_PUNCTUATION_CIRCLE_WITH_DOT=69463]="SOGDIAN_PUNCTUATION_CIRCLE_WITH_DOT",eo[eo.SOGDIAN_PUNCTUATION_TWO_CIRCLES_WITH_DOTS=69464]="SOGDIAN_PUNCTUATION_TWO_CIRCLES_WITH_DOTS",eo[eo.SOGDIAN_PUNCTUATION_HALF_CIRCLE_WITH_DOT=69465]="SOGDIAN_PUNCTUATION_HALF_CIRCLE_WITH_DOT",eo[eo.BRAHMI_DANDA=69703]="BRAHMI_DANDA",eo[eo.BRAHMI_DOUBLE_DANDA=69704]="BRAHMI_DOUBLE_DANDA",eo[eo.BRAHMI_PUNCTUATION_DOT=69705]="BRAHMI_PUNCTUATION_DOT",eo[eo.BRAHMI_PUNCTUATION_DOUBLE_DOT=69706]="BRAHMI_PUNCTUATION_DOUBLE_DOT",eo[eo.BRAHMI_PUNCTUATION_LINE=69707]="BRAHMI_PUNCTUATION_LINE",eo[eo.BRAHMI_PUNCTUATION_CRESCENT_BAR=69708]="BRAHMI_PUNCTUATION_CRESCENT_BAR",eo[eo.BRAHMI_PUNCTUATION_LOTUS=69709]="BRAHMI_PUNCTUATION_LOTUS",eo[eo.KAITHI_ABBREVIATION_SIGN=69819]="KAITHI_ABBREVIATION_SIGN",eo[eo.KAITHI_ENUMERATION_SIGN=69820]="KAITHI_ENUMERATION_SIGN",eo[eo.KAITHI_SECTION_MARK=69822]="KAITHI_SECTION_MARK",eo[eo.KAITHI_DOUBLE_SECTION_MARK=69823]="KAITHI_DOUBLE_SECTION_MARK",eo[eo.KAITHI_DANDA=69824]="KAITHI_DANDA",eo[eo.KAITHI_DOUBLE_DANDA=69825]="KAITHI_DOUBLE_DANDA",eo[eo.CHAKMA_SECTION_MARK=69952]="CHAKMA_SECTION_MARK",eo[eo.CHAKMA_DANDA=69953]="CHAKMA_DANDA",eo[eo.CHAKMA_DOUBLE_DANDA=69954]="CHAKMA_DOUBLE_DANDA",eo[eo.CHAKMA_QUESTION_MARK=69955]="CHAKMA_QUESTION_MARK",eo[eo.MAHAJANI_ABBREVIATION_SIGN=70004]="MAHAJANI_ABBREVIATION_SIGN",eo[eo.MAHAJANI_SECTION_MARK=70005]="MAHAJANI_SECTION_MARK",eo[eo.SHARADA_DANDA=70085]="SHARADA_DANDA",eo[eo.SHARADA_DOUBLE_DANDA=70086]="SHARADA_DOUBLE_DANDA",eo[eo.SHARADA_ABBREVIATION_SIGN=70087]="SHARADA_ABBREVIATION_SIGN",eo[eo.SHARADA_SEPARATOR=70088]="SHARADA_SEPARATOR",eo[eo.SHARADA_SUTRA_MARK=70093]="SHARADA_SUTRA_MARK",eo[eo.SHARADA_SIGN_SIDDHAM=70107]="SHARADA_SIGN_SIDDHAM",eo[eo.SHARADA_CONTINUATION_SIGN=70109]="SHARADA_CONTINUATION_SIGN",eo[eo.SHARADA_SECTION_MARK_1=70110]="SHARADA_SECTION_MARK_1",eo[eo.SHARADA_SECTION_MARK_2=70111]="SHARADA_SECTION_MARK_2",eo[eo.KHOJKI_DANDA=70200]="KHOJKI_DANDA",eo[eo.KHOJKI_DOUBLE_DANDA=70201]="KHOJKI_DOUBLE_DANDA",eo[eo.KHOJKI_WORD_SEPARATOR=70202]="KHOJKI_WORD_SEPARATOR",eo[eo.KHOJKI_SECTION_MARK=70203]="KHOJKI_SECTION_MARK",eo[eo.KHOJKI_DOUBLE_SECTION_MARK=70204]="KHOJKI_DOUBLE_SECTION_MARK",eo[eo.KHOJKI_ABBREVIATION_SIGN=70205]="KHOJKI_ABBREVIATION_SIGN",eo[eo.MULTANI_SECTION_MARK=70313]="MULTANI_SECTION_MARK",eo[eo.NEWA_DANDA=70731]="NEWA_DANDA",eo[eo.NEWA_DOUBLE_DANDA=70732]="NEWA_DOUBLE_DANDA",eo[eo.NEWA_COMMA=70733]="NEWA_COMMA",eo[eo.NEWA_GAP_FILLER=70734]="NEWA_GAP_FILLER",eo[eo.NEWA_ABBREVIATION_SIGN=70735]="NEWA_ABBREVIATION_SIGN",eo[eo.NEWA_DOUBLE_COMMA=70746]="NEWA_DOUBLE_COMMA",eo[eo.NEWA_PLACEHOLDER_MARK=70747]="NEWA_PLACEHOLDER_MARK",eo[eo.NEWA_INSERTION_SIGN=70749]="NEWA_INSERTION_SIGN",eo[eo.TIRHUTA_ABBREVIATION_SIGN=70854]="TIRHUTA_ABBREVIATION_SIGN",eo[eo.SIDDHAM_SIGN_SIDDHAM=71105]="SIDDHAM_SIGN_SIDDHAM",eo[eo.SIDDHAM_DANDA=71106]="SIDDHAM_DANDA",eo[eo.SIDDHAM_DOUBLE_DANDA=71107]="SIDDHAM_DOUBLE_DANDA",eo[eo.SIDDHAM_SEPARATOR_DOT=71108]="SIDDHAM_SEPARATOR_DOT",eo[eo.SIDDHAM_SEPARATOR_BAR=71109]="SIDDHAM_SEPARATOR_BAR",eo[eo.SIDDHAM_REPETITION_MARK_1=71110]="SIDDHAM_REPETITION_MARK_1",eo[eo.SIDDHAM_REPETITION_MARK_2=71111]="SIDDHAM_REPETITION_MARK_2",eo[eo.SIDDHAM_REPETITION_MARK_3=71112]="SIDDHAM_REPETITION_MARK_3",eo[eo.SIDDHAM_END_OF_TEXT_MARK=71113]="SIDDHAM_END_OF_TEXT_MARK",eo[eo.SIDDHAM_SECTION_MARK_WITH_TRIDENT_AND_U_SHAPED_ORNAMENTS=71114]="SIDDHAM_SECTION_MARK_WITH_TRIDENT_AND_U_SHAPED_ORNAMENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_TRIDENT_AND_DOTTED_CRESCENTS=71115]="SIDDHAM_SECTION_MARK_WITH_TRIDENT_AND_DOTTED_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_CRESCENTS=71116]="SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_DOUBLE_CRESCENTS=71117]="SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_DOUBLE_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_TRIPLE_CRESCENTS=71118]="SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_TRIPLE_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_DOUBLE_RING=71119]="SIDDHAM_SECTION_MARK_DOUBLE_RING",eo[eo.SIDDHAM_SECTION_MARK_DOUBLE_RING_WITH_RAYS=71120]="SIDDHAM_SECTION_MARK_DOUBLE_RING_WITH_RAYS",eo[eo.SIDDHAM_SECTION_MARK_WITH_DOUBLE_CRESCENTS=71121]="SIDDHAM_SECTION_MARK_WITH_DOUBLE_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_TRIPLE_CRESCENTS=71122]="SIDDHAM_SECTION_MARK_WITH_TRIPLE_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_QUADRUPLE_CRESCENTS=71123]="SIDDHAM_SECTION_MARK_WITH_QUADRUPLE_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_SEPTUPLE_CRESCENTS=71124]="SIDDHAM_SECTION_MARK_WITH_SEPTUPLE_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_RAYS=71125]="SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_RAYS",eo[eo.SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_TWO_ENCLOSURES=71126]="SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_TWO_ENCLOSURES",eo[eo.SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_FOUR_ENCLOSURES=71127]="SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_FOUR_ENCLOSURES",eo[eo.MODI_DANDA=71233]="MODI_DANDA",eo[eo.MODI_DOUBLE_DANDA=71234]="MODI_DOUBLE_DANDA",eo[eo.MODI_ABBREVIATION_SIGN=71235]="MODI_ABBREVIATION_SIGN",eo[eo.MONGOLIAN_BIRGA_WITH_ORNAMENT=71264]="MONGOLIAN_BIRGA_WITH_ORNAMENT",eo[eo.MONGOLIAN_ROTATED_BIRGA=71265]="MONGOLIAN_ROTATED_BIRGA",eo[eo.MONGOLIAN_DOUBLE_BIRGA_WITH_ORNAMENT=71266]="MONGOLIAN_DOUBLE_BIRGA_WITH_ORNAMENT",eo[eo.MONGOLIAN_TRIPLE_BIRGA_WITH_ORNAMENT=71267]="MONGOLIAN_TRIPLE_BIRGA_WITH_ORNAMENT",eo[eo.MONGOLIAN_BIRGA_WITH_DOUBLE_ORNAMENT=71268]="MONGOLIAN_BIRGA_WITH_DOUBLE_ORNAMENT",eo[eo.MONGOLIAN_ROTATED_BIRGA_WITH_ORNAMENT=71269]="MONGOLIAN_ROTATED_BIRGA_WITH_ORNAMENT",eo[eo.MONGOLIAN_ROTATED_BIRGA_WITH_DOUBLE_ORNAMENT=71270]="MONGOLIAN_ROTATED_BIRGA_WITH_DOUBLE_ORNAMENT",eo[eo.MONGOLIAN_INVERTED_BIRGA=71271]="MONGOLIAN_INVERTED_BIRGA",eo[eo.MONGOLIAN_INVERTED_BIRGA_WITH_DOUBLE_ORNAMENT=71272]="MONGOLIAN_INVERTED_BIRGA_WITH_DOUBLE_ORNAMENT",eo[eo.MONGOLIAN_SWIRL_BIRGA=71273]="MONGOLIAN_SWIRL_BIRGA",eo[eo.MONGOLIAN_SWIRL_BIRGA_WITH_ORNAMENT=71274]="MONGOLIAN_SWIRL_BIRGA_WITH_ORNAMENT",eo[eo.MONGOLIAN_SWIRL_BIRGA_WITH_DOUBLE_ORNAMENT=71275]="MONGOLIAN_SWIRL_BIRGA_WITH_DOUBLE_ORNAMENT",eo[eo.MONGOLIAN_TURNED_SWIRL_BIRGA_WITH_DOUBLE_ORNAMENT=71276]="MONGOLIAN_TURNED_SWIRL_BIRGA_WITH_DOUBLE_ORNAMENT",eo[eo.AHOM_SIGN_SMALL_SECTION=71484]="AHOM_SIGN_SMALL_SECTION",eo[eo.AHOM_SIGN_SECTION=71485]="AHOM_SIGN_SECTION",eo[eo.AHOM_SIGN_RULAI=71486]="AHOM_SIGN_RULAI",eo[eo.DOGRA_ABBREVIATION_SIGN=71739]="DOGRA_ABBREVIATION_SIGN",eo[eo.DIVES_AKURU_DOUBLE_DANDA=72004]="DIVES_AKURU_DOUBLE_DANDA",eo[eo.DIVES_AKURU_GAP_FILLER=72005]="DIVES_AKURU_GAP_FILLER",eo[eo.DIVES_AKURU_END_OF_TEXT_MARK=72006]="DIVES_AKURU_END_OF_TEXT_MARK",eo[eo.NANDINAGARI_SIGN_SIDDHAM=72162]="NANDINAGARI_SIGN_SIDDHAM",eo[eo.ZANABAZAR_SQUARE_INITIAL_HEAD_MARK=72255]="ZANABAZAR_SQUARE_INITIAL_HEAD_MARK",eo[eo.ZANABAZAR_SQUARE_CLOSING_HEAD_MARK=72256]="ZANABAZAR_SQUARE_CLOSING_HEAD_MARK",eo[eo.ZANABAZAR_SQUARE_MARK_TSHEG=72257]="ZANABAZAR_SQUARE_MARK_TSHEG",eo[eo.ZANABAZAR_SQUARE_MARK_SHAD=72258]="ZANABAZAR_SQUARE_MARK_SHAD",eo[eo.ZANABAZAR_SQUARE_MARK_DOUBLE_SHAD=72259]="ZANABAZAR_SQUARE_MARK_DOUBLE_SHAD",eo[eo.ZANABAZAR_SQUARE_MARK_LONG_TSHEG=72260]="ZANABAZAR_SQUARE_MARK_LONG_TSHEG",eo[eo.ZANABAZAR_SQUARE_INITIAL_DOUBLE_LINED_HEAD_MARK=72261]="ZANABAZAR_SQUARE_INITIAL_DOUBLE_LINED_HEAD_MARK",eo[eo.ZANABAZAR_SQUARE_CLOSING_DOUBLE_LINED_HEAD_MARK=72262]="ZANABAZAR_SQUARE_CLOSING_DOUBLE_LINED_HEAD_MARK",eo[eo.SOYOMBO_MARK_TSHEG=72346]="SOYOMBO_MARK_TSHEG",eo[eo.SOYOMBO_MARK_SHAD=72347]="SOYOMBO_MARK_SHAD",eo[eo.SOYOMBO_MARK_DOUBLE_SHAD=72348]="SOYOMBO_MARK_DOUBLE_SHAD",eo[eo.SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN_AND_TRIPLE_FLAME=72350]="SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN_AND_TRIPLE_FLAME",eo[eo.SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN_AND_FLAME=72351]="SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN_AND_FLAME",eo[eo.SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN=72352]="SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN",eo[eo.SOYOMBO_TERMINAL_MARK_1=72353]="SOYOMBO_TERMINAL_MARK_1",eo[eo.SOYOMBO_TERMINAL_MARK_2=72354]="SOYOMBO_TERMINAL_MARK_2",eo[eo.BHAIKSUKI_DANDA=72769]="BHAIKSUKI_DANDA",eo[eo.BHAIKSUKI_DOUBLE_DANDA=72770]="BHAIKSUKI_DOUBLE_DANDA",eo[eo.BHAIKSUKI_WORD_SEPARATOR=72771]="BHAIKSUKI_WORD_SEPARATOR",eo[eo.BHAIKSUKI_GAP_FILLER_1=72772]="BHAIKSUKI_GAP_FILLER_1",eo[eo.BHAIKSUKI_GAP_FILLER_2=72773]="BHAIKSUKI_GAP_FILLER_2",eo[eo.MARCHEN_HEAD_MARK=72816]="MARCHEN_HEAD_MARK",eo[eo.MARCHEN_MARK_SHAD=72817]="MARCHEN_MARK_SHAD",eo[eo.MAKASAR_PASSIMBANG=73463]="MAKASAR_PASSIMBANG",eo[eo.MAKASAR_END_OF_SECTION=73464]="MAKASAR_END_OF_SECTION",eo[eo.TAMIL_PUNCTUATION_END_OF_TEXT=73727]="TAMIL_PUNCTUATION_END_OF_TEXT",eo[eo.CUNEIFORM_PUNCTUATION_SIGN_OLD_ASSYRIAN_WORD_DIVIDER=74864]="CUNEIFORM_PUNCTUATION_SIGN_OLD_ASSYRIAN_WORD_DIVIDER",eo[eo.CUNEIFORM_PUNCTUATION_SIGN_VERTICAL_COLON=74865]="CUNEIFORM_PUNCTUATION_SIGN_VERTICAL_COLON",eo[eo.CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_COLON=74866]="CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_COLON",eo[eo.CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_TRICOLON=74867]="CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_TRICOLON",eo[eo.CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_QUADCOLON=74868]="CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_QUADCOLON",eo[eo.MRO_DANDA=92782]="MRO_DANDA",eo[eo.MRO_DOUBLE_DANDA=92783]="MRO_DOUBLE_DANDA",eo[eo.BASSA_VAH_FULL_STOP=92917]="BASSA_VAH_FULL_STOP",eo[eo.PAHAWH_HMONG_SIGN_VOS_THOM=92983]="PAHAWH_HMONG_SIGN_VOS_THOM",eo[eo.PAHAWH_HMONG_SIGN_VOS_TSHAB_CEEB=92984]="PAHAWH_HMONG_SIGN_VOS_TSHAB_CEEB",eo[eo.PAHAWH_HMONG_SIGN_CIM_CHEEM=92985]="PAHAWH_HMONG_SIGN_CIM_CHEEM",eo[eo.PAHAWH_HMONG_SIGN_VOS_THIAB=92986]="PAHAWH_HMONG_SIGN_VOS_THIAB",eo[eo.PAHAWH_HMONG_SIGN_VOS_FEEM=92987]="PAHAWH_HMONG_SIGN_VOS_FEEM",eo[eo.PAHAWH_HMONG_SIGN_XAUS=92996]="PAHAWH_HMONG_SIGN_XAUS",eo[eo.MEDEFAIDRIN_COMMA=93847]="MEDEFAIDRIN_COMMA",eo[eo.MEDEFAIDRIN_FULL_STOP=93848]="MEDEFAIDRIN_FULL_STOP",eo[eo.MEDEFAIDRIN_SYMBOL_AIVA=93849]="MEDEFAIDRIN_SYMBOL_AIVA",eo[eo.MEDEFAIDRIN_EXCLAMATION_OH=93850]="MEDEFAIDRIN_EXCLAMATION_OH",eo[eo.OLD_CHINESE_HOOK_MARK=94178]="OLD_CHINESE_HOOK_MARK",eo[eo.DUPLOYAN_PUNCTUATION_CHINOOK_FULL_STOP=113823]="DUPLOYAN_PUNCTUATION_CHINOOK_FULL_STOP",eo[eo.SIGNWRITING_COMMA=121479]="SIGNWRITING_COMMA",eo[eo.SIGNWRITING_FULL_STOP=121480]="SIGNWRITING_FULL_STOP",eo[eo.SIGNWRITING_SEMICOLON=121481]="SIGNWRITING_SEMICOLON",eo[eo.SIGNWRITING_COLON=121482]="SIGNWRITING_COLON",eo[eo.SIGNWRITING_PARENTHESIS=121483]="SIGNWRITING_PARENTHESIS",eo[eo.ADLAM_INITIAL_EXCLAMATION_MARK=125278]="ADLAM_INITIAL_EXCLAMATION_MARK",eo[eo.ADLAM_INITIAL_QUESTION_MARK=125279]="ADLAM_INITIAL_QUESTION_MARK"})(UnicodePoCodePoint||(UnicodePoCodePoint={}));var UnicodePsCodePoint;(function(eo){eo[eo.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",eo[eo.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",eo[eo.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",eo[eo.TIBETAN_MARK_GUG_RTAGS_GYON=3898]="TIBETAN_MARK_GUG_RTAGS_GYON",eo[eo.TIBETAN_MARK_ANG_KHANG_GYON=3900]="TIBETAN_MARK_ANG_KHANG_GYON",eo[eo.OGHAM_FEATHER_MARK=5787]="OGHAM_FEATHER_MARK",eo[eo.SINGLE_LOW_9_QUOTATION_MARK=8218]="SINGLE_LOW_9_QUOTATION_MARK",eo[eo.DOUBLE_LOW_9_QUOTATION_MARK=8222]="DOUBLE_LOW_9_QUOTATION_MARK",eo[eo.LEFT_SQUARE_BRACKET_WITH_QUILL=8261]="LEFT_SQUARE_BRACKET_WITH_QUILL",eo[eo.SUPERSCRIPT_LEFT_PARENTHESIS=8317]="SUPERSCRIPT_LEFT_PARENTHESIS",eo[eo.SUBSCRIPT_LEFT_PARENTHESIS=8333]="SUBSCRIPT_LEFT_PARENTHESIS",eo[eo.LEFT_CEILING=8968]="LEFT_CEILING",eo[eo.LEFT_FLOOR=8970]="LEFT_FLOOR",eo[eo.LEFT_POINTING_ANGLE_BRACKET=9001]="LEFT_POINTING_ANGLE_BRACKET",eo[eo.MEDIUM_LEFT_PARENTHESIS_ORNAMENT=10088]="MEDIUM_LEFT_PARENTHESIS_ORNAMENT",eo[eo.MEDIUM_FLATTENED_LEFT_PARENTHESIS_ORNAMENT=10090]="MEDIUM_FLATTENED_LEFT_PARENTHESIS_ORNAMENT",eo[eo.MEDIUM_LEFT_POINTING_ANGLE_BRACKET_ORNAMENT=10092]="MEDIUM_LEFT_POINTING_ANGLE_BRACKET_ORNAMENT",eo[eo.HEAVY_LEFT_POINTING_ANGLE_QUOTATION_MARK_ORNAMENT=10094]="HEAVY_LEFT_POINTING_ANGLE_QUOTATION_MARK_ORNAMENT",eo[eo.HEAVY_LEFT_POINTING_ANGLE_BRACKET_ORNAMENT=10096]="HEAVY_LEFT_POINTING_ANGLE_BRACKET_ORNAMENT",eo[eo.LIGHT_LEFT_TORTOISE_SHELL_BRACKET_ORNAMENT=10098]="LIGHT_LEFT_TORTOISE_SHELL_BRACKET_ORNAMENT",eo[eo.MEDIUM_LEFT_CURLY_BRACKET_ORNAMENT=10100]="MEDIUM_LEFT_CURLY_BRACKET_ORNAMENT",eo[eo.LEFT_S_SHAPED_BAG_DELIMITER=10181]="LEFT_S_SHAPED_BAG_DELIMITER",eo[eo.MATHEMATICAL_LEFT_WHITE_SQUARE_BRACKET=10214]="MATHEMATICAL_LEFT_WHITE_SQUARE_BRACKET",eo[eo.MATHEMATICAL_LEFT_ANGLE_BRACKET=10216]="MATHEMATICAL_LEFT_ANGLE_BRACKET",eo[eo.MATHEMATICAL_LEFT_DOUBLE_ANGLE_BRACKET=10218]="MATHEMATICAL_LEFT_DOUBLE_ANGLE_BRACKET",eo[eo.MATHEMATICAL_LEFT_WHITE_TORTOISE_SHELL_BRACKET=10220]="MATHEMATICAL_LEFT_WHITE_TORTOISE_SHELL_BRACKET",eo[eo.MATHEMATICAL_LEFT_FLATTENED_PARENTHESIS=10222]="MATHEMATICAL_LEFT_FLATTENED_PARENTHESIS",eo[eo.LEFT_WHITE_CURLY_BRACKET=10627]="LEFT_WHITE_CURLY_BRACKET",eo[eo.LEFT_WHITE_PARENTHESIS=10629]="LEFT_WHITE_PARENTHESIS",eo[eo.Z_NOTATION_LEFT_IMAGE_BRACKET=10631]="Z_NOTATION_LEFT_IMAGE_BRACKET",eo[eo.Z_NOTATION_LEFT_BINDING_BRACKET=10633]="Z_NOTATION_LEFT_BINDING_BRACKET",eo[eo.LEFT_SQUARE_BRACKET_WITH_UNDERBAR=10635]="LEFT_SQUARE_BRACKET_WITH_UNDERBAR",eo[eo.LEFT_SQUARE_BRACKET_WITH_TICK_IN_TOP_CORNER=10637]="LEFT_SQUARE_BRACKET_WITH_TICK_IN_TOP_CORNER",eo[eo.LEFT_SQUARE_BRACKET_WITH_TICK_IN_BOTTOM_CORNER=10639]="LEFT_SQUARE_BRACKET_WITH_TICK_IN_BOTTOM_CORNER",eo[eo.LEFT_ANGLE_BRACKET_WITH_DOT=10641]="LEFT_ANGLE_BRACKET_WITH_DOT",eo[eo.LEFT_ARC_LESS_THAN_BRACKET=10643]="LEFT_ARC_LESS_THAN_BRACKET",eo[eo.DOUBLE_LEFT_ARC_GREATER_THAN_BRACKET=10645]="DOUBLE_LEFT_ARC_GREATER_THAN_BRACKET",eo[eo.LEFT_BLACK_TORTOISE_SHELL_BRACKET=10647]="LEFT_BLACK_TORTOISE_SHELL_BRACKET",eo[eo.LEFT_WIGGLY_FENCE=10712]="LEFT_WIGGLY_FENCE",eo[eo.LEFT_DOUBLE_WIGGLY_FENCE=10714]="LEFT_DOUBLE_WIGGLY_FENCE",eo[eo.LEFT_POINTING_CURVED_ANGLE_BRACKET=10748]="LEFT_POINTING_CURVED_ANGLE_BRACKET",eo[eo.TOP_LEFT_HALF_BRACKET=11810]="TOP_LEFT_HALF_BRACKET",eo[eo.BOTTOM_LEFT_HALF_BRACKET=11812]="BOTTOM_LEFT_HALF_BRACKET",eo[eo.LEFT_SIDEWAYS_U_BRACKET=11814]="LEFT_SIDEWAYS_U_BRACKET",eo[eo.LEFT_DOUBLE_PARENTHESIS=11816]="LEFT_DOUBLE_PARENTHESIS",eo[eo.DOUBLE_LOW_REVERSED_9_QUOTATION_MARK=11842]="DOUBLE_LOW_REVERSED_9_QUOTATION_MARK",eo[eo.LEFT_ANGLE_BRACKET=12296]="LEFT_ANGLE_BRACKET",eo[eo.LEFT_DOUBLE_ANGLE_BRACKET=12298]="LEFT_DOUBLE_ANGLE_BRACKET",eo[eo.LEFT_CORNER_BRACKET=12300]="LEFT_CORNER_BRACKET",eo[eo.LEFT_WHITE_CORNER_BRACKET=12302]="LEFT_WHITE_CORNER_BRACKET",eo[eo.LEFT_BLACK_LENTICULAR_BRACKET=12304]="LEFT_BLACK_LENTICULAR_BRACKET",eo[eo.LEFT_TORTOISE_SHELL_BRACKET=12308]="LEFT_TORTOISE_SHELL_BRACKET",eo[eo.LEFT_WHITE_LENTICULAR_BRACKET=12310]="LEFT_WHITE_LENTICULAR_BRACKET",eo[eo.LEFT_WHITE_TORTOISE_SHELL_BRACKET=12312]="LEFT_WHITE_TORTOISE_SHELL_BRACKET",eo[eo.LEFT_WHITE_SQUARE_BRACKET=12314]="LEFT_WHITE_SQUARE_BRACKET",eo[eo.REVERSED_DOUBLE_PRIME_QUOTATION_MARK=12317]="REVERSED_DOUBLE_PRIME_QUOTATION_MARK",eo[eo.ORNATE_RIGHT_PARENTHESIS=64831]="ORNATE_RIGHT_PARENTHESIS",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_WHITE_LENTICULAR_BRACKET=65047]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_WHITE_LENTICULAR_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_PARENTHESIS=65077]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_PARENTHESIS",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_CURLY_BRACKET=65079]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_CURLY_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_TORTOISE_SHELL_BRACKET=65081]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_TORTOISE_SHELL_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_BLACK_LENTICULAR_BRACKET=65083]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_BLACK_LENTICULAR_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_DOUBLE_ANGLE_BRACKET=65085]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_DOUBLE_ANGLE_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_ANGLE_BRACKET=65087]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_ANGLE_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_CORNER_BRACKET=65089]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_CORNER_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_WHITE_CORNER_BRACKET=65091]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_WHITE_CORNER_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_SQUARE_BRACKET=65095]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_SQUARE_BRACKET",eo[eo.SMALL_LEFT_PARENTHESIS=65113]="SMALL_LEFT_PARENTHESIS",eo[eo.SMALL_LEFT_CURLY_BRACKET=65115]="SMALL_LEFT_CURLY_BRACKET",eo[eo.SMALL_LEFT_TORTOISE_SHELL_BRACKET=65117]="SMALL_LEFT_TORTOISE_SHELL_BRACKET",eo[eo.FULLWIDTH_LEFT_PARENTHESIS=65288]="FULLWIDTH_LEFT_PARENTHESIS",eo[eo.FULLWIDTH_LEFT_SQUARE_BRACKET=65339]="FULLWIDTH_LEFT_SQUARE_BRACKET",eo[eo.FULLWIDTH_LEFT_CURLY_BRACKET=65371]="FULLWIDTH_LEFT_CURLY_BRACKET",eo[eo.FULLWIDTH_LEFT_WHITE_PARENTHESIS=65375]="FULLWIDTH_LEFT_WHITE_PARENTHESIS",eo[eo.HALFWIDTH_LEFT_CORNER_BRACKET=65378]="HALFWIDTH_LEFT_CORNER_BRACKET"})(UnicodePsCodePoint||(UnicodePsCodePoint={}));var UnicodeZsCodePoint;(function(eo){eo[eo.SPACE=32]="SPACE",eo[eo.NO_BREAK_SPACE=160]="NO_BREAK_SPACE",eo[eo.OGHAM_SPACE_MARK=5760]="OGHAM_SPACE_MARK",eo[eo.EN_QUAD=8192]="EN_QUAD",eo[eo.EM_QUAD=8193]="EM_QUAD",eo[eo.EN_SPACE=8194]="EN_SPACE",eo[eo.EM_SPACE=8195]="EM_SPACE",eo[eo.THREE_PER_EM_SPACE=8196]="THREE_PER_EM_SPACE",eo[eo.FOUR_PER_EM_SPACE=8197]="FOUR_PER_EM_SPACE",eo[eo.SIX_PER_EM_SPACE=8198]="SIX_PER_EM_SPACE",eo[eo.FIGURE_SPACE=8199]="FIGURE_SPACE",eo[eo.PUNCTUATION_SPACE=8200]="PUNCTUATION_SPACE",eo[eo.THIN_SPACE=8201]="THIN_SPACE",eo[eo.HAIR_SPACE=8202]="HAIR_SPACE",eo[eo.NARROW_NO_BREAK_SPACE=8239]="NARROW_NO_BREAK_SPACE",eo[eo.MEDIUM_MATHEMATICAL_SPACE=8287]="MEDIUM_MATHEMATICAL_SPACE",eo[eo.IDEOGRAPHIC_SPACE=12288]="IDEOGRAPHIC_SPACE"})(UnicodeZsCodePoint||(UnicodeZsCodePoint={}));var VirtualCodePoint;(function(eo){eo[eo.LINE_END=-1]="LINE_END",eo[eo.SPACE=-2]="SPACE"})(VirtualCodePoint||(VirtualCodePoint={}));function createCodePointSearcher(eo){const to=[...new Set(eo)].sort((oo,io)=>oo-io),ro=to.length;if(ro<8)return[oo=>{for(let io=0;ioso+io);++io);no.push(so,so+io)}if(no.length*1.5{for(let so=0;so{let so=0,ao=oo;for(;so>>1;io{let io=0,so=ro;for(;io>>1;ootypeof to=="number")}createCodePointSearcher([AsciiCodePoint.HT,AsciiCodePoint.LF,AsciiCodePoint.VT,AsciiCodePoint.FF,AsciiCodePoint.CR,AsciiCodePoint.SPACE]);const[isAsciiPunctuationCharacter,asciiPunctuationCharacters]=createCodePointSearcher([AsciiCodePoint.EXCLAMATION_MARK,AsciiCodePoint.DOUBLE_QUOTE,AsciiCodePoint.NUMBER_SIGN,AsciiCodePoint.DOLLAR_SIGN,AsciiCodePoint.PERCENT_SIGN,AsciiCodePoint.AMPERSAND,AsciiCodePoint.SINGLE_QUOTE,AsciiCodePoint.OPEN_PARENTHESIS,AsciiCodePoint.CLOSE_PARENTHESIS,AsciiCodePoint.ASTERISK,AsciiCodePoint.PLUS_SIGN,AsciiCodePoint.COMMA,AsciiCodePoint.MINUS_SIGN,AsciiCodePoint.DOT,AsciiCodePoint.SLASH,AsciiCodePoint.COLON,AsciiCodePoint.SEMICOLON,AsciiCodePoint.OPEN_ANGLE,AsciiCodePoint.EQUALS_SIGN,AsciiCodePoint.CLOSE_ANGLE,AsciiCodePoint.QUESTION_MARK,AsciiCodePoint.AT_SIGN,AsciiCodePoint.OPEN_BRACKET,AsciiCodePoint.BACKSLASH,AsciiCodePoint.CLOSE_BRACKET,AsciiCodePoint.CARET,AsciiCodePoint.UNDERSCORE,AsciiCodePoint.BACKTICK,AsciiCodePoint.OPEN_BRACE,AsciiCodePoint.VERTICAL_SLASH,AsciiCodePoint.CLOSE_BRACE,AsciiCodePoint.TILDE]),isAsciiDigitCharacter=eo=>eo>=AsciiCodePoint.DIGIT0&&eo<=AsciiCodePoint.DIGIT9,isAsciiLowerLetter=eo=>eo>=AsciiCodePoint.LOWERCASE_A&&eo<=AsciiCodePoint.LOWERCASE_Z,isAsciiUpperLetter=eo=>eo>=AsciiCodePoint.UPPERCASE_A&&eo<=AsciiCodePoint.UPPERCASE_Z,isAsciiLetter=eo=>isAsciiLowerLetter(eo)||isAsciiUpperLetter(eo),isAlphanumeric=eo=>isAsciiLowerLetter(eo)||isAsciiUpperLetter(eo)||isAsciiDigitCharacter(eo),isAsciiCharacter=eo=>eo>=AsciiCodePoint.NUL&&eo<=AsciiCodePoint.DELETE,[isAsciiControlCharacter,asciiControlCharacters]=createCodePointSearcher([AsciiCodePoint.NUL,AsciiCodePoint.SOH,AsciiCodePoint.STX,AsciiCodePoint.ETX,AsciiCodePoint.EOT,AsciiCodePoint.ENQ,AsciiCodePoint.ACK,AsciiCodePoint.BEL,AsciiCodePoint.BS,AsciiCodePoint.HT,AsciiCodePoint.LF,AsciiCodePoint.VT,AsciiCodePoint.FF,AsciiCodePoint.CR,AsciiCodePoint.SO,AsciiCodePoint.SI,AsciiCodePoint.DLE,AsciiCodePoint.DC1,AsciiCodePoint.DC2,AsciiCodePoint.DC3,AsciiCodePoint.DC4,AsciiCodePoint.NAK,AsciiCodePoint.SYN,AsciiCodePoint.ETB,AsciiCodePoint.CAN,AsciiCodePoint.EM,AsciiCodePoint.SUB,AsciiCodePoint.ESC,AsciiCodePoint.FS,AsciiCodePoint.GS,AsciiCodePoint.RS,AsciiCodePoint.US,AsciiCodePoint.DELETE]),[isWhitespaceCharacter,whitespaceCharacters]=createCodePointSearcher([AsciiCodePoint.VT,AsciiCodePoint.FF,AsciiCodePoint.SPACE,VirtualCodePoint.SPACE,VirtualCodePoint.LINE_END]);AsciiCodePoint.SPACE,VirtualCodePoint.SPACE;const isSpaceCharacter=eo=>eo===AsciiCodePoint.SPACE||eo===VirtualCodePoint.SPACE,isLineEnding=eo=>eo===VirtualCodePoint.LINE_END,[isPunctuationCharacter,punctuationCharacters]=createCodePointSearcher([...asciiPunctuationCharacters,...collectCodePointsFromEnum(UnicodePcCodePoint),...collectCodePointsFromEnum(UnicodePdCodePoint),...collectCodePointsFromEnum(UnicodePeCodePoint),...collectCodePointsFromEnum(UnicodePfCodePoint),...collectCodePointsFromEnum(UnicodePiCodePoint),...collectCodePointsFromEnum(UnicodePoCodePoint),...collectCodePointsFromEnum(UnicodePsCodePoint)]),isSpaceLike=eo=>isSpaceCharacter(eo)||isLineEnding(eo),[isUnicodeWhitespaceCharacter,unicodeWhitespaceCharacters]=createCodePointSearcher([AsciiCodePoint.HT,AsciiCodePoint.LF,AsciiCodePoint.FF,AsciiCodePoint.CR,VirtualCodePoint.SPACE,VirtualCodePoint.LINE_END,...collectCodePointsFromEnum(UnicodeZsCodePoint)]);var UnicodeCodePoint;(function(eo){eo[eo.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"})(UnicodeCodePoint||(UnicodeCodePoint={}));function createEntityReferenceTrie(){const eo=(oo,io)=>{if(oo.length<=4){for(let lo=0;lo=io)return lo;return oo.length}let so=0,ao=oo.length;for(;so>>1;oo[lo].key{let so=to;for(const ao of oo){const lo=eo(so.children,ao);if(lo>=so.children.length){const uo={key:ao,children:[]};so.children.push(uo),so=uo;continue}let co=so.children[lo];if(co.key===ao){so=co;continue}co={key:ao,children:[]},so.children.splice(lo,0,co),so=co}so.value=io},search:(oo,io,so)=>{let ao=to;for(let lo=io;lo=ao.children.length)return null;const fo=ao.children[uo];if(fo.key!==co)return null;if(fo.value!=null)return{nextIndex:lo+1,value:fo.value};ao=fo}return null}}}const entityReferenceTrie=createEntityReferenceTrie();entityReferences.forEach(eo=>entityReferenceTrie.insert(eo.key,eo.value));function eatEntityReference(eo,to,ro){if(to+1>=ro)return null;const no=entityReferenceTrie.search(eo,to,ro);if(no!=null)return no;if(eo[to].codePoint!==AsciiCodePoint.NUMBER_SIGN)return null;let oo=0,io=to+1;if(eo[io].codePoint===AsciiCodePoint.LOWERCASE_X||eo[io].codePoint===AsciiCodePoint.UPPERCASE_X){io+=1;for(let ao=1;ao<=6&&io=AsciiCodePoint.UPPERCASE_A&&lo<=AsciiCodePoint.UPPERCASE_F){oo=(oo<<4)+(lo-AsciiCodePoint.UPPERCASE_A+10);continue}if(lo>=AsciiCodePoint.LOWERCASE_A&&lo<=AsciiCodePoint.LOWERCASE_F){oo=(oo<<4)+(lo-AsciiCodePoint.LOWERCASE_A+10);continue}break}}else for(let ao=1;ao<=7&&io=ro||eo[io].codePoint!==AsciiCodePoint.SEMICOLON)return null;let so;try{oo===0&&(oo=UnicodeCodePoint.REPLACEMENT_CHARACTER),so=String.fromCodePoint(oo)}catch{so=String.fromCodePoint(UnicodeCodePoint.REPLACEMENT_CHARACTER)}return{nextIndex:io+1,value:so}}function foldCase(eo){return Array.from(eo).map(to=>foldingCaseCodeMap[to]??to).join("")}(()=>{try{const eo=new RegExp("\\p{Script=Han}|[\\u{3002}\\u{ff1f}\\u{ff01}\\u{ff0c}\\u{3001}\\u{ff1b}\\u{ff1a}\\u{201c}\\u{201d}\\u{2018}\\u{2019}\\u{ff08}\\u{ff09}\\u{300a}\\u{300b}\\u{3008}\\u{3009}\\u{3010}\\u{3011}\\u{300e}\\u{300f}\\u{300c}\\u{300d}\\u{fe43}\\u{fe44}\\u{3014}\\u{3015}\\u{2026}\\u{2014}\\u{ff5e}\\u{fe4f}\\u{ffe5}]","u").source,to=new RegExp(`(${eo})\\n+(${eo})`,"gu");return ro=>ro.replace(to,"$1$2")}catch{const eo=/[\u{4E00}-\u{9FCC}\u{3400}-\u{4DB5}\u{FA0E}\u{FA0F}\u{FA11}\u{FA13}\u{FA14}\u{FA1F}\u{FA21}\u{FA23}\u{FA24}\u{FA27}-\u{FA29}]|[\u{d840}-\u{d868}][\u{dc00}-\u{dfff}]|\u{d869}[\u{dc00}-\u{ded6}\u{df00}-\u{dfff}]|[\u{d86a}-\u{d86c}][\u{dc00}-\u{dfff}]|\u{d86d}[\u{dc00}-\u{df34}\u{df40}-\u{dfff}]|\u{d86e}[\u{dc00}-\u{dc1d}]/u.source,to=new RegExp(`(${eo})\\n+(${eo})`,"gu");return ro=>ro.replace(to,"$1$2")}})();(()=>{try{const eo=new RegExp("\\p{Script=Han}|[\\u{3002}\\u{ff1f}\\u{ff01}\\u{ff0c}\\u{3001}\\u{ff1b}\\u{ff1a}\\u{201c}\\u{201d}\\u{2018}\\u{2019}\\u{ff08}\\u{ff09}\\u{300a}\\u{300b}\\u{3008}\\u{3009}\\u{3010}\\u{3011}\\u{300e}\\u{300f}\\u{300c}\\u{300d}\\u{fe43}\\u{fe44}\\u{3014}\\u{3015}\\u{2026}\\u{2014}\\u{ff5e}\\u{fe4f}\\u{ffe5}]","u").source,to=new RegExp(`(${eo})[\\s\\n]+(${eo})`,"gu");return ro=>ro.replace(to,"$1$2")}catch{const eo=/[\u{4E00}-\u{9FCC}\u{3400}-\u{4DB5}\u{FA0E}\u{FA0F}\u{FA11}\u{FA13}\u{FA14}\u{FA1F}\u{FA21}\u{FA23}\u{FA24}\u{FA27}-\u{FA29}]|[\u{d840}-\u{d868}][\u{dc00}-\u{dfff}]|\u{d869}[\u{dc00}-\u{ded6}\u{df00}-\u{dfff}]|[\u{d86a}-\u{d86c}][\u{dc00}-\u{dfff}]|\u{d86d}[\u{dc00}-\u{df34}\u{df40}-\u{dfff}]|\u{d86e}[\u{dc00}-\u{dc1d}]/u.source,to=new RegExp(`(${eo})[\\s\\n]+(${eo})`,"gu");return ro=>ro.replace(to,"$1$2")}})();function*createNodePointGenerator(eo){let to=0,ro=1,no=1;const oo=typeof eo=="string"?[eo]:eo;for(const io of oo){const so=[];for(const co of io){const uo=co.codePointAt(0);so.push(uo)}const ao=[],lo=so.length;for(let co=0;co>2,co=so-io&3;for(let uo=0;uo>2,co=so-io&3;for(let uo=0;uo!0;if(eo instanceof Function)return eo;if(eo.length===0)return()=>!1;if(eo.length===1){const to=eo[0];return ro=>ro.type===to}if(eo.length===2){const[to,ro]=eo;return no=>no.type===to||no.type===ro}return to=>{for(const ro of eo)if(to.type===ro)return!0;return!1}}function traverseAst(eo,to,ro){const no=createNodeMatcher(to),oo=io=>{const{children:so}=io;for(let ao=0;ao{const no={};traverseAst(eo,to,so=>{const ao=so;no[ao.identifier]===void 0&&(no[ao.identifier]=ao)});const oo=[];for(const so of ro)no[so.identifier]===void 0&&(no[so.identifier]=so,oo.push(so));return{root:oo.length>0?{...eo,children:eo.children.concat(oo)}:eo,definitionMap:no}},astClasses=mergeStyleSets({root:{"--colorBgBlockquote":"none","--colorBgTableHead":"hsl(0deg, 0%, 94%)","--colorBgTableEvenRow":"hsl(0deg, 0%, 96%)","--colorBgTableOddRow":"hsl(0deg, 0%, 100%)","--colorBorderBlockquote":"hsl(210deg, 13%, 85%)","--colorBorderHeading":"hsl(0deg, 0%, 80%)","--colorBorderImage":"hsl(277deg, 19%, 47%)","--colorBorderTable":"hsl(220deg, 7%, 90%)","--colorBgCode":"#f5f7f9","--colorDelete":"hsl(210deg, 8%, 65%)","--colorHeading":"hsl(0deg, 0%, 25%)","--colorImageTitle":"hsl(0deg, 0%, 50%)","--colorInlineCode":"hsl(348deg, 60%, 47%)","--colorLink":"hsl(206deg, 53%, 47%)","--colorLinkActive":"hsl(206deg, 53%, 52%)","--colorLinkHover":"hsl(206deg, 53%, 52%)","--colorLinkVisited":"hsl(206deg, 53%, 47%)","--fontFamilyCode":"Consolas, 'Source Code Pro', 'Roboto Mono', monospace, sans-serif","--fontFamilyHeading":"Consolas, 'Source Code Pro', 'Roboto Mono', monospace, sans-serif"},rootDarken:{"&&":{"--colorBgBlockquote":"none","--colorBgTableHead":"hsl(200deg, 10%, 16%)","--colorBgTableEvenRow":"hsl(200deg, 10%, 16%)","--colorBgTableOddRow":"hsl(0deg, 0%, 9%)","--colorBorderBlockquote":"hsl(207deg, 7%, 45%)","--colorBorderHeading":"hsla(0deg, 0%, 30%, 0.8)","--colorBorderImage":"hsl(290deg, 15%, 49%)","--colorBorderTable":"hsl(0deg, 0%, 50%)","--colorBgCode":"hsl(0deg, 0%, 12%)","--colorDelete":"hsl(220deg, 5%, 68%)","--colorHeading":"hsl(0deg, 0%, 65%)","--colorImageTitle":"hsl(0deg, 0%, 50%)","--colorInlineCode":"hsl(348deg, 70%, 52%)","--colorLink":"hsl(207deg, 53%, 50%)","--colorLinkActive":"hsl(207deg, 53%, 50%)","--colorLinkHover":"hsl(207deg, 53%, 50%)","--colorLinkVisited":"hsl(207deg, 53%, 50%)","--fontFamilyCode":"Consolas, 'Source Code Pro', 'Roboto Mono', monospace, sans-serif","--fontFamilyHeading":"Consolas, 'Source Code Pro', 'Roboto Mono', monospace, sans-serif"}},blockquote:{},break:{},code:{},delete:{},emphasis:{},heading:{},image:{},imageReference:{},inlineCode:{},link:{},linkReference:{},list:{},listItem:{},paragraph:{},strong:{},table:{},text:{},thematicBreak:{}}),NodeRendererContextType=React.createContext(null);NodeRendererContextType.displayName="NodeRendererContextType";const useNodeRendererContext=()=>React.useContext(NodeRendererContextType);class SafeBatchHandler{constructor(){zs(this,"_errors");zs(this,"_summary");this._errors=[],this._summary=void 0}cleanup(){this._errors.length=0,this._summary=void 0}run(to){try{to()}catch(ro){this._errors.push(ro),this._summary=void 0}}summary(to){if(this._summary===void 0){if(this._errors.length===1)throw this._summary=this._errors[0];this._errors.length>1&&(this._summary=new AggregateError(this._errors,to))}if(this._summary!==void 0)throw this._summary}}function disposeAll(eo){const to=new SafeBatchHandler;for(const ro of eo)to.run(()=>ro.dispose());to.summary("[disposeAll] Encountered errors while disposing"),to.cleanup()}class BatchDisposable{constructor(){zs(this,"_disposed");zs(this,"_disposables");this._disposed=!1,this._disposables=[]}get disposed(){return this._disposed}dispose(){if(!this._disposed){this._disposed=!0;try{disposeAll(this._disposables)}finally{this._disposables.length=0}}}registerDisposable(to){to.disposed||(this._disposed?to.dispose():this._disposables.push(to))}}class Disposable{constructor(to){zs(this,"_onDispose");zs(this,"_disposed");this._onDispose=to,this._disposed=!1}get disposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._onDispose())}}function isDisposable(eo){return eo===null||typeof eo!="object"?!1:typeof Reflect.get(eo,"dispose")=="function"&&typeof Reflect.get(eo,"disposed")=="boolean"}const noop$1=()=>{};class Subscriber{constructor(to){zs(this,"_onDispose");zs(this,"_onNext");zs(this,"_disposed");this._onDispose=(to==null?void 0:to.onDispose)??noop$1,this._onNext=to.onNext,this._disposed=!1}get disposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._onDispose())}next(to,ro){this._disposed||this._onNext(to,ro)}}const noopUnsubscribable$1={unsubscribe:()=>{}};class Subscribers{constructor(to={}){zs(this,"ARRANGE_THRESHOLD");zs(this,"_disposed");zs(this,"_items");zs(this,"_subscribingCount");this.ARRANGE_THRESHOLD=to.ARRANGE_THRESHOLD??16,this._disposed=!1,this._items=[],this._subscribingCount=0}get size(){return this._subscribingCount}get disposed(){return this._disposed}dispose(){if(this._disposed)return;this._disposed=!0;const to=new SafeBatchHandler,ro=this._items;for(let no=0;nooo.subscriber.dispose()))}ro.length=0,this._subscribingCount=0,to.summary("Encountered errors while disposing."),to.cleanup()}notify(to,ro){if(this._disposed)return;const no=new SafeBatchHandler,oo=this._items;for(let io=0,so=oo.length;ioao.subscriber.next(to,ro))}no.summary("Encountered errors while notifying subscribers."),no.cleanup()}subscribe(to){if(to.disposed)return noopUnsubscribable$1;if(this.disposed)return to.dispose(),noopUnsubscribable$1;const ro={subscriber:to,unsubscribed:!1};return this._items.push(ro),this._subscribingCount+=1,{unsubscribe:()=>{ro.unsubscribed||(ro.unsubscribed=!0,this._subscribingCount-=1,this._arrange())}}}_arrange(){const to=this._items;if(to.length>=this.ARRANGE_THRESHOLD&&this._subscribingCount*2<=to.length){const ro=[];for(let no=0;no{},noopUnsubscribable={unsubscribe:noop},noopUnobservable={unobserve:noop},isObservable=eo=>eo===null||typeof eo!="object"?!1:typeof Reflect.get(eo,"dispose")=="function"&&typeof Reflect.get(eo,"disposed")=="boolean"&&typeof Reflect.get(eo,"subscribe")=="function"&&typeof Reflect.get(eo,"equals")=="function"&&typeof Reflect.get(eo,"getSnapshot")=="function"&&typeof Reflect.get(eo,"next")=="function",defaultEquals=(eo,to)=>Object.is(eo,to);class Observable extends BatchDisposable{constructor(ro,no={}){super();zs(this,"equals");zs(this,"_delay");zs(this,"_subscribers");zs(this,"_value");zs(this,"_updateTick");zs(this,"_notifyTick");zs(this,"_lastNotifiedValue");zs(this,"_timer");const{equals:oo=defaultEquals}=no;this._delay=Math.max(0,Number(no.delay)||0),this._subscribers=new Subscribers,this._value=ro,this._updateTick=0,this._notifyTick=0,this._lastNotifiedValue=void 0,this._timer=void 0,this.equals=oo}dispose(){this.disposed||(super.dispose(),this._flush(),this._subscribers.dispose())}getSnapshot(){return this._value}next(ro,no){if(this.disposed){if((no==null?void 0:no.strict)??!0)throw new RangeError(`Don't update a disposed observable. value: ${String(ro)}.`);return}!((no==null?void 0:no.force)??!1)&&this.equals(ro,this._value)||(this._value=ro,this._updateTick+=1,this._notify())}subscribe(ro){if(ro.disposed)return noopUnsubscribable;const no=this._lastNotifiedValue,oo=this._value;return this.disposed?(ro.next(oo,no),ro.dispose(),noopUnsubscribable):(this._flush(),ro.next(oo,no),this._subscribers.subscribe(ro))}_flush(){this._notifyTick{try{this._notifyImmediate()}finally{this._timer=void 0}this._notify()},this._delay))}}_notifyImmediate(){const ro=this._lastNotifiedValue,no=this._value;this._lastNotifiedValue=no,this._notifyTick=this._updateTick,this._subscribers.notify(no,ro)}}const equals=(eo,to)=>eo===to;class Ticker extends Observable{constructor(to={}){const{start:ro=0,delay:no}=to;super(ro,{delay:no,equals})}tick(to){this.next(this._value+1,to)}observe(to,ro){if(this.disposed){if((ro==null?void 0:ro.strict)??!0)throw new RangeError("[Ticker.observe] the ticker has been disposed.");return noopUnobservable}if(to.disposed)return noopUnobservable;const no=new Subscriber({onNext:()=>this.tick()}),oo=to.subscribe(no),io=new Disposable(()=>{no.dispose(),oo.unsubscribe()});return this.registerDisposable(io),{unobserve:()=>io.dispose()}}}class Computed{constructor(to){zs(this,"_observable");zs(this,"getSnapshot",()=>this._observable.getSnapshot());zs(this,"getServerSnapshot",()=>this._observable.getSnapshot());zs(this,"subscribeStateChange",to=>{const ro=new Subscriber({onNext:()=>to()}),no=this._observable.subscribe(ro),oo=new Disposable(()=>{ro.dispose(),no.unsubscribe()});return this._observable.registerDisposable(oo),()=>oo.dispose()});this._observable=to}static fromObservables(to,ro,no){const oo=new Ticker;for(const lo of to)oo.observe(lo);const io=()=>{const lo=to.map(co=>co.getSnapshot());return ro(lo)},so=new Observable(io(),no);so.registerDisposable(oo);const ao=new Subscriber({onNext:()=>so.next(io())});return oo.subscribe(ao),new Computed(so)}get disposed(){return this._observable.disposed}dispose(){this._observable.disposed||this._observable.dispose()}registerDisposable(to){this._observable.registerDisposable(to)}subscribe(to){return this._observable.subscribe(to)}}class State extends Observable{constructor(){super(...arguments);zs(this,"getSnapshot",()=>super.getSnapshot());zs(this,"getServerSnapshot",()=>super.getSnapshot());zs(this,"setState",ro=>{const no=this.getSnapshot(),oo=ro(no);super.next(oo)});zs(this,"subscribeStateChange",ro=>{const no=new Subscriber({onNext:()=>ro()}),oo=super.subscribe(no),io=new Disposable(()=>{no.dispose(),oo.unsubscribe()});return this.registerDisposable(io),()=>io.dispose()})}}class ViewModel extends BatchDisposable{constructor(){super();zs(this,"_tickerMap");this._tickerMap=new Map}dispose(){if(!this.disposed){super.dispose();for(const ro of Reflect.ownKeys(this))if(typeof ro=="string"&&ro.endsWith("$")){const no=this[ro];isDisposable(no)&&no.dispose()}for(const ro of this._tickerMap.values())ro.ticker.dispose();this._tickerMap.clear()}}ticker(ro){const no=Array.from(new Set(ro)).sort(),oo=no.join("|");let io=this._tickerMap.get(oo);if(io===void 0){const so=new Ticker;io={keys:no,ticker:so},this.registerDisposable(so),this._tickerMap.set(oo,io);for(const ao of no){const lo=this[ao];if(!isObservable(lo)){console.warn("[ViewModel.ticker] not an observable, key:",ao,"val:",lo);continue}so.observe(lo)}}return io}}class ReactMarkdownViewModel extends ViewModel{constructor(to){super(),this.preferCodeWrap$=new State(!1);const{definitionMap:ro,rendererMap:no,showCodeLineno:oo,themeScheme:io}=to;this.definitionMap$=new State(ro),this.rendererMap$=new State(no),this.showCodeLineno$=new State(oo),this.themeScheme$=new State(io)}}function useSyncExternalStore$2(eo,to,ro){const no=to(),[{inst:oo},io]=reactExports.useState({inst:{value:no,getSnapshot:to}});return reactExports.useLayoutEffect(()=>{oo.value=no,oo.getSnapshot=to,checkIfSnapshotChanged(oo)&&io({inst:oo})},[eo,no,to]),reactExports.useEffect(()=>(checkIfSnapshotChanged(oo)&&io({inst:oo}),eo(()=>{checkIfSnapshotChanged(oo)&&io({inst:oo})})),[eo]),reactExports.useDebugValue(no),no}function checkIfSnapshotChanged(eo){const to=eo.getSnapshot,ro=eo.value;try{const no=to();return!Object.is(ro,no)}catch{return!0}}function useSyncExternalStore$1(eo,to,ro){return to()}const canUseDOM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",shim=canUseDOM?useSyncExternalStore$2:useSyncExternalStore$1,builtin=reactExports.useSyncExternalStore,useSyncExternalStore=builtin||shim;function useStateValue(eo){const{getSnapshot:to,getServerSnapshot:ro,subscribeStateChange:no}=eo;return useSyncExternalStore(no,to,ro)}const NodesRenderer=eo=>{const{nodes:to}=eo,{viewmodel:ro}=useNodeRendererContext(),no=useStateValue(ro.rendererMap$);return!Array.isArray(to)||to.length<=0?jsxRuntimeExports.jsx(React.Fragment,{}):jsxRuntimeExports.jsx(NodesRendererInner,{nodes:to,rendererMap:no})};class NodesRendererInner extends React.Component{shouldComponentUpdate(to){const ro=this.props;return!lodashExports.isEqual(ro.nodes,to.nodes)||ro.rendererMap!==to.rendererMap}render(){const{nodes:to,rendererMap:ro}=this.props;return jsxRuntimeExports.jsx(React.Fragment,{children:to.map((no,oo)=>{const io=`${no.type}-${oo}`,so=ro[no.type]??ro._fallback;return jsxRuntimeExports.jsx(so,{...no},io)})})}}var TokenizerType;(function(eo){eo.BLOCK="block",eo.INLINE="inline"})(TokenizerType||(TokenizerType={}));var TokenizerPriority;(function(eo){eo[eo.ATOMIC=10]="ATOMIC",eo[eo.FENCED_BLOCK=10]="FENCED_BLOCK",eo[eo.CONTAINING_BLOCK=10]="CONTAINING_BLOCK",eo[eo.INTERRUPTABLE_BLOCK=2]="INTERRUPTABLE_BLOCK",eo[eo.IMAGES=4]="IMAGES",eo[eo.LINKS=3]="LINKS",eo[eo.CONTAINING_INLINE=2]="CONTAINING_INLINE",eo[eo.SOFT_INLINE=1]="SOFT_INLINE",eo[eo.FALLBACK=-1]="FALLBACK"})(TokenizerPriority||(TokenizerPriority={}));class BaseInlineTokenizer{constructor(to){zs(this,"type",TokenizerType.INLINE);zs(this,"name");zs(this,"priority");this.name=to.name,this.priority=to.priority}toString(){return this.name}}function*genFindDelimiter(eo){let to=-1,ro=null;for(;;){const[no,oo]=yield ro;to===oo&&(ro==null||ro.startIndex>=no)||(to=oo,ro=eo(no,oo))}}class BaseBlockTokenizer{constructor(to){zs(this,"type",TokenizerType.BLOCK);zs(this,"name");zs(this,"priority");this.name=to.name,this.priority=to.priority}extractPhrasingContentLines(to){return null}buildBlockToken(to,ro){return null}toString(){return this.name}}function calcStartPoint(eo,to){const{line:ro,column:no,offset:oo}=eo[to];return{line:ro,column:no,offset:oo}}function calcEndPoint(eo,to){const{line:ro,column:no,offset:oo}=eo[to];return{line:ro,column:no+1,offset:oo+1}}function calcPositionFromPhrasingContentLines(eo){const to=eo[0],ro=eo[eo.length-1];return{start:calcStartPoint(to.nodePoints,to.startIndex),end:calcEndPoint(ro.nodePoints,ro.endIndex-1)}}function mergeContentLinesFaithfully(eo,to=0,ro=eo.length){if(to>=ro||to<0||ro>eo.length)return[];const no=[];for(let oo=to;oo=ro||to<0||ro>eo.length)return[];for(let lo=to;lo+1=0;--ao){const lo=oo[ao];if(!isWhitespaceCharacter(lo.codePoint))break}for(let lo=so;lo<=ao;++lo)no.push(oo[lo]);return no}function encodeLinkDestination(eo){let to=eo;for(;;)try{const ro=decodeURIComponent(to);if(ro===to)break;to=ro}catch{break}return encodeURI(to)}function resolveLabelToIdentifier(eo){const to=eo.trim().replace(/\s+/gu," ").toLowerCase();return foldCase(to)}function resolveLinkLabelAndIdentifier(eo,to,ro){const no=calcStringFromNodePoints(eo,to,ro,!0);if(no.length<=0)return null;const oo=resolveLabelToIdentifier(no);return{label:no,identifier:oo}}function eatLinkLabel(eo,to,ro){let no=to+1;const oo=Math.min(no+1e3,ro);for(;noto;--ro){const no=eo[ro];if(no.firstNonWhitespaceIndexro?[]:eo.slice(to,ro+1)}const prefix$1="Invariant failed";function invariant(eo,to){if(!eo)throw new Error(prefix$1)}const createBlockContentProcessor=(eo,to)=>{const ro={_tokenizer:"root",nodeType:"root",position:{start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}},children:[]},no=[];no.push({hook:{isContainingBlock:!0},token:ro});let oo=0;const io=po=>{for(let go=oo;go>=0;--go){const vo=no[go];vo.token.position.end={...po}}},so=(po,go)=>{if(go.length<=0)return null;const vo=eo.filter(xo=>xo!==po),yo=createBlockContentProcessor(vo,to);for(const xo of go)yo.consume(xo);return yo},ao=()=>{const po=no.pop();if(po!=null){if(no.length>0){const go=no[no.length-1];if(po.hook.onClose!=null){const vo=po.hook.onClose(po.token);if(vo!=null)switch(vo.status){case"closingAndRollback":{const yo=so(po.hook,vo.lines);if(yo==null)break;const xo=yo.done();go.token.children.push(...xo.children);break}case"failedAndRollback":{go.token.children.pop();const yo=so(po.hook,vo.lines);if(yo==null)break;const xo=yo.done();go.token.children.push(...xo.children);break}}}}return oo>=no.length&&(oo=no.length-1),po}},lo=po=>{for(;no.length>po;)ao()},co=(po,go,vo)=>{lo(oo+1),no[oo].token.children.push(go),io(go.position.end),oo+=1,no.push({hook:po,token:go}),vo&&ao()},uo=(po,go,vo)=>{const yo=so(po,go);if(yo==null)return!1;const xo=yo.shallowSnapshot(),_o=xo[0];_o.token.children!=null&&vo.token.children.push(..._o.token.children),io(_o.token.position.end);for(let Eo=1;Eo{const{nodePoints:go,startIndex:vo,endIndex:yo}=po;let{firstNonWhitespaceIndex:xo,countOfPrecedeSpaces:_o,startIndex:Eo}=po;const So=()=>({nodePoints:go,startIndex:Eo,endIndex:yo,firstNonWhitespaceIndex:xo,countOfPrecedeSpaces:_o}),ko=(Do,$o)=>{if(invariant(Eo<=Do),$o){const Mo=calcEndPoint(go,Do-1);io(Mo)}if(Eo!==Do)for(Eo=Do,_o=0,xo=Do;xo{const{token:Mo}=no[oo],Po=Do.eatOpener($o,Mo);if(Po==null)return!1;invariant(Po.nextIndex>Eo,`[consumeNewOpener] The marker of the new data node cannot be empty. @@ -1826,7 +1826,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ?| |(?![\\s\\S])))+`,"m"),alias:ro,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(eo)[0]}}}});Object.defineProperty(Prism.languages.diff,"PREFIXES",{value:PREFIXES});Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m};Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];const keywords=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,classNamePrefix=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,className={pattern:RegExp(/(^|[^\w.])/.source+classNamePrefix+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};Prism.languages.java=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[className,{pattern:RegExp(/(^|[^\w.])/.source+classNamePrefix+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:className.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+classNamePrefix+/[A-Z]\w*\b/.source),lookbehind:!0,inside:className.inside}],keyword:keywords,function:[Prism.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/});Prism.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}});Prism.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":className,keyword:keywords,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+classNamePrefix+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:className.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+classNamePrefix+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:className.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return keywords.source})),lookbehind:!0,inside:{punctuation:/\./}}});Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});if(Prism.languages.markup){const eo=Prism.languages.markup;eo.tag.addInlined("script","javascript"),eo.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")}Prism.languages.js=Prism.languages.javascript;Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;const javascript=Prism.util.clone(Prism.languages.javascript),space$1=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,braces=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source;let spread=/(?:\{*\.{3}(?:[^{}]|)*\})/.source;function re$1(eo,to){const ro=eo.replace(//g,()=>space$1).replace(//g,()=>braces).replace(//g,()=>spread);return RegExp(ro,to)}spread=re$1(spread).source;Prism.languages.jsx=Prism.languages.extend("markup",javascript);const jsx=Prism.languages.jsx;jsx.tag.pattern=re$1(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source);jsx.tag.inside.tag.pattern=/^<\/?[^\s>/]*/;jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/;jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/;jsx.tag.inside.comment=javascript.comment;Prism.languages.insertBefore("inside","attr-name",{spread:{pattern:re$1(//.source),inside:Prism.languages.jsx}},jsx.tag);Prism.languages.insertBefore("inside","special-attr",{script:{pattern:re$1(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:Prism.languages.jsx}}},jsx.tag);const stringifyToken=function(eo){return eo?typeof eo=="string"?eo:typeof eo.content=="string"?eo.content:eo.content.map(stringifyToken).join(""):""},walkTokens=function(eo){const to=[];for(let ro=0;ro0&&to[to.length-1].tagName===stringifyToken(io[0].content[1])&&to.pop():io[io.length-1].content==="/>"||to.push({tagName:stringifyToken(io[0].content[1]),openedBraces:0}):to.length>0&&no.type==="punctuation"&&no.content==="{"?to[to.length-1].openedBraces+=1:to.length>0&&to[to.length-1].openedBraces>0&&no.type==="punctuation"&&no.content==="}"?to[to.length-1].openedBraces-=1:oo=!0}if((oo||typeof no=="string")&&to.length>0&&to[to.length-1].openedBraces===0){let io=stringifyToken(no);ro0&&(typeof eo[ro-1]=="string"||eo[ro-1].type==="plain-text")&&(io=stringifyToken(eo[ro-1])+io,eo.splice(ro-1,1),ro-=1),eo[ro]=new Prism.Token("plain-text",io,void 0,io)}typeof no!="string"&&no.content&&typeof no.content!="string"&&walkTokens(no.content)}};Prism.hooks.add("after-tokenize",function(eo){eo.language!=="jsx"&&eo.language!=="tsx"||walkTokens(eo.tokens)});Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/};const inner=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function createInline(eo){const to=eo.replace(//g,function(){return inner});return RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+to+")")}const tableCell=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,tableRow=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return tableCell}),tableLine=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;Prism.languages.markdown=Prism.languages.extend("markup",{});Prism.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:Prism.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+tableRow+tableLine+"(?:"+tableRow+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+tableRow+tableLine+")(?:"+tableRow+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(tableCell),inside:Prism.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+tableRow+")"+tableLine+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+tableRow+"$"),inside:{"table-header":{pattern:RegExp(tableCell),alias:"important",inside:Prism.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[[\]!:]|[<>]/},alias:"url"},bold:{pattern:createInline(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:createInline(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:createInline(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:createInline(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}});["url","bold","italic","strike"].forEach(function(eo){["url","bold","italic","strike","code-snippet"].forEach(function(to){if(eo!==to){const ro=Prism.languages.markdown;ro[eo].inside.content.inside[to]=ro[to]}})});Prism.hooks.add("after-tokenize",function(eo){if(eo.language!=="markdown"&&eo.language!=="md")return;function to(ro){if(!(!ro||typeof ro=="string"))for(let no=0,oo=ro.length;no",quot:'"'},fromCodePoint$1=String.fromCodePoint||String.fromCharCode;function textContent(eo){let to=eo.replace(tagPattern,"");return to=to.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(ro,no){if(no=no.toLowerCase(),no[0]==="#"){let oo;return no[1]==="x"?oo=parseInt(no.slice(2),16):oo=Number(no.slice(1)),fromCodePoint$1(oo)}else{const oo=KNOWN_ENTITY_NAMES[no];return oo||ro}}),to}Prism.languages.md=Prism.languages.markdown;Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}});Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]});Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/});Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}});Prism.languages.scss.atrule.inside.rest=Prism.languages.scss;Prism.languages.sass=Prism.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}});Prism.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}});delete Prism.languages.sass.atrule;const variable=/\$[-\w]+|#\{\$[-\w]+\}/,operator$1=[/[+*/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];Prism.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable,operator:operator$1}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable,operator:operator$1,important:Prism.languages.sass.important}}});delete Prism.languages.sass.property;delete Prism.languages.sass.important;Prism.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}});Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};const unit={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},number$1={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},inside$2={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|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|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit,number:number$1,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit,boolean:/\b(?:false|true)\b/,operator:[/~|[+!/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:number$1,punctuation:/[{}()[\];:,]/};inside$2.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:inside$2}};inside$2.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:inside$2}};Prism.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:inside$2}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:inside$2}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:inside$2}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:inside$2.interpolation}},rest:inside$2}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:inside$2.interpolation,comment:inside$2.comment,punctuation:/[{},]/}},func:inside$2.func,string:inside$2.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:inside$2.interpolation,punctuation:/[{}()[\];:.]/};Prism.languages.typescript=Prism.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/});Prism.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[{*]|$))/);delete Prism.languages.typescript.parameter;delete Prism.languages.typescript["literal-property"];const typeInside=Prism.languages.extend("typescript",{});delete typeInside["class-name"];Prism.languages.typescript["class-name"].inside=typeInside;Prism.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:typeInside}}}});Prism.languages.ts=Prism.languages.typescript;const typescript=Prism.util.clone(Prism.languages.typescript);Prism.languages.tsx=Prism.languages.extend("jsx",typescript);delete Prism.languages.tsx.parameter;delete Prism.languages.tsx["literal-property"];const tag$1=Prism.languages.tsx.tag;tag$1.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+tag$1.pattern.source+")",tag$1.pattern.flags);tag$1.lookbehind=!0;Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/};Prism.languages.vb=Prism.languages["visual-basic"];Prism.languages.vba=Prism.languages["visual-basic"];Prism.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};const anchorOrAlias=/[*&][^\s[\]{},]+/,tag=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,properties="(?:"+tag.source+"(?:[ ]+"+anchorOrAlias.source+")?|"+anchorOrAlias.source+"(?:[ ]+"+tag.source+")?)",plainKey=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,()=>/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source),string$2=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function createValuePattern(eo,to){const ro=(to||"").replace(/m/g,"")+"m",no=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return properties}).replace(/<>/g,function(){return eo});return RegExp(no,ro)}Prism.languages.yaml={scalar:{pattern:RegExp(/([-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return properties})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return properties}).replace(/<>/g,function(){return"(?:"+plainKey+"|"+string$2+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:createValuePattern(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:createValuePattern(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:createValuePattern(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:createValuePattern(string$2),lookbehind:!0,greedy:!0},number:{pattern:createValuePattern(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag,important:anchorOrAlias,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./};Prism.languages.yml=Prism.languages.yaml;const vscDarkTheme={plain:{color:"#d4d4d4",backgroundColor:"#1e1e1e"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment","punctuation"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin"],style:{color:"rgb(79, 193, 255)"}},{types:["number","variable","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["operator"],style:{color:"rgb(212, 212, 212)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["tag","changed","function","keyword"],style:{color:"rgb(86, 156, 214)"}},{types:["attr-name"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value"],style:{color:"rgb(206, 145, 120)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}}]},vscLightTheme={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},vars={border:`1px solid var(${TokenNames.colorBorderCodeLineno}, hsla(0deg, 0%, 80%, 0.8))`,highlightBackground:`var(${TokenNames.colorBgCodeHighlight}, hsla(30deg, 90%, 50%, 0.3))`,fontSizeCode:`var(${CommonTokenNames.fontSizeCode}, 14px)`,lineHeightCode:`var(${CommonTokenNames.lineHeightCode}, 1.6)`},classes$2={container:css({MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",display:"flex",alignItems:"stretch",overflow:"hidden",width:"100%",fontSize:vars.fontSizeCode,lineHeight:vars.lineHeightCode,padding:0,transition:"max-height 0.5s ease-in-out",tabSize:2,fontSmooth:"always",whiteSpace:"pre",wordBreak:"keep-all",wordSpacing:"normal",wordWrap:"normal"}),line:css({boxSizing:"border-box",display:"flex",minWidth:"fit-content",width:"100%",padding:"0 6px",letterSpacing:"inherit",fontSize:vars.fontSizeCode,lineHeight:vars.lineHeightCode,height:vars.lineHeightCode,overflowWrap:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"inherit",wordBreak:"inherit",wordSpacing:"inherit",wordWrap:"inherit"}),linenoLine:css({justifyContent:"flex-end",padding:"0 4px"}),highlightLine:css({background:vars.highlightBackground,borderColor:"transparent"}),lineno:css({flex:"0 0 auto",overflow:"hidden",boxSizing:"border-box",padding:"0.5rem 0",cursor:"default",fontSize:vars.fontSizeCode,lineHeight:vars.lineHeightCode,userSelect:"none",textAlign:"right",borderRight:vars.border}),codes:css({flex:"1 1 auto",overflow:"overlay",boxSizing:"border-box",padding:"0.5rem 0",fontSize:vars.fontSizeCode,lineHeight:vars.lineHeightCode}),codeWrapper:css({minWidth:"100%",width:"fit-content"}),codeLine:css({boxSizing:"border-box",padding:"0 12px"})},languageMap={js:"javascript",ts:"typescript"},themeToDict=(eo,to)=>{eo=languageMap[eo]??eo;const{plain:ro}=to,no=Object.create(null),oo=to.styles.reduce((io,so)=>{const{types:ao,style:lo,languages:co}=so;if(co&&!co.includes(eo))return io;for(const uo of ao){const fo={...io[uo],...lo};io[uo]=fo}return io},no);return oo.root=ro,oo.plain={...ro,backgroundColor:void 0},oo},newlineRegex=/\r\n|\r|\n/,normalizeEmptyLines=eo=>{eo.length===0?eo.push({types:["plain"],content:` `,empty:!0}):eo.length===1&&eo[0].content===""&&(eo[0].content=` -`,eo[0].empty=!0)},appendTypes=(eo,to)=>{const ro=eo.length;return ro>0&&eo[ro-1]===to?eo:eo.concat(to)},normalizeTokens=eo=>{const to=[[]],ro=[eo],no=[0],oo=[eo.length];let io=[];const so=[io];for(let ao=0;ao>-1;--ao){for(let lo=0;(lo=no[ao]++)0?uo:["plain"],co=ho):(uo=appendTypes(uo,ho.type),ho.alias&&(uo=appendTypes(uo,ho.alias)),co=ho.content),typeof co!="string"){ao+=1,to.push(uo),ro.push(co),no.push(0),oo.push(co.length);continue}const po=co.split(newlineRegex),go=po.length;io.push({types:uo,content:po[0]});for(let vo=1;vo{var io,so;const no=ro.target;if(no==null)return;const{scrollTop:oo}=no;(so=(io=this.linenoRef.current)==null?void 0:io.scrollTo)==null||so.call(io,0,oo)});const no=themeToDict(ro.language,ro.theme),oo=this.tokenize(ro.code,ro.language),io=ro.showLineno?`${Math.max(2,String(oo.length).length)*1.1}em`:void 0;this.state={linenoWidth:io,themeDict:no,tokens:oo},this.linenoRef={current:null}}shouldComponentUpdate(ro,no){const oo=this.props,io=this.state;return io.linenoWidth!==no.linenoWidth||io.themeDict!==no.themeDict||io.tokens!==no.tokens||oo.code!==ro.code||oo.codesRef!==ro.codesRef||oo.collapsed!==ro.collapsed||oo.language!==ro.language||oo.maxLines!==ro.maxLines||oo.showLineno!==ro.showLineno||!isEqual(oo.theme,ro.theme)||!isEqual(oo.highlightLinenos,ro.highlightLinenos)}render(){const{linenoRef:ro,onScroll:no}=this,{codesRef:oo,collapsed:io,highlightLinenos:so,language:ao,maxLines:lo,showLineno:co=!0}=this.props,{linenoWidth:uo,tokens:fo}=this.state,ho=fo.length,po=lo>0?Math.min(lo,ho):ho,go={...this.state.themeDict.root,backgroundColor:"none",...io?{maxHeight:0}:{maxHeight:`calc(calc(${vars.lineHeightCode} * ${po+.8}) + 6px)`,minHeight:"100%"}};return React.createElement("div",{className:cx(classes$2.container,ao?`prism-code language-${ao}`:"prism-code"),style:go},co&&React.createElement("div",{key:"linenos",className:classes$2.lineno,style:{width:uo},ref:ro},React.createElement(HighlightLinenos,{countOfLines:ho,highlightLinenos:so})),React.createElement("div",{key:"codes",ref:oo,className:classes$2.codes,onScroll:no},React.createElement("div",{className:classes$2.codeWrapper},fo.map((vo,yo)=>{const xo=so.includes(yo+1),_o=this.getLineProps({line:vo});return React.createElement("div",{..._o,key:yo,className:cx(classes$2.line,classes$2.codeLine,xo&&classes$2.highlightLine,_o.className)},vo.map((Eo,So)=>React.createElement("span",{...this.getTokenProps({token:Eo}),key:So})))}))))}componentDidMount(){var ro,no;(no=(ro=this.props).onLinenoWidthChange)==null||no.call(ro,this.state.linenoWidth)}componentDidUpdate(ro,no){var ao,lo;const oo=this.props,io=this.state,so=oo.language!==ro.language||!isEqual(oo.theme,ro.theme)?themeToDict(oo.language,oo.theme):io.themeDict;if(oo.code!==ro.code||oo.language!==ro.language||so!==no.themeDict){const co=this.tokenize(oo.code,oo.language),uo=oo.showLineno?`${Math.max(2,String(co.length).length)*1.1}em`:void 0;this.setState({linenoWidth:uo,themeDict:so,tokens:co})}io.linenoWidth!==no.linenoWidth&&((lo=(ao=this.props).onLinenoWidthChange)==null||lo.call(ao,io.linenoWidth))}tokenize(ro,no){const oo=no?Prism.languages[no]:void 0;if(oo){const io={code:ro,grammar:oo,language:no,tokens:[]};return Prism.hooks.run("before-tokenize",io),io.tokens=Prism.tokenize(io.code,io.grammar),Prism.hooks.run("after-tokenize",io),normalizeTokens(io.tokens)}else return normalizeTokens([ro])}getLineProps(ro){const{themeDict:no}=this.state,{key:oo,className:io,style:so,line:ao,...lo}=ro,co={...lo,className:"token-line",style:void 0,key:void 0};return no!==void 0&&(co.style=no.plain),so!==void 0&&(co.style=co.style!==void 0?{...co.style,...so}:so),oo!==void 0&&(co.key=oo),io&&(co.className+=` ${io}`),co}getStyleForToken({types:ro,empty:no}){const{themeDict:oo}=this.state,io=ro.length;if(oo===void 0)return;if(io===1&&ro[0]==="plain")return no?{display:"inline-block"}:void 0;if(io===1&&!no)return oo[ro[0]];const so=no?{display:"inline-block"}:{};for(const ao of ro){const lo=oo[ao];Object.assign(so,lo)}return so}getTokenProps(ro){const{key:no,className:oo,style:io,token:so,...ao}=ro,lo={...ao,className:`token ${so.types.join(" ")}`,children:so.content,style:this.getStyleForToken(so),key:void 0};return io!==void 0&&(lo.style=lo.style!==void 0?{...lo.style,...io}:io),no!==void 0&&(lo.key=no),oo&&(lo.className+=` ${oo}`),lo}}zs(HighlightContent,"displayName","HighlightContent"),zs(HighlightContent,"propTypes",{code:PropTypes.string.isRequired,codesRef:PropTypes.any,collapsed:PropTypes.bool.isRequired,language:PropTypes.string.isRequired,maxLines:PropTypes.number.isRequired,showLineno:PropTypes.bool.isRequired,theme:PropTypes.object.isRequired,highlightLinenos:PropTypes.array.isRequired,onLinenoWidthChange:PropTypes.func});class CodeHighlighter extends React.PureComponent{render(){const{lang:to,value:ro,darken:no=!0,highlightLinenos:oo=[],maxLines:io=-1,collapsed:so=!1,showLineNo:ao=!0,codesRef:lo,onLinenoWidthChange:co}=this.props,uo=this.props.theme??(no?vscDarkTheme:vscLightTheme);return React.createElement(HighlightContent,{code:ro,codesRef:lo,collapsed:so,highlightLinenos:oo,language:to??"",maxLines:io,showLineno:ao,theme:uo,onLinenoWidthChange:co})}}zs(CodeHighlighter,"displayName","YozoraCodeHighlighter"),zs(CodeHighlighter,"propTypes",{codesRef:PropTypes.any,collapsed:PropTypes.bool,darken:PropTypes.bool,highlightLinenos:PropTypes.arrayOf(PropTypes.number),lang:PropTypes.string,maxLines:PropTypes.number,onLinenoWidthChange:PropTypes.func,showLineNo:PropTypes.bool,theme:PropTypes.any,value:PropTypes.string.isRequired});const CopyButton=eo=>{const{className:to,delay:ro=1500,calcContentForCopy:no}=eo,[oo,io]=React.useState(0),so=useStyles$i(),ao=oo!==0,lo=()=>{if(oo===0){io(1);try{const co=no();copy$2(co),io(2)}catch{io(3)}}};return React.useEffect(()=>{if(oo===2||oo===3){const co=setTimeout(()=>io(0),ro);return()=>{co&&clearTimeout(co)}}},[oo,ro]),jsxRuntimeExports.jsx(Button$2,{appearance:"transparent",className:mergeClasses(so.copyButton,to),disabled:ao,as:"button",icon:oo===0?jsxRuntimeExports.jsx(Copy20Regular,{}):jsxRuntimeExports.jsx(CopyArrowRight20Regular,{}),onClick:lo})},useStyles$i=makeStyles({copyButton:{cursor:"pointer"}});class CodeRendererInner extends React.PureComponent{constructor(){super(...arguments),this.calcContentForCopy=()=>this.props.value}render(){const{calcContentForCopy:to}=this,{darken:ro,lang:no,value:oo,preferCodeWrap:io,showCodeLineno:so}=this.props;return jsxRuntimeExports.jsxs("code",{className:codeCls,"data-wrap":io,children:[jsxRuntimeExports.jsx(CodeHighlighter,{lang:no,value:oo,collapsed:!1,showLineNo:so&&!io,darken:ro}),jsxRuntimeExports.jsx("div",{className:copyBtnCls,children:jsxRuntimeExports.jsx(CopyButton,{calcContentForCopy:to})})]})}}const copyBtnCls=mergeStyles$1({position:"absolute",right:"4px",top:"4px",display:"none"}),codeCls=mergeStyles$1(astClasses.code,{position:"relative",display:"block",boxSizing:"border-box",borderRadius:"4px",margin:"0px 0px 1.25em 0px",backgroundColor:"var(--colorBgCode)",[`&:hover > .${copyBtnCls}`]:{display:"inline-block"},'&&[data-wrap="true"] > div':{whiteSpace:"pre-wrap",wordBreak:"keep-all"}}),CodeRenderer=eo=>{const{lang:to}=eo,ro=eo.value.replace(/[\r\n]+$/,""),{viewmodel:no}=useNodeRendererContext(),oo=useStateValue(no.preferCodeWrap$),io=useStateValue(no.showCodeLineno$),ao=useStateValue(no.themeScheme$)==="darken";return jsxRuntimeExports.jsx(CodeRendererInner,{darken:ao,lang:to??"text",value:ro,preferCodeWrap:oo,showCodeLineno:io})};class DeleteRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return jsxRuntimeExports.jsx("del",{className:cls$9,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const cls$9=mergeStyles$1(astClasses.delete,{marginRight:"4px",color:"var(--colorDelete)",fontStyle:"italic",textDecoration:"line-through"});class EmphasisRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return jsxRuntimeExports.jsx("em",{className:cls$8,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const cls$8=mergeStyles$1(astClasses.emphasis,{fontStyle:"italic",margin:"0 6px 0 2px"});class HeadingRenderer extends React.Component{shouldComponentUpdate(to){const ro=this.props;return ro.depth!==to.depth||ro.identifier!==to.identifier||ro.children!==to.children||ro.linkIcon!==to.linkIcon}render(){const{depth:to,identifier:ro,children:no,linkIcon:oo="¶"}=this.props,io=ro==null?void 0:encodeURIComponent(ro),so="h"+to,ao=so,lo=mergeStyles$1(astClasses.heading,classes$1.heading,classes$1[so]);return jsxRuntimeExports.jsxs(ao,{id:io,className:lo,children:[jsxRuntimeExports.jsx("p",{className:classes$1.content,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:no})}),ro&&jsxRuntimeExports.jsx("a",{className:classes$1.anchor,href:"#"+io,children:oo})]})}}const anchorCls=mergeStyles$1({flex:"0 0 3rem",paddingLeft:"0.5rem",color:"var(--colorLink)",opacity:0,transition:"color 0.2s ease-in-out, opacity 0.2s ease-in-out",userSelect:"none",textDecoration:"none","> svg":{overflow:"hidden",display:"inline-block",verticalAlign:"middle",fill:"currentColor"}}),classes$1=mergeStyleSets({heading:{display:"flex",alignItems:"center",justifyContent:"flex-start",padding:"0px",margin:"0px 0px 1.25em 0px",marginBottom:"1em",lineHeight:"1.25",fontFamily:"var(--fontFamilyHeading)",color:"var(--colorHeading)",[`&:active .${anchorCls}`]:{opacity:.8,color:"var(--colorLinkActive)"},[`&&:hover .${anchorCls}`]:{opacity:.8,color:"var(--colorLinkHover)"}},anchor:anchorCls,content:{flex:"0 1 auto",minWidth:0,margin:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"pre-wrap",lineHeight:"1.7"},h1:{padding:"0.3rem 0",borderBottom:"1px solid var(--colorBorderHeading)",fontSize:"2rem",fontStyle:"normal",fontWeight:500},h2:{padding:"0.3rem 0",borderBottom:"1px solid var(--colorBorderHeading)",fontSize:"1.5rem",fontStyle:"normal",fontWeight:500,marginBottom:"0.875rem"},h3:{fontSize:"1.25rem",fontStyle:"normal",fontWeight:500},h4:{fontSize:"1rem",fontStyle:"normal",fontWeight:500},h5:{fontSize:"0.875rem",fontStyle:"normal",fontWeight:500},h6:{fontSize:"0.85rem",fontStyle:"normal",fontWeight:500}});class ImageRendererInner extends React.Component{shouldComponentUpdate(to){const ro=this.props;return ro.src!==to.src||ro.alt!==to.alt||ro.title!==to.title||ro.srcSet!==to.srcSet||ro.sizes!==to.sizes||ro.loading!==to.loading||ro.className!==to.className}render(){const{src:to,alt:ro,title:no,srcSet:oo,sizes:io,loading:so,className:ao}=this.props;return jsxRuntimeExports.jsxs("figure",{className:`${ao} ${cls$7}`,children:[jsxRuntimeExports.jsx("img",{alt:ro,src:to,title:no,srcSet:oo,sizes:io,loading:so}),no&&jsxRuntimeExports.jsx("figcaption",{children:no})]})}}const cls$7=mergeStyles$1({boxSizing:"border-box",maxWidth:"80%",display:"flex",flexDirection:"column",alignItems:"center",margin:0,"> img":{flex:"1 0 auto",boxSizing:"border-box",maxWidth:"100%",border:"1px solid var(--colorBorderImage)",boxShadow:"0 0 20px 1px rgba(126, 125, 150, 0.6)"},"> figcaption":{textAlign:"center",fontStyle:"italic",fontSize:"1em",color:"var(--colorImageTitle)"}}),ImageRenderer=eo=>{const{url:to,alt:ro,title:no,srcSet:oo,sizes:io,loading:so}=eo;return jsxRuntimeExports.jsx(ImageRendererInner,{alt:ro,src:to,title:no,srcSet:oo,sizes:io,loading:so,className:astClasses.image})},ImageReferenceRenderer=eo=>{const{viewmodel:to}=useNodeRendererContext(),ro=useStateValue(to.definitionMap$),{alt:no,srcSet:oo,sizes:io,loading:so}=eo,ao=ro[eo.identifier],lo=(ao==null?void 0:ao.url)??"",co=ao==null?void 0:ao.title;return jsxRuntimeExports.jsx(ImageRendererInner,{alt:no,src:lo,title:co,srcSet:oo,sizes:io,loading:so,className:astClasses.imageReference})};class InlineCodeRenderer extends React.Component{shouldComponentUpdate(to){return this.props.value!==to.value}render(){return jsxRuntimeExports.jsx("code",{className:cls$6,children:this.props.value})}}const cls$6=mergeStyles$1(astClasses.inlineCode,{padding:"1px 4px",borderRadius:"4px",margin:0,background:"hsla(210deg, 15%, 60%, 0.15)",lineHeight:"1.375",color:"var(--colorInlineCode)",fontFamily:"var(--fontFamilyCode)",fontSize:"min(1rem, 18px)",fontWeight:500});class LinkRendererInner extends React.Component{shouldComponentUpdate(to){const ro=this.props;return ro.url!==to.url||ro.title!==to.title||ro.childNodes!==to.childNodes||ro.className!==to.className}render(){const{url:to,title:ro,childNodes:no,className:oo}=this.props;return jsxRuntimeExports.jsx("a",{className:mergeStyles$1(cls$5,oo),href:to,title:ro,rel:"noopener, noreferrer",target:"_blank",children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:no})})}}const cls$5=mergeStyles$1({padding:"0.2rem 0",color:"var(--colorLink)",textDecoration:"none","&:active":{color:"var(--colorLinkActive)"},"&&:hover":{color:"var(--colorLinkHover)",textDecoration:"underline"},"&:visited":{color:"var(--colorLinkVisited)"}}),LinkRenderer=eo=>{const{url:to,title:ro,children:no}=eo;return jsxRuntimeExports.jsx(LinkRendererInner,{url:to,title:ro,childNodes:no,className:astClasses.link})},LinkReferenceRenderer=eo=>{const{viewmodel:to}=useNodeRendererContext(),no=useStateValue(to.definitionMap$)[eo.identifier],oo=(no==null?void 0:no.url)??"",io=no==null?void 0:no.title;return jsxRuntimeExports.jsx(LinkRendererInner,{url:oo,title:io,childNodes:eo.children,className:astClasses.linkReference})};class ListRenderer extends React.Component{shouldComponentUpdate(to){const ro=this.props;return ro.ordered!==to.ordered||ro.orderType!==to.orderType||ro.start!==to.start||ro.children!==to.children}render(){const{ordered:to,orderType:ro,start:no,children:oo}=this.props;return to?jsxRuntimeExports.jsx("ol",{className:cls$4,type:ro,start:no,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:oo})}):jsxRuntimeExports.jsx("ul",{className:cls$4,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:oo})})}}const cls$4=mergeStyles$1(astClasses.list,{padding:"0px",margin:"0 0 1em 2em",lineHeight:"2","> :last-child":{marginBottom:"0px"}});class ListItemRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return jsxRuntimeExports.jsx("li",{className:cls$3,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const cls$3=mergeStyles$1(astClasses.listItem,{position:"relative",padding:0,margin:0,"> :last-child":{marginBottom:0}});class ParagraphRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return to.some(no=>no.type===ImageType$1||no.type===ImageReferenceType)?jsxRuntimeExports.jsx("div",{className:paragraphDisplayCls,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})}):jsxRuntimeExports.jsx("p",{className:paragraphCls,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const paragraphCls=mergeStyles$1(astClasses.paragraph,{overflow:"hidden",padding:0,margin:"0px 0px 1.25em 0px",marginBottom:"1em",lineHeight:"1.8",hyphens:"auto",wordBreak:"normal",letterSpacing:"1px",overflowWrap:"break-word","> :last-child":{marginBottom:0}}),paragraphDisplayCls=mergeStyles$1(paragraphCls,{display:"flex",alignItems:"center",justifyContent:"center",padding:"1rem 0",margin:0});class StrongRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return jsxRuntimeExports.jsx("strong",{className:cls$2,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const cls$2=mergeStyles$1(astClasses.strong,{fontWeight:600});class TableRenderer extends React.Component{shouldComponentUpdate(to){const ro=this.props;return!isEqual(ro.columns,to.columns)||!isEqual(ro.children,to.children)}render(){const{columns:to,children:ro}=this.props,no=to.map(so=>so.align??void 0),[oo,...io]=ro.map(so=>so.children.map((ao,lo)=>jsxRuntimeExports.jsx(NodesRenderer,{nodes:ao.children},lo)));return jsxRuntimeExports.jsxs("table",{className:cls$1,children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsx("tr",{children:oo.map((so,ao)=>jsxRuntimeExports.jsx(Th,{align:no[ao],children:so},ao))})}),jsxRuntimeExports.jsx("tbody",{children:io.map((so,ao)=>jsxRuntimeExports.jsx("tr",{children:so.map((lo,co)=>jsxRuntimeExports.jsx("td",{align:no[co],children:lo},co))},ao))})]})}}class Th extends React.Component{constructor(to){super(to),this.ref={current:null}}shouldComponentUpdate(to){const ro=this.props;return ro.align!==to.align||ro.children!==to.children}render(){const{align:to,children:ro}=this.props;return jsxRuntimeExports.jsx("th",{ref:this.ref,align:to,children:ro})}componentDidMount(){const to=this.ref.current;to&&to.setAttribute("title",to.innerText)}componentDidUpdate(){const to=this.ref.current;to&&to.setAttribute("title",to.innerText)}}const cls$1=mergeStyles$1(astClasses.table,{display:"block",overflow:"auto",width:"max-content",maxWidth:"100%",padding:0,borderCollapse:"collapse",borderRadius:"6px",borderSpacing:"0px",border:"1px solid var(--colorBorderTable)",margin:"0 auto 1.25em",lineHeight:"1.6","> thead":{backgroundColor:"var(--colorBgTableHead)",borderBottom:"1px solid #f0f0f0",th:{padding:"0.5rem 1rem",borderLeft:"1px solid var(--colorBorderTable)",wordBreak:"normal",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&:first-child":{borderLeft:"none"}}},"> tbody":{tr:{borderTop:"1px solid var(--colorBorderTable)",backgroundColor:"var(--colorBgTableOddRow)"},"tr:nth-child(2n)":{backgroundColor:"var(--colorBgTableEvenRow)"},td:{padding:"0.5rem 1rem",borderLeft:"1px solid var(--colorBorderTable)","&:first-child":{borderLeft:"none"}}}});class TextRenderer extends React.Component{shouldComponentUpdate(to){return this.props.value!==to.value}render(){return jsxRuntimeExports.jsx(React.Fragment,{children:this.props.value})}}class ThematicBreakRenderer extends React.Component{shouldComponentUpdate(){return!1}render(){return jsxRuntimeExports.jsx("hr",{className:cls})}}const cls=mergeStyles$1(astClasses.thematicBreak,{boxSizing:"content-box",display:"block",height:0,width:"100%",padding:0,border:0,borderBottom:"1px solid #dadada",outline:0,margin:"1.5em 0px"});function buildNodeRendererMap(eo){if(eo==null)return defaultNodeRendererMap;let to=!1;const ro={};for(const[no,oo]of Object.entries(eo))oo&&oo!==defaultNodeRendererMap[no]&&(to=!0,ro[no]=oo);return to?{...defaultNodeRendererMap,...ro}:defaultNodeRendererMap}const defaultNodeRendererMap={[BlockquoteType]:BlockquoteRenderer,[BreakType]:BreakRenderer,[CodeType]:CodeRenderer,[DefinitionType]:()=>null,[DeleteType]:DeleteRenderer,[EmphasisType]:EmphasisRenderer,[HeadingType]:HeadingRenderer,[HtmlType]:()=>null,[ImageType$1]:ImageRenderer,[ImageReferenceType]:ImageReferenceRenderer,[InlineCodeType]:InlineCodeRenderer,[LinkType]:LinkRenderer,[LinkReferenceType]:LinkReferenceRenderer,[ListType]:ListRenderer,[ListItemType]:ListItemRenderer,[ParagraphType$1]:ParagraphRenderer,[StrongType]:StrongRenderer,[TableType]:TableRenderer,[TextType$1]:TextRenderer,[ThematicBreakType]:ThematicBreakRenderer,_fallback:function eo(to,ro){return console.warn(`Cannot find render for \`${to.type}\` type node with key \`${ro}\`:`,to),null}},ReactMarkdown=eo=>{const{presetDefinitionMap:to,customizedRendererMap:ro,preferCodeWrap:no=!1,showCodeLineno:oo=!0,text:io,themeScheme:so="lighten",className:ao,style:lo}=eo,co=React.useMemo(()=>parser$1.parse(io),[io]),uo=React.useMemo(()=>calcDefinitionMap(co).definitionMap,[co]),[fo]=React.useState(()=>new ReactMarkdownViewModel({definitionMap:{...to,...uo},rendererMap:buildNodeRendererMap(ro),preferCodeWrap:no,showCodeLineno:oo,themeScheme:so})),ho=React.useMemo(()=>({viewmodel:fo}),[fo]),po=mergeClasses(rootCls,so==="darken"&&astClasses.rootDarken,ao);return React.useEffect(()=>{fo.preferCodeWrap$.next(no)},[fo,no]),React.useEffect(()=>{fo.showCodeLineno$.next(oo)},[fo,oo]),React.useEffect(()=>{fo.themeScheme$.next(so)},[fo,so]),jsxRuntimeExports.jsx("div",{className:po,style:lo,children:jsxRuntimeExports.jsx(NodeRendererContextType.Provider,{value:ho,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:co.children})})})},rootCls=mergeStyles$1(astClasses.root,{wordBreak:"break-all",userSelect:"unset",[astClasses.listItem]:{[`> ${astClasses.list}`]:{marginLeft:"1.2em"}},"> :last-child":{marginBottom:0}}),BasicViewer=({styles:eo,showEmpty:to,emptyRender:ro,previewRender:no,rawRender:oo,headerRender:io})=>{const so=useClasses$i(),[ao,lo]=reactExports.useState("preview"),co=reactExports.useCallback(fo=>{lo(fo)},[]),uo=useLocStrings();return to?ro?ro():jsxRuntimeExports.jsx(MessageBar,{intent:"info",children:uo["No content"]}):jsxRuntimeExports.jsxs("div",{className:eo==null?void 0:eo.root,children:[oo&&jsxRuntimeExports.jsxs("div",{className:so.header,children:[jsxRuntimeExports.jsx("div",{style:{flex:1,overflow:"hidden"},children:io==null?void 0:io()}),jsxRuntimeExports.jsx("div",{className:so.groupWrapper,children:jsxRuntimeExports.jsxs("div",{className:so.buttonGroup,children:[jsxRuntimeExports.jsx(Button$2,{value:"preview",size:"small",appearance:ao==="preview"?void 0:"transparent",onClick:()=>co("preview"),children:uo.Preview}),jsxRuntimeExports.jsx(Button$2,{value:"raw",size:"small",appearance:ao==="raw"?void 0:"transparent",onClick:()=>co("raw"),children:uo.Raw})]})})]}),ao==="preview"||!oo?no():null,ao==="raw"&&oo?oo():null]})},useClasses$i=makeStyles({header:{display:"flex",alignItems:"center",marginBottom:"12px"},groupWrapper:{display:"flex",flexDirection:"row-reverse"},buttonGroup:{display:"inline-flex",...shorthands.borderRadius("5px"),backgroundColor:tokens.colorNeutralBackground5}}),RawMarkdownContent=({content:eo,className:to,defaultHeight:ro,minHeight:no,maxHeight:oo})=>{const io=useIsDark(),so=reactExports.useRef(null),[ao,lo]=reactExports.useState(ro||100),co=()=>{var po;const uo=(po=so.current)==null?void 0:po.getValue().split(` +`,eo[0].empty=!0)},appendTypes=(eo,to)=>{const ro=eo.length;return ro>0&&eo[ro-1]===to?eo:eo.concat(to)},normalizeTokens=eo=>{const to=[[]],ro=[eo],no=[0],oo=[eo.length];let io=[];const so=[io];for(let ao=0;ao>-1;--ao){for(let lo=0;(lo=no[ao]++)0?uo:["plain"],co=ho):(uo=appendTypes(uo,ho.type),ho.alias&&(uo=appendTypes(uo,ho.alias)),co=ho.content),typeof co!="string"){ao+=1,to.push(uo),ro.push(co),no.push(0),oo.push(co.length);continue}const po=co.split(newlineRegex),go=po.length;io.push({types:uo,content:po[0]});for(let vo=1;vo{var io,so;const no=ro.target;if(no==null)return;const{scrollTop:oo}=no;(so=(io=this.linenoRef.current)==null?void 0:io.scrollTo)==null||so.call(io,0,oo)});const no=themeToDict(ro.language,ro.theme),oo=this.tokenize(ro.code,ro.language),io=ro.showLineno?`${Math.max(2,String(oo.length).length)*1.1}em`:void 0;this.state={linenoWidth:io,themeDict:no,tokens:oo},this.linenoRef={current:null}}shouldComponentUpdate(ro,no){const oo=this.props,io=this.state;return io.linenoWidth!==no.linenoWidth||io.themeDict!==no.themeDict||io.tokens!==no.tokens||oo.code!==ro.code||oo.codesRef!==ro.codesRef||oo.collapsed!==ro.collapsed||oo.language!==ro.language||oo.maxLines!==ro.maxLines||oo.showLineno!==ro.showLineno||!isEqual(oo.theme,ro.theme)||!isEqual(oo.highlightLinenos,ro.highlightLinenos)}render(){const{linenoRef:ro,onScroll:no}=this,{codesRef:oo,collapsed:io,highlightLinenos:so,language:ao,maxLines:lo,showLineno:co=!0}=this.props,{linenoWidth:uo,tokens:fo}=this.state,ho=fo.length,po=lo>0?Math.min(lo,ho):ho,go={...this.state.themeDict.root,backgroundColor:"none",...io?{maxHeight:0}:{maxHeight:`calc(calc(${vars.lineHeightCode} * ${po+.8}) + 6px)`,minHeight:"100%"}};return React.createElement("div",{className:cx(classes$2.container,ao?`prism-code language-${ao}`:"prism-code"),style:go},co&&React.createElement("div",{key:"linenos",className:classes$2.lineno,style:{width:uo},ref:ro},React.createElement(HighlightLinenos,{countOfLines:ho,highlightLinenos:so})),React.createElement("div",{key:"codes",ref:oo,className:classes$2.codes,onScroll:no},React.createElement("div",{className:classes$2.codeWrapper},fo.map((vo,yo)=>{const xo=so.includes(yo+1),_o=this.getLineProps({line:vo});return React.createElement("div",{..._o,key:yo,className:cx(classes$2.line,classes$2.codeLine,xo&&classes$2.highlightLine,_o.className)},vo.map((Eo,So)=>React.createElement("span",{...this.getTokenProps({token:Eo}),key:So})))}))))}componentDidMount(){var ro,no;(no=(ro=this.props).onLinenoWidthChange)==null||no.call(ro,this.state.linenoWidth)}componentDidUpdate(ro,no){var ao,lo;const oo=this.props,io=this.state,so=oo.language!==ro.language||!isEqual(oo.theme,ro.theme)?themeToDict(oo.language,oo.theme):io.themeDict;if(oo.code!==ro.code||oo.language!==ro.language||so!==no.themeDict){const co=this.tokenize(oo.code,oo.language),uo=oo.showLineno?`${Math.max(2,String(co.length).length)*1.1}em`:void 0;this.setState({linenoWidth:uo,themeDict:so,tokens:co})}io.linenoWidth!==no.linenoWidth&&((lo=(ao=this.props).onLinenoWidthChange)==null||lo.call(ao,io.linenoWidth))}tokenize(ro,no){const oo=no?Prism.languages[no]:void 0;if(oo){const io={code:ro,grammar:oo,language:no,tokens:[]};return Prism.hooks.run("before-tokenize",io),io.tokens=Prism.tokenize(io.code,io.grammar),Prism.hooks.run("after-tokenize",io),normalizeTokens(io.tokens)}else return normalizeTokens([ro])}getLineProps(ro){const{themeDict:no}=this.state,{key:oo,className:io,style:so,line:ao,...lo}=ro,co={...lo,className:"token-line",style:void 0,key:void 0};return no!==void 0&&(co.style=no.plain),so!==void 0&&(co.style=co.style!==void 0?{...co.style,...so}:so),oo!==void 0&&(co.key=oo),io&&(co.className+=` ${io}`),co}getStyleForToken({types:ro,empty:no}){const{themeDict:oo}=this.state,io=ro.length;if(oo===void 0)return;if(io===1&&ro[0]==="plain")return no?{display:"inline-block"}:void 0;if(io===1&&!no)return oo[ro[0]];const so=no?{display:"inline-block"}:{};for(const ao of ro){const lo=oo[ao];Object.assign(so,lo)}return so}getTokenProps(ro){const{key:no,className:oo,style:io,token:so,...ao}=ro,lo={...ao,className:`token ${so.types.join(" ")}`,children:so.content,style:this.getStyleForToken(so),key:void 0};return io!==void 0&&(lo.style=lo.style!==void 0?{...lo.style,...io}:io),no!==void 0&&(lo.key=no),oo&&(lo.className+=` ${oo}`),lo}}zs(HighlightContent,"displayName","HighlightContent"),zs(HighlightContent,"propTypes",{code:PropTypes.string.isRequired,codesRef:PropTypes.any,collapsed:PropTypes.bool.isRequired,language:PropTypes.string.isRequired,maxLines:PropTypes.number.isRequired,showLineno:PropTypes.bool.isRequired,theme:PropTypes.object.isRequired,highlightLinenos:PropTypes.array.isRequired,onLinenoWidthChange:PropTypes.func});class CodeHighlighter extends React.PureComponent{render(){const{lang:to,value:ro,darken:no=!0,highlightLinenos:oo=[],maxLines:io=-1,collapsed:so=!1,showLineNo:ao=!0,codesRef:lo,onLinenoWidthChange:co}=this.props,uo=this.props.theme??(no?vscDarkTheme:vscLightTheme);return React.createElement(HighlightContent,{code:ro,codesRef:lo,collapsed:so,highlightLinenos:oo,language:to??"",maxLines:io,showLineno:ao,theme:uo,onLinenoWidthChange:co})}}zs(CodeHighlighter,"displayName","YozoraCodeHighlighter"),zs(CodeHighlighter,"propTypes",{codesRef:PropTypes.any,collapsed:PropTypes.bool,darken:PropTypes.bool,highlightLinenos:PropTypes.arrayOf(PropTypes.number),lang:PropTypes.string,maxLines:PropTypes.number,onLinenoWidthChange:PropTypes.func,showLineNo:PropTypes.bool,theme:PropTypes.any,value:PropTypes.string.isRequired});const CopyButton=eo=>{const{className:to,delay:ro=1500,calcContentForCopy:no}=eo,[oo,io]=React.useState(0),so=useStyles$i(),ao=oo!==0,lo=()=>{if(oo===0){io(1);try{const co=no();copy$2(co),io(2)}catch{io(3)}}};return React.useEffect(()=>{if(oo===2||oo===3){const co=setTimeout(()=>io(0),ro);return()=>{co&&clearTimeout(co)}}},[oo,ro]),jsxRuntimeExports.jsx(Button$2,{appearance:"transparent",className:mergeClasses(so.copyButton,to),disabled:ao,as:"button",icon:oo===0?jsxRuntimeExports.jsx(Copy20Regular,{}):jsxRuntimeExports.jsx(CopyArrowRight20Regular,{}),onClick:lo})},useStyles$i=makeStyles({copyButton:{cursor:"pointer"}});class CodeRendererInner extends React.PureComponent{constructor(){super(...arguments),this.calcContentForCopy=()=>this.props.value}render(){const{calcContentForCopy:to}=this,{darken:ro,lang:no,value:oo,preferCodeWrap:io,showCodeLineno:so}=this.props;return jsxRuntimeExports.jsxs("code",{className:codeCls,"data-wrap":io,children:[jsxRuntimeExports.jsx(CodeHighlighter,{lang:no,value:oo,collapsed:!1,showLineNo:so&&!io,darken:ro}),jsxRuntimeExports.jsx("div",{className:copyBtnCls,children:jsxRuntimeExports.jsx(CopyButton,{calcContentForCopy:to})})]})}}const copyBtnCls=mergeStyles$1({position:"absolute",right:"4px",top:"4px",display:"none"}),codeCls=mergeStyles$1(astClasses.code,{position:"relative",display:"block",boxSizing:"border-box",borderRadius:"4px",margin:"0px 0px 1.25em 0px",backgroundColor:"var(--colorBgCode)",[`&:hover > .${copyBtnCls}`]:{display:"inline-block"},'&&[data-wrap="true"] > div':{whiteSpace:"pre-wrap",wordBreak:"keep-all"}}),CodeRenderer=eo=>{const{lang:to}=eo,ro=eo.value.replace(/[\r\n]+$/,""),{viewmodel:no}=useNodeRendererContext(),oo=useStateValue(no.preferCodeWrap$),io=useStateValue(no.showCodeLineno$),ao=useStateValue(no.themeScheme$)==="darken";return jsxRuntimeExports.jsx(CodeRendererInner,{darken:ao,lang:to??"text",value:ro,preferCodeWrap:oo,showCodeLineno:io})};class DeleteRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return jsxRuntimeExports.jsx("del",{className:cls$9,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const cls$9=mergeStyles$1(astClasses.delete,{marginRight:"4px",color:"var(--colorDelete)",fontStyle:"italic",textDecoration:"line-through"});class EmphasisRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return jsxRuntimeExports.jsx("em",{className:cls$8,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const cls$8=mergeStyles$1(astClasses.emphasis,{fontStyle:"italic",margin:"0 6px 0 2px"});class HeadingRenderer extends React.Component{shouldComponentUpdate(to){const ro=this.props;return ro.depth!==to.depth||ro.identifier!==to.identifier||ro.children!==to.children||ro.linkIcon!==to.linkIcon}render(){const{depth:to,identifier:ro,children:no,linkIcon:oo="¶"}=this.props,io=ro==null?void 0:encodeURIComponent(ro),so="h"+to,ao=so,lo=mergeStyles$1(astClasses.heading,classes$1.heading,classes$1[so]);return jsxRuntimeExports.jsxs(ao,{id:io,className:lo,children:[jsxRuntimeExports.jsx("p",{className:classes$1.content,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:no})}),ro&&jsxRuntimeExports.jsx("a",{className:classes$1.anchor,href:"#"+io,children:oo})]})}}const anchorCls=mergeStyles$1({flex:"0 0 3rem",paddingLeft:"0.5rem",color:"var(--colorLink)",opacity:0,transition:"color 0.2s ease-in-out, opacity 0.2s ease-in-out",userSelect:"none",textDecoration:"none","> svg":{overflow:"hidden",display:"inline-block",verticalAlign:"middle",fill:"currentColor"}}),classes$1=mergeStyleSets({heading:{display:"flex",alignItems:"center",justifyContent:"flex-start",padding:"0px",margin:"0px 0px 1.25em 0px",marginBottom:"1em",lineHeight:"1.25",fontFamily:"var(--fontFamilyHeading)",color:"var(--colorHeading)",[`&:active .${anchorCls}`]:{opacity:.8,color:"var(--colorLinkActive)"},[`&&:hover .${anchorCls}`]:{opacity:.8,color:"var(--colorLinkHover)"}},anchor:anchorCls,content:{flex:"0 1 auto",minWidth:0,margin:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"pre-wrap",lineHeight:"1.7"},h1:{padding:"0.3rem 0",borderBottom:"1px solid var(--colorBorderHeading)",fontSize:"2rem",fontStyle:"normal",fontWeight:500},h2:{padding:"0.3rem 0",borderBottom:"1px solid var(--colorBorderHeading)",fontSize:"1.5rem",fontStyle:"normal",fontWeight:500,marginBottom:"0.875rem"},h3:{fontSize:"1.25rem",fontStyle:"normal",fontWeight:500},h4:{fontSize:"1rem",fontStyle:"normal",fontWeight:500},h5:{fontSize:"0.875rem",fontStyle:"normal",fontWeight:500},h6:{fontSize:"0.85rem",fontStyle:"normal",fontWeight:500}});class ImageRendererInner extends React.Component{shouldComponentUpdate(to){const ro=this.props;return ro.src!==to.src||ro.alt!==to.alt||ro.title!==to.title||ro.srcSet!==to.srcSet||ro.sizes!==to.sizes||ro.loading!==to.loading||ro.className!==to.className}render(){const{src:to,alt:ro,title:no,srcSet:oo,sizes:io,loading:so,className:ao}=this.props;return jsxRuntimeExports.jsxs("figure",{className:`${ao} ${cls$7}`,children:[jsxRuntimeExports.jsx("img",{alt:ro,src:to,title:no,srcSet:oo,sizes:io,loading:so}),no&&jsxRuntimeExports.jsx("figcaption",{children:no})]})}}const cls$7=mergeStyles$1({boxSizing:"border-box",maxWidth:"80%",display:"flex",flexDirection:"column",alignItems:"center",margin:0,"> img":{flex:"1 0 auto",boxSizing:"border-box",maxWidth:"100%",border:"1px solid var(--colorBorderImage)",boxShadow:"0 0 20px 1px rgba(126, 125, 150, 0.6)"},"> figcaption":{textAlign:"center",fontStyle:"italic",fontSize:"1em",color:"var(--colorImageTitle)"}}),ImageRenderer=eo=>{const{url:to,alt:ro,title:no,srcSet:oo,sizes:io,loading:so}=eo;return jsxRuntimeExports.jsx(ImageRendererInner,{alt:ro,src:to,title:no,srcSet:oo,sizes:io,loading:so,className:astClasses.image})},ImageReferenceRenderer=eo=>{const{viewmodel:to}=useNodeRendererContext(),ro=useStateValue(to.definitionMap$),{alt:no,srcSet:oo,sizes:io,loading:so}=eo,ao=ro[eo.identifier],lo=(ao==null?void 0:ao.url)??"",co=ao==null?void 0:ao.title;return jsxRuntimeExports.jsx(ImageRendererInner,{alt:no,src:lo,title:co,srcSet:oo,sizes:io,loading:so,className:astClasses.imageReference})};class InlineCodeRenderer extends React.Component{shouldComponentUpdate(to){return this.props.value!==to.value}render(){return jsxRuntimeExports.jsx("code",{className:cls$6,children:this.props.value})}}const cls$6=mergeStyles$1(astClasses.inlineCode,{padding:"1px 4px",borderRadius:"4px",margin:0,background:"hsla(210deg, 15%, 60%, 0.15)",lineHeight:"1.375",color:"var(--colorInlineCode)",fontFamily:"var(--fontFamilyCode)",fontSize:"min(1rem, 18px)",fontWeight:500});class LinkRendererInner extends React.Component{shouldComponentUpdate(to){const ro=this.props;return ro.url!==to.url||ro.title!==to.title||ro.childNodes!==to.childNodes||ro.className!==to.className}render(){const{url:to,title:ro,childNodes:no,className:oo}=this.props;return jsxRuntimeExports.jsx("a",{className:mergeStyles$1(cls$5,oo),href:to,title:ro,rel:"noopener, noreferrer",target:"_blank",children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:no})})}}const cls$5=mergeStyles$1({padding:"0.2rem 0",color:"var(--colorLink)",textDecoration:"none","&:active":{color:"var(--colorLinkActive)"},"&&:hover":{color:"var(--colorLinkHover)",textDecoration:"underline"},"&:visited":{color:"var(--colorLinkVisited)"}}),LinkRenderer=eo=>{const{url:to,title:ro,children:no}=eo;return jsxRuntimeExports.jsx(LinkRendererInner,{url:to,title:ro,childNodes:no,className:astClasses.link})},LinkReferenceRenderer=eo=>{const{viewmodel:to}=useNodeRendererContext(),no=useStateValue(to.definitionMap$)[eo.identifier],oo=(no==null?void 0:no.url)??"",io=no==null?void 0:no.title;return jsxRuntimeExports.jsx(LinkRendererInner,{url:oo,title:io,childNodes:eo.children,className:astClasses.linkReference})};class ListRenderer extends React.Component{shouldComponentUpdate(to){const ro=this.props;return ro.ordered!==to.ordered||ro.orderType!==to.orderType||ro.start!==to.start||ro.children!==to.children}render(){const{ordered:to,orderType:ro,start:no,children:oo}=this.props;return to?jsxRuntimeExports.jsx("ol",{className:cls$4,type:ro,start:no,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:oo})}):jsxRuntimeExports.jsx("ul",{className:cls$4,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:oo})})}}const cls$4=mergeStyles$1(astClasses.list,{padding:"0px",margin:"0 0 1em 2em",lineHeight:"2","> :last-child":{marginBottom:"0px"}});class ListItemRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return jsxRuntimeExports.jsx("li",{className:cls$3,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const cls$3=mergeStyles$1(astClasses.listItem,{position:"relative",padding:0,margin:0,"> :last-child":{marginBottom:0}});class ParagraphRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return to.some(no=>no.type===ImageType$1||no.type===ImageReferenceType)?jsxRuntimeExports.jsx("div",{className:paragraphDisplayCls,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})}):jsxRuntimeExports.jsx("p",{className:paragraphCls,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const paragraphCls=mergeStyles$1(astClasses.paragraph,{overflow:"hidden",padding:0,margin:"0px 0px 1.25em 0px",marginBottom:"1em",lineHeight:"1.8",hyphens:"auto",wordBreak:"normal",overflowWrap:"anywhere","> :last-child":{marginBottom:0}}),paragraphDisplayCls=mergeStyles$1(paragraphCls,{display:"flex",alignItems:"center",justifyContent:"center",padding:"1rem 0",margin:0});class StrongRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return jsxRuntimeExports.jsx("strong",{className:cls$2,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const cls$2=mergeStyles$1(astClasses.strong,{fontWeight:600});class TableRenderer extends React.Component{shouldComponentUpdate(to){const ro=this.props;return!isEqual(ro.columns,to.columns)||!isEqual(ro.children,to.children)}render(){const{columns:to,children:ro}=this.props,no=to.map(so=>so.align??void 0),[oo,...io]=ro.map(so=>so.children.map((ao,lo)=>jsxRuntimeExports.jsx(NodesRenderer,{nodes:ao.children},lo)));return jsxRuntimeExports.jsxs("table",{className:cls$1,children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsx("tr",{children:oo.map((so,ao)=>jsxRuntimeExports.jsx(Th,{align:no[ao],children:so},ao))})}),jsxRuntimeExports.jsx("tbody",{children:io.map((so,ao)=>jsxRuntimeExports.jsx("tr",{children:so.map((lo,co)=>jsxRuntimeExports.jsx("td",{align:no[co],children:lo},co))},ao))})]})}}class Th extends React.Component{constructor(to){super(to),this.ref={current:null}}shouldComponentUpdate(to){const ro=this.props;return ro.align!==to.align||ro.children!==to.children}render(){const{align:to,children:ro}=this.props;return jsxRuntimeExports.jsx("th",{ref:this.ref,align:to,children:ro})}componentDidMount(){const to=this.ref.current;to&&to.setAttribute("title",to.innerText)}componentDidUpdate(){const to=this.ref.current;to&&to.setAttribute("title",to.innerText)}}const cls$1=mergeStyles$1(astClasses.table,{display:"block",overflow:"auto",width:"max-content",maxWidth:"100%",padding:0,borderCollapse:"collapse",borderRadius:"6px",borderSpacing:"0px",border:"1px solid var(--colorBorderTable)",margin:"0 auto 1.25em",lineHeight:"1.6","> thead":{backgroundColor:"var(--colorBgTableHead)",borderBottom:"1px solid #f0f0f0",th:{padding:"0.5rem 1rem",borderLeft:"1px solid var(--colorBorderTable)",wordBreak:"normal",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&:first-child":{borderLeft:"none"}}},"> tbody":{tr:{borderTop:"1px solid var(--colorBorderTable)",backgroundColor:"var(--colorBgTableOddRow)"},"tr:nth-child(2n)":{backgroundColor:"var(--colorBgTableEvenRow)"},td:{padding:"0.5rem 1rem",borderLeft:"1px solid var(--colorBorderTable)","&:first-child":{borderLeft:"none"}}}});class TextRenderer extends React.Component{shouldComponentUpdate(to){return this.props.value!==to.value}render(){return jsxRuntimeExports.jsx(React.Fragment,{children:this.props.value})}}class ThematicBreakRenderer extends React.Component{shouldComponentUpdate(){return!1}render(){return jsxRuntimeExports.jsx("hr",{className:cls})}}const cls=mergeStyles$1(astClasses.thematicBreak,{boxSizing:"content-box",display:"block",height:0,width:"100%",padding:0,border:0,borderBottom:"1px solid #dadada",outline:0,margin:"1.5em 0px"});function buildNodeRendererMap(eo){if(eo==null)return defaultNodeRendererMap;let to=!1;const ro={};for(const[no,oo]of Object.entries(eo))oo&&oo!==defaultNodeRendererMap[no]&&(to=!0,ro[no]=oo);return to?{...defaultNodeRendererMap,...ro}:defaultNodeRendererMap}const defaultNodeRendererMap={[BlockquoteType]:BlockquoteRenderer,[BreakType]:BreakRenderer,[CodeType]:CodeRenderer,[DefinitionType]:()=>null,[DeleteType]:DeleteRenderer,[EmphasisType]:EmphasisRenderer,[HeadingType]:HeadingRenderer,[HtmlType]:()=>null,[ImageType$1]:ImageRenderer,[ImageReferenceType]:ImageReferenceRenderer,[InlineCodeType]:InlineCodeRenderer,[LinkType]:LinkRenderer,[LinkReferenceType]:LinkReferenceRenderer,[ListType]:ListRenderer,[ListItemType]:ListItemRenderer,[ParagraphType$1]:ParagraphRenderer,[StrongType]:StrongRenderer,[TableType]:TableRenderer,[TextType$1]:TextRenderer,[ThematicBreakType]:ThematicBreakRenderer,_fallback:function eo(to,ro){return console.warn(`Cannot find render for \`${to.type}\` type node with key \`${ro}\`:`,to),null}},ReactMarkdown=eo=>{const{presetDefinitionMap:to,customizedRendererMap:ro,preferCodeWrap:no=!1,showCodeLineno:oo=!0,text:io,themeScheme:so="lighten",className:ao,style:lo}=eo,co=React.useMemo(()=>{const go=Array.isArray(io)?io.map(yo=>parser$1.parse(yo)):[parser$1.parse(io)];if(go.length===0)return parser$1.parse("");const vo=go[0];for(let yo=1;yocalcDefinitionMap(co).definitionMap,[co]),[fo]=React.useState(()=>new ReactMarkdownViewModel({definitionMap:{...to,...uo},rendererMap:buildNodeRendererMap(ro),preferCodeWrap:no,showCodeLineno:oo,themeScheme:so})),ho=React.useMemo(()=>({viewmodel:fo}),[fo]),po=mergeClasses(rootCls,so==="darken"&&astClasses.rootDarken,ao);return React.useEffect(()=>{fo.preferCodeWrap$.next(no)},[fo,no]),React.useEffect(()=>{fo.showCodeLineno$.next(oo)},[fo,oo]),React.useEffect(()=>{fo.themeScheme$.next(so)},[fo,so]),jsxRuntimeExports.jsx("div",{className:po,style:lo,children:jsxRuntimeExports.jsx(NodeRendererContextType.Provider,{value:ho,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:co.children})})})},rootCls=mergeStyles$1(astClasses.root,{wordBreak:"break-all",userSelect:"unset",[astClasses.listItem]:{[`> ${astClasses.list}`]:{marginLeft:"1.2em"}},"> :last-child":{marginBottom:0}}),BasicViewer=({styles:eo,showEmpty:to,emptyRender:ro,previewRender:no,rawRender:oo,headerRender:io})=>{const so=useClasses$i(),[ao,lo]=reactExports.useState("preview"),co=reactExports.useCallback(fo=>{lo(fo)},[]),uo=useLocStrings();return to?ro?ro():jsxRuntimeExports.jsx(MessageBar,{intent:"info",children:uo["No content"]}):jsxRuntimeExports.jsxs("div",{className:eo==null?void 0:eo.root,children:[oo&&jsxRuntimeExports.jsxs("div",{className:so.header,children:[jsxRuntimeExports.jsx("div",{style:{flex:1,overflow:"hidden"},children:io==null?void 0:io()}),jsxRuntimeExports.jsx("div",{className:so.groupWrapper,children:jsxRuntimeExports.jsxs("div",{className:so.buttonGroup,children:[jsxRuntimeExports.jsx(Button$2,{value:"preview",size:"small",appearance:ao==="preview"?void 0:"transparent",onClick:()=>co("preview"),children:uo.Preview}),jsxRuntimeExports.jsx(Button$2,{value:"raw",size:"small",appearance:ao==="raw"?void 0:"transparent",onClick:()=>co("raw"),children:uo.Raw})]})})]}),ao==="preview"||!oo?no():null,ao==="raw"&&oo?oo():null]})},useClasses$i=makeStyles({header:{display:"flex",alignItems:"center",marginBottom:"12px"},groupWrapper:{display:"flex",flexDirection:"row-reverse"},buttonGroup:{display:"inline-flex",...shorthands.borderRadius("5px"),backgroundColor:tokens.colorNeutralBackground5}}),RawMarkdownContent=({content:eo,className:to,defaultHeight:ro,minHeight:no,maxHeight:oo})=>{const io=useIsDark(),so=reactExports.useRef(null),[ao,lo]=reactExports.useState(ro||100),co=()=>{var po;const uo=(po=so.current)==null?void 0:po.getValue().split(` `),fo=uo==null?void 0:uo.reduce((go,vo)=>go+Math.ceil(vo.length/80),0);let ho=fo?fo*19:100;no&&hooo&&(ho=oo),lo(ho)};return jsxRuntimeExports.jsx(Ft$1,{value:eo,theme:io?"vs-dark":"light",options:{readOnly:!0,minimap:{enabled:!0},wordWrap:"on",wordWrapColumn:80},defaultLanguage:"markdown",className:to,height:ao,onMount:uo=>{so.current=uo,co(),uo.onDidChangeModelContent(co)}})},MarkdownViewer=({content:eo})=>{const to=useStyles$h();return jsxRuntimeExports.jsx(BasicViewer,{styles:to,showEmpty:!eo,previewRender:()=>jsxRuntimeExports.jsx(ReactMarkdown,{text:`${eo}`}),rawRender:()=>jsxRuntimeExports.jsx(RawMarkdownContent,{content:`${eo}`,className:to.raw})})},useStyles$h=makeStyles({root:{wordBreak:"break-all",whiteSpace:"break-spaces",...shorthands.overflow("auto")},raw:{minHeight:"100px"}}),EmbeddingNodeInfo=()=>{var lo,co,uo;const eo=useSelectedSpan(),to=((lo=eo==null?void 0:eo.attributes)==null?void 0:lo["llm.response.model"])??((co=eo==null?void 0:eo.attributes)==null?void 0:co["embedding.model"]),ro=useLocStrings(),[no,oo]=reactExports.useState(ViewStatus.loading),io=useLoadSpanEvents(eo,BuildInEventName["embedding.embeddings"]),so=getSpanEventsWithPayload(eo,BuildInEventName["embedding.embeddings"]);let ao=JSON.parse(((uo=eo==null?void 0:eo.attributes)==null?void 0:uo["embedding.embeddings"])??"[]")??[];return so.length>0&&(ao=so.map(fo=>(fo==null?void 0:fo.attributes)??[]).flat()),reactExports.useEffect(()=>{oo(ViewStatus.loading),io({onCompleted:fo=>{oo(fo?ViewStatus.error:ViewStatus.loaded)}})},[io]),no===ViewStatus.loading?jsxRuntimeExports.jsx("div",{style:{marginTop:"30vh"},children:jsxRuntimeExports.jsx(Spinner,{size:"tiny"})}):no===ViewStatus.error?jsxRuntimeExports.jsx("div",{style:{marginTop:"30vh",textAlign:"center"},children:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{oo(ViewStatus.loading),io({onCompleted:fo=>{oo(fo?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})}):jsxRuntimeExports.jsxs(Card,{children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("span",{children:to})}),ao.map((fo,ho)=>jsxRuntimeExports.jsxs(Card,{children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("i",{children:ro.Embedded_text})}),fo["embedding.text"]?jsxRuntimeExports.jsx(MarkdownViewer,{content:fo["embedding.text"]}):null]},ho))]})},EmbeddingSpanDetailContent=()=>{var lo;const eo=useSelectedSpan(),[to,ro]=reactExports.useState("embedding"),no=useNodeDetailClasses(),oo=useLocStrings(),io=(lo=eo==null?void 0:eo.events)==null?void 0:lo.filter(co=>co.name===BuildInEventName.exception),so=(io==null?void 0:io.length)??0,ao=[{key:"embedding",name:oo.Embedding},{key:"raw",name:oo.Raw_JSON},{key:"error",name:oo.Exception,icon:jsxRuntimeExports.jsx(CounterBadge,{appearance:"filled",color:so>0?"danger":"informative",count:so,size:"small",showZero:!0})}];return jsxRuntimeExports.jsxs("div",{className:no.layoutLeft,children:[jsxRuntimeExports.jsx(SpanDetailTabs,{tabs:ao,selectedTab:to,setSelectedTab:ro}),jsxRuntimeExports.jsx(SpanDetailErrorMessageBar,{setSelectedTab:ro}),jsxRuntimeExports.jsxs("div",{className:no.content,children:[to==="embedding"&&jsxRuntimeExports.jsx(EmbeddingNodeInfo,{}),to==="raw"&&jsxRuntimeExports.jsx(NodeRawCard,{}),to==="error"&&jsxRuntimeExports.jsx(ErrorsTab,{})]})]})},getMimeTypeFromContentType=eo=>{var ro;return(ro=/^\s*([^;\s]*)(?:;|\s|$)/.exec(eo))==null?void 0:ro[1].toLowerCase()},NodeHttpCard=({type:eo})=>{const to=useLocStrings(),ro=useSelectedSpan(),no=React.useMemo(()=>parseHttpSpanAttributes(ro),[ro]);if(!no)return null;const{urlFull:oo}=no,io=parseInt(no.status_code);let so;io>=200&&io<300?so="success":io>=400?so="danger":so="warning";const ao=jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[no.status_code!==void 0?jsxRuntimeExports.jsxs(Badge$2,{appearance:"outline",color:so,children:[to.Status," ",jsxRuntimeExports.jsx("span",{style:{marginLeft:4},children:no.status_code})]}):null,jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:no.method}),jsxRuntimeExports.jsx("span",{style:{marginRight:8,wordBreak:"break-all"},children:oo})]}),lo=eo==="response"?no.response:no.request;return jsxRuntimeExports.jsx(Card,{style:{marginBottom:12},children:jsxRuntimeExports.jsx(NodeHttpItem,{type:eo,header:ao,data:lo})})},NodeHttpItem=({type:eo,header:to,data:ro})=>{const no=useLocStrings(),{headers:oo,body:io}=ro,so=JSON.stringify(ro),ao=eo==="response",lo=ao?"Response":"Request";let co;if(io)if(ao){const uo=getMimeTypeFromContentType(oo["content-type"]);co=jsxRuntimeExports.jsx(HttpResponseContent,{mimeType:uo,body:io})}else co=jsxRuntimeExports.jsx(JsonNodeCard,{wrapperStyle:{background:tokens.colorNeutralBackground2},src:io,title:no[`${lo} Body`]});return jsxRuntimeExports.jsx(BasicViewer,{showEmpty:!1,previewRender:()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(JsonNodeCard,{wrapperStyle:{background:tokens.colorNeutralBackground2},src:oo,title:no[`${lo} Headers`]}),co]}),rawRender:()=>jsxRuntimeExports.jsx(Card,{style:{wordBreak:"break-all"},children:so}),headerRender:to?()=>to:void 0})},HttpResponseContent=({mimeType:eo,body:to=""})=>{const ro=useLocStrings();return eo!=null&&eo.includes("json")?jsxRuntimeExports.jsx(JsonNodeCard,{wrapperStyle:{background:tokens.colorNeutralBackground2},src:to,title:ro["Response Body"]}):eo==="text/event-stream"?jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12,background:tokens.colorNeutralBackground2},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:ro["Response Body"]})})}),to.split("data:").filter(no=>!!no).map((no,oo)=>jsxRuntimeExports.jsxs("div",{children:["data: ",no]},`${no}-${oo}`))]}):jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12,background:tokens.colorNeutralBackground2},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:ro["Response Body"]})})}),jsxRuntimeExports.jsx("div",{style:{wordBreak:"break-all"},children:to})]})},HttpSpanDetailContent=()=>{var lo;const eo=useSelectedSpan(),to=useNodeDetailClasses(),ro=useLocStrings(),[no,oo]=reactExports.useState("info"),io=(lo=eo==null?void 0:eo.events)==null?void 0:lo.filter(co=>co.name===BuildInEventName.exception),so=(io==null?void 0:io.length)??0,ao=[{key:"response",name:ro.Response},{key:"request",name:ro.Request},{key:"raw",name:ro.Raw_JSON},{key:"error",name:ro.Exception,icon:jsxRuntimeExports.jsx(CounterBadge,{appearance:"filled",color:so>0?"danger":"informative",count:so,size:"small",showZero:!0})}];return jsxRuntimeExports.jsxs("div",{className:to.layoutLeft,children:[jsxRuntimeExports.jsx(SpanDetailTabs,{tabs:ao,selectedTab:no,setSelectedTab:oo}),jsxRuntimeExports.jsx(SpanDetailErrorMessageBar,{setSelectedTab:oo}),jsxRuntimeExports.jsxs("div",{className:to.content,children:[no==="response"&&jsxRuntimeExports.jsx(NodeHttpCard,{type:"response"}),no==="request"&&jsxRuntimeExports.jsx(NodeHttpCard,{type:"request"}),no==="raw"&&jsxRuntimeExports.jsx(NodeRawCard,{}),no==="error"&&jsxRuntimeExports.jsx(ErrorsTab,{})]})]})},useClasses$h=makeStyles({header:{display:"flex",alignItems:"center"},paramKey:{fontSize:"14px",fontWeight:600,lineHeight:"20px",marginRight:"4px"},type:{fontSize:"13px",marginLeft:"10px",lineHeight:"20px",color:tokens.colorNeutralForeground3},description:{fontSize:"14px",lineHeight:"21px"},required:{color:tokens.colorPaletteRedForeground1,marginLeft:"10px"},optional:{color:tokens.colorPaletteGreenForeground1,marginLeft:"10px"},sectionTitle:{fontSize:"12px",color:tokens.colorNeutralForeground3}}),FunctionParameterRow=({paramKey:eo,paramSchema:to,isRequired:ro})=>{const{type:no,description:oo,properties:io,required:so,enum:ao}=to,lo=useClasses$h();return jsxRuntimeExports.jsxs(Card,{appearance:"outline",children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsxs("div",{className:lo.header,children:[jsxRuntimeExports.jsx("div",{className:lo.paramKey,children:eo}),jsxRuntimeExports.jsx("div",{className:lo.type,children:no}),ro?jsxRuntimeExports.jsx("div",{className:lo.required,children:"Required"}):jsxRuntimeExports.jsx("div",{className:lo.optional,children:"Optional"})]})}),oo&&jsxRuntimeExports.jsx("div",{className:lo.description,children:oo}),io&&jsxRuntimeExports.jsx(Accordion,{collapsible:!0,children:jsxRuntimeExports.jsxs(AccordionItem,{value:"properties",children:[jsxRuntimeExports.jsx(AccordionHeader,{children:jsxRuntimeExports.jsx("div",{className:lo.sectionTitle,children:"Properties"})}),jsxRuntimeExports.jsx(AccordionPanel,{children:Object.keys(io).map(co=>jsxRuntimeExports.jsx(FunctionParameterRow,{paramKey:co,paramSchema:io[co],isRequired:so==null?void 0:so.includes(co)},co))})]})}),ao&&jsxRuntimeExports.jsx(Accordion,{collapsible:!0,children:jsxRuntimeExports.jsxs(AccordionItem,{value:"enum",children:[jsxRuntimeExports.jsx(AccordionHeader,{children:jsxRuntimeExports.jsx("div",{className:lo.sectionTitle,children:"Possible values"})}),jsxRuntimeExports.jsx(AccordionPanel,{children:ao.map(co=>jsxRuntimeExports.jsx("div",{children:co},co))})]})})]})},useClasses$g=makeStyles({root:{...shorthands.padding("8px")},header:{fontSize:"24px",fontWeight:700,lineHeight:"30px"},parametersTitle:{fontSize:"20px",fontWeight:700,lineHeight:"28px"}}),LLMNodeToolCard=({tool:eo})=>{var ro;const to=useClasses$g();return jsxRuntimeExports.jsx("div",{className:to.root,children:jsxRuntimeExports.jsxs(Card,{children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{className:to.header,children:eo.function.name})}),eo.function.description&&jsxRuntimeExports.jsx("div",{children:eo.function.description}),eo.function.parameters&&jsxRuntimeExports.jsx("div",{className:to.parametersTitle,children:"Parameters"}),Object.keys(((ro=eo.function.parameters)==null?void 0:ro.properties)||{}).map(no=>{var io,so,ao,lo;const oo=(so=(io=eo.function.parameters)==null?void 0:io.properties)==null?void 0:so[no];return oo?jsxRuntimeExports.jsx(FunctionParameterRow,{paramKey:no,paramSchema:oo,isRequired:(lo=(ao=eo.function.parameters)==null?void 0:ao.required)==null?void 0:lo.includes(no)},no):null})]})})},useStyles$g=makeStyles({popoverTrigger:{cursor:"pointer",marginLeft:"4px",color:tokens.colorBrandBackground,...shorthands.textDecoration("underline")}}),LLMNodeMessageToolCalls=({message:eo,noContentHint:to})=>{const{function_call:ro,tool_calls:no,tools:oo}=eo,io=useLocStrings(),so=useStyles$g();return!ro&&!no&&to?to:jsxRuntimeExports.jsxs(Accordion,{collapsible:!0,multiple:!0,defaultOpenItems:"tool_calls",children:[ro&&jsxRuntimeExports.jsxs(AccordionItem,{value:"function_call",children:[jsxRuntimeExports.jsx(AccordionHeader,{children:io.Function_Calls}),jsxRuntimeExports.jsx(AccordionPanel,{children:jsxRuntimeExports.jsx(JsonNodeCard,{title:ro.name??"Function call",src:ro.arguments},ro.name)})]}),no&&jsxRuntimeExports.jsxs(AccordionItem,{value:"tool_calls",children:[jsxRuntimeExports.jsx(AccordionHeader,{children:io.Tool_Calls}),jsxRuntimeExports.jsx(AccordionPanel,{children:(no??[]).map(ao=>{const lo=oo==null?void 0:oo.find(co=>co.function.name===ao.function.name);return jsxRuntimeExports.jsxs(Card,{style:{marginBottom:8},children:[jsxRuntimeExports.jsx(CardHeader,{header:lo?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("span",{children:["[",ao.type,"]"]}),jsxRuntimeExports.jsxs(Popover,{children:[jsxRuntimeExports.jsx(PopoverTrigger,{children:jsxRuntimeExports.jsx("div",{className:so.popoverTrigger,children:ao.function.name})}),jsxRuntimeExports.jsx(PopoverSurface,{children:jsxRuntimeExports.jsx(LLMNodeToolCard,{tool:lo})})]})]}):`[${ao.type}] ${ao.function.name}`}),jsxRuntimeExports.jsx(JsonNodeCard,{title:io.Arguments,src:ao.function.arguments})]},ao.id)})})]})]})},LLMMessageNodeContent=({selectedLLMMessage:eo})=>{const to=useNodeDetailClasses(),[ro,no]=reactExports.useState("llm_message_preview"),oo=useLocStrings(),io=eo.tools&&eo.tools.length>0,so=[{key:"llm_message_preview",name:oo.Preview},{key:"llm_message_raw",name:oo.Raw},...io?[{key:"llm_message_tool_calls",name:oo["Tool calls"]}]:[]];return jsxRuntimeExports.jsxs("div",{className:to.layoutLeft,children:[jsxRuntimeExports.jsx(SpanDetailTabs,{tabs:so,selectedTab:ro,setSelectedTab:no}),jsxRuntimeExports.jsxs("div",{className:to.content,children:[ro==="llm_message_preview"&&(eo.content?jsxRuntimeExports.jsx(ReactMarkdown,{text:`${eo.content}`}):jsxRuntimeExports.jsx(MessageBar,{intent:"info",children:"No content available"})),ro==="llm_message_raw"&&(eo.content?jsxRuntimeExports.jsx(RawMarkdownContent,{content:`${eo.content}`,minHeight:480}):jsxRuntimeExports.jsx(MessageBar,{intent:"info",children:"No content available"})),ro==="llm_message_tool_calls"&&jsxRuntimeExports.jsx(LLMNodeMessageToolCalls,{message:eo,noContentHint:jsxRuntimeExports.jsx(MessageBar,{intent:"info",children:"There is not any tool calls."})})]})]})},colorsPool=[{color:tokens.colorPalettePinkForeground2,backgroundColor:tokens.colorPalettePinkBackground2,hoverColor:tokens.colorPalettePinkBorderActive},{color:tokens.colorPaletteDarkOrangeForeground2,backgroundColor:tokens.colorPaletteDarkOrangeBackground2,hoverColor:tokens.colorPaletteDarkOrangeBorderActive},{color:tokens.colorPaletteBrassForeground2,backgroundColor:tokens.colorPaletteBrassBackground2,hoverColor:tokens.colorPaletteBrassBorderActive},{color:tokens.colorPaletteSeafoamForeground2,backgroundColor:tokens.colorPaletteSeafoamBackground2,hoverColor:tokens.colorPaletteSeafoamBorderActive},{color:tokens.colorPaletteRoyalBlueForeground2,backgroundColor:tokens.colorPaletteRoyalBlueBackground2,hoverColor:tokens.colorPaletteRoyalBlueBorderActive},{color:tokens.colorPaletteNavyForeground2,backgroundColor:tokens.colorPaletteNavyBackground2,hoverColor:tokens.colorPaletteNavyBorderActive},{color:tokens.colorPaletteGrapeForeground2,backgroundColor:tokens.colorPaletteGrapeBackground2,hoverColor:tokens.colorPaletteGrapeBorderActive}],nameToColor=new Map,getColorForMessage=({name:eo="",role:to=""})=>{if(to.toLowerCase()==="system")return{color:tokens.colorPalettePlatinumForeground2,backgroundColor:tokens.colorPalettePlatinumBackground2,hoverColor:tokens.colorPalettePlatinumBorderActive};const ro=`${eo}_${to}`;return nameToColor.has(ro)||nameToColor.set(ro,colorsPool[nameToColor.size%colorsPool.length]),nameToColor.get(ro)},getColorForMessageContent=({role:eo=""})=>eo.toLowerCase()==="system"?{color:tokens.colorNeutralForeground3,backgroundColor:"transparent"}:{color:tokens.colorNeutralForeground3,backgroundColor:tokens.colorNeutralBackground2},LLMMessageSenderBadge=({name:eo,role:to,className:ro,size:no="small"})=>{const oo=(to==null?void 0:to.toLowerCase())==="system"?jsxRuntimeExports.jsx(Laptop16Regular,{}):jsxRuntimeExports.jsx(Person16Regular,{}),io=(to==null?void 0:to.toLowerCase())==="system"?jsxRuntimeExports.jsx(Laptop24Regular,{}):jsxRuntimeExports.jsx(Person24Regular,{}),so=getColorForMessage({name:eo,role:to});return jsxRuntimeExports.jsx(Badge$2,{icon:no==="large"?io:oo,appearance:"filled",size:no==="large"?"extra-large":"large",className:ro,style:{...so},children:capitalizeFirstLetter$1(to)})};function capitalizeFirstLetter$1(eo){return eo?eo.charAt(0).toUpperCase()+eo.slice(1).toLowerCase():""}const LLMMessageNodeHeader=({selectedLLMMessage:eo})=>{const to=useNodeDetailClasses();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(LLMMessageSenderBadge,{name:eo.name,role:eo.role,className:to.headerSpan}),jsxRuntimeExports.jsx(Tooltip,{content:eo.name??"",relationship:"label",children:jsxRuntimeExports.jsx("div",{className:to.headerTitle,children:`${eo.name??""}`})})]})},LLMNodeInvocationParametersTab=()=>{var vo,yo;const eo=useSelectedSpan(),to=useParentSpanOfSelectedSpan(),ro=to==null?void 0:to.attributes,no=getSpanEventsWithPayload(to,BuildInEventName["prompt.template"])[0],oo=no?(vo=no.attributes)==null?void 0:vo["prompt.variables"]:JSON.parse((ro==null?void 0:ro["prompt.variables"])??"{}"),so=getSpanEventsWithPayload(eo,BuildInEventName["function.inputs"])[0]??JSON.parse(((yo=eo==null?void 0:eo.attributes)==null?void 0:yo.inputs)??"{}"),ao=Object.keys(oo??{}),lo={};Object.keys(so).forEach(xo=>{xo!=="messages"&&(ao.includes(xo)||(lo[xo]=so[xo]))});const[co,uo]=reactExports.useState(ViewStatus.loading),fo=useLoadSpanEvents(eo,BuildInEventName["prompt.template"]),[ho,po]=reactExports.useState(ViewStatus.loading),go=useLoadSpanEvents(eo,BuildInEventName["function.inputs"]);return reactExports.useEffect(()=>{po(ViewStatus.loading),fo({onCompleted:xo=>{uo(xo?ViewStatus.error:ViewStatus.loaded)}}),po(ViewStatus.loading),go({onCompleted:xo=>{po(xo?ViewStatus.error:ViewStatus.loaded)}})},[fo,go]),co===ViewStatus.loading||ho===ViewStatus.loading?jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Spinner,{})}):co===ViewStatus.error||ho===ViewStatus.error?jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{uo(ViewStatus.loading),fo({onCompleted:xo=>{uo(xo?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0}),po(ViewStatus.loading),go({onCompleted:xo=>{po(xo?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})}):jsxRuntimeExports.jsx(LLMNodeInvocationParameters,{invocationParameters:lo})},LLMNodeInvocationParameters=({invocationParameters:eo})=>{const to=useIsDark();return jsxRuntimeExports.jsx(JsonViewer,{src:eo,theme:"vscode",dark:to})};var ChatMessageCategory=(eo=>(eo.System="system",eo.Error="error",eo.Chatbot="chatbot",eo.User="user",eo))(ChatMessageCategory||{}),ChatMessageType=(eo=>(eo.Message="message",eo.SessionSplit="session-split",eo))(ChatMessageType||{}),CopyStatus=(eo=>(eo[eo.PENDING=0]="PENDING",eo[eo.COPYING=1]="COPYING",eo[eo.COPIED=2]="COPIED",eo[eo.FAILED=3]="FAILED",eo))(CopyStatus||{}),ChatboxLocator=(eo=>(eo.MessageBubble="chatbox-message-bubble",eo.MessageContent="chatbox-message-content",eo.MessageList="chatbox-message-list",eo.MessageActionBar="chatbox-message-action-bar",eo))(ChatboxLocator||{}),ChatboxSelector=(eo=>(eo.MessageBubble='[data-chatbox-locator="chatbox-message-bubble"]',eo.MessageContent='[data-chatbox-locator="chatbox-message-content"]',eo.MessageList='[data-chatbox-locator="chatbox-message-list"]',eo.MessageActionBar='[data-chatbox-locator="chatbox-message-action-bar"]',eo))(ChatboxSelector||{});const defaultLocStrings$1={CopyToClipboard:"Copy to clipboard",CopyToClipboard_Copying:"Copying...",CopyToClipboard_Copied:"Copied!",CopyToClipboard_Failed:"Failed!",Header_Clear:"Click to clear all chat histories",Header_Close:"Click to close chat box",Header_EnterFullScreen:"Click to enter full screen mode",Header_ExitFullScreen:"Click to exit full screen mode",Header_Title:"Chat",Input_Placeholder:"Input anything to test...",MessageError_HideDetail:"Hide Detail",MessageError_ShowDetail:"Show Detail",MessageStatus_TimeSpentDesc:"time spent",MessageStatus_TimeSpentDscCapitalized:"Time spent",MessageStatus_TimeSpent_Unit:"sec",MessageStatus_TokensDesc:"Total tokens for generating this",MessageStatus_TokensUint:"tokens",SessionSplit_Desc:"Your session start from here.",Tooltip_Bottom:"Only default variants will be used for chat, if you want to test variants please try bulk test. For chatbot and test app bot, it will only show the chat output.",Tooltip_TotalTokens:"Total tokens",Typing:"Generating chat output for you"};class ChatboxViewModel{constructor(to){this.calcContentForCopy=fo=>this.calcContentForCopy$.getSnapshot()(fo),this.monitorInputContentChange=fo=>this.inputContentChangeTick$.subscribeStateChange(fo),this.notifyInputContentChange=()=>{this.inputContentChangeTick$.setState(fo=>fo+1)},this.sendMessage=fo=>{const ho=this.editorRef.current;if(!ho){console.log("!!!editorRef is not mounted.");return}const po=fo??ho.getContent(),go=this.sendMessage$.getSnapshot(),yo=this.makeUserMessage$.getSnapshot()(po);this.messages$.setState(xo=>[...xo,yo]),ho.clear(),this.isOthersTyping$.next(!0),go(po,this,yo).then(xo=>{xo!==void 0&&this.messages$.setState(_o=>[..._o,xo])}).finally(()=>{this.isOthersTyping$.next(!1)})},this.setCalcContentForCopy=fo=>{this.calcContentForCopy$.next(fo)},this.setMakeUserMessage=fo=>{this.makeUserMessage$.next(fo)},this.setSendMessage=fo=>{this.sendMessage$.next(fo)},this.sessionSplit=fo=>{const ho={id:uuid_1.v4(),type:ChatMessageType.SessionSplit,history:[{category:ChatMessageCategory.System,from:"system",content:fo??"",timestamp:new Date().toISOString()}]};return this.messages$.setState(po=>[...po,ho]),ho};const{alias:ro="",initialDisabled:no=!1,initialMessages:oo=[],locStrings:io=defaultLocStrings$1,calcContentForCopy:so=fo=>typeof fo.content=="string"?fo.content:JSON.stringify(fo.content),makeUserMessage:ao=fo=>({id:uuid_1.v4(),type:ChatMessageType.Message,history:[{category:ChatMessageCategory.User,from:this.alias$.getSnapshot(),timestamp:new Date().toISOString(),content:fo}]}),sendMessage:lo=async fo=>({id:uuid_1.v4(),type:ChatMessageType.Message,history:[{category:ChatMessageCategory.Chatbot,from:"chatbot",timestamp:new Date().toISOString(),content:fo}]})}=to;this.editorRef={current:null};const co=new State(0),uo=Computed.fromObservables([co],()=>{var fo;return(fo=this.editorRef.current)==null?void 0:fo.isEmpty()});this.alias$=new State(ro),this.disabled$=new State(no),this.inputContentChangeTick$=co,this.isEditorEmpty$=uo,this.isOthersTyping$=new State(!1),this.locStrings$=new State(io),this.messages$=new State(oo),this.calcContentForCopy$=new State(so),this.makeUserMessage$=new State(ao),this.sendMessage$=new State(lo)}}const viewmodel=new ChatboxViewModel({sendMessage:()=>Promise.resolve({id:Date.now(),type:ChatMessageType.Message,history:[{category:ChatMessageCategory.System,from:"system",timestamp:new Date().toISOString(),content:"sendMessage not implemented!"}]})});React.createContext({viewmodel});function useEventCallback$1(eo){const to=reactExports.useRef(eo);return reactExports.useLayoutEffect(()=>{to.current=eo}),reactExports.useCallback((...ro)=>{const no=to.current;return no(...ro)},[])}function useCopyAction(eo,to){const[ro,no]=React.useState(CopyStatus.PENDING),oo=useEventCallback$3(so=>{if(ro===CopyStatus.PENDING){no(CopyStatus.COPYING);try{const ao=to(so);copy$2(ao),no(CopyStatus.COPIED)}catch{no(CopyStatus.FAILED)}}});return React.useEffect(()=>{if(ro===CopyStatus.COPIED||ro===CopyStatus.FAILED){let so=setTimeout(()=>{so=void 0,no(CopyStatus.PENDING)},1500);return()=>{so&&clearTimeout(so)}}},[ro]),React.useMemo(()=>({key:"copy",group:2,icon:ro===CopyStatus.PENDING?jsxRuntimeExports.jsx(Copy20Regular,{}):jsxRuntimeExports.jsx(CopyArrowRight20Regular,{}),tooltip:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:eo.CopyToClipboard}),disabled:ro!==CopyStatus.PENDING,onClick:oo,condition:so=>so.category===ChatMessageCategory.Chatbot||so.category===ChatMessageCategory.User||so.category===ChatMessageCategory.Error}),[eo,ro,oo])}makeStyles({copyButton:{cursor:"pointer"}});const defaultUploadPopoverLocStrings={Add:"Add",AddAnImage:"Add an image",PasteImageOrLinkHere:"Paste image or link here",UploadFromThisDevice:"Upload from this device"},ImageView=eo=>{const{src:to,alt:ro,loading:no=!1,width:oo,height:io,styles:so}=eo;return to?no?jsxRuntimeExports.jsx("div",{children:"Loading..."}):jsxRuntimeExports.jsx("div",{className:so==null?void 0:so.root,children:jsxRuntimeExports.jsx("img",{className:so==null?void 0:so.image,src:to,alt:ro,width:oo,height:io})}):jsxRuntimeExports.jsx("div",{children:"This image can not be previewed."})},ImageViewModal=eo=>{const{src:to,alt:ro,visible:no,loading:oo=!1,width:io,height:so,onDismiss:ao}=eo,lo=useStyles$f(),co=jsxRuntimeExports.jsxs("div",{className:lo.container,children:[jsxRuntimeExports.jsxs("div",{className:lo.header,children:[jsxRuntimeExports.jsx("h2",{className:lo.heading,children:"Preview"}),jsxRuntimeExports.jsx(Button$2,{as:"button",appearance:"transparent",icon:jsxRuntimeExports.jsx(Dismiss24Regular,{}),className:lo.dismissBtn,onClick:ao})]}),jsxRuntimeExports.jsx("div",{className:lo.main,children:jsxRuntimeExports.jsx(ImageView,{src:to,alt:ro,loading:oo,width:io,height:so,styles:{image:lo.image}})})]});return jsxRuntimeExports.jsx(Modal,{isOpen:no,isBlocking:!1,onDismiss:ao,children:co})},useStyles$f=makeStyles({container:{display:"flex",flexDirection:"column",flexWrap:"nowrap",...shorthands.padding("16px")},header:{...shorthands.flex(0,0,"auto"),display:"flex",flexDirection:"row",flexWrap:"nowrap",justifyContent:"space-between",marginBottom:"20px"},heading:{...shorthands.margin(0),fontWeight:FontWeights.semibold,fontSize:"inherit"},dismissBtn:{"&&":{fontSize:"16px",lineHeight:"16px",height:"16px",width:"16px",color:tokens.colorNeutralStroke1}},main:{...shorthands.overflow("auto"),display:"flex",justifyContent:"center",alignItems:"center"},image:{width:"auto",height:"auto",maxWidth:"60vw",maxHeight:"60vh"}}),IMAGE_WIDTH="48px",MASK_SELECTOR_CLASS_NAME="__MASK_SELECTOR_CLASS_NAME__",UploadPopoverImagePreview=eo=>{const{image:to,alt:ro,isReadonly:no,onClickDelete:oo}=eo,[io,so]=React.useState(!1),ao=useStyles$e(),lo=React.useMemo(()=>{if(to)return typeof to=="string"?to:URL.createObjectURL(to)},[to]),co=React.useCallback(()=>{so(fo=>!fo)},[]),uo=lo||"";return jsxRuntimeExports.jsxs("div",{className:mergeClasses(ao.root,no?ao.readonlyRoot:void 0),children:[jsxRuntimeExports.jsxs("div",{className:ao.imageContainer,children:[jsxRuntimeExports.jsx("img",{decoding:"async",className:ao.image,src:uo,alt:ro}),jsxRuntimeExports.jsx("div",{"aria-hidden":!0,className:mergeClasses(ao.mask,MASK_SELECTOR_CLASS_NAME),onClick:co,role:"button",children:jsxRuntimeExports.jsx(ZoomIn20Regular,{})})]}),!no&&jsxRuntimeExports.jsx(Button$2,{as:"button",className:ao.closeButton,icon:jsxRuntimeExports.jsx(Dismiss20Regular,{}),onClick:oo}),jsxRuntimeExports.jsx(ImageViewModal,{src:uo,alt:ro||"",visible:io,onDismiss:co})]})},useStyles$e=makeStyles({root:{boxSizing:"border-box",display:"flex",height:"32px",width:"80px",...shorthands.border("1px","solid",tokens.colorNeutralStroke2),...shorthands.borderRadius("4px")},readonlyRoot:{width:"48px"},imageContainer:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",width:IMAGE_WIDTH,[`:hover .${MASK_SELECTOR_CLASS_NAME}`]:{visibility:"visible"}},image:{maxWidth:"100%",maxHeight:"100%",width:"auto",height:"auto"},mask:{visibility:"hidden",cursor:"pointer",position:"absolute",top:0,left:0,width:`calc(${IMAGE_WIDTH} - 2px)`,height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",color:tokens.colorNeutralForegroundStaticInverted,...shorthands.borderRadius("4px",0,0,"4px")},closeButton:{width:"32px",...shorthands.border(0)}}),UploadPopoverTrigger=React.forwardRef((eo,to)=>jsxRuntimeExports.jsx(Button$2,{...eo,ref:to,as:"button",appearance:"transparent",size:"medium",icon:jsxRuntimeExports.jsx(Attach16Regular,{})}));UploadPopoverTrigger.displayName="UploadPopoverTrigger";const mergeStyleSlots=(eo,...to)=>{const ro={...eo};for(const no of Object.keys(eo))ro[no]=mergeClasses(eo[no],...to.map(oo=>oo==null?void 0:oo[no]));return ro},UploadPopover=React.forwardRef(({isUploading:eo,disabled:to,errorMessage:ro,trigger:no=jsxRuntimeExports.jsx(UploadPopoverTrigger,{}),locStrings:oo=defaultUploadPopoverLocStrings,styles:io,events:so,onUpload:ao,onRenderImagePreview:lo},co)=>{const uo=mergeStyleSlots(useStyles$d(),io),{onDelete:fo,onInputBlur:ho,onPaste:po,onLocalUpload:go}=so??{};React.useImperativeHandle(co,()=>({open(){yo(!0)},close(){yo(!1)},reset:()=>{Co()},retrieve:()=>Eo}));const[vo,yo]=React.useState(!1),[xo,_o]=React.useState(""),[Eo,So]=React.useState(void 0),ko=React.useRef(null),Ao=React.useCallback((Mo,Po)=>{yo(Po.open||!1)},[]),Co=React.useCallback(()=>{_o(""),So(void 0),ko.current&&(ko.current.value="")},[]),Oo=React.useCallback(Mo=>{const Po=Mo[0];So(Po),po==null||po(Po)},[po]),wo=React.useCallback(Mo=>{Mo.clipboardData.files&&Oo&&Oo(Mo.clipboardData.files)},[Oo]),Ro=React.useCallback(()=>{ho==null||ho(xo),So(xo)},[xo,ho]),Do=React.useCallback(()=>{Eo&&ao(Eo)},[Eo,ao]),$o=React.useMemo(()=>lo?lo({cachedImage:Eo,customerInputContent:xo,isReadonly:to||eo||!1}):jsxRuntimeExports.jsx(UploadPopoverImagePreview,{image:Eo||xo,alt:xo||"",isReadonly:eo,onClickDelete:()=>{Co(),fo==null||fo()}}),[xo,Eo,Co,to,eo,fo,lo]);return jsxRuntimeExports.jsxs(Popover,{positioning:"above-end",open:vo,onOpenChange:Ao,children:[jsxRuntimeExports.jsx(PopoverTrigger,{disableButtonEnhancement:!0,children:no}),jsxRuntimeExports.jsxs(PopoverSurface,{className:uo.attachUploadPopover,children:[jsxRuntimeExports.jsxs("div",{className:uo.attachUploadHeader,children:[jsxRuntimeExports.jsx("span",{children:oo.AddAnImage}),jsxRuntimeExports.jsx(Button$2,{as:"button",disabled:to,appearance:"transparent",icon:jsxRuntimeExports.jsx(Dismiss24Regular,{}),onClick:()=>{yo(!1)}})]}),jsxRuntimeExports.jsxs("div",{className:uo.attachUploadInputWrapper,children:[Eo?$o:jsxRuntimeExports.jsx(Input,{className:uo.attachUploadInput,value:xo,disabled:to,placeholder:oo.PasteImageOrLinkHere,onChange:(Mo,Po)=>{So(void 0),_o(Po.value)},onPaste:wo,onBlur:Ro}),jsxRuntimeExports.jsx(Button$2,{as:"button",disabled:to||eo||!Eo&&!xo,className:uo.addButton,onClick:Do,children:eo?jsxRuntimeExports.jsx(Spinner,{size:"tiny"}):oo.Add})]}),ro&&jsxRuntimeExports.jsx("div",{className:uo.errorMessage,children:ro}),jsxRuntimeExports.jsx("input",{tabIndex:-1,"aria-hidden":!0,ref:ko,disabled:to,className:uo.invisibleFileInput,onChange:Mo=>{var Bo;const Po=(Bo=Mo.target.files)==null?void 0:Bo[0];Po&&(go==null||go(Po)),So(Po)},type:"file",accept:"image/*"}),jsxRuntimeExports.jsx("div",{className:uo.triggerUploadButton,children:jsxRuntimeExports.jsx(Button$2,{as:"button",disabled:to,appearance:"transparent",icon:jsxRuntimeExports.jsx(ArrowUpload24Regular,{}),onClick:()=>{var Mo;(Mo=ko.current)==null||Mo.click()},children:oo.UploadFromThisDevice})})]})]})});UploadPopover.displayName="UploadPopover";const useStyles$d=makeStyles({attachUploadPopover:{width:"400px",backgroundColor:tokens.colorNeutralBackground1,...shorthands.padding("12px")},attachUploadHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",fontWeight:500,fontSize:"16px",lineHeight:"22px"},attachUploadInputWrapper:{marginTop:"8px",display:"flex",columnGap:"8px",justifyContent:"space-between"},attachUploadInput:{flexGrow:1},addButton:{minWidth:"52px"},errorMessage:{color:tokens.colorPaletteRedBackground3},invisibleFileInput:{display:"none"},triggerUploadButton:{marginTop:"8px",display:"flex",justifyContent:"space-between"}});function DefaultMessageContentRenderer(eo){const{content:to,className:ro}=eo,no=useStyles$c(),oo=mergeClasses(no.content,ro);if(typeof to=="string")return jsxRuntimeExports.jsx("p",{className:oo,children:to});const io=JSON.stringify(to,null,2);return jsxRuntimeExports.jsx("pre",{className:oo,children:io})}DefaultMessageContentRenderer.displayName="DefaultMessageContentRenderer";const useStyles$c=makeStyles({content:{...shorthands.overflow("auto"),wordBreak:"break-all",whiteSpace:"break-spaces"}});function DefaultMessageErrorRenderer(eo){const{error:to,locStrings:ro,className:no}=eo,[oo,io]=React.useState(!1),so=useStyles$b(),ao=mergeClasses(so.errorMessageDetail,!oo&&so.errorMessageDetailHidden);return jsxRuntimeExports.jsxs("div",{className:no,children:[jsxRuntimeExports.jsx(Link$1,{onClick:()=>io(lo=>!lo),children:oo?ro.MessageError_HideDetail:ro.MessageError_ShowDetail}),jsxRuntimeExports.jsx("p",{className:ao,children:to})]})}DefaultMessageErrorRenderer.displayName="DefaultMessageErrorRenderer";const useStyles$b=makeStyles({errorMessageDetail:{...shorthands.margin("8px","0","0","0"),...shorthands.borderTop("1px","solid",tokens.colorPaletteDarkRedBorderActive),wordBreak:"break-word",whiteSpace:"break-spaces"},errorMessageDetailHidden:{display:"none"}}),useToolbarDefaultActions=()=>React.useMemo(()=>[],[]);function DefaultMessageActionBarRenderer(eo){const{useMessageActions:to=useToolbarDefaultActions,data:ro,className:no}=eo,oo=to(ro),io=useStyles$a(),so=React.useMemo(()=>{const co=oo.filter(fo=>!fo.condition||fo.condition(ro)).sort((fo,ho)=>fo.group-ho.group),uo=[];for(let fo=0,ho;fo0))return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});const lo=[];for(let co=0;coyo(ro)},ho)},ho))}co+1{ro>0&&oo(ro-1)},ao=()=>{ro=Bo?Po:""+Array(Bo+1-Fo.length).join(No)+Po},So={s:Eo,z:function(Po){var Bo=-Po.utcOffset(),No=Math.abs(Bo),Fo=Math.floor(No/60),zo=No%60;return(Bo<=0?"+":"-")+Eo(Fo,2,"0")+":"+Eo(zo,2,"0")},m:function Po(Bo,No){if(Bo.date()1)return Po(Go[0])}else{var Qo=Bo.name;Ao[Qo]=Bo,zo=Qo}return!Fo&&zo&&(ko=zo),zo||!Fo&&ko},Ro=function(Po,Bo){if(Oo(Po))return Po.clone();var No=typeof Bo=="object"?Bo:{};return No.date=Po,No.args=arguments,new $o(No)},Do=So;Do.l=wo,Do.i=Oo,Do.w=function(Po,Bo){return Ro(Po,{locale:Bo.$L,utc:Bo.$u,x:Bo.$x,$offset:Bo.$offset})};var $o=function(){function Po(No){this.$L=wo(No.locale,null,!0),this.parse(No),this.$x=this.$x||No.x||{},this[Co]=!0}var Bo=Po.prototype;return Bo.parse=function(No){this.$d=function(Fo){var zo=Fo.date,qo=Fo.utc;if(zo===null)return new Date(NaN);if(Do.u(zo))return new Date;if(zo instanceof Date)return new Date(zo);if(typeof zo=="string"&&!/Z$/i.test(zo)){var Go=zo.match(yo);if(Go){var Qo=Go[2]-1||0,Zo=(Go[7]||"0").substring(0,3);return qo?new Date(Date.UTC(Go[1],Qo,Go[3]||1,Go[4]||0,Go[5]||0,Go[6]||0,Zo)):new Date(Go[1],Qo,Go[3]||1,Go[4]||0,Go[5]||0,Go[6]||0,Zo)}}return new Date(zo)}(No),this.init()},Bo.init=function(){var No=this.$d;this.$y=No.getFullYear(),this.$M=No.getMonth(),this.$D=No.getDate(),this.$W=No.getDay(),this.$H=No.getHours(),this.$m=No.getMinutes(),this.$s=No.getSeconds(),this.$ms=No.getMilliseconds()},Bo.$utils=function(){return Do},Bo.isValid=function(){return this.$d.toString()!==vo},Bo.isSame=function(No,Fo){var zo=Ro(No);return this.startOf(Fo)<=zo&&zo<=this.endOf(Fo)},Bo.isAfter=function(No,Fo){return Ro(No){const{duration:to,tokens:ro,locStrings:no,className:oo}=eo,io=to.toFixed(2).replace(/\.?0*$/,"");return jsxRuntimeExports.jsxs("div",{className:oo,children:[ro>0&&jsxRuntimeExports.jsxs(React.Fragment,{children:[`${no.MessageStatus_TokensDesc}: `,jsxRuntimeExports.jsx("b",{children:ro}),` ${no.MessageStatus_TokensUint}, `]}),`${ro>0?no.MessageStatus_TimeSpentDesc:no.MessageStatus_TimeSpentDscCapitalized}: `,jsxRuntimeExports.jsx("b",{children:io}),` ${no.MessageStatus_TimeSpent_Unit}`]})};DefaultMessageStatusRenderer.displayName="DefaultMessageStatusRenderer";const EMPTY_CONTEXTUAL_MENU_ITEMS$1=[],defaultUseContextualMenuItems$1=eo=>EMPTY_CONTEXTUAL_MENU_ITEMS$1;function DefaultMessageBubbleRenderer(eo){const{MessageAvatarRenderer:to,MessageContentRenderer:ro=DefaultMessageContentRenderer,MessageErrorRenderer:no=DefaultMessageErrorRenderer,MessageSenderRenderer:oo=DefaultMessageSenderRenderer,MessagePaginationRenderer:io=DefaultMessagePaginationRenderer,MessageActionBarRenderer:so=DefaultMessageActionBarRenderer,MessageStatusRenderer:ao=DefaultMessageStatusRenderer,useMessageContextualMenuItems:lo=defaultUseContextualMenuItems$1,useMessageActions:co,initialPage:uo=-1,locStrings:fo,message:ho,className:po}=eo,go=useStyles$8(),[vo,yo]=React.useState((uo%ho.history.length+ho.history.length)%ho.history.length),[xo,_o]=React.useState(!1),Eo=React.useRef(null),So=React.useRef(null),ko=React.useCallback(()=>{_o(!1)},[]),Ao=React.useCallback(Do=>{const $o=Eo.current,Mo=So.current;if($o&&Mo){const Po=Do.clientX,Bo=Do.clientY,No=$o.getBoundingClientRect(),Fo=No.left+window.scrollX,zo=No.top+window.scrollY,qo=Po-Fo,Go=Bo-zo;Mo.style.left=`${qo}px`,Mo.style.top=`${Go}px`}},[]),Co=React.useCallback(Do=>{Do.preventDefault(),Ao(Do),_o(!0)},[]),Oo=ho.history[vo],wo=Oo.category===ChatMessageCategory.User?"right":"left",Ro=lo(Oo);return React.useEffect(()=>{const Do=()=>{_o(!1)};return document.addEventListener("mousedown",Do),()=>document.removeEventListener("mousedown",Do)},[]),jsxRuntimeExports.jsx("div",{className:go.container,"data-chatbox-locator":ChatboxLocator.MessageBubble,"data-position":wo,children:jsxRuntimeExports.jsxs("div",{className:mergeClasses(go.message,po),"data-position":wo,children:[jsxRuntimeExports.jsx("div",{className:go.avatar,children:to&&jsxRuntimeExports.jsx(to,{data:Oo,position:wo})}),jsxRuntimeExports.jsxs("div",{className:go.main,children:[jsxRuntimeExports.jsx("div",{className:go.sender,children:jsxRuntimeExports.jsx(oo,{data:Oo,position:wo})}),jsxRuntimeExports.jsxs("div",{ref:Eo,className:go.content,"data-category":Oo.category,"data-chatbox-locator":ChatboxLocator.MessageContent,onContextMenu:Co,onClick:Ao,children:[jsxRuntimeExports.jsx(ro,{content:Oo.content,data:Oo,className:go.contentMain}),Oo.error&&jsxRuntimeExports.jsx(no,{error:Oo.error,locStrings:fo,className:go.error}),typeof Oo.duration=="number"&&typeof Oo.tokens=="number"&&jsxRuntimeExports.jsx(ao,{duration:Oo.duration,tokens:Oo.tokens,locStrings:fo,className:go.status}),ho.history.length>1&&jsxRuntimeExports.jsx(io,{className:go.pagination,message:ho,current:vo,setCurrent:yo}),jsxRuntimeExports.jsx("div",{ref:So,className:go.contentMenuAnchor}),Ro.length>0&&jsxRuntimeExports.jsx(ContextualMenu,{items:Ro,hidden:!xo,target:So,onItemClick:ko,onDismiss:ko,className:go.contextualMenu}),jsxRuntimeExports.jsx("div",{className:go.actionBar,"data-chatbox-locator":ChatboxLocator.MessageActionBar,children:jsxRuntimeExports.jsx(so,{data:Oo,locStrings:fo,useMessageActions:co})})]})]})]})})}DefaultMessageBubbleRenderer.displayName="DefaultMessageBubbleRenderer";const useStyles$8=makeStyles({container:{...shorthands.margin("16px","0"),display:"flex",justifyContent:"flex-start",'&&[data-position="right"]':{justifyContent:"flex-end"},width:"100%"},message:{display:"flex",flexDirection:"row",'&&[data-position="right"]':{flexDirection:"row-reverse"},maxWidth:"calc(100% - 80px)"},avatar:{...shorthands.flex(0,0,"auto")},main:{...shorthands.flex(1,1,"auto"),display:"flex",flexDirection:"column",width:"100%"},sender:{...shorthands.flex(0,0,"auto")},content:{...shorthands.flex(1,1,"auto"),...shorthands.borderRadius("4px"),position:"relative",boxSizing:"border-box",minWidth:"48px",wordBreak:"break-word",lineHeight:"22px","> p":{...shorthands.margin(0)},[`&:hover > ${ChatboxSelector.MessageActionBar}`]:{display:"flex",visibility:"visible"},[`&&[data-category="${ChatMessageCategory.System}"]`]:{color:tokens.colorNeutralForeground4},[`&&[data-category="${ChatMessageCategory.Error}"]`]:{backgroundColor:tokens.colorPaletteRedBackground2,color:tokens.colorNeutralForeground1},[`&&[data-category="${ChatMessageCategory.Chatbot}"]`]:{backgroundColor:tokens.colorNeutralBackground4,color:tokens.colorNeutralForeground1},[`&&[data-category="${ChatMessageCategory.User}"]`]:{backgroundColor:tokens.colorBrandBackground2,color:tokens.colorNeutralForeground1}},contentMain:{...shorthands.padding("12px","20px","12px","12px")},contextualMenu:{width:"auto",minWidth:"180px"},contentMenuAnchor:{position:"absolute",top:"0px",left:"0px"},error:{...shorthands.padding("0px","20px","12px","12px")},pagination:{},status:{...shorthands.borderTop("1px","solid",tokens.colorNeutralStroke1),...shorthands.padding("0px","20px","0px","12px"),fontSize:"12px",fontStyle:"italic"},actionBar:{position:"absolute",right:"0px",top:"-32px",display:"none",justifyContent:"space-between"}});function DefaultSessionSplitRenderer(eo){const{locStrings:to,className:ro}=eo,no=useStyles$7();return jsxRuntimeExports.jsx("div",{className:mergeClasses(no.sessionSplit,ro),children:jsxRuntimeExports.jsxs("span",{children:["--- ",to.SessionSplit_Desc," ---"]})})}DefaultSessionSplitRenderer.displayName="DefaultSessionSplitRenderer";const useStyles$7=makeStyles({sessionSplit:{display:"flex",justifyContent:"center",height:"24px",color:tokens.colorNeutralForeground4}});makeStyles({hintTyping:{...shorthands.overflow("hidden"),width:"1px",height:"1px"},typingDots:{...shorthands.transition("opacity","0.1s"),display:"flex",alignItems:"center",height:"22.5px"},typingDot:{...shorthands.borderRadius("50%"),...shorthands.margin("0","0","0","6px"),display:"inline-block",width:"6px",height:"6px",backgroundColor:tokens.colorNeutralStroke1,animationDuration:"1.5s",animationTimingFunction:"linear",animationIterationCount:"infinite",animationName:{"0%":{transform:"scale(1)"},"16.67%":{transform:"scale(0)"},"33.33%":{transform:"scale(0)"},"50%":{transform:"scale(0)"},"66.67%":{transform:"scale(1)"},"83.33%":{transform:"scale(1)"},"100%":{transform:"scale(1)"}},"&:nth-child(1)":{...shorthands.margin("0px")},"&:nth-child(2)":{animationDelay:"0.18s"},"&:nth-child(3)":{animationDelay:"0.36s"}}});makeStyles({toolbar:{display:"flex",justifyContent:"flex-end"}});makeStyles({input:{...shorthands.border("1px","solid",tokens.colorNeutralBackground5),...shorthands.borderRadius("4px"),boxSizing:"border-box",display:"grid",gridTemplateRows:"1fr auto"},editor:{boxSizing:"border-box"},editorInner:{...shorthands.border("0px"),boxSizing:"border-box"},editorToolbar:{boxSizing:"border-box",display:"flex",alignItems:"flex-end",justifyContent:"flex-end",height:"100%"}});function MessageListRenderer(eo){const{MessageAvatarRenderer:to,MessageContentRenderer:ro,MessageErrorRenderer:no,MessageSenderRenderer:oo,MessageBubbleRenderer:io=DefaultMessageBubbleRenderer,SessionSplitRenderer:so=DefaultSessionSplitRenderer,className:ao,bubbleClassName:lo,sessionSplitClassName:co,locStrings:uo,messages:fo,useMessageContextualMenuItems:ho,useMessageActions:po}=eo,go=useStyles$6();return jsxRuntimeExports.jsx("div",{className:mergeClasses(go.container,ao),"data-chatbox-locator":ChatboxLocator.MessageList,children:fo.map(vo=>{switch(vo.type){case ChatMessageType.Message:return jsxRuntimeExports.jsx(io,{MessageAvatarRenderer:to,MessageContentRenderer:ro,MessageErrorRenderer:no,MessageSenderRenderer:oo,locStrings:uo,message:vo,className:lo,useMessageContextualMenuItems:ho,useMessageActions:po},vo.id);case ChatMessageType.SessionSplit:return jsxRuntimeExports.jsx(so,{locStrings:uo,className:co},vo.id);default:return jsxRuntimeExports.jsx(React.Fragment,{},vo.id)}})})}MessageListRenderer.displayName="MessageListRenderer";const useStyles$6=makeStyles({container:{boxSizing:"border-box"}}),ov=class ov extends React.PureComponent{render(){const{elements:to,deltaH:ro,deltaW:no,scaleH:oo,scaleW:io,className:so,elementClassName:ao,renderElement:lo}=this.props;return jsxRuntimeExports.jsx("div",{className:so,children:to.map((co,uo)=>{const fo=(co.top-ro)*oo,ho=(co.left-no)*io,po=co.height*oo,go=co.width*io,vo={top:fo,left:ho,height:po,width:go};return co.backgroundColor&&(vo.backgroundColor=co.backgroundColor),lo?lo(co,uo,ao,vo):jsxRuntimeExports.jsx("div",{className:ao,style:vo},uo)})})}};ov.displayName="MinimapOverview";let MinimapOverview=ov;const MinimapViewport=eo=>{const{scaleH:to,sourceRootRef:ro,sourceQuerySelector:no,className:oo}=eo,[io,so]=React.useState(0),[ao,lo]=React.useState(0),co=useStyles$5();return React.useLayoutEffect(()=>{var po,go;const uo=(go=(po=ro.current)==null?void 0:po.querySelector(no))==null?void 0:go.parentElement;if(!uo)return()=>{};const{height:fo}=uo.getBoundingClientRect();lo(fo);const ho=()=>{so(uo.scrollTop||0)};return uo.addEventListener("scroll",ho),()=>uo.removeEventListener("scroll",ho)},[ro.current]),jsxRuntimeExports.jsx("div",{className:mergeClasses(co.viewport,oo),style:{position:"absolute",top:io*to,height:`${ao*to}px`}})};MinimapViewport.displayName="MinimapViewport";const useStyles$5=makeStyles({viewport:{display:"block",width:"100%",left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.15)"}}),Minimap=eo=>{const{SCROLL_DELTA_THRESHOLD:to=5,syncScale:ro=!0,sourceRootRef:no,sourceQuerySelector:oo,sourceElementQuerySelector:io,className:so,overviewClassName:ao,overviewElementClassName:lo,viewportClassName:co,getElementBackgroundColor:uo,renderElement:fo,style:ho}=eo,[po,go]=React.useState([]),[vo,yo]=React.useState(0),[xo,_o]=React.useState(0),[Eo,So]=React.useState(0),[ko,Ao]=React.useState(0),[Co,Oo]=React.useState(0),[wo,Ro]=React.useState(0),[Do,$o]=React.useState(0),[Mo,Po]=React.useState(0),Bo=ko<=0?0:xo/ko||.1,No=Eo<=0?0:ro?Math.max(1/Eo,Math.min(Bo,(vo-10)/Eo||.1)):Math.max(1/Eo,(vo-10)/Eo||.1),Fo=React.useRef(null),zo=React.useRef(null),qo=React.useRef(!1),Go=useEventCallback$1(Rs=>{var $s,Os;if(Rs.preventDefault(),Rs.stopPropagation(),qo.current=!0,!zo.current)return;const Ts=(Os=($s=no.current)==null?void 0:$s.querySelector(oo))==null?void 0:Os.parentElement;if(Ts){const Ks=(Rs.clientY-zo.current.getBoundingClientRect().top)/No;Math.abs(Ts.scrollTop-Ks)>to&&(Ts.scrollTop=Ks)}}),Qo=useEventCallback$1(Rs=>{var $s,Os;if(Rs.preventDefault(),Rs.stopPropagation(),!qo.current||!zo.current)return;const Ts=(Os=($s=no.current)==null?void 0:$s.querySelector(oo))==null?void 0:Os.parentElement;if(Ts){const Ks=(Rs.clientY-zo.current.getBoundingClientRect().top)/No;Math.abs(Ts.scrollTop-Ks)>to&&(Ts.scrollTop=Ks)}}),Zo=React.useCallback(Rs=>{const Ts=Rs.querySelector(oo);if(!Ts)return;const $s=Ts.querySelectorAll(io),Os=[];for(let Ks=0;Ks<$s.length;++Ks){const Js=$s[Ks],{left:Ys,top:ga,width:$a,height:yl}=Js.getBoundingClientRect(),Ol=uo?uo(Js):window.getComputedStyle(Js).backgroundColor;Os.push({left:Ys,top:ga,width:$a,height:yl,backgroundColor:Ol})}go(Os);const Ls=Ts.getBoundingClientRect();So(Ls.height),Ao(Ls.width),Oo(Ls.top),Ro(Ls.left),$o(Ts.scrollHeight),Po(Ts.scrollWidth)},[]);React.useLayoutEffect(()=>{const Rs=()=>{qo.current=!1};return document.addEventListener("mouseup",Rs),()=>document.removeEventListener("mouseup",Rs)},[]),React.useLayoutEffect(()=>{const Rs=Fo.current;if(!Rs)return;const{height:Ts,width:$s}=Rs.getBoundingClientRect();yo(Ts),_o($s)},[]),React.useLayoutEffect(()=>{const Rs=no.current;if(!Rs)return()=>{};Zo(Rs);const Ts=new MutationObserver($s=>{for(const Os of $s)Os.type==="childList"&&Zo(Rs)});return Ts.observe(Rs,{childList:!0,subtree:!0}),()=>{Ts.disconnect()}},[no.current,Zo]);const bs=useStyles$4(),ks=Eo+Co-Do,Is=ko+wo-Mo;return jsxRuntimeExports.jsx("div",{ref:Fo,className:mergeClasses(bs.container,so),style:ho,children:jsxRuntimeExports.jsxs("div",{ref:zo,className:bs.minimap,onMouseDown:Go,onMouseMove:Qo,children:[jsxRuntimeExports.jsx(MinimapOverview,{elements:po,deltaH:ks,deltaW:Is,scaleH:No,scaleW:Bo,className:mergeClasses(bs.overview,ao),elementClassName:mergeClasses(bs.minimapElement,lo),renderElement:fo}),jsxRuntimeExports.jsx(MinimapViewport,{scaleH:No,sourceRootRef:no,sourceQuerySelector:oo,className:co})]})})};Minimap.displayName="Minimap";const useStyles$4=makeStyles({container:{height:"100%",width:"100%",...shorthands.overflow("hidden")},minimap:{position:"relative",width:"100%",height:"100%"},overview:{},minimapElement:{position:"absolute",backgroundColor:"#c292f9"}});makeStyles({editor:{...shorthands.padding("8px"),...shorthands.border("1px","solid",tokens.colorNeutralBackground5),...shorthands.borderRadius("4px"),boxSizing:"border-box",display:"block",width:"100%",userSelect:"none",position:"relative",'&[data-disabled="true"]':{backgroundColor:tokens.colorNeutralBackgroundDisabled}},textarea:{...shorthands.padding("0px"),...shorthands.overflow("hidden","auto"),...shorthands.borderWidth(0),...shorthands.outline(0,"solid","transparent"),backgroundColor:"transparent",boxSizing:"border-box",resize:"none",appearance:"none",overflowWrap:"break-word",lineHeight:"24px",height:"24px",width:"100%",wordBreak:"break-all",color:tokens.colorNeutralForeground1,userSelect:"text"}});function e$1(eo){return{}}const t$4={},n$2={},r$1={},i$3={},s$2={},o$5={},l$3={},c$5={},u$5={},a$4={},f$4={},d$4={},h$3={},g$6={},_$5={},p$4={},y$4={},m$5={},x$5={},v$3={},T$3={},S$4={},k$2={},C$5={},b$2={},N$3={},w$3={},E$4={},P$3={},D$2={},I$1={},O$2={},A$3={},L$2={},F$1={},M$3={},W={},z$1={},B$2={},R$2={},K$2={},J={},U={},V={},$$1={};var H$1=function(eo){const to=new URLSearchParams;to.append("code",eo);for(let ro=1;roOe;try{Vi(eo,()=>{const oo=fi()||function(ho){return ho.getEditorState().read(()=>{const po=fi();return po!==null?po.clone():null})}(eo),io=new Map,so=eo.getRootElement(),ao=eo._editorState,lo=eo._blockCursorElement;let co=!1,uo="";for(let ho=0;ho0){let So=0;for(let ko=0;ko0)for(const[ho,po]of io)if(qi(po)){const go=po.getChildrenKeys();let vo=ho.firstChild;for(let yo=0;yo0){for(let ho=0;ho{Be(eo,to,ro)})}function Je(eo,to){const ro=eo.__mode,no=eo.__format,oo=eo.__style,io=to.__mode,so=to.__format,ao=to.__style;return!(ro!==null&&ro!==io||no!==null&&no!==so||oo!==null&&oo!==ao)}function Ue(eo,to){const ro=eo.mergeWithSibling(to),no=Oi()._normalizedNodes;return no.add(eo.__key),no.add(to.__key),ro}function Ve(eo){let to,ro,no=eo;if(no.__text!==""||!no.isSimpleText()||no.isUnmergeable()){for(;(to=no.getPreviousSibling())!==null&&Br(to)&&to.isSimpleText()&&!to.isUnmergeable();){if(to.__text!==""){if(Je(to,no)){no=Ue(to,no);break}break}to.remove()}for(;(ro=no.getNextSibling())!==null&&Br(ro)&&ro.isSimpleText()&&!ro.isUnmergeable();){if(ro.__text!==""){if(Je(no,ro)){no=Ue(no,ro);break}break}ro.remove()}}else no.remove()}function $e(eo){return He(eo.anchor),He(eo.focus),eo}function He(eo){for(;eo.type==="element";){const to=eo.getNode(),ro=eo.offset;let no,oo;if(ro===to.getChildrenSize()?(no=to.getChildAtIndex(ro-1),oo=!0):(no=to.getChildAtIndex(ro),oo=!1),Br(no)){eo.set(no.__key,oo?no.getTextContentSize():0,"text");break}if(!qi(no))break;eo.set(no.__key,oo?no.getChildrenSize():0,"element")}}let je=1;const qe=typeof queueMicrotask=="function"?queueMicrotask:eo=>{Promise.resolve().then(eo)};function Qe(eo){const to=document.activeElement;if(to===null)return!1;const ro=to.nodeName;return Hi(at$1(eo))&&(ro==="INPUT"||ro==="TEXTAREA"||to.contentEditable==="true"&&to.__lexicalEditor==null)}function Xe(eo,to,ro){const no=eo.getRootElement();try{return no!==null&&no.contains(to)&&no.contains(ro)&&to!==null&&!Qe(to)&&Ye(to)===eo}catch{return!1}}function Ye(eo){let to=eo;for(;to!=null;){const ro=to.__lexicalEditor;if(ro!=null)return ro;to=Jt(to)}return null}function Ze(eo){return eo.isToken()||eo.isSegmented()}function Ge(eo){return eo.nodeType===se}function et(eo){let to=eo;for(;to!=null;){if(Ge(to))return to;to=to.firstChild}return null}function tt(eo,to,ro){const no=be[to];if(ro!==null&&(eo&no)==(ro&no))return eo;let oo=eo^no;return to==="subscript"?oo&=~be.superscript:to==="superscript"&&(oo&=~be.subscript),oo}function nt(eo){return Br(eo)||vr(eo)||Hi(eo)}function rt(eo,to){if(to!=null)return void(eo.__key=to);Pi(),Di();const ro=Oi(),no=Ii(),oo=""+je++;no._nodeMap.set(oo,eo),qi(eo)?ro._dirtyElements.set(oo,!0):ro._dirtyLeaves.add(oo),ro._cloneNotNeeded.add(oo),ro._dirtyType=le,eo.__key=oo}function it(eo){const to=eo.getParent();if(to!==null){const ro=eo.getWritable(),no=to.getWritable(),oo=eo.getPreviousSibling(),io=eo.getNextSibling();if(oo===null)if(io!==null){const so=io.getWritable();no.__first=io.__key,so.__prev=null}else no.__first=null;else{const so=oo.getWritable();if(io!==null){const ao=io.getWritable();ao.__prev=so.__key,so.__next=ao.__key}else so.__next=null;ro.__prev=null}if(io===null)if(oo!==null){const so=oo.getWritable();no.__last=oo.__key,so.__next=null}else no.__last=null;else{const so=io.getWritable();if(oo!==null){const ao=oo.getWritable();ao.__next=so.__key,so.__prev=ao.__key}else so.__prev=null;ro.__next=null}no.__size--,ro.__parent=null}}function st$1(eo){Di();const to=eo.getLatest(),ro=to.__parent,no=Ii(),oo=Oi(),io=no._nodeMap,so=oo._dirtyElements;ro!==null&&function(lo,co,uo){let fo=lo;for(;fo!==null;){if(uo.has(fo))return;const ho=co.get(fo);if(ho===void 0)break;uo.set(fo,!1),fo=ho.__parent}}(ro,io,so);const ao=to.__key;oo._dirtyType=le,qi(eo)?so.set(ao,!0):oo._dirtyLeaves.add(ao)}function ot(eo){Pi();const to=Oi(),ro=to._compositionKey;if(eo!==ro){if(to._compositionKey=eo,ro!==null){const no=ct$1(ro);no!==null&&no.getWritable()}if(eo!==null){const no=ct$1(eo);no!==null&&no.getWritable()}}}function lt$1(){return Ei()?null:Oi()._compositionKey}function ct$1(eo,to){const ro=(to||Ii())._nodeMap.get(eo);return ro===void 0?null:ro}function ut$1(eo,to){const ro=eo[`__lexicalKey_${Oi()._key}`];return ro!==void 0?ct$1(ro,to):null}function at$1(eo,to){let ro=eo;for(;ro!=null;){const no=ut$1(ro,to);if(no!==null)return no;ro=Jt(ro)}return null}function ft$1(eo){const to=eo._decorators,ro=Object.assign({},to);return eo._pendingDecorators=ro,ro}function dt$1(eo){return eo.read(()=>ht$1().getTextContent())}function ht$1(){return gt$1(Ii())}function gt$1(eo){return eo._nodeMap.get("root")}function _t(eo){Pi();const to=Ii();eo!==null&&(eo.dirty=!0,eo.setCachedNodes(null)),to._selection=eo}function pt$1(eo){const to=Oi(),ro=function(no,oo){let io=no;for(;io!=null;){const so=io[`__lexicalKey_${oo._key}`];if(so!==void 0)return so;io=Jt(io)}return null}(eo,to);return ro===null?eo===to.getRootElement()?ct$1("root"):null:ct$1(ro)}function yt$1(eo,to){return to?eo.getTextContentSize():0}function mt$1(eo){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(eo)}function xt$1(eo){const to=[];let ro=eo;for(;ro!==null;)to.push(ro),ro=ro._parentEditor;return to}function vt$1(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Tt(eo){return eo.nodeType===se?eo.nodeValue:null}function St(eo,to,ro){const no=nn(to._window);if(no===null)return;const oo=no.anchorNode;let{anchorOffset:io,focusOffset:so}=no;if(oo!==null){let ao=Tt(oo);const lo=at$1(oo);if(ao!==null&&Br(lo)){if(ao===me&&ro){const co=ro.length;ao=ro,io=co,so=co}ao!==null&&kt(lo,ao,io,so,eo)}}}function kt(eo,to,ro,no,oo){let io=eo;if(io.isAttached()&&(oo||!io.isDirty())){const so=io.isComposing();let ao=to;(so||oo)&&to[to.length-1]===me&&(ao=to.slice(0,-1));const lo=io.getTextContent();if(oo||ao!==lo){if(ao===""){if(ot(null),Z||G||re)io.remove();else{const vo=Oi();setTimeout(()=>{vo.update(()=>{io.isAttached()&&io.remove()})},20)}return}const co=io.getParent(),uo=di(),fo=io.getTextContentSize(),ho=lt$1(),po=io.getKey();if(io.isToken()||ho!==null&&po===ho&&!so||Xr(uo)&&(co!==null&&!co.canInsertTextBefore()&&uo.anchor.offset===0||uo.anchor.key===eo.__key&&uo.anchor.offset===0&&!io.canInsertTextBefore()&&!so||uo.focus.key===eo.__key&&uo.focus.offset===fo&&!io.canInsertTextAfter()&&!so))return void io.markDirty();const go=fi();if(!Xr(go)||ro===null||no===null)return void io.setTextContent(ao);if(go.setTextNodeRange(io,ro,io,no),io.isSegmented()){const vo=zr(io.getTextContent());io.replace(vo),io=vo}io.setTextContent(ao)}}}function Ct$1(eo,to){if(to.isSegmented())return!0;if(!eo.isCollapsed())return!1;const ro=eo.anchor.offset,no=to.getParentOrThrow(),oo=to.isToken();return ro===0?!to.canInsertTextBefore()||!no.canInsertTextBefore()||oo||function(io){const so=io.getPreviousSibling();return(Br(so)||qi(so)&&so.isInline())&&!so.canInsertTextAfter()}(to):ro===to.getTextContentSize()&&(!to.canInsertTextAfter()||!no.canInsertTextAfter()||oo)}function bt(eo){return eo===37}function Nt$1(eo){return eo===39}function wt$1(eo,to){return Q?eo:to}function Et$1(eo){return eo===13}function Pt$1(eo){return eo===8}function Dt$1(eo){return eo===46}function It(eo,to,ro){return eo===65&&wt$1(to,ro)}function Ot$1(){const eo=ht$1();_t($e(eo.select(0,eo.getChildrenSize())))}function At$1(eo,to){eo.__lexicalClassNameCache===void 0&&(eo.__lexicalClassNameCache={});const ro=eo.__lexicalClassNameCache,no=ro[to];if(no!==void 0)return no;const oo=eo[to];if(typeof oo=="string"){const io=Ie(oo);return ro[to]=io,io}return oo}function Lt(eo,to,ro,no,oo){if(ro.size===0)return;const io=no.__type,so=no.__key,ao=to.get(io);ao===void 0&&H$1(33,io);const lo=ao.klass;let co=eo.get(lo);co===void 0&&(co=new Map,eo.set(lo,co));const uo=co.get(so),fo=uo==="destroyed"&&oo==="created";(uo===void 0||fo)&&co.set(so,fo?"updated":oo)}function Ft(eo){const to=Ii(),ro=to._readOnly,no=eo.getType(),oo=to._nodeMap,io=[];for(const[,so]of oo)so instanceof eo&&so.__type===no&&(ro||so.isAttached())&&io.push(so);return io}function Mt(eo,to,ro){const no=eo.getParent();let oo=ro,io=eo;return no!==null&&(to&&ro===0?(oo=io.getIndexWithinParent(),io=no):to||ro!==io.getChildrenSize()||(oo=io.getIndexWithinParent()+1,io=no)),io.getChildAtIndex(to?oo-1:oo)}function Wt(eo,to){const ro=eo.offset;if(eo.type==="element")return Mt(eo.getNode(),to,ro);{const no=eo.getNode();if(to&&ro===0||!to&&ro===no.getTextContentSize()){const oo=to?no.getPreviousSibling():no.getNextSibling();return oo===null?Mt(no.getParentOrThrow(),to,no.getIndexWithinParent()+(to?0:1)):oo}}return null}function zt(eo){const to=Ht(eo).event,ro=to&&to.inputType;return ro==="insertFromPaste"||ro==="insertFromPasteAsQuotation"}function Bt(eo,to,ro){return Ki(eo,to,ro)}function Rt(eo){return!Yi(eo)&&!eo.isLastChild()&&!eo.isInline()}function Kt(eo,to){const ro=eo._keyToDOMMap.get(to);return ro===void 0&&H$1(75,to),ro}function Jt(eo){const to=eo.assignedSlot||eo.parentElement;return to!==null&&to.nodeType===11?to.host:to}function Ut(eo){return Oi()._updateTags.has(eo)}function Vt(eo){Pi(),Oi()._updateTags.add(eo)}function $t(eo,to){let ro=eo.getParent();for(;ro!==null;){if(ro.is(to))return!0;ro=ro.getParent()}return!1}function Ht(eo){const to=eo._window;return to===null&&H$1(78),to}function jt(eo){return qi(eo)&&eo.isInline()||Hi(eo)&&eo.isInline()}function qt(eo){let to=eo.getParentOrThrow();for(;to!==null;){if(Qt(to))return to;to=to.getParentOrThrow()}return to}function Qt(eo){return Yi(eo)||qi(eo)&&eo.isShadowRoot()}function Xt(eo){const to=eo.constructor.clone(eo);return rt(to,null),to}function Yt(eo){const to=Oi(),ro=eo.constructor.getType(),no=to._nodes.get(ro);no===void 0&&H$1(97);const oo=no.replace;if(oo!==null){const io=oo(eo);return io instanceof eo.constructor||H$1(98),io}return eo}function Zt(eo,to){!Yi(eo.getParent())||qi(to)||Hi(to)||H$1(99)}function Gt(eo){return(Hi(eo)||qi(eo)&&!eo.canBeEmpty())&&!eo.isInline()}function en(eo,to,ro){ro.style.removeProperty("caret-color"),to._blockCursorElement=null;const no=eo.parentElement;no!==null&&no.removeChild(eo)}function tn(eo,to,ro){let no=eo._blockCursorElement;if(Xr(ro)&&ro.isCollapsed()&&ro.anchor.type==="element"&&to.contains(document.activeElement)){const oo=ro.anchor,io=oo.getNode(),so=oo.offset;let ao=!1,lo=null;if(so===io.getChildrenSize())Gt(io.getChildAtIndex(so-1))&&(ao=!0);else{const co=io.getChildAtIndex(so);if(Gt(co)){const uo=co.getPreviousSibling();(uo===null||Gt(uo))&&(ao=!0,lo=eo.getElementByKey(co.__key))}}if(ao){const co=eo.getElementByKey(io.__key);return no===null&&(eo._blockCursorElement=no=function(uo){const fo=uo.theme,ho=document.createElement("div");ho.contentEditable="false",ho.setAttribute("data-lexical-cursor","true");let po=fo.blockCursor;if(po!==void 0){if(typeof po=="string"){const go=Ie(po);po=fo.blockCursor=go}po!==void 0&&ho.classList.add(...po)}return ho}(eo._config)),to.style.caretColor="transparent",void(lo===null?co.appendChild(no):co.insertBefore(no,lo))}}no!==null&&en(no,eo,to)}function nn(eo){return j?(eo||window).getSelection():null}function rn(eo,to){let ro=eo.getChildAtIndex(to);ro==null&&(ro=eo),Qt(eo)&&H$1(102);const no=so=>{const ao=so.getParentOrThrow(),lo=Qt(ao),co=so!==ro||lo?Xt(so):so;if(lo)return qi(so)&&qi(co)||H$1(133),so.insertAfter(co),[so,co,co];{const[uo,fo,ho]=no(ao),po=so.getNextSiblings();return ho.append(co,...po),[uo,fo,co]}},[oo,io]=no(ro);return[oo,io]}function sn(eo){return on(eo)&&eo.tagName==="A"}function on(eo){return eo.nodeType===1}function ln(eo){if(Hi(eo)&&!eo.isInline())return!0;if(!qi(eo)||Qt(eo))return!1;const to=eo.getFirstChild(),ro=to===null||vr(to)||Br(to)||to.isInline();return!eo.isInline()&&eo.canBeEmpty()!==!1&&ro}function cn(eo,to){let ro=eo;for(;ro!==null&&ro.getParent()!==null&&!to(ro);)ro=ro.getParentOrThrow();return to(ro)?ro:null}function un(){return Oi()}function an(eo,to,ro,no,oo,io){let so=eo.getFirstChild();for(;so!==null;){const ao=so.__key;so.__parent===to&&(qi(so)&&an(so,ao,ro,no,oo,io),ro.has(ao)||io.delete(ao),oo.push(ao)),so=so.getNextSibling()}}let fn,dn,hn,gn,_n,pn,yn,mn,xn,vn,Tn="",Sn="",kn="",Cn=!1,bn=!1,Nn=null;function wn(eo,to){const ro=yn.get(eo);if(to!==null){const no=Vn(eo);no.parentNode===to&&to.removeChild(no)}if(mn.has(eo)||dn._keyToDOMMap.delete(eo),qi(ro)){const no=Bn(ro,yn);En(no,0,no.length-1,null)}ro!==void 0&&Lt(vn,hn,gn,ro,"destroyed")}function En(eo,to,ro,no){let oo=to;for(;oo<=ro;++oo){const io=eo[oo];io!==void 0&&wn(io,no)}}function Pn(eo,to){eo.setProperty("text-align",to)}const Dn="40px";function In(eo,to){const ro=fn.theme.indent;if(typeof ro=="string"){const oo=eo.classList.contains(ro);to>0&&!oo?eo.classList.add(ro):to<1&&oo&&eo.classList.remove(ro)}const no=getComputedStyle(eo).getPropertyValue("--lexical-indent-base-value")||Dn;eo.style.setProperty("padding-inline-start",to===0?"":`calc(${to} * ${no})`)}function On(eo,to){const ro=eo.style;to===0?Pn(ro,""):to===de?Pn(ro,"left"):to===he?Pn(ro,"center"):to===ge?Pn(ro,"right"):to===_e?Pn(ro,"justify"):to===pe?Pn(ro,"start"):to===ye&&Pn(ro,"end")}function An(eo,to,ro){const no=mn.get(eo);no===void 0&&H$1(60);const oo=no.createDOM(fn,dn);if(function(io,so,ao){const lo=ao._keyToDOMMap;so["__lexicalKey_"+ao._key]=io,lo.set(io,so)}(eo,oo,dn),Br(no)?oo.setAttribute("data-lexical-text","true"):Hi(no)&&oo.setAttribute("data-lexical-decorator","true"),qi(no)){const io=no.__indent,so=no.__size;if(io!==0&&In(oo,io),so!==0){const lo=so-1;(function(co,uo,fo,ho){const po=Sn;Sn="",Ln(co,fo,0,uo,ho,null),Wn(fo,ho),Sn=po})(Bn(no,mn),lo,no,oo)}const ao=no.__format;ao!==0&&On(oo,ao),no.isInline()||Mn(null,no,oo),Rt(no)&&(Tn+=xe,kn+=xe)}else{const io=no.getTextContent();if(Hi(no)){const so=no.decorate(dn,fn);so!==null&&Kn(eo,so),oo.contentEditable="false"}else Br(no)&&(no.isDirectionless()||(Sn+=io));Tn+=io,kn+=io}if(to!==null)if(ro!=null)to.insertBefore(oo,ro);else{const io=to.__lexicalLineBreak;io!=null?to.insertBefore(oo,io):to.appendChild(oo)}return Lt(vn,hn,gn,no,"created"),oo}function Ln(eo,to,ro,no,oo,io){const so=Tn;Tn="";let ao=ro;for(;ao<=no;++ao)An(eo[ao],oo,io);Rt(to)&&(Tn+=xe),oo.__lexicalTextContent=Tn,Tn=so+Tn}function Fn(eo,to){const ro=to.get(eo);return vr(ro)||Hi(ro)&&ro.isInline()}function Mn(eo,to,ro){const no=eo!==null&&(eo.__size===0||Fn(eo.__last,yn)),oo=to.__size===0||Fn(to.__last,mn);if(no){if(!oo){const io=ro.__lexicalLineBreak;io!=null&&ro.removeChild(io),ro.__lexicalLineBreak=null}}else if(oo){const io=document.createElement("br");ro.__lexicalLineBreak=io,ro.appendChild(io)}}function Wn(eo,to){const ro=to.__lexicalDirTextContent,no=to.__lexicalDir;if(ro!==Sn||no!==Nn){const io=Sn==="",so=io?Nn:(oo=Sn,ke.test(oo)?"rtl":Ce.test(oo)?"ltr":null);if(so!==no){const ao=to.classList,lo=fn.theme;let co=no!==null?lo[no]:void 0,uo=so!==null?lo[so]:void 0;if(co!==void 0){if(typeof co=="string"){const fo=Ie(co);co=lo[no]=fo}ao.remove(...co)}if(so===null||io&&so==="ltr")to.removeAttribute("dir");else{if(uo!==void 0){if(typeof uo=="string"){const fo=Ie(uo);uo=lo[so]=fo}uo!==void 0&&ao.add(...uo)}to.dir=so}bn||(eo.getWritable().__dir=so)}Nn=so,to.__lexicalDirTextContent=Sn,to.__lexicalDir=so}var oo}function zn(eo,to,ro){const no=Sn;Sn="",function(oo,io,so){const ao=Tn,lo=oo.__size,co=io.__size;if(Tn="",lo===1&&co===1){const uo=oo.__first,fo=io.__first;if(uo===fo)Rn(uo,so);else{const ho=Vn(uo),po=An(fo,null,null);so.replaceChild(po,ho),wn(uo,null)}}else{const uo=Bn(oo,yn),fo=Bn(io,mn);if(lo===0)co!==0&&Ln(fo,io,0,co-1,so,null);else if(co===0){if(lo!==0){const ho=so.__lexicalLineBreak==null;En(uo,0,lo-1,ho?null:so),ho&&(so.textContent="")}}else(function(ho,po,go,vo,yo,xo){const _o=vo-1,Eo=yo-1;let So,ko,Ao=(wo=xo,wo.firstChild),Co=0,Oo=0;for(var wo;Co<=_o&&Oo<=Eo;){const $o=po[Co],Mo=go[Oo];if($o===Mo)Ao=Jn(Rn(Mo,xo)),Co++,Oo++;else{So===void 0&&(So=new Set(po)),ko===void 0&&(ko=new Set(go));const Po=ko.has($o),Bo=So.has(Mo);if(Po)if(Bo){const No=Kt(dn,Mo);No===Ao?Ao=Jn(Rn(Mo,xo)):(Ao!=null?xo.insertBefore(No,Ao):xo.appendChild(No),Rn(Mo,xo)),Co++,Oo++}else An(Mo,xo,Ao),Oo++;else Ao=Jn(Vn($o)),wn($o,xo),Co++}}const Ro=Co>_o,Do=Oo>Eo;if(Ro&&!Do){const $o=go[Eo+1];Ln(go,ho,Oo,Eo,xo,$o===void 0?null:dn.getElementByKey($o))}else Do&&!Ro&&En(po,Co,_o,xo)})(io,uo,fo,lo,co,so)}Rt(io)&&(Tn+=xe),so.__lexicalTextContent=Tn,Tn=ao+Tn}(eo,to,ro),Wn(to,ro),Sn=no}function Bn(eo,to){const ro=[];let no=eo.__first;for(;no!==null;){const oo=to.get(no);oo===void 0&&H$1(101),ro.push(no),no=oo.__next}return ro}function Rn(eo,to){const ro=yn.get(eo);let no=mn.get(eo);ro!==void 0&&no!==void 0||H$1(61);const oo=Cn||pn.has(eo)||_n.has(eo),io=Kt(dn,eo);if(ro===no&&!oo){if(qi(ro)){const so=io.__lexicalTextContent;so!==void 0&&(Tn+=so,kn+=so);const ao=io.__lexicalDirTextContent;ao!==void 0&&(Sn+=ao)}else{const so=ro.getTextContent();Br(ro)&&!ro.isDirectionless()&&(Sn+=so),kn+=so,Tn+=so}return io}if(ro!==no&&oo&&Lt(vn,hn,gn,no,"updated"),no.updateDOM(ro,io,fn)){const so=An(eo,null,null);return to===null&&H$1(62),to.replaceChild(so,io),wn(eo,null),so}if(qi(ro)&&qi(no)){const so=no.__indent;so!==ro.__indent&&In(io,so);const ao=no.__format;ao!==ro.__format&&On(io,ao),oo&&(zn(ro,no,io),Yi(no)||no.isInline()||Mn(ro,no,io)),Rt(no)&&(Tn+=xe,kn+=xe)}else{const so=no.getTextContent();if(Hi(no)){const ao=no.decorate(dn,fn);ao!==null&&Kn(eo,ao)}else Br(no)&&!no.isDirectionless()&&(Sn+=so);Tn+=so,kn+=so}if(!bn&&Yi(no)&&no.__cachedText!==kn){const so=no.getWritable();so.__cachedText=kn,no=so}return io}function Kn(eo,to){let ro=dn._pendingDecorators;const no=dn._decorators;if(ro===null){if(no[eo]===to)return;ro=ft$1(dn)}ro[eo]=to}function Jn(eo){let to=eo.nextSibling;return to!==null&&to===dn._blockCursorElement&&(to=to.nextSibling),to}function Un(eo,to,ro,no,oo,io){Tn="",kn="",Sn="",Cn=no===ce,Nn=null,dn=ro,fn=ro._config,hn=ro._nodes,gn=dn._listeners.mutation,_n=oo,pn=io,yn=eo._nodeMap,mn=to._nodeMap,bn=to._readOnly,xn=new Map(ro._keyToDOMMap);const so=new Map;return vn=so,Rn("root",null),dn=void 0,hn=void 0,_n=void 0,pn=void 0,yn=void 0,mn=void 0,fn=void 0,xn=void 0,vn=void 0,so}function Vn(eo){const to=xn.get(eo);return to===void 0&&H$1(75,eo),to}const $n=Object.freeze({}),Hn=30,jn=[["keydown",function(eo,to){if(qn=eo.timeStamp,Qn=eo.keyCode,to.isComposing())return;const{keyCode:ro,shiftKey:no,ctrlKey:oo,metaKey:io,altKey:so}=eo;Bt(to,_$5,eo)||(function(ao,lo,co,uo){return Nt$1(ao)&&!lo&&!uo&&!co}(ro,oo,so,io)?Bt(to,p$4,eo):function(ao,lo,co,uo,fo){return Nt$1(ao)&&!uo&&!co&&(lo||fo)}(ro,oo,no,so,io)?Bt(to,y$4,eo):function(ao,lo,co,uo){return bt(ao)&&!lo&&!uo&&!co}(ro,oo,so,io)?Bt(to,m$5,eo):function(ao,lo,co,uo,fo){return bt(ao)&&!uo&&!co&&(lo||fo)}(ro,oo,no,so,io)?Bt(to,x$5,eo):function(ao,lo,co){return function(uo){return uo===38}(ao)&&!lo&&!co}(ro,oo,io)?Bt(to,v$3,eo):function(ao,lo,co){return function(uo){return uo===40}(ao)&&!lo&&!co}(ro,oo,io)?Bt(to,T$3,eo):function(ao,lo){return Et$1(ao)&&lo}(ro,no)?(tr=!0,Bt(to,S$4,eo)):function(ao){return ao===32}(ro)?Bt(to,k$2,eo):function(ao,lo){return Q&&lo&&ao===79}(ro,oo)?(eo.preventDefault(),tr=!0,Bt(to,s$2,!0)):function(ao,lo){return Et$1(ao)&&!lo}(ro,no)?(tr=!1,Bt(to,S$4,eo)):function(ao,lo,co,uo){return Q?!lo&&!co&&(Pt$1(ao)||ao===72&&uo):!(uo||lo||co)&&Pt$1(ao)}(ro,so,io,oo)?Pt$1(ro)?Bt(to,C$5,eo):(eo.preventDefault(),Bt(to,i$3,!0)):function(ao){return ao===27}(ro)?Bt(to,b$2,eo):function(ao,lo,co,uo,fo){return Q?!(co||uo||fo)&&(Dt$1(ao)||ao===68&&lo):!(lo||uo||fo)&&Dt$1(ao)}(ro,oo,no,so,io)?Dt$1(ro)?Bt(to,N$3,eo):(eo.preventDefault(),Bt(to,i$3,!1)):function(ao,lo,co){return Pt$1(ao)&&(Q?lo:co)}(ro,so,oo)?(eo.preventDefault(),Bt(to,a$4,!0)):function(ao,lo,co){return Dt$1(ao)&&(Q?lo:co)}(ro,so,oo)?(eo.preventDefault(),Bt(to,a$4,!1)):function(ao,lo){return Q&&lo&&Pt$1(ao)}(ro,io)?(eo.preventDefault(),Bt(to,f$4,!0)):function(ao,lo){return Q&&lo&&Dt$1(ao)}(ro,io)?(eo.preventDefault(),Bt(to,f$4,!1)):function(ao,lo,co,uo){return ao===66&&!lo&&wt$1(co,uo)}(ro,so,io,oo)?(eo.preventDefault(),Bt(to,d$4,"bold")):function(ao,lo,co,uo){return ao===85&&!lo&&wt$1(co,uo)}(ro,so,io,oo)?(eo.preventDefault(),Bt(to,d$4,"underline")):function(ao,lo,co,uo){return ao===73&&!lo&&wt$1(co,uo)}(ro,so,io,oo)?(eo.preventDefault(),Bt(to,d$4,"italic")):function(ao,lo,co,uo){return ao===9&&!lo&&!co&&!uo}(ro,so,oo,io)?Bt(to,w$3,eo):function(ao,lo,co,uo){return ao===90&&!lo&&wt$1(co,uo)}(ro,no,io,oo)?(eo.preventDefault(),Bt(to,h$3,void 0)):function(ao,lo,co,uo){return Q?ao===90&&co&&lo:ao===89&&uo||ao===90&&uo&&lo}(ro,no,io,oo)?(eo.preventDefault(),Bt(to,g$6,void 0)):Zr(to._editorState._selection)?function(ao,lo,co,uo){return!lo&&ao===67&&(Q?co:uo)}(ro,no,io,oo)?(eo.preventDefault(),Bt(to,M$3,eo)):function(ao,lo,co,uo){return!lo&&ao===88&&(Q?co:uo)}(ro,no,io,oo)?(eo.preventDefault(),Bt(to,W,eo)):It(ro,io,oo)&&(eo.preventDefault(),Bt(to,z$1,eo)):!X&&It(ro,io,oo)&&(eo.preventDefault(),Bt(to,z$1,eo)),function(ao,lo,co,uo){return ao||lo||co||uo}(oo,no,so,io)&&Bt(to,$$1,eo))}],["pointerdown",function(eo,to){const ro=eo.target,no=eo.pointerType;ro instanceof Node&&no!=="touch"&&Vi(to,()=>{Hi(at$1(ro))||(er=!0)})}],["compositionstart",function(eo,to){Vi(to,()=>{const ro=fi();if(Xr(ro)&&!to.isComposing()){const no=ro.anchor,oo=ro.anchor.getNode();ot(no.key),(eo.timeStamp{cr(to,eo.data)})}],["input",function(eo,to){eo.stopPropagation(),Vi(to,()=>{const ro=fi(),no=eo.data,oo=lr(eo);if(no!=null&&Xr(ro)&&ir(ro,oo,no,eo.timeStamp,!1)){nr&&(cr(to,no),nr=!1);const io=ro.anchor,so=io.getNode(),ao=nn(to._window);if(ao===null)return;const lo=io.offset;Y&&!ro.isCollapsed()&&Br(so)&&ao.anchorNode!==null&&so.getTextContent().slice(0,lo)+no+so.getTextContent().slice(lo+ro.focus.offset)===Tt(ao.anchorNode)||Bt(to,l$3,no);const co=no.length;X&&co>1&&eo.inputType==="insertCompositionText"&&!to.isComposing()&&(ro.anchor.offset-=co),Z||G||re||!to.isComposing()||(qn=0,ot(null))}else St(!1,to,no!==null?no:void 0),nr&&(cr(to,no||void 0),nr=!1);Pi(),Re(Oi())}),Yn=null}],["click",function(eo,to){Vi(to,()=>{const ro=fi(),no=nn(to._window),oo=di();if(no){if(Xr(ro)){const io=ro.anchor,so=io.getNode();io.type==="element"&&io.offset===0&&ro.isCollapsed()&&!Yi(so)&&ht$1().getChildrenSize()===1&&so.getTopLevelElementOrThrow().isEmpty()&&oo!==null&&ro.is(oo)?(no.removeAllRanges(),ro.dirty=!0):eo.detail===3&&!ro.isCollapsed()&&so!==ro.focus.getNode()&&(qi(so)?so.select(0):so.getParentOrThrow().select(0))}else if(eo.pointerType==="touch"){const io=no.anchorNode;if(io!==null){const so=io.nodeType;(so===ie$2||so===se)&&_t(ai(oo,no,to,eo))}}}Bt(to,r$1,eo)})}],["cut",$n],["copy",$n],["dragstart",$n],["dragover",$n],["dragend",$n],["paste",$n],["focus",$n],["blur",$n],["drop",$n]];Y&&jn.push(["beforeinput",(eo,to)=>function(ro,no){const oo=ro.inputType,io=lr(ro);oo==="deleteCompositionText"||X&&zt(no)||oo!=="insertCompositionText"&&Vi(no,()=>{const so=fi();if(oo==="deleteContentBackward"){if(so===null){const po=di();if(!Xr(po))return;_t(po.clone())}if(Xr(so)){const po=so.anchor.key===so.focus.key;if(ao=ro.timeStamp,Qn===229&&ao{Vi(no,()=>{ot(null)})},Hn),Xr(so)){const go=so.anchor.getNode();go.markDirty(),so.format=go.getFormat(),Br(go)||H$1(142),so.style=go.getStyle()}}else{ot(null),ro.preventDefault();const go=so.anchor.getNode().getTextContent(),vo=so.anchor.offset===0&&so.focus.offset===go.length;ne&&po&&!vo||Bt(no,i$3,!0)}return}}var ao;if(!Xr(so))return;const lo=ro.data;Yn!==null&&St(!1,no,Yn),so.dirty&&Yn===null||!so.isCollapsed()||Yi(so.anchor.getNode())||io===null||so.applyDOMRange(io),Yn=null;const co=so.anchor,uo=so.focus,fo=co.getNode(),ho=uo.getNode();if(oo!=="insertText"&&oo!=="insertTranspose")switch(ro.preventDefault(),oo){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Bt(no,l$3,ro);break;case"insertFromComposition":ot(null),Bt(no,l$3,ro);break;case"insertLineBreak":ot(null),Bt(no,s$2,!1);break;case"insertParagraph":ot(null),tr&&!G?(tr=!1,Bt(no,s$2,!1)):Bt(no,o$5,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Bt(no,c$5,ro);break;case"deleteByComposition":(function(po,go){return po!==go||qi(po)||qi(go)||!po.isToken()||!go.isToken()})(fo,ho)&&Bt(no,u$5,ro);break;case"deleteByDrag":case"deleteByCut":Bt(no,u$5,ro);break;case"deleteContent":Bt(no,i$3,!1);break;case"deleteWordBackward":Bt(no,a$4,!0);break;case"deleteWordForward":Bt(no,a$4,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Bt(no,f$4,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Bt(no,f$4,!1);break;case"formatStrikeThrough":Bt(no,d$4,"strikethrough");break;case"formatBold":Bt(no,d$4,"bold");break;case"formatItalic":Bt(no,d$4,"italic");break;case"formatUnderline":Bt(no,d$4,"underline");break;case"historyUndo":Bt(no,h$3,void 0);break;case"historyRedo":Bt(no,g$6,void 0)}else{if(lo===` @@ -1848,7 +1848,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `),[to]),oo=useStyles$1(),io=mergeClasses(oo.content,ro,"rich-text-chatbox-message-content");return jsxRuntimeExports.jsxs("div",{className:io,children:[jsxRuntimeExports.jsx(ReactMarkdown,{text:no}),jsxRuntimeExports.jsx(LLMNodeMessageToolCalls,{message:to[0]})]})},useStyles$1=makeStyles({content:{...shorthands.overflow("auto"),wordBreak:"break-all",whiteSpace:"break-spaces"},popoverTrigger:{cursor:"pointer",marginLeft:"4px",color:tokens.colorBrandBackground,...shorthands.textDecoration("underline")}});function weaveRichNodesIntoMarkup(eo){if(typeof eo=="string")return eo;return Array.isArray(eo)?eo.map(to).filter(Boolean).join(` `):new Error("content type is not supported");function to(ro){var no,oo,io,so;switch(ro.type){case RichContentType.TEXT:return ro.text??"";case RichContentType.IMAGE_URL:return`![${(no=ro.image_url)==null?void 0:no.url}](${(oo=ro.image_url)==null?void 0:oo.url})`;case RichContentType.IMAGE_FILE:return`![${(io=ro.image_file)==null?void 0:io.path}](${(so=ro.image_file)==null?void 0:so.path})`;default:return""}}}const useMessagesContainerStyles=makeStyles({messagesContainer:{display:"flex",height:"100%",width:"100%"},minimap:{boxSizing:"border-box",height:"100%",width:"12px"},minimapInner:{boxSizing:"border-box",...shorthands.padding("1px"),...shorthands.border("1px","solid",tokens.colorNeutralStroke2),...shorthands.borderRadius("2px")},minimapElement:{width:"8px !important",cursor:"pointer",...shorthands.borderRadius("1px"),"&:hover":{backgroundColor:"var(--element-hover-background-color) !important"}},minimapViewport:{display:"none"}}),LLMNodeMessagesList=eo=>{const to=useSelectedSpan(),ro=useMessagesContainerStyles(),no=reactExports.useRef(null),oo=ChatboxSelector.MessageList,io=ChatboxSelector.MessageContent,so=eo.messages.map((ao,lo)=>({id:lo,type:ChatMessageType.Message,history:[{content:[{content:ao.content??"",name:ao.name,role:ao.role,timestamp:ao.timestamp,function_call:ao.function_call,tool_calls:ao.tool_calls,tools:eo.tools}],category:messageRoleToCategory(ao.role),from:capitalizeFirstLetter(getSenderNameByLLMMessage(ao)),timestamp:ao.role==="assistant"?to==null?void 0:to.start_time:to==null?void 0:to.end_time}]}));return reactExports.useEffect(()=>{const ao=document.querySelectorAll(".rich-text-chatbox-message-content"),lo=ao[ao.length-1];lo&&lo.scrollIntoView({block:"end"})},[]),jsxRuntimeExports.jsxs("div",{className:ro.messagesContainer,children:[jsxRuntimeExports.jsx(ChatboxMessageList,{locStrings:defaultLocStrings$1,messages:so,calcContentForCopy:defaultCalcContentForCopy,containerRef:no}),jsxRuntimeExports.jsx("div",{className:ro.minimap,children:jsxRuntimeExports.jsx(Minimap,{className:ro.minimapInner,syncScale:!1,sourceRootRef:no,sourceQuerySelector:oo,sourceElementQuerySelector:io,viewportClassName:ro.minimapViewport,overviewElementClassName:ro.minimapElement,getElementBackgroundColor:ao=>{var lo;return((lo=ao==null?void 0:ao.dataset)==null?void 0:lo.chatboxColor)||""},renderElement:(ao,lo,co,uo)=>{var vo,yo;const fo=so[lo],ho=((vo=fo==null?void 0:fo.history[0])==null?void 0:vo.from)??"",po=((yo=fo==null?void 0:fo.history[0])==null?void 0:yo.content[0])??{},{hoverColor:go}=getColorForMessage(po);return jsxRuntimeExports.jsx(Tooltip,{content:ho,relationship:"label",positioning:"before",children:jsxRuntimeExports.jsx("div",{className:co,style:{...uo,"--element-hover-background-color":go}},lo)},lo)}})})]})},MessageAvatarRenderer=({data:eo,className:to})=>jsxRuntimeExports.jsx(LLMMessageSenderBadge,{name:eo.content[0].name,role:eo.content[0].role,className:to});function ChatboxMessageList(eo){const{locStrings:to,messages:ro,calcContentForCopy:no,containerRef:oo}=eo,io=useCopyAction(to,no),so=reactExports.useCallback(()=>[io],[io]),ao=useStyles();return jsxRuntimeExports.jsx("div",{ref:oo,className:ao.main,children:jsxRuntimeExports.jsx(MessageListRenderer,{locStrings:to,messages:ro,MessageAvatarRenderer,MessageContentRenderer:RichTextChatboxMessageContent,MessageSenderRenderer,MessageBubbleRenderer:LLMNodeMessageBubbleRenderer,useMessageActions:so})})}ChatboxMessageList.displayName="ChatboxMessageList";const useStyles=makeStyles({main:{...shorthands.padding("0","6px"),...shorthands.overflow("auto"),...shorthands.flex(1),height:"100%"}}),getVariableHoverMarkdown=eo=>{let to="";return typeof eo=="string"?to=eo:to=JSON.stringify(eo),to},useLLMJinjaEditorMount=eo=>reactExports.useCallback(ro=>{const no=Object.keys(eo),oo=ro.getModel();no.forEach(io=>{const so=oo==null?void 0:oo.findMatches(`[^.](${io})\\s*(%|\\})`,!1,!0,!1,null,!1);so==null||so.forEach(ao=>{ro.createDecorationsCollection([{range:{...ao.range,startColumn:ao.range.startColumn+1,endColumn:ao.range.endColumn-1},options:{isWholeLine:!1,inlineClassName:"llm-variable-highlight",hoverMessage:{value:getVariableHoverMarkdown(eo[io])}}}])})})},[eo]),useMessageCardClasses=makeStyles({card:{...shorthands.borderRadius("8px"),...shorthands.borderColor(tokens.colorNeutralStroke1),...shorthands.borderWidth("1px"),...shorthands.borderStyle("solid"),...shorthands.padding("16px"),...shorthands.margin("16px")}}),useClasses$f=makeStyles({root:{height:"100%",display:"flex",flexDirection:"column",...shorthands.overflow("auto")},title:{fontSize:"14px",lineHeight:"20px",fontStyle:"italic",fontWeight:400,color:tokens.colorNeutralForeground1},card:{flexGrow:1,...shorthands.padding("0px"),...shorthands.margin("0px")}}),LLMNodePromptTemplateTab=()=>{var lo,co;const eo=useParentSpanOfSelectedSpan(),to=eo==null?void 0:eo.attributes,[ro,no]=reactExports.useState(ViewStatus.loading),oo=useLoadSpanEvents(eo,BuildInEventName["prompt.template"]),io=getSpanEventsWithPayload(eo,BuildInEventName["prompt.template"])[0],so=io?(lo=io.attributes)==null?void 0:lo["prompt.template"]:to==null?void 0:to["prompt.template"],ao=safeJSONParse(io?((co=io.attributes)==null?void 0:co["prompt.variables"])??"{}":(to==null?void 0:to["prompt.variables"])??"{}");return reactExports.useEffect(()=>{no(ViewStatus.loading),oo({onCompleted:uo=>{no(uo?ViewStatus.error:ViewStatus.loaded)}})},[oo]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ro===ViewStatus.loading&&jsxRuntimeExports.jsx(Spinner,{size:"tiny",style:{marginTop:"30vh"}}),ro===ViewStatus.loaded&&so&&jsxRuntimeExports.jsx(LLMNodePromptTemplate,{promptTemplate:so,templateVariables:ao}),ro===ViewStatus.error&&jsxRuntimeExports.jsx("div",{style:{marginTop:"30vh",textAlign:"center"},children:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{no(ViewStatus.loading),oo({onCompleted:uo=>{no(uo?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})})]})},LLMNodePromptTemplate=({promptTemplate:eo,templateVariables:to})=>{const ro=useClasses$f(),no=useMessageCardClasses(),io=useIsDark()?"vs-dark":"light",so=useLLMJinjaEditorMount(to);return jsxRuntimeExports.jsx("div",{className:ro.root,children:jsxRuntimeExports.jsx(Card,{className:mergeClasses(no.card,ro.card),children:jsxRuntimeExports.jsx(JinjaSyntaxHighlighter,{value:eo,theme:io,onMount:so})})})},LLMNodeTools=({tools:eo})=>{const to=useClasses$e(),ro=useLocStrings();return eo.length===0?jsxRuntimeExports.jsxs("div",{className:to.emptyWrapper,children:[jsxRuntimeExports.jsx(ShieldCheckmark24Regular,{}),jsxRuntimeExports.jsxs(Text$2,{className:to.emptyText,children:[" ",ro.No_Tools_Found]})]}):jsxRuntimeExports.jsx("div",{children:eo.map((no,oo)=>jsxRuntimeExports.jsx(LLMNodeToolCard,{tool:no},oo))})},useClasses$e=makeStyles({wrapper:{marginBottom:tokens.spacingVerticalM},emptyWrapper:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%"},emptyText:{paddingTop:tokens.spacingVerticalM}}),useLLMNodeClasses=makeStyles({root:{height:"100%",display:"flex"},header:{display:"flex",width:"100%",justifyContent:"space-between"},content:{...shorthands.overflow("auto")}}),LLMNodeInfo=({item:eo})=>{const{inputMessages:to,outputMessages:ro,tools:no}=useMessagesOfSelectedSpan(),oo=[...to,...ro],io=useLLMNodeClasses(),so=useSelectedSpan(),[ao,lo]=reactExports.useState(ViewStatus.loading),co=useLoadSpans([so],[BuildInEventName["function.inputs"],BuildInEventName["function.output"],BuildInEventName["llm.generated_message"]]);return reactExports.useEffect(()=>{(eo==="messages"||eo==="tools")&&(lo(ViewStatus.loading),co({onCompleted:uo=>{lo(uo?ViewStatus.error:ViewStatus.loaded)}}))},[eo,co]),eo==="raw"?jsxRuntimeExports.jsx(DefaultNodeInfo,{}):eo==="promptTemplate"?jsxRuntimeExports.jsx(LLMNodePromptTemplateTab,{}):eo==="llmParameters"?jsxRuntimeExports.jsx(Card,{className:io.root,children:jsxRuntimeExports.jsx("div",{className:io.content,children:jsxRuntimeExports.jsx(LLMNodeInvocationParametersTab,{})})}):ao===ViewStatus.loading?jsxRuntimeExports.jsx("div",{style:{marginTop:"30vh"},children:jsxRuntimeExports.jsx(Spinner,{})}):ao===ViewStatus.error?jsxRuntimeExports.jsx("div",{style:{marginTop:"30vh",textAlign:"center"},children:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{lo(ViewStatus.loading),co({onCompleted:uo=>{lo(uo?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})}):jsxRuntimeExports.jsx(Card,{className:io.root,children:jsxRuntimeExports.jsxs("div",{className:io.content,children:[eo==="messages"&&jsxRuntimeExports.jsx(LLMNodeMessagesList,{messages:oo,tools:no}),eo==="tools"&&jsxRuntimeExports.jsx(LLMNodeTools,{tools:no})]})})},LLMSpanContent=()=>{var go;const eo=useSelectedSpan(),to=useNodeDetailClasses(),ro=useLocStrings(),[no,oo]=reactExports.useState("llm_conversations"),io=(go=eo==null?void 0:eo.events)==null?void 0:go.filter(vo=>vo.name===BuildInEventName.exception),so=(io==null?void 0:io.length)??0,[ao,lo]=reactExports.useState(!1),[co,uo]=reactExports.useState(!1),[fo,ho]=reactExports.useState(!1);useHasPromptTemplate(vo=>lo(vo)),useHasLLMParameters(vo=>uo(vo)),useHasInputsOrOutput(vo=>ho(vo));const po=[{key:"llm_conversations",name:ro.Conversations},{key:"raw",name:ro.Raw_JSON},...ao?[{key:"llm_template",name:ro.Prompt_Template}]:[],...co?[{key:"llm_params",name:ro.LLM_Parameters}]:[],{key:"llm_tools",name:ro.Tools},{key:"error",name:ro.Exception,icon:jsxRuntimeExports.jsx(CounterBadge,{appearance:"filled",color:so>0?"danger":"informative",count:so,size:"small",showZero:!0})}];return jsxRuntimeExports.jsxs("div",{className:to.layoutLeft,children:[jsxRuntimeExports.jsx(SpanDetailTabs,{tabs:po,selectedTab:no,setSelectedTab:oo}),jsxRuntimeExports.jsx(SpanDetailErrorMessageBar,{setSelectedTab:oo}),jsxRuntimeExports.jsxs("div",{className:to.content,children:[no==="llm_conversations"&&jsxRuntimeExports.jsx(LLMNodeInfo,{item:"messages"}),fo&&no==="info"&&jsxRuntimeExports.jsx(LLMNodeInfo,{item:"raw"}),no==="raw"&&jsxRuntimeExports.jsx(NodeRawCard,{}),ao&&no==="llm_template"&&jsxRuntimeExports.jsx(LLMNodeInfo,{item:"promptTemplate"}),co&&no==="llm_params"&&jsxRuntimeExports.jsx(LLMNodeInfo,{item:"llmParameters"}),no==="llm_tools"&&jsxRuntimeExports.jsx(LLMNodeInfo,{item:"tools"}),no==="error"&&jsxRuntimeExports.jsx(ErrorsTab,{})]})]})},RetrievalNodeInfo=()=>{const eo=useSelectedSpan(),to=useLocStrings(),[ro,no]=reactExports.useState(ViewStatus.loading),oo=useLoadSpanEvents(eo,BuildInEventName["retrieval.documents"]),io=getSpanEventsWithPayload(eo,BuildInEventName["retrieval.documents"]),so=(eo==null?void 0:eo.attributes)??{};let ao=[];if(io.length>0)ao=io.map(po=>po.attributes).flat();else if(typeof so["retrieval.documents"]=="string")try{ao=JSON.parse(so["retrieval.documents"])}catch{ao=[]}const[lo,co]=reactExports.useState(ViewStatus.loading),uo=useLoadSpanEvents(eo,BuildInEventName["retrieval.query"]),fo=getSpanEventsWithPayload(eo,BuildInEventName["retrieval.query"]);let ho=so["retrieval.query"];return fo.length>0&&(ho=fo.map(po=>po.attributes).join(` -`)),reactExports.useEffect(()=>{no(ViewStatus.loading),oo({onCompleted:po=>{no(po?ViewStatus.error:ViewStatus.loaded)}}),co(ViewStatus.loading),uo({onCompleted:po=>{co(po?ViewStatus.error:ViewStatus.loaded)}})},[oo,uo]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:to.Query})})}),lo===ViewStatus.loading&&jsxRuntimeExports.jsx(Spinner,{size:"tiny"}),lo===ViewStatus.loaded&&(ho??""),lo===ViewStatus.error&&jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{co(ViewStatus.loading),uo({onCompleted:po=>{co(po?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})]}),jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:to.Documents})})}),ro===ViewStatus.loading&&jsxRuntimeExports.jsx(Spinner,{size:"tiny"}),ro===ViewStatus.loaded&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ao.map(po=>jsxRuntimeExports.jsx(Document$1,{document:po},po["document.id"]))}),ro===ViewStatus.error&&jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{no(ViewStatus.loading),oo({onCompleted:po=>{no(po?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})]})]})},Document$1=({document:eo})=>{const to=useRetrievalNodeDetailClasses(),[ro,no]=reactExports.useState(["content"]),oo=reactExports.useCallback((so,ao)=>{no(ao.openItems)},[]),io=useLocStrings();return jsxRuntimeExports.jsxs(Card,{style:{background:tokens.colorNeutralBackground2},children:[jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",columnGap:6},children:[jsxRuntimeExports.jsx(Document16Regular,{}),jsxRuntimeExports.jsx("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:jsxRuntimeExports.jsx(Tooltip,{content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:"id"})," ",eo["document.id"]]}),relationship:"description",children:jsxRuntimeExports.jsxs("span",{children:[io.document," ",eo["document.id"]]})})}),jsxRuntimeExports.jsx(Tooltip,{content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:io.score})," ",eo["document.score"]]}),relationship:"description",children:jsxRuntimeExports.jsxs(Badge$2,{appearance:"outline",children:["score ",floatFormatter(eo["document.score"])]})})]}),jsxRuntimeExports.jsx(Divider$2,{}),jsxRuntimeExports.jsx(Card,{style:{background:tokens.colorNeutralBackground3},children:jsxRuntimeExports.jsx(Accordion,{openItems:ro,onToggle:oo,collapsible:!0,multiple:!0,children:jsxRuntimeExports.jsxs(AccordionItem,{value:"content",children:[jsxRuntimeExports.jsx(AccordionHeader,{className:to.accordionHeader,children:io.content}),jsxRuntimeExports.jsx(AccordionPanel,{children:jsxRuntimeExports.jsx(MarkdownViewer,{content:eo["document.content"]})})]})})}),jsxRuntimeExports.jsx(JsonNodeCard,{title:"metadata",src:eo["document.metadata"],wrapperStyle:{background:tokens.colorNeutralBackground3}})]})},RetrievalSpanDetailContent=()=>{var lo;const eo=useSelectedSpan(),[to,ro]=reactExports.useState("retrieval"),no=useNodeDetailClasses(),oo=useLocStrings(),io=(lo=eo==null?void 0:eo.events)==null?void 0:lo.filter(co=>co.name===BuildInEventName.exception),so=(io==null?void 0:io.length)??0,ao=[{key:"retrieval",name:oo.Retrieval},{key:"raw",name:oo.Raw_JSON},{key:"error",name:oo.Exception,icon:jsxRuntimeExports.jsx(CounterBadge,{appearance:"filled",color:so>0?"danger":"informative",count:so,size:"small",showZero:!0})}];return jsxRuntimeExports.jsxs("div",{className:no.layoutLeft,children:[jsxRuntimeExports.jsx(SpanDetailTabs,{tabs:ao,selectedTab:to,setSelectedTab:ro}),jsxRuntimeExports.jsx(SpanDetailErrorMessageBar,{setSelectedTab:ro}),jsxRuntimeExports.jsxs("div",{className:no.content,children:[to==="retrieval"&&jsxRuntimeExports.jsx(RetrievalNodeInfo,{}),to==="raw"&&jsxRuntimeExports.jsx(NodeRawCard,{}),to==="error"&&jsxRuntimeExports.jsx(ErrorsTab,{})]})]})},NodeModel=()=>{const eo=useNodeDetailClasses(),to=useSelectedSpan(),{"llm.response.model":ro}=(to==null?void 0:to.attributes)||{};return ro?jsxRuntimeExports.jsx("div",{className:eo.headerModalName,children:ro}):null},OpenAIIcon=({styles:eo})=>jsxRuntimeExports.jsxs("svg",{fill:"currentColor",width:"20px",height:"20px",viewBox:"0 0 2048 2048",role:"img",xmlns:"http://www.w3.org/2000/svg",style:eo,children:[jsxRuntimeExports.jsx("title",{children:"OpenAI icon"}),jsxRuntimeExports.jsx("path",{d:"M832 676l575 288v760l-575 288-575-288V964l575-288zm0 144l-368 184 368 183 368-183-368-184zm-447 825l383 191v-538l-383-191v538zm894 0v-538l-383 191v538l383-191zm577-733q14 0 23 9t9 23q0 23 9 43t24 36 35 24 44 9q14 0 23 9t9 23q0 14-9 23t-23 9q-23 0-43 9t-36 24-24 35-9 44q0 14-9 23t-23 9q-14 0-23-9t-9-23q0-23-9-43t-24-36-35-24-44-9q-14 0-23-9t-9-23q0-14 9-23t23-9q23 0 43-9t36-24 24-35 9-44q0-14 9-23t23-9zM704 496q-14 0-23-9t-9-23q0-23-9-43t-24-36-35-24-44-9q-14 0-23-9t-9-23q0-14 9-23t23-9q23 0 43-9t36-24 24-35 9-44q0-14 9-23t23-9q14 0 23 9t9 23q0 23 9 43t24 36 35 24 44 9q14 0 23 9t9 23q0 14-9 23t-23 9q-23 0-43 9t-36 24-24 35-9 44q0 14-9 23t-23 9zm1206-48q0 23-15 38t-39 16q-27 0-57 11t-58 28-54 37-45 40q-19 19-39 44t-38 54-28 59-11 57q0 23-15 38t-39 16q-23 0-38-15t-16-39q0-27-11-57t-28-58-37-54-40-45q-19-19-44-39t-54-38-59-28-57-11q-23 0-38-15t-16-39q0-23 15-38t39-16q27 0 57-11t58-28 54-37 45-40q19-19 39-44t38-54 28-59 11-57q0-23 15-38t39-16q23 0 38 15t16 39q0 27 11 57t28 58 37 54 40 45q19 19 44 39t54 38 59 28 57 11q23 0 38 15t16 39zm-438 212q38-65 92-119t120-93q-65-38-119-92t-93-120q-38 65-92 119t-120 93q65 38 119 92t93 120z"})]});function SpanType({span:eo,showText:to=!0,className:ro,...no}){const oo=useClasses$d(),{color:io,backgroundColor:so,icon:ao,text:lo}=reactExports.useMemo(()=>(eo==null?void 0:eo.toLocaleLowerCase())==="flow"?{color:tokens.colorPaletteBlueForeground2,backgroundColor:tokens.colorPaletteBlueBackground2,icon:jsxRuntimeExports.jsx(Flow16Regular,{}),text:"Flow"}:(eo==null?void 0:eo.toLocaleLowerCase())==="function"||(eo==null?void 0:eo.toLocaleLowerCase())==="tool"?{color:tokens.colorPaletteLavenderForeground2,backgroundColor:tokens.colorPaletteLavenderBackground2,icon:jsxRuntimeExports.jsx(HexagonThree16Regular,{}),text:"Function"}:(eo==null?void 0:eo.toLocaleLowerCase())==="retrieval"?{color:tokens.colorPaletteBrownForeground2,backgroundColor:tokens.colorPaletteBrownBackground2,icon:jsxRuntimeExports.jsx(BranchRequest16Regular,{}),text:"Retrieval"}:(eo==null?void 0:eo.toLocaleLowerCase())==="embedding"?{color:tokens.colorPaletteCornflowerForeground2,backgroundColor:tokens.colorPaletteCornflowerBackground2,icon:jsxRuntimeExports.jsx(FlowchartRegular,{}),text:"Embedding"}:(eo==null?void 0:eo.toLocaleLowerCase())==="llm"?{color:tokens.colorPaletteLightTealForeground2,backgroundColor:tokens.colorPaletteLightTealBackground2,icon:jsxRuntimeExports.jsx(OpenAIIcon,{styles:{height:"16px",width:"16px"}}),text:"LLM"}:(eo==null?void 0:eo.toLocaleLowerCase())==="network"?{color:tokens.colorPaletteSteelForeground2,backgroundColor:tokens.colorPaletteSteelBackground2,icon:jsxRuntimeExports.jsx(Link16Regular,{}),text:"Network"}:(eo==null?void 0:eo.toLocaleLowerCase())==="http"?{color:tokens.colorPaletteSteelForeground2,backgroundColor:tokens.colorPaletteSteelBackground2,icon:jsxRuntimeExports.jsx(Link16Regular,{}),text:"Http"}:{color:tokens.colorPaletteMarigoldForeground2,backgroundColor:tokens.colorPaletteMarigoldBackground2,icon:jsxRuntimeExports.jsx(QuestionCircle16Regular,{}),text:"Unknown"},[eo]);return eo===void 0?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}):jsxRuntimeExports.jsx(Badge$2,{appearance:"filled",size:"large",className:mergeClasses(oo.root,ro),icon:ao,style:{color:io,backgroundColor:so},...no,children:to&&lo})}const useClasses$d=makeStyles({root:{height:"24px",...shorthands.padding("0","6px")}}),SpanDetailHeader=({span:eo,spanType:to,showEvaluations:ro,showRightPanel:no,setShowRightPanel:oo})=>{const io=useNodeDetailClasses();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SpanType,{span:to,showText:!1,className:io.headerSpan}),jsxRuntimeExports.jsx(Tooltip,{content:eo.name??"",relationship:"label",children:jsxRuntimeExports.jsx("div",{className:io.headerTitle,children:`${eo.name}`})}),jsxRuntimeExports.jsxs("div",{className:io.headerRight,children:[jsxRuntimeExports.jsx(NodeModel,{}),jsxRuntimeExports.jsx(NodeToken,{span:eo,size:UISize.small}),jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:eo.start_time,endTimeISOString:eo.end_time,size:UISize.small}),ro&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$2,{vertical:!0}),no?jsxRuntimeExports.jsx(Button$2,{appearance:"transparent",icon:jsxRuntimeExports.jsx(PanelRightContract20Regular,{}),onClick:()=>oo(!1)}):jsxRuntimeExports.jsx(Button$2,{appearance:"transparent",icon:jsxRuntimeExports.jsx(PanelRightExpand20Regular,{}),onClick:()=>oo(!0)})]})]})]})},NodeDetail=({placeholder:eo,renderLogsPivot:to})=>{var Eo;const ro=useSelectedSpan(),no=getSpanType(ro),oo=useRootSpanIdOfSelectedSpans(),io=useSelectedLLMMessage(),so=useNodeDetailClasses(),ao=useShowTraceDetailRightPanel(),lo=useSetShowTraceDetailRightPanel(),uo=useEvaluationSpansOfSelectedSpan().length,fo=oo===((Eo=ro==null?void 0:ro.context)==null?void 0:Eo.span_id),ho=(no==null?void 0:no.toLowerCase())==="http",po=(no==null?void 0:no.toLowerCase())==="llm",go=(no==null?void 0:no.toLowerCase())==="retrieval",vo=(no==null?void 0:no.toLowerCase())==="embedding",yo=!!io;let xo=null,_o=null;if(yo)xo=jsxRuntimeExports.jsx(LLMMessageNodeHeader,{selectedLLMMessage:io.message}),_o=jsxRuntimeExports.jsx(LLMMessageNodeContent,{selectedLLMMessage:io.message});else if(ro){const So=fo&&uo>0;xo=jsxRuntimeExports.jsx(SpanDetailHeader,{span:ro,spanType:no,showEvaluations:So,showRightPanel:ao,setShowRightPanel:lo}),_o=jsxRuntimeExports.jsx(DefaultSpanDetailContent,{showEvaluationPanel:ao&&So,showLogs:fo,renderLogsPivot:to}),po&&(_o=jsxRuntimeExports.jsx(LLMSpanContent,{})),ho&&(_o=jsxRuntimeExports.jsx(HttpSpanDetailContent,{})),go&&(_o=jsxRuntimeExports.jsx(RetrievalSpanDetailContent,{})),vo&&(_o=jsxRuntimeExports.jsx(EmbeddingSpanDetailContent,{}))}else xo=null,_o=jsxRuntimeExports.jsx("div",{className:so.layoutLeft,children:eo});return jsxRuntimeExports.jsxs("div",{className:so.wrapper,children:[xo?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:so.header,children:xo}),jsxRuntimeExports.jsx(Divider$2,{className:so.divider})]}):null,jsxRuntimeExports.jsx("div",{className:so.layout,children:_o})]})},UNDEFINED_VALUE_PLACEHOLDER="N/A",RUNNING_TRACE_POLLING_GAP=3e4,SPAN_POLLING_GAP=3e4;let LOCAL_URL_PREFIX="";const TREE_PATH_CLASSNAME="__trace-tree-node-path",SpansTreeContext=reactExports.createContext({parentIdLookUp:new Map,treeOpenIds:Set$1(),setTreeOpenIds:()=>{}});function useTreeViewNodes(eo){const to=useTraceViewModel(),ro=useSelectedTraceId();return reactExports.useMemo(()=>{const no={},oo=new Map,io=[],so=eo.map(fo=>{var ho,po,go;if((ho=fo==null?void 0:fo.context)!=null&&ho.span_id){const vo={...fo,uiChildren:[]};no[(po=fo.context)==null?void 0:po.span_id]=vo;const yo=getSpanType(fo);return(yo==null?void 0:yo.toLowerCase())!=="llm"&&io.push((go=fo.context)==null?void 0:go.span_id),vo}return null}).filter(fo=>!!fo),ao=[];so.forEach(fo=>{var ho;if(fo.parent_id&&no[fo.parent_id]){const po=(ho=fo.context)==null?void 0:ho.span_id;if(!po)return;no[fo.parent_id].uiChildren.push(no[po]),no[fo.parent_id].uiChildren.sort(sortTraceByStartTimeAsc),oo.has(fo.parent_id)?oo.get(fo.parent_id).push(no[po]):oo.set(fo.parent_id,[no[po]]);const go=getSpanType(fo);if((go==null?void 0:go.toLowerCase())==="llm"){const{inputMessages:vo,outputMessages:yo}=getSpanMessages(to,ro,po);[...vo,...yo].forEach((_o,Eo)=>{const ko={context:{span_id:`llm-message-${po}-${Eo}`},uiIsMessage:!0,data:_o,parent_id:po,uiChildren:[]};ao.push(ko),oo.has(po)?oo.get(po).push(ko):oo.set(po,[ko]),no[po].uiChildren.push(ko)})}}});const lo=(fo,ho)=>{var po,go;if(fo.uiLevel=ho,ho>8&&(po=fo.context)!=null&&po.span_id){const vo=io.indexOf((go=fo.context)==null?void 0:go.span_id);vo!==-1&&io.splice(vo,1)}fo.uiChildren&&fo.uiChildren.forEach(vo=>lo(vo,ho+1))},co=so.filter(fo=>!fo.parent_id||!no[fo.parent_id]).sort(sortTraceByStartTimeAsc);co.forEach(fo=>{lo(fo,0)});const uo=[...so,...ao];return{rootNodes:co,nodes:uo,parentIdLookUp:oo,defaultOpenItems:io}},[eo,to,ro])}const sortTraceByStartTimeAsc=(eo,to)=>eo.start_time&&to.start_time?Date.parse(eo.start_time)-Date.parse(to.start_time):1,useSpanTreeNodeStyles=makeStyles({spanName:{fontSize:"14px",color:tokens.colorNeutralForeground2,...shorthands.overflow("hidden"),textOverflow:"ellipsis",whiteSpace:"nowrap"},aside:{display:"flex",flexWrap:"nowrap",justifyContent:"flex-end",marginLeft:"auto",...shorthands.flex(0,0,"auto"),...shorthands.padding("0px","4px","0px","0px"),...shorthands.gap(tokens.spacingHorizontalXS)},node:{height:"36px",":hover":{backgroundColor:"rgba(189, 189, 189,0.15)"},"[aria-selected='true']":{backgroundColor:"rgba(220, 220, 220, 0.5)"},...shorthands.borderRadius("4px")},node_dark:{":hover":{backgroundColor:"rgba(70, 70, 70,0.5)"},"[aria-selected='true']":{backgroundColor:"rgba(90, 90, 90, 0.5)"}},selectedBar:{position:"absolute",backgroundColor:"#1372ED",width:"3px",height:"24px",left:"0px",...shorthands.borderRadius("3px")},root:{display:"flex",flexWrap:"nowrap"},toggleButton:{marginLeft:"-6px",marginRight:"-2px"},lastInputMessage:{...shorthands.margin("0px","0px","0px","4px"),fontSize:"12px",color:tokens.colorNeutralForeground2},lastInputMessageLabel:shorthands.margin("0px","4px","0px","0px"),roleBadge:{marginLeft:"6px",marginRight:"6px"},expandButton:{position:"absolute",left:"0",top:"0",bottom:"0",...shorthands.borderRadius("0px"),":hover":{backgroundColor:tokens.colorNeutralBackground3Hover}}}),LLMMessageTreeNode=({node:eo})=>{var co,uo,fo,ho;const to=eo.data,ro=useSpanTreeNodeStyles(),no=useSelectedLLMMessage(),oo=(no==null?void 0:no.id)===((co=eo.context)==null?void 0:co.span_id),io=useLocStrings(),so=!!to.content,ao=!!to.tool_calls,lo=!!to.function_call;return jsxRuntimeExports.jsxs(TreeItemLayout,{className:ro.node,"aria-selected":oo,children:[oo&&jsxRuntimeExports.jsx("div",{className:ro.selectedBar}),so&&jsxRuntimeExports.jsx(Badge$2,{icon:jsxRuntimeExports.jsx(Mail16Regular,{}),iconPosition:"after",appearance:"ghost",size:"large",className:ro.roleBadge,"data-tree-path-id":((uo=eo.context)==null?void 0:uo.span_id)??"",style:{backgroundColor:tokens.colorBrandBackground2,color:tokens.colorBrandForeground2,borderColor:tokens.colorBrandForeground2},children:io.message}),ao&&jsxRuntimeExports.jsx(Badge$2,{icon:jsxRuntimeExports.jsx(Code16Regular,{}),iconPosition:"after",appearance:"ghost",size:"large",className:ro.roleBadge,"data-tree-path-id":((fo=eo.context)==null?void 0:fo.span_id)??"",style:{backgroundColor:tokens.colorPaletteLightGreenBackground1,color:tokens.colorPaletteLightGreenForeground1,borderColor:tokens.colorPaletteLightGreenForeground1},children:io.tool_calls}),lo&&jsxRuntimeExports.jsx(Badge$2,{icon:jsxRuntimeExports.jsx(Code16Regular,{}),iconPosition:"after",appearance:"ghost",size:"large",className:ro.roleBadge,"data-tree-path-id":((ho=eo.context)==null?void 0:ho.span_id)??"",style:{backgroundColor:tokens.colorPaletteLightGreenBackground1,color:tokens.colorPaletteLightGreenForeground1,borderColor:tokens.colorPaletteLightGreenForeground1},children:io.function_call}),jsxRuntimeExports.jsx(LLMMessageSenderBadge,{name:to.name,role:to.role,className:ro.roleBadge}),to.name]})},useIsLeafSpan=eo=>{var no;const ro=reactExports.useContext(SpansTreeContext).parentIdLookUp;return!ro.get(eo)||((no=ro.get(eo))==null?void 0:no.length)===0},useToggleCollapse=()=>{const{setTreeOpenIds:eo}=reactExports.useContext(SpansTreeContext);return reactExports.useCallback(to=>{eo(ro=>ro.has(to)?ro.delete(to):ro.add(to))},[eo])},useIsOpen=eo=>reactExports.useContext(SpansTreeContext).treeOpenIds.has(eo),TreeNode$1=({node:eo})=>{var fo,ho,po,go,vo,yo,xo,_o;const to=getSpanType(eo),ro=useSpanTreeNodeStyles(),oo=useSelectedSpanId()===((fo=eo==null?void 0:eo.context)==null?void 0:fo.span_id),io=useToggleCollapse(),so=useIsLeafSpan(((ho=eo.context)==null?void 0:ho.span_id)??""),ao=useIsOpen(((po=eo.context)==null?void 0:po.span_id)??""),lo=useIsDark();useStaticStyles$1();const co=reactExports.useCallback(Eo=>{var So;Eo.preventDefault(),Eo.stopPropagation(),io(((So=eo.context)==null?void 0:So.span_id)??"")},[(go=eo.context)==null?void 0:go.span_id,io]),uo=so?null:jsxRuntimeExports.jsx(Button$2,{appearance:"subtle",size:"small",onClick:co,className:ro.expandButton,icon:ao?jsxRuntimeExports.jsx(ChevronDown16Regular,{}):jsxRuntimeExports.jsx(ChevronRight16Regular,{})});return jsxRuntimeExports.jsxs(TreeItemLayout,{className:mergeClasses(ro.node,lo&&ro.node_dark),"aria-selected":oo,expandIcon:uo,aside:jsxRuntimeExports.jsxs("div",{className:ro.aside,children:[((yo=(vo=eo==null?void 0:eo.status)==null?void 0:vo.status_code)==null?void 0:yo.toLowerCase())==="error"&&jsxRuntimeExports.jsx(StatusText,{statusCode:(xo=eo.status)==null?void 0:xo.status_code,tooltipContent:eo.status.description,size:UISize.extraSmall}),jsxRuntimeExports.jsx(NodeToken,{span:eo,size:UISize.extraSmall}),jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:eo.start_time,endTimeISOString:eo.end_time,size:UISize.extraSmall})]}),children:[oo&&jsxRuntimeExports.jsx("div",{className:ro.selectedBar}),to&&jsxRuntimeExports.jsx(SpanType,{span:to,"data-tree-path-id":((_o=eo.context)==null?void 0:_o.span_id)??""}),jsxRuntimeExports.jsx(Tooltip,{content:eo.name??"",relationship:"label",children:jsxRuntimeExports.jsx("div",{className:ro.spanName,children:`${eo.name}`})})]})},useStaticStyles$1=makeStaticStyles({".fui-TreeItemLayout__main":{flex:"0 1 auto",width:"100%",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",display:"flex",gap:"6px",position:"static"},".fui-TreeItemLayout":{position:"relative",overflow:"hidden"}}),TreeView=()=>{const eo=useSetSelectedSpanId(),to=useSetSelectedLLMMessage(),ro=useSpansOfSelectedTrace(),no=useClasses$c(),{rootNodes:oo,nodes:io,parentIdLookUp:so,defaultOpenItems:ao}=useTreeViewNodes(ro),[lo,co]=reactExports.useState(Set$1(ao));useStaticStyles();const[uo,fo]=reactExports.useState(ViewStatus.loading),ho=useLoadSpans(ro.filter(po=>{var go;return((go=getSpanType(po))==null?void 0:go.toLocaleLowerCase())==="llm"}),[BuildInEventName["llm.generated_message"],BuildInEventName["function.inputs"],BuildInEventName["function.output"]]);return reactExports.useEffect(()=>{fo(ViewStatus.loading),ho({onCompleted:po=>{fo(po?ViewStatus.error:ViewStatus.loaded)}})},[ho]),reactExports.useEffect(()=>{var po;eo(((po=oo[0].context)==null?void 0:po.span_id)||"")},[uo]),reactExports.useLayoutEffect(()=>{const po={};io.forEach(vo=>{var yo,xo;(yo=vo.context)!=null&&yo.span_id&&(po[(xo=vo.context)==null?void 0:xo.span_id]=vo)});const go=[];return setTimeout(()=>{var vo;for(const yo of io){const xo=(vo=yo.context)==null?void 0:vo.span_id,_o=yo.parent_id,Eo=document.querySelector('[data-tree-path-layer="path-layer"]'),So=document.querySelector(`[data-tree-path-id="${_o}"]`),ko=document.querySelector(`[data-tree-path-id="${xo}"]`),Ao=document.querySelector('[data-tree-path-layer="path-layer"]');if(!So||!ko||!Ao)continue;const Co=Eo.getBoundingClientRect(),Oo=So.getBoundingClientRect(),wo=ko.getBoundingClientRect(),Ro=So.offsetLeft+12,Do=Oo.top-Co.top+Oo.height/2,$o=document.createElement("div");$o.className=TREE_PATH_CLASSNAME,$o.style.left=`${Ro}px`,$o.style.top=`${Do}px`,$o.style.width=`${wo.left-Oo.left}px`,$o.style.height=`${wo.top-Oo.top}px`,Ao.appendChild($o),go.push($o)}},0),()=>{go.forEach(vo=>{vo.remove()})}},[lo]),jsxRuntimeExports.jsx(SpansTreeContext.Provider,{value:{parentIdLookUp:so,treeOpenIds:lo,setTreeOpenIds:co},children:jsxRuntimeExports.jsxs(Tree$1,{"aria-label":"Trace Tree",openItems:lo,className:no.root,children:[jsxRuntimeExports.jsx("div",{className:no.pathLayer,"data-tree-path-layer":"path-layer"}),oo.map(po=>{var go;return jsxRuntimeExports.jsx(RenderTreeNode,{node:po,onClickMessageNode:vo=>{var yo;to({id:((yo=vo.context)==null?void 0:yo.span_id)||"",message:vo.data}),eo("")},onClickSpanNode:vo=>{var yo;eo(((yo=vo.context)==null?void 0:yo.span_id)||""),to(void 0)}},(go=po.context)==null?void 0:go.span_id)})]})})},RenderTreeNode=({node:eo,onClickMessageNode:to,onClickSpanNode:ro})=>{var oo,io,so,ao,lo;const{level:no}=useSubtreeContext_unstable();if("uiIsMessage"in eo){const co=eo;return jsxRuntimeExports.jsx(TreeItem,{value:(oo=co.context)==null?void 0:oo.span_id,itemType:"leaf",onClick:uo=>{uo.stopPropagation(),to(co)},style:{[treeItemLevelToken]:no},children:jsxRuntimeExports.jsx(LLMMessageTreeNode,{node:co})},(io=co.context)==null?void 0:io.span_id)}else{const co=eo;return jsxRuntimeExports.jsxs(TreeItem,{value:(so=co.context)==null?void 0:so.span_id,itemType:co.uiChildren.length>0?"branch":"leaf",onClick:uo=>{uo.stopPropagation(),ro(co)},style:{[treeItemLevelToken]:no},children:[jsxRuntimeExports.jsx(TreeNode$1,{node:co},(ao=co.context)==null?void 0:ao.span_id),co.uiChildren.length>0&&jsxRuntimeExports.jsx(Tree$1,{children:co.uiChildren.map(uo=>{var fo;return jsxRuntimeExports.jsx(RenderTreeNode,{node:uo,onClickMessageNode:to,onClickSpanNode:ro},(fo=uo==null?void 0:uo.context)==null?void 0:fo.span_id)})})]},(lo=co.context)==null?void 0:lo.span_id)}},useStaticStyles=makeStaticStyles({"fui-TreeItem":{position:"relative"},[`:global(.${TREE_PATH_CLASSNAME})`]:{position:"absolute",boxSizing:"border-box",borderBottomLeftRadius:"8px",borderLeft:`1px solid ${tokens.colorNeutralStroke2}`,borderBottom:`1px solid ${tokens.colorNeutralStroke2}`}}),useClasses$c=makeStyles({root:{position:"relative"},pathLayer:{position:"absolute",top:0,left:0}}),TraceDetail=({renderLogsPivot:eo})=>{var fo,ho;const to=useClasses$b(),ro=useSelectedSpanId(),no=reactExports.useRef(null),oo=useTraceDetailRefreshKey(),io=useSelectedLLMMessage(),so=useIsGanttChartOpen(),ao=useTraceDetailViewStatus(),lo=useTraceDetailLoadingComponent(),co=useTraceDetailErrorComponent(),uo=useLocStrings();return useDebugFunctions(),reactExports.useEffect(()=>{var po;so&&((po=no.current)==null||po.updateSize({height:400,width:"100%"}))},[so]),ao===ViewStatus.error?jsxRuntimeExports.jsx(co,{}):ao===ViewStatus.loading?jsxRuntimeExports.jsx(lo,{}):ao===ViewStatus.hidden?null:jsxRuntimeExports.jsxs("div",{className:to.root,children:[jsxRuntimeExports.jsx("div",{className:to.container,children:jsxRuntimeExports.jsxs("div",{className:to.content,children:[jsxRuntimeExports.jsx(Resizable,{enable:{right:!0},minWidth:100,maxWidth:"60%",defaultSize:{width:TREE_NODE_WIDTH+2*TREE_NODE_INDENT+32,height:"100%"},handleComponent:{right:jsxRuntimeExports.jsx("div",{className:to.resizeBar})},children:jsxRuntimeExports.jsx("div",{className:to.leftPane,children:jsxRuntimeExports.jsx(TreeView,{},oo)})}),jsxRuntimeExports.jsx("div",{className:to.rightPane,children:jsxRuntimeExports.jsx(NodeDetail,{placeholder:jsxRuntimeExports.jsx(MessageBar,{intent:"error",children:uo.No_span_data}),renderLogsPivot:eo},`${oo}-${(fo=io==null?void 0:io.message)==null?void 0:fo.role}-${(ho=io==null?void 0:io.message)==null?void 0:ho.name}`)},`${ro}`)]})}),so&&jsxRuntimeExports.jsx("div",{className:to.bottomPane,children:jsxRuntimeExports.jsx(Resizable,{ref:no,className:to.ganttContainer,defaultSize:{height:0,width:"100%"},enable:{top:!0},handleComponent:{top:jsxRuntimeExports.jsx("div",{className:to.resizeBarBottom})},children:jsxRuntimeExports.jsx(GanttView,{},oo)})})]})},useClasses$b=makeStyles({root:{width:"100%",height:"100%"},container:{display:"flex",flexDirection:"column",height:"100%",width:"100%"},summary:{display:"flex",alignItems:"stretch",height:"48px",width:"100%",...shorthands.margin("16px"),...shorthands.gap("1rem")},content:{...shorthands.flex(1),...shorthands.overflow("hidden"),display:"flex"},leftPane:{height:"100%",overflowY:"auto",boxSizing:"border-box",...shorthands.padding("16px")},rightPane:{position:"relative",width:"100%",height:"100%",...shorthands.flex(1),...shorthands.overflow("hidden")},bottomPane:{position:"absolute",backgroundColor:tokens.colorNeutralBackground1,bottom:0,width:"100%"},ganttContainer:{...shorthands.padding("16px")},resizeBar:{position:"absolute",top:0,bottom:0,right:"5px",width:"6px",backgroundColor:tokens.colorNeutralBackground3,"::before":{content:"''",position:"absolute",top:"50%",right:"1px",marginTop:"-12px",height:"24px",width:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed},"::after":{content:"''",position:"absolute",top:"50%",left:"1px",marginTop:"-12px",height:"24px",width:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed}},resizeBarBottom:{position:"absolute",left:0,right:0,bottom:"5px",height:"6px",backgroundColor:tokens.colorNeutralBackground3,"::before":{content:"''",position:"absolute",left:"50%",bottom:"1px",marginLeft:"-12px",width:"24px",height:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed},"::after":{content:"''",position:"absolute",left:"50%",top:"1px",marginLeft:"-12px",width:"24px",height:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed}}});function useResolvedElement(eo,to){var ro=reactExports.useRef(null),no=reactExports.useRef(null);no.current=to;var oo=reactExports.useRef(null);reactExports.useEffect(function(){io()});var io=reactExports.useCallback(function(){var so=oo.current,ao=no.current,lo=so||(ao?ao instanceof Element?ao:ao.current:null);ro.current&&ro.current.element===lo&&ro.current.subscriber===eo||(ro.current&&ro.current.cleanup&&ro.current.cleanup(),ro.current={element:lo,subscriber:eo,cleanup:lo?eo(lo):void 0})},[eo]);return reactExports.useEffect(function(){return function(){ro.current&&ro.current.cleanup&&(ro.current.cleanup(),ro.current=null)}},[]),reactExports.useCallback(function(so){oo.current=so,io()},[io])}function extractSize(eo,to,ro){return eo[to]?eo[to][0]?eo[to][0][ro]:eo[to][ro]:to==="contentBoxSize"?eo.contentRect[ro==="inlineSize"?"width":"height"]:void 0}function useResizeObserver(eo){eo===void 0&&(eo={});var to=eo.onResize,ro=reactExports.useRef(void 0);ro.current=to;var no=eo.round||Math.round,oo=reactExports.useRef(),io=reactExports.useState({width:void 0,height:void 0}),so=io[0],ao=io[1],lo=reactExports.useRef(!1);reactExports.useEffect(function(){return lo.current=!1,function(){lo.current=!0}},[]);var co=reactExports.useRef({width:void 0,height:void 0}),uo=useResolvedElement(reactExports.useCallback(function(fo){return(!oo.current||oo.current.box!==eo.box||oo.current.round!==no)&&(oo.current={box:eo.box,round:no,instance:new ResizeObserver(function(ho){var po=ho[0],go=eo.box==="border-box"?"borderBoxSize":eo.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",vo=extractSize(po,go,"inlineSize"),yo=extractSize(po,go,"blockSize"),xo=vo?no(vo):void 0,_o=yo?no(yo):void 0;if(co.current.width!==xo||co.current.height!==_o){var Eo={width:xo,height:_o};co.current.width=xo,co.current.height=_o,ro.current?ro.current(Eo):lo.current||ao(Eo)}})}),oo.current.instance.observe(fo,{box:eo.box}),function(){oo.current&&oo.current.instance.unobserve(fo)}},[eo.box,no]),eo.ref);return reactExports.useMemo(function(){return{ref:uo,width:so.width,height:so.height}},[uo,so.width,so.height])}function KindText({kind:eo}){return jsxRuntimeExports.jsx(Badge$2,{appearance:"outline",size:"medium",children:eo||UNDEFINED_VALUE_PLACEHOLDER})}function TimeText({time:eo}){const to=timeFormat(eo);return jsxRuntimeExports.jsx("time",{children:to})}const CellWrapper=({children:eo})=>{const to=useClasses$a();return jsxRuntimeExports.jsx("div",{className:to.cellWrapper,children:eo})},TextCellWrapper=({children:eo})=>{const to=useClasses$a();return jsxRuntimeExports.jsx("div",{className:to.textCellWrapper,children:jsxRuntimeExports.jsx("p",{className:to.textCellP,children:eo})})},CellSkeleton=({height:eo})=>{const to=useClasses$a();return jsxRuntimeExports.jsx(Skeleton,{className:to.textCellWrapper,children:jsxRuntimeExports.jsx(SkeletonItem,{style:{height:`${eo??20}px`}})})},useClasses$a=makeStyles({cellWrapper:{display:"flex",flexDirection:"row",alignItems:"center",height:"100%"},textCellWrapper:{display:"flex",flexDirection:"row",alignItems:"center",height:"100%",width:"100%"},textCellP:{wordWrap:"break-word",maxWidth:"100%",lineHeight:tokens.lineHeightBase200,fontSize:tokens.fontSizeBase300,maxHeight:"100%",whiteSpace:"normal",...shorthands.padding(tokens.spacingVerticalS,tokens.spacingHorizontalXS)}}),TraceListJsonCell=({jsonObject:eo,isViewDetailEnabled:to=!1})=>{const ro=reactExports.useMemo(()=>typeof eo=="string"?isValidJson(eo)?!1:!isJsonl(eo):!1,[eo]);return jsxRuntimeExports.jsx(CellWrapper,{children:ro?jsxRuntimeExports.jsx(TextCellWrapper,{children:formatText(String(eo))}):jsxRuntimeExports.jsx(TraceListObjectCell,{object:eo,isViewDetailEnabled:to})})},TraceListObjectCell=({object:eo,isViewDetailEnabled:to})=>{const ro=useIsDark();return to?jsxRuntimeExports.jsxs(Dialog,{children:[jsxRuntimeExports.jsx(DialogTrigger,{children:jsxRuntimeExports.jsx("div",{style:{overflow:"hidden",height:"100%",width:"100%",marginTop:"12px",lineHeight:"16px"},children:jsxRuntimeExports.jsx(JsonViewer,{src:eo,enableClipboard:!1,collapsed:1,dark:ro,theme:"vscode",disableCustomCollapse:!0})})}),jsxRuntimeExports.jsxs(DialogSurface,{children:[jsxRuntimeExports.jsx("div",{style:{height:"800px",width:"800ppx",marginTop:"12px",lineHeight:"16px",overflow:"auto"},children:jsxRuntimeExports.jsx(JsonViewer,{src:eo,enableClipboard:!0,dark:ro,theme:"vscode",collapseStringsAfterLength:600})}),jsxRuntimeExports.jsx(DialogActions,{style:{justifyContent:"flex-end"},children:jsxRuntimeExports.jsx(DialogTrigger,{disableButtonEnhancement:!0,children:jsxRuntimeExports.jsx(Button$2,{appearance:"secondary",children:"Close"})})})]})]}):jsxRuntimeExports.jsx("div",{style:{overflow:"hidden",height:"100%",width:"100%",marginTop:"12px",lineHeight:"16px"},children:jsxRuntimeExports.jsx(JsonViewer,{src:eo,enableClipboard:!1,collapseStringsAfterLength:50,collapsed:1,dark:ro,theme:"vscode",enablePopUpImageViewer:!1,disableCustomCollapse:!0})})},MAX_LENGTH=80;function formatText(eo){return eo.length>MAX_LENGTH?`${eo.slice(0,MAX_LENGTH)}...`:eo}const MetricsCell=({trace:eo})=>{const to=useClasses$9(),ro=30;return eo.evaluations?jsxRuntimeExports.jsx("div",{className:to.wrapper,children:Object.entries(eo.evaluations).map(([no,oo])=>{let io=oo.outputs;if(io=typeof io=="string"?safeJSONParseV2(io):io,typeof io=="object")return Object.entries(io).map(([so,ao])=>{const lo=`${so}`;return jsxRuntimeExports.jsx(MetricTag,{tag:{name:lo,value:`${ao}`},maxValueLength:Math.max(ro-lo.length,3)},`${no}_${so}`)});{const so=`${no}`;return jsxRuntimeExports.jsx(MetricTag,{tag:{name:so,value:`${io}`},maxValueLength:Math.max(ro-so.length,3)},no)}})}):null},useClasses$9=makeStyles({wrapper:{display:"flex",height:"100%",...shorthands.margin("0px","-8px"),...shorthands.padding("4px"),flexDirection:"row",flexWrap:"wrap",alignItems:"center",...shorthands.gap("4px"),...shorthands.overflow("auto")}}),useOnClickTraceRow=()=>{const eo=useSetSelectedTraceId();return reactExports.useCallback((to,ro)=>{eo(to==null?void 0:to.trace_id)},[eo])},useTraceListRows=()=>{const eo=useTraces();return reactExports.useMemo(()=>eo.map(to=>convertToTraceListRow(to)),[eo])},BASIC_WIDTH=100,getColumnChildrenCount=eo=>eo.children?eo==null?void 0:eo.children.reduce((to,ro)=>to+getColumnChildrenCount(ro),0):eo.minWidth??BASIC_WIDTH,METRICS_COLUMN_KEY="metrics_compact",UN_FILTERABLE_COLUMNS=["Kind","Name"],useTraceListColumns=()=>{const{ref:eo,width:to}=useResizeObserver(),ro=useClasses$8(),no=useTraceListRows(),oo=useOnClickTraceRow(),io=useSetTableColumnNames(),so=useTableHiddenColumnKeys(),ao=useLocStrings(),lo=useTraceListColumnModifier(),co=useSortableColumns(),uo=reactExports.useMemo(()=>genStatusChecker("running"),[]),[fo,ho]=React.useState([]);return reactExports.useEffect(()=>{const po=[{key:"kind",name:ao.Kind,minWidth:100,maxWidth:200,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{}):jsxRuntimeExports.jsx(KindText,{kind:wo.kind})},{key:"name",name:ao.Name,minWidth:120,maxWidth:300,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{}):jsxRuntimeExports.jsx(Tooltip,{content:wo.name??"",relationship:"label",children:jsxRuntimeExports.jsx("span",{className:ro.nameCell,title:wo.name,onClick:()=>{oo(wo,"name")},children:wo.name})})},{key:"input",name:ao.Input,minWidth:180,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{height:40}):jsxRuntimeExports.jsx(TraceListJsonCell,{jsonObject:wo.inputs,isViewDetailEnabled:!0})},{key:"output",name:ao.Output,minWidth:180,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{height:40}):jsxRuntimeExports.jsx(TraceListJsonCell,{jsonObject:wo.outputs,isViewDetailEnabled:!0})},{key:"start_time",name:ao.Start_time,minWidth:100,maxWidth:300,renderCell:({row:wo})=>jsxRuntimeExports.jsx(TextCellWrapper,{children:jsxRuntimeExports.jsx(TimeText,{time:wo.start_time})})},{key:"end_time",name:ao.End_time,minWidth:100,maxWidth:300,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{height:40}):jsxRuntimeExports.jsx(TextCellWrapper,{children:jsxRuntimeExports.jsx(TimeText,{time:wo.end_time})})},{key:"latency",name:ao.Latency,minWidth:120,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{}):jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:wo.start_time,endTimeISOString:wo.end_time,size:UISize.small})})},{key:"total_tokens",name:ao.Total_tokens,minWidth:100,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{}):jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(SummaryToken,{trace:wo,size:UISize.small})})},{key:"status",name:ao.Status,minWidth:60,renderCell:({row:wo})=>jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(StatusText,{statusCode:wo.status})})},{key:METRICS_COLUMN_KEY,name:ao.Metrics,minWidth:240,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{}):jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(MetricsCell,{trace:wo})})}],go=[];no.forEach(wo=>{Object.entries(wo.evaluations??{}).forEach(([Ro])=>{!go.includes(Ro)&&Ro&&go.push(Ro)})});const vo=go.map(wo=>{const Ro=[],Do=[];return no.forEach($o=>{var Bo;const Mo=(Bo=$o.evaluations)==null?void 0:Bo[wo];if(!Mo||!Mo.outputs)return;const Po=typeof Mo.outputs=="string"?safeJSONParseV2(Mo.outputs):Mo.outputs;Object.keys(Po).forEach(No=>{const Fo=Po[No];!Ro.includes(No)&&Fo!==null&&(Ro.push(No),Do.push({key:`evaluation-${wo}-${No}-value`,name:No,renderCell:({row:zo})=>{var Qo,Zo,bs;if(uo(zo.status))return jsxRuntimeExports.jsx(CellSkeleton,{});let qo;const Go=(bs=(Zo=(Qo=zo==null?void 0:zo.evaluations)==null?void 0:Qo[wo])==null?void 0:Zo.outputs)==null?void 0:bs[No];return Go===void 0?qo="":typeof Go=="number"?qo=formatNumber$1(Go):qo=`${Go}`,qo}}))})}),{name:wo,key:`evaluation-${wo}`,children:Do}});let yo=[...po,{key:"evaluations",name:"Metrics",minWidth:450,children:vo}];yo=lo?lo(yo,no):yo;const xo=yo.filter(wo=>wo.key!=="evaluations"),_o=yo.find(wo=>wo.key==="evaluations");io({normalColumns:xo.map(wo=>({name:wo.name,key:wo.key})).filter(wo=>!UN_FILTERABLE_COLUMNS.includes(wo.name)),evaluationColumns:_o.children.map(wo=>({name:wo.name,key:wo.key}))});const Eo=xo.filter(wo=>!so.includes(wo.key)),So={..._o,children:_o.children.filter(wo=>!so.includes(wo.key))},ko=[...Eo,So],Ao=ko.reduce((wo,Ro)=>wo+getColumnChildrenCount(Ro),0),Co=wo=>{if(wo.children)return{...wo,children:wo.children.map(Co)};const Ro=wo.minWidth??BASIC_WIDTH,Do=wo.maxWidth,$o=to?(to-24)/Ao*Ro:200;return{...wo,width:$o,minWidth:Ro,maxWidth:Do}},Oo=ko.map(Co).map(wo=>{const Ro=wo.key;return Ro?{...wo,key:wo.key,sortable:!!(Ro&&co.includes(Ro))}:wo});ho(Oo)},[no,oo,ro.nameCell,lo,so,ao,io,co,to,uo]),{columns:fo,ref:eo}},useClasses$8=makeStyles({typeBadge:{...shorthands.padding(tokens.spacingVerticalXXS,tokens.spacingHorizontalS)},latencyWrapper:{display:"flex",flexDirection:"row",alignItems:"center",justifyItems:"center","> svg":{marginRight:"5px"}},nameCell:{color:tokens.colorBrandForeground1,fontWeight:tokens.fontWeightSemibold,":hover":{...shorthands.textDecoration("underline")}}});let Text$1=class h_{lineAt(to){if(to<0||to>this.length)throw new RangeError(`Invalid position ${to} in document of length ${this.length}`);return this.lineInner(to,!1,1,0)}line(to){if(to<1||to>this.lines)throw new RangeError(`Invalid line number ${to} in ${this.lines}-line document`);return this.lineInner(to,!0,1,0)}replace(to,ro,no){[to,ro]=clip(this,to,ro);let oo=[];return this.decompose(0,to,oo,2),no.length&&no.decompose(0,no.length,oo,3),this.decompose(ro,this.length,oo,1),TextNode.from(oo,this.length-(ro-to)+no.length)}append(to){return this.replace(this.length,this.length,to)}slice(to,ro=this.length){[to,ro]=clip(this,to,ro);let no=[];return this.decompose(to,ro,no,0),TextNode.from(no,ro-to)}eq(to){if(to==this)return!0;if(to.length!=this.length||to.lines!=this.lines)return!1;let ro=this.scanIdentical(to,1),no=this.length-this.scanIdentical(to,-1),oo=new RawTextCursor(this),io=new RawTextCursor(to);for(let so=ro,ao=ro;;){if(oo.next(so),io.next(so),so=0,oo.lineBreak!=io.lineBreak||oo.done!=io.done||oo.value!=io.value)return!1;if(ao+=oo.value.length,oo.done||ao>=no)return!0}}iter(to=1){return new RawTextCursor(this,to)}iterRange(to,ro=this.length){return new PartialTextCursor(this,to,ro)}iterLines(to,ro){let no;if(to==null)no=this.iter();else{ro==null&&(ro=this.lines+1);let oo=this.line(to).from;no=this.iterRange(oo,Math.max(oo,ro==this.lines+1?this.length:ro<=1?0:this.line(ro-1).to))}return new LineCursor(no)}toString(){return this.sliceString(0)}toJSON(){let to=[];return this.flatten(to),to}constructor(){}static of(to){if(to.length==0)throw new RangeError("A document must have at least one line");return to.length==1&&!to[0]?h_.empty:to.length<=32?new TextLeaf(to):TextNode.from(TextLeaf.split(to,[]))}};class TextLeaf extends Text$1{constructor(to,ro=textLength(to)){super(),this.text=to,this.length=ro}get lines(){return this.text.length}get children(){return null}lineInner(to,ro,no,oo){for(let io=0;;io++){let so=this.text[io],ao=oo+so.length;if((ro?no:ao)>=to)return new Line(oo,ao,no,so);oo=ao+1,no++}}decompose(to,ro,no,oo){let io=to<=0&&ro>=this.length?this:new TextLeaf(sliceText(this.text,to,ro),Math.min(ro,this.length)-Math.max(0,to));if(oo&1){let so=no.pop(),ao=appendText(io.text,so.text.slice(),0,io.length);if(ao.length<=32)no.push(new TextLeaf(ao,so.length+io.length));else{let lo=ao.length>>1;no.push(new TextLeaf(ao.slice(0,lo)),new TextLeaf(ao.slice(lo)))}}else no.push(io)}replace(to,ro,no){if(!(no instanceof TextLeaf))return super.replace(to,ro,no);[to,ro]=clip(this,to,ro);let oo=appendText(this.text,appendText(no.text,sliceText(this.text,0,to)),ro),io=this.length+no.length-(ro-to);return oo.length<=32?new TextLeaf(oo,io):TextNode.from(TextLeaf.split(oo,[]),io)}sliceString(to,ro=this.length,no=` +`)),reactExports.useEffect(()=>{no(ViewStatus.loading),oo({onCompleted:po=>{no(po?ViewStatus.error:ViewStatus.loaded)}}),co(ViewStatus.loading),uo({onCompleted:po=>{co(po?ViewStatus.error:ViewStatus.loaded)}})},[oo,uo]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:to.Query})})}),lo===ViewStatus.loading&&jsxRuntimeExports.jsx(Spinner,{size:"tiny"}),lo===ViewStatus.loaded&&(ho??""),lo===ViewStatus.error&&jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{co(ViewStatus.loading),uo({onCompleted:po=>{co(po?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})]}),jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:to.Documents})})}),ro===ViewStatus.loading&&jsxRuntimeExports.jsx(Spinner,{size:"tiny"}),ro===ViewStatus.loaded&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ao.map(po=>jsxRuntimeExports.jsx(Document$1,{document:po},po["document.id"]))}),ro===ViewStatus.error&&jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{no(ViewStatus.loading),oo({onCompleted:po=>{no(po?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})]})]})},Document$1=({document:eo})=>{const to=useRetrievalNodeDetailClasses(),[ro,no]=reactExports.useState(["content"]),oo=reactExports.useCallback((so,ao)=>{no(ao.openItems)},[]),io=useLocStrings();return jsxRuntimeExports.jsxs(Card,{style:{background:tokens.colorNeutralBackground2},children:[jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",columnGap:6},children:[jsxRuntimeExports.jsx(Document16Regular,{}),jsxRuntimeExports.jsx("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:jsxRuntimeExports.jsx(Tooltip,{content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:"id"})," ",eo["document.id"]]}),relationship:"description",children:jsxRuntimeExports.jsxs("span",{children:[io.document," ",eo["document.id"]]})})}),jsxRuntimeExports.jsx(Tooltip,{content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:io.score})," ",eo["document.score"]]}),relationship:"description",children:jsxRuntimeExports.jsxs(Badge$2,{appearance:"outline",children:["score ",floatFormatter(eo["document.score"])]})})]}),jsxRuntimeExports.jsx(Divider$2,{}),jsxRuntimeExports.jsx(Card,{style:{background:tokens.colorNeutralBackground3},children:jsxRuntimeExports.jsx(Accordion,{openItems:ro,onToggle:oo,collapsible:!0,multiple:!0,children:jsxRuntimeExports.jsxs(AccordionItem,{value:"content",children:[jsxRuntimeExports.jsx(AccordionHeader,{className:to.accordionHeader,children:io.content}),jsxRuntimeExports.jsx(AccordionPanel,{children:jsxRuntimeExports.jsx(MarkdownViewer,{content:eo["document.content"]})})]})})}),jsxRuntimeExports.jsx(JsonNodeCard,{title:"metadata",src:eo["document.metadata"],wrapperStyle:{background:tokens.colorNeutralBackground3}})]})},RetrievalSpanDetailContent=()=>{var lo;const eo=useSelectedSpan(),[to,ro]=reactExports.useState("retrieval"),no=useNodeDetailClasses(),oo=useLocStrings(),io=(lo=eo==null?void 0:eo.events)==null?void 0:lo.filter(co=>co.name===BuildInEventName.exception),so=(io==null?void 0:io.length)??0,ao=[{key:"retrieval",name:oo.Retrieval},{key:"raw",name:oo.Raw_JSON},{key:"error",name:oo.Exception,icon:jsxRuntimeExports.jsx(CounterBadge,{appearance:"filled",color:so>0?"danger":"informative",count:so,size:"small",showZero:!0})}];return jsxRuntimeExports.jsxs("div",{className:no.layoutLeft,children:[jsxRuntimeExports.jsx(SpanDetailTabs,{tabs:ao,selectedTab:to,setSelectedTab:ro}),jsxRuntimeExports.jsx(SpanDetailErrorMessageBar,{setSelectedTab:ro}),jsxRuntimeExports.jsxs("div",{className:no.content,children:[to==="retrieval"&&jsxRuntimeExports.jsx(RetrievalNodeInfo,{}),to==="raw"&&jsxRuntimeExports.jsx(NodeRawCard,{}),to==="error"&&jsxRuntimeExports.jsx(ErrorsTab,{})]})]})},NodeModel=()=>{const eo=useNodeDetailClasses(),to=useSelectedSpan(),{"llm.response.model":ro}=(to==null?void 0:to.attributes)||{};return ro?jsxRuntimeExports.jsx("div",{className:eo.headerModalName,children:ro}):null},OpenAIIcon=({styles:eo})=>jsxRuntimeExports.jsxs("svg",{fill:"currentColor",width:"20px",height:"20px",viewBox:"0 0 2048 2048",role:"img",xmlns:"http://www.w3.org/2000/svg",style:eo,children:[jsxRuntimeExports.jsx("title",{children:"OpenAI icon"}),jsxRuntimeExports.jsx("path",{d:"M832 676l575 288v760l-575 288-575-288V964l575-288zm0 144l-368 184 368 183 368-183-368-184zm-447 825l383 191v-538l-383-191v538zm894 0v-538l-383 191v538l383-191zm577-733q14 0 23 9t9 23q0 23 9 43t24 36 35 24 44 9q14 0 23 9t9 23q0 14-9 23t-23 9q-23 0-43 9t-36 24-24 35-9 44q0 14-9 23t-23 9q-14 0-23-9t-9-23q0-23-9-43t-24-36-35-24-44-9q-14 0-23-9t-9-23q0-14 9-23t23-9q23 0 43-9t36-24 24-35 9-44q0-14 9-23t23-9zM704 496q-14 0-23-9t-9-23q0-23-9-43t-24-36-35-24-44-9q-14 0-23-9t-9-23q0-14 9-23t23-9q23 0 43-9t36-24 24-35 9-44q0-14 9-23t23-9q14 0 23 9t9 23q0 23 9 43t24 36 35 24 44 9q14 0 23 9t9 23q0 14-9 23t-23 9q-23 0-43 9t-36 24-24 35-9 44q0 14-9 23t-23 9zm1206-48q0 23-15 38t-39 16q-27 0-57 11t-58 28-54 37-45 40q-19 19-39 44t-38 54-28 59-11 57q0 23-15 38t-39 16q-23 0-38-15t-16-39q0-27-11-57t-28-58-37-54-40-45q-19-19-44-39t-54-38-59-28-57-11q-23 0-38-15t-16-39q0-23 15-38t39-16q27 0 57-11t58-28 54-37 45-40q19-19 39-44t38-54 28-59 11-57q0-23 15-38t39-16q23 0 38 15t16 39q0 27 11 57t28 58 37 54 40 45q19 19 44 39t54 38 59 28 57 11q23 0 38 15t16 39zm-438 212q38-65 92-119t120-93q-65-38-119-92t-93-120q-38 65-92 119t-120 93q65 38 119 92t93 120z"})]});function SpanType({span:eo,showText:to=!0,className:ro,...no}){const oo=useClasses$d(),{color:io,backgroundColor:so,icon:ao,text:lo}=reactExports.useMemo(()=>(eo==null?void 0:eo.toLocaleLowerCase())==="flow"?{color:tokens.colorPaletteBlueForeground2,backgroundColor:tokens.colorPaletteBlueBackground2,icon:jsxRuntimeExports.jsx(Flow16Regular,{}),text:"Flow"}:(eo==null?void 0:eo.toLocaleLowerCase())==="function"||(eo==null?void 0:eo.toLocaleLowerCase())==="tool"?{color:tokens.colorPaletteLavenderForeground2,backgroundColor:tokens.colorPaletteLavenderBackground2,icon:jsxRuntimeExports.jsx(HexagonThree16Regular,{}),text:"Function"}:(eo==null?void 0:eo.toLocaleLowerCase())==="retrieval"?{color:tokens.colorPaletteBrownForeground2,backgroundColor:tokens.colorPaletteBrownBackground2,icon:jsxRuntimeExports.jsx(BranchRequest16Regular,{}),text:"Retrieval"}:(eo==null?void 0:eo.toLocaleLowerCase())==="embedding"?{color:tokens.colorPaletteCornflowerForeground2,backgroundColor:tokens.colorPaletteCornflowerBackground2,icon:jsxRuntimeExports.jsx(FlowchartRegular,{}),text:"Embedding"}:(eo==null?void 0:eo.toLocaleLowerCase())==="llm"?{color:tokens.colorPaletteLightTealForeground2,backgroundColor:tokens.colorPaletteLightTealBackground2,icon:jsxRuntimeExports.jsx(OpenAIIcon,{styles:{height:"16px",width:"16px"}}),text:"LLM"}:(eo==null?void 0:eo.toLocaleLowerCase())==="network"?{color:tokens.colorPaletteSteelForeground2,backgroundColor:tokens.colorPaletteSteelBackground2,icon:jsxRuntimeExports.jsx(Link16Regular,{}),text:"Network"}:(eo==null?void 0:eo.toLocaleLowerCase())==="http"?{color:tokens.colorPaletteSteelForeground2,backgroundColor:tokens.colorPaletteSteelBackground2,icon:jsxRuntimeExports.jsx(Link16Regular,{}),text:"Http"}:{color:tokens.colorPaletteMarigoldForeground2,backgroundColor:tokens.colorPaletteMarigoldBackground2,icon:jsxRuntimeExports.jsx(QuestionCircle16Regular,{}),text:"Unknown"},[eo]);return eo===void 0?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}):jsxRuntimeExports.jsx(Badge$2,{appearance:"filled",size:"large",className:mergeClasses(oo.root,ro),icon:ao,style:{color:io,backgroundColor:so},...no,children:to&&lo})}const useClasses$d=makeStyles({root:{height:"24px",...shorthands.padding("0","6px")}}),SpanDetailHeader=({span:eo,spanType:to,showEvaluations:ro,showRightPanel:no,setShowRightPanel:oo})=>{const io=useNodeDetailClasses();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SpanType,{span:to,showText:!1,className:io.headerSpan}),jsxRuntimeExports.jsx(Tooltip,{content:eo.name??"",relationship:"label",children:jsxRuntimeExports.jsx("div",{className:io.headerTitle,children:`${eo.name}`})}),jsxRuntimeExports.jsxs("div",{className:io.headerRight,children:[jsxRuntimeExports.jsx(NodeModel,{}),jsxRuntimeExports.jsx(NodeToken,{span:eo,size:UISize.small}),jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:eo.start_time,endTimeISOString:eo.end_time,size:UISize.small}),ro&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$2,{vertical:!0}),no?jsxRuntimeExports.jsx(Button$2,{appearance:"transparent",icon:jsxRuntimeExports.jsx(PanelRightContract20Regular,{}),onClick:()=>oo(!1)}):jsxRuntimeExports.jsx(Button$2,{appearance:"transparent",icon:jsxRuntimeExports.jsx(PanelRightExpand20Regular,{}),onClick:()=>oo(!0)})]})]})]})},NodeDetail=({placeholder:eo,renderLogsPivot:to})=>{var Eo;const ro=useSelectedSpan(),no=getSpanType(ro),oo=useRootSpanIdOfSelectedSpans(),io=useSelectedLLMMessage(),so=useNodeDetailClasses(),ao=useShowTraceDetailRightPanel(),lo=useSetShowTraceDetailRightPanel(),uo=useEvaluationSpansOfSelectedSpan().length,fo=oo===((Eo=ro==null?void 0:ro.context)==null?void 0:Eo.span_id),ho=(no==null?void 0:no.toLowerCase())==="http",po=(no==null?void 0:no.toLowerCase())==="llm",go=(no==null?void 0:no.toLowerCase())==="retrieval",vo=(no==null?void 0:no.toLowerCase())==="embedding",yo=!!io;let xo=null,_o=null;if(yo)xo=jsxRuntimeExports.jsx(LLMMessageNodeHeader,{selectedLLMMessage:io.message}),_o=jsxRuntimeExports.jsx(LLMMessageNodeContent,{selectedLLMMessage:io.message});else if(ro){const So=fo&&uo>0;xo=jsxRuntimeExports.jsx(SpanDetailHeader,{span:ro,spanType:no,showEvaluations:So,showRightPanel:ao,setShowRightPanel:lo}),_o=jsxRuntimeExports.jsx(DefaultSpanDetailContent,{showEvaluationPanel:ao&&So,showLogs:fo,renderLogsPivot:to}),po&&(_o=jsxRuntimeExports.jsx(LLMSpanContent,{})),ho&&(_o=jsxRuntimeExports.jsx(HttpSpanDetailContent,{})),go&&(_o=jsxRuntimeExports.jsx(RetrievalSpanDetailContent,{})),vo&&(_o=jsxRuntimeExports.jsx(EmbeddingSpanDetailContent,{}))}else xo=null,_o=jsxRuntimeExports.jsx("div",{className:so.layoutLeft,children:eo});return jsxRuntimeExports.jsxs("div",{className:so.wrapper,children:[xo?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:so.header,children:xo}),jsxRuntimeExports.jsx(Divider$2,{className:so.divider})]}):null,jsxRuntimeExports.jsx("div",{className:so.layout,children:_o})]})},UNDEFINED_VALUE_PLACEHOLDER="N/A",RUNNING_TRACE_POLLING_GAP=3e4,SPAN_POLLING_GAP=3e4;let LOCAL_URL_PREFIX="";const TREE_PATH_CLASSNAME="__trace-tree-node-path",SpansTreeContext=reactExports.createContext({parentIdLookUp:new Map,treeOpenIds:Set$1(),setTreeOpenIds:()=>{}});function useTreeViewNodes(eo){const to=useTraceViewModel(),ro=useSelectedTraceId();return reactExports.useMemo(()=>{const no={},oo=new Map,io=[],so=eo.map(fo=>{var ho,po,go;if((ho=fo==null?void 0:fo.context)!=null&&ho.span_id){const vo={...fo,uiChildren:[]};no[(po=fo.context)==null?void 0:po.span_id]=vo;const yo=getSpanType(fo);return(yo==null?void 0:yo.toLowerCase())!=="llm"&&io.push((go=fo.context)==null?void 0:go.span_id),vo}return null}).filter(fo=>!!fo),ao=[];so.forEach(fo=>{var ho;if(fo.parent_id&&no[fo.parent_id]){const po=(ho=fo.context)==null?void 0:ho.span_id;if(!po)return;no[fo.parent_id].uiChildren.push(no[po]),no[fo.parent_id].uiChildren.sort(sortTraceByStartTimeAsc),oo.has(fo.parent_id)?oo.get(fo.parent_id).push(no[po]):oo.set(fo.parent_id,[no[po]]);const go=getSpanType(fo);if((go==null?void 0:go.toLowerCase())==="llm"){const{inputMessages:vo,outputMessages:yo}=getSpanMessages(to,ro,po);[...vo,...yo].forEach((_o,Eo)=>{const ko={context:{span_id:`llm-message-${po}-${Eo}`},uiIsMessage:!0,data:_o,parent_id:po,uiChildren:[]};ao.push(ko),oo.has(po)?oo.get(po).push(ko):oo.set(po,[ko]),no[po].uiChildren.push(ko)})}}});const lo=(fo,ho)=>{var po,go;if(fo.uiLevel=ho,ho>8&&(po=fo.context)!=null&&po.span_id){const vo=io.indexOf((go=fo.context)==null?void 0:go.span_id);vo!==-1&&io.splice(vo,1)}fo.uiChildren&&fo.uiChildren.forEach(vo=>lo(vo,ho+1))},co=so.filter(fo=>!fo.parent_id||!no[fo.parent_id]).sort(sortTraceByStartTimeAsc);co.forEach(fo=>{lo(fo,0)});const uo=[...so,...ao];return{rootNodes:co,nodes:uo,parentIdLookUp:oo,defaultOpenItems:io}},[eo,to,ro])}const sortTraceByStartTimeAsc=(eo,to)=>eo.start_time&&to.start_time?Date.parse(eo.start_time)-Date.parse(to.start_time):1,useSpanTreeNodeStyles=makeStyles({spanName:{fontSize:"14px",color:tokens.colorNeutralForeground2,...shorthands.overflow("hidden"),textOverflow:"ellipsis",whiteSpace:"nowrap"},aside:{display:"flex",flexWrap:"nowrap",justifyContent:"flex-end",marginLeft:"auto",...shorthands.flex(0,0,"auto"),...shorthands.padding("0px","4px","0px","0px"),...shorthands.gap(tokens.spacingHorizontalXS)},node:{height:"36px",":hover":{backgroundColor:"rgba(189, 189, 189,0.15)"},"[aria-selected='true']":{backgroundColor:"rgba(220, 220, 220, 0.5)"},...shorthands.borderRadius("4px")},node_dark:{":hover":{backgroundColor:"rgba(70, 70, 70,0.5)"},"[aria-selected='true']":{backgroundColor:"rgba(90, 90, 90, 0.5)"}},selectedBar:{position:"absolute",backgroundColor:"#1372ED",width:"3px",height:"24px",left:"0px",...shorthands.borderRadius("3px")},root:{display:"flex",flexWrap:"nowrap"},toggleButton:{marginLeft:"-6px",marginRight:"-2px"},lastInputMessage:{...shorthands.margin("0px","0px","0px","4px"),fontSize:"12px",color:tokens.colorNeutralForeground2},lastInputMessageLabel:shorthands.margin("0px","4px","0px","0px"),roleBadge:{marginLeft:"6px",marginRight:"6px"},expandButton:{position:"absolute",left:"0",top:"0",bottom:"0",...shorthands.borderRadius("0px"),":hover":{backgroundColor:tokens.colorNeutralBackground3Hover}}}),LLMMessageTreeNode=({node:eo})=>{var co,uo,fo,ho;const to=eo.data,ro=useSpanTreeNodeStyles(),no=useSelectedLLMMessage(),oo=(no==null?void 0:no.id)===((co=eo.context)==null?void 0:co.span_id),io=useLocStrings(),so=!!to.content,ao=!!to.tool_calls,lo=!!to.function_call;return jsxRuntimeExports.jsxs(TreeItemLayout,{className:ro.node,"aria-selected":oo,children:[oo&&jsxRuntimeExports.jsx("div",{className:ro.selectedBar}),so&&jsxRuntimeExports.jsx(Badge$2,{icon:jsxRuntimeExports.jsx(Mail16Regular,{}),iconPosition:"after",appearance:"ghost",size:"large",className:ro.roleBadge,"data-tree-path-id":((uo=eo.context)==null?void 0:uo.span_id)??"",style:{backgroundColor:tokens.colorBrandBackground2,color:tokens.colorBrandForeground2,borderColor:tokens.colorBrandForeground2},children:io.message}),ao&&jsxRuntimeExports.jsx(Badge$2,{icon:jsxRuntimeExports.jsx(Code16Regular,{}),iconPosition:"after",appearance:"ghost",size:"large",className:ro.roleBadge,"data-tree-path-id":((fo=eo.context)==null?void 0:fo.span_id)??"",style:{backgroundColor:tokens.colorPaletteLightGreenBackground1,color:tokens.colorPaletteLightGreenForeground1,borderColor:tokens.colorPaletteLightGreenForeground1},children:io.tool_calls}),lo&&jsxRuntimeExports.jsx(Badge$2,{icon:jsxRuntimeExports.jsx(Code16Regular,{}),iconPosition:"after",appearance:"ghost",size:"large",className:ro.roleBadge,"data-tree-path-id":((ho=eo.context)==null?void 0:ho.span_id)??"",style:{backgroundColor:tokens.colorPaletteLightGreenBackground1,color:tokens.colorPaletteLightGreenForeground1,borderColor:tokens.colorPaletteLightGreenForeground1},children:io.function_call}),jsxRuntimeExports.jsx(LLMMessageSenderBadge,{name:to.name,role:to.role,className:ro.roleBadge}),to.name]})},useIsLeafSpan=eo=>{var no;const ro=reactExports.useContext(SpansTreeContext).parentIdLookUp;return!ro.get(eo)||((no=ro.get(eo))==null?void 0:no.length)===0},useToggleCollapse=()=>{const{setTreeOpenIds:eo}=reactExports.useContext(SpansTreeContext);return reactExports.useCallback(to=>{eo(ro=>ro.has(to)?ro.delete(to):ro.add(to))},[eo])},useIsOpen=eo=>reactExports.useContext(SpansTreeContext).treeOpenIds.has(eo),TreeNode$1=({node:eo})=>{var fo,ho,po,go,vo,yo,xo,_o;const to=getSpanType(eo),ro=useSpanTreeNodeStyles(),oo=useSelectedSpanId()===((fo=eo==null?void 0:eo.context)==null?void 0:fo.span_id),io=useToggleCollapse(),so=useIsLeafSpan(((ho=eo.context)==null?void 0:ho.span_id)??""),ao=useIsOpen(((po=eo.context)==null?void 0:po.span_id)??""),lo=useIsDark();useStaticStyles$1();const co=reactExports.useCallback(Eo=>{var So;Eo.preventDefault(),Eo.stopPropagation(),io(((So=eo.context)==null?void 0:So.span_id)??"")},[(go=eo.context)==null?void 0:go.span_id,io]),uo=so?null:jsxRuntimeExports.jsx(Button$2,{appearance:"subtle",size:"small",onClick:co,className:ro.expandButton,icon:ao?jsxRuntimeExports.jsx(ChevronDown16Regular,{}):jsxRuntimeExports.jsx(ChevronRight16Regular,{})});return jsxRuntimeExports.jsxs(TreeItemLayout,{className:mergeClasses(ro.node,lo&&ro.node_dark),"aria-selected":oo,expandIcon:uo,aside:jsxRuntimeExports.jsxs("div",{className:ro.aside,children:[((yo=(vo=eo==null?void 0:eo.status)==null?void 0:vo.status_code)==null?void 0:yo.toLowerCase())==="error"&&jsxRuntimeExports.jsx(StatusText,{statusCode:(xo=eo.status)==null?void 0:xo.status_code,tooltipContent:eo.status.description,size:UISize.extraSmall}),jsxRuntimeExports.jsx(NodeToken,{span:eo,size:UISize.extraSmall}),jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:eo.start_time,endTimeISOString:eo.end_time,size:UISize.extraSmall})]}),children:[oo&&jsxRuntimeExports.jsx("div",{className:ro.selectedBar}),to&&jsxRuntimeExports.jsx(SpanType,{span:to,"data-tree-path-id":((_o=eo.context)==null?void 0:_o.span_id)??""}),jsxRuntimeExports.jsx(Tooltip,{content:eo.name??"",relationship:"label",children:jsxRuntimeExports.jsx("div",{className:ro.spanName,children:`${eo.name}`})})]})},useStaticStyles$1=makeStaticStyles({".fui-TreeItemLayout__main":{flex:"0 1 auto",width:"100%",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",display:"flex",gap:"6px",position:"static"},".fui-TreeItemLayout":{position:"relative",overflow:"hidden"}}),TreeView=()=>{const eo=useSetSelectedSpanId(),to=useSetSelectedLLMMessage(),ro=useSpansOfSelectedTrace(),no=useClasses$c(),{rootNodes:oo,nodes:io,parentIdLookUp:so,defaultOpenItems:ao}=useTreeViewNodes(ro),[lo,co]=reactExports.useState(Set$1(ao));useStaticStyles();const[uo,fo]=reactExports.useState(ViewStatus.loading),ho=useLoadSpans(ro.filter(po=>{var go;return((go=getSpanType(po))==null?void 0:go.toLocaleLowerCase())==="llm"}),[BuildInEventName["llm.generated_message"],BuildInEventName["function.inputs"],BuildInEventName["function.output"]]);return reactExports.useEffect(()=>{fo(ViewStatus.loading),ho({onCompleted:po=>{fo(po?ViewStatus.error:ViewStatus.loaded)}})},[ho]),reactExports.useEffect(()=>{var po;eo(((po=oo[0].context)==null?void 0:po.span_id)||"")},[uo]),reactExports.useLayoutEffect(()=>{const po={};io.forEach(vo=>{var yo,xo;(yo=vo.context)!=null&&yo.span_id&&(po[(xo=vo.context)==null?void 0:xo.span_id]=vo)});const go=[];return setTimeout(()=>{var vo;for(const yo of io){const xo=(vo=yo.context)==null?void 0:vo.span_id,_o=yo.parent_id,Eo=document.querySelector('[data-tree-path-layer="path-layer"]'),So=document.querySelector(`[data-tree-path-id="${_o}"]`),ko=document.querySelector(`[data-tree-path-id="${xo}"]`),Ao=document.querySelector('[data-tree-path-layer="path-layer"]');if(!So||!ko||!Ao)continue;const Co=Eo.getBoundingClientRect(),Oo=So.getBoundingClientRect(),wo=ko.getBoundingClientRect(),Ro=So.offsetLeft+12,Do=Oo.top-Co.top+Oo.height/2,$o=document.createElement("div");$o.className=TREE_PATH_CLASSNAME,$o.style.left=`${Ro}px`,$o.style.top=`${Do}px`,$o.style.width=`${wo.left-Oo.left}px`,$o.style.height=`${wo.top-Oo.top}px`,Ao.appendChild($o),go.push($o)}},0),()=>{go.forEach(vo=>{vo.remove()})}},[lo]),jsxRuntimeExports.jsx(SpansTreeContext.Provider,{value:{parentIdLookUp:so,treeOpenIds:lo,setTreeOpenIds:co},children:jsxRuntimeExports.jsxs(Tree$1,{"aria-label":"Trace Tree",openItems:lo,className:no.root,children:[jsxRuntimeExports.jsx("div",{className:no.pathLayer,"data-tree-path-layer":"path-layer"}),oo.map(po=>{var go;return jsxRuntimeExports.jsx(RenderTreeNode,{node:po,onClickMessageNode:vo=>{var yo;to({id:((yo=vo.context)==null?void 0:yo.span_id)||"",message:vo.data}),eo("")},onClickSpanNode:vo=>{var yo;eo(((yo=vo.context)==null?void 0:yo.span_id)||""),to(void 0)}},(go=po.context)==null?void 0:go.span_id)})]})})},RenderTreeNode=({node:eo,onClickMessageNode:to,onClickSpanNode:ro})=>{var oo,io,so,ao,lo;const{level:no}=useSubtreeContext_unstable();if("uiIsMessage"in eo){const co=eo;return jsxRuntimeExports.jsx(TreeItem,{value:(oo=co.context)==null?void 0:oo.span_id,itemType:"leaf",onClick:uo=>{uo.stopPropagation(),to(co)},style:{[treeItemLevelToken]:no},children:jsxRuntimeExports.jsx(LLMMessageTreeNode,{node:co})},(io=co.context)==null?void 0:io.span_id)}else{const co=eo;return jsxRuntimeExports.jsxs(TreeItem,{value:(so=co.context)==null?void 0:so.span_id,itemType:co.uiChildren.length>0?"branch":"leaf",onClick:uo=>{uo.stopPropagation(),ro(co)},style:{[treeItemLevelToken]:no},children:[jsxRuntimeExports.jsx(TreeNode$1,{node:co},(ao=co.context)==null?void 0:ao.span_id),co.uiChildren.length>0&&jsxRuntimeExports.jsx(Tree$1,{children:co.uiChildren.map(uo=>{var fo;return jsxRuntimeExports.jsx(RenderTreeNode,{node:uo,onClickMessageNode:to,onClickSpanNode:ro},(fo=uo==null?void 0:uo.context)==null?void 0:fo.span_id)})})]},(lo=co.context)==null?void 0:lo.span_id)}},useStaticStyles=makeStaticStyles({"fui-TreeItem":{position:"relative"},[`:global(.${TREE_PATH_CLASSNAME})`]:{position:"absolute",boxSizing:"border-box",borderBottomLeftRadius:"8px",borderLeft:`1px solid ${tokens.colorNeutralStroke2}`,borderBottom:`1px solid ${tokens.colorNeutralStroke2}`}}),useClasses$c=makeStyles({root:{position:"relative"},pathLayer:{position:"absolute",top:0,left:0}}),TraceDetail=({renderLogsPivot:eo})=>{var fo,ho;const to=useClasses$b(),ro=useSelectedSpanId(),no=reactExports.useRef(null),oo=useTraceDetailRefreshKey(),io=useSelectedLLMMessage(),so=useIsGanttChartOpen(),ao=useTraceDetailViewStatus(),lo=useTraceDetailLoadingComponent(),co=useTraceDetailErrorComponent(),uo=useLocStrings();return useDebugFunctions(),reactExports.useEffect(()=>{var po;so&&((po=no.current)==null||po.updateSize({height:400,width:"100%"}))},[so]),ao===ViewStatus.error?jsxRuntimeExports.jsx(co,{}):ao===ViewStatus.loading?jsxRuntimeExports.jsx(lo,{}):ao===ViewStatus.hidden?null:jsxRuntimeExports.jsxs("div",{className:to.root,children:[jsxRuntimeExports.jsx("div",{className:to.container,children:jsxRuntimeExports.jsxs("div",{className:to.content,children:[jsxRuntimeExports.jsx(Resizable,{enable:{right:!0},minWidth:100,maxWidth:"60%",defaultSize:{width:TREE_NODE_WIDTH+2*TREE_NODE_INDENT+32,height:"100%"},handleComponent:{right:jsxRuntimeExports.jsx("div",{className:to.resizeBar})},children:jsxRuntimeExports.jsx("div",{className:to.leftPane,children:jsxRuntimeExports.jsx(TreeView,{},oo)})}),jsxRuntimeExports.jsx("div",{className:to.rightPane,children:jsxRuntimeExports.jsx(NodeDetail,{placeholder:jsxRuntimeExports.jsx(MessageBar,{intent:"error",children:uo.No_span_data}),renderLogsPivot:eo},`${oo}-${(fo=io==null?void 0:io.message)==null?void 0:fo.role}-${(ho=io==null?void 0:io.message)==null?void 0:ho.name}`)},`${ro}`)]})}),so&&jsxRuntimeExports.jsx("div",{className:to.bottomPane,children:jsxRuntimeExports.jsx(Resizable,{ref:no,className:to.ganttContainer,defaultSize:{height:0,width:"100%"},enable:{top:!0},handleComponent:{top:jsxRuntimeExports.jsx("div",{className:to.resizeBarBottom})},children:jsxRuntimeExports.jsx(GanttView,{},oo)})})]})},useClasses$b=makeStyles({root:{width:"100%",height:"100%"},container:{display:"flex",flexDirection:"column",height:"100%",width:"100%"},summary:{display:"flex",alignItems:"stretch",height:"48px",width:"100%",...shorthands.margin("16px"),...shorthands.gap("1rem")},content:{...shorthands.flex(1),...shorthands.overflow("hidden"),display:"flex"},leftPane:{height:"100%",overflowY:"auto",boxSizing:"border-box",...shorthands.padding("16px")},rightPane:{position:"relative",width:"100%",height:"100%",...shorthands.flex(1),...shorthands.overflow("hidden")},bottomPane:{position:"absolute",backgroundColor:tokens.colorNeutralBackground1,bottom:0,width:"100%"},ganttContainer:{...shorthands.padding("16px")},resizeBar:{position:"absolute",top:0,bottom:0,right:"5px",width:"6px",backgroundColor:tokens.colorNeutralBackground3,"::before":{content:"''",position:"absolute",top:"50%",right:"1px",marginTop:"-12px",height:"24px",width:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed},"::after":{content:"''",position:"absolute",top:"50%",left:"1px",marginTop:"-12px",height:"24px",width:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed}},resizeBarBottom:{position:"absolute",left:0,right:0,bottom:"5px",height:"6px",backgroundColor:tokens.colorNeutralBackground3,"::before":{content:"''",position:"absolute",left:"50%",bottom:"1px",marginLeft:"-12px",width:"24px",height:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed},"::after":{content:"''",position:"absolute",left:"50%",top:"1px",marginLeft:"-12px",width:"24px",height:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed}}});function useResolvedElement(eo,to){var ro=reactExports.useRef(null),no=reactExports.useRef(null);no.current=to;var oo=reactExports.useRef(null);reactExports.useEffect(function(){io()});var io=reactExports.useCallback(function(){var so=oo.current,ao=no.current,lo=so||(ao?ao instanceof Element?ao:ao.current:null);ro.current&&ro.current.element===lo&&ro.current.subscriber===eo||(ro.current&&ro.current.cleanup&&ro.current.cleanup(),ro.current={element:lo,subscriber:eo,cleanup:lo?eo(lo):void 0})},[eo]);return reactExports.useEffect(function(){return function(){ro.current&&ro.current.cleanup&&(ro.current.cleanup(),ro.current=null)}},[]),reactExports.useCallback(function(so){oo.current=so,io()},[io])}function extractSize(eo,to,ro){return eo[to]?eo[to][0]?eo[to][0][ro]:eo[to][ro]:to==="contentBoxSize"?eo.contentRect[ro==="inlineSize"?"width":"height"]:void 0}function useResizeObserver(eo){eo===void 0&&(eo={});var to=eo.onResize,ro=reactExports.useRef(void 0);ro.current=to;var no=eo.round||Math.round,oo=reactExports.useRef(),io=reactExports.useState({width:void 0,height:void 0}),so=io[0],ao=io[1],lo=reactExports.useRef(!1);reactExports.useEffect(function(){return lo.current=!1,function(){lo.current=!0}},[]);var co=reactExports.useRef({width:void 0,height:void 0}),uo=useResolvedElement(reactExports.useCallback(function(fo){return(!oo.current||oo.current.box!==eo.box||oo.current.round!==no)&&(oo.current={box:eo.box,round:no,instance:new ResizeObserver(function(ho){var po=ho[0],go=eo.box==="border-box"?"borderBoxSize":eo.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",vo=extractSize(po,go,"inlineSize"),yo=extractSize(po,go,"blockSize"),xo=vo?no(vo):void 0,_o=yo?no(yo):void 0;if(co.current.width!==xo||co.current.height!==_o){var Eo={width:xo,height:_o};co.current.width=xo,co.current.height=_o,ro.current?ro.current(Eo):lo.current||ao(Eo)}})}),oo.current.instance.observe(fo,{box:eo.box}),function(){oo.current&&oo.current.instance.unobserve(fo)}},[eo.box,no]),eo.ref);return reactExports.useMemo(function(){return{ref:uo,width:so.width,height:so.height}},[uo,so.width,so.height])}function KindText({kind:eo}){return jsxRuntimeExports.jsx(Badge$2,{appearance:"outline",size:"medium",children:eo||UNDEFINED_VALUE_PLACEHOLDER})}function TimeText({time:eo}){const to=timeFormat(eo);return jsxRuntimeExports.jsx("time",{children:to})}const CellWrapper=({children:eo})=>{const to=useClasses$a();return jsxRuntimeExports.jsx("div",{className:to.cellWrapper,children:eo})},TextCellWrapper=({children:eo})=>{const to=useClasses$a();return jsxRuntimeExports.jsx("div",{className:to.textCellWrapper,children:jsxRuntimeExports.jsx("p",{className:to.textCellP,children:eo})})},CellSkeleton=({height:eo})=>{const to=useClasses$a();return jsxRuntimeExports.jsx(Skeleton,{className:to.textCellWrapper,children:jsxRuntimeExports.jsx(SkeletonItem,{style:{height:`${eo??20}px`}})})},useClasses$a=makeStyles({cellWrapper:{display:"flex",flexDirection:"row",alignItems:"center",height:"100%"},textCellWrapper:{display:"flex",flexDirection:"row",alignItems:"center",height:"100%",width:"100%"},textCellP:{wordWrap:"break-word",maxWidth:"100%",lineHeight:tokens.lineHeightBase200,fontSize:tokens.fontSizeBase300,maxHeight:"100%",whiteSpace:"normal",...shorthands.padding(tokens.spacingVerticalS,tokens.spacingHorizontalXS)}}),TraceListJsonCell=({jsonObject:eo,isViewDetailEnabled:to=!1})=>{const ro=reactExports.useMemo(()=>typeof eo=="string"?isValidJson(eo)?!1:!isJsonl(eo):!1,[eo]);return jsxRuntimeExports.jsx(CellWrapper,{children:ro?jsxRuntimeExports.jsx(TextCellWrapper,{children:formatText(String(eo))}):jsxRuntimeExports.jsx(TraceListObjectCell,{object:eo,isViewDetailEnabled:to})})},TraceListObjectCell=({object:eo,isViewDetailEnabled:to})=>{const ro=useIsDark();return to?jsxRuntimeExports.jsxs(Dialog,{children:[jsxRuntimeExports.jsx(DialogTrigger,{children:jsxRuntimeExports.jsx("div",{style:{overflow:"hidden",height:"100%",width:"100%",marginTop:"12px",lineHeight:"16px"},children:jsxRuntimeExports.jsx(JsonViewer,{src:eo,enableClipboard:!1,collapsed:1,dark:ro,theme:"vscode",disableCustomCollapse:!0})})}),jsxRuntimeExports.jsxs(DialogSurface,{children:[jsxRuntimeExports.jsx("div",{style:{height:"800px",width:"800ppx",marginTop:"12px",lineHeight:"16px",overflow:"auto"},children:jsxRuntimeExports.jsx(JsonViewer,{src:eo,enableClipboard:!0,dark:ro,theme:"vscode",collapseStringsAfterLength:600})}),jsxRuntimeExports.jsx(DialogActions,{style:{justifyContent:"flex-end"},children:jsxRuntimeExports.jsx(DialogTrigger,{disableButtonEnhancement:!0,children:jsxRuntimeExports.jsx(Button$2,{appearance:"secondary",children:"Close"})})})]})]}):jsxRuntimeExports.jsx("div",{style:{overflow:"hidden",height:"100%",width:"100%",marginTop:"12px",lineHeight:"16px"},children:jsxRuntimeExports.jsx(JsonViewer,{src:eo,enableClipboard:!1,collapseStringsAfterLength:50,collapsed:1,dark:ro,theme:"vscode",enablePopUpImageViewer:!1,disableCustomCollapse:!0})})},MAX_LENGTH=80;function formatText(eo){return eo.length>MAX_LENGTH?`${eo.slice(0,MAX_LENGTH)}...`:eo}const MetricsCell=({trace:eo})=>{const to=useClasses$9(),ro=30;return eo.evaluations?jsxRuntimeExports.jsx("div",{className:to.wrapper,children:Object.entries(eo.evaluations).map(([no,oo])=>{let io=oo.outputs;if(io=typeof io=="string"?safeJSONParseV2(io):io,io){if(typeof io=="object")return Object.entries(io).map(([so,ao])=>{const lo=`${so}`;return jsxRuntimeExports.jsx(MetricTag,{tag:{name:lo,value:`${ao}`},maxValueLength:Math.max(ro-lo.length,3)},`${no}_${so}`)});{const so=`${no}`;return jsxRuntimeExports.jsx(MetricTag,{tag:{name:so,value:`${io}`},maxValueLength:Math.max(ro-so.length,3)},no)}}else return null})}):null},useClasses$9=makeStyles({wrapper:{display:"flex",height:"100%",...shorthands.margin("0px","-8px"),...shorthands.padding("4px"),flexDirection:"row",flexWrap:"wrap",alignItems:"center",...shorthands.gap("4px"),...shorthands.overflow("auto")}}),useOnClickTraceRow=()=>{const eo=useSetSelectedTraceId();return reactExports.useCallback((to,ro)=>{eo(to==null?void 0:to.trace_id)},[eo])},useTraceListRows=()=>{const eo=useTraces();return reactExports.useMemo(()=>eo.map(to=>convertToTraceListRow(to)),[eo])},BASIC_WIDTH=100,getColumnChildrenCount=eo=>eo.children?eo==null?void 0:eo.children.reduce((to,ro)=>to+getColumnChildrenCount(ro),0):eo.minWidth??BASIC_WIDTH,METRICS_COLUMN_KEY="metrics_compact",UN_FILTERABLE_COLUMNS=["Kind","Name"],useTraceListColumns=()=>{const{ref:eo,width:to}=useResizeObserver(),ro=useClasses$8(),no=useTraceListRows(),oo=useOnClickTraceRow(),io=useSetTableColumnNames(),so=useTableHiddenColumnKeys(),ao=useLocStrings(),lo=useTraceListColumnModifier(),co=useSortableColumns(),uo=reactExports.useMemo(()=>genStatusChecker("running"),[]),[fo,ho]=React.useState([]);return reactExports.useEffect(()=>{const po=[{key:"kind",name:ao.Kind,minWidth:100,maxWidth:200,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{}):jsxRuntimeExports.jsx(KindText,{kind:wo.kind})},{key:"name",name:ao.Name,minWidth:120,maxWidth:300,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{}):jsxRuntimeExports.jsx(Tooltip,{content:wo.name??"",relationship:"label",children:jsxRuntimeExports.jsx("span",{className:ro.nameCell,title:wo.name,onClick:()=>{oo(wo,"name")},children:wo.name})})},{key:"input",name:ao.Input,minWidth:180,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{height:40}):jsxRuntimeExports.jsx(TraceListJsonCell,{jsonObject:wo.inputs,isViewDetailEnabled:!0})},{key:"output",name:ao.Output,minWidth:180,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{height:40}):jsxRuntimeExports.jsx(TraceListJsonCell,{jsonObject:wo.outputs,isViewDetailEnabled:!0})},{key:"start_time",name:ao.Start_time,minWidth:100,maxWidth:300,renderCell:({row:wo})=>jsxRuntimeExports.jsx(TextCellWrapper,{children:jsxRuntimeExports.jsx(TimeText,{time:wo.start_time})})},{key:"end_time",name:ao.End_time,minWidth:100,maxWidth:300,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{height:40}):jsxRuntimeExports.jsx(TextCellWrapper,{children:jsxRuntimeExports.jsx(TimeText,{time:wo.end_time})})},{key:"latency",name:ao.Latency,minWidth:120,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{}):jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:wo.start_time,endTimeISOString:wo.end_time,size:UISize.small})})},{key:"total_tokens",name:ao.Total_tokens,minWidth:100,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{}):jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(SummaryToken,{trace:wo,size:UISize.small})})},{key:"status",name:ao.Status,minWidth:60,renderCell:({row:wo})=>jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(StatusText,{statusCode:wo.status})})},{key:METRICS_COLUMN_KEY,name:ao.Metrics,minWidth:240,renderCell:({row:wo})=>uo(wo.status)?jsxRuntimeExports.jsx(CellSkeleton,{}):jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(MetricsCell,{trace:wo})})}],go=[];no.forEach(wo=>{Object.entries(wo.evaluations??{}).forEach(([Ro])=>{!go.includes(Ro)&&Ro&&go.push(Ro)})});const vo=go.map(wo=>{const Ro=[],Do=[];return no.forEach($o=>{var Bo;const Mo=(Bo=$o.evaluations)==null?void 0:Bo[wo];if(!Mo||!Mo.outputs)return;const Po=typeof Mo.outputs=="string"?safeJSONParseV2(Mo.outputs):Mo.outputs;Object.keys(Po).forEach(No=>{const Fo=Po[No];!Ro.includes(No)&&Fo!==null&&(Ro.push(No),Do.push({key:`evaluation-${wo}-${No}-value`,name:No,renderCell:({row:zo})=>{var Qo,Zo,bs;if(uo(zo.status))return jsxRuntimeExports.jsx(CellSkeleton,{});let qo;const Go=(bs=(Zo=(Qo=zo==null?void 0:zo.evaluations)==null?void 0:Qo[wo])==null?void 0:Zo.outputs)==null?void 0:bs[No];return Go===void 0?qo="":typeof Go=="number"?qo=formatNumber$1(Go):qo=`${Go}`,qo}}))})}),{name:wo,key:`evaluation-${wo}`,children:Do}});let yo=[...po,{key:"evaluations",name:"Metrics",minWidth:450,children:vo}];yo=lo?lo(yo,no):yo;const xo=yo.filter(wo=>wo.key!=="evaluations"),_o=yo.find(wo=>wo.key==="evaluations");io({normalColumns:xo.map(wo=>({name:wo.name,key:wo.key})).filter(wo=>!UN_FILTERABLE_COLUMNS.includes(wo.name)),evaluationColumns:_o.children.map(wo=>({name:wo.name,key:wo.key}))});const Eo=xo.filter(wo=>!so.includes(wo.key)),So={..._o,children:_o.children.filter(wo=>!so.includes(wo.key))},ko=[...Eo,So],Ao=ko.reduce((wo,Ro)=>wo+getColumnChildrenCount(Ro),0),Co=wo=>{if(wo.children)return{...wo,children:wo.children.map(Co)};const Ro=wo.minWidth??BASIC_WIDTH,Do=wo.maxWidth,$o=to?(to-24)/Ao*Ro:200;return{...wo,width:$o,minWidth:Ro,maxWidth:Do}},Oo=ko.map(Co).map(wo=>{const Ro=wo.key;return Ro?{...wo,key:wo.key,sortable:!!(Ro&&co.includes(Ro))}:wo});ho(Oo)},[no,oo,ro.nameCell,lo,so,ao,io,co,to,uo]),{columns:fo,ref:eo}},useClasses$8=makeStyles({typeBadge:{...shorthands.padding(tokens.spacingVerticalXXS,tokens.spacingHorizontalS)},latencyWrapper:{display:"flex",flexDirection:"row",alignItems:"center",justifyItems:"center","> svg":{marginRight:"5px"}},nameCell:{color:tokens.colorBrandForeground1,fontWeight:tokens.fontWeightSemibold,":hover":{...shorthands.textDecoration("underline")}}});let Text$1=class h_{lineAt(to){if(to<0||to>this.length)throw new RangeError(`Invalid position ${to} in document of length ${this.length}`);return this.lineInner(to,!1,1,0)}line(to){if(to<1||to>this.lines)throw new RangeError(`Invalid line number ${to} in ${this.lines}-line document`);return this.lineInner(to,!0,1,0)}replace(to,ro,no){[to,ro]=clip(this,to,ro);let oo=[];return this.decompose(0,to,oo,2),no.length&&no.decompose(0,no.length,oo,3),this.decompose(ro,this.length,oo,1),TextNode.from(oo,this.length-(ro-to)+no.length)}append(to){return this.replace(this.length,this.length,to)}slice(to,ro=this.length){[to,ro]=clip(this,to,ro);let no=[];return this.decompose(to,ro,no,0),TextNode.from(no,ro-to)}eq(to){if(to==this)return!0;if(to.length!=this.length||to.lines!=this.lines)return!1;let ro=this.scanIdentical(to,1),no=this.length-this.scanIdentical(to,-1),oo=new RawTextCursor(this),io=new RawTextCursor(to);for(let so=ro,ao=ro;;){if(oo.next(so),io.next(so),so=0,oo.lineBreak!=io.lineBreak||oo.done!=io.done||oo.value!=io.value)return!1;if(ao+=oo.value.length,oo.done||ao>=no)return!0}}iter(to=1){return new RawTextCursor(this,to)}iterRange(to,ro=this.length){return new PartialTextCursor(this,to,ro)}iterLines(to,ro){let no;if(to==null)no=this.iter();else{ro==null&&(ro=this.lines+1);let oo=this.line(to).from;no=this.iterRange(oo,Math.max(oo,ro==this.lines+1?this.length:ro<=1?0:this.line(ro-1).to))}return new LineCursor(no)}toString(){return this.sliceString(0)}toJSON(){let to=[];return this.flatten(to),to}constructor(){}static of(to){if(to.length==0)throw new RangeError("A document must have at least one line");return to.length==1&&!to[0]?h_.empty:to.length<=32?new TextLeaf(to):TextNode.from(TextLeaf.split(to,[]))}};class TextLeaf extends Text$1{constructor(to,ro=textLength(to)){super(),this.text=to,this.length=ro}get lines(){return this.text.length}get children(){return null}lineInner(to,ro,no,oo){for(let io=0;;io++){let so=this.text[io],ao=oo+so.length;if((ro?no:ao)>=to)return new Line(oo,ao,no,so);oo=ao+1,no++}}decompose(to,ro,no,oo){let io=to<=0&&ro>=this.length?this:new TextLeaf(sliceText(this.text,to,ro),Math.min(ro,this.length)-Math.max(0,to));if(oo&1){let so=no.pop(),ao=appendText(io.text,so.text.slice(),0,io.length);if(ao.length<=32)no.push(new TextLeaf(ao,so.length+io.length));else{let lo=ao.length>>1;no.push(new TextLeaf(ao.slice(0,lo)),new TextLeaf(ao.slice(lo)))}}else no.push(io)}replace(to,ro,no){if(!(no instanceof TextLeaf))return super.replace(to,ro,no);[to,ro]=clip(this,to,ro);let oo=appendText(this.text,appendText(no.text,sliceText(this.text,0,to)),ro),io=this.length+no.length-(ro-to);return oo.length<=32?new TextLeaf(oo,io):TextNode.from(TextLeaf.split(oo,[]),io)}sliceString(to,ro=this.length,no=` `){[to,ro]=clip(this,to,ro);let oo="";for(let io=0,so=0;io<=ro&&soto&&so&&(oo+=no),toio&&(oo+=ao.slice(Math.max(0,to-io),ro-io)),io=lo+1}return oo}flatten(to){for(let ro of this.text)to.push(ro)}scanIdentical(){return 0}static split(to,ro){let no=[],oo=-1;for(let io of to)no.push(io),oo+=io.length+1,no.length==32&&(ro.push(new TextLeaf(no,oo)),no=[],oo=-1);return oo>-1&&ro.push(new TextLeaf(no,oo)),ro}}class TextNode extends Text$1{constructor(to,ro){super(),this.children=to,this.length=ro,this.lines=0;for(let no of to)this.lines+=no.lines}lineInner(to,ro,no,oo){for(let io=0;;io++){let so=this.children[io],ao=oo+so.length,lo=no+so.lines-1;if((ro?lo:ao)>=to)return so.lineInner(to,ro,no,oo);oo=ao+1,no=lo+1}}decompose(to,ro,no,oo){for(let io=0,so=0;so<=ro&&io=so){let co=oo&((so<=to?1:0)|(lo>=ro?2:0));so>=to&&lo<=ro&&!co?no.push(ao):ao.decompose(to-so,ro-so,no,co)}so=lo+1}}replace(to,ro,no){if([to,ro]=clip(this,to,ro),no.lines=io&&ro<=ao){let lo=so.replace(to-io,ro-io,no),co=this.lines-so.lines+lo.lines;if(lo.lines>4&&lo.lines>co>>6){let uo=this.children.slice();return uo[oo]=lo,new TextNode(uo,this.length-(ro-to)+no.length)}return super.replace(io,ao,lo)}io=ao+1}return super.replace(to,ro,no)}sliceString(to,ro=this.length,no=` `){[to,ro]=clip(this,to,ro);let oo="";for(let io=0,so=0;ioto&&io&&(oo+=no),toso&&(oo+=ao.sliceString(to-so,ro-so,no)),so=lo+1}return oo}flatten(to){for(let ro of this.children)ro.flatten(to)}scanIdentical(to,ro){if(!(to instanceof TextNode))return 0;let no=0,[oo,io,so,ao]=ro>0?[0,0,this.children.length,to.children.length]:[this.children.length-1,to.children.length-1,-1,-1];for(;;oo+=ro,io+=ro){if(oo==so||io==ao)return no;let lo=this.children[oo],co=to.children[io];if(lo!=co)return no+lo.scanIdentical(co,ro);no+=lo.length+1}}static from(to,ro=to.reduce((no,oo)=>no+oo.length+1,-1)){let no=0;for(let po of to)no+=po.lines;if(no<32){let po=[];for(let go of to)go.flatten(po);return new TextLeaf(po,ro)}let oo=Math.max(32,no>>5),io=oo<<1,so=oo>>1,ao=[],lo=0,co=-1,uo=[];function fo(po){let go;if(po.lines>io&&po instanceof TextNode)for(let vo of po.children)fo(vo);else po.lines>so&&(lo>so||!lo)?(ho(),ao.push(po)):po instanceof TextLeaf&&lo&&(go=uo[uo.length-1])instanceof TextLeaf&&po.lines+go.lines<=32?(lo+=po.lines,co+=po.length+1,uo[uo.length-1]=new TextLeaf(go.text.concat(po.text),go.length+1+po.length)):(lo+po.lines>oo&&ho(),lo+=po.lines,co+=po.length+1,uo.push(po))}function ho(){lo!=0&&(ao.push(uo.length==1?uo[0]:TextNode.from(uo,co)),co=-1,lo=uo.length=0)}for(let po of to)fo(po);return ho(),ao.length==1?ao[0]:new TextNode(ao,ro)}}Text$1.empty=new TextLeaf([""],0);function textLength(eo){let to=-1;for(let ro of eo)to+=ro.length+1;return to}function appendText(eo,to,ro=0,no=1e9){for(let oo=0,io=0,so=!0;io=ro&&(lo>no&&(ao=ao.slice(0,no-oo)),oo0?1:(to instanceof TextLeaf?to.text.length:to.children.length)<<1]}nextInner(to,ro){for(this.done=this.lineBreak=!1;;){let no=this.nodes.length-1,oo=this.nodes[no],io=this.offsets[no],so=io>>1,ao=oo instanceof TextLeaf?oo.text.length:oo.children.length;if(so==(ro>0?ao:0)){if(no==0)return this.done=!0,this.value="",this;ro>0&&this.offsets[no-1]++,this.nodes.pop(),this.offsets.pop()}else if((io&1)==(ro>0?0:1)){if(this.offsets[no]+=ro,to==0)return this.lineBreak=!0,this.value=` `,this;to--}else if(oo instanceof TextLeaf){let lo=oo.text[so+(ro<0?-1:0)];if(this.offsets[no]+=ro,lo.length>Math.max(0,to))return this.value=to==0?lo:ro>0?lo.slice(to):lo.slice(0,lo.length-to),this;to-=lo.length}else{let lo=oo.children[so+(ro<0?-1:0)];to>lo.length?(to-=lo.length,this.offsets[no]+=ro):(ro<0&&this.offsets[no]--,this.nodes.push(lo),this.offsets.push(ro>0?1:(lo instanceof TextLeaf?lo.text.length:lo.children.length)<<1))}}}next(to=0){return to<0&&(this.nextInner(-to,-this.dir),to=this.value.length),this.nextInner(to,this.dir)}}class PartialTextCursor{constructor(to,ro,no){this.value="",this.done=!1,this.cursor=new RawTextCursor(to,ro>no?-1:1),this.pos=ro>no?to.length:0,this.from=Math.min(ro,no),this.to=Math.max(ro,no)}nextInner(to,ro){if(ro<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;to+=Math.max(0,ro<0?this.pos-this.to:this.from-this.pos);let no=ro<0?this.pos-this.from:this.to-this.pos;to>no&&(to=no),no-=to;let{value:oo}=this.cursor.next(to);return this.pos+=(oo.length+to)*ro,this.value=oo.length<=no?oo:ro<0?oo.slice(oo.length-no):oo.slice(0,no),this.done=!this.value,this}next(to=0){return to<0?to=Math.max(to,this.from-this.pos):to>0&&(to=Math.min(to,this.to-this.pos)),this.nextInner(to,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class LineCursor{constructor(to){this.inner=to,this.afterBreak=!0,this.value="",this.done=!1}next(to=0){let{done:ro,lineBreak:no,value:oo}=this.inner.next(to);return ro&&this.afterBreak?(this.value="",this.afterBreak=!1):ro?(this.done=!0,this.value=""):no?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=oo,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Text$1.prototype[Symbol.iterator]=function(){return this.iter()},RawTextCursor.prototype[Symbol.iterator]=PartialTextCursor.prototype[Symbol.iterator]=LineCursor.prototype[Symbol.iterator]=function(){return this});class Line{constructor(to,ro,no,oo){this.from=to,this.to=ro,this.number=no,this.text=oo}get length(){return this.to-this.from}}function clip(eo,to,ro){return to=Math.max(0,Math.min(eo.length,to)),[to,Math.max(to,Math.min(eo.length,ro))]}let extend="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(eo=>eo?parseInt(eo,36):1);for(let eo=1;eoeo)return extend[to-1]<=eo;return!1}function isRegionalIndicator(eo){return eo>=127462&&eo<=127487}const ZWJ=8205;function findClusterBreak(eo,to,ro=!0,no=!0){return(ro?nextClusterBreak:prevClusterBreak)(eo,to,no)}function nextClusterBreak(eo,to,ro){if(to==eo.length)return to;to&&surrogateLow(eo.charCodeAt(to))&&surrogateHigh(eo.charCodeAt(to-1))&&to--;let no=codePointAt(eo,to);for(to+=codePointSize(no);to=0&&isRegionalIndicator(codePointAt(eo,so));)io++,so-=2;if(io%2==0)break;to+=2}else break}return to}function prevClusterBreak(eo,to,ro){for(;to>0;){let no=nextClusterBreak(eo,to-2,ro);if(no=56320&&eo<57344}function surrogateHigh(eo){return eo>=55296&&eo<56320}function codePointAt(eo,to){let ro=eo.charCodeAt(to);if(!surrogateHigh(ro)||to+1==eo.length)return ro;let no=eo.charCodeAt(to+1);return surrogateLow(no)?(ro-55296<<10)+(no-56320)+65536:ro}function fromCodePoint(eo){return eo<=65535?String.fromCharCode(eo):(eo-=65536,String.fromCharCode((eo>>10)+55296,(eo&1023)+56320))}function codePointSize(eo){return eo<65536?1:2}const DefaultSplit=/\r\n?|\n/;var MapMode=function(eo){return eo[eo.Simple=0]="Simple",eo[eo.TrackDel=1]="TrackDel",eo[eo.TrackBefore=2]="TrackBefore",eo[eo.TrackAfter=3]="TrackAfter",eo}(MapMode||(MapMode={}));class ChangeDesc{constructor(to){this.sections=to}get length(){let to=0;for(let ro=0;roto)return io+(to-oo);io+=ao}else{if(no!=MapMode.Simple&&co>=to&&(no==MapMode.TrackDel&&ooto||no==MapMode.TrackBefore&&ooto))return null;if(co>to||co==to&&ro<0&&!ao)return to==oo||ro<0?io:io+lo;io+=lo}oo=co}if(to>oo)throw new RangeError(`Position ${to} is out of range for changeset of length ${oo}`);return io}touchesRange(to,ro=to){for(let no=0,oo=0;no=0&&oo<=ro&&ao>=to)return ooro?"cover":!0;oo=ao}return!1}toString(){let to="";for(let ro=0;ro=0?":"+oo:"")}return to}toJSON(){return this.sections}static fromJSON(to){if(!Array.isArray(to)||to.length%2||to.some(ro=>typeof ro!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ChangeDesc(to)}static create(to){return new ChangeDesc(to)}}class ChangeSet extends ChangeDesc{constructor(to,ro){super(to),this.inserted=ro}apply(to){if(this.length!=to.length)throw new RangeError("Applying change set to a document with the wrong length");return iterChanges(this,(ro,no,oo,io,so)=>to=to.replace(oo,oo+(no-ro),so),!1),to}mapDesc(to,ro=!1){return mapSet(this,to,ro,!0)}invert(to){let ro=this.sections.slice(),no=[];for(let oo=0,io=0;oo=0){ro[oo]=ao,ro[oo+1]=so;let lo=oo>>1;for(;no.length0&&addInsert(no,ro,io.text),io.forward(uo),ao+=uo}let co=to[so++];for(;ao>1].toJSON()))}return to}static of(to,ro,no){let oo=[],io=[],so=0,ao=null;function lo(uo=!1){if(!uo&&!oo.length)return;soho||fo<0||ho>ro)throw new RangeError(`Invalid change range ${fo} to ${ho} (in doc of length ${ro})`);let go=po?typeof po=="string"?Text$1.of(po.split(no||DefaultSplit)):po:Text$1.empty,vo=go.length;if(fo==ho&&vo==0)return;foso&&addSection(oo,fo-so,-1),addSection(oo,ho-fo,vo),addInsert(io,oo,go),so=ho}}return co(to),lo(!ao),ao}static empty(to){return new ChangeSet(to?[to,-1]:[],[])}static fromJSON(to){if(!Array.isArray(to))throw new RangeError("Invalid JSON representation of ChangeSet");let ro=[],no=[];for(let oo=0;ooao&&typeof so!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(io.length==1)ro.push(io[0],0);else{for(;no.length=0&&ro<=0&&ro==eo[oo+1]?eo[oo]+=to:to==0&&eo[oo]==0?eo[oo+1]+=ro:no?(eo[oo]+=to,eo[oo+1]+=ro):eo.push(to,ro)}function addInsert(eo,to,ro){if(ro.length==0)return;let no=to.length-2>>1;if(no>1])),!(ro||so==eo.sections.length||eo.sections[so+1]<0);)ao=eo.sections[so++],lo=eo.sections[so++];to(oo,co,io,uo,fo),oo=co,io=uo}}}function mapSet(eo,to,ro,no=!1){let oo=[],io=no?[]:null,so=new SectionIter(eo),ao=new SectionIter(to);for(let lo=-1;;)if(so.ins==-1&&ao.ins==-1){let co=Math.min(so.len,ao.len);addSection(oo,co,-1),so.forward(co),ao.forward(co)}else if(ao.ins>=0&&(so.ins<0||lo==so.i||so.off==0&&(ao.len=0&&lo=0){let co=0,uo=so.len;for(;uo;)if(ao.ins==-1){let fo=Math.min(uo,ao.len);co+=fo,uo-=fo,ao.forward(fo)}else if(ao.ins==0&&ao.lenlo||so.ins>=0&&so.len>lo)&&(ao||no.length>co),io.forward2(lo),so.forward(lo)}}}}class SectionIter{constructor(to){this.set=to,this.i=0,this.next()}next(){let{sections:to}=this.set;this.i>1;return ro>=to.length?Text$1.empty:to[ro]}textBit(to){let{inserted:ro}=this.set,no=this.i-2>>1;return no>=ro.length&&!to?Text$1.empty:ro[no].slice(this.off,to==null?void 0:this.off+to)}forward(to){to==this.len?this.next():(this.len-=to,this.off+=to)}forward2(to){this.ins==-1?this.forward(to):to==this.ins?this.next():(this.ins-=to,this.off+=to)}}class SelectionRange{constructor(to,ro,no){this.from=to,this.to=ro,this.flags=no}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let to=this.flags&7;return to==7?null:to}get goalColumn(){let to=this.flags>>6;return to==16777215?void 0:to}map(to,ro=-1){let no,oo;return this.empty?no=oo=to.mapPos(this.from,ro):(no=to.mapPos(this.from,1),oo=to.mapPos(this.to,-1)),no==this.from&&oo==this.to?this:new SelectionRange(no,oo,this.flags)}extend(to,ro=to){if(to<=this.anchor&&ro>=this.anchor)return EditorSelection.range(to,ro);let no=Math.abs(to-this.anchor)>Math.abs(ro-this.anchor)?to:ro;return EditorSelection.range(this.anchor,no)}eq(to,ro=!1){return this.anchor==to.anchor&&this.head==to.head&&(!ro||!this.empty||this.assoc==to.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(to){if(!to||typeof to.anchor!="number"||typeof to.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return EditorSelection.range(to.anchor,to.head)}static create(to,ro,no){return new SelectionRange(to,ro,no)}}class EditorSelection{constructor(to,ro){this.ranges=to,this.mainIndex=ro}map(to,ro=-1){return to.empty?this:EditorSelection.create(this.ranges.map(no=>no.map(to,ro)),this.mainIndex)}eq(to,ro=!1){if(this.ranges.length!=to.ranges.length||this.mainIndex!=to.mainIndex)return!1;for(let no=0;noto.toJSON()),main:this.mainIndex}}static fromJSON(to){if(!to||!Array.isArray(to.ranges)||typeof to.main!="number"||to.main>=to.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new EditorSelection(to.ranges.map(ro=>SelectionRange.fromJSON(ro)),to.main)}static single(to,ro=to){return new EditorSelection([EditorSelection.range(to,ro)],0)}static create(to,ro=0){if(to.length==0)throw new RangeError("A selection needs at least one range");for(let no=0,oo=0;ooto?8:0)|io)}static normalized(to,ro=0){let no=to[ro];to.sort((oo,io)=>oo.from-io.from),ro=to.indexOf(no);for(let oo=1;ooio.head?EditorSelection.range(lo,ao):EditorSelection.range(ao,lo))}}return new EditorSelection(to,ro)}}function checkSelection(eo,to){for(let ro of eo.ranges)if(ro.to>to)throw new RangeError("Selection points outside of document")}let nextID=0;class Facet{constructor(to,ro,no,oo,io){this.combine=to,this.compareInput=ro,this.compare=no,this.isStatic=oo,this.id=nextID++,this.default=to([]),this.extensions=typeof io=="function"?io(this):io}get reader(){return this}static define(to={}){return new Facet(to.combine||(ro=>ro),to.compareInput||((ro,no)=>ro===no),to.compare||(to.combine?(ro,no)=>ro===no:sameArray$1),!!to.static,to.enables)}of(to){return new FacetProvider([],this,0,to)}compute(to,ro){if(this.isStatic)throw new Error("Can't compute a static facet");return new FacetProvider(to,this,1,ro)}computeN(to,ro){if(this.isStatic)throw new Error("Can't compute a static facet");return new FacetProvider(to,this,2,ro)}from(to,ro){return ro||(ro=no=>no),this.compute([to],no=>ro(no.field(to)))}}function sameArray$1(eo,to){return eo==to||eo.length==to.length&&eo.every((ro,no)=>ro===to[no])}class FacetProvider{constructor(to,ro,no,oo){this.dependencies=to,this.facet=ro,this.type=no,this.value=oo,this.id=nextID++}dynamicSlot(to){var ro;let no=this.value,oo=this.facet.compareInput,io=this.id,so=to[io]>>1,ao=this.type==2,lo=!1,co=!1,uo=[];for(let fo of this.dependencies)fo=="doc"?lo=!0:fo=="selection"?co=!0:((ro=to[fo.id])!==null&&ro!==void 0?ro:1)&1||uo.push(to[fo.id]);return{create(fo){return fo.values[so]=no(fo),1},update(fo,ho){if(lo&&ho.docChanged||co&&(ho.docChanged||ho.selection)||ensureAll(fo,uo)){let po=no(fo);if(ao?!compareArray(po,fo.values[so],oo):!oo(po,fo.values[so]))return fo.values[so]=po,1}return 0},reconfigure:(fo,ho)=>{let po,go=ho.config.address[io];if(go!=null){let vo=getAddr(ho,go);if(this.dependencies.every(yo=>yo instanceof Facet?ho.facet(yo)===fo.facet(yo):yo instanceof StateField?ho.field(yo,!1)==fo.field(yo,!1):!0)||(ao?compareArray(po=no(fo),vo,oo):oo(po=no(fo),vo)))return fo.values[so]=vo,0}else po=no(fo);return fo.values[so]=po,1}}}}function compareArray(eo,to,ro){if(eo.length!=to.length)return!1;for(let no=0;noeo[lo.id]),oo=ro.map(lo=>lo.type),io=no.filter(lo=>!(lo&1)),so=eo[to.id]>>1;function ao(lo){let co=[];for(let uo=0;uono===oo),to);return to.provide&&(ro.provides=to.provide(ro)),ro}create(to){let ro=to.facet(initField).find(no=>no.field==this);return((ro==null?void 0:ro.create)||this.createF)(to)}slot(to){let ro=to[this.id]>>1;return{create:no=>(no.values[ro]=this.create(no),1),update:(no,oo)=>{let io=no.values[ro],so=this.updateF(io,oo);return this.compareF(io,so)?0:(no.values[ro]=so,1)},reconfigure:(no,oo)=>oo.config.address[this.id]!=null?(no.values[ro]=oo.field(this),0):(no.values[ro]=this.create(no),1)}}init(to){return[this,initField.of({field:this,create:to})]}get extension(){return this}}const Prec_={lowest:4,low:3,default:2,high:1,highest:0};function prec(eo){return to=>new PrecExtension(to,eo)}const Prec={highest:prec(Prec_.highest),high:prec(Prec_.high),default:prec(Prec_.default),low:prec(Prec_.low),lowest:prec(Prec_.lowest)};class PrecExtension{constructor(to,ro){this.inner=to,this.prec=ro}}class Compartment{of(to){return new CompartmentInstance(this,to)}reconfigure(to){return Compartment.reconfigure.of({compartment:this,extension:to})}get(to){return to.config.compartments.get(this)}}class CompartmentInstance{constructor(to,ro){this.compartment=to,this.inner=ro}}class Configuration{constructor(to,ro,no,oo,io,so){for(this.base=to,this.compartments=ro,this.dynamicSlots=no,this.address=oo,this.staticValues=io,this.facets=so,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(to,ro,no){let oo=[],io=Object.create(null),so=new Map;for(let ho of flatten(to,ro,so))ho instanceof StateField?oo.push(ho):(io[ho.facet.id]||(io[ho.facet.id]=[])).push(ho);let ao=Object.create(null),lo=[],co=[];for(let ho of oo)ao[ho.id]=co.length<<1,co.push(po=>ho.slot(po));let uo=no==null?void 0:no.config.facets;for(let ho in io){let po=io[ho],go=po[0].facet,vo=uo&&uo[ho]||[];if(po.every(yo=>yo.type==0))if(ao[go.id]=lo.length<<1|1,sameArray$1(vo,po))lo.push(no.facet(go));else{let yo=go.combine(po.map(xo=>xo.value));lo.push(no&&go.compare(yo,no.facet(go))?no.facet(go):yo)}else{for(let yo of po)yo.type==0?(ao[yo.id]=lo.length<<1|1,lo.push(yo.value)):(ao[yo.id]=co.length<<1,co.push(xo=>yo.dynamicSlot(xo)));ao[go.id]=co.length<<1,co.push(yo=>dynamicFacetSlot(yo,go,po))}}let fo=co.map(ho=>ho(ao));return new Configuration(to,so,fo,ao,lo,io)}}function flatten(eo,to,ro){let no=[[],[],[],[],[]],oo=new Map;function io(so,ao){let lo=oo.get(so);if(lo!=null){if(lo<=ao)return;let co=no[lo].indexOf(so);co>-1&&no[lo].splice(co,1),so instanceof CompartmentInstance&&ro.delete(so.compartment)}if(oo.set(so,ao),Array.isArray(so))for(let co of so)io(co,ao);else if(so instanceof CompartmentInstance){if(ro.has(so.compartment))throw new RangeError("Duplicate use of compartment in extensions");let co=to.get(so.compartment)||so.inner;ro.set(so.compartment,co),io(co,ao)}else if(so instanceof PrecExtension)io(so.inner,so.prec);else if(so instanceof StateField)no[ao].push(so),so.provides&&io(so.provides,ao);else if(so instanceof FacetProvider)no[ao].push(so),so.facet.extensions&&io(so.facet.extensions,Prec_.default);else{let co=so.extension;if(!co)throw new Error(`Unrecognized extension value in extension set (${so}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);io(co,ao)}}return io(eo,Prec_.default),no.reduce((so,ao)=>so.concat(ao))}function ensureAddr(eo,to){if(to&1)return 2;let ro=to>>1,no=eo.status[ro];if(no==4)throw new Error("Cyclic dependency between fields and/or facets");if(no&2)return no;eo.status[ro]=4;let oo=eo.computeSlot(eo,eo.config.dynamicSlots[ro]);return eo.status[ro]=2|oo}function getAddr(eo,to){return to&1?eo.config.staticValues[to>>1]:eo.values[to>>1]}const languageData=Facet.define(),allowMultipleSelections=Facet.define({combine:eo=>eo.some(to=>to),static:!0}),lineSeparator=Facet.define({combine:eo=>eo.length?eo[0]:void 0,static:!0}),changeFilter=Facet.define(),transactionFilter=Facet.define(),transactionExtender=Facet.define(),readOnly=Facet.define({combine:eo=>eo.length?eo[0]:!1});class Annotation{constructor(to,ro){this.type=to,this.value=ro}static define(){return new AnnotationType}}class AnnotationType{of(to){return new Annotation(this,to)}}class StateEffectType{constructor(to){this.map=to}of(to){return new StateEffect(this,to)}}class StateEffect{constructor(to,ro){this.type=to,this.value=ro}map(to){let ro=this.type.map(this.value,to);return ro===void 0?void 0:ro==this.value?this:new StateEffect(this.type,ro)}is(to){return this.type==to}static define(to={}){return new StateEffectType(to.map||(ro=>ro))}static mapEffects(to,ro){if(!to.length)return to;let no=[];for(let oo of to){let io=oo.map(ro);io&&no.push(io)}return no}}StateEffect.reconfigure=StateEffect.define();StateEffect.appendConfig=StateEffect.define();class Transaction{constructor(to,ro,no,oo,io,so){this.startState=to,this.changes=ro,this.selection=no,this.effects=oo,this.annotations=io,this.scrollIntoView=so,this._doc=null,this._state=null,no&&checkSelection(no,ro.newLength),io.some(ao=>ao.type==Transaction.time)||(this.annotations=io.concat(Transaction.time.of(Date.now())))}static create(to,ro,no,oo,io,so){return new Transaction(to,ro,no,oo,io,so)}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(to){for(let ro of this.annotations)if(ro.type==to)return ro.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(to){let ro=this.annotation(Transaction.userEvent);return!!(ro&&(ro==to||ro.length>to.length&&ro.slice(0,to.length)==to&&ro[to.length]=="."))}}Transaction.time=Annotation.define();Transaction.userEvent=Annotation.define();Transaction.addToHistory=Annotation.define();Transaction.remote=Annotation.define();function joinRanges(eo,to){let ro=[];for(let no=0,oo=0;;){let io,so;if(no=eo[no]))io=eo[no++],so=eo[no++];else if(oo=0;oo--){let io=no[oo](eo);io instanceof Transaction?eo=io:Array.isArray(io)&&io.length==1&&io[0]instanceof Transaction?eo=io[0]:eo=resolveTransaction(to,asArray$1(io),!1)}return eo}function extendTransaction(eo){let to=eo.startState,ro=to.facet(transactionExtender),no=eo;for(let oo=ro.length-1;oo>=0;oo--){let io=ro[oo](eo);io&&Object.keys(io).length&&(no=mergeTransaction(no,resolveTransactionInner(to,io,eo.changes.newLength),!0))}return no==eo?eo:Transaction.create(to,eo.changes,eo.selection,no.effects,no.annotations,no.scrollIntoView)}const none$2=[];function asArray$1(eo){return eo==null?none$2:Array.isArray(eo)?eo:[eo]}var CharCategory=function(eo){return eo[eo.Word=0]="Word",eo[eo.Space=1]="Space",eo[eo.Other=2]="Other",eo}(CharCategory||(CharCategory={}));const nonASCIISingleCaseWordChar=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let wordChar;try{wordChar=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(eo){}function hasWordChar(eo){if(wordChar)return wordChar.test(eo);for(let to=0;to"€"&&(ro.toUpperCase()!=ro.toLowerCase()||nonASCIISingleCaseWordChar.test(ro)))return!0}return!1}function makeCategorizer(eo){return to=>{if(!/\S/.test(to))return CharCategory.Space;if(hasWordChar(to))return CharCategory.Word;for(let ro=0;ro-1)return CharCategory.Word;return CharCategory.Other}}class EditorState{constructor(to,ro,no,oo,io,so){this.config=to,this.doc=ro,this.selection=no,this.values=oo,this.status=to.statusTemplate.slice(),this.computeSlot=io,so&&(so._state=this);for(let ao=0;aooo.set(co,lo)),ro=null),oo.set(ao.value.compartment,ao.value.extension)):ao.is(StateEffect.reconfigure)?(ro=null,no=ao.value):ao.is(StateEffect.appendConfig)&&(ro=null,no=asArray$1(no).concat(ao.value));let io;ro?io=to.startState.values.slice():(ro=Configuration.resolve(no,oo,this),io=new EditorState(ro,this.doc,this.selection,ro.dynamicSlots.map(()=>null),(lo,co)=>co.reconfigure(lo,this),null).values);let so=to.startState.facet(allowMultipleSelections)?to.newSelection:to.newSelection.asSingle();new EditorState(ro,to.newDoc,so,io,(ao,lo)=>lo.update(ao,to),to)}replaceSelection(to){return typeof to=="string"&&(to=this.toText(to)),this.changeByRange(ro=>({changes:{from:ro.from,to:ro.to,insert:to},range:EditorSelection.cursor(ro.from+to.length)}))}changeByRange(to){let ro=this.selection,no=to(ro.ranges[0]),oo=this.changes(no.changes),io=[no.range],so=asArray$1(no.effects);for(let ao=1;aoso.spec.fromJSON(ao,lo)))}}return EditorState.create({doc:to.doc,selection:EditorSelection.fromJSON(to.selection),extensions:ro.extensions?oo.concat([ro.extensions]):oo})}static create(to={}){let ro=Configuration.resolve(to.extensions||[],new Map),no=to.doc instanceof Text$1?to.doc:Text$1.of((to.doc||"").split(ro.staticFacet(EditorState.lineSeparator)||DefaultSplit)),oo=to.selection?to.selection instanceof EditorSelection?to.selection:EditorSelection.single(to.selection.anchor,to.selection.head):EditorSelection.single(0);return checkSelection(oo,no.length),ro.staticFacet(allowMultipleSelections)||(oo=oo.asSingle()),new EditorState(ro,no,oo,ro.dynamicSlots.map(()=>null),(io,so)=>so.create(io),null)}get tabSize(){return this.facet(EditorState.tabSize)}get lineBreak(){return this.facet(EditorState.lineSeparator)||` @@ -1860,7 +1860,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,UnicodeRegexpSupport),Names={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 _supportsTabSize=null;function supportsTabSize(){var eo;if(_supportsTabSize==null&&typeof document<"u"&&document.body){let to=document.body.style;_supportsTabSize=((eo=to.tabSize)!==null&&eo!==void 0?eo:to.MozTabSize)!=null}return _supportsTabSize||!1}const specialCharConfig=Facet.define({combine(eo){let to=combineConfig(eo,{render:null,specialChars:Specials,addSpecialChars:null});return(to.replaceTabs=!supportsTabSize())&&(to.specialChars=new RegExp(" |"+to.specialChars.source,UnicodeRegexpSupport)),to.addSpecialChars&&(to.specialChars=new RegExp(to.specialChars.source+"|"+to.addSpecialChars.source,UnicodeRegexpSupport)),to}});function highlightSpecialChars(eo={}){return[specialCharConfig.of(eo),specialCharPlugin()]}let _plugin=null;function specialCharPlugin(){return _plugin||(_plugin=ViewPlugin.fromClass(class{constructor(eo){this.view=eo,this.decorations=Decoration.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(eo.state.facet(specialCharConfig)),this.decorations=this.decorator.createDeco(eo)}makeDecorator(eo){return new MatchDecorator({regexp:eo.specialChars,decoration:(to,ro,no)=>{let{doc:oo}=ro.state,io=codePointAt(to[0],0);if(io==9){let so=oo.lineAt(no),ao=ro.state.tabSize,lo=countColumn(so.text,ao,no-so.from);return Decoration.replace({widget:new TabWidget((ao-lo%ao)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[io]||(this.decorationCache[io]=Decoration.replace({widget:new SpecialCharWidget(eo,io)}))},boundary:eo.replaceTabs?void 0:/[^]/})}update(eo){let to=eo.state.facet(specialCharConfig);eo.startState.facet(specialCharConfig)!=to?(this.decorator=this.makeDecorator(to),this.decorations=this.decorator.createDeco(eo.view)):this.decorations=this.decorator.updateDeco(eo,this.decorations)}},{decorations:eo=>eo.decorations}))}const DefaultPlaceholder="•";function placeholder$1(eo){return eo>=32?DefaultPlaceholder:eo==10?"␤":String.fromCharCode(9216+eo)}class SpecialCharWidget extends WidgetType{constructor(to,ro){super(),this.options=to,this.code=ro}eq(to){return to.code==this.code}toDOM(to){let ro=placeholder$1(this.code),no=to.state.phrase("Control character")+" "+(Names[this.code]||"0x"+this.code.toString(16)),oo=this.options.render&&this.options.render(this.code,no,ro);if(oo)return oo;let io=document.createElement("span");return io.textContent=ro,io.title=no,io.setAttribute("aria-label",no),io.className="cm-specialChar",io}ignoreEvent(){return!1}}class TabWidget extends WidgetType{constructor(to){super(),this.width=to}eq(to){return to.width==this.width}toDOM(){let to=document.createElement("span");return to.textContent=" ",to.className="cm-tab",to.style.width=this.width+"px",to}ignoreEvent(){return!1}}function highlightActiveLine(){return activeLineHighlighter}const lineDeco=Decoration.line({class:"cm-activeLine"}),activeLineHighlighter=ViewPlugin.fromClass(class{constructor(eo){this.decorations=this.getDeco(eo)}update(eo){(eo.docChanged||eo.selectionSet)&&(this.decorations=this.getDeco(eo.view))}getDeco(eo){let to=-1,ro=[];for(let no of eo.state.selection.ranges){let oo=eo.lineBlockAt(no.head);oo.from>to&&(ro.push(lineDeco.range(oo.from)),to=oo.from)}return Decoration.set(ro)}},{decorations:eo=>eo.decorations});class Placeholder extends WidgetType{constructor(to){super(),this.content=to}toDOM(){let to=document.createElement("span");return to.className="cm-placeholder",to.style.pointerEvents="none",to.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?to.setAttribute("aria-label","placeholder "+this.content):to.setAttribute("aria-hidden","true"),to}coordsAt(to){let ro=to.firstChild?clientRectsFor(to.firstChild):[];if(!ro.length)return null;let no=window.getComputedStyle(to.parentNode),oo=flattenRect(ro[0],no.direction!="rtl"),io=parseInt(no.lineHeight);return oo.bottom-oo.top>io*1.5?{left:oo.left,right:oo.right,top:oo.top,bottom:oo.top+io}:oo}ignoreEvent(){return!1}}function placeholder(eo){return ViewPlugin.fromClass(class{constructor(to){this.view=to,this.placeholder=eo?Decoration.set([Decoration.widget({widget:new Placeholder(eo),side:1}).range(0)]):Decoration.none}get decorations(){return this.view.state.doc.length?Decoration.none:this.placeholder}},{decorations:to=>to.decorations})}const MaxOff=2e3;function rectangleFor(eo,to,ro){let no=Math.min(to.line,ro.line),oo=Math.max(to.line,ro.line),io=[];if(to.off>MaxOff||ro.off>MaxOff||to.col<0||ro.col<0){let so=Math.min(to.off,ro.off),ao=Math.max(to.off,ro.off);for(let lo=no;lo<=oo;lo++){let co=eo.doc.line(lo);co.length<=ao&&io.push(EditorSelection.range(co.from+so,co.to+ao))}}else{let so=Math.min(to.col,ro.col),ao=Math.max(to.col,ro.col);for(let lo=no;lo<=oo;lo++){let co=eo.doc.line(lo),uo=findColumn(co.text,so,eo.tabSize,!0);if(uo<0)io.push(EditorSelection.cursor(co.to));else{let fo=findColumn(co.text,ao,eo.tabSize);io.push(EditorSelection.range(co.from+uo,co.from+fo))}}}return io}function absoluteColumn(eo,to){let ro=eo.coordsAtPos(eo.viewport.from);return ro?Math.round(Math.abs((ro.left-to)/eo.defaultCharacterWidth)):-1}function getPos(eo,to){let ro=eo.posAtCoords({x:to.clientX,y:to.clientY},!1),no=eo.state.doc.lineAt(ro),oo=ro-no.from,io=oo>MaxOff?-1:oo==no.length?absoluteColumn(eo,to.clientX):countColumn(no.text,eo.state.tabSize,ro-no.from);return{line:no.number,col:io,off:oo}}function rectangleSelectionStyle(eo,to){let ro=getPos(eo,to),no=eo.state.selection;return ro?{update(oo){if(oo.docChanged){let io=oo.changes.mapPos(oo.startState.doc.line(ro.line).from),so=oo.state.doc.lineAt(io);ro={line:so.number,col:ro.col,off:Math.min(ro.off,so.length)},no=no.map(oo.changes)}},get(oo,io,so){let ao=getPos(eo,oo);if(!ao)return no;let lo=rectangleFor(eo.state,ro,ao);return lo.length?so?EditorSelection.create(lo.concat(no.ranges)):EditorSelection.create(lo):no}}:null}function rectangularSelection(eo){let to=(eo==null?void 0:eo.eventFilter)||(ro=>ro.altKey&&ro.button==0);return EditorView.mouseSelectionStyle.of((ro,no)=>to(no)?rectangleSelectionStyle(ro,no):null)}const keys={Alt:[18,eo=>!!eo.altKey],Control:[17,eo=>!!eo.ctrlKey],Shift:[16,eo=>!!eo.shiftKey],Meta:[91,eo=>!!eo.metaKey]},showCrosshair={style:"cursor: crosshair"};function crosshairCursor(eo={}){let[to,ro]=keys[eo.key||"Alt"],no=ViewPlugin.fromClass(class{constructor(oo){this.view=oo,this.isDown=!1}set(oo){this.isDown!=oo&&(this.isDown=oo,this.view.update([]))}},{eventObservers:{keydown(oo){this.set(oo.keyCode==to||ro(oo))},keyup(oo){(oo.keyCode==to||!ro(oo))&&this.set(!1)},mousemove(oo){this.set(ro(oo))}}});return[no,EditorView.contentAttributes.of(oo=>{var io;return!((io=oo.plugin(no))===null||io===void 0)&&io.isDown?showCrosshair:null})]}const Outside="-10000px";class TooltipViewManager{constructor(to,ro,no,oo){this.facet=ro,this.createTooltipView=no,this.removeTooltipView=oo,this.input=to.state.facet(ro),this.tooltips=this.input.filter(so=>so);let io=null;this.tooltipViews=this.tooltips.map(so=>io=no(so,io))}update(to,ro){var no;let oo=to.state.facet(this.facet),io=oo.filter(lo=>lo);if(oo===this.input){for(let lo of this.tooltipViews)lo.update&&lo.update(to);return!1}let so=[],ao=ro?[]:null;for(let lo=0;loro[co]=lo),ro.length=ao.length),this.input=oo,this.tooltips=io,this.tooltipViews=so,!0}}function windowSpace(eo){let{win:to}=eo;return{top:0,left:0,bottom:to.innerHeight,right:to.innerWidth}}const tooltipConfig=Facet.define({combine:eo=>{var to,ro,no;return{position:browser.ios?"absolute":((to=eo.find(oo=>oo.position))===null||to===void 0?void 0:to.position)||"fixed",parent:((ro=eo.find(oo=>oo.parent))===null||ro===void 0?void 0:ro.parent)||null,tooltipSpace:((no=eo.find(oo=>oo.tooltipSpace))===null||no===void 0?void 0:no.tooltipSpace)||windowSpace}}}),knownHeight=new WeakMap,tooltipPlugin=ViewPlugin.fromClass(class{constructor(eo){this.view=eo,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let to=eo.state.facet(tooltipConfig);this.position=to.position,this.parent=to.parent,this.classes=eo.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new TooltipViewManager(eo,showTooltip,(ro,no)=>this.createTooltip(ro,no),ro=>{this.resizeObserver&&this.resizeObserver.unobserve(ro.dom),ro.dom.remove()}),this.above=this.manager.tooltips.map(ro=>!!ro.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(ro=>{Date.now()>this.lastTransaction-50&&ro.length>0&&ro[ro.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),eo.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 eo of this.manager.tooltipViews)this.intersectionObserver.observe(eo.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(eo){eo.transactions.length&&(this.lastTransaction=Date.now());let to=this.manager.update(eo,this.above);to&&this.observeIntersection();let ro=to||eo.geometryChanged,no=eo.state.facet(tooltipConfig);if(no.position!=this.position&&!this.madeAbsolute){this.position=no.position;for(let oo of this.manager.tooltipViews)oo.dom.style.position=this.position;ro=!0}if(no.parent!=this.parent){this.parent&&this.container.remove(),this.parent=no.parent,this.createContainer();for(let oo of this.manager.tooltipViews)this.container.appendChild(oo.dom);ro=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);ro&&this.maybeMeasure()}createTooltip(eo,to){let ro=eo.create(this.view),no=to?to.dom:null;if(ro.dom.classList.add("cm-tooltip"),eo.arrow&&!ro.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let oo=document.createElement("div");oo.className="cm-tooltip-arrow",ro.dom.insertBefore(oo,no)}return ro.dom.style.position=this.position,ro.dom.style.top=Outside,ro.dom.style.left="0px",this.container.insertBefore(ro.dom,no),ro.mount&&ro.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(ro.dom),ro}destroy(){var eo,to,ro;this.view.win.removeEventListener("resize",this.measureSoon);for(let no of this.manager.tooltipViews)no.dom.remove(),(eo=no.destroy)===null||eo===void 0||eo.call(no);this.parent&&this.container.remove(),(to=this.resizeObserver)===null||to===void 0||to.disconnect(),(ro=this.intersectionObserver)===null||ro===void 0||ro.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let eo=this.view.dom.getBoundingClientRect(),to=1,ro=1,no=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:oo}=this.manager.tooltipViews[0];if(browser.gecko)no=oo.offsetParent!=this.container.ownerDocument.body;else if(oo.style.top==Outside&&oo.style.left=="0px"){let io=oo.getBoundingClientRect();no=Math.abs(io.top+1e4)>1||Math.abs(io.left)>1}}if(no||this.position=="absolute")if(this.parent){let oo=this.parent.getBoundingClientRect();oo.width&&oo.height&&(to=oo.width/this.parent.offsetWidth,ro=oo.height/this.parent.offsetHeight)}else({scaleX:to,scaleY:ro}=this.view.viewState);return{editor:eo,parent:this.parent?this.container.getBoundingClientRect():eo,pos:this.manager.tooltips.map((oo,io)=>{let so=this.manager.tooltipViews[io];return so.getCoords?so.getCoords(oo.pos):this.view.coordsAtPos(oo.pos)}),size:this.manager.tooltipViews.map(({dom:oo})=>oo.getBoundingClientRect()),space:this.view.state.facet(tooltipConfig).tooltipSpace(this.view),scaleX:to,scaleY:ro,makeAbsolute:no}}writeMeasure(eo){var to;if(eo.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let ao of this.manager.tooltipViews)ao.dom.style.position="absolute"}let{editor:ro,space:no,scaleX:oo,scaleY:io}=eo,so=[];for(let ao=0;ao=Math.min(ro.bottom,no.bottom)||fo.rightMath.min(ro.right,no.right)+.1){uo.style.top=Outside;continue}let po=lo.arrow?co.dom.querySelector(".cm-tooltip-arrow"):null,go=po?7:0,vo=ho.right-ho.left,yo=(to=knownHeight.get(co))!==null&&to!==void 0?to:ho.bottom-ho.top,xo=co.offset||noOffset,_o=this.view.textDirection==Direction.LTR,Eo=ho.width>no.right-no.left?_o?no.left:no.right-ho.width:_o?Math.min(fo.left-(po?14:0)+xo.x,no.right-vo):Math.max(no.left,fo.left-vo+(po?14:0)-xo.x),So=this.above[ao];!lo.strictSide&&(So?fo.top-(ho.bottom-ho.top)-xo.yno.bottom)&&So==no.bottom-fo.bottom>fo.top-no.top&&(So=this.above[ao]=!So);let ko=(So?fo.top-no.top:no.bottom-fo.bottom)-go;if(koEo&&Oo.topAo&&(Ao=So?Oo.top-yo-2-go:Oo.bottom+go+2);if(this.position=="absolute"?(uo.style.top=(Ao-eo.parent.top)/io+"px",uo.style.left=(Eo-eo.parent.left)/oo+"px"):(uo.style.top=Ao/io+"px",uo.style.left=Eo/oo+"px"),po){let Oo=fo.left+(_o?xo.x:-xo.x)-(Eo+14-7);po.style.left=Oo/oo+"px"}co.overlap!==!0&&so.push({left:Eo,top:Ao,right:Co,bottom:Ao+yo}),uo.classList.toggle("cm-tooltip-above",So),uo.classList.toggle("cm-tooltip-below",!So),co.positioned&&co.positioned(eo.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 eo of this.manager.tooltipViews)eo.dom.style.top=Outside}},{eventObservers:{scroll(){this.maybeMeasure()}}}),baseTheme$5=EditorView.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:`${7*2}px`,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"}}}),noOffset={x:0,y:0},showTooltip=Facet.define({enables:[tooltipPlugin,baseTheme$5]}),showHoverTooltip=Facet.define({combine:eo=>eo.reduce((to,ro)=>to.concat(ro),[])});class HoverTooltipHost{static create(to){return new HoverTooltipHost(to)}constructor(to){this.view=to,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new TooltipViewManager(to,showHoverTooltip,(ro,no)=>this.createHostedView(ro,no),ro=>ro.dom.remove())}createHostedView(to,ro){let no=to.create(this.view);return no.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(no.dom,ro?ro.dom.nextSibling:this.dom.firstChild),this.mounted&&no.mount&&no.mount(this.view),no}mount(to){for(let ro of this.manager.tooltipViews)ro.mount&&ro.mount(to);this.mounted=!0}positioned(to){for(let ro of this.manager.tooltipViews)ro.positioned&&ro.positioned(to)}update(to){this.manager.update(to)}destroy(){var to;for(let ro of this.manager.tooltipViews)(to=ro.destroy)===null||to===void 0||to.call(ro)}passProp(to){let ro;for(let no of this.manager.tooltipViews){let oo=no[to];if(oo!==void 0){if(ro===void 0)ro=oo;else if(ro!==oo)return}}return ro}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 showHoverTooltipHost=showTooltip.compute([showHoverTooltip],eo=>{let to=eo.facet(showHoverTooltip);return to.length===0?null:{pos:Math.min(...to.map(ro=>ro.pos)),end:Math.max(...to.map(ro=>{var no;return(no=ro.end)!==null&&no!==void 0?no:ro.pos})),create:HoverTooltipHost.create,above:to[0].above,arrow:to.some(ro=>ro.arrow)}});class HoverPlugin{constructor(to,ro,no,oo,io){this.view=to,this.source=ro,this.field=no,this.setHover=oo,this.hoverTime=io,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:to.dom,time:0},this.checkHover=this.checkHover.bind(this),to.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),to.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 to=Date.now()-this.lastMove.time;toao.bottom||ro.xao.right+to.defaultCharacterWidth)return;let lo=to.bidiSpans(to.state.doc.lineAt(oo)).find(uo=>uo.from<=oo&&uo.to>=oo),co=lo&&lo.dir==Direction.RTL?-1:1;io=ro.x{this.pending==ao&&(this.pending=null,lo&&!(Array.isArray(lo)&&!lo.length)&&to.dispatch({effects:this.setHover.of(Array.isArray(lo)?lo:[lo])}))},lo=>logException(to.state,lo,"hover tooltip"))}else so&&!(Array.isArray(so)&&!so.length)&&to.dispatch({effects:this.setHover.of(Array.isArray(so)?so:[so])})}get tooltip(){let to=this.view.plugin(tooltipPlugin),ro=to?to.manager.tooltips.findIndex(no=>no.create==HoverTooltipHost.create):-1;return ro>-1?to.manager.tooltipViews[ro]:null}mousemove(to){var ro,no;this.lastMove={x:to.clientX,y:to.clientY,target:to.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:oo,tooltip:io}=this;if(oo.length&&io&&!isInTooltip(io.dom,to)||this.pending){let{pos:so}=oo[0]||this.pending,ao=(no=(ro=oo[0])===null||ro===void 0?void 0:ro.end)!==null&&no!==void 0?no:so;(so==ao?this.view.posAtCoords(this.lastMove)!=so:!isOverRange(this.view,so,ao,to.clientX,to.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(to){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:ro}=this;if(ro.length){let{tooltip:no}=this;no&&no.dom.contains(to.relatedTarget)?this.watchTooltipLeave(no.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(to){let ro=no=>{to.removeEventListener("mouseleave",ro),this.active.length&&!this.view.dom.contains(no.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};to.addEventListener("mouseleave",ro)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const tooltipMargin=4;function isInTooltip(eo,to){let ro=eo.getBoundingClientRect();return to.clientX>=ro.left-tooltipMargin&&to.clientX<=ro.right+tooltipMargin&&to.clientY>=ro.top-tooltipMargin&&to.clientY<=ro.bottom+tooltipMargin}function isOverRange(eo,to,ro,no,oo,io){let so=eo.scrollDOM.getBoundingClientRect(),ao=eo.documentTop+eo.documentPadding.top+eo.contentHeight;if(so.left>no||so.rightoo||Math.min(so.bottom,ao)=to&&lo<=ro}function hoverTooltip(eo,to={}){let ro=StateEffect.define(),no=StateField.define({create(){return[]},update(oo,io){if(oo.length&&(to.hideOnChange&&(io.docChanged||io.selection)?oo=[]:to.hideOn&&(oo=oo.filter(so=>!to.hideOn(io,so))),io.docChanged)){let so=[];for(let ao of oo){let lo=io.changes.mapPos(ao.pos,-1,MapMode.TrackDel);if(lo!=null){let co=Object.assign(Object.create(null),ao);co.pos=lo,co.end!=null&&(co.end=io.changes.mapPos(co.end)),so.push(co)}}oo=so}for(let so of io.effects)so.is(ro)&&(oo=so.value),so.is(closeHoverTooltipEffect)&&(oo=[]);return oo},provide:oo=>showHoverTooltip.from(oo)});return[no,ViewPlugin.define(oo=>new HoverPlugin(oo,eo,no,ro,to.hoverTime||300)),showHoverTooltipHost]}function getTooltip(eo,to){let ro=eo.plugin(tooltipPlugin);if(!ro)return null;let no=ro.manager.tooltips.indexOf(to);return no<0?null:ro.manager.tooltipViews[no]}const closeHoverTooltipEffect=StateEffect.define(),panelConfig=Facet.define({combine(eo){let to,ro;for(let no of eo)to=to||no.topContainer,ro=ro||no.bottomContainer;return{topContainer:to,bottomContainer:ro}}});function getPanel(eo,to){let ro=eo.plugin(panelPlugin),no=ro?ro.specs.indexOf(to):-1;return no>-1?ro.panels[no]:null}const panelPlugin=ViewPlugin.fromClass(class{constructor(eo){this.input=eo.state.facet(showPanel),this.specs=this.input.filter(ro=>ro),this.panels=this.specs.map(ro=>ro(eo));let to=eo.state.facet(panelConfig);this.top=new PanelGroup(eo,!0,to.topContainer),this.bottom=new PanelGroup(eo,!1,to.bottomContainer),this.top.sync(this.panels.filter(ro=>ro.top)),this.bottom.sync(this.panels.filter(ro=>!ro.top));for(let ro of this.panels)ro.dom.classList.add("cm-panel"),ro.mount&&ro.mount()}update(eo){let to=eo.state.facet(panelConfig);this.top.container!=to.topContainer&&(this.top.sync([]),this.top=new PanelGroup(eo.view,!0,to.topContainer)),this.bottom.container!=to.bottomContainer&&(this.bottom.sync([]),this.bottom=new PanelGroup(eo.view,!1,to.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let ro=eo.state.facet(showPanel);if(ro!=this.input){let no=ro.filter(lo=>lo),oo=[],io=[],so=[],ao=[];for(let lo of no){let co=this.specs.indexOf(lo),uo;co<0?(uo=lo(eo.view),ao.push(uo)):(uo=this.panels[co],uo.update&&uo.update(eo)),oo.push(uo),(uo.top?io:so).push(uo)}this.specs=no,this.panels=oo,this.top.sync(io),this.bottom.sync(so);for(let lo of ao)lo.dom.classList.add("cm-panel"),lo.mount&&lo.mount()}else for(let no of this.panels)no.update&&no.update(eo)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:eo=>EditorView.scrollMargins.of(to=>{let ro=to.plugin(eo);return ro&&{top:ro.top.scrollMargin(),bottom:ro.bottom.scrollMargin()}})});class PanelGroup{constructor(to,ro,no){this.view=to,this.top=ro,this.container=no,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(to){for(let ro of this.panels)ro.destroy&&to.indexOf(ro)<0&&ro.destroy();this.panels=to,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}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 ro=this.container||this.view.dom;ro.insertBefore(this.dom,this.top?ro.firstChild:null)}let to=this.dom.firstChild;for(let ro of this.panels)if(ro.dom.parentNode==this.dom){for(;to!=ro.dom;)to=rm(to);to=to.nextSibling}else this.dom.insertBefore(ro.dom,to);for(;to;)to=rm(to)}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 to of this.classes.split(" "))to&&this.container.classList.remove(to);for(let to of(this.classes=this.view.themeClasses).split(" "))to&&this.container.classList.add(to)}}}function rm(eo){let to=eo.nextSibling;return eo.remove(),to}const showPanel=Facet.define({enables:panelPlugin});class GutterMarker extends RangeValue{compare(to){return this==to||this.constructor==to.constructor&&this.eq(to)}eq(to){return!1}destroy(to){}}GutterMarker.prototype.elementClass="";GutterMarker.prototype.toDOM=void 0;GutterMarker.prototype.mapMode=MapMode.TrackBefore;GutterMarker.prototype.startSide=GutterMarker.prototype.endSide=-1;GutterMarker.prototype.point=!0;const gutterLineClass=Facet.define(),defaults$1={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>RangeSet.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},activeGutters=Facet.define();function gutter(eo){return[gutters(),activeGutters.of(Object.assign(Object.assign({},defaults$1),eo))]}const unfixGutters=Facet.define({combine:eo=>eo.some(to=>to)});function gutters(eo){let to=[gutterView];return eo&&eo.fixed===!1&&to.push(unfixGutters.of(!0)),to}const gutterView=ViewPlugin.fromClass(class{constructor(eo){this.view=eo,this.prevViewport=eo.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=eo.state.facet(activeGutters).map(to=>new SingleGutterView(eo,to));for(let to of this.gutters)this.dom.appendChild(to.dom);this.fixed=!eo.state.facet(unfixGutters),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),eo.scrollDOM.insertBefore(this.dom,eo.contentDOM)}update(eo){if(this.updateGutters(eo)){let to=this.prevViewport,ro=eo.view.viewport,no=Math.min(to.to,ro.to)-Math.max(to.from,ro.from);this.syncGutters(no<(ro.to-ro.from)*.8)}eo.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(unfixGutters)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=eo.view.viewport}syncGutters(eo){let to=this.dom.nextSibling;eo&&this.dom.remove();let ro=RangeSet.iter(this.view.state.facet(gutterLineClass),this.view.viewport.from),no=[],oo=this.gutters.map(io=>new UpdateContext(io,this.view.viewport,-this.view.documentPadding.top));for(let io of this.view.viewportLineBlocks)if(no.length&&(no=[]),Array.isArray(io.type)){let so=!0;for(let ao of io.type)if(ao.type==BlockType.Text&&so){advanceCursor(ro,no,ao.from);for(let lo of oo)lo.line(this.view,ao,no);so=!1}else if(ao.widget)for(let lo of oo)lo.widget(this.view,ao)}else if(io.type==BlockType.Text){advanceCursor(ro,no,io.from);for(let so of oo)so.line(this.view,io,no)}else if(io.widget)for(let so of oo)so.widget(this.view,io);for(let io of oo)io.finish();eo&&this.view.scrollDOM.insertBefore(this.dom,to)}updateGutters(eo){let to=eo.startState.facet(activeGutters),ro=eo.state.facet(activeGutters),no=eo.docChanged||eo.heightChanged||eo.viewportChanged||!RangeSet.eq(eo.startState.facet(gutterLineClass),eo.state.facet(gutterLineClass),eo.view.viewport.from,eo.view.viewport.to);if(to==ro)for(let oo of this.gutters)oo.update(eo)&&(no=!0);else{no=!0;let oo=[];for(let io of ro){let so=to.indexOf(io);so<0?oo.push(new SingleGutterView(this.view,io)):(this.gutters[so].update(eo),oo.push(this.gutters[so]))}for(let io of this.gutters)io.dom.remove(),oo.indexOf(io)<0&&io.destroy();for(let io of oo)this.dom.appendChild(io.dom);this.gutters=oo}return no}destroy(){for(let eo of this.gutters)eo.destroy();this.dom.remove()}},{provide:eo=>EditorView.scrollMargins.of(to=>{let ro=to.plugin(eo);return!ro||ro.gutters.length==0||!ro.fixed?null:to.textDirection==Direction.LTR?{left:ro.dom.offsetWidth*to.scaleX}:{right:ro.dom.offsetWidth*to.scaleX}})});function asArray(eo){return Array.isArray(eo)?eo:[eo]}function advanceCursor(eo,to,ro){for(;eo.value&&eo.from<=ro;)eo.from==ro&&to.push(eo.value),eo.next()}class UpdateContext{constructor(to,ro,no){this.gutter=to,this.height=no,this.i=0,this.cursor=RangeSet.iter(to.markers,ro.from)}addElement(to,ro,no){let{gutter:oo}=this,io=(ro.top-this.height)/to.scaleY,so=ro.height/to.scaleY;if(this.i==oo.elements.length){let ao=new GutterElement(to,so,io,no);oo.elements.push(ao),oo.dom.appendChild(ao.dom)}else oo.elements[this.i].update(to,so,io,no);this.height=ro.bottom,this.i++}line(to,ro,no){let oo=[];advanceCursor(this.cursor,oo,ro.from),no.length&&(oo=oo.concat(no));let io=this.gutter.config.lineMarker(to,ro,oo);io&&oo.unshift(io);let so=this.gutter;oo.length==0&&!so.config.renderEmptyElements||this.addElement(to,ro,oo)}widget(to,ro){let no=this.gutter.config.widgetMarker(to,ro.widget,ro);no&&this.addElement(to,ro,[no])}finish(){let to=this.gutter;for(;to.elements.length>this.i;){let ro=to.elements.pop();to.dom.removeChild(ro.dom),ro.destroy()}}}class SingleGutterView{constructor(to,ro){this.view=to,this.config=ro,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let no in ro.domEventHandlers)this.dom.addEventListener(no,oo=>{let io=oo.target,so;if(io!=this.dom&&this.dom.contains(io)){for(;io.parentNode!=this.dom;)io=io.parentNode;let lo=io.getBoundingClientRect();so=(lo.top+lo.bottom)/2}else so=oo.clientY;let ao=to.lineBlockAtHeight(so-to.documentTop);ro.domEventHandlers[no](to,ao,oo)&&oo.preventDefault()});this.markers=asArray(ro.markers(to)),ro.initialSpacer&&(this.spacer=new GutterElement(to,0,0,[ro.initialSpacer(to)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(to){let ro=this.markers;if(this.markers=asArray(this.config.markers(to.view)),this.spacer&&this.config.updateSpacer){let oo=this.config.updateSpacer(this.spacer.markers[0],to);oo!=this.spacer.markers[0]&&this.spacer.update(to.view,0,0,[oo])}let no=to.view.viewport;return!RangeSet.eq(this.markers,ro,no.from,no.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(to):!1)}destroy(){for(let to of this.elements)to.destroy()}}class GutterElement{constructor(to,ro,no,oo){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(to,ro,no,oo)}update(to,ro,no,oo){this.height!=ro&&(this.height=ro,this.dom.style.height=ro+"px"),this.above!=no&&(this.dom.style.marginTop=(this.above=no)?no+"px":""),sameMarkers(this.markers,oo)||this.setMarkers(to,oo)}setMarkers(to,ro){let no="cm-gutterElement",oo=this.dom.firstChild;for(let io=0,so=0;;){let ao=so,lo=ioio(ao,lo,co)||so(ao,lo,co):so}return no}})}});class NumberMarker extends GutterMarker{constructor(to){super(),this.number=to}eq(to){return this.number==to.number}toDOM(){return document.createTextNode(this.number)}}function formatNumber(eo,to){return eo.state.facet(lineNumberConfig).formatNumber(to,eo.state)}const lineNumberGutter=activeGutters.compute([lineNumberConfig],eo=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(to){return to.state.facet(lineNumberMarkers)},lineMarker(to,ro,no){return no.some(oo=>oo.toDOM)?null:new NumberMarker(formatNumber(to,to.state.doc.lineAt(ro.from).number))},widgetMarker:()=>null,lineMarkerChange:to=>to.startState.facet(lineNumberConfig)!=to.state.facet(lineNumberConfig),initialSpacer(to){return new NumberMarker(formatNumber(to,maxLineNumber(to.state.doc.lines)))},updateSpacer(to,ro){let no=formatNumber(ro.view,maxLineNumber(ro.view.state.doc.lines));return no==to.number?to:new NumberMarker(no)},domEventHandlers:eo.facet(lineNumberConfig).domEventHandlers}));function lineNumbers(eo={}){return[lineNumberConfig.of(eo),gutters(),lineNumberGutter]}function maxLineNumber(eo){let to=9;for(;to{let to=[],ro=-1;for(let no of eo.selection.ranges){let oo=eo.doc.lineAt(no.head).from;oo>ro&&(ro=oo,to.push(activeLineGutterMarker.range(oo)))}return RangeSet.of(to)});function highlightActiveLineGutter(){return activeLineGutterHighlighter}const DefaultBufferLength=1024;let nextPropID=0,Range$1=class{constructor(to,ro){this.from=to,this.to=ro}};class NodeProp{constructor(to={}){this.id=nextPropID++,this.perNode=!!to.perNode,this.deserialize=to.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(to){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof to!="function"&&(to=NodeType.match(to)),ro=>{let no=to(ro);return no===void 0?null:[this,no]}}}NodeProp.closedBy=new NodeProp({deserialize:eo=>eo.split(" ")});NodeProp.openedBy=new NodeProp({deserialize:eo=>eo.split(" ")});NodeProp.group=new NodeProp({deserialize:eo=>eo.split(" ")});NodeProp.isolate=new NodeProp({deserialize:eo=>{if(eo&&eo!="rtl"&&eo!="ltr"&&eo!="auto")throw new RangeError("Invalid value for isolate: "+eo);return eo||"auto"}});NodeProp.contextHash=new NodeProp({perNode:!0});NodeProp.lookAhead=new NodeProp({perNode:!0});NodeProp.mounted=new NodeProp({perNode:!0});class MountedTree{constructor(to,ro,no){this.tree=to,this.overlay=ro,this.parser=no}static get(to){return to&&to.props&&to.props[NodeProp.mounted.id]}}const noProps=Object.create(null);class NodeType{constructor(to,ro,no,oo=0){this.name=to,this.props=ro,this.id=no,this.flags=oo}static define(to){let ro=to.props&&to.props.length?Object.create(null):noProps,no=(to.top?1:0)|(to.skipped?2:0)|(to.error?4:0)|(to.name==null?8:0),oo=new NodeType(to.name||"",ro,to.id,no);if(to.props){for(let io of to.props)if(Array.isArray(io)||(io=io(oo)),io){if(io[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");ro[io[0].id]=io[1]}}return oo}prop(to){return this.props[to.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(to){if(typeof to=="string"){if(this.name==to)return!0;let ro=this.prop(NodeProp.group);return ro?ro.indexOf(to)>-1:!1}return this.id==to}static match(to){let ro=Object.create(null);for(let no in to)for(let oo of no.split(" "))ro[oo]=to[no];return no=>{for(let oo=no.prop(NodeProp.group),io=-1;io<(oo?oo.length:0);io++){let so=ro[io<0?no.name:oo[io]];if(so)return so}}}}NodeType.none=new NodeType("",Object.create(null),0,8);class NodeSet{constructor(to){this.types=to;for(let ro=0;ro0;for(let lo=this.cursor(so|IterMode.IncludeAnonymous);;){let co=!1;if(lo.from<=io&&lo.to>=oo&&(!ao&&lo.type.isAnonymous||ro(lo)!==!1)){if(lo.firstChild())continue;co=!0}for(;co&&no&&(ao||!lo.type.isAnonymous)&&no(lo),!lo.nextSibling();){if(!lo.parent())return;co=!0}}}prop(to){return to.perNode?this.props?this.props[to.id]:void 0:this.type.prop(to)}get propValues(){let to=[];if(this.props)for(let ro in this.props)to.push([+ro,this.props[ro]]);return to}balance(to={}){return this.children.length<=8?this:balanceRange(NodeType.none,this.children,this.positions,0,this.children.length,0,this.length,(ro,no,oo)=>new Tree(this.type,ro,no,oo,this.propValues),to.makeTree||((ro,no,oo)=>new Tree(NodeType.none,ro,no,oo)))}static build(to){return buildTree(to)}}Tree.empty=new Tree(NodeType.none,[],[],0);class FlatBufferCursor{constructor(to,ro){this.buffer=to,this.index=ro}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 FlatBufferCursor(this.buffer,this.index)}}class TreeBuffer{constructor(to,ro,no){this.buffer=to,this.length=ro,this.set=no}get type(){return NodeType.none}toString(){let to=[];for(let ro=0;ro0));lo=so[lo+3]);return ao}slice(to,ro,no){let oo=this.buffer,io=new Uint16Array(ro-to),so=0;for(let ao=to,lo=0;ao=to&&roto;case 1:return ro<=to&&no>to;case 2:return no>to;case 4:return!0}}function resolveNode(eo,to,ro,no){for(var oo;eo.from==eo.to||(ro<1?eo.from>=to:eo.from>to)||(ro>-1?eo.to<=to:eo.to0?ao.length:-1;to!=co;to+=ro){let uo=ao[to],fo=lo[to]+so.from;if(checkSide(oo,no,fo,fo+uo.length)){if(uo instanceof TreeBuffer){if(io&IterMode.ExcludeBuffers)continue;let ho=uo.findChild(0,uo.buffer.length,ro,no-fo,oo);if(ho>-1)return new BufferNode(new BufferContext(so,uo,to,fo),null,ho)}else if(io&IterMode.IncludeAnonymous||!uo.type.isAnonymous||hasChild(uo)){let ho;if(!(io&IterMode.IgnoreMounts)&&(ho=MountedTree.get(uo))&&!ho.overlay)return new TreeNode(ho.tree,fo,to,so);let po=new TreeNode(uo,fo,to,so);return io&IterMode.IncludeAnonymous||!po.type.isAnonymous?po:po.nextChild(ro<0?uo.children.length-1:0,ro,no,oo)}}}if(io&IterMode.IncludeAnonymous||!so.type.isAnonymous||(so.index>=0?to=so.index+ro:to=ro<0?-1:so._parent._tree.children.length,so=so._parent,!so))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(to){return this.nextChild(0,1,to,2)}childBefore(to){return this.nextChild(this._tree.children.length-1,-1,to,-2)}enter(to,ro,no=0){let oo;if(!(no&IterMode.IgnoreOverlays)&&(oo=MountedTree.get(this._tree))&&oo.overlay){let io=to-this.from;for(let{from:so,to:ao}of oo.overlay)if((ro>0?so<=io:so=io:ao>io))return new TreeNode(oo.tree,oo.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,to,ro,no)}nextSignificantParent(){let to=this;for(;to.type.isAnonymous&&to._parent;)to=to._parent;return to}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 getChildren(eo,to,ro,no){let oo=eo.cursor(),io=[];if(!oo.firstChild())return io;if(ro!=null){for(let so=!1;!so;)if(so=oo.type.is(ro),!oo.nextSibling())return io}for(;;){if(no!=null&&oo.type.is(no))return io;if(oo.type.is(to)&&io.push(oo.node),!oo.nextSibling())return no==null?io:[]}}function matchNodeContext(eo,to,ro=to.length-1){for(let no=eo.parent;ro>=0;no=no.parent){if(!no)return!1;if(!no.type.isAnonymous){if(to[ro]&&to[ro]!=no.name)return!1;ro--}}return!0}class BufferContext{constructor(to,ro,no,oo){this.parent=to,this.buffer=ro,this.index=no,this.start=oo}}class BufferNode extends BaseNode{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(to,ro,no){super(),this.context=to,this._parent=ro,this.index=no,this.type=to.buffer.set.types[to.buffer.buffer[no]]}child(to,ro,no){let{buffer:oo}=this.context,io=oo.findChild(this.index+4,oo.buffer[this.index+3],to,ro-this.context.start,no);return io<0?null:new BufferNode(this.context,this,io)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(to){return this.child(1,to,2)}childBefore(to){return this.child(-1,to,-2)}enter(to,ro,no=0){if(no&IterMode.ExcludeBuffers)return null;let{buffer:oo}=this.context,io=oo.findChild(this.index+4,oo.buffer[this.index+3],ro>0?1:-1,to-this.context.start,ro);return io<0?null:new BufferNode(this.context,this,io)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(to){return this._parent?null:this.context.parent.nextChild(this.context.index+to,to,0,4)}get nextSibling(){let{buffer:to}=this.context,ro=to.buffer[this.index+3];return ro<(this._parent?to.buffer[this._parent.index+3]:to.buffer.length)?new BufferNode(this.context,this._parent,ro):this.externalSibling(1)}get prevSibling(){let{buffer:to}=this.context,ro=this._parent?this._parent.index+4:0;return this.index==ro?this.externalSibling(-1):new BufferNode(this.context,this._parent,to.findChild(ro,this.index,-1,0,4))}get tree(){return null}toTree(){let to=[],ro=[],{buffer:no}=this.context,oo=this.index+4,io=no.buffer[this.index+3];if(io>oo){let so=no.buffer[this.index+1];to.push(no.slice(oo,io,so)),ro.push(0)}return new Tree(this.type,to,ro,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function iterStack(eo){if(!eo.length)return null;let to=0,ro=eo[0];for(let io=1;ioro.from||so.to=to){let ao=new TreeNode(so.tree,so.overlay[0].from+io.from,-1,io);(oo||(oo=[no])).push(resolveNode(ao,to,ro,!1))}}return oo?iterStack(oo):no}class TreeCursor{get name(){return this.type.name}constructor(to,ro=0){if(this.mode=ro,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,to instanceof TreeNode)this.yieldNode(to);else{this._tree=to.context.parent,this.buffer=to.context;for(let no=to._parent;no;no=no._parent)this.stack.unshift(no.index);this.bufferNode=to,this.yieldBuf(to.index)}}yieldNode(to){return to?(this._tree=to,this.type=to.type,this.from=to.from,this.to=to.to,!0):!1}yieldBuf(to,ro){this.index=to;let{start:no,buffer:oo}=this.buffer;return this.type=ro||oo.set.types[oo.buffer[to]],this.from=no+oo.buffer[to+1],this.to=no+oo.buffer[to+2],!0}yield(to){return to?to instanceof TreeNode?(this.buffer=null,this.yieldNode(to)):(this.buffer=to.context,this.yieldBuf(to.index,to.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(to,ro,no){if(!this.buffer)return this.yield(this._tree.nextChild(to<0?this._tree._tree.children.length-1:0,to,ro,no,this.mode));let{buffer:oo}=this.buffer,io=oo.findChild(this.index+4,oo.buffer[this.index+3],to,ro-this.buffer.start,no);return io<0?!1:(this.stack.push(this.index),this.yieldBuf(io))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(to){return this.enterChild(1,to,2)}childBefore(to){return this.enterChild(-1,to,-2)}enter(to,ro,no=this.mode){return this.buffer?no&IterMode.ExcludeBuffers?!1:this.enterChild(1,to,ro):this.yield(this._tree.enter(to,ro,no))}parent(){if(!this.buffer)return this.yieldNode(this.mode&IterMode.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let to=this.mode&IterMode.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(to)}sibling(to){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+to,to,0,4,this.mode)):!1;let{buffer:ro}=this.buffer,no=this.stack.length-1;if(to<0){let oo=no<0?0:this.stack[no]+4;if(this.index!=oo)return this.yieldBuf(ro.findChild(oo,this.index,-1,0,4))}else{let oo=ro.buffer[this.index+3];if(oo<(no<0?ro.buffer.length:ro.buffer[this.stack[no]+3]))return this.yieldBuf(oo)}return no<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+to,to,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(to){let ro,no,{buffer:oo}=this;if(oo){if(to>0){if(this.index-1)for(let io=ro+to,so=to<0?-1:no._tree.children.length;io!=so;io+=to){let ao=no._tree.children[io];if(this.mode&IterMode.IncludeAnonymous||ao instanceof TreeBuffer||!ao.type.isAnonymous||hasChild(ao))return!1}return!0}move(to,ro){if(ro&&this.enterChild(to,0,4))return!0;for(;;){if(this.sibling(to))return!0;if(this.atLastNode(to)||!this.parent())return!1}}next(to=!0){return this.move(1,to)}prev(to=!0){return this.move(-1,to)}moveTo(to,ro=0){for(;(this.from==this.to||(ro<1?this.from>=to:this.from>to)||(ro>-1?this.to<=to:this.to=0;){for(let so=to;so;so=so._parent)if(so.index==oo){if(oo==this.index)return so;ro=so,no=io+1;break e}oo=this.stack[--io]}for(let oo=no;oo=0;io--){if(io<0)return matchNodeContext(this.node,to,oo);let so=no[ro.buffer[this.stack[io]]];if(!so.isAnonymous){if(to[oo]&&to[oo]!=so.name)return!1;oo--}}return!0}}function hasChild(eo){return eo.children.some(to=>to instanceof TreeBuffer||!to.type.isAnonymous||hasChild(to))}function buildTree(eo){var to;let{buffer:ro,nodeSet:no,maxBufferLength:oo=DefaultBufferLength,reused:io=[],minRepeatType:so=no.types.length}=eo,ao=Array.isArray(ro)?new FlatBufferCursor(ro,ro.length):ro,lo=no.types,co=0,uo=0;function fo(ko,Ao,Co,Oo,wo,Ro){let{id:Do,start:$o,end:Mo,size:Po}=ao,Bo=uo;for(;Po<0;)if(ao.next(),Po==-1){let Go=io[Do];Co.push(Go),Oo.push($o-ko);return}else if(Po==-3){co=Do;return}else if(Po==-4){uo=Do;return}else throw new RangeError(`Unrecognized record size: ${Po}`);let No=lo[Do],Fo,zo,qo=$o-ko;if(Mo-$o<=oo&&(zo=yo(ao.pos-Ao,wo))){let Go=new Uint16Array(zo.size-zo.skip),Qo=ao.pos-zo.size,Zo=Go.length;for(;ao.pos>Qo;)Zo=xo(zo.start,Go,Zo);Fo=new TreeBuffer(Go,Mo-zo.start,no),qo=zo.start-ko}else{let Go=ao.pos-Po;ao.next();let Qo=[],Zo=[],bs=Do>=so?Do:-1,ks=0,Is=Mo;for(;ao.pos>Go;)bs>=0&&ao.id==bs&&ao.size>=0?(ao.end<=Is-oo&&(go(Qo,Zo,$o,ks,ao.end,Is,bs,Bo),ks=Qo.length,Is=ao.end),ao.next()):Ro>2500?ho($o,Go,Qo,Zo):fo($o,Go,Qo,Zo,bs,Ro+1);if(bs>=0&&ks>0&&ks-1&&ks>0){let Rs=po(No);Fo=balanceRange(No,Qo,Zo,0,Qo.length,0,Mo-$o,Rs,Rs)}else Fo=vo(No,Qo,Zo,Mo-$o,Bo-Mo)}Co.push(Fo),Oo.push(qo)}function ho(ko,Ao,Co,Oo){let wo=[],Ro=0,Do=-1;for(;ao.pos>Ao;){let{id:$o,start:Mo,end:Po,size:Bo}=ao;if(Bo>4)ao.next();else{if(Do>-1&&Mo=0;Po-=3)$o[Bo++]=wo[Po],$o[Bo++]=wo[Po+1]-Mo,$o[Bo++]=wo[Po+2]-Mo,$o[Bo++]=Bo;Co.push(new TreeBuffer($o,wo[2]-Mo,no)),Oo.push(Mo-ko)}}function po(ko){return(Ao,Co,Oo)=>{let wo=0,Ro=Ao.length-1,Do,$o;if(Ro>=0&&(Do=Ao[Ro])instanceof Tree){if(!Ro&&Do.type==ko&&Do.length==Oo)return Do;($o=Do.prop(NodeProp.lookAhead))&&(wo=Co[Ro]+Do.length+$o)}return vo(ko,Ao,Co,Oo,wo)}}function go(ko,Ao,Co,Oo,wo,Ro,Do,$o){let Mo=[],Po=[];for(;ko.length>Oo;)Mo.push(ko.pop()),Po.push(Ao.pop()+Co-wo);ko.push(vo(no.types[Do],Mo,Po,Ro-wo,$o-Ro)),Ao.push(wo-Co)}function vo(ko,Ao,Co,Oo,wo=0,Ro){if(co){let Do=[NodeProp.contextHash,co];Ro=Ro?[Do].concat(Ro):[Do]}if(wo>25){let Do=[NodeProp.lookAhead,wo];Ro=Ro?[Do].concat(Ro):[Do]}return new Tree(ko,Ao,Co,Oo,Ro)}function yo(ko,Ao){let Co=ao.fork(),Oo=0,wo=0,Ro=0,Do=Co.end-oo,$o={size:0,start:0,skip:0};e:for(let Mo=Co.pos-ko;Co.pos>Mo;){let Po=Co.size;if(Co.id==Ao&&Po>=0){$o.size=Oo,$o.start=wo,$o.skip=Ro,Ro+=4,Oo+=4,Co.next();continue}let Bo=Co.pos-Po;if(Po<0||Bo=so?4:0,Fo=Co.start;for(Co.next();Co.pos>Bo;){if(Co.size<0)if(Co.size==-3)No+=4;else break e;else Co.id>=so&&(No+=4);Co.next()}wo=Fo,Oo+=Po,Ro+=No}return(Ao<0||Oo==ko)&&($o.size=Oo,$o.start=wo,$o.skip=Ro),$o.size>4?$o:void 0}function xo(ko,Ao,Co){let{id:Oo,start:wo,end:Ro,size:Do}=ao;if(ao.next(),Do>=0&&Oo4){let Mo=ao.pos-(Do-4);for(;ao.pos>Mo;)Co=xo(ko,Ao,Co)}Ao[--Co]=$o,Ao[--Co]=Ro-ko,Ao[--Co]=wo-ko,Ao[--Co]=Oo}else Do==-3?co=Oo:Do==-4&&(uo=Oo);return Co}let _o=[],Eo=[];for(;ao.pos>0;)fo(eo.start||0,eo.bufferStart||0,_o,Eo,-1,0);let So=(to=eo.length)!==null&&to!==void 0?to:_o.length?Eo[0]+_o[0].length:0;return new Tree(lo[eo.topID],_o.reverse(),Eo.reverse(),So)}const nodeSizeCache=new WeakMap;function nodeSize(eo,to){if(!eo.isAnonymous||to instanceof TreeBuffer||to.type!=eo)return 1;let ro=nodeSizeCache.get(to);if(ro==null){ro=1;for(let no of to.children){if(no.type!=eo||!(no instanceof Tree)){ro=1;break}ro+=nodeSize(eo,no)}nodeSizeCache.set(to,ro)}return ro}function balanceRange(eo,to,ro,no,oo,io,so,ao,lo){let co=0;for(let go=no;go=uo)break;Ao+=Co}if(Eo==So+1){if(Ao>uo){let Co=go[So];po(Co.children,Co.positions,0,Co.children.length,vo[So]+_o);continue}fo.push(go[So])}else{let Co=vo[Eo-1]+go[Eo-1].length-ko;fo.push(balanceRange(eo,go,vo,So,Eo,ko,Co,null,lo))}ho.push(ko+_o-io)}}return po(to,ro,no,oo,0),(ao||lo)(fo,ho,so)}class NodeWeakMap{constructor(){this.map=new WeakMap}setBuffer(to,ro,no){let oo=this.map.get(to);oo||this.map.set(to,oo=new Map),oo.set(ro,no)}getBuffer(to,ro){let no=this.map.get(to);return no&&no.get(ro)}set(to,ro){to instanceof BufferNode?this.setBuffer(to.context.buffer,to.index,ro):to instanceof TreeNode&&this.map.set(to.tree,ro)}get(to){return to instanceof BufferNode?this.getBuffer(to.context.buffer,to.index):to instanceof TreeNode?this.map.get(to.tree):void 0}cursorSet(to,ro){to.buffer?this.setBuffer(to.buffer.buffer,to.index,ro):this.map.set(to.tree,ro)}cursorGet(to){return to.buffer?this.getBuffer(to.buffer.buffer,to.index):this.map.get(to.tree)}}class TreeFragment{constructor(to,ro,no,oo,io=!1,so=!1){this.from=to,this.to=ro,this.tree=no,this.offset=oo,this.open=(io?1:0)|(so?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(to,ro=[],no=!1){let oo=[new TreeFragment(0,to.length,to,0,!1,no)];for(let io of ro)io.to>to.length&&oo.push(io);return oo}static applyChanges(to,ro,no=128){if(!ro.length)return to;let oo=[],io=1,so=to.length?to[0]:null;for(let ao=0,lo=0,co=0;;ao++){let uo=ao=no)for(;so&&so.from=ho.from||fo<=ho.to||co){let po=Math.max(ho.from,lo)-co,go=Math.min(ho.to,fo)-co;ho=po>=go?null:new TreeFragment(po,go,ho.tree,ho.offset+co,ao>0,!!uo)}if(ho&&oo.push(ho),so.to>fo)break;so=ionew Range$1(oo.from,oo.to)):[new Range$1(0,0)]:[new Range$1(0,to.length)],this.createParse(to,ro||[],no)}parse(to,ro,no){let oo=this.startParse(to,ro,no);for(;;){let io=oo.advance();if(io)return io}}}class StringInput{constructor(to){this.string=to}get length(){return this.string.length}chunk(to){return this.string.slice(to)}get lineChunks(){return!1}read(to,ro){return this.string.slice(to,ro)}}new NodeProp({perNode:!0});let nextTagID=0;class Tag{constructor(to,ro,no){this.set=to,this.base=ro,this.modified=no,this.id=nextTagID++}static define(to){if(to!=null&&to.base)throw new Error("Can not derive from a modified tag");let ro=new Tag([],null,[]);if(ro.set.push(ro),to)for(let no of to.set)ro.set.push(no);return ro}static defineModifier(){let to=new Modifier;return ro=>ro.modified.indexOf(to)>-1?ro:Modifier.get(ro.base||ro,ro.modified.concat(to).sort((no,oo)=>no.id-oo.id))}}let nextModifierID=0;class Modifier{constructor(){this.instances=[],this.id=nextModifierID++}static get(to,ro){if(!ro.length)return to;let no=ro[0].instances.find(ao=>ao.base==to&&sameArray(ro,ao.modified));if(no)return no;let oo=[],io=new Tag(oo,to,ro);for(let ao of ro)ao.instances.push(io);let so=powerSet(ro);for(let ao of to.set)if(!ao.modified.length)for(let lo of so)oo.push(Modifier.get(ao,lo));return io}}function sameArray(eo,to){return eo.length==to.length&&eo.every((ro,no)=>ro==to[no])}function powerSet(eo){let to=[[]];for(let ro=0;rono.length-ro.length)}function styleTags(eo){let to=Object.create(null);for(let ro in eo){let no=eo[ro];Array.isArray(no)||(no=[no]);for(let oo of ro.split(" "))if(oo){let io=[],so=2,ao=oo;for(let fo=0;;){if(ao=="..."&&fo>0&&fo+3==oo.length){so=1;break}let ho=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(ao);if(!ho)throw new RangeError("Invalid path: "+oo);if(io.push(ho[0]=="*"?"":ho[0][0]=='"'?JSON.parse(ho[0]):ho[0]),fo+=ho[0].length,fo==oo.length)break;let po=oo[fo++];if(fo==oo.length&&po=="!"){so=0;break}if(po!="/")throw new RangeError("Invalid path: "+oo);ao=oo.slice(fo)}let lo=io.length-1,co=io[lo];if(!co)throw new RangeError("Invalid path: "+oo);let uo=new Rule(no,so,lo>0?io.slice(0,lo):null);to[co]=uo.sort(to[co])}}return ruleNodeProp.add(to)}const ruleNodeProp=new NodeProp;class Rule{constructor(to,ro,no,oo){this.tags=to,this.mode=ro,this.context=no,this.next=oo}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(to){return!to||to.depth{let so=oo;for(let ao of io)for(let lo of ao.set){let co=ro[lo.id];if(co){so=so?so+" "+co:co;break}}return so},scope:no}}function highlightTags(eo,to){let ro=null;for(let no of eo){let oo=no.style(to);oo&&(ro=ro?ro+" "+oo:oo)}return ro}function highlightTree(eo,to,ro,no=0,oo=eo.length){let io=new HighlightBuilder(no,Array.isArray(to)?to:[to],ro);io.highlightRange(eo.cursor(),no,oo,"",io.highlighters),io.flush(oo)}class HighlightBuilder{constructor(to,ro,no){this.at=to,this.highlighters=ro,this.span=no,this.class=""}startSpan(to,ro){ro!=this.class&&(this.flush(to),to>this.at&&(this.at=to),this.class=ro)}flush(to){to>this.at&&this.class&&this.span(this.at,to,this.class)}highlightRange(to,ro,no,oo,io){let{type:so,from:ao,to:lo}=to;if(ao>=no||lo<=ro)return;so.isTop&&(io=this.highlighters.filter(po=>!po.scope||po.scope(so)));let co=oo,uo=getStyleTags(to)||Rule.empty,fo=highlightTags(io,uo.tags);if(fo&&(co&&(co+=" "),co+=fo,uo.mode==1&&(oo+=(oo?" ":"")+fo)),this.startSpan(Math.max(ro,ao),co),uo.opaque)return;let ho=to.tree&&to.tree.prop(NodeProp.mounted);if(ho&&ho.overlay){let po=to.node.enter(ho.overlay[0].from+ao,1),go=this.highlighters.filter(yo=>!yo.scope||yo.scope(ho.tree.type)),vo=to.firstChild();for(let yo=0,xo=ao;;yo++){let _o=yo=Eo||!to.nextSibling())););if(!_o||Eo>no)break;xo=_o.to+ao,xo>ro&&(this.highlightRange(po.cursor(),Math.max(ro,_o.from+ao),Math.min(no,xo),"",go),this.startSpan(Math.min(no,xo),co))}vo&&to.parent()}else if(to.firstChild()){ho&&(oo="");do if(!(to.to<=ro)){if(to.from>=no)break;this.highlightRange(to,ro,no,oo,io),this.startSpan(Math.min(no,to.to),co)}while(to.nextSibling());to.parent()}}}function getStyleTags(eo){let to=eo.type.prop(ruleNodeProp);for(;to&&to.context&&!eo.matchContext(to.context);)to=to.next;return to||null}const t=Tag.define,comment=t(),name=t(),typeName=t(name),propertyName=t(name),literal=t(),string=t(literal),number=t(literal),content=t(),heading=t(content),keyword=t(),operator=t(),punctuation=t(),bracket=t(punctuation),meta=t(),tags={comment,lineComment:t(comment),blockComment:t(comment),docComment:t(comment),name,variableName:t(name),typeName,tagName:t(typeName),propertyName,attributeName:t(propertyName),className:t(name),labelName:t(name),namespace:t(name),macroName:t(name),literal,string,docString:t(string),character:t(string),attributeValue:t(string),number,integer:t(number),float:t(number),bool:t(literal),regexp:t(literal),escape:t(literal),color:t(literal),url:t(literal),keyword,self:t(keyword),null:t(keyword),atom:t(keyword),unit:t(keyword),modifier:t(keyword),operatorKeyword:t(keyword),controlKeyword:t(keyword),definitionKeyword:t(keyword),moduleKeyword:t(keyword),operator,derefOperator:t(operator),arithmeticOperator:t(operator),logicOperator:t(operator),bitwiseOperator:t(operator),compareOperator:t(operator),updateOperator:t(operator),definitionOperator:t(operator),typeOperator:t(operator),controlOperator:t(operator),punctuation,separator:t(punctuation),bracket,angleBracket:t(bracket),squareBracket:t(bracket),paren:t(bracket),brace:t(bracket),content,heading,heading1:t(heading),heading2:t(heading),heading3:t(heading),heading4:t(heading),heading5:t(heading),heading6:t(heading),contentSeparator:t(content),list:t(content),quote:t(content),emphasis:t(content),strong:t(content),link:t(content),monospace:t(content),strikethrough:t(content),inserted:t(),deleted:t(),changed:t(),invalid:t(),meta,documentMeta:t(meta),annotation:t(meta),processingInstruction:t(meta),definition:Tag.defineModifier(),constant:Tag.defineModifier(),function:Tag.defineModifier(),standard:Tag.defineModifier(),local:Tag.defineModifier(),special:Tag.defineModifier()};tagHighlighter([{tag:tags.link,class:"tok-link"},{tag:tags.heading,class:"tok-heading"},{tag:tags.emphasis,class:"tok-emphasis"},{tag:tags.strong,class:"tok-strong"},{tag:tags.keyword,class:"tok-keyword"},{tag:tags.atom,class:"tok-atom"},{tag:tags.bool,class:"tok-bool"},{tag:tags.url,class:"tok-url"},{tag:tags.labelName,class:"tok-labelName"},{tag:tags.inserted,class:"tok-inserted"},{tag:tags.deleted,class:"tok-deleted"},{tag:tags.literal,class:"tok-literal"},{tag:tags.string,class:"tok-string"},{tag:tags.number,class:"tok-number"},{tag:[tags.regexp,tags.escape,tags.special(tags.string)],class:"tok-string2"},{tag:tags.variableName,class:"tok-variableName"},{tag:tags.local(tags.variableName),class:"tok-variableName tok-local"},{tag:tags.definition(tags.variableName),class:"tok-variableName tok-definition"},{tag:tags.special(tags.variableName),class:"tok-variableName2"},{tag:tags.definition(tags.propertyName),class:"tok-propertyName tok-definition"},{tag:tags.typeName,class:"tok-typeName"},{tag:tags.namespace,class:"tok-namespace"},{tag:tags.className,class:"tok-className"},{tag:tags.macroName,class:"tok-macroName"},{tag:tags.propertyName,class:"tok-propertyName"},{tag:tags.operator,class:"tok-operator"},{tag:tags.comment,class:"tok-comment"},{tag:tags.meta,class:"tok-meta"},{tag:tags.invalid,class:"tok-invalid"},{tag:tags.punctuation,class:"tok-punctuation"}]);var _a;const languageDataProp=new NodeProp;function defineLanguageFacet(eo){return Facet.define({combine:eo?to=>to.concat(eo):void 0})}const sublanguageProp=new NodeProp;class Language{constructor(to,ro,no=[],oo=""){this.data=to,this.name=oo,EditorState.prototype.hasOwnProperty("tree")||Object.defineProperty(EditorState.prototype,"tree",{get(){return syntaxTree(this)}}),this.parser=ro,this.extension=[language.of(this),EditorState.languageData.of((io,so,ao)=>{let lo=topNodeAt(io,so,ao),co=lo.type.prop(languageDataProp);if(!co)return[];let uo=io.facet(co),fo=lo.type.prop(sublanguageProp);if(fo){let ho=lo.resolve(so-lo.from,ao);for(let po of fo)if(po.test(ho,io)){let go=io.facet(po.facet);return po.type=="replace"?go:go.concat(uo)}}return uo})].concat(no)}isActiveAt(to,ro,no=-1){return topNodeAt(to,ro,no).type.prop(languageDataProp)==this.data}findRegions(to){let ro=to.facet(language);if((ro==null?void 0:ro.data)==this.data)return[{from:0,to:to.doc.length}];if(!ro||!ro.allowsNesting)return[];let no=[],oo=(io,so)=>{if(io.prop(languageDataProp)==this.data){no.push({from:so,to:so+io.length});return}let ao=io.prop(NodeProp.mounted);if(ao){if(ao.tree.prop(languageDataProp)==this.data){if(ao.overlay)for(let lo of ao.overlay)no.push({from:lo.from+so,to:lo.to+so});else no.push({from:so,to:so+io.length});return}else if(ao.overlay){let lo=no.length;if(oo(ao.tree,ao.overlay[0].from+so),no.length>lo)return}}for(let lo=0;lono.isTop?ro:void 0)]}),to.name)}configure(to,ro){return new LRLanguage(this.data,this.parser.configure(to),ro||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function syntaxTree(eo){let to=eo.field(Language.state,!1);return to?to.tree:Tree.empty}class DocInput{constructor(to){this.doc=to,this.cursorPos=0,this.string="",this.cursor=to.iter()}get length(){return this.doc.length}syncTo(to){return this.string=this.cursor.next(to-this.cursorPos).value,this.cursorPos=to+this.string.length,this.cursorPos-this.string.length}chunk(to){return this.syncTo(to),this.string}get lineChunks(){return!0}read(to,ro){let no=this.cursorPos-this.string.length;return to=this.cursorPos?this.doc.sliceString(to,ro):this.string.slice(to-no,ro-no)}}let currentContext=null;class ParseContext{constructor(to,ro,no=[],oo,io,so,ao,lo){this.parser=to,this.state=ro,this.fragments=no,this.tree=oo,this.treeLen=io,this.viewport=so,this.skipped=ao,this.scheduleOn=lo,this.parse=null,this.tempSkipped=[]}static create(to,ro,no){return new ParseContext(to,ro,[],Tree.empty,0,no,[],null)}startParse(){return this.parser.startParse(new DocInput(this.state.doc),this.fragments)}work(to,ro){return ro!=null&&ro>=this.state.doc.length&&(ro=void 0),this.tree!=Tree.empty&&this.isDone(ro??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var no;if(typeof to=="number"){let oo=Date.now()+to;to=()=>Date.now()>oo}for(this.parse||(this.parse=this.startParse()),ro!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>ro)&&ro=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>to)&&this.parse.stopAt(to),this.withContext(()=>{for(;!(ro=this.parse.advance()););}),this.treeLen=to,this.tree=ro,this.fragments=this.withoutTempSkipped(TreeFragment.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(to){let ro=currentContext;currentContext=this;try{return to()}finally{currentContext=ro}}withoutTempSkipped(to){for(let ro;ro=this.tempSkipped.pop();)to=cutFragments(to,ro.from,ro.to);return to}changes(to,ro){let{fragments:no,tree:oo,treeLen:io,viewport:so,skipped:ao}=this;if(this.takeTree(),!to.empty){let lo=[];if(to.iterChangedRanges((co,uo,fo,ho)=>lo.push({fromA:co,toA:uo,fromB:fo,toB:ho})),no=TreeFragment.applyChanges(no,lo),oo=Tree.empty,io=0,so={from:to.mapPos(so.from,-1),to:to.mapPos(so.to,1)},this.skipped.length){ao=[];for(let co of this.skipped){let uo=to.mapPos(co.from,1),fo=to.mapPos(co.to,-1);uoto.from&&(this.fragments=cutFragments(this.fragments,oo,io),this.skipped.splice(no--,1))}return this.skipped.length>=ro?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(to,ro){this.skipped.push({from:to,to:ro})}static getSkippingParser(to){return new class extends Parser{createParse(ro,no,oo){let io=oo[0].from,so=oo[oo.length-1].to;return{parsedPos:io,advance(){let lo=currentContext;if(lo){for(let co of oo)lo.tempSkipped.push(co);to&&(lo.scheduleOn=lo.scheduleOn?Promise.all([lo.scheduleOn,to]):to)}return this.parsedPos=so,new Tree(NodeType.none,[],[],so-io)},stoppedAt:null,stopAt(){}}}}}isDone(to){to=Math.min(to,this.state.doc.length);let ro=this.fragments;return this.treeLen>=to&&ro.length&&ro[0].from==0&&ro[0].to>=to}static get(){return currentContext}}function cutFragments(eo,to,ro){return TreeFragment.applyChanges(eo,[{fromA:to,toA:ro,fromB:to,toB:ro}])}class LanguageState{constructor(to){this.context=to,this.tree=to.tree}apply(to){if(!to.docChanged&&this.tree==this.context.tree)return this;let ro=this.context.changes(to.changes,to.state),no=this.context.treeLen==to.startState.doc.length?void 0:Math.max(to.changes.mapPos(this.context.treeLen),ro.viewport.to);return ro.work(20,no)||ro.takeTree(),new LanguageState(ro)}static init(to){let ro=Math.min(3e3,to.doc.length),no=ParseContext.create(to.facet(language).parser,to,{from:0,to:ro});return no.work(20,ro)||no.takeTree(),new LanguageState(no)}}Language.state=StateField.define({create:LanguageState.init,update(eo,to){for(let ro of to.effects)if(ro.is(Language.setState))return ro.value;return to.startState.facet(language)!=to.state.facet(language)?LanguageState.init(to.state):eo.apply(to)}});let requestIdle=eo=>{let to=setTimeout(()=>eo(),500);return()=>clearTimeout(to)};typeof requestIdleCallback<"u"&&(requestIdle=eo=>{let to=-1,ro=setTimeout(()=>{to=requestIdleCallback(eo,{timeout:400})},100);return()=>to<0?clearTimeout(ro):cancelIdleCallback(to)});const isInputPending=typeof navigator<"u"&&(!((_a=navigator.scheduling)===null||_a===void 0)&&_a.isInputPending)?()=>navigator.scheduling.isInputPending():null,parseWorker=ViewPlugin.fromClass(class{constructor(to){this.view=to,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(to){let ro=this.view.state.field(Language.state).context;(ro.updateViewport(to.view.viewport)||this.view.viewport.to>ro.treeLen)&&this.scheduleWork(),(to.docChanged||to.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(ro)}scheduleWork(){if(this.working)return;let{state:to}=this.view,ro=to.field(Language.state);(ro.tree!=ro.context.tree||!ro.context.isDone(to.doc.length))&&(this.working=requestIdle(this.work))}work(to){this.working=null;let ro=Date.now();if(this.chunkEndoo+1e3,lo=io.context.work(()=>isInputPending&&isInputPending()||Date.now()>so,oo+(ao?0:1e5));this.chunkBudget-=Date.now()-ro,(lo||this.chunkBudget<=0)&&(io.context.takeTree(),this.view.dispatch({effects:Language.setState.of(new LanguageState(io.context))})),this.chunkBudget>0&&!(lo&&!ao)&&this.scheduleWork(),this.checkAsyncSchedule(io.context)}checkAsyncSchedule(to){to.scheduleOn&&(this.workScheduled++,to.scheduleOn.then(()=>this.scheduleWork()).catch(ro=>logException(this.view.state,ro)).then(()=>this.workScheduled--),to.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),language=Facet.define({combine(eo){return eo.length?eo[0]:null},enables:eo=>[Language.state,parseWorker,EditorView.contentAttributes.compute([eo],to=>{let ro=to.facet(eo);return ro&&ro.name?{"data-language":ro.name}:{}})]});class LanguageSupport{constructor(to,ro=[]){this.language=to,this.support=ro,this.extension=[to,ro]}}const indentService=Facet.define(),indentUnit=Facet.define({combine:eo=>{if(!eo.length)return" ";let to=eo[0];if(!to||/\S/.test(to)||Array.from(to).some(ro=>ro!=to[0]))throw new Error("Invalid indent unit: "+JSON.stringify(eo[0]));return to}});function getIndentUnit(eo){let to=eo.facet(indentUnit);return to.charCodeAt(0)==9?eo.tabSize*to.length:to.length}function indentString(eo,to){let ro="",no=eo.tabSize,oo=eo.facet(indentUnit)[0];if(oo==" "){for(;to>=no;)ro+=" ",to-=no;oo=" "}for(let io=0;io=to?syntaxIndentation(eo,ro,to):null}class IndentContext{constructor(to,ro={}){this.state=to,this.options=ro,this.unit=getIndentUnit(to)}lineAt(to,ro=1){let no=this.state.doc.lineAt(to),{simulateBreak:oo,simulateDoubleBreak:io}=this.options;return oo!=null&&oo>=no.from&&oo<=no.to?io&&oo==to?{text:"",from:to}:(ro<0?oo-1&&(io+=so-this.countColumn(no,no.search(/\S|$/))),io}countColumn(to,ro=to.length){return countColumn(to,this.state.tabSize,ro)}lineIndent(to,ro=1){let{text:no,from:oo}=this.lineAt(to,ro),io=this.options.overrideIndentation;if(io){let so=io(oo);if(so>-1)return so}return this.countColumn(no,no.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const indentNodeProp=new NodeProp;function syntaxIndentation(eo,to,ro){let no=to.resolveStack(ro),oo=no.node.enterUnfinishedNodesBefore(ro);if(oo!=no.node){let io=[];for(let so=oo;so!=no.node;so=so.parent)io.push(so);for(let so=io.length-1;so>=0;so--)no={node:io[so],next:no}}return indentFor(no,eo,ro)}function indentFor(eo,to,ro){for(let no=eo;no;no=no.next){let oo=indentStrategy(no.node);if(oo)return oo(TreeIndentContext.create(to,ro,no))}return 0}function ignoreClosed(eo){return eo.pos==eo.options.simulateBreak&&eo.options.simulateDoubleBreak}function indentStrategy(eo){let to=eo.type.prop(indentNodeProp);if(to)return to;let ro=eo.firstChild,no;if(ro&&(no=ro.type.prop(NodeProp.closedBy))){let oo=eo.lastChild,io=oo&&no.indexOf(oo.name)>-1;return so=>delimitedStrategy(so,!0,1,void 0,io&&!ignoreClosed(so)?oo.from:void 0)}return eo.parent==null?topIndent$1:null}function topIndent$1(){return 0}class TreeIndentContext extends IndentContext{constructor(to,ro,no){super(to.state,to.options),this.base=to,this.pos=ro,this.context=no}get node(){return this.context.node}static create(to,ro,no){return new TreeIndentContext(to,ro,no)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(to){let ro=this.state.doc.lineAt(to.from);for(;;){let no=to.resolve(ro.from);for(;no.parent&&no.parent.from==no.from;)no=no.parent;if(isParent(no,to))break;ro=this.state.doc.lineAt(no.from)}return this.lineIndent(ro.from)}continue(){return indentFor(this.context.next,this.base,this.pos)}}function isParent(eo,to){for(let ro=to;ro;ro=ro.parent)if(eo==ro)return!0;return!1}function bracketedAligned(eo){let to=eo.node,ro=to.childAfter(to.from),no=to.lastChild;if(!ro)return null;let oo=eo.options.simulateBreak,io=eo.state.doc.lineAt(ro.from),so=oo==null||oo<=io.from?io.to:Math.min(io.to,oo);for(let ao=ro.to;;){let lo=to.childAfter(ao);if(!lo||lo==no)return null;if(!lo.type.isSkipped)return lo.fromdelimitedStrategy(no,to,ro,eo)}function delimitedStrategy(eo,to,ro,no,oo){let io=eo.textAfter,so=io.match(/^\s*/)[0].length,ao=no&&io.slice(so,so+no.length)==no||oo==eo.pos+so,lo=to?bracketedAligned(eo):null;return lo?ao?eo.column(lo.from):eo.column(lo.to):eo.baseIndent+(ao?0:eo.unit*ro)}const DontIndentBeyond=200;function indentOnInput(){return EditorState.transactionFilter.of(eo=>{if(!eo.docChanged||!eo.isUserEvent("input.type")&&!eo.isUserEvent("input.complete"))return eo;let to=eo.startState.languageDataAt("indentOnInput",eo.startState.selection.main.head);if(!to.length)return eo;let ro=eo.newDoc,{head:no}=eo.newSelection.main,oo=ro.lineAt(no);if(no>oo.from+DontIndentBeyond)return eo;let io=ro.sliceString(oo.from,no);if(!to.some(co=>co.test(io)))return eo;let{state:so}=eo,ao=-1,lo=[];for(let{head:co}of so.selection.ranges){let uo=so.doc.lineAt(co);if(uo.from==ao)continue;ao=uo.from;let fo=getIndentation(so,uo.from);if(fo==null)continue;let ho=/^\s*/.exec(uo.text)[0],po=indentString(so,fo);ho!=po&&lo.push({from:uo.from,to:uo.from+ho.length,insert:po})}return lo.length?[eo,{changes:lo,sequential:!0}]:eo})}const foldService=Facet.define(),foldNodeProp=new NodeProp;function foldInside(eo){let to=eo.firstChild,ro=eo.lastChild;return to&&to.toro)continue;if(io&&ao.from=to&&co.to>ro&&(io=co)}}return io}function isUnfinished(eo){let to=eo.lastChild;return to&&to.to==eo.to&&to.type.isError}function foldable(eo,to,ro){for(let no of eo.facet(foldService)){let oo=no(eo,to,ro);if(oo)return oo}return syntaxFolding(eo,to,ro)}function mapRange(eo,to){let ro=to.mapPos(eo.from,1),no=to.mapPos(eo.to,-1);return ro>=no?void 0:{from:ro,to:no}}const foldEffect=StateEffect.define({map:mapRange}),unfoldEffect=StateEffect.define({map:mapRange});function selectedLines(eo){let to=[];for(let{head:ro}of eo.state.selection.ranges)to.some(no=>no.from<=ro&&no.to>=ro)||to.push(eo.lineBlockAt(ro));return to}const foldState=StateField.define({create(){return Decoration.none},update(eo,to){eo=eo.map(to.changes);for(let ro of to.effects)if(ro.is(foldEffect)&&!foldExists(eo,ro.value.from,ro.value.to)){let{preparePlaceholder:no}=to.state.facet(foldConfig),oo=no?Decoration.replace({widget:new PreparedFoldWidget(no(to.state,ro.value))}):foldWidget;eo=eo.update({add:[oo.range(ro.value.from,ro.value.to)]})}else ro.is(unfoldEffect)&&(eo=eo.update({filter:(no,oo)=>ro.value.from!=no||ro.value.to!=oo,filterFrom:ro.value.from,filterTo:ro.value.to}));if(to.selection){let ro=!1,{head:no}=to.selection.main;eo.between(no,no,(oo,io)=>{oono&&(ro=!0)}),ro&&(eo=eo.update({filterFrom:no,filterTo:no,filter:(oo,io)=>io<=no||oo>=no}))}return eo},provide:eo=>EditorView.decorations.from(eo),toJSON(eo,to){let ro=[];return eo.between(0,to.doc.length,(no,oo)=>{ro.push(no,oo)}),ro},fromJSON(eo){if(!Array.isArray(eo)||eo.length%2)throw new RangeError("Invalid JSON for fold state");let to=[];for(let ro=0;ro{(!oo||oo.from>io)&&(oo={from:io,to:so})}),oo}function foldExists(eo,to,ro){let no=!1;return eo.between(to,to,(oo,io)=>{oo==to&&io==ro&&(no=!0)}),no}function maybeEnable(eo,to){return eo.field(foldState,!1)?to:to.concat(StateEffect.appendConfig.of(codeFolding()))}const foldCode=eo=>{for(let to of selectedLines(eo)){let ro=foldable(eo.state,to.from,to.to);if(ro)return eo.dispatch({effects:maybeEnable(eo.state,[foldEffect.of(ro),announceFold(eo,ro)])}),!0}return!1},unfoldCode=eo=>{if(!eo.state.field(foldState,!1))return!1;let to=[];for(let ro of selectedLines(eo)){let no=findFold(eo.state,ro.from,ro.to);no&&to.push(unfoldEffect.of(no),announceFold(eo,no,!1))}return to.length&&eo.dispatch({effects:to}),to.length>0};function announceFold(eo,to,ro=!0){let no=eo.state.doc.lineAt(to.from).number,oo=eo.state.doc.lineAt(to.to).number;return EditorView.announce.of(`${eo.state.phrase(ro?"Folded lines":"Unfolded lines")} ${no} ${eo.state.phrase("to")} ${oo}.`)}const foldAll=eo=>{let{state:to}=eo,ro=[];for(let no=0;no{let to=eo.state.field(foldState,!1);if(!to||!to.size)return!1;let ro=[];return to.between(0,eo.state.doc.length,(no,oo)=>{ro.push(unfoldEffect.of({from:no,to:oo}))}),eo.dispatch({effects:ro}),!0},foldKeymap=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:foldCode},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:unfoldCode},{key:"Ctrl-Alt-[",run:foldAll},{key:"Ctrl-Alt-]",run:unfoldAll}],defaultConfig={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},foldConfig=Facet.define({combine(eo){return combineConfig(eo,defaultConfig)}});function codeFolding(eo){let to=[foldState,baseTheme$1$1];return eo&&to.push(foldConfig.of(eo)),to}function widgetToDOM(eo,to){let{state:ro}=eo,no=ro.facet(foldConfig),oo=so=>{let ao=eo.lineBlockAt(eo.posAtDOM(so.target)),lo=findFold(eo.state,ao.from,ao.to);lo&&eo.dispatch({effects:unfoldEffect.of(lo)}),so.preventDefault()};if(no.placeholderDOM)return no.placeholderDOM(eo,oo,to);let io=document.createElement("span");return io.textContent=no.placeholderText,io.setAttribute("aria-label",ro.phrase("folded code")),io.title=ro.phrase("unfold"),io.className="cm-foldPlaceholder",io.onclick=oo,io}const foldWidget=Decoration.replace({widget:new class extends WidgetType{toDOM(eo){return widgetToDOM(eo,null)}}});class PreparedFoldWidget extends WidgetType{constructor(to){super(),this.value=to}eq(to){return this.value==to.value}toDOM(to){return widgetToDOM(to,this.value)}}const foldGutterDefaults={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class FoldMarker extends GutterMarker{constructor(to,ro){super(),this.config=to,this.open=ro}eq(to){return this.config==to.config&&this.open==to.open}toDOM(to){if(this.config.markerDOM)return this.config.markerDOM(this.open);let ro=document.createElement("span");return ro.textContent=this.open?this.config.openText:this.config.closedText,ro.title=to.state.phrase(this.open?"Fold line":"Unfold line"),ro}}function foldGutter(eo={}){let to=Object.assign(Object.assign({},foldGutterDefaults),eo),ro=new FoldMarker(to,!0),no=new FoldMarker(to,!1),oo=ViewPlugin.fromClass(class{constructor(so){this.from=so.viewport.from,this.markers=this.buildMarkers(so)}update(so){(so.docChanged||so.viewportChanged||so.startState.facet(language)!=so.state.facet(language)||so.startState.field(foldState,!1)!=so.state.field(foldState,!1)||syntaxTree(so.startState)!=syntaxTree(so.state)||to.foldingChanged(so))&&(this.markers=this.buildMarkers(so.view))}buildMarkers(so){let ao=new RangeSetBuilder;for(let lo of so.viewportLineBlocks){let co=findFold(so.state,lo.from,lo.to)?no:foldable(so.state,lo.from,lo.to)?ro:null;co&&ao.add(lo.from,lo.from,co)}return ao.finish()}}),{domEventHandlers:io}=to;return[oo,gutter({class:"cm-foldGutter",markers(so){var ao;return((ao=so.plugin(oo))===null||ao===void 0?void 0:ao.markers)||RangeSet.empty},initialSpacer(){return new FoldMarker(to,!1)},domEventHandlers:Object.assign(Object.assign({},io),{click:(so,ao,lo)=>{if(io.click&&io.click(so,ao,lo))return!0;let co=findFold(so.state,ao.from,ao.to);if(co)return so.dispatch({effects:unfoldEffect.of(co)}),!0;let uo=foldable(so.state,ao.from,ao.to);return uo?(so.dispatch({effects:foldEffect.of(uo)}),!0):!1}})}),codeFolding()]}const baseTheme$1$1=EditorView.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 HighlightStyle{constructor(to,ro){this.specs=to;let no;function oo(ao){let lo=StyleModule.newName();return(no||(no=Object.create(null)))["."+lo]=ao,lo}const io=typeof ro.all=="string"?ro.all:ro.all?oo(ro.all):void 0,so=ro.scope;this.scope=so instanceof Language?ao=>ao.prop(languageDataProp)==so.data:so?ao=>ao==so:void 0,this.style=tagHighlighter(to.map(ao=>({tag:ao.tag,class:ao.class||oo(Object.assign({},ao,{tag:null}))})),{all:io}).style,this.module=no?new StyleModule(no):null,this.themeType=ro.themeType}static define(to,ro){return new HighlightStyle(to,ro||{})}}const highlighterFacet=Facet.define(),fallbackHighlighter=Facet.define({combine(eo){return eo.length?[eo[0]]:null}});function getHighlighters(eo){let to=eo.facet(highlighterFacet);return to.length?to:eo.facet(fallbackHighlighter)}function syntaxHighlighting(eo,to){let ro=[treeHighlighter],no;return eo instanceof HighlightStyle&&(eo.module&&ro.push(EditorView.styleModule.of(eo.module)),no=eo.themeType),to!=null&&to.fallback?ro.push(fallbackHighlighter.of(eo)):no?ro.push(highlighterFacet.computeN([EditorView.darkTheme],oo=>oo.facet(EditorView.darkTheme)==(no=="dark")?[eo]:[])):ro.push(highlighterFacet.of(eo)),ro}class TreeHighlighter{constructor(to){this.markCache=Object.create(null),this.tree=syntaxTree(to.state),this.decorations=this.buildDeco(to,getHighlighters(to.state)),this.decoratedTo=to.viewport.to}update(to){let ro=syntaxTree(to.state),no=getHighlighters(to.state),oo=no!=getHighlighters(to.startState),{viewport:io}=to.view,so=to.changes.mapPos(this.decoratedTo,1);ro.length=io.to?(this.decorations=this.decorations.map(to.changes),this.decoratedTo=so):(ro!=this.tree||to.viewportChanged||oo)&&(this.tree=ro,this.decorations=this.buildDeco(to.view,no),this.decoratedTo=io.to)}buildDeco(to,ro){if(!ro||!this.tree.length)return Decoration.none;let no=new RangeSetBuilder;for(let{from:oo,to:io}of to.visibleRanges)highlightTree(this.tree,ro,(so,ao,lo)=>{no.add(so,ao,this.markCache[lo]||(this.markCache[lo]=Decoration.mark({class:lo})))},oo,io);return no.finish()}}const treeHighlighter=Prec.high(ViewPlugin.fromClass(TreeHighlighter,{decorations:eo=>eo.decorations})),defaultHighlightStyle=HighlightStyle.define([{tag:tags.meta,color:"#404740"},{tag:tags.link,textDecoration:"underline"},{tag:tags.heading,textDecoration:"underline",fontWeight:"bold"},{tag:tags.emphasis,fontStyle:"italic"},{tag:tags.strong,fontWeight:"bold"},{tag:tags.strikethrough,textDecoration:"line-through"},{tag:tags.keyword,color:"#708"},{tag:[tags.atom,tags.bool,tags.url,tags.contentSeparator,tags.labelName],color:"#219"},{tag:[tags.literal,tags.inserted],color:"#164"},{tag:[tags.string,tags.deleted],color:"#a11"},{tag:[tags.regexp,tags.escape,tags.special(tags.string)],color:"#e40"},{tag:tags.definition(tags.variableName),color:"#00f"},{tag:tags.local(tags.variableName),color:"#30a"},{tag:[tags.typeName,tags.namespace],color:"#085"},{tag:tags.className,color:"#167"},{tag:[tags.special(tags.variableName),tags.macroName],color:"#256"},{tag:tags.definition(tags.propertyName),color:"#00c"},{tag:tags.comment,color:"#940"},{tag:tags.invalid,color:"#f00"}]),baseTheme$4=EditorView.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),DefaultScanDist=1e4,DefaultBrackets="()[]{}",bracketMatchingConfig=Facet.define({combine(eo){return combineConfig(eo,{afterCursor:!0,brackets:DefaultBrackets,maxScanDistance:DefaultScanDist,renderMatch:defaultRenderMatch})}}),matchingMark=Decoration.mark({class:"cm-matchingBracket"}),nonmatchingMark=Decoration.mark({class:"cm-nonmatchingBracket"});function defaultRenderMatch(eo){let to=[],ro=eo.matched?matchingMark:nonmatchingMark;return to.push(ro.range(eo.start.from,eo.start.to)),eo.end&&to.push(ro.range(eo.end.from,eo.end.to)),to}const bracketMatchingState=StateField.define({create(){return Decoration.none},update(eo,to){if(!to.docChanged&&!to.selection)return eo;let ro=[],no=to.state.facet(bracketMatchingConfig);for(let oo of to.state.selection.ranges){if(!oo.empty)continue;let io=matchBrackets(to.state,oo.head,-1,no)||oo.head>0&&matchBrackets(to.state,oo.head-1,1,no)||no.afterCursor&&(matchBrackets(to.state,oo.head,1,no)||oo.headEditorView.decorations.from(eo)}),bracketMatchingUnique=[bracketMatchingState,baseTheme$4];function bracketMatching(eo={}){return[bracketMatchingConfig.of(eo),bracketMatchingUnique]}const bracketMatchingHandle=new NodeProp;function matchingNodes(eo,to,ro){let no=eo.prop(to<0?NodeProp.openedBy:NodeProp.closedBy);if(no)return no;if(eo.name.length==1){let oo=ro.indexOf(eo.name);if(oo>-1&&oo%2==(to<0?1:0))return[ro[oo+to]]}return null}function findHandle(eo){let to=eo.type.prop(bracketMatchingHandle);return to?to(eo.node):eo}function matchBrackets(eo,to,ro,no={}){let oo=no.maxScanDistance||DefaultScanDist,io=no.brackets||DefaultBrackets,so=syntaxTree(eo),ao=so.resolveInner(to,ro);for(let lo=ao;lo;lo=lo.parent){let co=matchingNodes(lo.type,ro,io);if(co&&lo.from0?to>=uo.from&&touo.from&&to<=uo.to))return matchMarkedBrackets(eo,to,ro,lo,uo,co,io)}}return matchPlainBrackets(eo,to,ro,so,ao.type,oo,io)}function matchMarkedBrackets(eo,to,ro,no,oo,io,so){let ao=no.parent,lo={from:oo.from,to:oo.to},co=0,uo=ao==null?void 0:ao.cursor();if(uo&&(ro<0?uo.childBefore(no.from):uo.childAfter(no.to)))do if(ro<0?uo.to<=no.from:uo.from>=no.to){if(co==0&&io.indexOf(uo.type.name)>-1&&uo.from0)return null;let co={from:ro<0?to-1:to,to:ro>0?to+1:to},uo=eo.doc.iterRange(to,ro>0?eo.doc.length:0),fo=0;for(let ho=0;!uo.next().done&&ho<=io;){let po=uo.value;ro<0&&(ho+=po.length);let go=to+ho*ro;for(let vo=ro>0?0:po.length-1,yo=ro>0?po.length:-1;vo!=yo;vo+=ro){let xo=so.indexOf(po[vo]);if(!(xo<0||no.resolveInner(go+vo,1).type!=oo))if(xo%2==0==ro>0)fo++;else{if(fo==1)return{start:co,end:{from:go+vo,to:go+vo+1},matched:xo>>1==lo>>1};fo--}}ro>0&&(ho+=po.length)}return uo.done?{start:co,matched:!1}:null}const noTokens=Object.create(null),typeArray=[NodeType.none],warned=[],byTag=Object.create(null),defaultTable=Object.create(null);for(let[eo,to]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"]])defaultTable[eo]=createTokenType(noTokens,to);function warnForPart(eo,to){warned.indexOf(eo)>-1||(warned.push(eo),console.warn(to))}function createTokenType(eo,to){let ro=[];for(let ao of to.split(" ")){let lo=[];for(let co of ao.split(".")){let uo=eo[co]||tags[co];uo?typeof uo=="function"?lo.length?lo=lo.map(uo):warnForPart(co,`Modifier ${co} used at start of tag`):lo.length?warnForPart(co,`Tag ${co} used as modifier`):lo=Array.isArray(uo)?uo:[uo]:warnForPart(co,`Unknown highlighting tag ${co}`)}for(let co of lo)ro.push(co)}if(!ro.length)return 0;let no=to.replace(/ /g,"_"),oo=no+" "+ro.map(ao=>ao.id),io=byTag[oo];if(io)return io.id;let so=byTag[oo]=NodeType.define({id:typeArray.length,name:no,props:[styleTags({[no]:ro})]});return typeArray.push(so),so.id}Direction.RTL,Direction.LTR;class CompletionContext{constructor(to,ro,no){this.state=to,this.pos=ro,this.explicit=no,this.abortListeners=[]}tokenBefore(to){let ro=syntaxTree(this.state).resolveInner(this.pos,-1);for(;ro&&to.indexOf(ro.name)<0;)ro=ro.parent;return ro?{from:ro.from,to:this.pos,text:this.state.sliceDoc(ro.from,this.pos),type:ro.type}:null}matchBefore(to){let ro=this.state.doc.lineAt(this.pos),no=Math.max(ro.from,this.pos-250),oo=ro.text.slice(no-ro.from,this.pos-ro.from),io=oo.search(ensureAnchor(to,!1));return io<0?null:{from:no+io,to:this.pos,text:oo.slice(io)}}get aborted(){return this.abortListeners==null}addEventListener(to,ro){to=="abort"&&this.abortListeners&&this.abortListeners.push(ro)}}function toSet(eo){let to=Object.keys(eo).join(""),ro=/\w/.test(to);return ro&&(to=to.replace(/\w/g,"")),`[${ro?"\\w":""}${to.replace(/[^\w\s]/g,"\\$&")}]`}function prefixMatch(eo){let to=Object.create(null),ro=Object.create(null);for(let{label:oo}of eo){to[oo[0]]=!0;for(let io=1;iotypeof oo=="string"?{label:oo}:oo),[ro,no]=to.every(oo=>/^\w+$/.test(oo.label))?[/\w*$/,/\w+$/]:prefixMatch(to);return oo=>{let io=oo.matchBefore(no);return io||oo.explicit?{from:io?io.from:oo.pos,options:to,validFor:ro}:null}}function ifNotIn(eo,to){return ro=>{for(let no=syntaxTree(ro.state).resolveInner(ro.pos,-1);no;no=no.parent){if(eo.indexOf(no.name)>-1)return null;if(no.type.isTop)break}return to(ro)}}let Option$1=class{constructor(to,ro,no,oo){this.completion=to,this.source=ro,this.match=no,this.score=oo}};function cur(eo){return eo.selection.main.from}function ensureAnchor(eo,to){var ro;let{source:no}=eo,oo=to&&no[0]!="^",io=no[no.length-1]!="$";return!oo&&!io?eo:new RegExp(`${oo?"^":""}(?:${no})${io?"$":""}`,(ro=eo.flags)!==null&&ro!==void 0?ro:eo.ignoreCase?"i":"")}const pickedCompletion=Annotation.define();function insertCompletionText(eo,to,ro,no){let{main:oo}=eo.selection,io=ro-oo.from,so=no-oo.from;return Object.assign(Object.assign({},eo.changeByRange(ao=>ao!=oo&&ro!=no&&eo.sliceDoc(ao.from+io,ao.from+so)!=eo.sliceDoc(ro,no)?{range:ao}:{changes:{from:ao.from+io,to:no==oo.from?ao.to:ao.from+so,insert:to},range:EditorSelection.cursor(ao.from+io+to.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const SourceCache=new WeakMap;function asSource(eo){if(!Array.isArray(eo))return eo;let to=SourceCache.get(eo);return to||SourceCache.set(eo,to=completeFromList(eo)),to}const startCompletionEffect=StateEffect.define(),closeCompletionEffect=StateEffect.define();class FuzzyMatcher{constructor(to){this.pattern=to,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let ro=0;ro=48&&ko<=57||ko>=97&&ko<=122?2:ko>=65&&ko<=90?1:0:(Ao=fromCodePoint(ko))!=Ao.toLowerCase()?1:Ao!=Ao.toUpperCase()?2:0;(!_o||Co==1&&yo||So==0&&Co!=0)&&(ro[fo]==ko||no[fo]==ko&&(ho=!0)?so[fo++]=_o:so.length&&(xo=!1)),So=Co,_o+=codePointSize(ko)}return fo==lo&&so[0]==0&&xo?this.result(-100+(ho?-200:0),so,to):po==lo&&go==0?this.ret(-200-to.length+(vo==to.length?0:-100),[0,vo]):ao>-1?this.ret(-700-to.length,[ao,ao+this.pattern.length]):po==lo?this.ret(-900-to.length,[go,vo]):fo==lo?this.result(-100+(ho?-200:0)+-700+(xo?0:-1100),so,to):ro.length==2?null:this.result((oo[0]?-700:0)+-200+-1100,oo,to)}result(to,ro,no){let oo=[],io=0;for(let so of ro){let ao=so+(this.astral?codePointSize(codePointAt(no,so)):1);io&&oo[io-1]==so?oo[io-1]=ao:(oo[io++]=so,oo[io++]=ao)}return this.ret(to-no.length,oo)}}class StrictMatcher{constructor(to){this.pattern=to,this.matched=[],this.score=0,this.folded=to.toLowerCase()}match(to){if(to.length"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:defaultPositionInfo,filterStrict:!1,compareCompletions:(to,ro)=>to.label.localeCompare(ro.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(to,ro)=>to&&ro,closeOnBlur:(to,ro)=>to&&ro,icons:(to,ro)=>to&&ro,tooltipClass:(to,ro)=>no=>joinClass(to(no),ro(no)),optionClass:(to,ro)=>no=>joinClass(to(no),ro(no)),addToOptions:(to,ro)=>to.concat(ro),filterStrict:(to,ro)=>to||ro})}});function joinClass(eo,to){return eo?to?eo+" "+to:eo:to}function defaultPositionInfo(eo,to,ro,no,oo,io){let so=eo.textDirection==Direction.RTL,ao=so,lo=!1,co="top",uo,fo,ho=to.left-oo.left,po=oo.right-to.right,go=no.right-no.left,vo=no.bottom-no.top;if(ao&&ho=vo||_o>to.top?uo=ro.bottom-to.top:(co="bottom",uo=to.bottom-ro.top)}let yo=(to.bottom-to.top)/io.offsetHeight,xo=(to.right-to.left)/io.offsetWidth;return{style:`${co}: ${uo/yo}px; max-width: ${fo/xo}px`,class:"cm-completionInfo-"+(lo?so?"left-narrow":"right-narrow":ao?"left":"right")}}function optionContent(eo){let to=eo.addToOptions.slice();return eo.icons&&to.push({render(ro){let no=document.createElement("div");return no.classList.add("cm-completionIcon"),ro.type&&no.classList.add(...ro.type.split(/\s+/g).map(oo=>"cm-completionIcon-"+oo)),no.setAttribute("aria-hidden","true"),no},position:20}),to.push({render(ro,no,oo,io){let so=document.createElement("span");so.className="cm-completionLabel";let ao=ro.displayLabel||ro.label,lo=0;for(let co=0;colo&&so.appendChild(document.createTextNode(ao.slice(lo,uo)));let ho=so.appendChild(document.createElement("span"));ho.appendChild(document.createTextNode(ao.slice(uo,fo))),ho.className="cm-completionMatchedText",lo=fo}return loro.position-no.position).map(ro=>ro.render)}function rangeAroundSelected(eo,to,ro){if(eo<=ro)return{from:0,to:eo};if(to<0&&(to=0),to<=eo>>1){let oo=Math.floor(to/ro);return{from:oo*ro,to:(oo+1)*ro}}let no=Math.floor((eo-to)/ro);return{from:eo-(no+1)*ro,to:eo-no*ro}}class CompletionTooltip{constructor(to,ro,no){this.view=to,this.stateField=ro,this.applyCompletion=no,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:lo=>this.placeInfo(lo),key:this},this.space=null,this.currentClass="";let oo=to.state.field(ro),{options:io,selected:so}=oo.open,ao=to.state.facet(completionConfig);this.optionContent=optionContent(ao),this.optionClass=ao.optionClass,this.tooltipClass=ao.tooltipClass,this.range=rangeAroundSelected(io.length,so,ao.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(to.state),this.dom.addEventListener("mousedown",lo=>{let{options:co}=to.state.field(ro).open;for(let uo=lo.target,fo;uo&&uo!=this.dom;uo=uo.parentNode)if(uo.nodeName=="LI"&&(fo=/-(\d+)$/.exec(uo.id))&&+fo[1]{let co=to.state.field(this.stateField,!1);co&&co.tooltip&&to.state.facet(completionConfig).closeOnBlur&&lo.relatedTarget!=to.contentDOM&&to.dispatch({effects:closeCompletionEffect.of(null)})}),this.showOptions(io,oo.id)}mount(){this.updateSel()}showOptions(to,ro){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(to,ro,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(to){var ro;let no=to.state.field(this.stateField),oo=to.startState.field(this.stateField);if(this.updateTooltipClass(to.state),no!=oo){let{options:io,selected:so,disabled:ao}=no.open;(!oo.open||oo.open.options!=io)&&(this.range=rangeAroundSelected(io.length,so,to.state.facet(completionConfig).maxRenderedOptions),this.showOptions(io,no.id)),this.updateSel(),ao!=((ro=oo.open)===null||ro===void 0?void 0:ro.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!ao)}}updateTooltipClass(to){let ro=this.tooltipClass(to);if(ro!=this.currentClass){for(let no of this.currentClass.split(" "))no&&this.dom.classList.remove(no);for(let no of ro.split(" "))no&&this.dom.classList.add(no);this.currentClass=ro}}positioned(to){this.space=to,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let to=this.view.state.field(this.stateField),ro=to.open;if((ro.selected>-1&&ro.selected=this.range.to)&&(this.range=rangeAroundSelected(ro.options.length,ro.selected,this.view.state.facet(completionConfig).maxRenderedOptions),this.showOptions(ro.options,to.id)),this.updateSelectedOption(ro.selected)){this.destroyInfo();let{completion:no}=ro.options[ro.selected],{info:oo}=no;if(!oo)return;let io=typeof oo=="string"?document.createTextNode(oo):oo(no);if(!io)return;"then"in io?io.then(so=>{so&&this.view.state.field(this.stateField,!1)==to&&this.addInfoPane(so,no)}).catch(so=>logException(this.view.state,so,"completion info")):this.addInfoPane(io,no)}}addInfoPane(to,ro){this.destroyInfo();let no=this.info=document.createElement("div");if(no.className="cm-tooltip cm-completionInfo",to.nodeType!=null)no.appendChild(to),this.infoDestroy=null;else{let{dom:oo,destroy:io}=to;no.appendChild(oo),this.infoDestroy=io||null}this.dom.appendChild(no),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(to){let ro=null;for(let no=this.list.firstChild,oo=this.range.from;no;no=no.nextSibling,oo++)no.nodeName!="LI"||!no.id?oo--:oo==to?no.hasAttribute("aria-selected")||(no.setAttribute("aria-selected","true"),ro=no):no.hasAttribute("aria-selected")&&no.removeAttribute("aria-selected");return ro&&scrollIntoView(this.list,ro),ro}measureInfo(){let to=this.dom.querySelector("[aria-selected]");if(!to||!this.info)return null;let ro=this.dom.getBoundingClientRect(),no=this.info.getBoundingClientRect(),oo=to.getBoundingClientRect(),io=this.space;if(!io){let so=this.dom.ownerDocument.defaultView||window;io={left:0,top:0,right:so.innerWidth,bottom:so.innerHeight}}return oo.top>Math.min(io.bottom,ro.bottom)-10||oo.bottomno.from||no.from==0))if(io=ho,typeof co!="string"&&co.header)oo.appendChild(co.header(co));else{let po=oo.appendChild(document.createElement("completion-section"));po.textContent=ho}}const uo=oo.appendChild(document.createElement("li"));uo.id=ro+"-"+so,uo.setAttribute("role","option");let fo=this.optionClass(ao);fo&&(uo.className=fo);for(let ho of this.optionContent){let po=ho(ao,this.view.state,this.view,lo);po&&uo.appendChild(po)}}return no.from&&oo.classList.add("cm-completionListIncompleteTop"),no.tonew CompletionTooltip(ro,eo,to)}function scrollIntoView(eo,to){let ro=eo.getBoundingClientRect(),no=to.getBoundingClientRect(),oo=ro.height/eo.offsetHeight;no.topro.bottom&&(eo.scrollTop+=(no.bottom-ro.bottom)/oo)}function score(eo){return(eo.boost||0)*100+(eo.apply?10:0)+(eo.info?5:0)+(eo.type?1:0)}function sortOptions(eo,to){let ro=[],no=null,oo=co=>{ro.push(co);let{section:uo}=co.completion;if(uo){no||(no=[]);let fo=typeof uo=="string"?uo:uo.name;no.some(ho=>ho.name==fo)||no.push(typeof uo=="string"?{name:fo}:uo)}},io=to.facet(completionConfig);for(let co of eo)if(co.hasResult()){let uo=co.result.getMatch;if(co.result.filter===!1)for(let fo of co.result.options)oo(new Option$1(fo,co.source,uo?uo(fo):[],1e9-ro.length));else{let fo=to.sliceDoc(co.from,co.to),ho,po=io.filterStrict?new StrictMatcher(fo):new FuzzyMatcher(fo);for(let go of co.result.options)if(ho=po.match(go.label)){let vo=go.displayLabel?uo?uo(go,ho.matched):[]:ho.matched;oo(new Option$1(go,co.source,vo,ho.score+(go.boost||0)))}}}if(no){let co=Object.create(null),uo=0,fo=(ho,po)=>{var go,vo;return((go=ho.rank)!==null&&go!==void 0?go:1e9)-((vo=po.rank)!==null&&vo!==void 0?vo:1e9)||(ho.namefo.score-uo.score||lo(uo.completion,fo.completion))){let uo=co.completion;!ao||ao.label!=uo.label||ao.detail!=uo.detail||ao.type!=null&&uo.type!=null&&ao.type!=uo.type||ao.apply!=uo.apply||ao.boost!=uo.boost?so.push(co):score(co.completion)>score(ao)&&(so[so.length-1]=co),ao=co.completion}return so}class CompletionDialog{constructor(to,ro,no,oo,io,so){this.options=to,this.attrs=ro,this.tooltip=no,this.timestamp=oo,this.selected=io,this.disabled=so}setSelected(to,ro){return to==this.selected||to>=this.options.length?this:new CompletionDialog(this.options,makeAttrs(ro,to),this.tooltip,this.timestamp,to,this.disabled)}static build(to,ro,no,oo,io){let so=sortOptions(to,ro);if(!so.length)return oo&&to.some(lo=>lo.state==1)?new CompletionDialog(oo.options,oo.attrs,oo.tooltip,oo.timestamp,oo.selected,!0):null;let ao=ro.facet(completionConfig).selectOnOpen?0:-1;if(oo&&oo.selected!=ao&&oo.selected!=-1){let lo=oo.options[oo.selected].completion;for(let co=0;coco.hasResult()?Math.min(lo,co.from):lo,1e8),create:createTooltip,above:io.aboveCursor},oo?oo.timestamp:Date.now(),ao,!1)}map(to){return new CompletionDialog(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:to.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class CompletionState{constructor(to,ro,no){this.active=to,this.id=ro,this.open=no}static start(){return new CompletionState(none$1,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(to){let{state:ro}=to,no=ro.facet(completionConfig),io=(no.override||ro.languageDataAt("autocomplete",cur(ro)).map(asSource)).map(ao=>(this.active.find(co=>co.source==ao)||new ActiveSource(ao,this.active.some(co=>co.state!=0)?1:0)).update(to,no));io.length==this.active.length&&io.every((ao,lo)=>ao==this.active[lo])&&(io=this.active);let so=this.open;so&&to.docChanged&&(so=so.map(to.changes)),to.selection||io.some(ao=>ao.hasResult()&&to.changes.touchesRange(ao.from,ao.to))||!sameResults(io,this.active)?so=CompletionDialog.build(io,ro,this.id,so,no):so&&so.disabled&&!io.some(ao=>ao.state==1)&&(so=null),!so&&io.every(ao=>ao.state!=1)&&io.some(ao=>ao.hasResult())&&(io=io.map(ao=>ao.hasResult()?new ActiveSource(ao.source,0):ao));for(let ao of to.effects)ao.is(setSelectedEffect)&&(so=so&&so.setSelected(ao.value,this.id));return io==this.active&&so==this.open?this:new CompletionState(io,this.id,so)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:baseAttrs}}function sameResults(eo,to){if(eo==to)return!0;for(let ro=0,no=0;;){for(;ro-1&&(ro["aria-activedescendant"]=eo+"-"+to),ro}const none$1=[];function getUserEvent(eo){return eo.isUserEvent("input.type")?"input":eo.isUserEvent("delete.backward")?"delete":null}class ActiveSource{constructor(to,ro,no=-1){this.source=to,this.state=ro,this.explicitPos=no}hasResult(){return!1}update(to,ro){let no=getUserEvent(to),oo=this;no?oo=oo.handleUserEvent(to,no,ro):to.docChanged?oo=oo.handleChange(to):to.selection&&oo.state!=0&&(oo=new ActiveSource(oo.source,0));for(let io of to.effects)if(io.is(startCompletionEffect))oo=new ActiveSource(oo.source,1,io.value?cur(to.state):-1);else if(io.is(closeCompletionEffect))oo=new ActiveSource(oo.source,0);else if(io.is(setActiveEffect))for(let so of io.value)so.source==oo.source&&(oo=so);return oo}handleUserEvent(to,ro,no){return ro=="delete"||!no.activateOnTyping?this.map(to.changes):new ActiveSource(this.source,1)}handleChange(to){return to.changes.touchesRange(cur(to.startState))?new ActiveSource(this.source,0):this.map(to.changes)}map(to){return to.empty||this.explicitPos<0?this:new ActiveSource(this.source,this.state,to.mapPos(this.explicitPos))}}class ActiveResult extends ActiveSource{constructor(to,ro,no,oo,io){super(to,2,ro),this.result=no,this.from=oo,this.to=io}hasResult(){return!0}handleUserEvent(to,ro,no){var oo;let io=this.result;io.map&&!to.changes.empty&&(io=io.map(io,to.changes));let so=to.changes.mapPos(this.from),ao=to.changes.mapPos(this.to,1),lo=cur(to.state);if((this.explicitPos<0?lo<=so:loao||!io||ro=="delete"&&cur(to.startState)==this.from)return new ActiveSource(this.source,ro=="input"&&no.activateOnTyping?1:0);let co=this.explicitPos<0?-1:to.changes.mapPos(this.explicitPos);return checkValid(io.validFor,to.state,so,ao)?new ActiveResult(this.source,co,io,so,ao):io.update&&(io=io.update(io,so,ao,new CompletionContext(to.state,lo,co>=0)))?new ActiveResult(this.source,co,io,io.from,(oo=io.to)!==null&&oo!==void 0?oo:cur(to.state)):new ActiveSource(this.source,1,co)}handleChange(to){return to.changes.touchesRange(this.from,this.to)?new ActiveSource(this.source,0):this.map(to.changes)}map(to){return to.empty?this:(this.result.map?this.result.map(this.result,to):this.result)?new ActiveResult(this.source,this.explicitPos<0?-1:to.mapPos(this.explicitPos),this.result,to.mapPos(this.from),to.mapPos(this.to,1)):new ActiveSource(this.source,0)}}function checkValid(eo,to,ro,no){if(!eo)return!1;let oo=to.sliceDoc(ro,no);return typeof eo=="function"?eo(oo,ro,no,to):ensureAnchor(eo,!0).test(oo)}const setActiveEffect=StateEffect.define({map(eo,to){return eo.map(ro=>ro.map(to))}}),setSelectedEffect=StateEffect.define(),completionState=StateField.define({create(){return CompletionState.start()},update(eo,to){return eo.update(to)},provide:eo=>[showTooltip.from(eo,to=>to.tooltip),EditorView.contentAttributes.from(eo,to=>to.attrs)]});function applyCompletion(eo,to){const ro=to.completion.apply||to.completion.label;let no=eo.state.field(completionState).active.find(oo=>oo.source==to.source);return no instanceof ActiveResult?(typeof ro=="string"?eo.dispatch(Object.assign(Object.assign({},insertCompletionText(eo.state,ro,no.from,no.to)),{annotations:pickedCompletion.of(to.completion)})):ro(eo,to.completion,no.from,no.to),!0):!1}const createTooltip=completionTooltip(completionState,applyCompletion);function moveCompletionSelection(eo,to="option"){return ro=>{let no=ro.state.field(completionState,!1);if(!no||!no.open||no.open.disabled||Date.now()-no.open.timestamp-1?no.open.selected+oo*(eo?1:-1):eo?0:so-1;return ao<0?ao=to=="page"?0:so-1:ao>=so&&(ao=to=="page"?so-1:0),ro.dispatch({effects:setSelectedEffect.of(ao)}),!0}}const acceptCompletion=eo=>{let to=eo.state.field(completionState,!1);return eo.state.readOnly||!to||!to.open||to.open.selected<0||to.open.disabled||Date.now()-to.open.timestampeo.state.field(completionState,!1)?(eo.dispatch({effects:startCompletionEffect.of(!0)}),!0):!1,closeCompletion=eo=>{let to=eo.state.field(completionState,!1);return!to||!to.active.some(ro=>ro.state!=0)?!1:(eo.dispatch({effects:closeCompletionEffect.of(null)}),!0)};class RunningQuery{constructor(to,ro){this.active=to,this.context=ro,this.time=Date.now(),this.updates=[],this.done=void 0}}const MaxUpdateCount=50,MinAbortTime=1e3,completionPlugin=ViewPlugin.fromClass(class{constructor(eo){this.view=eo,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let to of eo.state.field(completionState).active)to.state==1&&this.startQuery(to)}update(eo){let to=eo.state.field(completionState);if(!eo.selectionSet&&!eo.docChanged&&eo.startState.field(completionState)==to)return;let ro=eo.transactions.some(oo=>(oo.selection||oo.docChanged)&&!getUserEvent(oo));for(let oo=0;ooMaxUpdateCount&&Date.now()-io.time>MinAbortTime){for(let so of io.context.abortListeners)try{so()}catch(ao){logException(this.view.state,ao)}io.context.abortListeners=null,this.running.splice(oo--,1)}else io.updates.push(...eo.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),eo.transactions.some(oo=>oo.effects.some(io=>io.is(startCompletionEffect)))&&(this.pendingStart=!0);let no=this.pendingStart?50:eo.state.facet(completionConfig).activateOnTypingDelay;if(this.debounceUpdate=to.active.some(oo=>oo.state==1&&!this.running.some(io=>io.active.source==oo.source))?setTimeout(()=>this.startUpdate(),no):-1,this.composing!=0)for(let oo of eo.transactions)getUserEvent(oo)=="input"?this.composing=2:this.composing==2&&oo.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:eo}=this.view,to=eo.field(completionState);for(let ro of to.active)ro.state==1&&!this.running.some(no=>no.active.source==ro.source)&&this.startQuery(ro)}startQuery(eo){let{state:to}=this.view,ro=cur(to),no=new CompletionContext(to,ro,eo.explicitPos==ro),oo=new RunningQuery(eo,no);this.running.push(oo),Promise.resolve(eo.source(no)).then(io=>{oo.context.aborted||(oo.done=io||null,this.scheduleAccept())},io=>{this.view.dispatch({effects:closeCompletionEffect.of(null)}),logException(this.view.state,io)})}scheduleAccept(){this.running.every(eo=>eo.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(completionConfig).updateSyncTime))}accept(){var eo;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let to=[],ro=this.view.state.facet(completionConfig);for(let no=0;noso.source==oo.active.source);if(io&&io.state==1)if(oo.done==null){let so=new ActiveSource(oo.active.source,0);for(let ao of oo.updates)so=so.update(ao,ro);so.state!=1&&to.push(so)}else this.startQuery(io)}to.length&&this.view.dispatch({effects:setActiveEffect.of(to)})}},{eventHandlers:{blur(eo){let to=this.view.state.field(completionState,!1);if(to&&to.tooltip&&this.view.state.facet(completionConfig).closeOnBlur){let ro=to.open&&getTooltip(this.view,to.open.tooltip);(!ro||!ro.dom.contains(eo.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:closeCompletionEffect.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:startCompletionEffect.of(!1)}),20),this.composing=0}}}),windows=typeof navigator=="object"&&/Win/.test(navigator.platform),commitCharacters=Prec.highest(EditorView.domEventHandlers({keydown(eo,to){let ro=to.state.field(completionState,!1);if(!ro||!ro.open||ro.open.disabled||ro.open.selected<0||eo.key.length>1||eo.ctrlKey&&!(windows&&eo.altKey)||eo.metaKey)return!1;let no=ro.open.options[ro.open.selected],oo=ro.active.find(so=>so.source==no.source),io=no.completion.commitCharacters||oo.result.commitCharacters;return io&&io.indexOf(eo.key)>-1&&applyCompletion(to,no),!1}})),baseTheme$3=EditorView.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"},".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 FieldPos{constructor(to,ro,no,oo){this.field=to,this.line=ro,this.from=no,this.to=oo}}class FieldRange{constructor(to,ro,no){this.field=to,this.from=ro,this.to=no}map(to){let ro=to.mapPos(this.from,-1,MapMode.TrackDel),no=to.mapPos(this.to,1,MapMode.TrackDel);return ro==null||no==null?null:new FieldRange(this.field,ro,no)}}class Snippet{constructor(to,ro){this.lines=to,this.fieldPositions=ro}instantiate(to,ro){let no=[],oo=[ro],io=to.doc.lineAt(ro),so=/^\s*/.exec(io.text)[0];for(let lo of this.lines){if(no.length){let co=so,uo=/^\t*/.exec(lo)[0].length;for(let fo=0;fonew FieldRange(lo.field,oo[lo.line]+lo.from,oo[lo.line]+lo.to));return{text:no,ranges:ao}}static parse(to){let ro=[],no=[],oo=[],io;for(let so of to.split(/\r\n?|\n/)){for(;io=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(so);){let ao=io[1]?+io[1]:null,lo=io[2]||io[3]||"",co=-1;for(let uo=0;uo=co&&fo.field++}oo.push(new FieldPos(co,no.length,io.index,io.index+lo.length)),so=so.slice(0,io.index)+lo+so.slice(io.index+io[0].length)}for(let ao;ao=/\\([{}])/.exec(so);){so=so.slice(0,ao.index)+ao[1]+so.slice(ao.index+ao[0].length);for(let lo of oo)lo.line==no.length&&lo.from>ao.index&&(lo.from--,lo.to--)}no.push(so)}return new Snippet(no,oo)}}let fieldMarker=Decoration.widget({widget:new class extends WidgetType{toDOM(){let eo=document.createElement("span");return eo.className="cm-snippetFieldPosition",eo}ignoreEvent(){return!1}}}),fieldRange=Decoration.mark({class:"cm-snippetField"});class ActiveSnippet{constructor(to,ro){this.ranges=to,this.active=ro,this.deco=Decoration.set(to.map(no=>(no.from==no.to?fieldMarker:fieldRange).range(no.from,no.to)))}map(to){let ro=[];for(let no of this.ranges){let oo=no.map(to);if(!oo)return null;ro.push(oo)}return new ActiveSnippet(ro,this.active)}selectionInsideField(to){return to.ranges.every(ro=>this.ranges.some(no=>no.field==this.active&&no.from<=ro.from&&no.to>=ro.to))}}const setActive=StateEffect.define({map(eo,to){return eo&&eo.map(to)}}),moveToField=StateEffect.define(),snippetState=StateField.define({create(){return null},update(eo,to){for(let ro of to.effects){if(ro.is(setActive))return ro.value;if(ro.is(moveToField)&&eo)return new ActiveSnippet(eo.ranges,ro.value)}return eo&&to.docChanged&&(eo=eo.map(to.changes)),eo&&to.selection&&!eo.selectionInsideField(to.selection)&&(eo=null),eo},provide:eo=>EditorView.decorations.from(eo,to=>to?to.deco:Decoration.none)});function fieldSelection(eo,to){return EditorSelection.create(eo.filter(ro=>ro.field==to).map(ro=>EditorSelection.range(ro.from,ro.to)))}function snippet(eo){let to=Snippet.parse(eo);return(ro,no,oo,io)=>{let{text:so,ranges:ao}=to.instantiate(ro.state,oo),lo={changes:{from:oo,to:io,insert:Text$1.of(so)},scrollIntoView:!0,annotations:no?[pickedCompletion.of(no),Transaction.userEvent.of("input.complete")]:void 0};if(ao.length&&(lo.selection=fieldSelection(ao,0)),ao.some(co=>co.field>0)){let co=new ActiveSnippet(ao,0),uo=lo.effects=[setActive.of(co)];ro.state.field(snippetState,!1)===void 0&&uo.push(StateEffect.appendConfig.of([snippetState,addSnippetKeymap,snippetPointerHandler,baseTheme$3]))}ro.dispatch(ro.state.update(lo))}}function moveField(eo){return({state:to,dispatch:ro})=>{let no=to.field(snippetState,!1);if(!no||eo<0&&no.active==0)return!1;let oo=no.active+eo,io=eo>0&&!no.ranges.some(so=>so.field==oo+eo);return ro(to.update({selection:fieldSelection(no.ranges,oo),effects:setActive.of(io?null:new ActiveSnippet(no.ranges,oo)),scrollIntoView:!0})),!0}}const clearSnippet=({state:eo,dispatch:to})=>eo.field(snippetState,!1)?(to(eo.update({effects:setActive.of(null)})),!0):!1,nextSnippetField=moveField(1),prevSnippetField=moveField(-1),defaultSnippetKeymap=[{key:"Tab",run:nextSnippetField,shift:prevSnippetField},{key:"Escape",run:clearSnippet}],snippetKeymap=Facet.define({combine(eo){return eo.length?eo[0]:defaultSnippetKeymap}}),addSnippetKeymap=Prec.highest(keymap.compute([snippetKeymap],eo=>eo.facet(snippetKeymap)));function snippetCompletion(eo,to){return Object.assign(Object.assign({},to),{apply:snippet(eo)})}const snippetPointerHandler=EditorView.domEventHandlers({mousedown(eo,to){let ro=to.state.field(snippetState,!1),no;if(!ro||(no=to.posAtCoords({x:eo.clientX,y:eo.clientY}))==null)return!1;let oo=ro.ranges.find(io=>io.from<=no&&io.to>=no);return!oo||oo.field==ro.active?!1:(to.dispatch({selection:fieldSelection(ro.ranges,oo.field),effects:setActive.of(ro.ranges.some(io=>io.field>oo.field)?new ActiveSnippet(ro.ranges,oo.field):null),scrollIntoView:!0}),!0)}}),defaults={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},closeBracketEffect=StateEffect.define({map(eo,to){let ro=to.mapPos(eo,-1,MapMode.TrackAfter);return ro??void 0}}),closedBracket=new class extends RangeValue{};closedBracket.startSide=1;closedBracket.endSide=-1;const bracketState=StateField.define({create(){return RangeSet.empty},update(eo,to){if(eo=eo.map(to.changes),to.selection){let ro=to.state.doc.lineAt(to.selection.main.head);eo=eo.update({filter:no=>no>=ro.from&&no<=ro.to})}for(let ro of to.effects)ro.is(closeBracketEffect)&&(eo=eo.update({add:[closedBracket.range(ro.value,ro.value+1)]}));return eo}});function closeBrackets(){return[inputHandler,bracketState]}const definedClosing="()[]{}<>";function closing(eo){for(let to=0;to{if((android?eo.composing:eo.compositionStarted)||eo.state.readOnly)return!1;let oo=eo.state.selection.main;if(no.length>2||no.length==2&&codePointSize(codePointAt(no,0))==1||to!=oo.from||ro!=oo.to)return!1;let io=insertBracket(eo.state,no);return io?(eo.dispatch(io),!0):!1}),deleteBracketPair=({state:eo,dispatch:to})=>{if(eo.readOnly)return!1;let no=config(eo,eo.selection.main.head).brackets||defaults.brackets,oo=null,io=eo.changeByRange(so=>{if(so.empty){let ao=prevChar(eo.doc,so.head);for(let lo of no)if(lo==ao&&nextChar(eo.doc,so.head)==closing(codePointAt(lo,0)))return{changes:{from:so.head-lo.length,to:so.head+lo.length},range:EditorSelection.cursor(so.head-lo.length)}}return{range:oo=so}});return oo||to(eo.update(io,{scrollIntoView:!0,userEvent:"delete.backward"})),!oo},closeBracketsKeymap=[{key:"Backspace",run:deleteBracketPair}];function insertBracket(eo,to){let ro=config(eo,eo.selection.main.head),no=ro.brackets||defaults.brackets;for(let oo of no){let io=closing(codePointAt(oo,0));if(to==oo)return io==oo?handleSame(eo,oo,no.indexOf(oo+oo+oo)>-1,ro):handleOpen(eo,oo,io,ro.before||defaults.before);if(to==io&&closedBracketAt(eo,eo.selection.main.from))return handleClose(eo,oo,io)}return null}function closedBracketAt(eo,to){let ro=!1;return eo.field(bracketState).between(0,eo.doc.length,no=>{no==to&&(ro=!0)}),ro}function nextChar(eo,to){let ro=eo.sliceString(to,to+2);return ro.slice(0,codePointSize(codePointAt(ro,0)))}function prevChar(eo,to){let ro=eo.sliceString(to-2,to);return codePointSize(codePointAt(ro,0))==ro.length?ro:ro.slice(1)}function handleOpen(eo,to,ro,no){let oo=null,io=eo.changeByRange(so=>{if(!so.empty)return{changes:[{insert:to,from:so.from},{insert:ro,from:so.to}],effects:closeBracketEffect.of(so.to+to.length),range:EditorSelection.range(so.anchor+to.length,so.head+to.length)};let ao=nextChar(eo.doc,so.head);return!ao||/\s/.test(ao)||no.indexOf(ao)>-1?{changes:{insert:to+ro,from:so.head},effects:closeBracketEffect.of(so.head+to.length),range:EditorSelection.cursor(so.head+to.length)}:{range:oo=so}});return oo?null:eo.update(io,{scrollIntoView:!0,userEvent:"input.type"})}function handleClose(eo,to,ro){let no=null,oo=eo.changeByRange(io=>io.empty&&nextChar(eo.doc,io.head)==ro?{changes:{from:io.head,to:io.head+ro.length,insert:ro},range:EditorSelection.cursor(io.head+ro.length)}:no={range:io});return no?null:eo.update(oo,{scrollIntoView:!0,userEvent:"input.type"})}function handleSame(eo,to,ro,no){let oo=no.stringPrefixes||defaults.stringPrefixes,io=null,so=eo.changeByRange(ao=>{if(!ao.empty)return{changes:[{insert:to,from:ao.from},{insert:to,from:ao.to}],effects:closeBracketEffect.of(ao.to+to.length),range:EditorSelection.range(ao.anchor+to.length,ao.head+to.length)};let lo=ao.head,co=nextChar(eo.doc,lo),uo;if(co==to){if(nodeStart(eo,lo))return{changes:{insert:to+to,from:lo},effects:closeBracketEffect.of(lo+to.length),range:EditorSelection.cursor(lo+to.length)};if(closedBracketAt(eo,lo)){let ho=ro&&eo.sliceDoc(lo,lo+to.length*3)==to+to+to?to+to+to:to;return{changes:{from:lo,to:lo+ho.length,insert:ho},range:EditorSelection.cursor(lo+ho.length)}}}else{if(ro&&eo.sliceDoc(lo-2*to.length,lo)==to+to&&(uo=canStartStringAt(eo,lo-2*to.length,oo))>-1&&nodeStart(eo,uo))return{changes:{insert:to+to+to+to,from:lo},effects:closeBracketEffect.of(lo+to.length),range:EditorSelection.cursor(lo+to.length)};if(eo.charCategorizer(lo)(co)!=CharCategory.Word&&canStartStringAt(eo,lo,oo)>-1&&!probablyInString(eo,lo,to,oo))return{changes:{insert:to+to,from:lo},effects:closeBracketEffect.of(lo+to.length),range:EditorSelection.cursor(lo+to.length)}}return{range:io=ao}});return io?null:eo.update(so,{scrollIntoView:!0,userEvent:"input.type"})}function nodeStart(eo,to){let ro=syntaxTree(eo).resolveInner(to+1);return ro.parent&&ro.from==to}function probablyInString(eo,to,ro,no){let oo=syntaxTree(eo).resolveInner(to,-1),io=no.reduce((so,ao)=>Math.max(so,ao.length),0);for(let so=0;so<5;so++){let ao=eo.sliceDoc(oo.from,Math.min(oo.to,oo.from+ro.length+io)),lo=ao.indexOf(ro);if(!lo||lo>-1&&no.indexOf(ao.slice(0,lo))>-1){let uo=oo.firstChild;for(;uo&&uo.from==oo.from&&uo.to-uo.from>ro.length+lo;){if(eo.sliceDoc(uo.to-ro.length,uo.to)==ro)return!1;uo=uo.firstChild}return!0}let co=oo.to==to&&oo.parent;if(!co)break;oo=co}return!1}function canStartStringAt(eo,to,ro){let no=eo.charCategorizer(to);if(no(eo.sliceDoc(to-1,to))!=CharCategory.Word)return to;for(let oo of ro){let io=to-oo.length;if(eo.sliceDoc(io,to)==oo&&no(eo.sliceDoc(io-1,io))!=CharCategory.Word)return io}return-1}function autocompletion(eo={}){return[commitCharacters,completionState,completionConfig.of(eo),completionPlugin,completionKeymapExt,baseTheme$3]}const completionKeymap=[{key:"Ctrl-Space",run:startCompletion},{key:"Escape",run:closeCompletion},{key:"ArrowDown",run:moveCompletionSelection(!0)},{key:"ArrowUp",run:moveCompletionSelection(!1)},{key:"PageDown",run:moveCompletionSelection(!0,"page")},{key:"PageUp",run:moveCompletionSelection(!1,"page")},{key:"Enter",run:acceptCompletion}],completionKeymapExt=Prec.highest(keymap.computeN([completionConfig],eo=>eo.facet(completionConfig).defaultKeymap?[completionKeymap]:[]));var define_process_env_default={};class Stack{constructor(to,ro,no,oo,io,so,ao,lo,co,uo=0,fo){this.p=to,this.stack=ro,this.state=no,this.reducePos=oo,this.pos=io,this.score=so,this.buffer=ao,this.bufferBase=lo,this.curContext=co,this.lookAhead=uo,this.parent=fo}toString(){return`[${this.stack.filter((to,ro)=>ro%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(to,ro,no=0){let oo=to.parser.context;return new Stack(to,[],ro,no,no,0,[],0,oo?new StackContext(oo,oo.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(to,ro){this.stack.push(this.state,ro,this.bufferBase+this.buffer.length),this.state=to}reduce(to){var ro;let no=to>>19,oo=to&65535,{parser:io}=this.p,so=io.dynamicPrecedence(oo);if(so&&(this.score+=so),no==0){this.pushState(io.getGoto(this.state,oo,!0),this.reducePos),oo=2e3&&!(!((ro=this.p.parser.nodeSet.types[oo])===null||ro===void 0)&&ro.isAnonymous)&&(lo==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=co):this.p.lastBigReductionSizeao;)this.stack.pop();this.reduceContext(oo,lo)}storeNode(to,ro,no,oo=4,io=!1){if(to==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&so.buffer[ao-4]==0&&so.buffer[ao-1]>-1){if(ro==no)return;if(so.buffer[ao-2]>=ro){so.buffer[ao-2]=no;return}}}if(!io||this.pos==no)this.buffer.push(to,ro,no,oo);else{let so=this.buffer.length;if(so>0&&this.buffer[so-4]!=0)for(;so>0&&this.buffer[so-2]>no;)this.buffer[so]=this.buffer[so-4],this.buffer[so+1]=this.buffer[so-3],this.buffer[so+2]=this.buffer[so-2],this.buffer[so+3]=this.buffer[so-1],so-=4,oo>4&&(oo-=4);this.buffer[so]=to,this.buffer[so+1]=ro,this.buffer[so+2]=no,this.buffer[so+3]=oo}}shift(to,ro,no,oo){if(to&131072)this.pushState(to&65535,this.pos);else if(to&262144)this.pos=oo,this.shiftContext(ro,no),ro<=this.p.parser.maxNode&&this.buffer.push(ro,no,oo,4);else{let io=to,{parser:so}=this.p;(oo>this.pos||ro<=so.maxNode)&&(this.pos=oo,so.stateFlag(io,1)||(this.reducePos=oo)),this.pushState(io,no),this.shiftContext(ro,no),ro<=so.maxNode&&this.buffer.push(ro,no,oo,4)}}apply(to,ro,no,oo){to&65536?this.reduce(to):this.shift(to,ro,no,oo)}useNode(to,ro){let no=this.p.reused.length-1;(no<0||this.p.reused[no]!=to)&&(this.p.reused.push(to),no++);let oo=this.pos;this.reducePos=this.pos=oo+to.length,this.pushState(ro,oo),this.buffer.push(no,oo,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,to,this,this.p.stream.reset(this.pos-to.length)))}split(){let to=this,ro=to.buffer.length;for(;ro>0&&to.buffer[ro-2]>to.reducePos;)ro-=4;let no=to.buffer.slice(ro),oo=to.bufferBase+ro;for(;to&&oo==to.bufferBase;)to=to.parent;return new Stack(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,no,oo,this.curContext,this.lookAhead,to)}recoverByDelete(to,ro){let no=to<=this.p.parser.maxNode;no&&this.storeNode(to,this.pos,ro,4),this.storeNode(0,this.pos,ro,no?8:4),this.pos=this.reducePos=ro,this.score-=190}canShift(to){for(let ro=new SimulatedStack(this);;){let no=this.p.parser.stateSlot(ro.state,4)||this.p.parser.hasAction(ro.state,to);if(no==0)return!1;if(!(no&65536))return!0;ro.reduce(no)}}recoverByInsert(to){if(this.stack.length>=300)return[];let ro=this.p.parser.nextStates(this.state);if(ro.length>8||this.stack.length>=120){let oo=[];for(let io=0,so;iolo&1&&ao==so)||oo.push(ro[io],so)}ro=oo}let no=[];for(let oo=0;oo>19,oo=ro&65535,io=this.stack.length-no*3;if(io<0||to.getGoto(this.stack[io],oo,!1)<0){let so=this.findForcedReduction();if(so==null)return!1;ro=so}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(ro),!0}findForcedReduction(){let{parser:to}=this.p,ro=[],no=(oo,io)=>{if(!ro.includes(oo))return ro.push(oo),to.allActions(oo,so=>{if(!(so&393216))if(so&65536){let ao=(so>>19)-io;if(ao>1){let lo=so&65535,co=this.stack.length-ao*3;if(co>=0&&to.getGoto(this.stack[co],lo,!1)>=0)return ao<<19|65536|lo}}else{let ao=no(so,io+1);if(ao!=null)return ao}})};return no(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(this.stack.length!=3)return!1;let{parser:to}=this.p;return to.data[to.stateSlot(this.state,1)]==65535&&!to.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(to){if(this.state!=to.state||this.stack.length!=to.stack.length)return!1;for(let ro=0;rothis.lookAhead&&(this.emitLookAhead(),this.lookAhead=to)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class StackContext{constructor(to,ro){this.tracker=to,this.context=ro,this.hash=to.strict?to.hash(ro):0}}class SimulatedStack{constructor(to){this.start=to,this.state=to.state,this.stack=to.stack,this.base=this.stack.length}reduce(to){let ro=to&65535,no=to>>19;no==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(no-1)*3;let oo=this.start.p.parser.getGoto(this.stack[this.base-3],ro,!0);this.state=oo}}class StackBufferCursor{constructor(to,ro,no){this.stack=to,this.pos=ro,this.index=no,this.buffer=to.buffer,this.index==0&&this.maybeNext()}static create(to,ro=to.bufferBase+to.buffer.length){return new StackBufferCursor(to,ro,ro-to.bufferBase)}maybeNext(){let to=this.stack.parent;to!=null&&(this.index=this.stack.bufferBase-to.bufferBase,this.stack=to,this.buffer=to.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,this.index==0&&this.maybeNext()}fork(){return new StackBufferCursor(this.stack,this.pos,this.index)}}function decodeArray(eo,to=Uint16Array){if(typeof eo!="string")return eo;let ro=null;for(let no=0,oo=0;no=92&&so--,so>=34&&so--;let lo=so-32;if(lo>=46&&(lo-=46,ao=!0),io+=lo,ao)break;io*=46}ro?ro[oo++]=io:ro=new to(io)}return ro}class CachedToken{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const nullToken=new CachedToken;class InputStream{constructor(to,ro){this.input=to,this.ranges=ro,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=nullToken,this.rangeIndex=0,this.pos=this.chunkPos=ro[0].from,this.range=ro[0],this.end=ro[ro.length-1].to,this.readNext()}resolveOffset(to,ro){let no=this.range,oo=this.rangeIndex,io=this.pos+to;for(;iono.to:io>=no.to;){if(oo==this.ranges.length-1)return null;let so=this.ranges[++oo];io+=so.from-no.to,no=so}return io}clipPos(to){if(to>=this.range.from&&toto)return Math.max(to,ro.from);return this.end}peek(to){let ro=this.chunkOff+to,no,oo;if(ro>=0&&ro=this.chunk2Pos&&noao.to&&(this.chunk2=this.chunk2.slice(0,ao.to-no)),oo=this.chunk2.charCodeAt(0)}}return no>=this.token.lookAhead&&(this.token.lookAhead=no+1),oo}acceptToken(to,ro=0){let no=ro?this.resolveOffset(ro,-1):this.pos;if(no==null||no=this.chunk2Pos&&this.posthis.range.to?to.slice(0,this.range.to-this.pos):to,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(to=1){for(this.chunkOff+=to;this.pos+to>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();to-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=to,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(to,ro){if(ro?(this.token=ro,ro.start=to,ro.lookAhead=to+1,ro.value=ro.extended=-1):this.token=nullToken,this.pos!=to){if(this.pos=to,to==this.end)return this.setDone(),this;for(;to=this.range.to;)this.range=this.ranges[++this.rangeIndex];to>=this.chunkPos&&to=this.chunkPos&&ro<=this.chunkPos+this.chunk.length)return this.chunk.slice(to-this.chunkPos,ro-this.chunkPos);if(to>=this.chunk2Pos&&ro<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(to-this.chunk2Pos,ro-this.chunk2Pos);if(to>=this.range.from&&ro<=this.range.to)return this.input.read(to,ro);let no="";for(let oo of this.ranges){if(oo.from>=ro)break;oo.to>to&&(no+=this.input.read(Math.max(oo.from,to),Math.min(oo.to,ro)))}return no}}class TokenGroup{constructor(to,ro){this.data=to,this.id=ro}token(to,ro){let{parser:no}=ro.p;readToken(this.data,to,ro,this.id,no.data,no.tokenPrecTable)}}TokenGroup.prototype.contextual=TokenGroup.prototype.fallback=TokenGroup.prototype.extend=!1;TokenGroup.prototype.fallback=TokenGroup.prototype.extend=!1;class ExternalTokenizer{constructor(to,ro={}){this.token=to,this.contextual=!!ro.contextual,this.fallback=!!ro.fallback,this.extend=!!ro.extend}}function readToken(eo,to,ro,no,oo,io){let so=0,ao=1<0){let go=eo[po];if(lo.allows(go)&&(to.token.value==-1||to.token.value==go||overrides(go,to.token.value,oo,io))){to.acceptToken(go);break}}let uo=to.next,fo=0,ho=eo[so+2];if(to.next<0&&ho>fo&&eo[co+ho*3-3]==65535){so=eo[co+ho*3-1];continue e}for(;fo>1,go=co+po+(po<<1),vo=eo[go],yo=eo[go+1]||65536;if(uo=yo)fo=po+1;else{so=eo[go+2],to.advance();continue e}}break}}function findOffset(eo,to,ro){for(let no=to,oo;(oo=eo[no])!=65535;no++)if(oo==ro)return no-to;return-1}function overrides(eo,to,ro,no){let oo=findOffset(ro,no,to);return oo<0||findOffset(ro,no,eo)to)&&!no.type.isError)return ro<0?Math.max(0,Math.min(no.to-1,to-25)):Math.min(eo.length,Math.max(no.from+1,to+25));if(ro<0?no.prevSibling():no.nextSibling())break;if(!no.parent())return ro<0?0:eo.length}}class FragmentCursor{constructor(to,ro){this.fragments=to,this.nodeSet=ro,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let to=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(to){for(this.safeFrom=to.openStart?cutAt(to.tree,to.from+to.offset,1)-to.offset:to.from,this.safeTo=to.openEnd?cutAt(to.tree,to.to+to.offset,-1)-to.offset:to.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(to.tree),this.start.push(-to.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(to){if(toto)return this.nextStart=so,null;if(io instanceof Tree){if(so==to){if(so=Math.max(this.safeFrom,to)&&(this.trees.push(io),this.start.push(so),this.index.push(0))}else this.index[ro]++,this.nextStart=so+io.length}}}class TokenCache{constructor(to,ro){this.stream=ro,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=to.tokenizers.map(no=>new CachedToken)}getActions(to){let ro=0,no=null,{parser:oo}=to.p,{tokenizers:io}=oo,so=oo.stateSlot(to.state,3),ao=to.curContext?to.curContext.hash:0,lo=0;for(let co=0;cofo.end+25&&(lo=Math.max(fo.lookAhead,lo)),fo.value!=0)){let ho=ro;if(fo.extended>-1&&(ro=this.addActions(to,fo.extended,fo.end,ro)),ro=this.addActions(to,fo.value,fo.end,ro),!uo.extend&&(no=fo,ro>ho))break}}for(;this.actions.length>ro;)this.actions.pop();return lo&&to.setLookAhead(lo),!no&&to.pos==this.stream.end&&(no=new CachedToken,no.value=to.p.parser.eofTerm,no.start=no.end=to.pos,ro=this.addActions(to,no.value,no.end,ro)),this.mainToken=no,this.actions}getMainToken(to){if(this.mainToken)return this.mainToken;let ro=new CachedToken,{pos:no,p:oo}=to;return ro.start=no,ro.end=Math.min(no+1,oo.stream.end),ro.value=no==oo.stream.end?oo.parser.eofTerm:0,ro}updateCachedToken(to,ro,no){let oo=this.stream.clipPos(no.pos);if(ro.token(this.stream.reset(oo,to),no),to.value>-1){let{parser:io}=no.p;for(let so=0;so=0&&no.p.parser.dialect.allows(ao>>1)){ao&1?to.extended=ao>>1:to.value=ao>>1;break}}}else to.value=0,to.end=this.stream.clipPos(oo+1)}putAction(to,ro,no,oo){for(let io=0;ioto.bufferLength*4?new FragmentCursor(no,to.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let to=this.stacks,ro=this.minStackPos,no=this.stacks=[],oo,io;if(this.bigReductionCount>300&&to.length==1){let[so]=to;for(;so.forceReduce()&&so.stack.length&&so.stack[so.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let so=0;soro)no.push(ao);else{if(this.advanceStack(ao,no,to))continue;{oo||(oo=[],io=[]),oo.push(ao);let lo=this.tokens.getMainToken(ao);io.push(lo.value,lo.end)}}break}}if(!no.length){let so=oo&&findFinished(oo);if(so)return verbose&&console.log("Finish with "+this.stackID(so)),this.stackToTree(so);if(this.parser.strict)throw verbose&&oo&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+ro);this.recovering||(this.recovering=5)}if(this.recovering&&oo){let so=this.stoppedAt!=null&&oo[0].pos>this.stoppedAt?oo[0]:this.runRecovery(oo,io,no);if(so)return verbose&&console.log("Force-finish "+this.stackID(so)),this.stackToTree(so.forceAll())}if(this.recovering){let so=this.recovering==1?1:this.recovering*3;if(no.length>so)for(no.sort((ao,lo)=>lo.score-ao.score);no.length>so;)no.pop();no.some(ao=>ao.reducePos>ro)&&this.recovering--}else if(no.length>1){e:for(let so=0;so500&&co.buffer.length>500)if((ao.score-co.score||ao.buffer.length-co.buffer.length)>0)no.splice(lo--,1);else{no.splice(so--,1);continue e}}}no.length>12&&no.splice(12,no.length-12)}this.minStackPos=no[0].pos;for(let so=1;so ":"";if(this.stoppedAt!=null&&oo>this.stoppedAt)return to.forceReduce()?to:null;if(this.fragments){let co=to.curContext&&to.curContext.tracker.strict,uo=co?to.curContext.hash:0;for(let fo=this.fragments.nodeAt(oo);fo;){let ho=this.parser.nodeSet.types[fo.type.id]==fo.type?io.getGoto(to.state,fo.type.id):-1;if(ho>-1&&fo.length&&(!co||(fo.prop(NodeProp.contextHash)||0)==uo))return to.useNode(fo,ho),verbose&&console.log(so+this.stackID(to)+` (via reuse of ${io.getName(fo.type.id)})`),!0;if(!(fo instanceof Tree)||fo.children.length==0||fo.positions[0]>0)break;let po=fo.children[0];if(po instanceof Tree&&fo.positions[0]==0)fo=po;else break}}let ao=io.stateSlot(to.state,4);if(ao>0)return to.reduce(ao),verbose&&console.log(so+this.stackID(to)+` (via always-reduce ${io.getName(ao&65535)})`),!0;if(to.stack.length>=8400)for(;to.stack.length>6e3&&to.forceReduce(););let lo=this.tokens.getActions(to);for(let co=0;cooo?ro.push(go):no.push(go)}return!1}advanceFully(to,ro){let no=to.pos;for(;;){if(!this.advanceStack(to,null,null))return!1;if(to.pos>no)return pushStackDedup(to,ro),!0}}runRecovery(to,ro,no){let oo=null,io=!1;for(let so=0;so ":"";if(ao.deadEnd&&(io||(io=!0,ao.restart(),verbose&&console.log(uo+this.stackID(ao)+" (restarted)"),this.advanceFully(ao,no))))continue;let fo=ao.split(),ho=uo;for(let po=0;fo.forceReduce()&&po<10&&(verbose&&console.log(ho+this.stackID(fo)+" (via force-reduce)"),!this.advanceFully(fo,no));po++)verbose&&(ho=this.stackID(fo)+" -> ");for(let po of ao.recoverByInsert(lo))verbose&&console.log(uo+this.stackID(po)+" (via recover-insert)"),this.advanceFully(po,no);this.stream.end>ao.pos?(co==ao.pos&&(co++,lo=0),ao.recoverByDelete(lo,co),verbose&&console.log(uo+this.stackID(ao)+` (via recover-delete ${this.parser.getName(lo)})`),pushStackDedup(ao,no)):(!oo||oo.scoreeo;class ContextTracker{constructor(to){this.start=to.start,this.shift=to.shift||id,this.reduce=to.reduce||id,this.reuse=to.reuse||id,this.hash=to.hash||(()=>0),this.strict=to.strict!==!1}}class LRParser extends Parser{constructor(to){if(super(),this.wrappers=[],to.version!=14)throw new RangeError(`Parser version (${to.version}) doesn't match runtime version (14)`);let ro=to.nodeNames.split(" ");this.minRepeatTerm=ro.length;for(let ao=0;aoto.topRules[ao][1]),oo=[];for(let ao=0;ao=0)io(uo,lo,ao[co++]);else{let fo=ao[co+-uo];for(let ho=-uo;ho>0;ho--)io(ao[co++],lo,fo);co++}}}this.nodeSet=new NodeSet(ro.map((ao,lo)=>NodeType.define({name:lo>=this.minRepeatTerm?void 0:ao,id:lo,props:oo[lo],top:no.indexOf(lo)>-1,error:lo==0,skipped:to.skippedNodes&&to.skippedNodes.indexOf(lo)>-1}))),to.propSources&&(this.nodeSet=this.nodeSet.extend(...to.propSources)),this.strict=!1,this.bufferLength=DefaultBufferLength;let so=decodeArray(to.tokenData);this.context=to.context,this.specializerSpecs=to.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let ao=0;aotypeof ao=="number"?new TokenGroup(so,ao):ao),this.topRules=to.topRules,this.dialects=to.dialects||{},this.dynamicPrecedences=to.dynamicPrecedences||null,this.tokenPrecTable=to.tokenPrec,this.termNames=to.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(to,ro,no){let oo=new Parse(this,to,ro,no);for(let io of this.wrappers)oo=io(oo,to,ro,no);return oo}getGoto(to,ro,no=!1){let oo=this.goto;if(ro>=oo[0])return-1;for(let io=oo[ro+1];;){let so=oo[io++],ao=so&1,lo=oo[io++];if(ao&&no)return lo;for(let co=io+(so>>1);io0}validAction(to,ro){return!!this.allActions(to,no=>no==ro?!0:null)}allActions(to,ro){let no=this.stateSlot(to,4),oo=no?ro(no):void 0;for(let io=this.stateSlot(to,1);oo==null;io+=3){if(this.data[io]==65535)if(this.data[io+1]==1)io=pair(this.data,io+2);else break;oo=ro(pair(this.data,io+1))}return oo}nextStates(to){let ro=[];for(let no=this.stateSlot(to,1);;no+=3){if(this.data[no]==65535)if(this.data[no+1]==1)no=pair(this.data,no+2);else break;if(!(this.data[no+2]&1)){let oo=this.data[no+1];ro.some((io,so)=>so&1&&io==oo)||ro.push(this.data[no],oo)}}return ro}configure(to){let ro=Object.assign(Object.create(LRParser.prototype),this);if(to.props&&(ro.nodeSet=this.nodeSet.extend(...to.props)),to.top){let no=this.topRules[to.top];if(!no)throw new RangeError(`Invalid top rule name ${to.top}`);ro.top=no}return to.tokenizers&&(ro.tokenizers=this.tokenizers.map(no=>{let oo=to.tokenizers.find(io=>io.from==no);return oo?oo.to:no})),to.specializers&&(ro.specializers=this.specializers.slice(),ro.specializerSpecs=this.specializerSpecs.map((no,oo)=>{let io=to.specializers.find(ao=>ao.from==no.external);if(!io)return no;let so=Object.assign(Object.assign({},no),{external:io.to});return ro.specializers[oo]=getSpecializer(so),so})),to.contextTracker&&(ro.context=to.contextTracker),to.dialect&&(ro.dialect=this.parseDialect(to.dialect)),to.strict!=null&&(ro.strict=to.strict),to.wrap&&(ro.wrappers=ro.wrappers.concat(to.wrap)),to.bufferLength!=null&&(ro.bufferLength=to.bufferLength),ro}hasWrappers(){return this.wrappers.length>0}getName(to){return this.termNames?this.termNames[to]:String(to<=this.maxNode&&this.nodeSet.types[to].name||to)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(to){let ro=this.dynamicPrecedences;return ro==null?0:ro[to]||0}parseDialect(to){let ro=Object.keys(this.dialects),no=ro.map(()=>!1);if(to)for(let io of to.split(" ")){let so=ro.indexOf(io);so>=0&&(no[so]=!0)}let oo=null;for(let io=0;iono)&&ro.p.parser.stateFlag(ro.state,2)&&(!to||to.scoreeo.external(ro,no)<<1|to}return eo.get}const printKeyword=1,indent=194,dedent=195,newline$1=196,blankLineStart=197,newlineBracketed=198,eof=199,stringContent=200,Escape=2,replacementStart=3,stringEnd=201,ParenL=24,ParenthesizedExpression=25,TupleExpression=49,ComprehensionExpression=50,BracketL=55,ArrayExpression=56,ArrayComprehensionExpression=57,BraceL=59,DictionaryExpression=60,DictionaryComprehensionExpression=61,SetExpression=62,SetComprehensionExpression=63,ArgList=65,subscript=238,String$1=71,stringStart=241,stringStartD=242,stringStartL=243,stringStartLD=244,stringStartR=245,stringStartRD=246,stringStartRL=247,stringStartRLD=248,FormatString=72,stringStartF=249,stringStartFD=250,stringStartFL=251,stringStartFLD=252,stringStartFR=253,stringStartFRD=254,stringStartFRL=255,stringStartFRLD=256,FormatReplacement=73,nestedFormatReplacement=77,importList=264,TypeParamList=112,ParamList=130,SequencePattern=151,MappingPattern=152,PatternArgList=155,newline=10,carriageReturn=13,space=32,tab=9,hash=35,parenOpen=40,dot=46,braceOpen=123,braceClose=125,singleQuote=39,doubleQuote=34,backslash=92,letter_o=111,letter_x=120,letter_N=78,letter_u=117,letter_U=85,bracketed=new Set([ParenthesizedExpression,TupleExpression,ComprehensionExpression,importList,ArgList,ParamList,ArrayExpression,ArrayComprehensionExpression,subscript,SetExpression,SetComprehensionExpression,FormatString,FormatReplacement,nestedFormatReplacement,DictionaryExpression,DictionaryComprehensionExpression,SequencePattern,MappingPattern,PatternArgList,TypeParamList]);function isLineBreak(eo){return eo==newline||eo==carriageReturn}function isHex(eo){return eo>=48&&eo<=57||eo>=65&&eo<=70||eo>=97&&eo<=102}const newlines=new ExternalTokenizer((eo,to)=>{let ro;if(eo.next<0)eo.acceptToken(eof);else if(to.context.flags&cx_Bracketed)isLineBreak(eo.next)&&eo.acceptToken(newlineBracketed,1);else if(((ro=eo.peek(-1))<0||isLineBreak(ro))&&to.canShift(blankLineStart)){let no=0;for(;eo.next==space||eo.next==tab;)eo.advance(),no++;(eo.next==newline||eo.next==carriageReturn||eo.next==hash)&&eo.acceptToken(blankLineStart,-no)}else isLineBreak(eo.next)&&eo.acceptToken(newline$1,1)},{contextual:!0}),indentation=new ExternalTokenizer((eo,to)=>{let ro=to.context;if(ro.flags)return;let no=eo.peek(-1);if(no==newline||no==carriageReturn){let oo=0,io=0;for(;;){if(eo.next==space)oo++;else if(eo.next==tab)oo+=8-oo%8;else break;eo.advance(),io++}oo!=ro.indent&&eo.next!=newline&&eo.next!=carriageReturn&&eo.next!=hash&&(oo[eo,to|cx_String])),trackIndent=new ContextTracker({start:topIndent,reduce(eo,to,ro,no){return eo.flags&cx_Bracketed&&bracketed.has(to)||(to==String$1||to==FormatString)&&eo.flags&cx_String?eo.parent:eo},shift(eo,to,ro,no){return to==indent?new Context(eo,countIndent(no.read(no.pos,ro.pos)),0):to==dedent?eo.parent:to==ParenL||to==BracketL||to==BraceL||to==replacementStart?new Context(eo,0,cx_Bracketed):stringFlags.has(to)?new Context(eo,0,stringFlags.get(to)|eo.flags&cx_Bracketed):eo},hash(eo){return eo.hash}}),legacyPrint=new ExternalTokenizer(eo=>{for(let to=0;to<5;to++){if(eo.next!="print".charCodeAt(to))return;eo.advance()}if(!/\w/.test(String.fromCharCode(eo.next)))for(let to=0;;to++){let ro=eo.peek(to);if(!(ro==space||ro==tab)){ro!=parenOpen&&ro!=dot&&ro!=newline&&ro!=carriageReturn&&ro!=hash&&eo.acceptToken(printKeyword);return}}}),strings=new ExternalTokenizer((eo,to)=>{let{flags:ro}=to.context,no=ro&cx_DoubleQuote?doubleQuote:singleQuote,oo=(ro&cx_Long)>0,io=!(ro&cx_Raw),so=(ro&cx_Format)>0,ao=eo.pos;for(;!(eo.next<0);)if(so&&eo.next==braceOpen)if(eo.peek(1)==braceOpen)eo.advance(2);else{if(eo.pos==ao){eo.acceptToken(replacementStart,1);return}break}else if(io&&eo.next==backslash){if(eo.pos==ao){eo.advance();let lo=eo.next;lo>=0&&(eo.advance(),skipEscape(eo,lo)),eo.acceptToken(Escape);return}break}else if(eo.next==no&&(!oo||eo.peek(1)==no&&eo.peek(2)==no)){if(eo.pos==ao){eo.acceptToken(stringEnd,oo?3:1);return}break}else if(eo.next==newline){if(oo)eo.advance();else if(eo.pos==ao){eo.acceptToken(stringEnd);return}break}else eo.advance();eo.pos>ao&&eo.acceptToken(stringContent)});function skipEscape(eo,to){if(to==letter_o)for(let ro=0;ro<2&&eo.next>=48&&eo.next<=55;ro++)eo.advance();else if(to==letter_x)for(let ro=0;ro<2&&isHex(eo.next);ro++)eo.advance();else if(to==letter_u)for(let ro=0;ro<4&&isHex(eo.next);ro++)eo.advance();else if(to==letter_U)for(let ro=0;ro<8&&isHex(eo.next);ro++)eo.advance();else if(to==letter_N&&eo.next==braceOpen){for(eo.advance();eo.next>=0&&eo.next!=braceClose&&eo.next!=singleQuote&&eo.next!=doubleQuote&&eo.next!=newline;)eo.advance();eo.next==braceClose&&eo.advance()}}const pythonHighlighting=styleTags({'async "*" "**" FormatConversion FormatSpec':tags.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":tags.controlKeyword,"in not and or is del":tags.operatorKeyword,"from def class global nonlocal lambda":tags.definitionKeyword,import:tags.moduleKeyword,"with as print":tags.keyword,Boolean:tags.bool,None:tags.null,VariableName:tags.variableName,"CallExpression/VariableName":tags.function(tags.variableName),"FunctionDefinition/VariableName":tags.function(tags.definition(tags.variableName)),"ClassDefinition/VariableName":tags.definition(tags.className),PropertyName:tags.propertyName,"CallExpression/MemberExpression/PropertyName":tags.function(tags.propertyName),Comment:tags.lineComment,Number:tags.number,String:tags.string,FormatString:tags.special(tags.string),Escape:tags.escape,UpdateOp:tags.updateOperator,"ArithOp!":tags.arithmeticOperator,BitOp:tags.bitwiseOperator,CompareOp:tags.compareOperator,AssignOp:tags.definitionOperator,Ellipsis:tags.punctuation,At:tags.meta,"( )":tags.paren,"[ ]":tags.squareBracket,"{ }":tags.brace,".":tags.derefOperator,", ;":tags.separator}),spec_identifier={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},parser=LRParser.deserialize({version:14,states:"##pO`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO1XQdO'#EfO3rQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO3}QdO'#EyO4UQdO'#FOO4aQdO'#EzO0rQdO'#FOO1XQdO'#FQO1XQdO'#FVO4fQdO'#F[P4mOdO'#GpPOOO)CBd)CBdOOQS'#Ce'#CeOOQS'#Cf'#CfOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Cl'#ClO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO4xQdO'#DoOOQS,5:Y,5:YO5]QdO'#HdOOQS,5:],5:]O5jQ!fO,5:]O5oQtO,59YO1lQdO,59bO1lQdO,59bO1lQdO,59bO8_QdO,59bO8dQdO,59bO8kQdO,59jO8rQdO'#HTO9xQdO'#HSOOQS'#HS'#HSOOQS'#D['#D[O:aQdO,59aO'vQdO,59aO:oQdO,59aOOQS,59y,59yO:tQdO,5:RO'vQdO,5:ROOQS,5:Q,5:QO;SQdO,5:QO;XQdO,5:XO'vQdO,5:XO'vQdO,5:VOOQS,5:U,5:UO;jQdO,5:UO;oQdO,5:WOOOW'#Fy'#FyO;tOWO,5:aOOQS,5:a,5:aOOOOQS'#Ds'#DsOOQS1G/w1G/wOOQS1G.|1G.|O!.mQtO1G.|O!.tQtO1G.|O1lQdO1G.|O!/aQdO1G/UOOQS'#DZ'#DZO0rQdO,59tOOQS1G.{1G.{O!/hQdO1G/eO!/xQdO1G/eO!0QQdO1G/fO'vQdO'#H[O!0VQdO'#H[O!0[QtO1G.{O!0lQdO,59iO!1rQdO,5=zO!2SQdO,5=zO!2[QdO1G/mO!2aQtO1G/mOOQS1G/l1G/lO!2qQdO,5=uO!3hQdO,5=uO0rQdO1G/qO!4VQdO1G/sO!4[QtO1G/sO!4lQtO1G/qOOQS1G/p1G/pOOQS1G/r1G/rOOOW-E9w-E9wOOQS1G/{1G/{O!4|QdO'#HxO0rQdO'#HxO!5_QdO,5>cOOOW-E9x-E9xOOQS1G/|1G/|OOQS-E9{-E9{O!5mQ#xO1G2zO!6^QtO1G2zO'vQdO,5iOOQS1G1`1G1`O!7^QdO1G1`OOQS'#DV'#DVO0rQdO,5=qOOQS,5=q,5=qO!7cQdO'#FrO!7nQdO,59oO!7vQdO1G/XO!8QQtO,5=uOOQS1G3`1G3`OOQS,5:m,5:mO!8qQdO'#GtOOQS,5lO!:sQdO,5>lO!;RQdO,5>hO!;iQdO,5>hO!;zQdO'#EpO0rQdO1G0tO!oO!D_QdO,5>oO!DgQtO,5>oO0rQdO1G1PO!DqQdO1G1PO4aQdO1G1UO!!_QdO1G1WOOQV,5;a,5;aO!DvQfO,5;aO!D{QgO1G1QO!H|QdO'#GZO4aQdO1G1QO4aQdO1G1QO!I^QdO,5>pO!IkQdO,5>pO1XQdO,5>pOOQV1G1U1G1UO!IsQdO'#FSO!JUQ!fO1G1WO!J^QdO1G1WOOQV1G1]1G1]O4aQdO1G1]O!JcQdO1G1]O!JkQdO'#F^OOQV1G1b1G1bO!!rQtO1G1bPOOO1G2v1G2vP!JpOSO1G2vOOQS,5=},5=}OOQS'#Dp'#DpO0rQdO,5=}O!JuQdO,5=|O!KYQdO,5=|OOQS1G/u1G/uO!KbQdO,5>PO!KrQdO,5>PO!KzQdO,5>PO!L_QdO,5>PO!LoQdO,5>POOQS1G3j1G3jOOQS7+$h7+$hO!7vQdO7+$pO!NbQdO1G.|O!NiQdO1G.|OOQS1G/`1G/`OOQS,5<`,5<`O'vQdO,5<`OOQS7+%P7+%PO!NpQdO7+%POOQS-E9r-E9rOOQS7+%Q7+%QO# QQdO,5=vO'vQdO,5=vOOQS7+$g7+$gO# VQdO7+%PO# _QdO7+%QO# dQdO1G3fOOQS7+%X7+%XO# tQdO1G3fO# |QdO7+%XOOQS,5<_,5<_O'vQdO,5<_O#!RQdO1G3aOOQS-E9q-E9qO#!xQdO7+%]OOQS7+%_7+%_O##WQdO1G3aO##uQdO7+%_O##zQdO1G3gO#$[QdO1G3gO#$dQdO7+%]O#$iQdO,5>dO#%SQdO,5>dO#%SQdO,5>dOOQS'#Dx'#DxO#%eO&jO'#DzO#%pO`O'#HyOOOW1G3}1G3}O#%uQdO1G3}O#%}QdO1G3}O#&YQ#xO7+(fO#&yQtO1G2UP#'dQdO'#GOOOQS,5e,5>eOOOW7+)i7+)iO#=gQdO7+)iO#=oQdO1G2zO#>YQdO1G2zP'vQdO'#FuO0rQdO<kQdO,5>kO#>|QdO,5>kO1XQdO,5>kO#?_QdO,5>jOOQS<mO#?rQdO,5>mOOQS1G0v1G0vOOQS<rO#IXQdO,5>rOOQS,5>r,5>rO#IdQdO,5>qO#IuQdO,5>qOOQS1G1Y1G1YOOQS,5;p,5;pOOQV<VAN>VO#MUQdO<cAN>cO0rQdO1G1|O#MfQtO1G1|P#MpQdO'#FvOOQS1G2R1G2RP#M}QdO'#F{O#N[QdO7+)jO#NuQdO,5>gOOOO-E9z-E9zOOOW<tO$4^QdO,5>tO1XQdO,5vO$'zQdO,5>vOOQS1G1p1G1pO$8UQtO,5<[OOQU7+'P7+'PO$*WQdO1G/iO$'zQdO,5wO$8dQdO,5>wOOQS1G1s1G1sOOQS7+'S7+'SP$'zQdO'#GdO$8lQdO1G4bO$8vQdO1G4bO$9OQdO1G4bOOQS7+%T7+%TO$9^QdO1G1tO$9lQtO'#FaO$9sQdO,5<}OOQS,5<},5<}O$:RQdO1G4cOOQS-E:a-E:aO$'zQdO,5<|O$:YQdO,5<|O$:_QdO7+)|OOQS-E:`-E:`O$:iQdO7+)|O$'zQdO,5PPP>S>t>wPP'Z'ZPP?WPP'Z'ZPP'Z'Z'Z'Z'Z?[@U'ZP@XP@_DfHSHWPHZHeHi'ZPPPHlHu'RP'R'RP'RP'RP'RP'RP'R'R'RP'RPP'RPP'RP'RPH{IXIaPIhInPIhPIhIhPPPIhPK|PLVLaLgK|PIhLpPIhPLwL}PMRMgNUNoMRMRNu! SMRMRMRMR! h! n! q! v! y!!T!!Z!!g!!y!#P!#Z!#a!#}!$T!$Z!$e!$k!$q!%T!%_!%e!%k!%q!%{!&R!&X!&_!&e!&o!&u!'P!'V!'`!'f!'u!'}!(X!(`PPPPPPPPPPP!(f!(i!(o!(x!)S!)_PPPPPPPPPPPP!.R!/g!3g!6wPP!7P!7`!7i!8b!8X!8k!8q!8t!8w!8z!9S!9sPPPPPPPPPPPPPPPPP!9v!9z!:QP!:f!:j!:v!;S!;Y!;c!;f!;i!;o!;u!;{!_![!]Do!]!^Es!^!_FZ!_!`Gk!`!aHX!a!b%T!b!cIf!c!dJU!d!eK^!e!hJU!h!i!#f!i!tJU!t!u!,|!u!wJU!w!x!.t!x!}JU!}#O!0S#O#P&o#P#Q!0j#Q#R!1Q#R#SJU#S#T%T#T#UJU#U#VK^#V#YJU#Y#Z!#f#Z#fJU#f#g!,|#g#iJU#i#j!.t#j#oJU#o#p!1n#p#q!1s#q#r!2a#r#s!2f#s$g%T$g;'SJU;'S;=`KW<%lOJU`%YT&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T`%lP;=`<%l%To%v]&n`%c_OX%TXY%oY[%T[]%o]p%Tpq%oq#O%T#O#P&o#P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To&tX&n`OY%TYZ%oZ]%T]^%o^#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc'f[&n`O!_%T!_!`([!`#T%T#T#U(r#U#f%T#f#g(r#g#h(r#h#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(cTmR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(yT!mR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk)aV&n`&[ZOr%Trs)vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk){V&n`Or%Trs*bs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk*iT&n`&^ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To+PZS_&n`OY*xYZ%TZ]*x]^%T^#o*x#o#p+r#p#q*x#q#r+r#r;'S*x;'S;=`,^<%lO*x_+wTS_OY+rZ]+r^;'S+r;'S;=`,W<%lO+r_,ZP;=`<%l+ro,aP;=`<%l*xj,kV%rQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-XT!xY&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-oV%lQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.]V&n`&ZZOw%Twx.rx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.wV&n`Ow%Twx/^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/eT&n`&]ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/{ThZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc0cTgR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk0yXVZ&n`Oz%Tz{1f{!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk1mVaR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk2ZV%oZ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc2wTzR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To3_W%pZ&n`O!_%T!_!`-Q!`!a3w!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Td4OT&{S&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk4fX!fQ&n`O!O%T!O!P5R!P!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5WV&n`O!O%T!O!P5m!P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5tT!rZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti6[a!hX&n`O!Q%T!Q![6T![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S6T#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti7fZ&n`O{%T{|8X|}%T}!O8X!O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8^V&n`O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8z]!hX&n`O!Q%T!Q![8s![!l%T!l!m9s!m#R%T#R#S8s#S#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti9zT!hX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk:bX%qR&n`O!P%T!P!Q:}!Q!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj;UV%sQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti;ro!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!d%T!d!e?q!e!g%T!g!h7a!h!l%T!l!m9s!m!q%T!q!rA]!r!z%T!z!{Bq!{#R%T#R#S>_#S#U%T#U#V?q#V#X%T#X#Y7a#Y#^%T#^#_9s#_#c%T#c#dA]#d#l%T#l#mBq#m#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti=xV&n`O!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti>fc!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S>_#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti?vY&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti@mY!hX&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiAbX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBUX!hX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBv]&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiCv]!hX&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToDvV{_&n`O!_%T!_!`E]!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TcEdT%{R&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkEzT#gZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkFbXmR&n`O!^%T!^!_F}!_!`([!`!a([!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjGUV%mQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkGrV%zZ&n`O!_%T!_!`([!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkH`WmR&n`O!_%T!_!`([!`!aHx!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjIPV%nQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkIoV_Q#}P&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToJ_]&n`&YS%uZO!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoKZP;=`<%lJUoKge&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!tJU!t!uLx!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#gLx#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoMRa&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUkN_V&n`&`ZOr%TrsNts#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkNyV&n`Or%Trs! `s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! gT&n`&bZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! }V&n`&_ZOw%Twx!!dx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!!iV&n`Ow%Twx!#Ox#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!#VT&n`&aZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!#oe&n`&YS%uZOr%Trs!%Qsw%Twx!&px!Q%T!Q![JU![!c%T!c!tJU!t!u!(`!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#g!(`#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!%XV&n`&dZOr%Trs!%ns#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!%sV&n`Or%Trs!&Ys#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&aT&n`&fZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&wV&n`&cZOw%Twx!'^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!'cV&n`Ow%Twx!'xx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!(PT&n`&eZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!(ia&n`&YS%uZOr%Trs!)nsw%Twx!+^x!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!)uV&n`&hZOr%Trs!*[s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*aV&n`Or%Trs!*vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*}T&n`&jZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!+eV&n`&gZOw%Twx!+zx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,PV&n`Ow%Twx!,fx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,mT&n`&iZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[legacyPrint,indentation,newlines,strings,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:eo=>spec_identifier[eo]||-1}],tokenPrec:7646}),cache=new NodeWeakMap,ScopeNodes=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function defID(eo){return(to,ro,no)=>{if(no)return!1;let oo=to.node.getChild("VariableName");return oo&&ro(oo,eo),!0}}const gatherCompletions={FunctionDefinition:defID("function"),ClassDefinition:defID("class"),ForStatement(eo,to,ro){if(ro){for(let no=eo.node.firstChild;no;no=no.nextSibling)if(no.name=="VariableName")to(no,"variable");else if(no.name=="in")break}},ImportStatement(eo,to){var ro,no;let{node:oo}=eo,io=((ro=oo.firstChild)===null||ro===void 0?void 0:ro.name)=="from";for(let so=oo.getChild("import");so;so=so.nextSibling)so.name=="VariableName"&&((no=so.nextSibling)===null||no===void 0?void 0:no.name)!="as"&&to(so,io?"variable":"namespace")},AssignStatement(eo,to){for(let ro=eo.node.firstChild;ro;ro=ro.nextSibling)if(ro.name=="VariableName")to(ro,"variable");else if(ro.name==":"||ro.name=="AssignOp")break},ParamList(eo,to){for(let ro=null,no=eo.node.firstChild;no;no=no.nextSibling)no.name=="VariableName"&&(!ro||!/\*|AssignOp/.test(ro.name))&&to(no,"variable"),ro=no},CapturePattern:defID("variable"),AsPattern:defID("variable"),__proto__:null};function getScope(eo,to){let ro=cache.get(to);if(ro)return ro;let no=[],oo=!0;function io(so,ao){let lo=eo.sliceString(so.from,so.to);no.push({label:lo,type:ao})}return to.cursor(IterMode.IncludeAnonymous).iterate(so=>{if(so.name){let ao=gatherCompletions[so.name];if(ao&&ao(so,io,oo)||!oo&&ScopeNodes.has(so.name))return!1;oo=!1}else if(so.to-so.from>8192){for(let ao of getScope(eo,so.node))no.push(ao);return!1}}),cache.set(to,no),no}const Identifier=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,dontComplete=["String","FormatString","Comment","PropertyName"];function localCompletionSource(eo){let to=syntaxTree(eo.state).resolveInner(eo.pos,-1);if(dontComplete.indexOf(to.name)>-1)return null;let ro=to.name=="VariableName"||to.to-to.from<20&&Identifier.test(eo.state.sliceDoc(to.from,to.to));if(!ro&&!eo.explicit)return null;let no=[];for(let oo=to;oo;oo=oo.parent)ScopeNodes.has(oo.name)&&(no=no.concat(getScope(eo.state.doc,oo)));return{options:no,from:ro?to.from:eo.pos,validFor:Identifier}}const globals=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(eo=>({label:eo,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(eo=>({label:eo,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(eo=>({label:eo,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(eo=>({label:eo,type:"function"}))),snippets=[snippetCompletion("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),snippetCompletion("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),snippetCompletion("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),snippetCompletion("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),snippetCompletion(`if \${}: `,{label:"if",detail:"block",type:"keyword"}),snippetCompletion("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),snippetCompletion("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),snippetCompletion("import ${module}",{label:"import",detail:"statement",type:"keyword"}),snippetCompletion("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],globalCompletion=ifNotIn(dontComplete,completeFromList(globals.concat(snippets)));function indentBody(eo,to){let ro=eo.baseIndentFor(to),no=eo.lineAt(eo.pos,-1),oo=no.from+no.text.length;return/^\s*($|#)/.test(no.text)&&eo.node.toro?null:ro+eo.unit}const pythonLanguage=LRLanguage.define({name:"python",parser:parser.configure({props:[indentNodeProp.add({Body:eo=>{var to;return(to=indentBody(eo,eo.node))!==null&&to!==void 0?to:eo.continue()},IfStatement:eo=>/^\s*(else:|elif )/.test(eo.textAfter)?eo.baseIndent:eo.continue(),"ForStatement WhileStatement":eo=>/^\s*else:/.test(eo.textAfter)?eo.baseIndent:eo.continue(),TryStatement:eo=>/^\s*(except |finally:|else:)/.test(eo.textAfter)?eo.baseIndent:eo.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":delimitedIndent({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":delimitedIndent({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":delimitedIndent({closing:"]"}),"String FormatString":()=>null,Script:eo=>{if(eo.pos+/\s*/.exec(eo.textAfter)[0].length>=eo.node.to){let to=null;for(let ro=eo.node,no=ro.to;ro=ro.lastChild,!(!ro||ro.to!=no);)ro.type.name=="Body"&&(to=ro);if(to){let ro=indentBody(eo,to);if(ro!=null)return ro}}return eo.continue()}}),foldNodeProp.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":foldInside,Body:(eo,to)=>({from:eo.from+1,to:eo.to-(eo.to==to.doc.length?0:1)})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/}});function python(){return new LanguageSupport(pythonLanguage,[pythonLanguage.data.of({autocomplete:localCompletionSource}),pythonLanguage.data.of({autocomplete:globalCompletion})])}var createTheme=eo=>{var{theme:to,settings:ro={},styles:no=[]}=eo,oo={".cm-gutters":{}},io={};ro.background&&(io.backgroundColor=ro.background),ro.backgroundImage&&(io.backgroundImage=ro.backgroundImage),ro.foreground&&(io.color=ro.foreground),(ro.background||ro.foreground)&&(oo["&"]=io),ro.fontFamily&&(oo["&.cm-editor .cm-scroller"]={fontFamily:ro.fontFamily}),ro.gutterBackground&&(oo[".cm-gutters"].backgroundColor=ro.gutterBackground),ro.gutterForeground&&(oo[".cm-gutters"].color=ro.gutterForeground),ro.gutterBorder&&(oo[".cm-gutters"].borderRightColor=ro.gutterBorder),ro.caret&&(oo[".cm-content"]={caretColor:ro.caret},oo[".cm-cursor, .cm-dropCursor"]={borderLeftColor:ro.caret});var so={};ro.gutterActiveForeground&&(so.color=ro.gutterActiveForeground),ro.lineHighlight&&(oo[".cm-activeLine"]={backgroundColor:ro.lineHighlight},so.backgroundColor=ro.lineHighlight),oo[".cm-activeLineGutter"]=so,ro.selection&&(oo["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:ro.selection+" !important"}),ro.selectionMatch&&(oo["& .cm-selectionMatch"]={backgroundColor:ro.selectionMatch});var ao=EditorView.theme(oo,{dark:to==="dark"}),lo=HighlightStyle.define(no),co=[ao,syntaxHighlighting(lo)];return co},defaultSettingsVscodeDark={background:"#1e1e1e",foreground:"#9cdcfe",caret:"#c6c6c6",selection:"#6199ff2f",selectionMatch:"#72a1ff59",lineHighlight:"#ffffff0f",gutterBackground:"#1e1e1e",gutterForeground:"#838383",gutterActiveForeground:"#fff",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace'};function vscodeDarkInit(eo){var{theme:to="dark",settings:ro={},styles:no=[]}=eo||{};return createTheme({theme:to,settings:_extends$c({},defaultSettingsVscodeDark,ro),styles:[{tag:[tags.keyword,tags.operatorKeyword,tags.modifier,tags.color,tags.constant(tags.name),tags.standard(tags.name),tags.standard(tags.tagName),tags.special(tags.brace),tags.atom,tags.bool,tags.special(tags.variableName)],color:"#569cd6"},{tag:[tags.controlKeyword,tags.moduleKeyword],color:"#c586c0"},{tag:[tags.name,tags.deleted,tags.character,tags.macroName,tags.propertyName,tags.variableName,tags.labelName,tags.definition(tags.name)],color:"#9cdcfe"},{tag:tags.heading,fontWeight:"bold",color:"#9cdcfe"},{tag:[tags.typeName,tags.className,tags.tagName,tags.number,tags.changed,tags.annotation,tags.self,tags.namespace],color:"#4ec9b0"},{tag:[tags.function(tags.variableName),tags.function(tags.propertyName)],color:"#dcdcaa"},{tag:[tags.number],color:"#b5cea8"},{tag:[tags.operator,tags.punctuation,tags.separator,tags.url,tags.escape,tags.regexp],color:"#d4d4d4"},{tag:[tags.regexp],color:"#d16969"},{tag:[tags.special(tags.string),tags.processingInstruction,tags.string,tags.inserted],color:"#ce9178"},{tag:[tags.angleBracket],color:"#808080"},{tag:tags.strong,fontWeight:"bold"},{tag:tags.emphasis,fontStyle:"italic"},{tag:tags.strikethrough,textDecoration:"line-through"},{tag:[tags.meta,tags.comment],color:"#6a9955"},{tag:tags.link,color:"#6a9955",textDecoration:"underline"},{tag:tags.invalid,color:"#ff0000"},...no]})}var vscodeDark=vscodeDarkInit();function _extends(){return _extends=Object.assign?Object.assign.bind():function(eo){for(var to=1;to=0)&&(ro[oo]=eo[oo]);return ro}const toggleComment=eo=>{let{state:to}=eo,ro=to.doc.lineAt(to.selection.main.from),no=getConfig(eo.state,ro.from);return no.line?toggleLineComment(eo):no.block?toggleBlockCommentByLine(eo):!1};function command(eo,to){return({state:ro,dispatch:no})=>{if(ro.readOnly)return!1;let oo=eo(to,ro);return oo?(no(ro.update(oo)),!0):!1}}const toggleLineComment=command(changeLineComment,0),toggleBlockComment=command(changeBlockComment,0),toggleBlockCommentByLine=command((eo,to)=>changeBlockComment(eo,to,selectedLineRanges(to)),0);function getConfig(eo,to){let ro=eo.languageDataAt("commentTokens",to);return ro.length?ro[0]:{}}const SearchMargin=50;function findBlockComment(eo,{open:to,close:ro},no,oo){let io=eo.sliceDoc(no-SearchMargin,no),so=eo.sliceDoc(oo,oo+SearchMargin),ao=/\s*$/.exec(io)[0].length,lo=/^\s*/.exec(so)[0].length,co=io.length-ao;if(io.slice(co-to.length,co)==to&&so.slice(lo,lo+ro.length)==ro)return{open:{pos:no-ao,margin:ao&&1},close:{pos:oo+lo,margin:lo&&1}};let uo,fo;oo-no<=2*SearchMargin?uo=fo=eo.sliceDoc(no,oo):(uo=eo.sliceDoc(no,no+SearchMargin),fo=eo.sliceDoc(oo-SearchMargin,oo));let ho=/^\s*/.exec(uo)[0].length,po=/\s*$/.exec(fo)[0].length,go=fo.length-po-ro.length;return uo.slice(ho,ho+to.length)==to&&fo.slice(go,go+ro.length)==ro?{open:{pos:no+ho+to.length,margin:/\s/.test(uo.charAt(ho+to.length))?1:0},close:{pos:oo-po-ro.length,margin:/\s/.test(fo.charAt(go-1))?1:0}}:null}function selectedLineRanges(eo){let to=[];for(let ro of eo.selection.ranges){let no=eo.doc.lineAt(ro.from),oo=ro.to<=no.to?no:eo.doc.lineAt(ro.to),io=to.length-1;io>=0&&to[io].to>no.from?to[io].to=oo.to:to.push({from:no.from+/^\s*/.exec(no.text)[0].length,to:oo.to})}return to}function changeBlockComment(eo,to,ro=to.selection.ranges){let no=ro.map(io=>getConfig(to,io.from).block);if(!no.every(io=>io))return null;let oo=ro.map((io,so)=>findBlockComment(to,no[so],io.from,io.to));if(eo!=2&&!oo.every(io=>io))return{changes:to.changes(ro.map((io,so)=>oo[so]?[]:[{from:io.from,insert:no[so].open+" "},{from:io.to,insert:" "+no[so].close}]))};if(eo!=1&&oo.some(io=>io)){let io=[];for(let so=0,ao;sooo&&(io==so||so>fo.from)){oo=fo.from;let ho=/^\s*/.exec(fo.text)[0].length,po=ho==fo.length,go=fo.text.slice(ho,ho+co.length)==co?ho:-1;hoio.comment<0&&(!io.empty||io.single))){let io=[];for(let{line:ao,token:lo,indent:co,empty:uo,single:fo}of no)(fo||!uo)&&io.push({from:ao.from+co,insert:lo+" "});let so=to.changes(io);return{changes:so,selection:to.selection.map(so,1)}}else if(eo!=1&&no.some(io=>io.comment>=0)){let io=[];for(let{line:so,comment:ao,token:lo}of no)if(ao>=0){let co=so.from+ao,uo=co+lo.length;so.text[uo-so.from]==" "&&uo++,io.push({from:co,to:uo})}return{changes:io}}return null}const fromHistory=Annotation.define(),isolateHistory=Annotation.define(),invertedEffects=Facet.define(),historyConfig=Facet.define({combine(eo){return combineConfig(eo,{minDepth:100,newGroupDelay:500,joinToEvent:(to,ro)=>ro},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(to,ro)=>(no,oo)=>to(no,oo)||ro(no,oo)})}}),historyField_=StateField.define({create(){return HistoryState.empty},update(eo,to){let ro=to.state.facet(historyConfig),no=to.annotation(fromHistory);if(no){let lo=HistEvent.fromTransaction(to,no.selection),co=no.side,uo=co==0?eo.undone:eo.done;return lo?uo=updateBranch(uo,uo.length,ro.minDepth,lo):uo=addSelection(uo,to.startState.selection),new HistoryState(co==0?no.rest:uo,co==0?uo:no.rest)}let oo=to.annotation(isolateHistory);if((oo=="full"||oo=="before")&&(eo=eo.isolate()),to.annotation(Transaction.addToHistory)===!1)return to.changes.empty?eo:eo.addMapping(to.changes.desc);let io=HistEvent.fromTransaction(to),so=to.annotation(Transaction.time),ao=to.annotation(Transaction.userEvent);return io?eo=eo.addChanges(io,so,ao,ro,to):to.selection&&(eo=eo.addSelection(to.startState.selection,so,ao,ro.newGroupDelay)),(oo=="full"||oo=="after")&&(eo=eo.isolate()),eo},toJSON(eo){return{done:eo.done.map(to=>to.toJSON()),undone:eo.undone.map(to=>to.toJSON())}},fromJSON(eo){return new HistoryState(eo.done.map(HistEvent.fromJSON),eo.undone.map(HistEvent.fromJSON))}});function history(eo={}){return[historyField_,historyConfig.of(eo),EditorView.domEventHandlers({beforeinput(to,ro){let no=to.inputType=="historyUndo"?undo:to.inputType=="historyRedo"?redo:null;return no?(to.preventDefault(),no(ro)):!1}})]}function cmd(eo,to){return function({state:ro,dispatch:no}){if(!to&&ro.readOnly)return!1;let oo=ro.field(historyField_,!1);if(!oo)return!1;let io=oo.pop(eo,ro,to);return io?(no(io),!0):!1}}const undo=cmd(0,!1),redo=cmd(1,!1),undoSelection=cmd(0,!0),redoSelection=cmd(1,!0);class HistEvent{constructor(to,ro,no,oo,io){this.changes=to,this.effects=ro,this.mapped=no,this.startSelection=oo,this.selectionsAfter=io}setSelAfter(to){return new HistEvent(this.changes,this.effects,this.mapped,this.startSelection,to)}toJSON(){var to,ro,no;return{changes:(to=this.changes)===null||to===void 0?void 0:to.toJSON(),mapped:(ro=this.mapped)===null||ro===void 0?void 0:ro.toJSON(),startSelection:(no=this.startSelection)===null||no===void 0?void 0:no.toJSON(),selectionsAfter:this.selectionsAfter.map(oo=>oo.toJSON())}}static fromJSON(to){return new HistEvent(to.changes&&ChangeSet.fromJSON(to.changes),[],to.mapped&&ChangeDesc.fromJSON(to.mapped),to.startSelection&&EditorSelection.fromJSON(to.startSelection),to.selectionsAfter.map(EditorSelection.fromJSON))}static fromTransaction(to,ro){let no=none;for(let oo of to.startState.facet(invertedEffects)){let io=oo(to);io.length&&(no=no.concat(io))}return!no.length&&to.changes.empty?null:new HistEvent(to.changes.invert(to.startState.doc),no,void 0,ro||to.startState.selection,none)}static selection(to){return new HistEvent(void 0,none,void 0,void 0,to)}}function updateBranch(eo,to,ro,no){let oo=to+1>ro+20?to-ro-1:0,io=eo.slice(oo,to);return io.push(no),io}function isAdjacent(eo,to){let ro=[],no=!1;return eo.iterChangedRanges((oo,io)=>ro.push(oo,io)),to.iterChangedRanges((oo,io,so,ao)=>{for(let lo=0;lo=co&&so<=uo&&(no=!0)}}),no}function eqSelectionShape(eo,to){return eo.ranges.length==to.ranges.length&&eo.ranges.filter((ro,no)=>ro.empty!=to.ranges[no].empty).length===0}function conc(eo,to){return eo.length?to.length?eo.concat(to):eo:to}const none=[],MaxSelectionsPerEvent=200;function addSelection(eo,to){if(eo.length){let ro=eo[eo.length-1],no=ro.selectionsAfter.slice(Math.max(0,ro.selectionsAfter.length-MaxSelectionsPerEvent));return no.length&&no[no.length-1].eq(to)?eo:(no.push(to),updateBranch(eo,eo.length-1,1e9,ro.setSelAfter(no)))}else return[HistEvent.selection([to])]}function popSelection(eo){let to=eo[eo.length-1],ro=eo.slice();return ro[eo.length-1]=to.setSelAfter(to.selectionsAfter.slice(0,to.selectionsAfter.length-1)),ro}function addMappingToBranch(eo,to){if(!eo.length)return eo;let ro=eo.length,no=none;for(;ro;){let oo=mapEvent(eo[ro-1],to,no);if(oo.changes&&!oo.changes.empty||oo.effects.length){let io=eo.slice(0,ro);return io[ro-1]=oo,io}else to=oo.mapped,ro--,no=oo.selectionsAfter}return no.length?[HistEvent.selection(no)]:none}function mapEvent(eo,to,ro){let no=conc(eo.selectionsAfter.length?eo.selectionsAfter.map(ao=>ao.map(to)):none,ro);if(!eo.changes)return HistEvent.selection(no);let oo=eo.changes.map(to),io=to.mapDesc(eo.changes,!0),so=eo.mapped?eo.mapped.composeDesc(io):io;return new HistEvent(oo,StateEffect.mapEffects(eo.effects,to),so,eo.startSelection.map(io),no)}const joinableUserEvent=/^(input\.type|delete)($|\.)/;class HistoryState{constructor(to,ro,no=0,oo=void 0){this.done=to,this.undone=ro,this.prevTime=no,this.prevUserEvent=oo}isolate(){return this.prevTime?new HistoryState(this.done,this.undone):this}addChanges(to,ro,no,oo,io){let so=this.done,ao=so[so.length-1];return ao&&ao.changes&&!ao.changes.empty&&to.changes&&(!no||joinableUserEvent.test(no))&&(!ao.selectionsAfter.length&&ro-this.prevTime0&&ro-this.prevTimero.empty?eo.moveByChar(ro,to):rangeEnd(ro,to))}function ltrAtCursor(eo){return eo.textDirectionAt(eo.state.selection.main.head)==Direction.LTR}const cursorCharLeft=eo=>cursorByChar(eo,!ltrAtCursor(eo)),cursorCharRight=eo=>cursorByChar(eo,ltrAtCursor(eo));function cursorByGroup(eo,to){return moveSel(eo,ro=>ro.empty?eo.moveByGroup(ro,to):rangeEnd(ro,to))}const cursorGroupLeft=eo=>cursorByGroup(eo,!ltrAtCursor(eo)),cursorGroupRight=eo=>cursorByGroup(eo,ltrAtCursor(eo));function interestingNode(eo,to,ro){if(to.type.prop(ro))return!0;let no=to.to-to.from;return no&&(no>2||/[^\s,.;:]/.test(eo.sliceDoc(to.from,to.to)))||to.firstChild}function moveBySyntax(eo,to,ro){let no=syntaxTree(eo).resolveInner(to.head),oo=ro?NodeProp.closedBy:NodeProp.openedBy;for(let lo=to.head;;){let co=ro?no.childAfter(lo):no.childBefore(lo);if(!co)break;interestingNode(eo,co,oo)?no=co:lo=ro?co.to:co.from}let io=no.type.prop(oo),so,ao;return io&&(so=ro?matchBrackets(eo,no.from,1):matchBrackets(eo,no.to,-1))&&so.matched?ao=ro?so.end.to:so.end.from:ao=ro?no.to:no.from,EditorSelection.cursor(ao,ro?-1:1)}const cursorSyntaxLeft=eo=>moveSel(eo,to=>moveBySyntax(eo.state,to,!ltrAtCursor(eo))),cursorSyntaxRight=eo=>moveSel(eo,to=>moveBySyntax(eo.state,to,ltrAtCursor(eo)));function cursorByLine(eo,to){return moveSel(eo,ro=>{if(!ro.empty)return rangeEnd(ro,to);let no=eo.moveVertically(ro,to);return no.head!=ro.head?no:eo.moveToLineBoundary(ro,to)})}const cursorLineUp=eo=>cursorByLine(eo,!1),cursorLineDown=eo=>cursorByLine(eo,!0);function pageInfo(eo){let to=eo.scrollDOM.clientHeightso.empty?eo.moveVertically(so,to,ro.height):rangeEnd(so,to));if(oo.eq(no.selection))return!1;let io;if(ro.selfScroll){let so=eo.coordsAtPos(no.selection.main.head),ao=eo.scrollDOM.getBoundingClientRect(),lo=ao.top+ro.marginTop,co=ao.bottom-ro.marginBottom;so&&so.top>lo&&so.bottomcursorByPage(eo,!1),cursorPageDown=eo=>cursorByPage(eo,!0);function moveByLineBoundary(eo,to,ro){let no=eo.lineBlockAt(to.head),oo=eo.moveToLineBoundary(to,ro);if(oo.head==to.head&&oo.head!=(ro?no.to:no.from)&&(oo=eo.moveToLineBoundary(to,ro,!1)),!ro&&oo.head==no.from&&no.length){let io=/^\s*/.exec(eo.state.sliceDoc(no.from,Math.min(no.from+100,no.to)))[0].length;io&&to.head!=no.from+io&&(oo=EditorSelection.cursor(no.from+io))}return oo}const cursorLineBoundaryForward=eo=>moveSel(eo,to=>moveByLineBoundary(eo,to,!0)),cursorLineBoundaryBackward=eo=>moveSel(eo,to=>moveByLineBoundary(eo,to,!1)),cursorLineBoundaryLeft=eo=>moveSel(eo,to=>moveByLineBoundary(eo,to,!ltrAtCursor(eo))),cursorLineBoundaryRight=eo=>moveSel(eo,to=>moveByLineBoundary(eo,to,ltrAtCursor(eo))),cursorLineStart=eo=>moveSel(eo,to=>EditorSelection.cursor(eo.lineBlockAt(to.head).from,1)),cursorLineEnd=eo=>moveSel(eo,to=>EditorSelection.cursor(eo.lineBlockAt(to.head).to,-1));function toMatchingBracket(eo,to,ro){let no=!1,oo=updateSel(eo.selection,io=>{let so=matchBrackets(eo,io.head,-1)||matchBrackets(eo,io.head,1)||io.head>0&&matchBrackets(eo,io.head-1,1)||io.headtoMatchingBracket(eo,to,!1);function extendSel(eo,to){let ro=updateSel(eo.state.selection,no=>{let oo=to(no);return EditorSelection.range(no.anchor,oo.head,oo.goalColumn,oo.bidiLevel||void 0)});return ro.eq(eo.state.selection)?!1:(eo.dispatch(setSel(eo.state,ro)),!0)}function selectByChar(eo,to){return extendSel(eo,ro=>eo.moveByChar(ro,to))}const selectCharLeft=eo=>selectByChar(eo,!ltrAtCursor(eo)),selectCharRight=eo=>selectByChar(eo,ltrAtCursor(eo));function selectByGroup(eo,to){return extendSel(eo,ro=>eo.moveByGroup(ro,to))}const selectGroupLeft=eo=>selectByGroup(eo,!ltrAtCursor(eo)),selectGroupRight=eo=>selectByGroup(eo,ltrAtCursor(eo)),selectSyntaxLeft=eo=>extendSel(eo,to=>moveBySyntax(eo.state,to,!ltrAtCursor(eo))),selectSyntaxRight=eo=>extendSel(eo,to=>moveBySyntax(eo.state,to,ltrAtCursor(eo)));function selectByLine(eo,to){return extendSel(eo,ro=>eo.moveVertically(ro,to))}const selectLineUp=eo=>selectByLine(eo,!1),selectLineDown=eo=>selectByLine(eo,!0);function selectByPage(eo,to){return extendSel(eo,ro=>eo.moveVertically(ro,to,pageInfo(eo).height))}const selectPageUp=eo=>selectByPage(eo,!1),selectPageDown=eo=>selectByPage(eo,!0),selectLineBoundaryForward=eo=>extendSel(eo,to=>moveByLineBoundary(eo,to,!0)),selectLineBoundaryBackward=eo=>extendSel(eo,to=>moveByLineBoundary(eo,to,!1)),selectLineBoundaryLeft=eo=>extendSel(eo,to=>moveByLineBoundary(eo,to,!ltrAtCursor(eo))),selectLineBoundaryRight=eo=>extendSel(eo,to=>moveByLineBoundary(eo,to,ltrAtCursor(eo))),selectLineStart=eo=>extendSel(eo,to=>EditorSelection.cursor(eo.lineBlockAt(to.head).from)),selectLineEnd=eo=>extendSel(eo,to=>EditorSelection.cursor(eo.lineBlockAt(to.head).to)),cursorDocStart=({state:eo,dispatch:to})=>(to(setSel(eo,{anchor:0})),!0),cursorDocEnd=({state:eo,dispatch:to})=>(to(setSel(eo,{anchor:eo.doc.length})),!0),selectDocStart=({state:eo,dispatch:to})=>(to(setSel(eo,{anchor:eo.selection.main.anchor,head:0})),!0),selectDocEnd=({state:eo,dispatch:to})=>(to(setSel(eo,{anchor:eo.selection.main.anchor,head:eo.doc.length})),!0),selectAll=({state:eo,dispatch:to})=>(to(eo.update({selection:{anchor:0,head:eo.doc.length},userEvent:"select"})),!0),selectLine=({state:eo,dispatch:to})=>{let ro=selectedLineBlocks(eo).map(({from:no,to:oo})=>EditorSelection.range(no,Math.min(oo+1,eo.doc.length)));return to(eo.update({selection:EditorSelection.create(ro),userEvent:"select"})),!0},selectParentSyntax=({state:eo,dispatch:to})=>{let ro=updateSel(eo.selection,no=>{var oo;let io=syntaxTree(eo).resolveStack(no.from,1);for(let so=io;so;so=so.next){let{node:ao}=so;if((ao.from=no.to||ao.to>no.to&&ao.from<=no.from)&&(!((oo=ao.parent)===null||oo===void 0)&&oo.parent))return EditorSelection.range(ao.to,ao.from)}return no});return to(setSel(eo,ro)),!0},simplifySelection=({state:eo,dispatch:to})=>{let ro=eo.selection,no=null;return ro.ranges.length>1?no=EditorSelection.create([ro.main]):ro.main.empty||(no=EditorSelection.create([EditorSelection.cursor(ro.main.head)])),no?(to(setSel(eo,no)),!0):!1};function deleteBy(eo,to){if(eo.state.readOnly)return!1;let ro="delete.selection",{state:no}=eo,oo=no.changeByRange(io=>{let{from:so,to:ao}=io;if(so==ao){let lo=to(io);loso&&(ro="delete.forward",lo=skipAtomic(eo,lo,!0)),so=Math.min(so,lo),ao=Math.max(ao,lo)}else so=skipAtomic(eo,so,!1),ao=skipAtomic(eo,ao,!0);return so==ao?{range:io}:{changes:{from:so,to:ao},range:EditorSelection.cursor(so,sooo(eo)))no.between(to,to,(oo,io)=>{ooto&&(to=ro?io:oo)});return to}const deleteByChar=(eo,to)=>deleteBy(eo,ro=>{let no=ro.from,{state:oo}=eo,io=oo.doc.lineAt(no),so,ao;if(!to&&no>io.from&&nodeleteByChar(eo,!1),deleteCharForward=eo=>deleteByChar(eo,!0),deleteByGroup=(eo,to)=>deleteBy(eo,ro=>{let no=ro.head,{state:oo}=eo,io=oo.doc.lineAt(no),so=oo.charCategorizer(no);for(let ao=null;;){if(no==(to?io.to:io.from)){no==ro.head&&io.number!=(to?oo.doc.lines:1)&&(no+=to?1:-1);break}let lo=findClusterBreak(io.text,no-io.from,to)+io.from,co=io.text.slice(Math.min(no,lo)-io.from,Math.max(no,lo)-io.from),uo=so(co);if(ao!=null&&uo!=ao)break;(co!=" "||no!=ro.head)&&(ao=uo),no=lo}return no}),deleteGroupBackward=eo=>deleteByGroup(eo,!1),deleteGroupForward=eo=>deleteByGroup(eo,!0),deleteToLineEnd=eo=>deleteBy(eo,to=>{let ro=eo.lineBlockAt(to.head).to;return to.headdeleteBy(eo,to=>{let ro=eo.moveToLineBoundary(to,!1).head;return to.head>ro?ro:Math.max(0,to.head-1)}),deleteLineBoundaryForward=eo=>deleteBy(eo,to=>{let ro=eo.moveToLineBoundary(to,!0).head;return to.head{if(eo.readOnly)return!1;let ro=eo.changeByRange(no=>({changes:{from:no.from,to:no.to,insert:Text$1.of(["",""])},range:EditorSelection.cursor(no.from)}));return to(eo.update(ro,{scrollIntoView:!0,userEvent:"input"})),!0},transposeChars=({state:eo,dispatch:to})=>{if(eo.readOnly)return!1;let ro=eo.changeByRange(no=>{if(!no.empty||no.from==0||no.from==eo.doc.length)return{range:no};let oo=no.from,io=eo.doc.lineAt(oo),so=oo==io.from?oo-1:findClusterBreak(io.text,oo-io.from,!1)+io.from,ao=oo==io.to?oo+1:findClusterBreak(io.text,oo-io.from,!0)+io.from;return{changes:{from:so,to:ao,insert:eo.doc.slice(oo,ao).append(eo.doc.slice(so,oo))},range:EditorSelection.cursor(ao)}});return ro.changes.empty?!1:(to(eo.update(ro,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function selectedLineBlocks(eo){let to=[],ro=-1;for(let no of eo.selection.ranges){let oo=eo.doc.lineAt(no.from),io=eo.doc.lineAt(no.to);if(!no.empty&&no.to==io.from&&(io=eo.doc.lineAt(no.to-1)),ro>=oo.number){let so=to[to.length-1];so.to=io.to,so.ranges.push(no)}else to.push({from:oo.from,to:io.to,ranges:[no]});ro=io.number+1}return to}function moveLine(eo,to,ro){if(eo.readOnly)return!1;let no=[],oo=[];for(let io of selectedLineBlocks(eo)){if(ro?io.to==eo.doc.length:io.from==0)continue;let so=eo.doc.lineAt(ro?io.to+1:io.from-1),ao=so.length+1;if(ro){no.push({from:io.to,to:so.to},{from:io.from,insert:so.text+eo.lineBreak});for(let lo of io.ranges)oo.push(EditorSelection.range(Math.min(eo.doc.length,lo.anchor+ao),Math.min(eo.doc.length,lo.head+ao)))}else{no.push({from:so.from,to:io.from},{from:io.to,insert:eo.lineBreak+so.text});for(let lo of io.ranges)oo.push(EditorSelection.range(lo.anchor-ao,lo.head-ao))}}return no.length?(to(eo.update({changes:no,scrollIntoView:!0,selection:EditorSelection.create(oo,eo.selection.mainIndex),userEvent:"move.line"})),!0):!1}const moveLineUp=({state:eo,dispatch:to})=>moveLine(eo,to,!1),moveLineDown=({state:eo,dispatch:to})=>moveLine(eo,to,!0);function copyLine(eo,to,ro){if(eo.readOnly)return!1;let no=[];for(let oo of selectedLineBlocks(eo))ro?no.push({from:oo.from,insert:eo.doc.slice(oo.from,oo.to)+eo.lineBreak}):no.push({from:oo.to,insert:eo.lineBreak+eo.doc.slice(oo.from,oo.to)});return to(eo.update({changes:no,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const copyLineUp=({state:eo,dispatch:to})=>copyLine(eo,to,!1),copyLineDown=({state:eo,dispatch:to})=>copyLine(eo,to,!0),deleteLine=eo=>{if(eo.state.readOnly)return!1;let{state:to}=eo,ro=to.changes(selectedLineBlocks(to).map(({from:oo,to:io})=>(oo>0?oo--:ioeo.moveVertically(oo,!0)).map(ro);return eo.dispatch({changes:ro,selection:no,scrollIntoView:!0,userEvent:"delete.line"}),!0};function isBetweenBrackets(eo,to){if(/\(\)|\[\]|\{\}/.test(eo.sliceDoc(to-1,to+1)))return{from:to,to};let ro=syntaxTree(eo).resolveInner(to),no=ro.childBefore(to),oo=ro.childAfter(to),io;return no&&oo&&no.to<=to&&oo.from>=to&&(io=no.type.prop(NodeProp.closedBy))&&io.indexOf(oo.name)>-1&&eo.doc.lineAt(no.to).from==eo.doc.lineAt(oo.from).from&&!/\S/.test(eo.sliceDoc(no.to,oo.from))?{from:no.to,to:oo.from}:null}const insertNewlineAndIndent=newlineAndIndent(!1),insertBlankLine=newlineAndIndent(!0);function newlineAndIndent(eo){return({state:to,dispatch:ro})=>{if(to.readOnly)return!1;let no=to.changeByRange(oo=>{let{from:io,to:so}=oo,ao=to.doc.lineAt(io),lo=!eo&&io==so&&isBetweenBrackets(to,io);eo&&(io=so=(so<=ao.to?ao:to.doc.lineAt(so)).to);let co=new IndentContext(to,{simulateBreak:io,simulateDoubleBreak:!!lo}),uo=getIndentation(co,io);for(uo==null&&(uo=countColumn(/^\s*/.exec(to.doc.lineAt(io).text)[0],to.tabSize));soao.from&&io{let oo=[];for(let so=no.from;so<=no.to;){let ao=eo.doc.lineAt(so);ao.number>ro&&(no.empty||no.to>ao.from)&&(to(ao,oo,no),ro=ao.number),so=ao.to+1}let io=eo.changes(oo);return{changes:oo,range:EditorSelection.range(io.mapPos(no.anchor,1),io.mapPos(no.head,1))}})}const indentSelection=({state:eo,dispatch:to})=>{if(eo.readOnly)return!1;let ro=Object.create(null),no=new IndentContext(eo,{overrideIndentation:io=>{let so=ro[io];return so??-1}}),oo=changeBySelectedLine(eo,(io,so,ao)=>{let lo=getIndentation(no,io.from);if(lo==null)return;/\S/.test(io.text)||(lo=0);let co=/^\s*/.exec(io.text)[0],uo=indentString(eo,lo);(co!=uo||ao.fromeo.readOnly?!1:(to(eo.update(changeBySelectedLine(eo,(ro,no)=>{no.push({from:ro.from,insert:eo.facet(indentUnit)})}),{userEvent:"input.indent"})),!0),indentLess=({state:eo,dispatch:to})=>eo.readOnly?!1:(to(eo.update(changeBySelectedLine(eo,(ro,no)=>{let oo=/^\s*/.exec(ro.text)[0];if(!oo)return;let io=countColumn(oo,eo.tabSize),so=0,ao=indentString(eo,Math.max(0,io-getIndentUnit(eo)));for(;so({mac:eo.key,run:eo.run,shift:eo.shift}))),defaultKeymap=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:cursorSyntaxLeft,shift:selectSyntaxLeft},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:cursorSyntaxRight,shift:selectSyntaxRight},{key:"Alt-ArrowUp",run:moveLineUp},{key:"Shift-Alt-ArrowUp",run:copyLineUp},{key:"Alt-ArrowDown",run:moveLineDown},{key:"Shift-Alt-ArrowDown",run:copyLineDown},{key:"Escape",run:simplifySelection},{key:"Mod-Enter",run:insertBlankLine},{key:"Alt-l",mac:"Ctrl-l",run:selectLine},{key:"Mod-i",run:selectParentSyntax,preventDefault:!0},{key:"Mod-[",run:indentLess},{key:"Mod-]",run:indentMore},{key:"Mod-Alt-\\",run:indentSelection},{key:"Shift-Mod-k",run:deleteLine},{key:"Shift-Mod-\\",run:cursorMatchingBracket},{key:"Mod-/",run:toggleComment},{key:"Alt-A",run:toggleBlockComment}].concat(standardKeymap),indentWithTab={key:"Tab",run:indentMore,shift:indentLess};function crelt(){var eo=arguments[0];typeof eo=="string"&&(eo=document.createElement(eo));var to=1,ro=arguments[1];if(ro&&typeof ro=="object"&&ro.nodeType==null&&!Array.isArray(ro)){for(var no in ro)if(Object.prototype.hasOwnProperty.call(ro,no)){var oo=ro[no];typeof oo=="string"?eo.setAttribute(no,oo):oo!=null&&(eo[no]=oo)}to++}for(;toeo.normalize("NFKD"):eo=>eo;class SearchCursor{constructor(to,ro,no=0,oo=to.length,io,so){this.test=so,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=to.iterRange(no,oo),this.bufferStart=no,this.normalize=io?ao=>io(basicNormalize(ao)):basicNormalize,this.query=this.normalize(ro)}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 codePointAt(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let to=this.peek();if(to<0)return this.done=!0,this;let ro=fromCodePoint(to),no=this.bufferStart+this.bufferPos;this.bufferPos+=codePointSize(to);let oo=this.normalize(ro);for(let io=0,so=no;;io++){let ao=oo.charCodeAt(io),lo=this.match(ao,so,this.bufferPos+this.bufferStart);if(io==oo.length-1){if(lo)return this.value=lo,this;break}so==no&&iothis.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 to=this.matchPos-this.curLineStart;;){this.re.lastIndex=to;let ro=this.matchPos<=this.to&&this.re.exec(this.curLine);if(ro){let no=this.curLineStart+ro.index,oo=no+ro[0].length;if(this.matchPos=toCharEnd(this.text,oo+(no==oo?1:0)),no==this.curLineStart+this.curLine.length&&this.nextLine(),(nothis.value.to)&&(!this.test||this.test(no,oo,ro)))return this.value={from:no,to:oo,match:ro},this;to=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=no||oo.to<=ro){let ao=new FlattenedDoc(ro,to.sliceString(ro,no));return flattened.set(to,ao),ao}if(oo.from==ro&&oo.to==no)return oo;let{text:io,from:so}=oo;return so>ro&&(io=to.sliceString(ro,so)+io,so=ro),oo.to=this.to?this.to:this.text.lineAt(to).to}next(){for(;;){let to=this.re.lastIndex=this.matchPos-this.flat.from,ro=this.re.exec(this.flat.text);if(ro&&!ro[0]&&ro.index==to&&(this.re.lastIndex=to+1,ro=this.re.exec(this.flat.text)),ro){let no=this.flat.from+ro.index,oo=no+ro[0].length;if((this.flat.to>=this.to||ro.index+ro[0].length<=this.flat.text.length-10)&&(!this.test||this.test(no,oo,ro)))return this.value={from:no,to:oo,match:ro},this.matchPos=toCharEnd(this.text,oo+(no==oo?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=FlattenedDoc.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(RegExpCursor.prototype[Symbol.iterator]=MultilineRegExpCursor.prototype[Symbol.iterator]=function(){return this});function validRegExp(eo){try{return new RegExp(eo,baseFlags),!0}catch{return!1}}function toCharEnd(eo,to){if(to>=eo.length)return to;let ro=eo.lineAt(to),no;for(;to=56320&&no<57344;)to++;return to}function createLineDialog(eo){let to=String(eo.state.doc.lineAt(eo.state.selection.main.head).number),ro=crelt("input",{class:"cm-textfield",name:"line",value:to}),no=crelt("form",{class:"cm-gotoLine",onkeydown:io=>{io.keyCode==27?(io.preventDefault(),eo.dispatch({effects:dialogEffect.of(!1)}),eo.focus()):io.keyCode==13&&(io.preventDefault(),oo())},onsubmit:io=>{io.preventDefault(),oo()}},crelt("label",eo.state.phrase("Go to line"),": ",ro)," ",crelt("button",{class:"cm-button",type:"submit"},eo.state.phrase("go")));function oo(){let io=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(ro.value);if(!io)return;let{state:so}=eo,ao=so.doc.lineAt(so.selection.main.head),[,lo,co,uo,fo]=io,ho=uo?+uo.slice(1):0,po=co?+co:ao.number;if(co&&fo){let yo=po/100;lo&&(yo=yo*(lo=="-"?-1:1)+ao.number/so.doc.lines),po=Math.round(so.doc.lines*yo)}else co&&lo&&(po=po*(lo=="-"?-1:1)+ao.number);let go=so.doc.line(Math.max(1,Math.min(so.doc.lines,po))),vo=EditorSelection.cursor(go.from+Math.max(0,Math.min(ho,go.length)));eo.dispatch({effects:[dialogEffect.of(!1),EditorView.scrollIntoView(vo.from,{y:"center"})],selection:vo}),eo.focus()}return{dom:no}}const dialogEffect=StateEffect.define(),dialogField=StateField.define({create(){return!0},update(eo,to){for(let ro of to.effects)ro.is(dialogEffect)&&(eo=ro.value);return eo},provide:eo=>showPanel.from(eo,to=>to?createLineDialog:null)}),gotoLine=eo=>{let to=getPanel(eo,createLineDialog);if(!to){let ro=[dialogEffect.of(!0)];eo.state.field(dialogField,!1)==null&&ro.push(StateEffect.appendConfig.of([dialogField,baseTheme$1])),eo.dispatch({effects:ro}),to=getPanel(eo,createLineDialog)}return to&&to.dom.querySelector("input").select(),!0},baseTheme$1=EditorView.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),defaultHighlightOptions={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},highlightConfig=Facet.define({combine(eo){return combineConfig(eo,defaultHighlightOptions,{highlightWordAroundCursor:(to,ro)=>to||ro,minSelectionLength:Math.min,maxMatches:Math.min})}});function highlightSelectionMatches(eo){let to=[defaultTheme,matchHighlighter];return eo&&to.push(highlightConfig.of(eo)),to}const matchDeco=Decoration.mark({class:"cm-selectionMatch"}),mainMatchDeco=Decoration.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function insideWordBoundaries(eo,to,ro,no){return(ro==0||eo(to.sliceDoc(ro-1,ro))!=CharCategory.Word)&&(no==to.doc.length||eo(to.sliceDoc(no,no+1))!=CharCategory.Word)}function insideWord(eo,to,ro,no){return eo(to.sliceDoc(ro,ro+1))==CharCategory.Word&&eo(to.sliceDoc(no-1,no))==CharCategory.Word}const matchHighlighter=ViewPlugin.fromClass(class{constructor(eo){this.decorations=this.getDeco(eo)}update(eo){(eo.selectionSet||eo.docChanged||eo.viewportChanged)&&(this.decorations=this.getDeco(eo.view))}getDeco(eo){let to=eo.state.facet(highlightConfig),{state:ro}=eo,no=ro.selection;if(no.ranges.length>1)return Decoration.none;let oo=no.main,io,so=null;if(oo.empty){if(!to.highlightWordAroundCursor)return Decoration.none;let lo=ro.wordAt(oo.head);if(!lo)return Decoration.none;so=ro.charCategorizer(oo.head),io=ro.sliceDoc(lo.from,lo.to)}else{let lo=oo.to-oo.from;if(lo200)return Decoration.none;if(to.wholeWords){if(io=ro.sliceDoc(oo.from,oo.to),so=ro.charCategorizer(oo.head),!(insideWordBoundaries(so,ro,oo.from,oo.to)&&insideWord(so,ro,oo.from,oo.to)))return Decoration.none}else if(io=ro.sliceDoc(oo.from,oo.to),!io)return Decoration.none}let ao=[];for(let lo of eo.visibleRanges){let co=new SearchCursor(ro.doc,io,lo.from,lo.to);for(;!co.next().done;){let{from:uo,to:fo}=co.value;if((!so||insideWordBoundaries(so,ro,uo,fo))&&(oo.empty&&uo<=oo.from&&fo>=oo.to?ao.push(mainMatchDeco.range(uo,fo)):(uo>=oo.to||fo<=oo.from)&&ao.push(matchDeco.range(uo,fo)),ao.length>to.maxMatches))return Decoration.none}}return Decoration.set(ao)}},{decorations:eo=>eo.decorations}),defaultTheme=EditorView.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),selectWord=({state:eo,dispatch:to})=>{let{selection:ro}=eo,no=EditorSelection.create(ro.ranges.map(oo=>eo.wordAt(oo.head)||EditorSelection.cursor(oo.head)),ro.mainIndex);return no.eq(ro)?!1:(to(eo.update({selection:no})),!0)};function findNextOccurrence(eo,to){let{main:ro,ranges:no}=eo.selection,oo=eo.wordAt(ro.head),io=oo&&oo.from==ro.from&&oo.to==ro.to;for(let so=!1,ao=new SearchCursor(eo.doc,to,no[no.length-1].to);;)if(ao.next(),ao.done){if(so)return null;ao=new SearchCursor(eo.doc,to,0,Math.max(0,no[no.length-1].from-1)),so=!0}else{if(so&&no.some(lo=>lo.from==ao.value.from))continue;if(io){let lo=eo.wordAt(ao.value.from);if(!lo||lo.from!=ao.value.from||lo.to!=ao.value.to)continue}return ao.value}}const selectNextOccurrence=({state:eo,dispatch:to})=>{let{ranges:ro}=eo.selection;if(ro.some(io=>io.from===io.to))return selectWord({state:eo,dispatch:to});let no=eo.sliceDoc(ro[0].from,ro[0].to);if(eo.selection.ranges.some(io=>eo.sliceDoc(io.from,io.to)!=no))return!1;let oo=findNextOccurrence(eo,no);return oo?(to(eo.update({selection:eo.selection.addRange(EditorSelection.range(oo.from,oo.to),!1),effects:EditorView.scrollIntoView(oo.to)})),!0):!1},searchConfigFacet=Facet.define({combine(eo){return combineConfig(eo,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:to=>new SearchPanel(to),scrollToMatch:to=>EditorView.scrollIntoView(to)})}});class SearchQuery{constructor(to){this.search=to.search,this.caseSensitive=!!to.caseSensitive,this.literal=!!to.literal,this.regexp=!!to.regexp,this.replace=to.replace||"",this.valid=!!this.search&&(!this.regexp||validRegExp(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!to.wholeWord}unquote(to){return this.literal?to:to.replace(/\\([nrt\\])/g,(ro,no)=>no=="n"?` -`:no=="r"?"\r":no=="t"?" ":"\\")}eq(to){return this.search==to.search&&this.replace==to.replace&&this.caseSensitive==to.caseSensitive&&this.regexp==to.regexp&&this.wholeWord==to.wholeWord}create(){return this.regexp?new RegExpQuery(this):new StringQuery(this)}getCursor(to,ro=0,no){let oo=to.doc?to:EditorState.create({doc:to});return no==null&&(no=oo.doc.length),this.regexp?regexpCursor(this,oo,ro,no):stringCursor(this,oo,ro,no)}}class QueryType{constructor(to){this.spec=to}}function stringCursor(eo,to,ro,no){return new SearchCursor(to.doc,eo.unquoted,ro,no,eo.caseSensitive?void 0:oo=>oo.toLowerCase(),eo.wholeWord?stringWordTest(to.doc,to.charCategorizer(to.selection.main.head)):void 0)}function stringWordTest(eo,to){return(ro,no,oo,io)=>((io>ro||io+oo.length=ro)return null;oo.push(no.value)}return oo}highlight(to,ro,no,oo){let io=stringCursor(this.spec,to,Math.max(0,ro-this.spec.unquoted.length),Math.min(no+this.spec.unquoted.length,to.doc.length));for(;!io.next().done;)oo(io.value.from,io.value.to)}}function regexpCursor(eo,to,ro,no){return new RegExpCursor(to.doc,eo.search,{ignoreCase:!eo.caseSensitive,test:eo.wholeWord?regexpWordTest(to.charCategorizer(to.selection.main.head)):void 0},ro,no)}function charBefore(eo,to){return eo.slice(findClusterBreak(eo,to,!1),to)}function charAfter(eo,to){return eo.slice(to,findClusterBreak(eo,to))}function regexpWordTest(eo){return(to,ro,no)=>!no[0].length||(eo(charBefore(no.input,no.index))!=CharCategory.Word||eo(charAfter(no.input,no.index))!=CharCategory.Word)&&(eo(charAfter(no.input,no.index+no[0].length))!=CharCategory.Word||eo(charBefore(no.input,no.index+no[0].length))!=CharCategory.Word)}class RegExpQuery extends QueryType{nextMatch(to,ro,no){let oo=regexpCursor(this.spec,to,no,to.doc.length).next();return oo.done&&(oo=regexpCursor(this.spec,to,0,ro).next()),oo.done?null:oo.value}prevMatchInRange(to,ro,no){for(let oo=1;;oo++){let io=Math.max(ro,no-oo*1e4),so=regexpCursor(this.spec,to,io,no),ao=null;for(;!so.next().done;)ao=so.value;if(ao&&(io==ro||ao.from>io+10))return ao;if(io==ro)return null}}prevMatch(to,ro,no){return this.prevMatchInRange(to,0,ro)||this.prevMatchInRange(to,no,to.doc.length)}getReplacement(to){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(ro,no)=>no=="$"?"$":no=="&"?to.match[0]:no!="0"&&+no=ro)return null;oo.push(no.value)}return oo}highlight(to,ro,no,oo){let io=regexpCursor(this.spec,to,Math.max(0,ro-250),Math.min(no+250,to.doc.length));for(;!io.next().done;)oo(io.value.from,io.value.to)}}const setSearchQuery=StateEffect.define(),togglePanel$1=StateEffect.define(),searchState=StateField.define({create(eo){return new SearchState(defaultQuery(eo).create(),null)},update(eo,to){for(let ro of to.effects)ro.is(setSearchQuery)?eo=new SearchState(ro.value.create(),eo.panel):ro.is(togglePanel$1)&&(eo=new SearchState(eo.query,ro.value?createSearchPanel:null));return eo},provide:eo=>showPanel.from(eo,to=>to.panel)});class SearchState{constructor(to,ro){this.query=to,this.panel=ro}}const matchMark=Decoration.mark({class:"cm-searchMatch"}),selectedMatchMark=Decoration.mark({class:"cm-searchMatch cm-searchMatch-selected"}),searchHighlighter=ViewPlugin.fromClass(class{constructor(eo){this.view=eo,this.decorations=this.highlight(eo.state.field(searchState))}update(eo){let to=eo.state.field(searchState);(to!=eo.startState.field(searchState)||eo.docChanged||eo.selectionSet||eo.viewportChanged)&&(this.decorations=this.highlight(to))}highlight({query:eo,panel:to}){if(!to||!eo.spec.valid)return Decoration.none;let{view:ro}=this,no=new RangeSetBuilder;for(let oo=0,io=ro.visibleRanges,so=io.length;ooio[oo+1].from-2*250;)lo=io[++oo].to;eo.highlight(ro.state,ao,lo,(co,uo)=>{let fo=ro.state.selection.ranges.some(ho=>ho.from==co&&ho.to==uo);no.add(co,uo,fo?selectedMatchMark:matchMark)})}return no.finish()}},{decorations:eo=>eo.decorations});function searchCommand(eo){return to=>{let ro=to.state.field(searchState,!1);return ro&&ro.query.spec.valid?eo(to,ro):openSearchPanel(to)}}const findNext=searchCommand((eo,{query:to})=>{let{to:ro}=eo.state.selection.main,no=to.nextMatch(eo.state,ro,ro);if(!no)return!1;let oo=EditorSelection.single(no.from,no.to),io=eo.state.facet(searchConfigFacet);return eo.dispatch({selection:oo,effects:[announceMatch(eo,no),io.scrollToMatch(oo.main,eo)],userEvent:"select.search"}),selectSearchInput(eo),!0}),findPrevious=searchCommand((eo,{query:to})=>{let{state:ro}=eo,{from:no}=ro.selection.main,oo=to.prevMatch(ro,no,no);if(!oo)return!1;let io=EditorSelection.single(oo.from,oo.to),so=eo.state.facet(searchConfigFacet);return eo.dispatch({selection:io,effects:[announceMatch(eo,oo),so.scrollToMatch(io.main,eo)],userEvent:"select.search"}),selectSearchInput(eo),!0}),selectMatches=searchCommand((eo,{query:to})=>{let ro=to.matchAll(eo.state,1e3);return!ro||!ro.length?!1:(eo.dispatch({selection:EditorSelection.create(ro.map(no=>EditorSelection.range(no.from,no.to))),userEvent:"select.search.matches"}),!0)}),selectSelectionMatches=({state:eo,dispatch:to})=>{let ro=eo.selection;if(ro.ranges.length>1||ro.main.empty)return!1;let{from:no,to:oo}=ro.main,io=[],so=0;for(let ao=new SearchCursor(eo.doc,eo.sliceDoc(no,oo));!ao.next().done;){if(io.length>1e3)return!1;ao.value.from==no&&(so=io.length),io.push(EditorSelection.range(ao.value.from,ao.value.to))}return to(eo.update({selection:EditorSelection.create(io,so),userEvent:"select.search.matches"})),!0},replaceNext=searchCommand((eo,{query:to})=>{let{state:ro}=eo,{from:no,to:oo}=ro.selection.main;if(ro.readOnly)return!1;let io=to.nextMatch(ro,no,no);if(!io)return!1;let so=[],ao,lo,co=[];if(io.from==no&&io.to==oo&&(lo=ro.toText(to.getReplacement(io)),so.push({from:io.from,to:io.to,insert:lo}),io=to.nextMatch(ro,io.from,io.to),co.push(EditorView.announce.of(ro.phrase("replaced match on line $",ro.doc.lineAt(no).number)+"."))),io){let uo=so.length==0||so[0].from>=io.to?0:io.to-io.from-lo.length;ao=EditorSelection.single(io.from-uo,io.to-uo),co.push(announceMatch(eo,io)),co.push(ro.facet(searchConfigFacet).scrollToMatch(ao.main,eo))}return eo.dispatch({changes:so,selection:ao,effects:co,userEvent:"input.replace"}),!0}),replaceAll=searchCommand((eo,{query:to})=>{if(eo.state.readOnly)return!1;let ro=to.matchAll(eo.state,1e9).map(oo=>{let{from:io,to:so}=oo;return{from:io,to:so,insert:to.getReplacement(oo)}});if(!ro.length)return!1;let no=eo.state.phrase("replaced $ matches",ro.length)+".";return eo.dispatch({changes:ro,effects:EditorView.announce.of(no),userEvent:"input.replace.all"}),!0});function createSearchPanel(eo){return eo.state.facet(searchConfigFacet).createPanel(eo)}function defaultQuery(eo,to){var ro,no,oo,io,so;let ao=eo.selection.main,lo=ao.empty||ao.to>ao.from+100?"":eo.sliceDoc(ao.from,ao.to);if(to&&!lo)return to;let co=eo.facet(searchConfigFacet);return new SearchQuery({search:((ro=to==null?void 0:to.literal)!==null&&ro!==void 0?ro:co.literal)?lo:lo.replace(/\n/g,"\\n"),caseSensitive:(no=to==null?void 0:to.caseSensitive)!==null&&no!==void 0?no:co.caseSensitive,literal:(oo=to==null?void 0:to.literal)!==null&&oo!==void 0?oo:co.literal,regexp:(io=to==null?void 0:to.regexp)!==null&&io!==void 0?io:co.regexp,wholeWord:(so=to==null?void 0:to.wholeWord)!==null&&so!==void 0?so:co.wholeWord})}function getSearchInput(eo){let to=getPanel(eo,createSearchPanel);return to&&to.dom.querySelector("[main-field]")}function selectSearchInput(eo){let to=getSearchInput(eo);to&&to==eo.root.activeElement&&to.select()}const openSearchPanel=eo=>{let to=eo.state.field(searchState,!1);if(to&&to.panel){let ro=getSearchInput(eo);if(ro&&ro!=eo.root.activeElement){let no=defaultQuery(eo.state,to.query.spec);no.valid&&eo.dispatch({effects:setSearchQuery.of(no)}),ro.focus(),ro.select()}}else eo.dispatch({effects:[togglePanel$1.of(!0),to?setSearchQuery.of(defaultQuery(eo.state,to.query.spec)):StateEffect.appendConfig.of(searchExtensions)]});return!0},closeSearchPanel=eo=>{let to=eo.state.field(searchState,!1);if(!to||!to.panel)return!1;let ro=getPanel(eo,createSearchPanel);return ro&&ro.dom.contains(eo.root.activeElement)&&eo.focus(),eo.dispatch({effects:togglePanel$1.of(!1)}),!0},searchKeymap=[{key:"Mod-f",run:openSearchPanel,scope:"editor search-panel"},{key:"F3",run:findNext,shift:findPrevious,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:findNext,shift:findPrevious,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:closeSearchPanel,scope:"editor search-panel"},{key:"Mod-Shift-l",run:selectSelectionMatches},{key:"Mod-Alt-g",run:gotoLine},{key:"Mod-d",run:selectNextOccurrence,preventDefault:!0}];class SearchPanel{constructor(to){this.view=to;let ro=this.query=to.state.field(searchState).query.spec;this.commit=this.commit.bind(this),this.searchField=crelt("input",{value:ro.search,placeholder:phrase(to,"Find"),"aria-label":phrase(to,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=crelt("input",{value:ro.replace,placeholder:phrase(to,"Replace"),"aria-label":phrase(to,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=crelt("input",{type:"checkbox",name:"case",form:"",checked:ro.caseSensitive,onchange:this.commit}),this.reField=crelt("input",{type:"checkbox",name:"re",form:"",checked:ro.regexp,onchange:this.commit}),this.wordField=crelt("input",{type:"checkbox",name:"word",form:"",checked:ro.wholeWord,onchange:this.commit});function no(oo,io,so){return crelt("button",{class:"cm-button",name:oo,onclick:io,type:"button"},so)}this.dom=crelt("div",{onkeydown:oo=>this.keydown(oo),class:"cm-search"},[this.searchField,no("next",()=>findNext(to),[phrase(to,"next")]),no("prev",()=>findPrevious(to),[phrase(to,"previous")]),no("select",()=>selectMatches(to),[phrase(to,"all")]),crelt("label",null,[this.caseField,phrase(to,"match case")]),crelt("label",null,[this.reField,phrase(to,"regexp")]),crelt("label",null,[this.wordField,phrase(to,"by word")]),...to.state.readOnly?[]:[crelt("br"),this.replaceField,no("replace",()=>replaceNext(to),[phrase(to,"replace")]),no("replaceAll",()=>replaceAll(to),[phrase(to,"replace all")])],crelt("button",{name:"close",onclick:()=>closeSearchPanel(to),"aria-label":phrase(to,"close"),type:"button"},["×"])])}commit(){let to=new SearchQuery({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});to.eq(this.query)||(this.query=to,this.view.dispatch({effects:setSearchQuery.of(to)}))}keydown(to){runScopeHandlers(this.view,to,"search-panel")?to.preventDefault():to.keyCode==13&&to.target==this.searchField?(to.preventDefault(),(to.shiftKey?findPrevious:findNext)(this.view)):to.keyCode==13&&to.target==this.replaceField&&(to.preventDefault(),replaceNext(this.view))}update(to){for(let ro of to.transactions)for(let no of ro.effects)no.is(setSearchQuery)&&!no.value.eq(this.query)&&this.setQuery(no.value)}setQuery(to){this.query=to,this.searchField.value=to.search,this.replaceField.value=to.replace,this.caseField.checked=to.caseSensitive,this.reField.checked=to.regexp,this.wordField.checked=to.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(searchConfigFacet).top}}function phrase(eo,to){return eo.state.phrase(to)}const AnnounceMargin=30,Break=/[\s\.,:;?!]/;function announceMatch(eo,{from:to,to:ro}){let no=eo.state.doc.lineAt(to),oo=eo.state.doc.lineAt(ro).to,io=Math.max(no.from,to-AnnounceMargin),so=Math.min(oo,ro+AnnounceMargin),ao=eo.state.sliceDoc(io,so);if(io!=no.from){for(let lo=0;loao.length-AnnounceMargin;lo--)if(!Break.test(ao[lo-1])&&Break.test(ao[lo])){ao=ao.slice(0,lo);break}}return EditorView.announce.of(`${eo.state.phrase("current match")}. ${ao} ${eo.state.phrase("on line")} ${no.number}.`)}const baseTheme$2=EditorView.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"}}),searchExtensions=[searchState,Prec.low(searchHighlighter),baseTheme$2];class SelectedDiagnostic{constructor(to,ro,no){this.from=to,this.to=ro,this.diagnostic=no}}class LintState{constructor(to,ro,no){this.diagnostics=to,this.panel=ro,this.selected=no}static init(to,ro,no){let oo=to,io=no.facet(lintConfig).markerFilter;io&&(oo=io(oo,no));let so=Decoration.set(oo.map(ao=>ao.from==ao.to||ao.from==ao.to-1&&no.doc.lineAt(ao.from).to==ao.from?Decoration.widget({widget:new DiagnosticWidget(ao),diagnostic:ao}).range(ao.from):Decoration.mark({attributes:{class:"cm-lintRange cm-lintRange-"+ao.severity+(ao.markClass?" "+ao.markClass:"")},diagnostic:ao,inclusive:!0}).range(ao.from,ao.to)),!0);return new LintState(so,ro,findDiagnostic(so))}}function findDiagnostic(eo,to=null,ro=0){let no=null;return eo.between(ro,1e9,(oo,io,{spec:so})=>{if(!(to&&so.diagnostic!=to))return no=new SelectedDiagnostic(oo,io,so.diagnostic),!1}),no}function hideTooltip(eo,to){let ro=eo.startState.doc.lineAt(to.pos);return!!(eo.effects.some(no=>no.is(setDiagnosticsEffect))||eo.changes.touchesRange(ro.from,ro.to))}function maybeEnableLint(eo,to){return eo.field(lintState,!1)?to:to.concat(StateEffect.appendConfig.of(lintExtensions))}const setDiagnosticsEffect=StateEffect.define(),togglePanel=StateEffect.define(),movePanelSelection=StateEffect.define(),lintState=StateField.define({create(){return new LintState(Decoration.none,null,null)},update(eo,to){if(to.docChanged){let ro=eo.diagnostics.map(to.changes),no=null;if(eo.selected){let oo=to.changes.mapPos(eo.selected.from,1);no=findDiagnostic(ro,eo.selected.diagnostic,oo)||findDiagnostic(ro,null,oo)}eo=new LintState(ro,eo.panel,no)}for(let ro of to.effects)ro.is(setDiagnosticsEffect)?eo=LintState.init(ro.value,eo.panel,to.state):ro.is(togglePanel)?eo=new LintState(eo.diagnostics,ro.value?LintPanel.open:null,eo.selected):ro.is(movePanelSelection)&&(eo=new LintState(eo.diagnostics,eo.panel,ro.value));return eo},provide:eo=>[showPanel.from(eo,to=>to.panel),EditorView.decorations.from(eo,to=>to.diagnostics)]}),activeMark=Decoration.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function lintTooltip(eo,to,ro){let{diagnostics:no}=eo.state.field(lintState),oo=[],io=2e8,so=0;no.between(to-(ro<0?1:0),to+(ro>0?1:0),(lo,co,{spec:uo})=>{to>=lo&&to<=co&&(lo==co||(to>lo||ro>0)&&(torenderDiagnostic(eo,ro,!1)))}const openLintPanel=eo=>{let to=eo.state.field(lintState,!1);(!to||!to.panel)&&eo.dispatch({effects:maybeEnableLint(eo.state,[togglePanel.of(!0)])});let ro=getPanel(eo,LintPanel.open);return ro&&ro.dom.querySelector(".cm-panel-lint ul").focus(),!0},closeLintPanel=eo=>{let to=eo.state.field(lintState,!1);return!to||!to.panel?!1:(eo.dispatch({effects:togglePanel.of(!1)}),!0)},nextDiagnostic=eo=>{let to=eo.state.field(lintState,!1);if(!to)return!1;let ro=eo.state.selection.main,no=to.diagnostics.iter(ro.to+1);return!no.value&&(no=to.diagnostics.iter(0),!no.value||no.from==ro.from&&no.to==ro.to)?!1:(eo.dispatch({selection:{anchor:no.from,head:no.to},scrollIntoView:!0}),!0)},lintKeymap=[{key:"Mod-Shift-m",run:openLintPanel,preventDefault:!0},{key:"F8",run:nextDiagnostic}],lintConfig=Facet.define({combine(eo){return Object.assign({sources:eo.map(to=>to.source).filter(to=>to!=null)},combineConfig(eo.map(to=>to.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(to,ro)=>to?ro?no=>to(no)||ro(no):to:ro}))}});function assignKeys(eo){let to=[];if(eo)e:for(let{name:ro}of eo){for(let no=0;noio.toLowerCase()==oo.toLowerCase())){to.push(oo);continue e}}to.push("")}return to}function renderDiagnostic(eo,to,ro){var no;let oo=ro?assignKeys(to.actions):[];return crelt("li",{class:"cm-diagnostic cm-diagnostic-"+to.severity},crelt("span",{class:"cm-diagnosticText"},to.renderMessage?to.renderMessage():to.message),(no=to.actions)===null||no===void 0?void 0:no.map((io,so)=>{let ao=!1,lo=ho=>{if(ho.preventDefault(),ao)return;ao=!0;let po=findDiagnostic(eo.state.field(lintState).diagnostics,to);po&&io.apply(eo,po.from,po.to)},{name:co}=io,uo=oo[so]?co.indexOf(oo[so]):-1,fo=uo<0?co:[co.slice(0,uo),crelt("u",co.slice(uo,uo+1)),co.slice(uo+1)];return crelt("button",{type:"button",class:"cm-diagnosticAction",onclick:lo,onmousedown:lo,"aria-label":` Action: ${co}${uo<0?"":` (access key "${oo[so]})"`}.`},fo)}),to.source&&crelt("div",{class:"cm-diagnosticSource"},to.source))}class DiagnosticWidget extends WidgetType{constructor(to){super(),this.diagnostic=to}eq(to){return to.diagnostic==this.diagnostic}toDOM(){return crelt("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class PanelItem{constructor(to,ro){this.diagnostic=ro,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=renderDiagnostic(to,ro,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class LintPanel{constructor(to){this.view=to,this.items=[];let ro=oo=>{if(oo.keyCode==27)closeLintPanel(this.view),this.view.focus();else if(oo.keyCode==38||oo.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(oo.keyCode==40||oo.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(oo.keyCode==36)this.moveSelection(0);else if(oo.keyCode==35)this.moveSelection(this.items.length-1);else if(oo.keyCode==13)this.view.focus();else if(oo.keyCode>=65&&oo.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:io}=this.items[this.selectedIndex],so=assignKeys(io.actions);for(let ao=0;ao{for(let io=0;iocloseLintPanel(this.view)},"×")),this.update()}get selectedIndex(){let to=this.view.state.field(lintState).selected;if(!to)return-1;for(let ro=0;ro{let co=-1,uo;for(let fo=no;fono&&(this.items.splice(no,co-no),oo=!0)),ro&&uo.diagnostic==ro.diagnostic?uo.dom.hasAttribute("aria-selected")||(uo.dom.setAttribute("aria-selected","true"),io=uo):uo.dom.hasAttribute("aria-selected")&&uo.dom.removeAttribute("aria-selected"),no++});no({sel:io.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:so,panel:ao})=>{let lo=ao.height/this.list.offsetHeight;so.topao.bottom&&(this.list.scrollTop+=(so.bottom-ao.bottom)/lo)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),oo&&this.sync()}sync(){let to=this.list.firstChild;function ro(){let no=to;to=no.nextSibling,no.remove()}for(let no of this.items)if(no.dom.parentNode==this.list){for(;to!=no.dom;)ro();to=no.dom.nextSibling}else this.list.insertBefore(no.dom,to);for(;to;)ro()}moveSelection(to){if(this.selectedIndex<0)return;let ro=this.view.state.field(lintState),no=findDiagnostic(ro.diagnostics,this.items[to].diagnostic);no&&this.view.dispatch({selection:{anchor:no.from,head:no.to},scrollIntoView:!0,effects:movePanelSelection.of(no)})}static open(to){return new LintPanel(to)}}function svg(eo,to='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(eo)}')`}function underline(eo){return svg(``,'width="6" height="3"')}const baseTheme=EditorView.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:underline("#d11")},".cm-lintRange-warning":{backgroundImage:underline("orange")},".cm-lintRange-info":{backgroundImage:underline("#999")},".cm-lintRange-hint":{backgroundImage:underline("#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}}}),lintExtensions=[lintState,EditorView.decorations.compute([lintState],eo=>{let{selected:to,panel:ro}=eo.field(lintState);return!to||!ro||to.from==to.to?Decoration.none:Decoration.set([activeMark.range(to.from,to.to)])}),hoverTooltip(lintTooltip,{hideOn:hideTooltip}),baseTheme];var basicSetup=function eo(to){to===void 0&&(to={});var{crosshairCursor:ro=!1}=to,no=[];to.closeBracketsKeymap!==!1&&(no=no.concat(closeBracketsKeymap)),to.defaultKeymap!==!1&&(no=no.concat(defaultKeymap)),to.searchKeymap!==!1&&(no=no.concat(searchKeymap)),to.historyKeymap!==!1&&(no=no.concat(historyKeymap)),to.foldKeymap!==!1&&(no=no.concat(foldKeymap)),to.completionKeymap!==!1&&(no=no.concat(completionKeymap)),to.lintKeymap!==!1&&(no=no.concat(lintKeymap));var oo=[];return to.lineNumbers!==!1&&oo.push(lineNumbers()),to.highlightActiveLineGutter!==!1&&oo.push(highlightActiveLineGutter()),to.highlightSpecialChars!==!1&&oo.push(highlightSpecialChars()),to.history!==!1&&oo.push(history()),to.foldGutter!==!1&&oo.push(foldGutter()),to.drawSelection!==!1&&oo.push(drawSelection()),to.dropCursor!==!1&&oo.push(dropCursor()),to.allowMultipleSelections!==!1&&oo.push(EditorState.allowMultipleSelections.of(!0)),to.indentOnInput!==!1&&oo.push(indentOnInput()),to.syntaxHighlighting!==!1&&oo.push(syntaxHighlighting(defaultHighlightStyle,{fallback:!0})),to.bracketMatching!==!1&&oo.push(bracketMatching()),to.closeBrackets!==!1&&oo.push(closeBrackets()),to.autocompletion!==!1&&oo.push(autocompletion()),to.rectangularSelection!==!1&&oo.push(rectangularSelection()),ro!==!1&&oo.push(crosshairCursor()),to.highlightActiveLine!==!1&&oo.push(highlightActiveLine()),to.highlightSelectionMatches!==!1&&oo.push(highlightSelectionMatches()),to.tabSize&&typeof to.tabSize=="number"&&oo.push(indentUnit.of(" ".repeat(to.tabSize))),oo.concat([keymap.of(no.flat())]).filter(Boolean)};const chalky="#e5c07b",coral="#e06c75",cyan="#56b6c2",invalid="#ffffff",ivory="#abb2bf",stone="#7d8799",malibu="#61afef",sage="#98c379",whiskey="#d19a66",violet="#c678dd",darkBackground="#21252b",highlightBackground="#2c313a",background="#282c34",tooltipBackground="#353a42",selection="#3E4451",cursor="#528bff",oneDarkTheme=EditorView.theme({"&":{color:ivory,backgroundColor:background},".cm-content":{caretColor:cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:selection},".cm-panels":{backgroundColor:darkBackground,color:ivory},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:background,color:stone,border:"none"},".cm-activeLineGutter":{backgroundColor:highlightBackground},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:tooltipBackground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:tooltipBackground,borderBottomColor:tooltipBackground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:highlightBackground,color:ivory}}},{dark:!0}),oneDarkHighlightStyle=HighlightStyle.define([{tag:tags.keyword,color:violet},{tag:[tags.name,tags.deleted,tags.character,tags.propertyName,tags.macroName],color:coral},{tag:[tags.function(tags.variableName),tags.labelName],color:malibu},{tag:[tags.color,tags.constant(tags.name),tags.standard(tags.name)],color:whiskey},{tag:[tags.definition(tags.name),tags.separator],color:ivory},{tag:[tags.typeName,tags.className,tags.number,tags.changed,tags.annotation,tags.modifier,tags.self,tags.namespace],color:chalky},{tag:[tags.operator,tags.operatorKeyword,tags.url,tags.escape,tags.regexp,tags.link,tags.special(tags.string)],color:cyan},{tag:[tags.meta,tags.comment],color:stone},{tag:tags.strong,fontWeight:"bold"},{tag:tags.emphasis,fontStyle:"italic"},{tag:tags.strikethrough,textDecoration:"line-through"},{tag:tags.link,color:stone,textDecoration:"underline"},{tag:tags.heading,fontWeight:"bold",color:coral},{tag:[tags.atom,tags.bool,tags.special(tags.variableName)],color:whiskey},{tag:[tags.processingInstruction,tags.string,tags.inserted],color:sage},{tag:tags.invalid,color:invalid}]),oneDark=[oneDarkTheme,syntaxHighlighting(oneDarkHighlightStyle)];var defaultLightThemeOption=EditorView.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),getDefaultExtensions=function eo(to){to===void 0&&(to={});var{indentWithTab:ro=!0,editable:no=!0,readOnly:oo=!1,theme:io="light",placeholder:so="",basicSetup:ao=!0}=to,lo=[];switch(ro&&lo.unshift(keymap.of([indentWithTab])),ao&&(typeof ao=="boolean"?lo.unshift(basicSetup()):lo.unshift(basicSetup(ao))),so&&lo.unshift(placeholder(so)),io){case"light":lo.push(defaultLightThemeOption);break;case"dark":lo.push(oneDark);break;case"none":break;default:lo.push(io);break}return no===!1&&lo.push(EditorView.editable.of(!1)),oo&&lo.push(EditorState.readOnly.of(!0)),[...lo]},getStatistics=eo=>({line:eo.state.doc.lineAt(eo.state.selection.main.from),lineCount:eo.state.doc.lines,lineBreak:eo.state.lineBreak,length:eo.state.doc.length,readOnly:eo.state.readOnly,tabSize:eo.state.tabSize,selection:eo.state.selection,selectionAsSingle:eo.state.selection.asSingle().main,ranges:eo.state.selection.ranges,selectionCode:eo.state.sliceDoc(eo.state.selection.main.from,eo.state.selection.main.to),selections:eo.state.selection.ranges.map(to=>eo.state.sliceDoc(to.from,to.to)),selectedText:eo.state.selection.ranges.some(to=>!to.empty)}),External=Annotation.define(),emptyExtensions=[];function useCodeMirror(eo){var{value:to,selection:ro,onChange:no,onStatistics:oo,onCreateEditor:io,onUpdate:so,extensions:ao=emptyExtensions,autoFocus:lo,theme:co="light",height:uo=null,minHeight:fo=null,maxHeight:ho=null,width:po=null,minWidth:go=null,maxWidth:vo=null,placeholder:yo="",editable:xo=!0,readOnly:_o=!1,indentWithTab:Eo=!0,basicSetup:So=!0,root:ko,initialState:Ao}=eo,[Co,Oo]=reactExports.useState(),[wo,Ro]=reactExports.useState(),[Do,$o]=reactExports.useState(),Mo=EditorView.theme({"&":{height:uo,minHeight:fo,maxHeight:ho,width:po,minWidth:go,maxWidth:vo},"& .cm-scroller":{height:"100% !important"}}),Po=EditorView.updateListener.of(Fo=>{if(Fo.docChanged&&typeof no=="function"&&!Fo.transactions.some(Go=>Go.annotation(External))){var zo=Fo.state.doc,qo=zo.toString();no(qo,Fo)}oo&&oo(getStatistics(Fo))}),Bo=getDefaultExtensions({theme:co,editable:xo,readOnly:_o,placeholder:yo,indentWithTab:Eo,basicSetup:So}),No=[Po,Mo,...Bo];return so&&typeof so=="function"&&No.push(EditorView.updateListener.of(so)),No=No.concat(ao),reactExports.useEffect(()=>{if(Co&&!Do){var Fo={doc:to,selection:ro,extensions:No},zo=Ao?EditorState.fromJSON(Ao.json,Fo,Ao.fields):EditorState.create(Fo);if($o(zo),!wo){var qo=new EditorView({state:zo,parent:Co,root:ko});Ro(qo),io&&io(qo,zo)}}return()=>{wo&&($o(void 0),Ro(void 0))}},[Co,Do]),reactExports.useEffect(()=>Oo(eo.container),[eo.container]),reactExports.useEffect(()=>()=>{wo&&(wo.destroy(),Ro(void 0))},[wo]),reactExports.useEffect(()=>{lo&&wo&&wo.focus()},[lo,wo]),reactExports.useEffect(()=>{wo&&wo.dispatch({effects:StateEffect.reconfigure.of(No)})},[co,ao,uo,fo,ho,po,go,vo,yo,xo,_o,Eo,So,no,so]),reactExports.useEffect(()=>{if(to!==void 0){var Fo=wo?wo.state.doc.toString():"";wo&&to!==Fo&&wo.dispatch({changes:{from:0,to:Fo.length,insert:to||""},annotations:[External.of(!0)]})}},[to,wo]),{state:Do,setState:$o,view:wo,setView:Ro,container:Co,setContainer:Oo}}var _excluded=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],ReactCodeMirror=reactExports.forwardRef((eo,to)=>{var{className:ro,value:no="",selection:oo,extensions:io=[],onChange:so,onStatistics:ao,onCreateEditor:lo,onUpdate:co,autoFocus:uo,theme:fo="light",height:ho,minHeight:po,maxHeight:go,width:vo,minWidth:yo,maxWidth:xo,basicSetup:_o,placeholder:Eo,indentWithTab:So,editable:ko,readOnly:Ao,root:Co,initialState:Oo}=eo,wo=_objectWithoutPropertiesLoose(eo,_excluded),Ro=reactExports.useRef(null),{state:Do,view:$o,container:Mo}=useCodeMirror({container:Ro.current,root:Co,value:no,autoFocus:uo,theme:fo,height:ho,minHeight:po,maxHeight:go,width:vo,minWidth:yo,maxWidth:xo,basicSetup:_o,placeholder:Eo,indentWithTab:So,editable:ko,readOnly:Ao,selection:oo,onChange:so,onStatistics:ao,onCreateEditor:lo,onUpdate:co,extensions:io,initialState:Oo});if(reactExports.useImperativeHandle(to,()=>({editor:Ro.current,state:Do,view:$o}),[Ro,Mo,Do,$o]),typeof no!="string")throw new Error("value must be typeof string but got "+typeof no);var Po=typeof fo=="string"?"cm-theme-"+fo:"cm-theme";return jsxRuntimeExports.jsx("div",_extends({ref:Ro,className:""+Po+(ro?" "+ro:"")},wo))});ReactCodeMirror.displayName="CodeMirror";const TraceFilterInput=({hash:eo,setHash:to})=>{const ro=useClasses$7(),oo=useIsDark()?vscodeDark:void 0,io="Input filter condition in python syntax. e.g. name == 'web_classification' and cumulative_token_count.total > 1000",[so,ao]=reactExports.useState(eo.filter??""),lo=lodashExports.debounce(fo=>{ao(fo),fo.trim()!==""?to({filter:fo}):to({filter:void 0})},500),co=fo=>{so.length>0?lo(`${so} and ${fo}`):lo(fo)},uo=so!=="";return jsxRuntimeExports.jsx("div",{className:ro.wrapper,children:jsxRuntimeExports.jsxs("div",{className:ro.field,children:[jsxRuntimeExports.jsx(Search20Regular,{className:ro.searchIcon}),jsxRuntimeExports.jsx(ReactCodeMirror,{basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1,defaultKeymap:!1},className:ro.input,height:"36px",width:"100%",value:so,onChange:lo,editable:!0,placeholder:io,extensions,theme:oo}),jsxRuntimeExports.jsx(DismissCircle20Regular,{className:ro.dismissIcon,style:{visibility:uo?"visible":"hidden"},onClick:()=>lo("")}),jsxRuntimeExports.jsx(Divider$2,{vertical:!0,className:ro.divider}),jsxRuntimeExports.jsxs(Popover,{positioning:"below-end",withArrow:!0,children:[jsxRuntimeExports.jsx(PopoverTrigger,{disableButtonEnhancement:!0,children:jsxRuntimeExports.jsx(AddCircle20Regular,{className:ro.addIcon})}),jsxRuntimeExports.jsx(PopoverSurface,{tabIndex:-1,children:jsxRuntimeExports.jsx(FilterConditions,{onAddCondition:co})})]})]})})};function FilterConditions(eo){const{onAddCondition:to}=eo,ro=useClasses$7();return jsxRuntimeExports.jsxs("div",{className:ro.conditionsWrapper,children:[jsxRuntimeExports.jsx(FilterConditionRow,{label:"filter by name",initialSnippet:"name == 'your_trace_name'",onAddFilterConditionSnippet:to},"name"),jsxRuntimeExports.jsx(FilterConditionRow,{label:"filter by kind",initialSnippet:"kind == 'Flow'",onAddFilterConditionSnippet:to},"kind"),jsxRuntimeExports.jsx(FilterConditionRow,{label:"filter by status",initialSnippet:"status == 'Error'",onAddFilterConditionSnippet:to},"status"),jsxRuntimeExports.jsx(FilterConditionRow,{label:"filter by start_time",initialSnippet:"'2024/04/17 15:36:45' < start_time <'2024/04/18",onAddFilterConditionSnippet:to},"start_time"),jsxRuntimeExports.jsx(FilterConditionRow,{label:"filter by cumulative_token_count",initialSnippet:"cumulative_token_count.total > 1000",onAddFilterConditionSnippet:to},"token")]})}function FilterConditionRow(eo){const{initialSnippet:to,onAddFilterConditionSnippet:ro}=eo,[no,oo]=reactExports.useState(to),io=useClasses$7(),ao=useIsDark()?vscodeDark:void 0;return jsxRuntimeExports.jsxs("div",{className:io.conditionWrapper,children:[jsxRuntimeExports.jsx(Text$2,{size:300,weight:"semibold",children:eo.label}),jsxRuntimeExports.jsxs("div",{className:io.conditionRow,children:[jsxRuntimeExports.jsx("div",{className:io.conditionField,children:jsxRuntimeExports.jsx(ReactCodeMirror,{value:no,basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},className:io.conditionInput,editable:!0,extensions:[python()],onChange:oo,theme:ao})}),jsxRuntimeExports.jsx(Button$2,{title:"Add to filter condition",onClick:()=>ro(no),icon:jsxRuntimeExports.jsx(AddCircle20Regular,{}),size:"large"})]})]})}const extensions=[keymap.of([{key:"Enter",run:eo=>!0}]),python(),autocompletion({override:[filterConditionCompletions]})];function filterConditionCompletions(eo){const to=eo.matchBefore(/\w*/);return!to||to.from===to.to&&!eo.explicit?null:{from:to.from,options:[{label:"kind",type:"variable",info:"The kind of trace: Flow, Function, etc."},{label:"name",type:"variable",info:"The name of the trace."},{label:"status",type:"variable",info:"The status of the trace."},{label:"cumulative_token_count.total",type:"variable",info:"The total cumulative token count."},{label:"cumulative_token_count.prompt",type:"variable",info:"The cumulative token count for prompt."},{label:"cumulative_token_count.completion",type:"variable",info:"The cumulative token count for completion."},{label:"start_time",type:"variable",info:"The start time of the trace."},{label:"and",type:"keyword",info:"Logical AND operator."},{label:"or",type:"keyword",info:"Logical OR operator."}]}}const useClasses$7=makeStyles({wrapper:{width:"calc(100% - 280px)"},field:{display:"flex",alignItems:"center",...shorthands.flex(1),...shorthands.padding("1px"),...shorthands.border("1px","solid",tokens.colorNeutralStroke1),...shorthands.borderRadius("4px")},searchIcon:{...shorthands.margin("0","8px")},dismissIcon:{cursor:"pointer"},addIcon:{marginRight:"8px",cursor:"pointer"},input:{width:"100%",overflowX:"auto",backgroundColor:"red","& .cm-focused":{outlineStyle:"none"},"& .cm-content":{...shorthands.padding("8px",0)}},divider:{...shorthands.flex("none"),...shorthands.padding(0,"8px")},conditionsWrapper:{display:"flex",flexDirection:"column",width:"500px",...shorthands.gap("20px"),...shorthands.padding("4px")},conditionWrapper:{display:"flex",flexDirection:"column"},conditionField:{display:"flex",alignItems:"center",...shorthands.flex(1),...shorthands.padding("1px"),...shorthands.border("1px","solid",tokens.colorNeutralStroke1),...shorthands.borderRadius("4px")},conditionRow:{display:"flex",alignItems:"center",marginTop:"4px",...shorthands.gap("8px")},conditionInput:{...shorthands.flex(1),"& .cm-focused":{outlineStyle:"none"},"& .cm-content":{...shorthands.padding("8px",0)}}}),TraceFilter=({hash:eo,setHash:to})=>{const ro=useClasses$6(),no=useLocStrings(),oo=useTableColumnNames(),[io,so]=[useTableHiddenColumnKeys(),useSetTableHiddenColumnKeys()],ao=useTraceListShowMetrics(),[lo,co]=[useTraceFilterChanged(),useSetTraceFilterChanged()],uo=reactExports.useMemo(()=>oo.normalColumns.map(yo=>yo.key),[oo.normalColumns.map(yo=>yo.key).join(",")]),fo=reactExports.useMemo(()=>oo.evaluationColumns.map(yo=>yo.key),[oo.evaluationColumns.map(yo=>yo.key).join(",")]),ho=reactExports.useMemo(()=>[...oo.normalColumns,...oo.evaluationColumns].filter(xo=>!io.includes(xo.key)).map(xo=>xo.key),[io,oo]),po=(yo,xo)=>{const{optionValue:_o}=xo;_o&&(so(io.includes(_o)?io.filter(Eo=>Eo!==_o):[...io,_o]),co(!0))},go=reactExports.useCallback(yo=>{so(yo?io.filter(xo=>!uo.includes(xo)):lodashExports.union([...io],[...uo]))},[so,io,uo]),vo=reactExports.useCallback(yo=>{so(yo?io.filter(xo=>!fo.includes(xo)):lodashExports.union([...io],[...fo]))},[so,io,fo]);return reactExports.useEffect(()=>{lo||(!eo||Object.keys(eo).length===0?so(lodashExports.union([...io],[...fo])):so(lodashExports.union([...io],[METRICS_COLUMN_KEY])))},[lo,fo]),jsxRuntimeExports.jsxs("div",{className:ro.wrapper,children:[eo&&to?jsxRuntimeExports.jsx(TraceFilterInput,{hash:eo,setHash:to}):jsxRuntimeExports.jsx(Input,{className:ro.filter,disabled:!0,placeholder:"NOT implement yet"}),jsxRuntimeExports.jsx(Combobox,{multiselect:!0,placeholder:"Columns Filter",selectedOptions:ho,onOptionSelect:po,children:jsxRuntimeExports.jsxs("div",{className:ro.popUp,children:[jsxRuntimeExports.jsx(OptionGroup,{label:jsxRuntimeExports.jsx(Checkbox$2,{checked:uo.every(yo=>!io.includes(yo)),onClick:()=>{const yo=uo.every(xo=>!io.includes(xo));go(!yo)},className:ro.smallCheckbox,label:no["Trace Info"],labelPosition:"before"}),children:oo.normalColumns.map(yo=>jsxRuntimeExports.jsx(Option$3,{value:yo.key,children:yo.name},yo.key))}),ao&&jsxRuntimeExports.jsx(OptionGroup,{label:jsxRuntimeExports.jsx(Checkbox$2,{checked:fo.every(yo=>!io.includes(yo)),onClick:()=>{const yo=fo.every(xo=>!io.includes(xo));vo(!yo)},className:ro.smallCheckbox,label:no.Metrics,labelPosition:"before"}),children:oo.evaluationColumns.map(yo=>jsxRuntimeExports.jsx(Option$3,{value:yo.key,text:yo.name,children:jsxRuntimeExports.jsx(Tooltip,{relationship:"label",content:yo.name,children:jsxRuntimeExports.jsx("span",{className:ro.optionText,children:yo.name})})},yo.key))})]})})]})},useClasses$6=makeStyles({wrapper:{display:"flex",width:"100%",...shorthands.gap("1rem"),...shorthands.margin(tokens.spacingVerticalM)},filter:{flexGrow:1},popUp:{overflowX:"hidden"},optionText:{display:"block",width:"90%",...shorthands.overflow("hidden"),textOverflow:"ellipsis",whiteSpace:"nowrap"},smallCheckbox:{"& label":{...shorthands.padding("0px"),fontSize:"12px",lineHeight:"12px"},"& .fui-Checkbox__indicator":{marginLeft:"4px !important",marginRight:"0px !important",marginTop:"2px !important",marginBottom:"0px !important",width:"12px",height:"12px"}}});function TraceList({onRowClick:eo,className:to}){const ro=useClasses$5(),no=useTraceListRows(),{columns:oo,ref:io}=useTraceListColumns(),so=useTraceListViewStatus(),ao=useTraceListLoadingComponent(),lo=useTraceListErrorComponent(),co=useIsDark();useDebugFunctions();const uo=useSortColumn(),fo=useSetSortColumn(),ho=uo?[uo]:[],po=useOnClickTraceRow(),go=reactExports.useCallback(vo=>{var _o;const{row:yo,column:xo}=vo;((_o=yo.status)==null?void 0:_o.toLowerCase())!=="running"&&(xo.key==="input"||xo.key==="output")||(po(yo,xo.key),eo==null||eo(yo))},[po,eo]);return so===ViewStatus.error?jsxRuntimeExports.jsx(lo,{}):so===ViewStatus.loading?jsxRuntimeExports.jsx(ao,{}):jsxRuntimeExports.jsx("div",{ref:io,className:ro.root,children:jsxRuntimeExports.jsx(DataGrid$1$1,{className:`${ro.grid} ${to??""} ${co?"rdg-dark":"rdg-light"}`,renderers:{noRowsFallback:jsxRuntimeExports.jsxs("div",{style:{textAlign:"center",gridColumn:"1/-1",display:"flex",alignItems:"center",justifyContent:"center"},children:[jsxRuntimeExports.jsx(TextBulletListSquareWarning24Regular,{}),jsxRuntimeExports.jsx(Text$2,{style:{paddingLeft:"1rem"},children:"No traces found."})]})},rowClass:()=>ro.row,columns:oo,rows:no,headerRowHeight:26,rowHeight:80,onCellClick:go,defaultColumnOptions:{resizable:!0},sortColumns:ho,onSortColumnsChange:vo=>{var yo;fo((yo=vo.slice(-1))==null?void 0:yo[0])}})})}const useClasses$5=makeStyles({root:{display:"flex",flexDirection:"column",flexGrow:1},grid:{},row:{cursor:"pointer"}}),DefaultDetailContainer=({isOpen:eo,setIsOpen:to,header:ro=null,content:no})=>jsxRuntimeExports.jsxs(OverlayDrawer,{position:"end",style:{width:"calc(100% - 48px)"},open:eo,onOpenChange:(oo,io)=>to(io.open),children:[ro,jsxRuntimeExports.jsx("div",{style:{width:"100%",height:"calc(100vh - 40px)"},children:no})]});makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%"},divider:{flexGrow:0,...shorthands.margin("16px",0)},grid:{flexGrow:1}});makeStyles({wrapper:{display:"flex",flexDirection:"column",justifyContent:"space-between",...shorthands.flex(0,0,"auto")},horizontal:{flexDirection:"row",alignItems:"center",...shorthands.flex(0,0,"auto")},title:{color:tokens.colorNeutralForeground2,marginBottom:tokens.spacingVerticalXS},data:{color:tokens.colorNeutralForeground1},tagsWrapper:{display:"flex",flexDirection:"row",...shorthands.gap("0.5rem")},tagsWrapperHorizontal:{flexDirection:"column"},timeWrapper:{display:"flex",flexDirection:"row",alignItems:"center",justifyItems:"center","> svg":{marginRight:"5px"}},scoreWrapper:{display:"flex",flexDirection:"row",alignItems:"center","> :first-child":{marginRight:"8px"}}});const defaultLocStrings=new Proxy({},{get:(eo,to)=>to.replace(/_/g," ")}),RegistryWrapper=createRegistry({name:"TraceView"}),Provider=({isDark:eo=!1,viewModel:to,children:ro,locStrings:no=defaultLocStrings,TraceListLoading:oo,TraceListError:io,TraceDetailLoading:so,TraceDetailError:ao})=>{const lo=React.useCallback(co=>{co.register(TraceViewModelToken,{useValue:to}),oo&&co.register(traceListLoadingInjectionToken,{useValue:oo}),io&&co.register(traceListErrorInjectionToken,{useValue:io}),so&&co.register(traceDetailLoadingInjectionToken,{useValue:so}),ao&&co.register(traceDetailErrorInjectionToken,{useValue:ao}),no&&co.register(locStringsInjectionToken,{useValue:no})},[]);return jsxRuntimeExports.jsx(TraceViewThemeContext.Provider,{value:eo,children:jsxRuntimeExports.jsx(RegistryWrapper,{onInitialize:lo,children:ro})})},ThemeContext=reactExports.createContext({});ThemeContext.displayName="ThemeContext";const ThemeContextProvider=({children:eo})=>{const[to,ro]=reactExports.useState("light");return reactExports.useEffect(()=>{const no=window.matchMedia("(prefers-color-scheme: dark)");ro(no.matches?"dark":"light");const oo=io=>{ro(io.matches?"dark":"light")};return no.addEventListener("change",oo),()=>{no.removeEventListener("change",oo)}},[]),jsxRuntimeExports.jsx(ThemeContext.Provider,{value:{theme:to,setTheme:ro},children:eo})},token="%[a-f0-9]{2}",singleMatcher=new RegExp("("+token+")|([^%]+?)","gi"),multiMatcher=new RegExp("("+token+")+","gi");function decodeComponents(eo,to){try{return[decodeURIComponent(eo.join(""))]}catch{}if(eo.length===1)return eo;to=to||1;const ro=eo.slice(0,to),no=eo.slice(to);return Array.prototype.concat.call([],decodeComponents(ro),decodeComponents(no))}function decode$1(eo){try{return decodeURIComponent(eo)}catch{let to=eo.match(singleMatcher)||[];for(let ro=1;roeo==null,strictUriEncode=eo=>encodeURIComponent(eo).replaceAll(/[!'()*]/g,to=>`%${to.charCodeAt(0).toString(16).toUpperCase()}`),encodeFragmentIdentifier=Symbol("encodeFragmentIdentifier");function encoderForArrayFormat(eo){switch(eo.arrayFormat){case"index":return to=>(ro,no)=>{const oo=ro.length;return no===void 0||eo.skipNull&&no===null||eo.skipEmptyString&&no===""?ro:no===null?[...ro,[encode(to,eo),"[",oo,"]"].join("")]:[...ro,[encode(to,eo),"[",encode(oo,eo),"]=",encode(no,eo)].join("")]};case"bracket":return to=>(ro,no)=>no===void 0||eo.skipNull&&no===null||eo.skipEmptyString&&no===""?ro:no===null?[...ro,[encode(to,eo),"[]"].join("")]:[...ro,[encode(to,eo),"[]=",encode(no,eo)].join("")];case"colon-list-separator":return to=>(ro,no)=>no===void 0||eo.skipNull&&no===null||eo.skipEmptyString&&no===""?ro:no===null?[...ro,[encode(to,eo),":list="].join("")]:[...ro,[encode(to,eo),":list=",encode(no,eo)].join("")];case"comma":case"separator":case"bracket-separator":{const to=eo.arrayFormat==="bracket-separator"?"[]=":"=";return ro=>(no,oo)=>oo===void 0||eo.skipNull&&oo===null||eo.skipEmptyString&&oo===""?no:(oo=oo===null?"":oo,no.length===0?[[encode(ro,eo),to,encode(oo,eo)].join("")]:[[no,encode(oo,eo)].join(eo.arrayFormatSeparator)])}default:return to=>(ro,no)=>no===void 0||eo.skipNull&&no===null||eo.skipEmptyString&&no===""?ro:no===null?[...ro,encode(to,eo)]:[...ro,[encode(to,eo),"=",encode(no,eo)].join("")]}}function parserForArrayFormat(eo){let to;switch(eo.arrayFormat){case"index":return(ro,no,oo)=>{if(to=/\[(\d*)]$/.exec(ro),ro=ro.replace(/\[\d*]$/,""),!to){oo[ro]=no;return}oo[ro]===void 0&&(oo[ro]={}),oo[ro][to[1]]=no};case"bracket":return(ro,no,oo)=>{if(to=/(\[])$/.exec(ro),ro=ro.replace(/\[]$/,""),!to){oo[ro]=no;return}if(oo[ro]===void 0){oo[ro]=[no];return}oo[ro]=[...oo[ro],no]};case"colon-list-separator":return(ro,no,oo)=>{if(to=/(:list)$/.exec(ro),ro=ro.replace(/:list$/,""),!to){oo[ro]=no;return}if(oo[ro]===void 0){oo[ro]=[no];return}oo[ro]=[...oo[ro],no]};case"comma":case"separator":return(ro,no,oo)=>{const io=typeof no=="string"&&no.includes(eo.arrayFormatSeparator),so=typeof no=="string"&&!io&&decode(no,eo).includes(eo.arrayFormatSeparator);no=so?decode(no,eo):no;const ao=io||so?no.split(eo.arrayFormatSeparator).map(lo=>decode(lo,eo)):no===null?no:decode(no,eo);oo[ro]=ao};case"bracket-separator":return(ro,no,oo)=>{const io=/(\[])$/.test(ro);if(ro=ro.replace(/\[]$/,""),!io){oo[ro]=no&&decode(no,eo);return}const so=no===null?[]:no.split(eo.arrayFormatSeparator).map(ao=>decode(ao,eo));if(oo[ro]===void 0){oo[ro]=so;return}oo[ro]=[...oo[ro],...so]};default:return(ro,no,oo)=>{if(oo[ro]===void 0){oo[ro]=no;return}oo[ro]=[...[oo[ro]].flat(),no]}}}function validateArrayFormatSeparator(eo){if(typeof eo!="string"||eo.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function encode(eo,to){return to.encode?to.strict?strictUriEncode(eo):encodeURIComponent(eo):eo}function decode(eo,to){return to.decode?decodeUriComponent(eo):eo}function keysSorter(eo){return Array.isArray(eo)?eo.sort():typeof eo=="object"?keysSorter(Object.keys(eo)).sort((to,ro)=>Number(to)-Number(ro)).map(to=>eo[to]):eo}function removeHash(eo){const to=eo.indexOf("#");return to!==-1&&(eo=eo.slice(0,to)),eo}function getHash(eo){let to="";const ro=eo.indexOf("#");return ro!==-1&&(to=eo.slice(ro)),to}function parseValue(eo,to){return to.parseNumbers&&!Number.isNaN(Number(eo))&&typeof eo=="string"&&eo.trim()!==""?eo=Number(eo):to.parseBooleans&&eo!==null&&(eo.toLowerCase()==="true"||eo.toLowerCase()==="false")&&(eo=eo.toLowerCase()==="true"),eo}function extract(eo){eo=removeHash(eo);const to=eo.indexOf("?");return to===-1?"":eo.slice(to+1)}function parse(eo,to){to={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...to},validateArrayFormatSeparator(to.arrayFormatSeparator);const ro=parserForArrayFormat(to),no=Object.create(null);if(typeof eo!="string"||(eo=eo.trim().replace(/^[?#&]/,""),!eo))return no;for(const oo of eo.split("&")){if(oo==="")continue;const io=to.decode?oo.replaceAll("+"," "):oo;let[so,ao]=splitOnFirst(io,"=");so===void 0&&(so=io),ao=ao===void 0?null:["comma","separator","bracket-separator"].includes(to.arrayFormat)?ao:decode(ao,to),ro(decode(so,to),ao,no)}for(const[oo,io]of Object.entries(no))if(typeof io=="object"&&io!==null)for(const[so,ao]of Object.entries(io))io[so]=parseValue(ao,to);else no[oo]=parseValue(io,to);return to.sort===!1?no:(to.sort===!0?Object.keys(no).sort():Object.keys(no).sort(to.sort)).reduce((oo,io)=>{const so=no[io];return oo[io]=so&&typeof so=="object"&&!Array.isArray(so)?keysSorter(so):so,oo},Object.create(null))}function stringify(eo,to){if(!eo)return"";to={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...to},validateArrayFormatSeparator(to.arrayFormatSeparator);const ro=so=>to.skipNull&&isNullOrUndefined(eo[so])||to.skipEmptyString&&eo[so]==="",no=encoderForArrayFormat(to),oo={};for(const[so,ao]of Object.entries(eo))ro(so)||(oo[so]=ao);const io=Object.keys(oo);return to.sort!==!1&&io.sort(to.sort),io.map(so=>{const ao=eo[so];return ao===void 0?"":ao===null?encode(so,to):Array.isArray(ao)?ao.length===0&&to.arrayFormat==="bracket-separator"?encode(so,to)+"[]":ao.reduce(no(so),[]).join("&"):encode(so,to)+"="+encode(ao,to)}).filter(so=>so.length>0).join("&")}function parseUrl(eo,to){var oo;to={decode:!0,...to};let[ro,no]=splitOnFirst(eo,"#");return ro===void 0&&(ro=eo),{url:((oo=ro==null?void 0:ro.split("?"))==null?void 0:oo[0])??"",query:parse(extract(eo),to),...to&&to.parseFragmentIdentifier&&no?{fragmentIdentifier:decode(no,to)}:{}}}function stringifyUrl(eo,to){to={encode:!0,strict:!0,[encodeFragmentIdentifier]:!0,...to};const ro=removeHash(eo.url).split("?")[0]||"",no=extract(eo.url),oo={...parse(no,{sort:!1}),...eo.query};let io=stringify(oo,to);io&&(io=`?${io}`);let so=getHash(eo.url);if(typeof eo.fragmentIdentifier=="string"){const ao=new URL(ro);ao.hash=eo.fragmentIdentifier,so=to[encodeFragmentIdentifier]?ao.hash:`#${eo.fragmentIdentifier}`}return`${ro}${io}${so}`}function pick(eo,to,ro){ro={parseFragmentIdentifier:!0,[encodeFragmentIdentifier]:!1,...ro};const{url:no,query:oo,fragmentIdentifier:io}=parseUrl(eo,ro);return stringifyUrl({url:no,query:includeKeys(oo,to),fragmentIdentifier:io},ro)}function exclude(eo,to,ro){const no=Array.isArray(to)?oo=>!to.includes(oo):(oo,io)=>!to(oo,io);return pick(eo,no,ro)}const queryString=Object.freeze(Object.defineProperty({__proto__:null,exclude,extract,parse,parseUrl,pick,stringify,stringifyUrl},Symbol.toStringTag,{value:"Module"}));function useHashObject(){const[eo,to]=reactExports.useState(()=>queryString.parse(window.location.hash.substring(1))),ro=reactExports.useCallback(no=>{to(oo=>{const io={...oo,...no},so=queryString.stringify(io);return window.location.hash=so,io})},[]);return reactExports.useEffect(()=>{const no=()=>{to(queryString.parse(window.location.hash.substring(1)))};return window.addEventListener("hashchange",no),()=>window.removeEventListener("hashchange",no)},[]),[eo,ro]}function genLocalUrlParamsWithHash(eo){if(!isNotNullOrUndefined(eo))return"list";let to="";return isNotNullOrUndefined(eo.session)?to=`session=${eo.session}`:isNotNullOrUndefined(eo.collection)?to=`collection=${eo.collection}`:isNotNullOrUndefined(eo.experiment)?to=`experiment=${eo.experiment}`:isNotNullOrUndefined(eo.run)?to=`run=${eo.run}`:isNotNullOrUndefined(eo.trace)&&(to=`trace_ids=${eo.trace}`),isNotNullOrUndefined(eo.filter)?encodeURI(`search?expression=${eo.filter}${to?`&${to}`:""}`):encodeURI(`list?${to}`)}function isNotNullOrUndefined(eo){return eo!=null}const getSummariesSignature=eo=>eo.flatMap(no=>[`${no.line_run_id}_${no.status}`,...Object.values(no.evaluations??[]).map(oo=>`${oo.trace_id}_${oo.status}`)]).sort().join(","),useLocalFetchSummaries=eo=>{const to=useTraceViewModel(),[ro,no]=reactExports.useState(!0),oo=useLocalFetchSummariesFunc(eo),io=useTraceListAutoRefreshInterval();reactExports.useEffect(()=>{ro&&to.setTraceListStatus(ViewStatus.loading),oo().finally(()=>{ro&&no(!1)});let so;if(io!==AutoRefreshInterval.OFF){const ao=REFRESH_INTERVAL_MAP[io];ao&&(so=setInterval(oo,ao))}return()=>{so&&clearInterval(so)}},[oo,io])},useLocalFetchSummary=()=>{const eo=useTraceViewModel();return reactExports.useCallback(async ro=>fetch(`${LOCAL_URL_PREFIX}/v1.0/LineRuns/list?trace_ids=${ro}`).then(no=>no.json()).then(no=>{no&&(eo.appendTraces(no),eo.setTraceListStatus(ViewStatus.loaded))}).catch(no=>{eo.setTraceListStatus(ViewStatus.error),eo.appendTraces([]),console.error("Error:",no)}),[eo])},useLocalFetchSummariesFunc=eo=>{const to=useTraceViewModel(),[ro,no]=reactExports.useState(void 0),oo=useSetLoadSummariesError();return reactExports.useCallback(async()=>{const so=`${LOCAL_URL_PREFIX}/v1.0/LineRuns/${genLocalUrlParamsWithHash(eo)}`;return fetch(so).then(async ao=>{const lo=await ao.json();if(!ao.ok)throw new Error("message"in lo?String(lo.message):"Failed to fetch");const co=lo;if(!co&&Array.isArray(co))throw new Error("No new traces");const uo=getSummariesSignature(co);(ro===void 0||uo!==ro)&&(no(uo),to.traces$.clear(),to.appendTraces(co)),to.setTraceListStatus(ViewStatus.loaded)}).catch(ao=>{to.setTraceListStatus(ViewStatus.error),to.appendTraces([]),oo(ao),console.error("Error:",ao)})},[eo,to])},useLocalRefreshTraces=eo=>{const to=useTraceViewModel(),ro=useLocalFetchSummariesFunc(eo);return reactExports.useCallback(()=>{to.setTraceListStatus(ViewStatus.loading),ro()},[ro,to])},useLocalFetchRunningTraces=()=>{const eo=useTraces(),to=useLocalFetchSummary(),ro=eo.filter(no=>checkStatus(no.status,"running")).map(no=>no.trace_id).filter(no=>no!==void 0);reactExports.useEffect(()=>{let no;return ro.length>0&&(no=setInterval(()=>{ro.forEach(oo=>to(oo))},RUNNING_TRACE_POLLING_GAP)),()=>{no&&clearInterval(no)}},[to,ro])},useLocalTraceDetailDidOpen=eo=>{const to=useTraceViewModel(),ro=useLocalFetchSummary(),no=useFetchLocalSpans();return reactExports.useCallback(async io=>{if(!io)return;let so=to.getTraceById(io);so||(await ro(io),so=to.getTraceById(io));const ao=[io,...Object.values((so==null?void 0:so.evaluations)??[]).map(lo=>lo.trace_id)].filter(lo=>lo!==void 0);eo({uiTraceId:io}),to.setTraceDetailStatus(ViewStatus.loading),no(ao)},[to])},useLocalOnTraceDetailClose=eo=>reactExports.useCallback(()=>{eo({uiTraceId:void 0})},[eo]),useFetchLocalSpans=()=>{const eo=useTraceViewModel();return reactExports.useCallback(ro=>{fetch(`${LOCAL_URL_PREFIX}/v1.0/Spans/list?trace_ids=${ro.join(",")}&lazy_load=${eo.isLazyLoadSpan}`).then(no=>no.json()).then(no=>{eo.appendSpans(no),eo.setTraceDetailStatus(ViewStatus.loaded)}).catch(no=>{console.error("Error:",no),eo.setTraceDetailStatus(ViewStatus.error)})},[eo])},useLocalOnRefreshSpans=()=>{const eo=useLocalFetchSummary(),to=useFetchLocalSpans();return reactExports.useCallback((no,oo)=>{const io=[no,...Object.values((oo==null?void 0:oo.evaluations)??[]).map(so=>so.trace_id)].filter(so=>so!==void 0);eo(no),to(io)},[to,eo])},fetchSpanEvent=eo=>fetch(`${LOCAL_URL_PREFIX}/v1.0/Spans/Event/${eo}`).then(to=>to.json()).then(to=>({status:"success",data:to})).catch(to=>({status:"error",error:to})),AutoRefreshSwitcher=({style:eo})=>{const to=useLocStrings(),ro=useClasses$4(),[no,oo]=[useTraceListAutoRefreshInterval(),useSetTraceListAutoRefreshInterval()];return jsxRuntimeExports.jsxs("div",{className:ro.wrapper,style:eo,children:[jsxRuntimeExports.jsxs(Text$2,{children:[to["Auto Refresh"],":"]}),jsxRuntimeExports.jsx(Toolbar,{"aria-label":"Auto Refresh Switcher",checkedValues:{autoRefreshOptions:[no]},onCheckedValueChange:(io,{name:so,checkedItems:ao})=>{so==="autoRefreshOptions"&&oo(ao[0])},children:jsxRuntimeExports.jsx(ToolbarRadioGroup,{children:AUTO_REFRESH_LIST.map(io=>jsxRuntimeExports.jsx(ToolbarRadioButton,{appearance:"subtle",name:"autoRefreshOptions",as:"button",value:io,icon:jsxRuntimeExports.jsx("span",{className:ro.text,children:io})},io))})})]})},useClasses$4=makeStyles({wrapper:{display:"flex",alignItems:"center"},text:{fontSize:"12px"}}),ThemeSwitcher=({style:eo,labelName:to})=>{const ro=useLocStrings(),{theme:no,setTheme:oo}=reactExports.useContext(ThemeContext);return jsxRuntimeExports.jsx(Switch,{label:to||ro["Dark Theme"],labelPosition:"before",checked:no==="dark",onChange:(io,so)=>oo(so.checked?"dark":"light"),style:eo})},LocalCommonHeader=({slot:eo,showRefresh:to=!1})=>{const ro=useClasses$3(),no=useLocStrings(),oo=useTraceViewModel();return jsxRuntimeExports.jsxs("div",{className:ro.root,children:[jsxRuntimeExports.jsxs("div",{className:ro.wrapper,children:[jsxRuntimeExports.jsx("div",{className:ro.main}),to&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tooltip,{content:no["Refresh Data"],relationship:"description",children:jsxRuntimeExports.jsx(Button$2,{appearance:"subtle","aria-label":"Refresh",icon:jsxRuntimeExports.jsx(ArrowClockwise16Regular,{}),onClick:()=>oo.refreshTraces()})}),jsxRuntimeExports.jsx(Divider$2,{vertical:!0,className:ro.divider})]}),jsxRuntimeExports.jsx(AutoRefreshSwitcher,{}),jsxRuntimeExports.jsx(Divider$2,{vertical:!0,className:ro.divider}),jsxRuntimeExports.jsx(ThemeSwitcher,{})]}),eo]})},useClasses$3=makeStyles({root:{display:"flex",flexDirection:"column",width:"100%"},wrapper:{display:"flex",alignItems:"center",...shorthands.padding(tokens.spacingVerticalXXS,tokens.spacingHorizontalL)},main:{...shorthands.flex(1)},divider:{flexGrow:0,height:"20px",...shorthands.margin(0,"8px")}}),LocalOverallMetric=({hash:eo})=>{var ao;const[[to,ro],no]=reactExports.useState([void 0,void 0]),oo=useClasses$2(),io=useTraces(),so=(()=>{if(isNotNullOrUndefined(eo.run)){const lo=eo.run.split(",");if(lo.length===1)return lo[0]}})();return reactExports.useEffect(()=>{so&&Promise.allSettled([fetch(`${LOCAL_URL_PREFIX}/v1.0/Runs/${so}`),fetch(`${LOCAL_URL_PREFIX}/v1.0/Runs/${so}/metrics`)]).then(async lo=>{if(lo.some(co=>co.status==="rejected")){no([void 0,void 0]);return}else{const co=lo.map(uo=>uo.value);if(co.some(uo=>!uo.ok)){no([void 0,void 0]);return}else{const uo=await co[0].json(),fo=await co[1].json();no([uo,fo])}}})},[so]),so&&to&&ro?jsxRuntimeExports.jsxs("div",{className:oo.wrapper,children:[jsxRuntimeExports.jsx("div",{className:oo.title,children:so}),jsxRuntimeExports.jsxs("div",{className:oo.blockListWrapper,children:[jsxRuntimeExports.jsx(InfoBlock,{title:"Total traces:",value:io.length}),isNotNullOrUndefined(to.status)&&jsxRuntimeExports.jsx(InfoBlock,{title:"Status:",value:to.status,slot:jsxRuntimeExports.jsx(StatusText,{statusCode:to.status,showText:!0,size:UISize.small})}),isNotNullOrUndefined(to==null?void 0:to.created_on)&&jsxRuntimeExports.jsx(InfoBlock,{title:"Create on:",value:timeFormat(to.created_on)}),((ao=to==null?void 0:to.properties)==null?void 0:ao.system_metrics)&&jsxRuntimeExports.jsx(SystemMetrics,{systemMetrics:to.properties.system_metrics}),isNotNullOrUndefined(ro)&&Object.keys(ro).length>0&&jsxRuntimeExports.jsx(Metrics,{metrics:ro})]})]}):null},InfoBlock=({title:eo,slot:to,value:ro})=>{const no=useClasses$2();return jsxRuntimeExports.jsxs("div",{className:no.blockWrapper,children:[jsxRuntimeExports.jsx("div",{className:no.blockTitle,children:eo}),to||jsxRuntimeExports.jsx("div",{className:no.blockValue,children:ro.toString()})]})},SYSTEM_METRICS_NAME_MAP={completion_tokens:"Completion tokens",duration:"Duration",prompt_tokens:"Prompt tokens",total_tokens:"Total tokens"},SystemMetrics=({systemMetrics:eo})=>{const to=useClasses$2();return jsxRuntimeExports.jsx(InfoBlock,{title:"System metrics:",slot:jsxRuntimeExports.jsxs("div",{className:to.metricsWrapper,children:[jsxRuntimeExports.jsx("div",{className:to.metricsItemRow,children:["prompt_tokens","total_tokens"].map(ro=>eo[ro]!==void 0?jsxRuntimeExports.jsx("span",{className:to.metricsItem,children:`${SYSTEM_METRICS_NAME_MAP[ro]}: ${eo[ro]}`},ro):null)}),jsxRuntimeExports.jsx("div",{className:to.metricsItemRow,children:["completion_tokens","duration"].map(ro=>eo[ro]!==void 0?jsxRuntimeExports.jsx("span",{className:to.metricsItem,children:`${SYSTEM_METRICS_NAME_MAP[ro]}: ${eo[ro]}`},ro):null)})]})})},Metrics=({metrics:eo})=>{const to=useClasses$2();return jsxRuntimeExports.jsx(InfoBlock,{title:"Metrics:",slot:jsxRuntimeExports.jsx("div",{className:to.metricsItemColumn,children:Object.entries(eo).map(([ro,no])=>jsxRuntimeExports.jsx("span",{className:to.metricsItem,children:`${ro}: ${no}`},ro))})})},useClasses$2=makeStyles({wrapper:{display:"flex",flexDirection:"column",boxSizing:"border-box",...shorthands.gap("6px"),...shorthands.borderRadius("4px"),...shorthands.margin("0","24px"),...shorthands.padding("16px"),...shorthands.border("1px","solid",tokens.colorNeutralStroke2)},title:{fontSize:"16px",fontWeight:600,lineHeight:"22px"},blockListWrapper:{display:"flex",...shorthands.gap("24px")},blockWrapper:{display:"flex",flexDirection:"column",...shorthands.gap("4px")},blockTitle:{fontSize:"12px",fontWeight:"600",lineHeight:"16px"},blockValue:{fontSize:"14px",lineHeight:"20px",fontWeight:"400"},metricsWrapper:{display:"flex",flexDirection:"column",...shorthands.gap("8px")},metricsItemRow:{display:"flex",...shorthands.gap("8px")},metricsItemColumn:{display:"flex",flexDirection:"column",...shorthands.gap("8px")},metricsItem:{fontSize:"12px",lineHeight:"16px",fontWeight:"400",...shorthands.padding("4px","8px"),...shorthands.borderRadius("4px"),...shorthands.border("1px","solid",tokens.colorNeutralStroke1)}});function LocalTraceDetailError(){const eo=useLocStrings(),to=useLoadSummariesError();return jsxRuntimeExports.jsx(GeneralErrorBar,{title:eo.Failed_to_load_trace,message:to==null?void 0:to.message,onClick:()=>{}})}const LocalTraceView=eo=>{const{viewModel:to,isDark:ro}=eo;return jsxRuntimeExports.jsx(Provider,{viewModel:to,isDark:ro,TraceListError:LocalTraceDetailError,children:jsxRuntimeExports.jsx(TraceViewContent,{...eo})})},TraceViewContent=({hash:eo,setHash:to})=>{const ro=useClasses$1(),no=useIsTraceDetailOpen(),oo=useSetIsTraceDetailOpen(),io=useTraceViewModel(),so=useGetTraceByLineRunId(),[ao,lo]=React.useState(!1),[co,uo]=React.useState(!1),fo=useSelectedTrace(),ho=useLocalFetchSummary(),po=useFetchLocalSpans();useLocalFetchSummaries(eo),useLocalFetchRunningTraces();const go=useLocalTraceDetailDidOpen(to),vo=useLocalOnTraceDetailClose(to),yo=useLocalRefreshTraces(eo),xo=useLocalOnRefreshSpans();return reactExports.useEffect(()=>{io.traceDetailDidOpen(go),io.traceDetailDidClose(vo),io.setOnRefreshTraces(yo),io.onRefreshSpans(xo)},[xo,yo,vo,go,io]),reactExports.useEffect(()=>{let _o;return ao&&no&&fo&&co&&(_o=setInterval(()=>{const Eo=[fo==null?void 0:fo.trace_id,...Object.values((fo==null?void 0:fo.evaluations)??[]).map(So=>So.trace_id)].filter(So=>So!==void 0);po(Eo),fo.trace_id&&ho(fo.trace_id)},SPAN_POLLING_GAP)),()=>{_o&&clearInterval(_o)}},[co,fo,no,io,ao,ho,po]),reactExports.useEffect(()=>{no&&fo&&(checkStatus(fo.status,"Running")?lo(!0):lo(!1))},[ho,no,fo]),reactExports.useEffect(()=>{if(isNotNullOrUndefined(eo.line_run_id)){const _o=so(eo.line_run_id);_o&&to({uiTraceId:_o.trace_id,line_run_id:void 0})}},[so,eo.line_run_id,to]),reactExports.useEffect(()=>{isNotNullOrUndefined(eo.uiTraceId)&&io.setTraceDetailOpen(!0,eo.uiTraceId)},[io,eo.uiTraceId]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:ro.wrapper,children:[jsxRuntimeExports.jsx(LocalCommonHeader,{showRefresh:!0,slot:jsxRuntimeExports.jsx(LocalOverallMetric,{hash:eo})}),jsxRuntimeExports.jsx(TraceFilter,{hash:eo,setHash:to}),jsxRuntimeExports.jsx(TraceList,{className:ro.grid,onRowClick:()=>{oo(!0)}})]}),jsxRuntimeExports.jsx(DefaultDetailContainer,{isOpen:no,setIsOpen:oo,header:jsxRuntimeExports.jsx(TraceDetailHeader,{setIsTraceDetailOpen:oo,showStreamSwitch:ao,showGantt:!0,showCopyUrl:!0,isStreaming:co,onIsStreamingChange:uo}),content:jsxRuntimeExports.jsx(TraceDetail,{})})]})},useClasses$1=makeStyles({header:{display:"flex",width:"100%"},wrapper:{display:"flex",flexDirection:"column",height:"100%"},divider:{flexGrow:0,...shorthands.margin("16px",0)},grid:{flexGrow:1}});window.TraceView_Version="20240424.4-main";const TraceViewApp=()=>{const[eo,to]=useHashObject(),ro=useClasses(),no=React.useMemo(()=>new TraceViewModel({spanConfig:{fetchSpanEvent,isLazyLoadSpan:!1}}),[]);return jsxRuntimeExports.jsx(ThemeContextProvider,{children:jsxRuntimeExports.jsx(ThemeContext.Consumer,{children:({theme:oo})=>{const io=oo==="dark";return jsxRuntimeExports.jsxs(FluentProvider,{theme:io?webDarkTheme:webLightTheme,style:{height:"100%",width:"100%"},children:[jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:` +`:no=="r"?"\r":no=="t"?" ":"\\")}eq(to){return this.search==to.search&&this.replace==to.replace&&this.caseSensitive==to.caseSensitive&&this.regexp==to.regexp&&this.wholeWord==to.wholeWord}create(){return this.regexp?new RegExpQuery(this):new StringQuery(this)}getCursor(to,ro=0,no){let oo=to.doc?to:EditorState.create({doc:to});return no==null&&(no=oo.doc.length),this.regexp?regexpCursor(this,oo,ro,no):stringCursor(this,oo,ro,no)}}class QueryType{constructor(to){this.spec=to}}function stringCursor(eo,to,ro,no){return new SearchCursor(to.doc,eo.unquoted,ro,no,eo.caseSensitive?void 0:oo=>oo.toLowerCase(),eo.wholeWord?stringWordTest(to.doc,to.charCategorizer(to.selection.main.head)):void 0)}function stringWordTest(eo,to){return(ro,no,oo,io)=>((io>ro||io+oo.length=ro)return null;oo.push(no.value)}return oo}highlight(to,ro,no,oo){let io=stringCursor(this.spec,to,Math.max(0,ro-this.spec.unquoted.length),Math.min(no+this.spec.unquoted.length,to.doc.length));for(;!io.next().done;)oo(io.value.from,io.value.to)}}function regexpCursor(eo,to,ro,no){return new RegExpCursor(to.doc,eo.search,{ignoreCase:!eo.caseSensitive,test:eo.wholeWord?regexpWordTest(to.charCategorizer(to.selection.main.head)):void 0},ro,no)}function charBefore(eo,to){return eo.slice(findClusterBreak(eo,to,!1),to)}function charAfter(eo,to){return eo.slice(to,findClusterBreak(eo,to))}function regexpWordTest(eo){return(to,ro,no)=>!no[0].length||(eo(charBefore(no.input,no.index))!=CharCategory.Word||eo(charAfter(no.input,no.index))!=CharCategory.Word)&&(eo(charAfter(no.input,no.index+no[0].length))!=CharCategory.Word||eo(charBefore(no.input,no.index+no[0].length))!=CharCategory.Word)}class RegExpQuery extends QueryType{nextMatch(to,ro,no){let oo=regexpCursor(this.spec,to,no,to.doc.length).next();return oo.done&&(oo=regexpCursor(this.spec,to,0,ro).next()),oo.done?null:oo.value}prevMatchInRange(to,ro,no){for(let oo=1;;oo++){let io=Math.max(ro,no-oo*1e4),so=regexpCursor(this.spec,to,io,no),ao=null;for(;!so.next().done;)ao=so.value;if(ao&&(io==ro||ao.from>io+10))return ao;if(io==ro)return null}}prevMatch(to,ro,no){return this.prevMatchInRange(to,0,ro)||this.prevMatchInRange(to,no,to.doc.length)}getReplacement(to){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(ro,no)=>no=="$"?"$":no=="&"?to.match[0]:no!="0"&&+no=ro)return null;oo.push(no.value)}return oo}highlight(to,ro,no,oo){let io=regexpCursor(this.spec,to,Math.max(0,ro-250),Math.min(no+250,to.doc.length));for(;!io.next().done;)oo(io.value.from,io.value.to)}}const setSearchQuery=StateEffect.define(),togglePanel$1=StateEffect.define(),searchState=StateField.define({create(eo){return new SearchState(defaultQuery(eo).create(),null)},update(eo,to){for(let ro of to.effects)ro.is(setSearchQuery)?eo=new SearchState(ro.value.create(),eo.panel):ro.is(togglePanel$1)&&(eo=new SearchState(eo.query,ro.value?createSearchPanel:null));return eo},provide:eo=>showPanel.from(eo,to=>to.panel)});class SearchState{constructor(to,ro){this.query=to,this.panel=ro}}const matchMark=Decoration.mark({class:"cm-searchMatch"}),selectedMatchMark=Decoration.mark({class:"cm-searchMatch cm-searchMatch-selected"}),searchHighlighter=ViewPlugin.fromClass(class{constructor(eo){this.view=eo,this.decorations=this.highlight(eo.state.field(searchState))}update(eo){let to=eo.state.field(searchState);(to!=eo.startState.field(searchState)||eo.docChanged||eo.selectionSet||eo.viewportChanged)&&(this.decorations=this.highlight(to))}highlight({query:eo,panel:to}){if(!to||!eo.spec.valid)return Decoration.none;let{view:ro}=this,no=new RangeSetBuilder;for(let oo=0,io=ro.visibleRanges,so=io.length;ooio[oo+1].from-2*250;)lo=io[++oo].to;eo.highlight(ro.state,ao,lo,(co,uo)=>{let fo=ro.state.selection.ranges.some(ho=>ho.from==co&&ho.to==uo);no.add(co,uo,fo?selectedMatchMark:matchMark)})}return no.finish()}},{decorations:eo=>eo.decorations});function searchCommand(eo){return to=>{let ro=to.state.field(searchState,!1);return ro&&ro.query.spec.valid?eo(to,ro):openSearchPanel(to)}}const findNext=searchCommand((eo,{query:to})=>{let{to:ro}=eo.state.selection.main,no=to.nextMatch(eo.state,ro,ro);if(!no)return!1;let oo=EditorSelection.single(no.from,no.to),io=eo.state.facet(searchConfigFacet);return eo.dispatch({selection:oo,effects:[announceMatch(eo,no),io.scrollToMatch(oo.main,eo)],userEvent:"select.search"}),selectSearchInput(eo),!0}),findPrevious=searchCommand((eo,{query:to})=>{let{state:ro}=eo,{from:no}=ro.selection.main,oo=to.prevMatch(ro,no,no);if(!oo)return!1;let io=EditorSelection.single(oo.from,oo.to),so=eo.state.facet(searchConfigFacet);return eo.dispatch({selection:io,effects:[announceMatch(eo,oo),so.scrollToMatch(io.main,eo)],userEvent:"select.search"}),selectSearchInput(eo),!0}),selectMatches=searchCommand((eo,{query:to})=>{let ro=to.matchAll(eo.state,1e3);return!ro||!ro.length?!1:(eo.dispatch({selection:EditorSelection.create(ro.map(no=>EditorSelection.range(no.from,no.to))),userEvent:"select.search.matches"}),!0)}),selectSelectionMatches=({state:eo,dispatch:to})=>{let ro=eo.selection;if(ro.ranges.length>1||ro.main.empty)return!1;let{from:no,to:oo}=ro.main,io=[],so=0;for(let ao=new SearchCursor(eo.doc,eo.sliceDoc(no,oo));!ao.next().done;){if(io.length>1e3)return!1;ao.value.from==no&&(so=io.length),io.push(EditorSelection.range(ao.value.from,ao.value.to))}return to(eo.update({selection:EditorSelection.create(io,so),userEvent:"select.search.matches"})),!0},replaceNext=searchCommand((eo,{query:to})=>{let{state:ro}=eo,{from:no,to:oo}=ro.selection.main;if(ro.readOnly)return!1;let io=to.nextMatch(ro,no,no);if(!io)return!1;let so=[],ao,lo,co=[];if(io.from==no&&io.to==oo&&(lo=ro.toText(to.getReplacement(io)),so.push({from:io.from,to:io.to,insert:lo}),io=to.nextMatch(ro,io.from,io.to),co.push(EditorView.announce.of(ro.phrase("replaced match on line $",ro.doc.lineAt(no).number)+"."))),io){let uo=so.length==0||so[0].from>=io.to?0:io.to-io.from-lo.length;ao=EditorSelection.single(io.from-uo,io.to-uo),co.push(announceMatch(eo,io)),co.push(ro.facet(searchConfigFacet).scrollToMatch(ao.main,eo))}return eo.dispatch({changes:so,selection:ao,effects:co,userEvent:"input.replace"}),!0}),replaceAll=searchCommand((eo,{query:to})=>{if(eo.state.readOnly)return!1;let ro=to.matchAll(eo.state,1e9).map(oo=>{let{from:io,to:so}=oo;return{from:io,to:so,insert:to.getReplacement(oo)}});if(!ro.length)return!1;let no=eo.state.phrase("replaced $ matches",ro.length)+".";return eo.dispatch({changes:ro,effects:EditorView.announce.of(no),userEvent:"input.replace.all"}),!0});function createSearchPanel(eo){return eo.state.facet(searchConfigFacet).createPanel(eo)}function defaultQuery(eo,to){var ro,no,oo,io,so;let ao=eo.selection.main,lo=ao.empty||ao.to>ao.from+100?"":eo.sliceDoc(ao.from,ao.to);if(to&&!lo)return to;let co=eo.facet(searchConfigFacet);return new SearchQuery({search:((ro=to==null?void 0:to.literal)!==null&&ro!==void 0?ro:co.literal)?lo:lo.replace(/\n/g,"\\n"),caseSensitive:(no=to==null?void 0:to.caseSensitive)!==null&&no!==void 0?no:co.caseSensitive,literal:(oo=to==null?void 0:to.literal)!==null&&oo!==void 0?oo:co.literal,regexp:(io=to==null?void 0:to.regexp)!==null&&io!==void 0?io:co.regexp,wholeWord:(so=to==null?void 0:to.wholeWord)!==null&&so!==void 0?so:co.wholeWord})}function getSearchInput(eo){let to=getPanel(eo,createSearchPanel);return to&&to.dom.querySelector("[main-field]")}function selectSearchInput(eo){let to=getSearchInput(eo);to&&to==eo.root.activeElement&&to.select()}const openSearchPanel=eo=>{let to=eo.state.field(searchState,!1);if(to&&to.panel){let ro=getSearchInput(eo);if(ro&&ro!=eo.root.activeElement){let no=defaultQuery(eo.state,to.query.spec);no.valid&&eo.dispatch({effects:setSearchQuery.of(no)}),ro.focus(),ro.select()}}else eo.dispatch({effects:[togglePanel$1.of(!0),to?setSearchQuery.of(defaultQuery(eo.state,to.query.spec)):StateEffect.appendConfig.of(searchExtensions)]});return!0},closeSearchPanel=eo=>{let to=eo.state.field(searchState,!1);if(!to||!to.panel)return!1;let ro=getPanel(eo,createSearchPanel);return ro&&ro.dom.contains(eo.root.activeElement)&&eo.focus(),eo.dispatch({effects:togglePanel$1.of(!1)}),!0},searchKeymap=[{key:"Mod-f",run:openSearchPanel,scope:"editor search-panel"},{key:"F3",run:findNext,shift:findPrevious,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:findNext,shift:findPrevious,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:closeSearchPanel,scope:"editor search-panel"},{key:"Mod-Shift-l",run:selectSelectionMatches},{key:"Mod-Alt-g",run:gotoLine},{key:"Mod-d",run:selectNextOccurrence,preventDefault:!0}];class SearchPanel{constructor(to){this.view=to;let ro=this.query=to.state.field(searchState).query.spec;this.commit=this.commit.bind(this),this.searchField=crelt("input",{value:ro.search,placeholder:phrase(to,"Find"),"aria-label":phrase(to,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=crelt("input",{value:ro.replace,placeholder:phrase(to,"Replace"),"aria-label":phrase(to,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=crelt("input",{type:"checkbox",name:"case",form:"",checked:ro.caseSensitive,onchange:this.commit}),this.reField=crelt("input",{type:"checkbox",name:"re",form:"",checked:ro.regexp,onchange:this.commit}),this.wordField=crelt("input",{type:"checkbox",name:"word",form:"",checked:ro.wholeWord,onchange:this.commit});function no(oo,io,so){return crelt("button",{class:"cm-button",name:oo,onclick:io,type:"button"},so)}this.dom=crelt("div",{onkeydown:oo=>this.keydown(oo),class:"cm-search"},[this.searchField,no("next",()=>findNext(to),[phrase(to,"next")]),no("prev",()=>findPrevious(to),[phrase(to,"previous")]),no("select",()=>selectMatches(to),[phrase(to,"all")]),crelt("label",null,[this.caseField,phrase(to,"match case")]),crelt("label",null,[this.reField,phrase(to,"regexp")]),crelt("label",null,[this.wordField,phrase(to,"by word")]),...to.state.readOnly?[]:[crelt("br"),this.replaceField,no("replace",()=>replaceNext(to),[phrase(to,"replace")]),no("replaceAll",()=>replaceAll(to),[phrase(to,"replace all")])],crelt("button",{name:"close",onclick:()=>closeSearchPanel(to),"aria-label":phrase(to,"close"),type:"button"},["×"])])}commit(){let to=new SearchQuery({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});to.eq(this.query)||(this.query=to,this.view.dispatch({effects:setSearchQuery.of(to)}))}keydown(to){runScopeHandlers(this.view,to,"search-panel")?to.preventDefault():to.keyCode==13&&to.target==this.searchField?(to.preventDefault(),(to.shiftKey?findPrevious:findNext)(this.view)):to.keyCode==13&&to.target==this.replaceField&&(to.preventDefault(),replaceNext(this.view))}update(to){for(let ro of to.transactions)for(let no of ro.effects)no.is(setSearchQuery)&&!no.value.eq(this.query)&&this.setQuery(no.value)}setQuery(to){this.query=to,this.searchField.value=to.search,this.replaceField.value=to.replace,this.caseField.checked=to.caseSensitive,this.reField.checked=to.regexp,this.wordField.checked=to.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(searchConfigFacet).top}}function phrase(eo,to){return eo.state.phrase(to)}const AnnounceMargin=30,Break=/[\s\.,:;?!]/;function announceMatch(eo,{from:to,to:ro}){let no=eo.state.doc.lineAt(to),oo=eo.state.doc.lineAt(ro).to,io=Math.max(no.from,to-AnnounceMargin),so=Math.min(oo,ro+AnnounceMargin),ao=eo.state.sliceDoc(io,so);if(io!=no.from){for(let lo=0;loao.length-AnnounceMargin;lo--)if(!Break.test(ao[lo-1])&&Break.test(ao[lo])){ao=ao.slice(0,lo);break}}return EditorView.announce.of(`${eo.state.phrase("current match")}. ${ao} ${eo.state.phrase("on line")} ${no.number}.`)}const baseTheme$2=EditorView.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"}}),searchExtensions=[searchState,Prec.low(searchHighlighter),baseTheme$2];class SelectedDiagnostic{constructor(to,ro,no){this.from=to,this.to=ro,this.diagnostic=no}}class LintState{constructor(to,ro,no){this.diagnostics=to,this.panel=ro,this.selected=no}static init(to,ro,no){let oo=to,io=no.facet(lintConfig).markerFilter;io&&(oo=io(oo,no));let so=Decoration.set(oo.map(ao=>ao.from==ao.to||ao.from==ao.to-1&&no.doc.lineAt(ao.from).to==ao.from?Decoration.widget({widget:new DiagnosticWidget(ao),diagnostic:ao}).range(ao.from):Decoration.mark({attributes:{class:"cm-lintRange cm-lintRange-"+ao.severity+(ao.markClass?" "+ao.markClass:"")},diagnostic:ao,inclusive:!0}).range(ao.from,ao.to)),!0);return new LintState(so,ro,findDiagnostic(so))}}function findDiagnostic(eo,to=null,ro=0){let no=null;return eo.between(ro,1e9,(oo,io,{spec:so})=>{if(!(to&&so.diagnostic!=to))return no=new SelectedDiagnostic(oo,io,so.diagnostic),!1}),no}function hideTooltip(eo,to){let ro=eo.startState.doc.lineAt(to.pos);return!!(eo.effects.some(no=>no.is(setDiagnosticsEffect))||eo.changes.touchesRange(ro.from,ro.to))}function maybeEnableLint(eo,to){return eo.field(lintState,!1)?to:to.concat(StateEffect.appendConfig.of(lintExtensions))}const setDiagnosticsEffect=StateEffect.define(),togglePanel=StateEffect.define(),movePanelSelection=StateEffect.define(),lintState=StateField.define({create(){return new LintState(Decoration.none,null,null)},update(eo,to){if(to.docChanged){let ro=eo.diagnostics.map(to.changes),no=null;if(eo.selected){let oo=to.changes.mapPos(eo.selected.from,1);no=findDiagnostic(ro,eo.selected.diagnostic,oo)||findDiagnostic(ro,null,oo)}eo=new LintState(ro,eo.panel,no)}for(let ro of to.effects)ro.is(setDiagnosticsEffect)?eo=LintState.init(ro.value,eo.panel,to.state):ro.is(togglePanel)?eo=new LintState(eo.diagnostics,ro.value?LintPanel.open:null,eo.selected):ro.is(movePanelSelection)&&(eo=new LintState(eo.diagnostics,eo.panel,ro.value));return eo},provide:eo=>[showPanel.from(eo,to=>to.panel),EditorView.decorations.from(eo,to=>to.diagnostics)]}),activeMark=Decoration.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function lintTooltip(eo,to,ro){let{diagnostics:no}=eo.state.field(lintState),oo=[],io=2e8,so=0;no.between(to-(ro<0?1:0),to+(ro>0?1:0),(lo,co,{spec:uo})=>{to>=lo&&to<=co&&(lo==co||(to>lo||ro>0)&&(torenderDiagnostic(eo,ro,!1)))}const openLintPanel=eo=>{let to=eo.state.field(lintState,!1);(!to||!to.panel)&&eo.dispatch({effects:maybeEnableLint(eo.state,[togglePanel.of(!0)])});let ro=getPanel(eo,LintPanel.open);return ro&&ro.dom.querySelector(".cm-panel-lint ul").focus(),!0},closeLintPanel=eo=>{let to=eo.state.field(lintState,!1);return!to||!to.panel?!1:(eo.dispatch({effects:togglePanel.of(!1)}),!0)},nextDiagnostic=eo=>{let to=eo.state.field(lintState,!1);if(!to)return!1;let ro=eo.state.selection.main,no=to.diagnostics.iter(ro.to+1);return!no.value&&(no=to.diagnostics.iter(0),!no.value||no.from==ro.from&&no.to==ro.to)?!1:(eo.dispatch({selection:{anchor:no.from,head:no.to},scrollIntoView:!0}),!0)},lintKeymap=[{key:"Mod-Shift-m",run:openLintPanel,preventDefault:!0},{key:"F8",run:nextDiagnostic}],lintConfig=Facet.define({combine(eo){return Object.assign({sources:eo.map(to=>to.source).filter(to=>to!=null)},combineConfig(eo.map(to=>to.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(to,ro)=>to?ro?no=>to(no)||ro(no):to:ro}))}});function assignKeys(eo){let to=[];if(eo)e:for(let{name:ro}of eo){for(let no=0;noio.toLowerCase()==oo.toLowerCase())){to.push(oo);continue e}}to.push("")}return to}function renderDiagnostic(eo,to,ro){var no;let oo=ro?assignKeys(to.actions):[];return crelt("li",{class:"cm-diagnostic cm-diagnostic-"+to.severity},crelt("span",{class:"cm-diagnosticText"},to.renderMessage?to.renderMessage():to.message),(no=to.actions)===null||no===void 0?void 0:no.map((io,so)=>{let ao=!1,lo=ho=>{if(ho.preventDefault(),ao)return;ao=!0;let po=findDiagnostic(eo.state.field(lintState).diagnostics,to);po&&io.apply(eo,po.from,po.to)},{name:co}=io,uo=oo[so]?co.indexOf(oo[so]):-1,fo=uo<0?co:[co.slice(0,uo),crelt("u",co.slice(uo,uo+1)),co.slice(uo+1)];return crelt("button",{type:"button",class:"cm-diagnosticAction",onclick:lo,onmousedown:lo,"aria-label":` Action: ${co}${uo<0?"":` (access key "${oo[so]})"`}.`},fo)}),to.source&&crelt("div",{class:"cm-diagnosticSource"},to.source))}class DiagnosticWidget extends WidgetType{constructor(to){super(),this.diagnostic=to}eq(to){return to.diagnostic==this.diagnostic}toDOM(){return crelt("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class PanelItem{constructor(to,ro){this.diagnostic=ro,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=renderDiagnostic(to,ro,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class LintPanel{constructor(to){this.view=to,this.items=[];let ro=oo=>{if(oo.keyCode==27)closeLintPanel(this.view),this.view.focus();else if(oo.keyCode==38||oo.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(oo.keyCode==40||oo.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(oo.keyCode==36)this.moveSelection(0);else if(oo.keyCode==35)this.moveSelection(this.items.length-1);else if(oo.keyCode==13)this.view.focus();else if(oo.keyCode>=65&&oo.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:io}=this.items[this.selectedIndex],so=assignKeys(io.actions);for(let ao=0;ao{for(let io=0;iocloseLintPanel(this.view)},"×")),this.update()}get selectedIndex(){let to=this.view.state.field(lintState).selected;if(!to)return-1;for(let ro=0;ro{let co=-1,uo;for(let fo=no;fono&&(this.items.splice(no,co-no),oo=!0)),ro&&uo.diagnostic==ro.diagnostic?uo.dom.hasAttribute("aria-selected")||(uo.dom.setAttribute("aria-selected","true"),io=uo):uo.dom.hasAttribute("aria-selected")&&uo.dom.removeAttribute("aria-selected"),no++});no({sel:io.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:so,panel:ao})=>{let lo=ao.height/this.list.offsetHeight;so.topao.bottom&&(this.list.scrollTop+=(so.bottom-ao.bottom)/lo)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),oo&&this.sync()}sync(){let to=this.list.firstChild;function ro(){let no=to;to=no.nextSibling,no.remove()}for(let no of this.items)if(no.dom.parentNode==this.list){for(;to!=no.dom;)ro();to=no.dom.nextSibling}else this.list.insertBefore(no.dom,to);for(;to;)ro()}moveSelection(to){if(this.selectedIndex<0)return;let ro=this.view.state.field(lintState),no=findDiagnostic(ro.diagnostics,this.items[to].diagnostic);no&&this.view.dispatch({selection:{anchor:no.from,head:no.to},scrollIntoView:!0,effects:movePanelSelection.of(no)})}static open(to){return new LintPanel(to)}}function svg(eo,to='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(eo)}')`}function underline(eo){return svg(``,'width="6" height="3"')}const baseTheme=EditorView.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:underline("#d11")},".cm-lintRange-warning":{backgroundImage:underline("orange")},".cm-lintRange-info":{backgroundImage:underline("#999")},".cm-lintRange-hint":{backgroundImage:underline("#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}}}),lintExtensions=[lintState,EditorView.decorations.compute([lintState],eo=>{let{selected:to,panel:ro}=eo.field(lintState);return!to||!ro||to.from==to.to?Decoration.none:Decoration.set([activeMark.range(to.from,to.to)])}),hoverTooltip(lintTooltip,{hideOn:hideTooltip}),baseTheme];var basicSetup=function eo(to){to===void 0&&(to={});var{crosshairCursor:ro=!1}=to,no=[];to.closeBracketsKeymap!==!1&&(no=no.concat(closeBracketsKeymap)),to.defaultKeymap!==!1&&(no=no.concat(defaultKeymap)),to.searchKeymap!==!1&&(no=no.concat(searchKeymap)),to.historyKeymap!==!1&&(no=no.concat(historyKeymap)),to.foldKeymap!==!1&&(no=no.concat(foldKeymap)),to.completionKeymap!==!1&&(no=no.concat(completionKeymap)),to.lintKeymap!==!1&&(no=no.concat(lintKeymap));var oo=[];return to.lineNumbers!==!1&&oo.push(lineNumbers()),to.highlightActiveLineGutter!==!1&&oo.push(highlightActiveLineGutter()),to.highlightSpecialChars!==!1&&oo.push(highlightSpecialChars()),to.history!==!1&&oo.push(history()),to.foldGutter!==!1&&oo.push(foldGutter()),to.drawSelection!==!1&&oo.push(drawSelection()),to.dropCursor!==!1&&oo.push(dropCursor()),to.allowMultipleSelections!==!1&&oo.push(EditorState.allowMultipleSelections.of(!0)),to.indentOnInput!==!1&&oo.push(indentOnInput()),to.syntaxHighlighting!==!1&&oo.push(syntaxHighlighting(defaultHighlightStyle,{fallback:!0})),to.bracketMatching!==!1&&oo.push(bracketMatching()),to.closeBrackets!==!1&&oo.push(closeBrackets()),to.autocompletion!==!1&&oo.push(autocompletion()),to.rectangularSelection!==!1&&oo.push(rectangularSelection()),ro!==!1&&oo.push(crosshairCursor()),to.highlightActiveLine!==!1&&oo.push(highlightActiveLine()),to.highlightSelectionMatches!==!1&&oo.push(highlightSelectionMatches()),to.tabSize&&typeof to.tabSize=="number"&&oo.push(indentUnit.of(" ".repeat(to.tabSize))),oo.concat([keymap.of(no.flat())]).filter(Boolean)};const chalky="#e5c07b",coral="#e06c75",cyan="#56b6c2",invalid="#ffffff",ivory="#abb2bf",stone="#7d8799",malibu="#61afef",sage="#98c379",whiskey="#d19a66",violet="#c678dd",darkBackground="#21252b",highlightBackground="#2c313a",background="#282c34",tooltipBackground="#353a42",selection="#3E4451",cursor="#528bff",oneDarkTheme=EditorView.theme({"&":{color:ivory,backgroundColor:background},".cm-content":{caretColor:cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:selection},".cm-panels":{backgroundColor:darkBackground,color:ivory},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:background,color:stone,border:"none"},".cm-activeLineGutter":{backgroundColor:highlightBackground},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:tooltipBackground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:tooltipBackground,borderBottomColor:tooltipBackground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:highlightBackground,color:ivory}}},{dark:!0}),oneDarkHighlightStyle=HighlightStyle.define([{tag:tags.keyword,color:violet},{tag:[tags.name,tags.deleted,tags.character,tags.propertyName,tags.macroName],color:coral},{tag:[tags.function(tags.variableName),tags.labelName],color:malibu},{tag:[tags.color,tags.constant(tags.name),tags.standard(tags.name)],color:whiskey},{tag:[tags.definition(tags.name),tags.separator],color:ivory},{tag:[tags.typeName,tags.className,tags.number,tags.changed,tags.annotation,tags.modifier,tags.self,tags.namespace],color:chalky},{tag:[tags.operator,tags.operatorKeyword,tags.url,tags.escape,tags.regexp,tags.link,tags.special(tags.string)],color:cyan},{tag:[tags.meta,tags.comment],color:stone},{tag:tags.strong,fontWeight:"bold"},{tag:tags.emphasis,fontStyle:"italic"},{tag:tags.strikethrough,textDecoration:"line-through"},{tag:tags.link,color:stone,textDecoration:"underline"},{tag:tags.heading,fontWeight:"bold",color:coral},{tag:[tags.atom,tags.bool,tags.special(tags.variableName)],color:whiskey},{tag:[tags.processingInstruction,tags.string,tags.inserted],color:sage},{tag:tags.invalid,color:invalid}]),oneDark=[oneDarkTheme,syntaxHighlighting(oneDarkHighlightStyle)];var defaultLightThemeOption=EditorView.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),getDefaultExtensions=function eo(to){to===void 0&&(to={});var{indentWithTab:ro=!0,editable:no=!0,readOnly:oo=!1,theme:io="light",placeholder:so="",basicSetup:ao=!0}=to,lo=[];switch(ro&&lo.unshift(keymap.of([indentWithTab])),ao&&(typeof ao=="boolean"?lo.unshift(basicSetup()):lo.unshift(basicSetup(ao))),so&&lo.unshift(placeholder(so)),io){case"light":lo.push(defaultLightThemeOption);break;case"dark":lo.push(oneDark);break;case"none":break;default:lo.push(io);break}return no===!1&&lo.push(EditorView.editable.of(!1)),oo&&lo.push(EditorState.readOnly.of(!0)),[...lo]},getStatistics=eo=>({line:eo.state.doc.lineAt(eo.state.selection.main.from),lineCount:eo.state.doc.lines,lineBreak:eo.state.lineBreak,length:eo.state.doc.length,readOnly:eo.state.readOnly,tabSize:eo.state.tabSize,selection:eo.state.selection,selectionAsSingle:eo.state.selection.asSingle().main,ranges:eo.state.selection.ranges,selectionCode:eo.state.sliceDoc(eo.state.selection.main.from,eo.state.selection.main.to),selections:eo.state.selection.ranges.map(to=>eo.state.sliceDoc(to.from,to.to)),selectedText:eo.state.selection.ranges.some(to=>!to.empty)}),External=Annotation.define(),emptyExtensions=[];function useCodeMirror(eo){var{value:to,selection:ro,onChange:no,onStatistics:oo,onCreateEditor:io,onUpdate:so,extensions:ao=emptyExtensions,autoFocus:lo,theme:co="light",height:uo=null,minHeight:fo=null,maxHeight:ho=null,width:po=null,minWidth:go=null,maxWidth:vo=null,placeholder:yo="",editable:xo=!0,readOnly:_o=!1,indentWithTab:Eo=!0,basicSetup:So=!0,root:ko,initialState:Ao}=eo,[Co,Oo]=reactExports.useState(),[wo,Ro]=reactExports.useState(),[Do,$o]=reactExports.useState(),Mo=EditorView.theme({"&":{height:uo,minHeight:fo,maxHeight:ho,width:po,minWidth:go,maxWidth:vo},"& .cm-scroller":{height:"100% !important"}}),Po=EditorView.updateListener.of(Fo=>{if(Fo.docChanged&&typeof no=="function"&&!Fo.transactions.some(Go=>Go.annotation(External))){var zo=Fo.state.doc,qo=zo.toString();no(qo,Fo)}oo&&oo(getStatistics(Fo))}),Bo=getDefaultExtensions({theme:co,editable:xo,readOnly:_o,placeholder:yo,indentWithTab:Eo,basicSetup:So}),No=[Po,Mo,...Bo];return so&&typeof so=="function"&&No.push(EditorView.updateListener.of(so)),No=No.concat(ao),reactExports.useEffect(()=>{if(Co&&!Do){var Fo={doc:to,selection:ro,extensions:No},zo=Ao?EditorState.fromJSON(Ao.json,Fo,Ao.fields):EditorState.create(Fo);if($o(zo),!wo){var qo=new EditorView({state:zo,parent:Co,root:ko});Ro(qo),io&&io(qo,zo)}}return()=>{wo&&($o(void 0),Ro(void 0))}},[Co,Do]),reactExports.useEffect(()=>Oo(eo.container),[eo.container]),reactExports.useEffect(()=>()=>{wo&&(wo.destroy(),Ro(void 0))},[wo]),reactExports.useEffect(()=>{lo&&wo&&wo.focus()},[lo,wo]),reactExports.useEffect(()=>{wo&&wo.dispatch({effects:StateEffect.reconfigure.of(No)})},[co,ao,uo,fo,ho,po,go,vo,yo,xo,_o,Eo,So,no,so]),reactExports.useEffect(()=>{if(to!==void 0){var Fo=wo?wo.state.doc.toString():"";wo&&to!==Fo&&wo.dispatch({changes:{from:0,to:Fo.length,insert:to||""},annotations:[External.of(!0)]})}},[to,wo]),{state:Do,setState:$o,view:wo,setView:Ro,container:Co,setContainer:Oo}}var _excluded=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],ReactCodeMirror=reactExports.forwardRef((eo,to)=>{var{className:ro,value:no="",selection:oo,extensions:io=[],onChange:so,onStatistics:ao,onCreateEditor:lo,onUpdate:co,autoFocus:uo,theme:fo="light",height:ho,minHeight:po,maxHeight:go,width:vo,minWidth:yo,maxWidth:xo,basicSetup:_o,placeholder:Eo,indentWithTab:So,editable:ko,readOnly:Ao,root:Co,initialState:Oo}=eo,wo=_objectWithoutPropertiesLoose(eo,_excluded),Ro=reactExports.useRef(null),{state:Do,view:$o,container:Mo}=useCodeMirror({container:Ro.current,root:Co,value:no,autoFocus:uo,theme:fo,height:ho,minHeight:po,maxHeight:go,width:vo,minWidth:yo,maxWidth:xo,basicSetup:_o,placeholder:Eo,indentWithTab:So,editable:ko,readOnly:Ao,selection:oo,onChange:so,onStatistics:ao,onCreateEditor:lo,onUpdate:co,extensions:io,initialState:Oo});if(reactExports.useImperativeHandle(to,()=>({editor:Ro.current,state:Do,view:$o}),[Ro,Mo,Do,$o]),typeof no!="string")throw new Error("value must be typeof string but got "+typeof no);var Po=typeof fo=="string"?"cm-theme-"+fo:"cm-theme";return jsxRuntimeExports.jsx("div",_extends({ref:Ro,className:""+Po+(ro?" "+ro:"")},wo))});ReactCodeMirror.displayName="CodeMirror";const TraceFilterInput=({className:eo,hash:to,setHash:ro})=>{const no=useClasses$7(),io=useIsDark()?vscodeDark:void 0,so="Input filter condition in python syntax. e.g. name == 'web_classification' and cumulative_token_count.total > 1000",[ao,lo]=reactExports.useState(to.filter??""),co=lodashExports.debounce(ho=>{lo(ho),ho.trim()!==""?ro({filter:ho}):ro({filter:void 0})},500),uo=ho=>{ao.length>0?co(`${ao} and ${ho}`):co(ho)},fo=ao!=="";return jsxRuntimeExports.jsx("div",{className:mergeClasses(eo,no.wrapper),children:jsxRuntimeExports.jsxs("div",{className:no.field,children:[jsxRuntimeExports.jsx(Search20Regular,{className:no.searchIcon}),jsxRuntimeExports.jsx(ReactCodeMirror,{basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1,defaultKeymap:!1},className:no.input,height:"36px",width:"100%",value:ao,onChange:co,editable:!0,placeholder:so,extensions,theme:io}),jsxRuntimeExports.jsx(DismissCircle20Regular,{className:no.dismissIcon,style:{visibility:fo?"visible":"hidden"},onClick:()=>co("")}),jsxRuntimeExports.jsx(Divider$2,{vertical:!0,className:no.divider}),jsxRuntimeExports.jsxs(Popover,{positioning:"below-end",withArrow:!0,children:[jsxRuntimeExports.jsx(PopoverTrigger,{disableButtonEnhancement:!0,children:jsxRuntimeExports.jsx(AddCircle20Regular,{className:no.addIcon})}),jsxRuntimeExports.jsx(PopoverSurface,{tabIndex:-1,children:jsxRuntimeExports.jsx(FilterConditions,{onAddCondition:uo})})]})]})})};function FilterConditions(eo){const{onAddCondition:to}=eo,ro=useClasses$7();return jsxRuntimeExports.jsxs("div",{className:ro.conditionsWrapper,children:[jsxRuntimeExports.jsx(FilterConditionRow,{label:"filter by name",initialSnippet:"name == 'your_trace_name'",onAddFilterConditionSnippet:to},"name"),jsxRuntimeExports.jsx(FilterConditionRow,{label:"filter by kind",initialSnippet:"kind == 'Flow'",onAddFilterConditionSnippet:to},"kind"),jsxRuntimeExports.jsx(FilterConditionRow,{label:"filter by status",initialSnippet:"status == 'Error'",onAddFilterConditionSnippet:to},"status"),jsxRuntimeExports.jsx(FilterConditionRow,{label:"filter by start_time",initialSnippet:"'2024/04/17 15:36:45' < start_time <'2024/04/18",onAddFilterConditionSnippet:to},"start_time"),jsxRuntimeExports.jsx(FilterConditionRow,{label:"filter by cumulative_token_count",initialSnippet:"cumulative_token_count.total > 1000",onAddFilterConditionSnippet:to},"token")]})}function FilterConditionRow(eo){const{initialSnippet:to,onAddFilterConditionSnippet:ro}=eo,[no,oo]=reactExports.useState(to),io=useClasses$7(),ao=useIsDark()?vscodeDark:void 0;return jsxRuntimeExports.jsxs("div",{className:io.conditionWrapper,children:[jsxRuntimeExports.jsx(Text$2,{size:300,weight:"semibold",children:eo.label}),jsxRuntimeExports.jsxs("div",{className:io.conditionRow,children:[jsxRuntimeExports.jsx("div",{className:io.conditionField,children:jsxRuntimeExports.jsx(ReactCodeMirror,{value:no,basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},className:io.conditionInput,editable:!0,extensions:[python()],onChange:oo,theme:ao})}),jsxRuntimeExports.jsx(Button$2,{title:"Add to filter condition",onClick:()=>ro(no),icon:jsxRuntimeExports.jsx(AddCircle20Regular,{}),size:"large"})]})]})}const extensions=[keymap.of([{key:"Enter",run:eo=>!0}]),python(),autocompletion({override:[filterConditionCompletions]})];function filterConditionCompletions(eo){const to=eo.matchBefore(/\w*/);return!to||to.from===to.to&&!eo.explicit?null:{from:to.from,options:[{label:"kind",type:"variable",info:"The kind of trace: Flow, Function, etc."},{label:"name",type:"variable",info:"The name of the trace."},{label:"status",type:"variable",info:"The status of the trace."},{label:"cumulative_token_count.total",type:"variable",info:"The total cumulative token count."},{label:"cumulative_token_count.prompt",type:"variable",info:"The cumulative token count for prompt."},{label:"cumulative_token_count.completion",type:"variable",info:"The cumulative token count for completion."},{label:"start_time",type:"variable",info:"The start time of the trace."},{label:"and",type:"keyword",info:"Logical AND operator."},{label:"or",type:"keyword",info:"Logical OR operator."}]}}const useClasses$7=makeStyles({wrapper:{width:"calc(100% - 280px)"},field:{display:"flex",alignItems:"center",...shorthands.flex(1),...shorthands.padding("1px"),...shorthands.border("1px","solid",tokens.colorNeutralStroke1),...shorthands.borderRadius("4px")},searchIcon:{...shorthands.margin("0","8px")},dismissIcon:{cursor:"pointer"},addIcon:{marginRight:"8px",cursor:"pointer"},input:{width:"100%",overflowX:"auto",backgroundColor:"red","& .cm-focused":{outlineStyle:"none"},"& .cm-content":{...shorthands.padding("8px",0)}},divider:{...shorthands.flex("none"),...shorthands.padding(0,"8px")},conditionsWrapper:{display:"flex",flexDirection:"column",width:"500px",...shorthands.gap("20px"),...shorthands.padding("4px")},conditionWrapper:{display:"flex",flexDirection:"column"},conditionField:{display:"flex",alignItems:"center",...shorthands.flex(1),...shorthands.padding("1px"),...shorthands.border("1px","solid",tokens.colorNeutralStroke1),...shorthands.borderRadius("4px")},conditionRow:{display:"flex",alignItems:"center",marginTop:"4px",...shorthands.gap("8px")},conditionInput:{...shorthands.flex(1),"& .cm-focused":{outlineStyle:"none"},"& .cm-content":{...shorthands.padding("8px",0)}}}),TraceFilter=({hash:eo,setHash:to})=>{const ro=useClasses$6(),no=useLocStrings(),oo=useTableColumnNames(),[io,so]=[useTableHiddenColumnKeys(),useSetTableHiddenColumnKeys()],ao=useTraceListShowMetrics(),[lo,co]=[useTraceFilterChanged(),useSetTraceFilterChanged()],uo=reactExports.useMemo(()=>oo.normalColumns.map(yo=>yo.key),[oo.normalColumns.map(yo=>yo.key).join(",")]),fo=reactExports.useMemo(()=>oo.evaluationColumns.map(yo=>yo.key),[oo.evaluationColumns.map(yo=>yo.key).join(",")]),ho=reactExports.useMemo(()=>[...oo.normalColumns,...oo.evaluationColumns].filter(xo=>!io.includes(xo.key)).map(xo=>xo.key),[io,oo]),po=(yo,xo)=>{const{optionValue:_o}=xo;_o&&(so(io.includes(_o)?io.filter(Eo=>Eo!==_o):[...io,_o]),co(!0))},go=reactExports.useCallback(yo=>{so(yo?io.filter(xo=>!uo.includes(xo)):lodashExports.union([...io],[...uo]))},[so,io,uo]),vo=reactExports.useCallback(yo=>{so(yo?io.filter(xo=>!fo.includes(xo)):lodashExports.union([...io],[...fo]))},[so,io,fo]);return reactExports.useEffect(()=>{lo||(!eo||Object.keys(eo).length===0?so(lodashExports.union([...io],[...fo])):so(lodashExports.union([...io],[METRICS_COLUMN_KEY])))},[lo,fo]),jsxRuntimeExports.jsxs("div",{className:ro.wrapper,children:[eo&&to?jsxRuntimeExports.jsx(TraceFilterInput,{className:ro.filter,hash:eo,setHash:to}):jsxRuntimeExports.jsx(Input,{className:ro.filter,disabled:!0,placeholder:"NOT implement yet"}),jsxRuntimeExports.jsx(Combobox,{multiselect:!0,placeholder:"Columns Filter",selectedOptions:ho,onOptionSelect:po,children:jsxRuntimeExports.jsxs("div",{className:ro.popUp,children:[jsxRuntimeExports.jsx(OptionGroup,{label:jsxRuntimeExports.jsx(Checkbox$2,{checked:uo.every(yo=>!io.includes(yo)),onClick:()=>{const yo=uo.every(xo=>!io.includes(xo));go(!yo)},className:ro.smallCheckbox,label:no["Trace Info"],labelPosition:"before"}),children:oo.normalColumns.map(yo=>jsxRuntimeExports.jsx(Option$3,{value:yo.key,children:yo.name},yo.key))}),ao&&jsxRuntimeExports.jsx(OptionGroup,{label:jsxRuntimeExports.jsx(Checkbox$2,{checked:fo.every(yo=>!io.includes(yo)),onClick:()=>{const yo=fo.every(xo=>!io.includes(xo));vo(!yo)},className:ro.smallCheckbox,label:no.Metrics,labelPosition:"before"}),children:oo.evaluationColumns.map(yo=>jsxRuntimeExports.jsx(Option$3,{value:yo.key,text:yo.name,children:jsxRuntimeExports.jsx(Tooltip,{relationship:"label",content:yo.name,children:jsxRuntimeExports.jsx("span",{className:ro.optionText,children:yo.name})})},yo.key))})]})})]})},useClasses$6=makeStyles({wrapper:{display:"flex",width:"100%",...shorthands.gap("1rem"),...shorthands.margin(tokens.spacingVerticalM,0)},filter:{flexGrow:1},popUp:{overflowX:"hidden"},optionText:{display:"block",width:"90%",...shorthands.overflow("hidden"),textOverflow:"ellipsis",whiteSpace:"nowrap"},smallCheckbox:{"& label":{...shorthands.padding("0px"),fontSize:"12px",lineHeight:"12px"},"& .fui-Checkbox__indicator":{marginLeft:"4px !important",marginRight:"0px !important",marginTop:"2px !important",marginBottom:"0px !important",width:"12px",height:"12px"}}});function TraceList({onRowClick:eo,className:to}){const ro=useClasses$5(),no=useTraceListRows(),{columns:oo,ref:io}=useTraceListColumns(),so=useTraceListViewStatus(),ao=useTraceListLoadingComponent(),lo=useTraceListErrorComponent(),co=useIsDark();useDebugFunctions();const uo=useSortColumn(),fo=useSetSortColumn(),ho=uo?[uo]:[],po=useOnClickTraceRow(),go=reactExports.useCallback(vo=>{var _o;const{row:yo,column:xo}=vo;((_o=yo.status)==null?void 0:_o.toLowerCase())!=="running"&&(xo.key==="input"||xo.key==="output")||(po(yo,xo.key),eo==null||eo(yo))},[po,eo]);return so===ViewStatus.error?jsxRuntimeExports.jsx(lo,{}):so===ViewStatus.loading?jsxRuntimeExports.jsx(ao,{}):jsxRuntimeExports.jsx("div",{ref:io,className:ro.root,children:jsxRuntimeExports.jsx(DataGrid$1$1,{className:`${ro.grid} ${to??""} ${co?"rdg-dark":"rdg-light"}`,renderers:{noRowsFallback:jsxRuntimeExports.jsxs("div",{style:{textAlign:"center",gridColumn:"1/-1",display:"flex",alignItems:"center",justifyContent:"center"},children:[jsxRuntimeExports.jsx(TextBulletListSquareWarning24Regular,{}),jsxRuntimeExports.jsx(Text$2,{style:{paddingLeft:"1rem"},children:"No traces found."})]})},rowClass:()=>ro.row,columns:oo,rows:no,headerRowHeight:26,rowHeight:80,onCellClick:go,defaultColumnOptions:{resizable:!0},sortColumns:ho,onSortColumnsChange:vo=>{var yo;fo((yo=vo.slice(-1))==null?void 0:yo[0])}})})}const useClasses$5=makeStyles({root:{display:"flex",flexDirection:"column",flexGrow:1},grid:{},row:{cursor:"pointer"}}),DefaultDetailContainer=({isOpen:eo,setIsOpen:to,header:ro=null,content:no})=>jsxRuntimeExports.jsxs(OverlayDrawer,{position:"end",style:{width:"calc(100% - 48px)"},open:eo,onOpenChange:(oo,io)=>to(io.open),children:[ro,jsxRuntimeExports.jsx("div",{style:{width:"100%",height:"calc(100vh - 40px)"},children:no})]});makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%"},divider:{flexGrow:0,...shorthands.margin("16px",0)},grid:{flexGrow:1}});makeStyles({wrapper:{display:"flex",flexDirection:"column",justifyContent:"space-between",...shorthands.flex(0,0,"auto")},horizontal:{flexDirection:"row",alignItems:"center",...shorthands.flex(0,0,"auto")},title:{color:tokens.colorNeutralForeground2,marginBottom:tokens.spacingVerticalXS},data:{color:tokens.colorNeutralForeground1},tagsWrapper:{display:"flex",flexDirection:"row",...shorthands.gap("0.5rem")},tagsWrapperHorizontal:{flexDirection:"column"},timeWrapper:{display:"flex",flexDirection:"row",alignItems:"center",justifyItems:"center","> svg":{marginRight:"5px"}},scoreWrapper:{display:"flex",flexDirection:"row",alignItems:"center","> :first-child":{marginRight:"8px"}}});const defaultLocStrings=new Proxy({},{get:(eo,to)=>to.replace(/_/g," ")}),RegistryWrapper=createRegistry({name:"TraceView"}),Provider=({isDark:eo=!1,viewModel:to,children:ro,locStrings:no=defaultLocStrings,TraceListLoading:oo,TraceListError:io,TraceDetailLoading:so,TraceDetailError:ao})=>{const lo=React.useCallback(co=>{co.register(TraceViewModelToken,{useValue:to}),oo&&co.register(traceListLoadingInjectionToken,{useValue:oo}),io&&co.register(traceListErrorInjectionToken,{useValue:io}),so&&co.register(traceDetailLoadingInjectionToken,{useValue:so}),ao&&co.register(traceDetailErrorInjectionToken,{useValue:ao}),no&&co.register(locStringsInjectionToken,{useValue:no})},[]);return jsxRuntimeExports.jsx(TraceViewThemeContext.Provider,{value:eo,children:jsxRuntimeExports.jsx(RegistryWrapper,{onInitialize:lo,children:ro})})},ThemeContext=reactExports.createContext({});ThemeContext.displayName="ThemeContext";const ThemeContextProvider=({children:eo})=>{const[to,ro]=reactExports.useState("light");return reactExports.useEffect(()=>{const no=window.matchMedia("(prefers-color-scheme: dark)");ro(no.matches?"dark":"light");const oo=io=>{ro(io.matches?"dark":"light")};return no.addEventListener("change",oo),()=>{no.removeEventListener("change",oo)}},[]),jsxRuntimeExports.jsx(ThemeContext.Provider,{value:{theme:to,setTheme:ro},children:eo})},token="%[a-f0-9]{2}",singleMatcher=new RegExp("("+token+")|([^%]+?)","gi"),multiMatcher=new RegExp("("+token+")+","gi");function decodeComponents(eo,to){try{return[decodeURIComponent(eo.join(""))]}catch{}if(eo.length===1)return eo;to=to||1;const ro=eo.slice(0,to),no=eo.slice(to);return Array.prototype.concat.call([],decodeComponents(ro),decodeComponents(no))}function decode$1(eo){try{return decodeURIComponent(eo)}catch{let to=eo.match(singleMatcher)||[];for(let ro=1;roeo==null,strictUriEncode=eo=>encodeURIComponent(eo).replaceAll(/[!'()*]/g,to=>`%${to.charCodeAt(0).toString(16).toUpperCase()}`),encodeFragmentIdentifier=Symbol("encodeFragmentIdentifier");function encoderForArrayFormat(eo){switch(eo.arrayFormat){case"index":return to=>(ro,no)=>{const oo=ro.length;return no===void 0||eo.skipNull&&no===null||eo.skipEmptyString&&no===""?ro:no===null?[...ro,[encode(to,eo),"[",oo,"]"].join("")]:[...ro,[encode(to,eo),"[",encode(oo,eo),"]=",encode(no,eo)].join("")]};case"bracket":return to=>(ro,no)=>no===void 0||eo.skipNull&&no===null||eo.skipEmptyString&&no===""?ro:no===null?[...ro,[encode(to,eo),"[]"].join("")]:[...ro,[encode(to,eo),"[]=",encode(no,eo)].join("")];case"colon-list-separator":return to=>(ro,no)=>no===void 0||eo.skipNull&&no===null||eo.skipEmptyString&&no===""?ro:no===null?[...ro,[encode(to,eo),":list="].join("")]:[...ro,[encode(to,eo),":list=",encode(no,eo)].join("")];case"comma":case"separator":case"bracket-separator":{const to=eo.arrayFormat==="bracket-separator"?"[]=":"=";return ro=>(no,oo)=>oo===void 0||eo.skipNull&&oo===null||eo.skipEmptyString&&oo===""?no:(oo=oo===null?"":oo,no.length===0?[[encode(ro,eo),to,encode(oo,eo)].join("")]:[[no,encode(oo,eo)].join(eo.arrayFormatSeparator)])}default:return to=>(ro,no)=>no===void 0||eo.skipNull&&no===null||eo.skipEmptyString&&no===""?ro:no===null?[...ro,encode(to,eo)]:[...ro,[encode(to,eo),"=",encode(no,eo)].join("")]}}function parserForArrayFormat(eo){let to;switch(eo.arrayFormat){case"index":return(ro,no,oo)=>{if(to=/\[(\d*)]$/.exec(ro),ro=ro.replace(/\[\d*]$/,""),!to){oo[ro]=no;return}oo[ro]===void 0&&(oo[ro]={}),oo[ro][to[1]]=no};case"bracket":return(ro,no,oo)=>{if(to=/(\[])$/.exec(ro),ro=ro.replace(/\[]$/,""),!to){oo[ro]=no;return}if(oo[ro]===void 0){oo[ro]=[no];return}oo[ro]=[...oo[ro],no]};case"colon-list-separator":return(ro,no,oo)=>{if(to=/(:list)$/.exec(ro),ro=ro.replace(/:list$/,""),!to){oo[ro]=no;return}if(oo[ro]===void 0){oo[ro]=[no];return}oo[ro]=[...oo[ro],no]};case"comma":case"separator":return(ro,no,oo)=>{const io=typeof no=="string"&&no.includes(eo.arrayFormatSeparator),so=typeof no=="string"&&!io&&decode(no,eo).includes(eo.arrayFormatSeparator);no=so?decode(no,eo):no;const ao=io||so?no.split(eo.arrayFormatSeparator).map(lo=>decode(lo,eo)):no===null?no:decode(no,eo);oo[ro]=ao};case"bracket-separator":return(ro,no,oo)=>{const io=/(\[])$/.test(ro);if(ro=ro.replace(/\[]$/,""),!io){oo[ro]=no&&decode(no,eo);return}const so=no===null?[]:no.split(eo.arrayFormatSeparator).map(ao=>decode(ao,eo));if(oo[ro]===void 0){oo[ro]=so;return}oo[ro]=[...oo[ro],...so]};default:return(ro,no,oo)=>{if(oo[ro]===void 0){oo[ro]=no;return}oo[ro]=[...[oo[ro]].flat(),no]}}}function validateArrayFormatSeparator(eo){if(typeof eo!="string"||eo.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function encode(eo,to){return to.encode?to.strict?strictUriEncode(eo):encodeURIComponent(eo):eo}function decode(eo,to){return to.decode?decodeUriComponent(eo):eo}function keysSorter(eo){return Array.isArray(eo)?eo.sort():typeof eo=="object"?keysSorter(Object.keys(eo)).sort((to,ro)=>Number(to)-Number(ro)).map(to=>eo[to]):eo}function removeHash(eo){const to=eo.indexOf("#");return to!==-1&&(eo=eo.slice(0,to)),eo}function getHash(eo){let to="";const ro=eo.indexOf("#");return ro!==-1&&(to=eo.slice(ro)),to}function parseValue(eo,to){return to.parseNumbers&&!Number.isNaN(Number(eo))&&typeof eo=="string"&&eo.trim()!==""?eo=Number(eo):to.parseBooleans&&eo!==null&&(eo.toLowerCase()==="true"||eo.toLowerCase()==="false")&&(eo=eo.toLowerCase()==="true"),eo}function extract(eo){eo=removeHash(eo);const to=eo.indexOf("?");return to===-1?"":eo.slice(to+1)}function parse(eo,to){to={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...to},validateArrayFormatSeparator(to.arrayFormatSeparator);const ro=parserForArrayFormat(to),no=Object.create(null);if(typeof eo!="string"||(eo=eo.trim().replace(/^[?#&]/,""),!eo))return no;for(const oo of eo.split("&")){if(oo==="")continue;const io=to.decode?oo.replaceAll("+"," "):oo;let[so,ao]=splitOnFirst(io,"=");so===void 0&&(so=io),ao=ao===void 0?null:["comma","separator","bracket-separator"].includes(to.arrayFormat)?ao:decode(ao,to),ro(decode(so,to),ao,no)}for(const[oo,io]of Object.entries(no))if(typeof io=="object"&&io!==null)for(const[so,ao]of Object.entries(io))io[so]=parseValue(ao,to);else no[oo]=parseValue(io,to);return to.sort===!1?no:(to.sort===!0?Object.keys(no).sort():Object.keys(no).sort(to.sort)).reduce((oo,io)=>{const so=no[io];return oo[io]=so&&typeof so=="object"&&!Array.isArray(so)?keysSorter(so):so,oo},Object.create(null))}function stringify(eo,to){if(!eo)return"";to={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...to},validateArrayFormatSeparator(to.arrayFormatSeparator);const ro=so=>to.skipNull&&isNullOrUndefined(eo[so])||to.skipEmptyString&&eo[so]==="",no=encoderForArrayFormat(to),oo={};for(const[so,ao]of Object.entries(eo))ro(so)||(oo[so]=ao);const io=Object.keys(oo);return to.sort!==!1&&io.sort(to.sort),io.map(so=>{const ao=eo[so];return ao===void 0?"":ao===null?encode(so,to):Array.isArray(ao)?ao.length===0&&to.arrayFormat==="bracket-separator"?encode(so,to)+"[]":ao.reduce(no(so),[]).join("&"):encode(so,to)+"="+encode(ao,to)}).filter(so=>so.length>0).join("&")}function parseUrl(eo,to){var oo;to={decode:!0,...to};let[ro,no]=splitOnFirst(eo,"#");return ro===void 0&&(ro=eo),{url:((oo=ro==null?void 0:ro.split("?"))==null?void 0:oo[0])??"",query:parse(extract(eo),to),...to&&to.parseFragmentIdentifier&&no?{fragmentIdentifier:decode(no,to)}:{}}}function stringifyUrl(eo,to){to={encode:!0,strict:!0,[encodeFragmentIdentifier]:!0,...to};const ro=removeHash(eo.url).split("?")[0]||"",no=extract(eo.url),oo={...parse(no,{sort:!1}),...eo.query};let io=stringify(oo,to);io&&(io=`?${io}`);let so=getHash(eo.url);if(typeof eo.fragmentIdentifier=="string"){const ao=new URL(ro);ao.hash=eo.fragmentIdentifier,so=to[encodeFragmentIdentifier]?ao.hash:`#${eo.fragmentIdentifier}`}return`${ro}${io}${so}`}function pick(eo,to,ro){ro={parseFragmentIdentifier:!0,[encodeFragmentIdentifier]:!1,...ro};const{url:no,query:oo,fragmentIdentifier:io}=parseUrl(eo,ro);return stringifyUrl({url:no,query:includeKeys(oo,to),fragmentIdentifier:io},ro)}function exclude(eo,to,ro){const no=Array.isArray(to)?oo=>!to.includes(oo):(oo,io)=>!to(oo,io);return pick(eo,no,ro)}const queryString=Object.freeze(Object.defineProperty({__proto__:null,exclude,extract,parse,parseUrl,pick,stringify,stringifyUrl},Symbol.toStringTag,{value:"Module"}));function useHashObject(){const[eo,to]=reactExports.useState(()=>queryString.parse(window.location.hash.substring(1))),ro=reactExports.useCallback(no=>{to(oo=>{const io={...oo,...no},so=queryString.stringify(io);return window.location.hash=so,io})},[]);return reactExports.useEffect(()=>{const no=()=>{to(queryString.parse(window.location.hash.substring(1)))};return window.addEventListener("hashchange",no),()=>window.removeEventListener("hashchange",no)},[]),[eo,ro]}function genLocalUrlParamsWithHash(eo){if(!isNotNullOrUndefined(eo))return"list";let to="";return isNotNullOrUndefined(eo.session)?to=`session=${eo.session}`:isNotNullOrUndefined(eo.collection)?to=`collection=${eo.collection}`:isNotNullOrUndefined(eo.experiment)?to=`experiment=${eo.experiment}`:isNotNullOrUndefined(eo.run)?to=`run=${eo.run}`:isNotNullOrUndefined(eo.trace)&&(to=`trace_ids=${eo.trace}`),isNotNullOrUndefined(eo.filter)?encodeURI(`search?expression=${eo.filter}${to?`&${to}`:""}`):encodeURI(`list?${to}`)}function isNotNullOrUndefined(eo){return eo!=null}const getSummariesSignature=eo=>eo.flatMap(no=>[`${no.line_run_id}_${no.status}`,...Object.values(no.evaluations??[]).map(oo=>`${oo.trace_id}_${oo.status}`)]).sort().join(","),useLocalFetchSummaries=eo=>{const to=useTraceViewModel(),[ro,no]=reactExports.useState(!0),oo=useLocalFetchSummariesFunc(eo),io=useTraceListAutoRefreshInterval();reactExports.useEffect(()=>{ro&&to.setTraceListStatus(ViewStatus.loading),oo().finally(()=>{ro&&no(!1)});let so;if(io!==AutoRefreshInterval.OFF){const ao=REFRESH_INTERVAL_MAP[io];ao&&(so=setInterval(oo,ao))}return()=>{so&&clearInterval(so)}},[oo,io])},useLocalFetchSummary=()=>{const eo=useTraceViewModel();return reactExports.useCallback(async ro=>fetch(`${LOCAL_URL_PREFIX}/v1.0/LineRuns/list?trace_ids=${ro}`).then(no=>no.json()).then(no=>{no&&(eo.appendTraces(no),eo.setTraceListStatus(ViewStatus.loaded))}).catch(no=>{eo.setTraceListStatus(ViewStatus.error),eo.appendTraces([]),console.error("Error:",no)}),[eo])},useLocalFetchSummariesFunc=eo=>{const to=useTraceViewModel(),[ro,no]=reactExports.useState(void 0),oo=useSetLoadSummariesError();return reactExports.useCallback(async()=>{const so=`${LOCAL_URL_PREFIX}/v1.0/LineRuns/${genLocalUrlParamsWithHash(eo)}`;return fetch(so).then(async ao=>{const lo=await ao.json();if(!ao.ok)throw new Error("message"in lo?String(lo.message):"Failed to fetch");const co=lo;if(!co&&Array.isArray(co))throw new Error("No new traces");const uo=getSummariesSignature(co);(ro===void 0||uo!==ro)&&(no(uo),to.traces$.clear(),to.appendTraces(co)),to.setTraceListStatus(ViewStatus.loaded)}).catch(ao=>{to.setTraceListStatus(ViewStatus.error),to.appendTraces([]),oo(ao),console.error("Error:",ao)})},[eo,to])},useLocalRefreshTraces=eo=>{const to=useTraceViewModel(),ro=useLocalFetchSummariesFunc(eo);return reactExports.useCallback(()=>{to.setTraceListStatus(ViewStatus.loading),ro()},[ro,to])},useLocalFetchRunningTraces=()=>{const eo=useTraces(),to=useLocalFetchSummary(),ro=eo.filter(no=>checkStatus(no.status,"running")).map(no=>no.trace_id).filter(no=>no!==void 0);reactExports.useEffect(()=>{let no;return ro.length>0&&(no=setInterval(()=>{ro.forEach(oo=>to(oo))},RUNNING_TRACE_POLLING_GAP)),()=>{no&&clearInterval(no)}},[to,ro])},useLocalTraceDetailDidOpen=eo=>{const to=useTraceViewModel(),ro=useLocalFetchSummary(),no=useFetchLocalSpans();return reactExports.useCallback(async io=>{if(!io)return;let so=to.getTraceById(io);so||(await ro(io),so=to.getTraceById(io));const ao=[io,...Object.values((so==null?void 0:so.evaluations)??[]).map(lo=>lo.trace_id)].filter(lo=>lo!==void 0);eo({uiTraceId:io}),to.setTraceDetailStatus(ViewStatus.loading),no(ao)},[to])},useLocalOnTraceDetailClose=eo=>reactExports.useCallback(()=>{eo({uiTraceId:void 0})},[eo]),useFetchLocalSpans=()=>{const eo=useTraceViewModel();return reactExports.useCallback(ro=>{fetch(`${LOCAL_URL_PREFIX}/v1.0/Spans/list?trace_ids=${ro.join(",")}&lazy_load=${eo.isLazyLoadSpan}`).then(no=>no.json()).then(no=>{eo.appendSpans(no),eo.setTraceDetailStatus(ViewStatus.loaded)}).catch(no=>{console.error("Error:",no),eo.setTraceDetailStatus(ViewStatus.error)})},[eo])},useLocalOnRefreshSpans=()=>{const eo=useLocalFetchSummary(),to=useFetchLocalSpans();return reactExports.useCallback((no,oo)=>{const io=[no,...Object.values((oo==null?void 0:oo.evaluations)??[]).map(so=>so.trace_id)].filter(so=>so!==void 0);eo(no),to(io)},[to,eo])},fetchSpanEvent=eo=>fetch(`${LOCAL_URL_PREFIX}/v1.0/Spans/Event/${eo}`).then(to=>to.json()).then(to=>({status:"success",data:to})).catch(to=>({status:"error",error:to})),AutoRefreshSwitcher=({style:eo})=>{const to=useLocStrings(),ro=useClasses$4(),[no,oo]=[useTraceListAutoRefreshInterval(),useSetTraceListAutoRefreshInterval()];return jsxRuntimeExports.jsxs("div",{className:ro.wrapper,style:eo,children:[jsxRuntimeExports.jsxs(Text$2,{children:[to["Auto Refresh"],":"]}),jsxRuntimeExports.jsx(Toolbar,{"aria-label":"Auto Refresh Switcher",checkedValues:{autoRefreshOptions:[no]},onCheckedValueChange:(io,{name:so,checkedItems:ao})=>{so==="autoRefreshOptions"&&oo(ao[0])},children:jsxRuntimeExports.jsx(ToolbarRadioGroup,{children:AUTO_REFRESH_LIST.map(io=>jsxRuntimeExports.jsx(ToolbarRadioButton,{appearance:"subtle",name:"autoRefreshOptions",as:"button",value:io,icon:jsxRuntimeExports.jsx("span",{className:ro.text,children:io})},io))})})]})},useClasses$4=makeStyles({wrapper:{display:"flex",alignItems:"center"},text:{fontSize:"12px"}}),ThemeSwitcher=({style:eo,labelName:to})=>{const ro=useLocStrings(),{theme:no,setTheme:oo}=reactExports.useContext(ThemeContext);return jsxRuntimeExports.jsx(Switch,{label:to||ro["Dark Theme"],labelPosition:"before",checked:no==="dark",onChange:(io,so)=>oo(so.checked?"dark":"light"),style:eo})},LocalCommonHeader=({slot:eo,showRefresh:to=!1})=>{const ro=useClasses$3(),no=useLocStrings(),oo=useTraceViewModel();return jsxRuntimeExports.jsxs("div",{className:ro.root,children:[jsxRuntimeExports.jsxs("div",{className:ro.wrapper,children:[jsxRuntimeExports.jsx("div",{className:ro.main}),to&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tooltip,{content:no["Refresh Data"],relationship:"description",children:jsxRuntimeExports.jsx(Button$2,{appearance:"subtle","aria-label":"Refresh",icon:jsxRuntimeExports.jsx(ArrowClockwise16Regular,{}),onClick:()=>oo.refreshTraces()})}),jsxRuntimeExports.jsx(Divider$2,{vertical:!0,className:ro.divider})]}),jsxRuntimeExports.jsx(AutoRefreshSwitcher,{}),jsxRuntimeExports.jsx(Divider$2,{vertical:!0,className:ro.divider}),jsxRuntimeExports.jsx(ThemeSwitcher,{})]}),eo]})},useClasses$3=makeStyles({root:{display:"flex",flexDirection:"column",width:"100%"},wrapper:{display:"flex",alignItems:"center",...shorthands.padding(tokens.spacingVerticalXXS,tokens.spacingHorizontalL)},main:{...shorthands.flex(1)},divider:{flexGrow:0,height:"20px",...shorthands.margin(0,"8px")}}),LocalOverallMetric=({hash:eo})=>{var ao;const[[to,ro],no]=reactExports.useState([void 0,void 0]),oo=useClasses$2(),io=useTraces(),so=(()=>{if(isNotNullOrUndefined(eo.run)){const lo=eo.run.split(",");if(lo.length===1)return lo[0]}})();return reactExports.useEffect(()=>{so&&Promise.allSettled([fetch(`${LOCAL_URL_PREFIX}/v1.0/Runs/${so}`),fetch(`${LOCAL_URL_PREFIX}/v1.0/Runs/${so}/metrics`)]).then(async lo=>{if(lo.some(co=>co.status==="rejected")){no([void 0,void 0]);return}else{const co=lo.map(uo=>uo.value);if(co.some(uo=>!uo.ok)){no([void 0,void 0]);return}else{const uo=await co[0].json(),fo=await co[1].json();no([uo,fo])}}})},[so]),so&&to&&ro?jsxRuntimeExports.jsxs("div",{className:oo.wrapper,children:[jsxRuntimeExports.jsx("div",{className:oo.title,children:so}),jsxRuntimeExports.jsxs("div",{className:oo.blockListWrapper,children:[jsxRuntimeExports.jsx(InfoBlock,{title:"Total traces:",value:io.length}),isNotNullOrUndefined(to.status)&&jsxRuntimeExports.jsx(InfoBlock,{title:"Status:",value:to.status,slot:jsxRuntimeExports.jsx(StatusText,{statusCode:to.status,showText:!0,size:UISize.small})}),isNotNullOrUndefined(to==null?void 0:to.created_on)&&jsxRuntimeExports.jsx(InfoBlock,{title:"Create on:",value:timeFormat(to.created_on)}),((ao=to==null?void 0:to.properties)==null?void 0:ao.system_metrics)&&jsxRuntimeExports.jsx(SystemMetrics,{systemMetrics:to.properties.system_metrics}),isNotNullOrUndefined(ro)&&Object.keys(ro).length>0&&jsxRuntimeExports.jsx(Metrics,{metrics:ro})]})]}):null},InfoBlock=({title:eo,slot:to,value:ro})=>{const no=useClasses$2();return jsxRuntimeExports.jsxs("div",{className:no.blockWrapper,children:[jsxRuntimeExports.jsx("div",{className:no.blockTitle,children:eo}),to||jsxRuntimeExports.jsx("div",{className:no.blockValue,children:ro.toString()})]})},SYSTEM_METRICS_NAME_MAP={completion_tokens:"Completion tokens",duration:"Duration",prompt_tokens:"Prompt tokens",total_tokens:"Total tokens"},SystemMetrics=({systemMetrics:eo})=>{const to=useClasses$2();return jsxRuntimeExports.jsx(InfoBlock,{title:"System metrics:",slot:jsxRuntimeExports.jsxs("div",{className:to.metricsWrapper,children:[jsxRuntimeExports.jsx("div",{className:to.metricsItemRow,children:["prompt_tokens","total_tokens"].map(ro=>eo[ro]!==void 0?jsxRuntimeExports.jsx("span",{className:to.metricsItem,children:`${SYSTEM_METRICS_NAME_MAP[ro]}: ${eo[ro]}`},ro):null)}),jsxRuntimeExports.jsx("div",{className:to.metricsItemRow,children:["completion_tokens","duration"].map(ro=>eo[ro]!==void 0?jsxRuntimeExports.jsx("span",{className:to.metricsItem,children:`${SYSTEM_METRICS_NAME_MAP[ro]}: ${eo[ro]}`},ro):null)})]})})},Metrics=({metrics:eo})=>{const to=useClasses$2();return jsxRuntimeExports.jsx(InfoBlock,{title:"Metrics:",slot:jsxRuntimeExports.jsx("div",{className:to.metricsItemColumn,children:Object.entries(eo).map(([ro,no])=>jsxRuntimeExports.jsx("span",{className:to.metricsItem,children:`${ro}: ${no}`},ro))})})},useClasses$2=makeStyles({wrapper:{display:"flex",flexDirection:"column",boxSizing:"border-box",...shorthands.gap("6px"),...shorthands.borderRadius("4px"),...shorthands.margin("0","24px"),...shorthands.padding("16px"),...shorthands.border("1px","solid",tokens.colorNeutralStroke2)},title:{fontSize:"16px",fontWeight:600,lineHeight:"22px"},blockListWrapper:{display:"flex",...shorthands.gap("24px")},blockWrapper:{display:"flex",flexDirection:"column",...shorthands.gap("4px")},blockTitle:{fontSize:"12px",fontWeight:"600",lineHeight:"16px"},blockValue:{fontSize:"14px",lineHeight:"20px",fontWeight:"400"},metricsWrapper:{display:"flex",flexDirection:"column",...shorthands.gap("8px")},metricsItemRow:{display:"flex",...shorthands.gap("8px")},metricsItemColumn:{display:"flex",flexDirection:"column",...shorthands.gap("8px")},metricsItem:{fontSize:"12px",lineHeight:"16px",fontWeight:"400",...shorthands.padding("4px","8px"),...shorthands.borderRadius("4px"),...shorthands.border("1px","solid",tokens.colorNeutralStroke1)}});function LocalTraceDetailError(){const eo=useLocStrings(),to=useLoadSummariesError();return jsxRuntimeExports.jsx(GeneralErrorBar,{title:eo.Failed_to_load_trace,message:to==null?void 0:to.message,onClick:()=>{}})}const LocalTraceView=eo=>{const{viewModel:to,isDark:ro}=eo;return jsxRuntimeExports.jsx(Provider,{viewModel:to,isDark:ro,TraceListError:LocalTraceDetailError,children:jsxRuntimeExports.jsx(TraceViewContent,{...eo})})},TraceViewContent=({hash:eo,setHash:to})=>{const ro=useClasses$1(),no=useIsTraceDetailOpen(),oo=useSetIsTraceDetailOpen(),io=useTraceViewModel(),so=useGetTraceByLineRunId(),[ao,lo]=React.useState(!1),[co,uo]=React.useState(!1),fo=useSelectedTrace(),ho=useLocalFetchSummary(),po=useFetchLocalSpans();useLocalFetchSummaries(eo),useLocalFetchRunningTraces();const go=useLocalTraceDetailDidOpen(to),vo=useLocalOnTraceDetailClose(to),yo=useLocalRefreshTraces(eo),xo=useLocalOnRefreshSpans();return reactExports.useEffect(()=>{io.traceDetailDidOpen(go),io.traceDetailDidClose(vo),io.setOnRefreshTraces(yo),io.onRefreshSpans(xo)},[xo,yo,vo,go,io]),reactExports.useEffect(()=>{let _o;return ao&&no&&fo&&co&&(_o=setInterval(()=>{const Eo=[fo==null?void 0:fo.trace_id,...Object.values((fo==null?void 0:fo.evaluations)??[]).map(So=>So.trace_id)].filter(So=>So!==void 0);po(Eo),fo.trace_id&&ho(fo.trace_id)},SPAN_POLLING_GAP)),()=>{_o&&clearInterval(_o)}},[co,fo,no,io,ao,ho,po]),reactExports.useEffect(()=>{no&&fo&&(checkStatus(fo.status,"Running")?lo(!0):lo(!1))},[ho,no,fo]),reactExports.useEffect(()=>{if(isNotNullOrUndefined(eo.line_run_id)){const _o=so(eo.line_run_id);_o&&to({uiTraceId:_o.trace_id,line_run_id:void 0})}},[so,eo.line_run_id,to]),reactExports.useEffect(()=>{isNotNullOrUndefined(eo.uiTraceId)&&io.setTraceDetailOpen(!0,eo.uiTraceId)},[io,eo.uiTraceId]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:ro.wrapper,children:[jsxRuntimeExports.jsx(LocalCommonHeader,{showRefresh:!0,slot:jsxRuntimeExports.jsx(LocalOverallMetric,{hash:eo})}),jsxRuntimeExports.jsx(TraceFilter,{hash:eo,setHash:to}),jsxRuntimeExports.jsx(TraceList,{className:ro.grid,onRowClick:()=>{oo(!0)}})]}),jsxRuntimeExports.jsx(DefaultDetailContainer,{isOpen:no,setIsOpen:oo,header:jsxRuntimeExports.jsx(TraceDetailHeader,{setIsTraceDetailOpen:oo,showStreamSwitch:ao,showGantt:!0,showCopyUrl:!0,isStreaming:co,onIsStreamingChange:uo}),content:jsxRuntimeExports.jsx(TraceDetail,{})})]})},useClasses$1=makeStyles({header:{display:"flex",width:"100%"},wrapper:{display:"flex",flexDirection:"column",height:"100%"},grid:{flexGrow:1}});var define_import_meta_env_default={BASE_URL:"/v1.0/ui/traces/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};window.TraceView_Version=define_import_meta_env_default.VITE_TRACE_VIEW_BUILD_VERSION;const TraceViewApp=()=>{const[eo,to]=useHashObject(),ro=useClasses(),no=React.useMemo(()=>new TraceViewModel({spanConfig:{fetchSpanEvent,isLazyLoadSpan:!1}}),[]);return jsxRuntimeExports.jsx(ThemeContextProvider,{children:jsxRuntimeExports.jsx(ThemeContext.Consumer,{children:({theme:oo})=>{const io=oo==="dark";return jsxRuntimeExports.jsxs(FluentProvider,{theme:io?webDarkTheme:webLightTheme,style:{height:"100%",width:"100%"},children:[jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:` html, body { height: 100%; @@ -1880,4 +1880,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho width: 100%; display: flex; } - `}}),jsxRuntimeExports.jsx("div",{className:ro.wrapper,children:jsxRuntimeExports.jsx(LocalTraceView,{viewModel:no,hash:eo,setHash:to,isDark:io})})]})}})})},useClasses=makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%"}});client.createRoot(document.getElementById("root")).render(jsxRuntimeExports.jsx(TraceViewApp,{}))});export default Yw(); + `}}),jsxRuntimeExports.jsx("div",{className:ro.wrapper,children:jsxRuntimeExports.jsx(LocalTraceView,{viewModel:no,hash:eo,setHash:to,isDark:io})})]})}})})},useClasses=makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%",...shorthands.margin("8px")}});client.createRoot(document.getElementById("root")).render(jsxRuntimeExports.jsx(TraceViewApp,{}))});export default Yw(); diff --git a/src/promptflow-devkit/promptflow/_sdk/_service/static/trace/index.html b/src/promptflow-devkit/promptflow/_sdk/_service/static/trace/index.html index eb7cb222c6d..233b1652b12 100644 --- a/src/promptflow-devkit/promptflow/_sdk/_service/static/trace/index.html +++ b/src/promptflow-devkit/promptflow/_sdk/_service/static/trace/index.html @@ -7,7 +7,7 @@ Trace View - +