(()=>{var wpe=Object.create;var eR=Object.defineProperty;var kpe=Object.getOwnPropertyDescriptor;var xpe=Object.getOwnPropertyNames;var _pe=Object.getPrototypeOf,Ope=Object.prototype.hasOwnProperty;var uc=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Spe=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of xpe(e))!Ope.call(t,r)&&r!==n&&eR(t,r,{get:()=>e[r],enumerable:!(i=kpe(e,r))||i.enumerable});return t};var ws=(t,e,n)=>(n=t!=null?wpe(_pe(t)):{},Spe(e||!t||!t.__esModule?eR(n,"default",{value:t,enumerable:!0}):n,t));var fR=uc(At=>{"use strict";var b1=Symbol.for("react.element"),Cpe=Symbol.for("react.portal"),Epe=Symbol.for("react.fragment"),Tpe=Symbol.for("react.strict_mode"),Mpe=Symbol.for("react.profiler"),Npe=Symbol.for("react.provider"),Ppe=Symbol.for("react.context"),Ape=Symbol.for("react.forward_ref"),$pe=Symbol.for("react.suspense"),Dpe=Symbol.for("react.memo"),Ipe=Symbol.for("react.lazy"),tR=Symbol.iterator;function Lpe(t){return t===null||typeof t!="object"?null:(t=tR&&t[tR]||t["@@iterator"],typeof t=="function"?t:null)}var rR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},oR=Object.assign,aR={};function jp(t,e,n){this.props=t,this.context=e,this.refs=aR,this.updater=n||rR}jp.prototype.isReactComponent={};jp.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};jp.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function sR(){}sR.prototype=jp.prototype;function UE(t,e,n){this.props=t,this.context=e,this.refs=aR,this.updater=n||rR}var VE=UE.prototype=new sR;VE.constructor=UE;oR(VE,jp.prototype);VE.isPureReactComponent=!0;var nR=Array.isArray,lR=Object.prototype.hasOwnProperty,YE={current:null},cR={key:!0,ref:!0,__self:!0,__source:!0};function dR(t,e,n){var i,r={},o=null,a=null;if(e!=null)for(i in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(o=""+e.key),e)lR.call(e,i)&&!cR.hasOwnProperty(i)&&(r[i]=e[i]);var s=arguments.length-2;if(s===1)r.children=n;else if(1{"use strict";hR.exports=fR()});var _R=uc(an=>{"use strict";function e5(t,e){var n=t.length;t.push(e);e:for(;0>>1,r=t[i];if(0>>1;itx(s,n))ltx(c,s)?(t[i]=c,t[l]=n,i=l):(t[i]=s,t[a]=n,i=a);else if(ltx(c,n))t[i]=c,t[l]=n,i=l;else break e}}return e}function tx(t,e){var n=t.sortIndex-e.sortIndex;return n!==0?n:t.id-e.id}typeof performance=="object"&&typeof performance.now=="function"?(pR=performance,an.unstable_now=function(){return pR.now()}):(GE=Date,gR=GE.now(),an.unstable_now=function(){return GE.now()-gR});var pR,GE,gR,rl=[],wd=[],Qpe=1,La=null,Ir=3,rx=!1,vf=!1,k1=!1,yR=typeof setTimeout=="function"?setTimeout:null,bR=typeof clearTimeout=="function"?clearTimeout:null,mR=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function t5(t){for(var e=ks(wd);e!==null;){if(e.callback===null)ix(wd);else if(e.startTime<=t)ix(wd),e.sortIndex=e.expirationTime,e5(rl,e);else break;e=ks(wd)}}function n5(t){if(k1=!1,t5(t),!vf)if(ks(rl)!==null)vf=!0,r5(i5);else{var e=ks(wd);e!==null&&o5(n5,e.startTime-t)}}function i5(t,e){vf=!1,k1&&(k1=!1,bR(x1),x1=-1),rx=!0;var n=Ir;try{for(t5(e),La=ks(rl);La!==null&&(!(La.expirationTime>e)||t&&!xR());){var i=La.callback;if(typeof i=="function"){La.callback=null,Ir=La.priorityLevel;var r=i(La.expirationTime<=e);e=an.unstable_now(),typeof r=="function"?La.callback=r:La===ks(rl)&&ix(rl),t5(e)}else ix(rl);La=ks(rl)}if(La!==null)var o=!0;else{var a=ks(wd);a!==null&&o5(n5,a.startTime-e),o=!1}return o}finally{La=null,Ir=n,rx=!1}}var ox=!1,nx=null,x1=-1,wR=5,kR=-1;function xR(){return!(an.unstable_now()-kRt||125i?(t.sortIndex=n,e5(wd,t),ks(rl)===null&&t===ks(wd)&&(k1?(bR(x1),x1=-1):k1=!0,o5(n5,n-i))):(t.sortIndex=r,e5(rl,t),vf||rx||(vf=!0,r5(i5))),t};an.unstable_shouldYield=xR;an.unstable_wrapCallback=function(t){var e=Ir;return function(){var n=Ir;Ir=e;try{return t.apply(this,arguments)}finally{Ir=n}}}});var SR=uc((uot,OR)=>{"use strict";OR.exports=_R()});var MQ=uc(ra=>{"use strict";var Wpe=bd(),na=SR();function _e(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),T5=Object.prototype.hasOwnProperty,Bpe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,CR={},ER={};function Hpe(t){return T5.call(ER,t)?!0:T5.call(CR,t)?!1:Bpe.test(t)?ER[t]=!0:(CR[t]=!0,!1)}function Zpe(t,e,n,i){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function qpe(t,e,n,i){if(e===null||typeof e>"u"||Zpe(t,e,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function uo(t,e,n,i,r,o,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var mr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){mr[t]=new uo(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];mr[e]=new uo(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){mr[t]=new uo(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){mr[t]=new uo(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){mr[t]=new uo(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){mr[t]=new uo(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){mr[t]=new uo(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){mr[t]=new uo(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){mr[t]=new uo(t,5,!1,t.toLowerCase(),null,!1,!1)});var w6=/[\-:]([a-z])/g;function k6(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(w6,k6);mr[e]=new uo(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(w6,k6);mr[e]=new uo(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(w6,k6);mr[e]=new uo(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){mr[t]=new uo(t,1,!1,t.toLowerCase(),null,!1,!1)});mr.xlinkHref=new uo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){mr[t]=new uo(t,1,!1,t.toLowerCase(),null,!0,!0)});function x6(t,e,n,i){var r=mr.hasOwnProperty(e)?mr[e]:null;(r!==null?r.type!==0:i||!(2s||r[a]!==o[s]){var l=` `+r[a].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=a&&0<=s);break}}}finally{s5=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?P1(t):""}function Upe(t){switch(t.tag){case 5:return P1(t.type);case 16:return P1("Lazy");case 13:return P1("Suspense");case 19:return P1("SuspenseList");case 0:case 2:case 15:return t=l5(t.type,!1),t;case 11:return t=l5(t.type.render,!1),t;case 1:return t=l5(t.type,!0),t;default:return""}}function A5(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Qp:return"Fragment";case zp:return"Portal";case M5:return"Profiler";case _6:return"StrictMode";case N5:return"Suspense";case P5:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case DF:return(t.displayName||"Context")+".Consumer";case $F:return(t._context.displayName||"Context")+".Provider";case O6:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case S6:return e=t.displayName||null,e!==null?e:A5(t.type)||"Memo";case xd:e=t._payload,t=t._init;try{return A5(t(e))}catch{}}return null}function Vpe(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return A5(e);case 8:return e===_6?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Ld(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function LF(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Ype(t){var e=LF(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),i=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(a){i=""+a,o.call(this,a)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(a){i=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function sx(t){t._valueTracker||(t._valueTracker=Ype(t))}function jF(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=LF(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function Ix(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function $5(t,e){var n=e.checked;return Un({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function MR(t,e){var n=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;n=Ld(e.value!=null?e.value:n),t._wrapperState={initialChecked:i,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function RF(t,e){e=e.checked,e!=null&&x6(t,"checked",e,!1)}function D5(t,e){RF(t,e);var n=Ld(e.value),i=e.type;if(n!=null)i==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(i==="submit"||i==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?I5(t,e.type,n):e.hasOwnProperty("defaultValue")&&I5(t,e.type,Ld(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function NR(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function I5(t,e,n){(e!=="number"||Ix(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var A1=Array.isArray;function Kp(t,e,n,i){if(t=t.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=lx.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Z1(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var I1={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xpe=["Webkit","ms","Moz","O"];Object.keys(I1).forEach(function(t){Xpe.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),I1[e]=I1[t]})});function WF(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||I1.hasOwnProperty(t)&&I1[t]?(""+e).trim():e+"px"}function BF(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var i=n.indexOf("--")===0,r=WF(n,e[n],i);n==="float"&&(n="cssFloat"),i?t.setProperty(n,r):t[n]=r}}var Gpe=Un({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function R5(t,e){if(e){if(Gpe[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(_e(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(_e(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(_e(61))}if(e.style!=null&&typeof e.style!="object")throw Error(_e(62))}}function F5(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var z5=null;function C6(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Q5=null,Jp=null,eg=null;function $R(t){if(t=cv(t)){if(typeof Q5!="function")throw Error(_e(280));var e=t.stateNode;e&&(e=c2(e),Q5(t.stateNode,t.type,e))}}function HF(t){Jp?eg?eg.push(t):eg=[t]:Jp=t}function ZF(){if(Jp){var t=Jp,e=eg;if(eg=Jp=null,$R(t),e)for(t=0;t>>=0,t===0?32:31-(lge(t)/cge|0)|0}var cx=64,dx=4194304;function $1(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Fx(t,e){var n=t.pendingLanes;if(n===0)return 0;var i=0,r=t.suspendedLanes,o=t.pingedLanes,a=n&268435455;if(a!==0){var s=a&~r;s!==0?i=$1(s):(o&=a,o!==0&&(i=$1(o)))}else a=n&~r,a!==0?i=$1(a):o!==0&&(i=$1(o));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,o=e&-e,r>=o||r===16&&(o&4194240)!==0))return e;if(i&4&&(i|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=i;0n;n++)e.push(t);return e}function sv(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Cs(e),t[e]=n}function hge(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var i=t.eventTimes;for(t=t.expirationTimes;0=j1),WR=" ",BR=!1;function uz(t,e){switch(t){case"keyup":return Qge.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fz(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Wp=!1;function Bge(t,e){switch(t){case"compositionend":return fz(e);case"keypress":return e.which!==32?null:(BR=!0,WR);case"textInput":return t=e.data,t===WR&&BR?null:t;default:return null}}function Hge(t,e){if(Wp)return t==="compositionend"||!D6&&uz(t,e)?(t=cz(),Cx=P6=Cd=null,Wp=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qR(n)}}function mz(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?mz(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function vz(){for(var t=window,e=Ix();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Ix(t.document)}return e}function I6(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Jge(t){var e=vz(),n=t.focusedElem,i=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&mz(n.ownerDocument.documentElement,n)){if(i!==null&&I6(n)){if(e=i.start,t=i.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var r=n.textContent.length,o=Math.min(i.start,r);i=i.end===void 0?o:Math.min(i.end,r),!t.extend&&o>i&&(r=i,i=o,o=r),r=UR(n,o);var a=UR(n,i);r&&a&&(t.rangeCount!==1||t.anchorNode!==r.node||t.anchorOffset!==r.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),t.removeAllRanges(),o>i?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Bp=null,U5=null,F1=null,V5=!1;function VR(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;V5||Bp==null||Bp!==Ix(i)||(i=Bp,"selectionStart"in i&&I6(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),F1&&G1(F1,i)||(F1=i,i=Wx(U5,"onSelect"),0qp||(t.current=e6[qp],e6[qp]=null,qp--)}function sn(t,e){qp++,e6[qp]=t.current,t.current=e}var jd={},Fr=Fd(jd),jo=Fd(!1),Sf=jd;function og(t,e){var n=t.type.contextTypes;if(!n)return jd;var i=t.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},o;for(o in n)r[o]=e[o];return i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=r),r}function Ro(t){return t=t.childContextTypes,t!=null}function Hx(){Sn(jo),Sn(Fr)}function iF(t,e,n){if(Fr.current!==jd)throw Error(_e(168));sn(Fr,e),sn(jo,n)}function Cz(t,e,n){var i=t.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(_e(108,Vpe(t)||"Unknown",r));return Un({},n,i)}function Zx(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||jd,Sf=Fr.current,sn(Fr,t),sn(jo,jo.current),!0}function rF(t,e,n){var i=t.stateNode;if(!i)throw Error(_e(169));n?(t=Cz(t,e,Sf),i.__reactInternalMemoizedMergedChildContext=t,Sn(jo),Sn(Fr),sn(Fr,t)):Sn(jo),sn(jo,n)}var hc=null,d2=!1,b5=!1;function Ez(t){hc===null?hc=[t]:hc.push(t)}function cme(t){d2=!0,Ez(t)}function zd(){if(!b5&&hc!==null){b5=!0;var t=0,e=Xt;try{var n=hc;for(Xt=1;t>=a,r-=a,pc=1<<32-Cs(e)+r|n<F?(W=I,I=null):W=I.sibling;var Z=h(_,I,S[F],E);if(Z===null){I===null&&(I=W);break}t&&I&&Z.alternate===null&&e(_,I),O=o(Z,O,F),M===null?T=Z:M.sibling=Z,M=Z,I=W}if(F===S.length)return n(_,I),Ln&&yf(_,F),T;if(I===null){for(;FF?(W=I,I=null):W=I.sibling;var j=h(_,I,Z.value,E);if(j===null){I===null&&(I=W);break}t&&I&&j.alternate===null&&e(_,I),O=o(j,O,F),M===null?T=j:M.sibling=j,M=j,I=W}if(Z.done)return n(_,I),Ln&&yf(_,F),T;if(I===null){for(;!Z.done;F++,Z=S.next())Z=f(_,Z.value,E),Z!==null&&(O=o(Z,O,F),M===null?T=Z:M.sibling=Z,M=Z);return Ln&&yf(_,F),T}for(I=i(_,I);!Z.done;F++,Z=S.next())Z=g(I,_,F,Z.value,E),Z!==null&&(t&&Z.alternate!==null&&I.delete(Z.key===null?F:Z.key),O=o(Z,O,F),M===null?T=Z:M.sibling=Z,M=Z);return t&&I.forEach(function(H){return e(_,H)}),Ln&&yf(_,F),T}function x(_,O,S,E){if(typeof S=="object"&&S!==null&&S.type===Qp&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case ax:e:{for(var T=S.key,M=O;M!==null;){if(M.key===T){if(T=S.type,T===Qp){if(M.tag===7){n(_,M.sibling),O=r(M,S.props.children),O.return=_,_=O;break e}}else if(M.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===xd&&sF(T)===M.type){n(_,M.sibling),O=r(M,S.props),O.ref=E1(_,M,S),O.return=_,_=O;break e}n(_,M);break}else e(_,M);M=M.sibling}S.type===Qp?(O=Of(S.props.children,_.mode,E,S.key),O.return=_,_=O):(E=Dx(S.type,S.key,S.props,null,_.mode,E),E.ref=E1(_,O,S),E.return=_,_=E)}return a(_);case zp:e:{for(M=S.key;O!==null;){if(O.key===M)if(O.tag===4&&O.stateNode.containerInfo===S.containerInfo&&O.stateNode.implementation===S.implementation){n(_,O.sibling),O=r(O,S.children||[]),O.return=_,_=O;break e}else{n(_,O);break}else e(_,O);O=O.sibling}O=E5(S,_.mode,E),O.return=_,_=O}return a(_);case xd:return M=S._init,x(_,O,M(S._payload),E)}if(A1(S))return m(_,O,S,E);if(_1(S))return b(_,O,S,E);kx(_,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,O!==null&&O.tag===6?(n(_,O.sibling),O=r(O,S),O.return=_,_=O):(n(_,O),O=C5(S,_.mode,E),O.return=_,_=O),a(_)):n(_,O)}return x}var sg=Pz(!0),Az=Pz(!1),Vx=Fd(null),Yx=null,Yp=null,F6=null;function z6(){F6=Yp=Yx=null}function Q6(t){var e=Vx.current;Sn(Vx),t._currentValue=e}function i6(t,e,n){for(;t!==null;){var i=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),t===n)break;t=t.return}}function ng(t,e){Yx=t,F6=Yp=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Lo=!0),t.firstContext=null)}function Qa(t){var e=t._currentValue;if(F6!==t)if(t={context:t,memoizedValue:e,next:null},Yp===null){if(Yx===null)throw Error(_e(308));Yp=t,Yx.dependencies={lanes:0,firstContext:t}}else Yp=Yp.next=t;return e}var kf=null;function W6(t){kf===null?kf=[t]:kf.push(t)}function $z(t,e,n,i){var r=e.interleaved;return r===null?(n.next=n,W6(e)):(n.next=r.next,r.next=n),e.interleaved=n,bc(t,i)}function bc(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var _d=!1;function B6(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Dz(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function mc(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Ad(t,e,n){var i=t.updateQueue;if(i===null)return null;if(i=i.shared,zt&2){var r=i.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),i.pending=e,bc(t,n)}return r=i.interleaved,r===null?(e.next=e,W6(i)):(e.next=r.next,r.next=e),i.interleaved=e,bc(t,n)}function Tx(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,T6(t,n)}}function lF(t,e){var n=t.updateQueue,i=t.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var r=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?r=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?r=o=e:o=o.next=e}else r=o=e;n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:i.shared,effects:i.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Xx(t,e,n,i){var r=t.updateQueue;_d=!1;var o=r.firstBaseUpdate,a=r.lastBaseUpdate,s=r.shared.pending;if(s!==null){r.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?o=c:a.next=c,a=l;var d=t.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==a&&(s===null?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=l))}if(o!==null){var f=r.baseState;a=0,d=c=l=null,s=o;do{var h=s.lane,g=s.eventTime;if((i&h)===h){d!==null&&(d=d.next={eventTime:g,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=t,b=s;switch(h=e,g=n,b.tag){case 1:if(m=b.payload,typeof m=="function"){f=m.call(g,f,h);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=b.payload,h=typeof m=="function"?m.call(g,f,h):m,h==null)break e;f=Un({},f,h);break e;case 2:_d=!0}}s.callback!==null&&s.lane!==0&&(t.flags|=64,h=r.effects,h===null?r.effects=[s]:h.push(s))}else g={eventTime:g,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(c=d=g,l=f):d=d.next=g,a|=h;if(s=s.next,s===null){if(s=r.shared.pending,s===null)break;h=s,s=h.next,h.next=null,r.lastBaseUpdate=h,r.shared.pending=null}}while(!0);if(d===null&&(l=f),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=d,e=r.shared.interleaved,e!==null){r=e;do a|=r.lane,r=r.next;while(r!==e)}else o===null&&(r.shared.lanes=0);Tf|=a,t.lanes=a,t.memoizedState=f}}function cF(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var i=k5.transition;k5.transition={};try{t(!1),e()}finally{Xt=n,k5.transition=i}}function Gz(){return Wa().memoizedState}function hme(t,e,n){var i=Dd(t);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Kz(t))Jz(e,n);else if(n=$z(t,e,n,i),n!==null){var r=co();Es(n,t,i,r),eQ(n,e,i)}}function pme(t,e,n){var i=Dd(t),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Kz(t))Jz(e,r);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var a=e.lastRenderedState,s=o(a,n);if(r.hasEagerState=!0,r.eagerState=s,Ts(s,a)){var l=e.interleaved;l===null?(r.next=r,W6(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}n=$z(t,e,r,i),n!==null&&(r=co(),Es(n,t,i,r),eQ(n,e,i))}}function Kz(t){var e=t.alternate;return t===qn||e!==null&&e===qn}function Jz(t,e){z1=Kx=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function eQ(t,e,n){if(n&4194240){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,T6(t,n)}}var Jx={readContext:Qa,useCallback:Lr,useContext:Lr,useEffect:Lr,useImperativeHandle:Lr,useInsertionEffect:Lr,useLayoutEffect:Lr,useMemo:Lr,useReducer:Lr,useRef:Lr,useState:Lr,useDebugValue:Lr,useDeferredValue:Lr,useTransition:Lr,useMutableSource:Lr,useSyncExternalStore:Lr,useId:Lr,unstable_isNewReconciler:!1},gme={readContext:Qa,useCallback:function(t,e){return al().memoizedState=[t,e===void 0?null:e],t},useContext:Qa,useEffect:uF,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Nx(4194308,4,qz.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Nx(4194308,4,t,e)},useInsertionEffect:function(t,e){return Nx(4,2,t,e)},useMemo:function(t,e){var n=al();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var i=al();return e=n!==void 0?n(e):e,i.memoizedState=i.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},i.queue=t,t=t.dispatch=hme.bind(null,qn,t),[i.memoizedState,t]},useRef:function(t){var e=al();return t={current:t},e.memoizedState=t},useState:dF,useDebugValue:G6,useDeferredValue:function(t){return al().memoizedState=t},useTransition:function(){var t=dF(!1),e=t[0];return t=fme.bind(null,t[1]),al().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var i=qn,r=al();if(Ln){if(n===void 0)throw Error(_e(407));n=n()}else{if(n=e(),Gi===null)throw Error(_e(349));Ef&30||Rz(i,e,n)}r.memoizedState=n;var o={value:n,getSnapshot:e};return r.queue=o,uF(zz.bind(null,i,o,t),[t]),i.flags|=2048,ov(9,Fz.bind(null,i,o,n,e),void 0,null),n},useId:function(){var t=al(),e=Gi.identifierPrefix;if(Ln){var n=gc,i=pc;n=(i&~(1<<32-Cs(i)-1)).toString(32)+n,e=":"+e+"R"+n,n=iv++,0<\/script>",t=t.removeChild(t.firstChild)):typeof i.is=="string"?t=a.createElement(n,{is:i.is}):(t=a.createElement(n),n==="select"&&(a=t,i.multiple?a.multiple=!0:i.size&&(a.size=i.size))):t=a.createElementNS(t,n),t[sl]=e,t[ev]=i,dQ(t,e,!1,!1),e.stateNode=t;e:{switch(a=F5(n,i),n){case"dialog":On("cancel",t),On("close",t),r=i;break;case"iframe":case"object":case"embed":On("load",t),r=i;break;case"video":case"audio":for(r=0;rdg&&(e.flags|=128,i=!0,T1(o,!1),e.lanes=4194304)}else{if(!i)if(t=Gx(a),t!==null){if(e.flags|=128,i=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),T1(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ln)return jr(e),null}else 2*yi()-o.renderingStartTime>dg&&n!==1073741824&&(e.flags|=128,i=!0,T1(o,!1),e.lanes=4194304);o.isBackwards?(a.sibling=e.child,e.child=a):(n=o.last,n!==null?n.sibling=a:e.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=yi(),e.sibling=null,n=Zn.current,sn(Zn,i?n&1|2:n&1),e):(jr(e),null);case 22:case 23:return iT(),i=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?Jo&1073741824&&(jr(e),e.subtreeFlags&6&&(e.flags|=8192)):jr(e),null;case 24:return null;case 25:return null}throw Error(_e(156,e.tag))}function _me(t,e){switch(j6(e),e.tag){case 1:return Ro(e.type)&&Hx(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return lg(),Sn(jo),Sn(Fr),q6(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Z6(e),null;case 13:if(Sn(Zn),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(_e(340));ag()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Sn(Zn),null;case 4:return lg(),null;case 10:return Q6(e.type._context),null;case 22:case 23:return iT(),null;case 24:return null;default:return null}}var _x=!1,Rr=!1,Ome=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function Xp(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){oi(t,e,i)}else n.current=null}function f6(t,e,n){try{n()}catch(i){oi(t,e,i)}}var xF=!1;function Sme(t,e){if(Y5=zx,t=vz(),I6(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var r=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,c=0,d=0,f=t,h=null;t:for(;;){for(var g;f!==n||r!==0&&f.nodeType!==3||(s=a+r),f!==o||i!==0&&f.nodeType!==3||(l=a+i),f.nodeType===3&&(a+=f.nodeValue.length),(g=f.firstChild)!==null;)h=f,f=g;for(;;){if(f===t)break t;if(h===n&&++c===r&&(s=a),h===o&&++d===i&&(l=a),(g=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=g}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(X5={focusedElem:t,selectionRange:n},zx=!1,Qe=e;Qe!==null;)if(e=Qe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Qe=t;else for(;Qe!==null;){e=Qe;try{var m=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var b=m.memoizedProps,x=m.memoizedState,_=e.stateNode,O=_.getSnapshotBeforeUpdate(e.elementType===e.type?b:_s(e.type,b),x);_.__reactInternalSnapshotBeforeUpdate=O}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_e(163))}}catch(E){oi(e,e.return,E)}if(t=e.sibling,t!==null){t.return=e.return,Qe=t;break}Qe=e.return}return m=xF,xF=!1,m}function Q1(t,e,n){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&t)===t){var o=r.destroy;r.destroy=void 0,o!==void 0&&f6(e,n,o)}r=r.next}while(r!==i)}}function h2(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var i=n.create;n.destroy=i()}n=n.next}while(n!==e)}}function h6(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function hQ(t){var e=t.alternate;e!==null&&(t.alternate=null,hQ(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[sl],delete e[ev],delete e[J5],delete e[sme],delete e[lme])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function pQ(t){return t.tag===5||t.tag===3||t.tag===4}function _F(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||pQ(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function p6(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Bx));else if(i!==4&&(t=t.child,t!==null))for(p6(t,e,n),t=t.sibling;t!==null;)p6(t,e,n),t=t.sibling}function g6(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(i!==4&&(t=t.child,t!==null))for(g6(t,e,n),t=t.sibling;t!==null;)g6(t,e,n),t=t.sibling}var pr=null,Os=!1;function kd(t,e,n){for(n=n.child;n!==null;)gQ(t,e,n),n=n.sibling}function gQ(t,e,n){if(ll&&typeof ll.onCommitFiberUnmount=="function")try{ll.onCommitFiberUnmount(o2,n)}catch{}switch(n.tag){case 5:Rr||Xp(n,e);case 6:var i=pr,r=Os;pr=null,kd(t,e,n),pr=i,Os=r,pr!==null&&(Os?(t=pr,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):pr.removeChild(n.stateNode));break;case 18:pr!==null&&(Os?(t=pr,n=n.stateNode,t.nodeType===8?y5(t.parentNode,n):t.nodeType===1&&y5(t,n),Y1(t)):y5(pr,n.stateNode));break;case 4:i=pr,r=Os,pr=n.stateNode.containerInfo,Os=!0,kd(t,e,n),pr=i,Os=r;break;case 0:case 11:case 14:case 15:if(!Rr&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var o=r,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&f6(n,e,a),r=r.next}while(r!==i)}kd(t,e,n);break;case 1:if(!Rr&&(Xp(n,e),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(s){oi(n,e,s)}kd(t,e,n);break;case 21:kd(t,e,n);break;case 22:n.mode&1?(Rr=(i=Rr)||n.memoizedState!==null,kd(t,e,n),Rr=i):kd(t,e,n);break;default:kd(t,e,n)}}function OF(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new Ome),e.forEach(function(i){var r=Dme.bind(null,t,i);n.has(i)||(n.add(i),i.then(r,r))})}}function xs(t,e){var n=e.deletions;if(n!==null)for(var i=0;ir&&(r=a),i&=~o}if(i=r,i=yi()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Eme(i/1960))-i,10t?16:t,Ed===null)var i=!1;else{if(t=Ed,Ed=null,n2=0,zt&6)throw Error(_e(331));var r=zt;for(zt|=4,Qe=t.current;Qe!==null;){var o=Qe,a=o.child;if(Qe.flags&16){var s=o.deletions;if(s!==null){for(var l=0;lyi()-tT?_f(t,0):eT|=n),Fo(t,e)}function _Q(t,e){e===0&&(t.mode&1?(e=dx,dx<<=1,!(dx&130023424)&&(dx=4194304)):e=1);var n=co();t=bc(t,e),t!==null&&(sv(t,e,n),Fo(t,n))}function $me(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),_Q(t,n)}function Dme(t,e){var n=0;switch(t.tag){case 13:var i=t.stateNode,r=t.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=t.stateNode;break;default:throw Error(_e(314))}i!==null&&i.delete(e),_Q(t,n)}var OQ;OQ=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||jo.current)Lo=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Lo=!1,kme(t,e,n);Lo=!!(t.flags&131072)}else Lo=!1,Ln&&e.flags&1048576&&Tz(e,Ux,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Px(t,e),t=e.pendingProps;var r=og(e,Fr.current);ng(e,n),r=V6(null,e,i,t,r,n);var o=Y6();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ro(i)?(o=!0,Zx(e)):o=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,B6(e),r.updater=f2,e.stateNode=r,r._reactInternals=e,o6(e,i,t,n),e=l6(null,e,i,!0,o,n)):(e.tag=0,Ln&&o&&L6(e),lo(null,e,r,n),e=e.child),e;case 16:i=e.elementType;e:{switch(Px(t,e),t=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=Lme(i),t=_s(i,t),r){case 0:e=s6(null,e,i,t,n);break e;case 1:e=bF(null,e,i,t,n);break e;case 11:e=vF(null,e,i,t,n);break e;case 14:e=yF(null,e,i,_s(i.type,t),n);break e}throw Error(_e(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:_s(i,r),s6(t,e,i,r,n);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:_s(i,r),bF(t,e,i,r,n);case 3:e:{if(sQ(e),t===null)throw Error(_e(387));i=e.pendingProps,o=e.memoizedState,r=o.element,Dz(t,e),Xx(e,i,null,n);var a=e.memoizedState;if(i=a.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){r=cg(Error(_e(423)),e),e=wF(t,e,i,n,r);break e}else if(i!==r){r=cg(Error(_e(424)),e),e=wF(t,e,i,n,r);break e}else for(ea=Pd(e.stateNode.containerInfo.firstChild),ta=e,Ln=!0,Ss=null,n=Az(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ag(),i===r){e=wc(t,e,n);break e}lo(t,e,i,n)}e=e.child}return e;case 5:return Iz(e),t===null&&n6(e),i=e.type,r=e.pendingProps,o=t!==null?t.memoizedProps:null,a=r.children,G5(i,r)?a=null:o!==null&&G5(i,o)&&(e.flags|=32),aQ(t,e),lo(t,e,a,n),e.child;case 6:return t===null&&n6(e),null;case 13:return lQ(t,e,n);case 4:return H6(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=sg(e,null,i,n):lo(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:_s(i,r),vF(t,e,i,r,n);case 7:return lo(t,e,e.pendingProps,n),e.child;case 8:return lo(t,e,e.pendingProps.children,n),e.child;case 12:return lo(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,o=e.memoizedProps,a=r.value,sn(Vx,i._currentValue),i._currentValue=a,o!==null)if(Ts(o.value,a)){if(o.children===r.children&&!jo.current){e=wc(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=mc(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),i6(o.return,n,e),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===e.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(_e(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),i6(a,n,e),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===e){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}lo(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,ng(e,n),r=Qa(r),i=i(r),e.flags|=1,lo(t,e,i,n),e.child;case 14:return i=e.type,r=_s(i,e.pendingProps),r=_s(i.type,r),yF(t,e,i,r,n);case 15:return rQ(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:_s(i,r),Px(t,e),e.tag=1,Ro(i)?(t=!0,Zx(e)):t=!1,ng(e,n),tQ(e,i,r),o6(e,i,r,n),l6(null,e,i,!0,t,n);case 19:return cQ(t,e,n);case 22:return oQ(t,e,n)}throw Error(_e(156,e.tag))};function SQ(t,e){return KF(t,e)}function Ime(t,e,n,i){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fa(t,e,n,i){return new Ime(t,e,n,i)}function oT(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Lme(t){if(typeof t=="function")return oT(t)?1:0;if(t!=null){if(t=t.$$typeof,t===O6)return 11;if(t===S6)return 14}return 2}function Id(t,e){var n=t.alternate;return n===null?(n=Fa(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Dx(t,e,n,i,r,o){var a=2;if(i=t,typeof t=="function")oT(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case Qp:return Of(n.children,r,o,e);case _6:a=8,r|=8;break;case M5:return t=Fa(12,n,e,r|2),t.elementType=M5,t.lanes=o,t;case N5:return t=Fa(13,n,e,r),t.elementType=N5,t.lanes=o,t;case P5:return t=Fa(19,n,e,r),t.elementType=P5,t.lanes=o,t;case IF:return g2(n,r,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case $F:a=10;break e;case DF:a=9;break e;case O6:a=11;break e;case S6:a=14;break e;case xd:a=16,i=null;break e}throw Error(_e(130,t==null?t:typeof t,""))}return e=Fa(a,n,e,r),e.elementType=t,e.type=i,e.lanes=o,e}function Of(t,e,n,i){return t=Fa(7,t,i,e),t.lanes=n,t}function g2(t,e,n,i){return t=Fa(22,t,i,e),t.elementType=IF,t.lanes=n,t.stateNode={isHidden:!1},t}function C5(t,e,n){return t=Fa(6,t,null,e),t.lanes=n,t}function E5(t,e,n){return e=Fa(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function jme(t,e,n,i,r){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=d5(0),this.expirationTimes=d5(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=d5(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function aT(t,e,n,i,r,o,a,s,l){return t=new jme(t,e,n,s,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Fa(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},B6(o),t}function Rme(t,e,n){var i=3{"use strict";function NQ(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(NQ)}catch(t){console.error(t)}}NQ(),PQ.exports=MQ()});var $Q=uc(uT=>{"use strict";var AQ=dT();uT.createRoot=AQ.createRoot,uT.hydrateRoot=AQ.hydrateRoot;var pot});var vfe=uc(qC=>{"use strict";var tot=bd(),not=Symbol.for("react.element"),iot=Symbol.for("react.fragment"),rot=Object.prototype.hasOwnProperty,oot=tot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,aot={key:!0,ref:!0,__self:!0,__source:!0};function mfe(t,e,n){var i,r={},o=null,a=null;n!==void 0&&(o=""+n),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(a=e.ref);for(i in e)rot.call(e,i)&&!aot.hasOwnProperty(i)&&(r[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps,e)r[i]===void 0&&(r[i]=e[i]);return{$$typeof:not,type:t,key:o,ref:a,props:r,_owner:oot.current}}qC.Fragment=iot;qC.jsx=mfe;qC.jsxs=mfe});var pk=uc((bat,yfe)=>{"use strict";yfe.exports=vfe()});var Oat=ws(bd()),bfe=ws($Q());var ad=ws(bd());var J=ws(bd(),1),N=ws(bd(),1),u0=ws(dT(),1),Bme=Object.defineProperty,Hme=(t,e,n)=>e in t?Bme(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,we=(t,e,n)=>Hme(t,typeof e!="symbol"?e+"":e,n);(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="bfe81679-99e3-4b92-baf2-93d0d8b7ea9d",t._sentryDebugIdIdentifier="sentry-dbid-bfe81679-99e3-4b92-baf2-93d0d8b7ea9d")}catch{}})();var rn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Da(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function zS(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:function(){return t[i]}})}),n}var JX={exports:{}},QS={};var Zme=N.default,qme=Symbol.for("react.element"),Ume=Symbol.for("react.fragment"),Vme=Object.prototype.hasOwnProperty,Yme=Zme.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Xme={key:!0,ref:!0,__self:!0,__source:!0};function eG(t,e,n){var i,r={},o=null,a=null;n!==void 0&&(o=""+n),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(a=e.ref);for(i in e)Vme.call(e,i)&&!Xme.hasOwnProperty(i)&&(r[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps,e)r[i]===void 0&&(r[i]=e[i]);return{$$typeof:qme,type:t,key:o,ref:a,props:r,_owner:Yme.current}}QS.Fragment=Ume;QS.jsx=eG;QS.jsxs=eG;JX.exports=QS;var w=JX.exports,Gme=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M12 2v20m10-10H2"})),tG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t},J.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},J.createElement("path",{d:"M8 7h15"}),J.createElement("path",{d:"M23 17.5V1H8v18.5","data-cap":"butt"}),J.createElement("circle",{cx:4.5,cy:19.5,r:3.5}),J.createElement("circle",{cx:19.5,cy:17.5,r:3.5}))),Kme=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M5 2v10h8a5 5 0 0 0 0-10H3m2 20V12h9c3.314 0 6 2.238 6 5s-2.686 5-6 5H3"})),nG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m21 22-9-5-9 5V3a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v19Z"})),iG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M22 6H2a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1ZM7 12h10"})),rG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20.8 2H3.2C1.985 2 1 2.895 1 4v16c0 1.105.985 2 2.2 2h17.6c1.215 0 2.2-.895 2.2-2V4c0-1.105-.985-2-2.2-2Z"}),J.createElement("path",{fill:"currentColor",d:"M12 18a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6.5v6"})),Jme=t=>J.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t},J.createElement("path",{d:"M31.976 10.886c-.007-.039-.014-.078-.024-.116l-.022-.066c-.01-.034-.022-.068-.035-.1l-.03-.067c-.015-.031-.03-.062-.048-.092-.012-.022-.026-.042-.039-.063-.018-.029-.037-.057-.058-.084-.015-.02-.03-.04-.047-.059-.022-.026-.045-.05-.068-.075l-.055-.053c-.025-.023-.051-.045-.078-.065-.021-.016-.041-.033-.063-.047-.008-.006-.014-.013-.023-.018L16.762.231c-.461-.308-1.063-.308-1.525 0L.612 9.981l-.022.017c-.022.015-.042.031-.063.047-.027.021-.053.043-.078.065-.019.017-.037.035-.055.054-.024.024-.046.048-.068.074-.017.02-.032.039-.047.06-.02.028-.04.055-.058.084l-.04.064c-.017.03-.032.06-.046.09-.01.022-.022.045-.03.067-.014.033-.026.067-.036.1l-.022.065c-.01.038-.017.076-.024.115-.004.02-.008.04-.01.06-.009.06-.013.119-.013.18v9.751c0 .06.004.121.013.18.003.022.009.039.013.06.007.038.013.077.026.116l.021.067c.011.034.022.069.035.1.009.022.021.043.03.065.014.03.03.06.047.092.012.021.026.043.04.062.018.03.038.056.06.082.014.022.03.04.047.06.022.026.043.051.069.074.017.018.034.04.056.052l.077.066c.021.017.043.03.06.046.009.005.014.013.022.017l14.621 9.755c.231.155.496.233.763.232.267-.002.532-.078.763-.232l14.625-9.75.022-.016c.022-.015.042-.031.063-.047.027-.021.053-.043.078-.066l.055-.053c.024-.024.047-.049.068-.075.017-.02.032-.039.047-.06.02-.026.04-.054.058-.083.014-.02.027-.042.04-.063.017-.03.032-.06.047-.092l.03-.066c.014-.033.025-.067.035-.1.008-.023.016-.045.022-.067.01-.038.017-.077.024-.116.004-.02.009-.039.01-.06.009-.059.013-.118.013-.179v-9.75c0-.06-.005-.12-.012-.18-.004-.02-.01-.038-.014-.06h.002zM16 19.253L11.137 16 16 12.747 20.863 16 16 19.253zm-1.375-8.895l-5.962 3.988-4.812-3.22 10.774-7.182v6.414zM6.19 16l-3.44 2.3V13.7l3.44 2.3zm2.473 1.655l5.962 3.987v6.414L3.85 20.873l4.812-3.219v.001zm8.712 3.986l5.961-3.987 4.813 3.22-10.774 7.181v-6.414zm8.434-5.64l3.44-2.302v4.602L25.81 16zm-2.473-1.655l-5.961-3.987V3.944l10.774 7.183-4.813 3.219z",fill:"#000",fillRule:"nonzero"})),oG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2 12h20"})),aG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m2 5 10 8 10-8"}),J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 4H3c-.53 0-1.04.199-1.414.553A1.837 1.837 0 0 0 1 5.89v13.22c0 .501.21.982.586 1.336C1.96 20.8 2.47 21 3 21h18c.53 0 1.04-.199 1.414-.553.375-.354.586-.835.586-1.336V5.89c0-.501-.21-.982-.586-1.336A2.061 2.061 0 0 0 21 4Z"})),WS=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t},J.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 7 2 2l5 18 3-7 8 8 3-3-8-8z"})),sG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t},J.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m22 11.4-8.8 8.8c-2.5 2.5-6.7 2.5-9.2 0h0c-2.5-2.5-2.5-6.7 0-9.2l7.8-7.8c1.8-1.8 4.6-1.8 6.4 0h0C20 5 20 7.8 18.2 9.6L11 16.7c-1 1-2.6 1-3.5 0h0c-1-1-1-2.6 0-3.5l6-6"})),lG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("g",{clipPath:"url(#a)"},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20.8 5H3.2C1.985 5 1 5.806 1 6.8v14.4c0 .994.985 1.8 2.2 1.8h17.6c1.215 0 2.2-.806 2.2-1.8V6.8c0-.994-.985-1.8-2.2-1.8ZM6 1h12"}),J.createElement("path",{fill:"currentColor",d:"M15.142 10.264a.75.75 0 0 1 .529.4l4 8A.75.75 0 0 1 19 19.75H6a.75.75 0 0 1-.498-1.31l9-8a.75.75 0 0 1 .64-.176ZM7 12a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"})),J.createElement("defs",null,J.createElement("clipPath",{id:"a"},J.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),e0e=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",...t},J.createElement("g",{strokeLinecap:"round",strokeWidth:2,fill:"none",stroke:"currentColor",strokeLinejoin:"round",className:"nc-icon-wrapper"},J.createElement("path",{d:"M3 9h42v36H3zm7-6h28"}),J.createElement("path",{d:"m10 38 7-10 5 4 8-11 9 17H10z"}),J.createElement("circle",{cx:17,cy:19,r:3}))),t0e=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M1.5 2.75h21m-21 18.5h21M16 17V9a2 2 0 0 1 2-2h2m-4 6h3m-7 4V7m-5 6h1v2a2 2 0 0 1-4 0V9a2 2 0 0 1 2-2h2"})),_M=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M22 7H2a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1ZM1 21h22M1 3h22"})),n0e=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M7 19.5v-6.25M7 7v6.25m0 0h10M17 7v12.5"})),i0e=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M4 22V12M4 2v10m0 0h16m0-10v20"})),cG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m8 6-6 6 6 6m8-12 6 6-6 6"})),dG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20.8 2H3.2C1.985 2 1 2.895 1 4v16c0 1.105.985 2 2.2 2h17.6c1.215 0 2.2-.895 2.2-2V4c0-1.105-.985-2-2.2-2Z"}),J.createElement("path",{fill:"currentColor",d:"m19.642 16.276-3.85-7a.517.517 0 0 0-.181-.189.585.585 0 0 0-.749.115l-4.533 5.494-2.307-2.516a.548.548 0 0 0-.206-.14.598.598 0 0 0-.499.031.529.529 0 0 0-.183.164l-2.75 4a.468.468 0 0 0-.015.507.526.526 0 0 0 .202.189c.084.045.18.069.28.069H19.15a.594.594 0 0 0 .268-.063.532.532 0 0 0 .2-.174.462.462 0 0 0 .024-.487ZM9.25 9c.911 0 1.65-.672 1.65-1.5S10.161 6 9.25 6c-.91 0-1.65.672-1.65 1.5S8.34 9 9.25 9Z"})),BS=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M4 12h16m-4-4 4 4-4 4m-8 0-4-4 4-4"}),J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:.5,d:"M1 3v18M23 3v18"})),r0e=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",...t},J.createElement("g",{strokeLinecap:"round",strokeWidth:2,fill:"none",stroke:"currentColor",strokeLinejoin:"round",className:"nc-icon-wrapper"},J.createElement("circle",{cx:18,cy:16,r:4}),J.createElement("path",{"data-cap":"butt",d:"M20.849 33.164 33 20l13 13M2 38l12-11 10 9"}),J.createElement("path",{d:"M2 6h44v36H2z"}))),HS=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M23 8H1v8h22V8Z"}),J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:.5,d:"M1 21h22M1 3h22"})),ZS=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M23 8H1v8h22V8Z"}),J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:.5,d:"M8 21h8M8 3h8"})),o0e=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M22 2h-9.333m-1.334 20H2m4.667 0L17.333 2"})),a0e=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M13.54 10.46c2.2 2.2 2.2 5.61 0 7.81l-3.08 3.08c-2.2 2.2-5.61 2.2-7.81 0-2.2-2.2-2.2-5.61 0-7.81L5.4 10.9"}),J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M10.46 13.54c-2.2-2.2-2.2-5.61 0-7.81l3.08-3.08c2.2-2.2 5.61-2.2 7.81 0 2.2 2.2 2.2 5.61 0 7.81L18.6 13.1"})),uG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 25 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 6v12m-3-2 2.813 2.813L23.625 16"}),J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 19V6h-1L8 18.071H7L2 6H1v13"}));var fG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t},J.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},J.createElement("circle",{cx:12,cy:13,r:2}),J.createElement("circle",{cx:3,cy:13,r:2}),J.createElement("circle",{cx:21,cy:13,r:2}))),mA=t=>J.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},J.createElement("g",{fill:"none",fillRule:"evenodd"},J.createElement("path",{d:"M12 1.5v21M1.5 12h21",strokeLinecap:"round",strokeLinejoin:"round"}))),hG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t},J.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},J.createElement("path",{d:"M1.373 13.183a2.064 2.064 0 0 1 0-2.366C2.946 8.59 6.819 4 12 4s9.054 4.59 10.627 6.817a2.064 2.064 0 0 1 0 2.366C21.054 15.41 17.181 20 12 20s-9.054-4.59-10.627-6.817Z"}),J.createElement("circle",{cx:12,cy:12,r:4}))),pG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t},J.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m12 2.489 3.09 6.262L22 9.755l-5 4.874 1.18 6.882-6.18-3.25-6.18 3.25L7 14.629 2 9.755l6.91-1.004L12 2.489z"})),s0e=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M1 12h8v10H1V12Zm0 0C1 5 2.75 3.344 6 2m8 10h8v10h-8V12Zm0 0c0-7 1.75-8.656 5-10"})),l0e=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 22H10a5 5 0 0 1-5-5v-7"}),J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m1 14 4-4 4 4m1.5-12H14a5 5 0 0 1 5 5v7"}),J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m23 10-4 4-4-4"})),c0e=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M22 13.667V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h9.667M22 13.667 13.667 22M22 13.667h-6.333a2 2 0 0 0-2 2V22"})),d0e=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M22 13.667V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h9.667M22 13.667 13.667 22M22 13.667h-6.333a2 2 0 0 0-2 2V22"})),u0e=t=>J.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t},J.createElement("path",{d:"M15.924 9.922c-.236 0-.43.194-.434.433l-.177 8.866.178 3.218c.003.235.197.43.433.43s.43-.195.433-.433v.004l.193-3.219-.193-8.867c-.003-.238-.197-.432-.433-.432zm12.14 5.102c-.54 0-1.054.11-1.522.306C26.228 11.783 23.254 9 19.625 9c-.887 0-1.753.175-2.517.47-.298.115-.377.234-.38.463v12.492c.004.242.19.442.426.466l10.91.006c2.174 0 3.936-1.762 3.936-3.936s-1.762-3.937-3.936-3.937zM10.886 22.56v-.002l.226-3.338-.226-7.276c-.006-.181-.148-.323-.325-.323-.176 0-.319.142-.324.323l-.202 7.276.202 3.34c.005.178.148.32.324.32.177 0 .318-.142.325-.321v.001zm-2.952.32c.144 0 .262-.117.27-.267l.264-3.394-.265-6.497c-.007-.15-.125-.267-.27-.267-.144 0-.263.117-.269.267l-.234 6.497.234 3.395c.006.149.125.266.27.266zm5.297-10.868c-.209 0-.375.166-.38.377l-.169 6.832.17 3.287c.004.21.17.375.379.375.207 0 .373-.166.378-.377v.002l.19-3.287-.19-6.832c-.005-.211-.17-.377-.378-.377zM2.802 22.657c.083 0 .15-.066.16-.156l.34-3.286-.34-3.41c-.01-.091-.077-.157-.16-.157-.084 0-.152.066-.16.157l-.299 3.41.299 3.285c.008.091.076.157.16.157zm2.546.188c.113 0 .206-.092.214-.212l.302-3.418-.302-3.25c-.008-.12-.1-.211-.214-.211-.116 0-.208.09-.216.212l-.266 3.25.266 3.417c.008.12.1.212.216.212zm6.543.03c.191 0 .346-.154.351-.35v.003l.209-3.309-.209-7.09c-.005-.196-.16-.35-.351-.35-.193 0-.348.154-.352.35l-.185 7.09.185 3.308c.004.194.159.348.352.348zm2.69.013c.22 0 .401-.181.405-.404v.002-.002l.172-3.263-.172-8.13c-.004-.223-.186-.405-.406-.405-.22 0-.403.182-.406.405l-.153 8.127.153 3.268c.003.22.186.402.406.402zm-5.338-.016c.16 0 .29-.129.296-.294l.246-3.36-.246-7.039c-.006-.165-.137-.294-.296-.294-.162 0-.292.13-.297.295l-.218 7.038.218 3.361c.005.164.135.293.297.293zM4.07 15.527c-.1 0-.18.08-.188.185L3.6 19.215l.282 3.39c.008.104.089.184.188.184.098 0 .178-.08.187-.184l.32-3.39-.32-3.504c-.009-.104-.09-.184-.187-.184zm2.565-1.837c-.129 0-.235.105-.242.24l-.25 5.287.25 3.417c.007.133.113.239.242.239s.235-.106.243-.24v.001l.283-3.417-.283-5.288c-.008-.134-.114-.24-.243-.24zm-4.957 2.65c-.01-.076-.066-.129-.133-.129-.068 0-.124.055-.133.13l-.315 2.873.315 2.81c.01.076.065.13.133.13.067 0 .122-.053.133-.129l.358-2.81-.358-2.874zm-1.316.972c-.067 0-.12.052-.128.125L0 19.214l.234 1.747c.009.074.061.125.128.125.065 0 .117-.05.128-.124l.277-1.748-.277-1.778c-.01-.073-.063-.124-.128-.124z",fill:"#EE7C25",fillRule:"evenodd"})),f0e=t=>J.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t},J.createElement("path",{d:"M16 .053C7.19.053.047 7.194.047 16.003c0 8.81 7.142 15.951 15.951 15.951 8.81 0 15.951-7.14 15.951-15.95C31.95 7.194 24.81.054 16 .054V.053zm7.314 23.005c-.285.469-.899.618-1.367.33-3.745-2.288-8.46-2.806-14.013-1.537-.535.122-1.068-.213-1.19-.749-.122-.535.212-1.068.748-1.19 6.076-1.389 11.288-.79 15.493 1.779.468.287.617.899.33 1.367zm1.953-4.343c-.36.585-1.126.77-1.71.41-4.288-2.636-10.824-3.4-15.896-1.86-.657.199-1.352-.172-1.552-.828-.198-.658.173-1.351.83-1.551 5.793-1.758 12.994-.907 17.918 2.12.585.36.77 1.125.41 1.709zm.167-4.523c-5.14-3.054-13.623-3.334-18.531-1.845-.788.24-1.622-.205-1.86-.994-.24-.788.205-1.621.994-1.86 5.634-1.711 15.001-1.38 20.92 2.133.71.42.943 1.336.522 2.044-.42.71-1.337.943-2.044.522z",fill:"#1ED760",fillRule:"nonzero"})),gG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20.8 2H3.2C1.985 2 1 2.895 1 4v16c0 1.105.985 2 2.2 2h17.6c1.215 0 2.2-.895 2.2-2V4c0-1.105-.985-2-2.2-2Z"}),J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16.5 11 12 15l-4.5-4"}));var h0e=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 122.43 122.41",...t},J.createElement("path",{d:"M83.86 54.15v34.13H38.57V54.15H0v68.26h122.43V54.15H83.86zM38.57 0h45.3v34.13h-45.3z"})),mG=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6.555 20.963A1 1 0 0 1 5 20.131V3.87a1 1 0 0 1 1.555-.833l12.197 8.132a1 1 0 0 1 0 1.664l-12.197 8.13Z"})),p0e=t=>J.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t},J.createElement("g",{fill:"none",fillRule:"evenodd"},J.createElement("path",{d:"M31.886 25.508c0 3.522-2.855 6.377-6.377 6.377H6.377C2.857 31.885 0 29.03 0 25.508V6.378C0 2.854 2.857 0 6.377 0H25.51c3.522 0 6.377 2.855 6.377 6.377v19.131",fill:"#0FB7FF"}),J.createElement("path",{d:"M25.998 10.58c.175-.982.17-1.992-.436-2.755-.846-1.07-2.646-1.11-3.88-.921-1.003.153-4.397 1.651-5.552 5.236 2.046-.156 3.118.148 2.921 2.4-.082.943-.558 1.976-1.09 2.966-.614 1.141-1.765 3.382-3.274 1.767-1.36-1.454-1.257-4.235-1.568-6.086-.173-1.04-.356-2.334-.697-3.402-.293-.92-.966-2.027-1.788-2.267-.884-.26-1.976.146-2.618.523-2.042 1.2-3.598 2.908-5.365 4.317v.132c.35.335.444.884.96.959 1.216.179 2.375-1.134 3.184.232.492.834.645 1.749.96 2.648.42 1.198.746 2.503 1.09 3.88.583 2.334 1.299 5.82 3.316 6.675 1.029.437 2.575-.148 3.358-.612 2.122-1.255 3.775-3.075 5.19-4.927 3.234-4.382 5.019-9.347 5.289-10.765",fill:"#FFFFFE"}))),g0e=t=>J.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t},J.createElement("g",{fill:"none",fillRule:"evenodd"},J.createElement("path",{d:"M31.252 8.488c-.366-1.37-1.448-2.452-2.824-2.823C25.941 5 15.958 5 15.958 5s-9.977 0-12.47.665c-1.37.366-2.452 1.447-2.823 2.823C0 10.976 0 16.17 0 16.17s0 5.194.665 7.682c.366 1.372 1.447 2.453 2.823 2.823 2.493.666 12.47.666 12.47.666s9.983 0 12.47-.666c1.372-.365 2.453-1.447 2.824-2.823.665-2.488.665-7.682.665-7.682s0-5.194-.665-7.682",fill:"#D9252A"}),J.createElement("path",{fill:"#FFFFFE",d:"M12.77 20.958l8.291-4.788-8.291-4.788v9.576"})));var vn=N.default.createContext({}),ut=N.default.createContext({}),pe={},qS={},vG={},Xg={},ky={},OM={},Gg={},vA={},SM={},tb={},nb={},ru={},yA={},bA={},yG={},bG={},wG={},kG={},xG={},_G={},OG={},hO={},SG={},CG={},EG={},TG={},MG={},NG={},PG={},AG={},$G={},wA={},kA={},CM={},DG={},IG={},LG={};function Fe(t){let e=new URLSearchParams;e.append("code",t);for(let n=1;n{let e=pn();return e!==null?e.clone():null})}function jG(t,e,n){EM=!0;let i=100{let r=pn()||E0e(t);var o=new Map,a=t.getRootElement(),s=t._editorState,l=t._blockCursorElement;let c=!1,d="";for(var f=0;f{jG(t,e,n)})}function IQ(t,e){let n=t.__mode,i=t.__format;t=t.__style;let r=e.__mode,o=e.__format;return e=e.__style,(n===null||n===r)&&(i===null||i===o)&&(t===null||t===e)}function LQ(t,e){let n=t.mergeWithSibling(e),i=Qn()._normalizedNodes;return i.add(t.__key),i.add(e.__key),n}function zG(t){if(t.__text===""&&t.isSimpleText()&&!t.isUnmergeable())t.remove();else{for(var e;(e=t.getPreviousSibling())!==null&&Ue(e)&&e.isSimpleText()&&!e.isUnmergeable();)if(e.__text==="")e.remove();else{IQ(e,t)&&(t=LQ(e,t));break}for(var n;(n=t.getNextSibling())!==null&&Ue(n)&&n.isSimpleText()&&!n.isUnmergeable();)if(n.__text==="")n.remove();else{IQ(t,n)&&LQ(t,n);break}}}function QG(t){return jQ(t.anchor),jQ(t.focus),t}function jQ(t){for(;t.type==="element";){var e=t.getNode(),n=t.offset;if(n===e.getChildrenSize()?(e=e.getChildAtIndex(n-1),n=!0):(e=e.getChildAtIndex(n),n=!1),Ue(e)){t.set(e.__key,n?e.getTextContentSize():0,"text");break}else if(!xe(e))break;t.set(e.__key,n?e.getChildrenSize():0,"element")}}var T0e=1,M0e=typeof queueMicrotask=="function"?queueMicrotask:t=>{Promise.resolve().then(t)};function SA(t){let e=document.activeElement;if(e===null)return!1;let n=e.nodeName;return li(ww(t))&&(n==="INPUT"||n==="TEXTAREA"||e.contentEditable==="true"&&e.__lexicalEditor==null)}function bw(t,e,n){let i=t.getRootElement();try{return i!==null&&i.contains(e)&&i.contains(n)&&e!==null&&!SA(e)&&CA(e)===t}catch{return!1}}function CA(t){for(;t!=null;){let e=t.__lexicalEditor;if(e!=null)return e;t=YS(t)}return null}function TM(t){return t.isToken()||t.isSegmented()}function gO(t){for(;t!=null;){if(t.nodeType===3)return t;t=t.firstChild}return null}function MM(t,e,n){let i=bm[e];return n!==null&&(t&i)===(n&i)||(t^=i,e==="subscript"?t&=-65:e==="superscript"&&(t&=-33)),t}function WG(t,e){if(e!=null)t.__key=e;else{mo(),99Ea().getTextContent())}function N0e(t,e){Ta(t,()=>{var n=Ul();if(!n.isEmpty())if(e==="root")Ea().markDirty();else{n=n._nodeMap;for(let[,i]of n)i.markDirty()}},t._pendingEditorState===null?{tag:"history-merge"}:void 0)}function Ea(){return Ul()._nodeMap.get("root")}function Il(t){mo();let e=Ul();t!==null&&(t.dirty=!0,t.setCachedNodes(null)),e._selection=t}function zg(t){var e=Qn(),n;e:{for(n=t;n!=null;){let i=n[`__lexicalKey_${e._key}`];if(i!==void 0){n=i;break e}n=YS(n)}n=null}return n===null?(e=e.getRootElement(),t===e?Vr("root"):null):Vr(n)}function ZG(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function EA(t){let e=[];for(;t!==null;)e.push(t),t=t._parentEditor;return e}function qG(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function TA(t,e,n){if(e=ql(e._window),e!==null){var i=e.anchorNode,{anchorOffset:r,focusOffset:o}=e;if(i!==null&&(e=i.nodeType===3?i.nodeValue:null,i=ww(i),e!==null&&Ue(i))){if(e===VS&&n){let a=n.length;e=n,o=r=a}e!==null&&MA(i,e,r,o,t)}}}function MA(t,e,n,i,r){let o=t;if(o.isAttached()&&(r||!o.isDirty())){let c=o.isComposing(),d=e;if((c||r)&&e[e.length-1]===VS&&(d=e.slice(0,-1)),e=o.getTextContent(),r||d!==e)if(d==="")if(Zi(null),xA||US||_A)o.remove();else{let f=Qn();setTimeout(()=>{f.update(()=>{o.isAttached()&&o.remove()})},20)}else{r=o.getParent(),e=h0();var a=o.getTextContentSize(),s=ou(),l=o.getKey();o.isToken()||s!==null&&l===s&&!c||bt(e)&&(r!==null&&!r.canInsertTextBefore()&&e.anchor.offset===0||e.anchor.key===t.__key&&e.anchor.offset===0&&!o.canInsertTextBefore()&&!c||e.focus.key===t.__key&&e.focus.offset===a&&!o.canInsertTextAfter()&&!c)?o.markDirty():(t=pn(),bt(t)&&n!==null&&i!==null&&(t.setTextNodeRange(o,n,o,i),o.isSegmented()&&(n=o.getTextContent(),n=br(n),o.replace(n),o=n)),o.setTextContent(d))}}}function P0e(t,e){if(e.isSegmented())return!0;if(!t.isCollapsed())return!1;t=t.anchor.offset;let n=e.getParentOrThrow(),i=e.isToken();return t===0?((t=!e.canInsertTextBefore()||!n.canInsertTextBefore()||i)||(e=e.getPreviousSibling(),t=(Ue(e)||xe(e)&&e.isInline())&&!e.canInsertTextAfter()),t):t===e.getTextContentSize()?!e.canInsertTextAfter()||!n.canInsertTextAfter()||i:!1}function xy(t,e){t.__lexicalClassNameCache===void 0&&(t.__lexicalClassNameCache={});let n=t.__lexicalClassNameCache,i=n[e];return i!==void 0?i:(t=t[e],typeof t=="string"?(t=t.split(" "),n[e]=t):t)}function NA(t,e,n,i,r){n.size!==0&&(n=i.__type,i=i.__key,e=e.get(n),e===void 0&&Fe(33,n),n=e.klass,e=t.get(n),e===void 0&&(e=new Map,t.set(n,e)),t=e.get(i),n=t==="destroyed"&&r==="created",(t===void 0||n)&&e.set(i,n?"updated":r))}function FQ(t,e,n){let i=t.getParent(),r=n;return i!==null&&(e&&n===0?(r=t.getIndexWithinParent(),t=i):e||n!==t.getChildrenSize()||(r=t.getIndexWithinParent()+1,t=i)),t.getChildAtIndex(e?r-1:r)}function NM(t,e){var n=t.offset;return t.type==="element"?(t=t.getNode(),FQ(t,e,n)):(t=t.getNode(),e&&n===0||!e&&n===t.getTextContentSize()?(n=e?t.getPreviousSibling():t.getNextSibling(),n===null?FQ(t.getParentOrThrow(),e,t.getIndexWithinParent()+(e?0:1)):n):null)}function UG(t){return t=(t=XS(t).event)&&t.inputType,t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function vO(t){return!xa(t)&&!t.isLastChild()&&!t.isInline()}function yO(t,e){return t=t._keyToDOMMap.get(e),t===void 0&&Fe(75,e),t}function YS(t){return t=t.assignedSlot||t.parentElement,t!==null&&t.nodeType===11?t.host:t}function bO(t,e){for(t=t.getParent();t!==null;){if(t.is(e))return!0;t=t.getParent()}return!1}function XS(t){return t=t._window,t===null&&Fe(78),t}function VG(t){for(t=t.getParentOrThrow();t!==null&&!Cu(t);)t=t.getParentOrThrow();return t}function Cu(t){return xa(t)||xe(t)&&t.isShadowRoot()}function YG(t){return t=t.constructor.clone(t),WG(t,null),t}function kw(t){var e=Qn();let n=t.constructor.getType();return e=e._nodes.get(n),e===void 0&&Fe(97),e=e.replace,e!==null?(e=e(t),e instanceof t.constructor||Fe(98),e):t}function hT(t,e){t=t.getParent(),!xa(t)||xe(e)||li(e)||Fe(99)}function pT(t){return(li(t)||xe(t)&&!t.canBeEmpty())&&!t.isInline()}function PM(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null,e=t.parentElement,e!==null&&e.removeChild(t)}function ql(t){return Zl?(t||window).getSelection():null}function GS(t){return t.nodeType===1}function Tg(t){if(li(t)&&!t.isInline())return!0;if(!xe(t)||Cu(t))return!1;var e=t.getFirstChild();return e=e===null||ph(e)||Ue(e)||e.isInline(),!t.isInline()&&t.canBeEmpty()!==!1&&e}function gT(t,e){for(;t!==null&&t.getParent()!==null&&!e(t);)t=t.getParentOrThrow();return e(t)?t:null}function XG(t,e,n,i,r,o){for(t=t.getFirstChild();t!==null;){let a=t.__key;t.__parent===e&&(xe(t)&&XG(t,a,n,i,r,o),n.has(a)||o.delete(a),r.push(a)),t=t.getNextSibling()}}function A0e(t,e,n,i){t=t._nodeMap,e=e._nodeMap;let r=[];for(let[o]of i){let a=e.get(o);a===void 0||a.isAttached()||(xe(a)&&XG(a,o,t,e,r,i),t.has(o)||i.delete(o),r.push(o))}for(let o of r)e.delete(o);for(let o of n)i=e.get(o),i===void 0||i.isAttached()||(t.has(o)||n.delete(o),e.delete(o))}var Bi="",go="",Pc="",Eu,Gr,ib,GG=!1,PA=!1,KS,C_=null,AM,$M,hh,Tu,DM,rb;function E_(t,e){let n=hh.get(t);if(e!==null){let i=jM(t);i.parentNode===e&&e.removeChild(i)}Tu.has(t)||Gr._keyToDOMMap.delete(t),xe(n)&&(t=wO(n,hh),IM(t,0,t.length-1,null)),n!==void 0&&NA(rb,ib,KS,n,"destroyed")}function IM(t,e,n,i){for(;e<=n;++e){let r=t[e];r!==void 0&&E_(r,i)}}function Af(t,e){t.setProperty("text-align",e)}function KG(t,e){var n=Eu.theme.indent;if(typeof n=="string"){let i=t.classList.contains(n);0e&&i&&t.classList.remove(n)}n=getComputedStyle(t).getPropertyValue("--lexical-indent-base-value")||"40px",t.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${n})`)}function JG(t,e){t=t.style,e===0?Af(t,""):e===1?Af(t,"left"):e===2?Af(t,"center"):e===3?Af(t,"right"):e===4?Af(t,"justify"):e===5?Af(t,"start"):e===6&&Af(t,"end")}function T_(t,e,n){let i=Tu.get(t);i===void 0&&Fe(60);let r=i.createDOM(Eu,Gr);var o=Gr._keyToDOMMap;if(r["__lexicalKey_"+Gr._key]=t,o.set(t,r),Ue(i)?r.setAttribute("data-lexical-text","true"):li(i)&&r.setAttribute("data-lexical-decorator","true"),xe(i)){if(t=i.__indent,o=i.__size,t!==0&&KG(r,t),o!==0){--o,t=wO(i,Tu);var a=go;go="",LM(t,i,0,o,r,null),tK(i,r),go=a}t=i.__format,t!==0&&JG(r,t),i.isInline()||eK(null,i,r),vO(i)&&(Bi+=` `,Pc+=` `)}else o=i.getTextContent(),li(i)?(a=i.decorate(Gr,Eu),a!==null&&nK(t,a),r.contentEditable="false"):Ue(i)&&(i.isDirectionless()||(go+=o)),Bi+=o,Pc+=o;return e!==null&&(n!=null?e.insertBefore(r,n):(n=e.__lexicalLineBreak,n!=null?e.insertBefore(r,n):e.appendChild(r))),NA(rb,ib,KS,i,"created"),r}function LM(t,e,n,i,r,o){let a=Bi;for(Bi="";n<=i;++n)T_(t[n],r,o);vO(e)&&(Bi+=` `),r.__lexicalTextContent=Bi,Bi=a+Bi}function zQ(t,e){return t=e.get(t),ph(t)||li(t)&&t.isInline()}function eK(t,e,n){t=t!==null&&(t.__size===0||zQ(t.__last,hh)),e=e.__size===0||zQ(e.__last,Tu),t?e||(e=n.__lexicalLineBreak,e!=null&&n.removeChild(e),n.__lexicalLineBreak=null):e&&(e=document.createElement("br"),n.__lexicalLineBreak=e,n.appendChild(e))}function tK(t,e){var n=e.__lexicalDir;if(e.__lexicalDirTextContent!==go||n!==C_){let o=go==="";if(o)var i=C_;else i=go,i=w0e.test(i)?"rtl":k0e.test(i)?"ltr":null;if(i!==n){let a=e.classList,s=Eu.theme;var r=n!==null?s[n]:void 0;let l=i!==null?s[i]:void 0;r!==void 0&&(typeof r=="string"&&(r=r.split(" "),r=s[n]=r),a.remove(...r)),i===null||o&&i==="ltr"?e.removeAttribute("dir"):(l!==void 0&&(typeof l=="string"&&(n=l.split(" "),l=s[i]=n),l!==void 0&&a.add(...l)),e.dir=i),PA||(t.getWritable().__dir=i)}C_=i,e.__lexicalDirTextContent=go,e.__lexicalDir=i}}function wO(t,e){let n=[];for(t=t.__first;t!==null;){let i=e.get(t);i===void 0&&Fe(101),n.push(t),t=i.__next}return n}function ey(t,e){var n=hh.get(t),i=Tu.get(t);n!==void 0&&i!==void 0||Fe(61);var r=GG||$M.has(t)||AM.has(t);let o=yO(Gr,t);if(n===i&&!r)return xe(n)?(i=o.__lexicalTextContent,i!==void 0&&(Bi+=i,Pc+=i),i=o.__lexicalDirTextContent,i!==void 0&&(go+=i)):(i=n.getTextContent(),Ue(n)&&!n.isDirectionless()&&(go+=i),Pc+=i,Bi+=i),o;if(n!==i&&r&&NA(rb,ib,KS,i,"updated"),i.updateDOM(n,o,Eu))return i=T_(t,null,null),e===null&&Fe(62),e.replaceChild(i,o),E_(t,null),i;if(xe(n)&&xe(i)){if(t=i.__indent,t!==n.__indent&&KG(o,t),t=i.__format,t!==n.__format&&JG(o,t),r){t=go,go="",r=Bi;var a=n.__size,s=i.__size;if(Bi="",a===1&&s===1){var l=n.__first;if(e=i.__first,l===e)ey(l,o);else{var c=jM(l);e=T_(e,null,null),o.replaceChild(e,c),E_(l,null)}}else{e=wO(n,hh);var d=wO(i,Tu);if(a===0)s!==0&&LM(d,i,0,s-1,o,null);else if(s===0)a!==0&&(l=o.__lexicalLineBreak==null,IM(e,0,a-1,l?null:o),l&&(o.textContent=""));else{var f=e;e=d,d=a-1,a=s-1;let g=o.firstChild,m=0;for(s=0;m<=d&&s<=a;){var h=f[m];let b=e[s];if(h===b)g=mT(ey(b,o)),m++,s++;else{l===void 0&&(l=new Set(f)),c===void 0&&(c=new Set(e));let x=c.has(h),_=l.has(b);x?(_?(h=yO(Gr,b),h===g?g=mT(ey(b,o)):(g!=null?o.insertBefore(h,g):o.appendChild(h),ey(b,o)),m++):T_(b,o,g),s++):(g=mT(jM(h)),E_(h,o),m++)}}l=m>d,c=s>a,l&&!c?(l=e[a+1],l=l===void 0?null:Gr.getElementByKey(l),LM(e,i,s,a,o,l)):c&&!l&&IM(f,m,d,o)}}vO(i)&&(Bi+=` `),o.__lexicalTextContent=Bi,Bi=r+Bi,tK(i,o),go=t,xa(i)||i.isInline()||eK(n,i,o)}vO(i)&&(Bi+=` `,Pc+=` `)}else n=i.getTextContent(),li(i)?(r=i.decorate(Gr,Eu),r!==null&&nK(t,r)):Ue(i)&&!i.isDirectionless()&&(go+=n),Bi+=n,Pc+=n;return!PA&&xa(i)&&i.__cachedText!==Pc&&(i.getWritable().__cachedText=Pc),o}function nK(t,e){let n=Gr._pendingDecorators,i=Gr._decorators;if(n===null){if(i[t]===e)return;n=HG(Gr)}n[t]=e}function mT(t){return t=t.nextSibling,t!==null&&t===Gr._blockCursorElement&&(t=t.nextSibling),t}function jM(t){let e=DM.get(t);return e===void 0&&Fe(75,t),e}var xc=Object.freeze({}),RM=[["keydown",z0e],["pointerdown",D0e],["compositionstart",R0e],["compositionend",F0e],["input",j0e],["click",$0e],["cut",xc],["copy",xc],["dragstart",xc],["dragover",xc],["dragend",xc],["paste",xc],["focus",xc],["blur",xc],["drop",xc]];pO&&RM.push(["beforeinput",(t,e)=>L0e(t,e)]);var ob=0,iK=0,rK=0,Mg=null,_y=0,FM=!1,zM=!1,Oy=!1,ty=!1,oK=[0,"",0,"root",0];function aK(t,e,n,i,r){let o=t.anchor,a=t.focus,s=o.getNode();var l=Qn();let c=ql(l._window),d=c!==null?c.anchorNode:null,f=o.key;l=l.getElementByKey(f);let h=n.length;return f!==a.key||!Ue(s)||(!r&&(!pO||rKh||ZG(n))&&o.offset!==a.offset&&!s.isComposing()||TM(s)||s.isDirty()&&1{if(!n)Il(null);else if(bw(e,i,o)){var s=pn();if(bt(s)){var l=s.anchor,c=l.getNode();if(s.isCollapsed()){t.type==="Range"&&t.anchorNode===t.focusNode&&(s.dirty=!0);var d=XS(e).event;d=d?d.timeStamp:performance.now();let[b,x,_,O,S]=oK;var f=Ea();f=e.isComposing()===!1&&f.getTextContent()==="",d{let n=pn();var i=ql(e._window);let r=h0();if(i)if(bt(n)){let a=n.anchor;var o=a.getNode();a.type==="element"&&a.offset===0&&n.isCollapsed()&&!xa(o)&&Ea().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&r!==null&&n.is(r)?(i.removeAllRanges(),n.dirty=!0):t.detail!==3||n.isCollapsed()||(i=n.focus.getNode(),o!==i&&(xe(o)?o.select(0):o.getParentOrThrow().select(0)))}else t.pointerType==="touch"&&(o=i.anchorNode,o!==null&&(o=o.nodeType,o===1||o===3))&&(i=AA(r,i,e,t),Il(i));Le(e,vG,t)})}function D0e(t,e){let n=t.target;t=t.pointerType,n instanceof Node&&t!=="touch"&&Ta(e,()=>{li(ww(n))||(zM=!0)})}function sK(t){return t.getTargetRanges?(t=t.getTargetRanges(),t.length===0?null:t[0]):null}function I0e(t,e){return t!==e||xe(t)||xe(e)||!t.isToken()||!e.isToken()}function L0e(t,e){let n=t.inputType,i=sK(t);n==="deleteCompositionText"||Su&&UG(e)||n!=="insertCompositionText"&&Ta(e,()=>{let r=pn();if(n==="deleteContentBackward"){if(r===null){var o=h0();if(!bt(o))return;Il(o.clone())}if(bt(r)){v0e&&Zi(r.anchor.key),iK===229&&t.timeStamp{Ta(e,()=>{Zi(null)})},30),bt(r)&&(o=r.anchor.getNode(),o.markDirty(),r.format=o.getFormat(),Ue(o)||Fe(142),r.style=o.getStyle()),1>=r.anchor.getNode().getTextContent().length&&(t.preventDefault(),Le(e,Xg,!0))):(Zi(null),t.preventDefault(),Le(e,Xg,!0));return}}if(bt(r)){o=t.data,Mg!==null&&TA(!1,e,Mg),r.dirty&&Mg===null||!r.isCollapsed()||xa(r.anchor.getNode())||i===null||r.applyDOMRange(i),Mg=null;var a=r.focus,s=r.anchor.getNode();if(a=a.getNode(),n==="insertText"||n==="insertTranspose")o===` `?(t.preventDefault(),Le(e,ky,!1)):o===` `?(t.preventDefault(),Le(e,OM,void 0)):o==null&&t.dataTransfer?(o=t.dataTransfer.getData("text/plain"),t.preventDefault(),r.insertRawText(o)):o!=null&&aK(r,i,o,t.timeStamp,!0)?(t.preventDefault(),Le(e,Gg,o)):Mg=o,rK=t.timeStamp;else switch(t.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Le(e,Gg,t);break;case"insertFromComposition":Zi(null),Le(e,Gg,t);break;case"insertLineBreak":Zi(null),Le(e,ky,!1);break;case"insertParagraph":Zi(null),Oy&&!US?(Oy=!1,Le(e,ky,!1)):Le(e,OM,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Le(e,vA,t);break;case"deleteByComposition":I0e(s,a)&&Le(e,SM,t);break;case"deleteByDrag":case"deleteByCut":Le(e,SM,t);break;case"deleteContent":Le(e,Xg,!1);break;case"deleteWordBackward":Le(e,tb,!0);break;case"deleteWordForward":Le(e,tb,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Le(e,nb,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Le(e,nb,!1);break;case"formatStrikeThrough":Le(e,ru,"strikethrough");break;case"formatBold":Le(e,ru,"bold");break;case"formatItalic":Le(e,ru,"italic");break;case"formatUnderline":Le(e,ru,"underline");break;case"historyUndo":Le(e,yA,void 0);break;case"historyRedo":Le(e,bA,void 0)}}})}function j0e(t,e){t.stopPropagation(),Ta(e,()=>{var n=pn(),i=t.data,r=sK(t);if(i!=null&&bt(n)&&aK(n,r,i,t.timeStamp,!1)){ty&&(QM(e,i),ty=!1);var o=n.anchor,a=o.getNode();if(r=ql(e._window),r===null)return;let s=o.offset;(o=pO&&!n.isCollapsed()&&Ue(a)&&r.anchorNode!==null)&&(a=a.getTextContent().slice(0,s)+i+a.getTextContent().slice(s+n.focus.offset),r=r.anchorNode,o=a===(r.nodeType===3?r.nodeValue:null)),o||Le(e,Gg,i),i=i.length,Su&&1{let n=pn();if(bt(n)&&!e.isComposing()){let i=n.anchor,r=n.anchor.getNode();Zi(i.key),(t.timeStamp{QM(e,t.data)})}function z0e(t,e){if(ob=t.timeStamp,iK=t.keyCode,!e.isComposing()){var{keyCode:n,shiftKey:i,ctrlKey:r,metaKey:o,altKey:a}=t;if(!Le(e,yG,t)){if(n!==39||r||o||a)if(n!==39||a||i||!r&&!o)if(n!==37||r||o||a)if(n!==37||a||i||!r&&!o)if(n!==38||r||o)if(n!==40||r||o)if(n===13&&i)Oy=!0,Le(e,hO,t);else if(n===32)Le(e,SG,t);else if(zr&&r&&n===79)t.preventDefault(),Oy=!0,Le(e,ky,!0);else if(n!==13||i){var s=zr?a||o?!1:n===8||n===72&&r:r||a||o?!1:n===8;s?n===8?Le(e,CG,t):(t.preventDefault(),Le(e,Xg,!0)):n===27?Le(e,EG,t):(s=zr?i||a||o?!1:n===46||n===68&&r:r||a||o?!1:n===46,s?n===46?Le(e,TG,t):(t.preventDefault(),Le(e,Xg,!1)):n===8&&(zr?a:r)?(t.preventDefault(),Le(e,tb,!0)):n===46&&(zr?a:r)?(t.preventDefault(),Le(e,tb,!1)):zr&&o&&n===8?(t.preventDefault(),Le(e,nb,!0)):zr&&o&&n===46?(t.preventDefault(),Le(e,nb,!1)):n===66&&!a&&(zr?o:r)?(t.preventDefault(),Le(e,ru,"bold")):n===85&&!a&&(zr?o:r)?(t.preventDefault(),Le(e,ru,"underline")):n===73&&!a&&(zr?o:r)?(t.preventDefault(),Le(e,ru,"italic")):n!==9||a||r||o?n===90&&!i&&(zr?o:r)?(t.preventDefault(),Le(e,yA,void 0)):(s=zr?n===90&&o&&i:n===89&&r||n===90&&r&&i,s?(t.preventDefault(),Le(e,bA,void 0)):xw(e._editorState._selection)?(s=i?!1:n===67?zr?o:r:!1,s?(t.preventDefault(),Le(e,wA,t)):(s=i?!1:n===88?zr?o:r:!1,s?(t.preventDefault(),Le(e,kA,t)):n===65&&(zr?o:r)&&(t.preventDefault(),Le(e,CM,t)))):!Su&&n===65&&(zr?o:r)&&(t.preventDefault(),Le(e,CM,t))):Le(e,MG,t))}else Oy=!1,Le(e,hO,t);else Le(e,OG,t);else Le(e,_G,t);else Le(e,xG,t);else Le(e,kG,t);else Le(e,wG,t);else Le(e,bG,t);(r||i||a||o)&&Le(e,LG,t)}}}function lK(t){let e=t.__lexicalEventHandles;return e===void 0&&(e=[],t.__lexicalEventHandles=e),e}var Kg=new Map;function cK(t){var e=t.target;let n=ql(e==null?null:e.nodeType===9?e.defaultView:e.ownerDocument.defaultView);if(n!==null){var i=CA(n.anchorNode);if(i!==null){zM&&(zM=!1,Ta(i,()=>{var s=h0(),l=n.anchorNode;l!==null&&(l=l.nodeType,l===1||l===3)&&(s=AA(s,n,i,t),Il(s))})),e=EA(i),e=e[e.length-1];var r=e._key,o=Kg.get(r),a=o||e;a!==i&&WQ(n,a,!1),WQ(n,i,!0),i!==e?Kg.set(r,i):o&&Kg.delete(r)}}}function Q0e(t,e){_y===0&&t.ownerDocument.addEventListener("selectionchange",cK),_y++,t.__lexicalEditor=e;let n=lK(t);for(let i=0;i{s._lexicalHandled!==!0&&(s._lexicalHandled=!0,e.isEditable()&&o(s,e))}:s=>{if(s._lexicalHandled!==!0&&(s._lexicalHandled=!0,e.isEditable()))switch(r){case"cut":return Le(e,kA,s);case"copy":return Le(e,wA,s);case"paste":return Le(e,vA,s);case"dragstart":return Le(e,PG,s);case"dragover":return Le(e,AG,s);case"dragend":return Le(e,$G,s);case"focus":return Le(e,DG,s);case"blur":return Le(e,IG,s);case"drop":return Le(e,NG,s)}};t.addEventListener(r,a),n.push(()=>{t.removeEventListener(r,a)})}}function WM(t,e,n){mo();var i=t.__key;let r=t.getParent();if(r!==null){var o=pn();if(bt(o)&&xe(t)){var{anchor:a,focus:s}=o,l=a.getNode(),c=s.getNode();bO(l,t)&&a.set(t.__key,0,"element"),bO(c,t)&&s.set(t.__key,0,"element")}if(l=o,c=!1,bt(l)&&e){o=l.anchor;let d=l.focus;o.key===i&&(xO(o,t,r,t.getPreviousSibling(),t.getNextSibling()),c=!0),d.key===i&&(xO(d,t,r,t.getPreviousSibling(),t.getNextSibling()),c=!0)}else xw(l)&&e&&t.isSelected()&&t.selectPrevious();bt(l)&&e&&!c?(i=t.getIndexWithinParent(),ah(t),kO(l,r,i,-1)):ah(t),n||Cu(r)||r.canBeEmpty()||!r.isEmpty()||WM(r,e),e&&xa(r)&&r.isEmpty()&&r.selectEnd()}}var wm=class{static getType(){Fe(64,this.name)}static clone(){Fe(65,this.name)}constructor(e){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,WG(this,e)}getType(){return this.__type}isInline(){Fe(137,this.constructor.name)}isAttached(){for(var e=this.__key;e!==null;){if(e==="root")return!0;if(e=Vr(e),e===null)break;e=e.__parent}return!1}isSelected(e){if(e=e||pn(),e==null)return!1;let n=e.getNodes().some(i=>i.__key===this.__key);return Ue(this)?n:bt(e)&&e.anchor.type==="element"&&e.focus.type==="element"&&e.anchor.key===e.focus.key&&e.anchor.offset===e.focus.offset?!1:n}getKey(){return this.__key}getIndexWithinParent(){var e=this.getParent();if(e===null)return-1;e=e.getFirstChild();let n=0;for(;e!==null;){if(this.is(e))return n;n++,e=e.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return e===null?null:Vr(e)}getParentOrThrow(){let e=this.getParent();return e===null&&Fe(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){let n=e.getParent();if(Cu(n))return xe(e)||Fe(138),e;e=n}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return e===null&&Fe(67,this.__key),e}getParents(){let e=[],n=this.getParent();for(;n!==null;)e.push(n),n=n.getParent();return e}getParentKeys(){let e=[],n=this.getParent();for(;n!==null;)e.push(n.__key),n=n.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return e===null?null:Vr(e)}getPreviousSiblings(){let e=[];var n=this.getParent();if(n===null)return e;for(n=n.getFirstChild();n!==null&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return e===null?null:Vr(e)}getNextSiblings(){let e=[],n=this.getNextSibling();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getCommonAncestor(e){let n=this.getParents();var i=e.getParents();xe(this)&&n.unshift(this),xe(e)&&i.unshift(e),e=n.length;var r=i.length;if(e===0||r===0||n[e-1]!==i[r-1])return null;for(i=new Set(i),r=0;r{s.append(m)})),bt(i)&&(Il(i),n=i.anchor,i=i.focus,n.key===o&&qQ(n,s),i.key===o&&qQ(i,s)),ou()===o&&Zi(a),s}insertAfter(e,n=!0){mo(),hT(this,e);var i=this.getWritable();let r=e.getWritable();var o=r.getParent();let a=pn();var s=!1,l=!1;if(o!==null){var c=e.getIndexWithinParent();ah(r),bt(a)&&(l=o.__key,s=a.anchor,o=a.focus,s=s.type==="element"&&s.key===l&&s.offset===c+1,l=o.type==="element"&&o.key===l&&o.offset===c+1)}o=this.getNextSibling(),c=this.getParentOrThrow().getWritable();let d=r.__key,f=i.__next;return o===null?c.__last=d:o.getWritable().__prev=d,c.__size++,i.__next=d,r.__next=f,r.__prev=i.__key,r.__parent=i.__parent,n&&bt(a)&&(n=this.getIndexWithinParent(),kO(a,c,n+1),i=c.__key,s&&a.anchor.set(i,n+2,"element"),l&&a.focus.set(i,n+2,"element")),e}insertBefore(e,n=!0){mo(),hT(this,e);var i=this.getWritable();let r=e.getWritable(),o=r.__key;ah(r);let a=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),l=i.__prev,c=this.getIndexWithinParent();return a===null?s.__first=o:a.getWritable().__next=o,s.__size++,i.__prev=o,r.__prev=l,r.__next=i.__key,r.__parent=i.__parent,i=pn(),n&&bt(i)&&(n=this.getParentOrThrow(),kO(i,n,c)),e}isParentRequired(){return!1}createParentElementNode(){return zc()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,n){mo();let i=this.getPreviousSibling(),r=this.getParentOrThrow();return i===null?r.select(0,0):xe(i)?i.select():Ue(i)?i.select(e,n):(e=i.getIndexWithinParent()+1,r.select(e,e))}selectNext(e,n){mo();let i=this.getNextSibling(),r=this.getParentOrThrow();return i===null?r.select():xe(i)?i.select(0,0):Ue(i)?i.select(e,n):(e=i.getIndexWithinParent(),r.select(e,e))}markDirty(){this.getWritable()}};function W0e(t,e,n){n=n||e.getParentOrThrow().getLastChild();let i=e;for(e=[e];i!==n;)i.getNextSibling()||Fe(140),i=i.getNextSibling(),e.push(i);for(let r of e)t=t.insertAfter(r)}var km=class t extends wm{static getType(){return"linebreak"}static clone(e){return new t(e.__key)}constructor(e){super(e)}getTextContent(){return` `}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>{e:{var n=e.parentElement;if(n!==null){let i=n.firstChild;if((i===e||i.nextSibling===e&&BQ(i))&&(n=n.lastChild,n===e||n.previousSibling===e&&BQ(n))){e=!0;break e}}e=!1}return e?null:{conversion:B0e,priority:0}}}}static importJSON(){return xm()}exportJSON(){return{type:"linebreak",version:1}}};function B0e(){return{node:xm()}}function xm(){return kw(new km)}function ph(t){return t instanceof km}function BQ(t){return t.nodeType===3&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}function vT(t,e){return e&16?"code":e&128?"mark":e&32?"sub":e&64?"sup":null}function yT(t,e){return e&1?"strong":e&2?"em":"span"}function bT(t,e,n,i,r){t=i.classList,i=xy(r,"base"),i!==void 0&&t.add(...i),i=xy(r,"underlineStrikethrough");let o=!1,a=e&8&&e&4;var s=n&8&&n&4;i!==void 0&&(s?(o=!0,a||t.add(...i)):a&&t.remove(...i));for(let l in bm)s=bm[l],i=xy(r,l),i!==void 0&&(n&s?!o||l!=="underline"&&l!=="strikethrough"?(!(e&s)||a&&l==="underline"||l==="strikethrough")&&t.add(...i):e&s&&t.remove(...i):e&s&&t.remove(...i))}function wT(t,e,n){let i=e.firstChild;if(n=n.isComposing(),t+=n?VS:"",i==null)e.textContent=t;else if(e=i.nodeValue,e!==t)if(n||Su){n=e.length;let r=t.length,o=0,a=0;for(;o({conversion:q0e,priority:0}),b:()=>({conversion:Z0e,priority:0}),code:()=>({conversion:Qd,priority:0}),em:()=>({conversion:Qd,priority:0}),i:()=>({conversion:Qd,priority:0}),s:()=>({conversion:Qd,priority:0}),span:()=>({conversion:H0e,priority:0}),strong:()=>({conversion:Qd,priority:0}),sub:()=>({conversion:Qd,priority:0}),sup:()=>({conversion:Qd,priority:0}),u:()=>({conversion:Qd,priority:0})}}static importJSON(e){let n=br(e.text);return n.setFormat(e.format),n.setDetail(e.detail),n.setMode(e.mode),n.setStyle(e.style),n}exportDOM(e){return{element:e}=super.exportDOM(e),e!==null&&GS(e)||Fe(132),e.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(e=w2(e,"b")),this.hasFormat("italic")&&(e=w2(e,"i")),this.hasFormat("strikethrough")&&(e=w2(e,"s")),this.hasFormat("underline")&&(e=w2(e,"u")),{element:e}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(e){let n=this.getWritable();return n.__format=typeof e=="string"?bm[e]:e,n}setDetail(e){let n=this.getWritable();return n.__detail=typeof e=="string"?x0e[e]:e,n}setStyle(e){let n=this.getWritable();return n.__style=e,n}toggleFormat(e){let n=this.getFormat();return e=MM(n,e,null),this.setFormat(e)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){if(e=O0e[e],this.__mode===e)return this;let n=this.getWritable();return n.__mode=e,n}setTextContent(e){if(this.__text===e)return this;let n=this.getWritable();return n.__text=e,n}select(e,n){mo();let i=pn();var r=this.getTextContent();let o=this.__key;if(typeof r=="string"?(r=r.length,e===void 0&&(e=r),n===void 0&&(n=r)):n=e=0,bt(i))r=ou(),r!==i.anchor.key&&r!==i.focus.key||Zi(o),i.setTextNodeRange(this,e,this,n);else return vK(o,e,o,n,"text","text");return i}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,n,i,r){let o=this.getWritable(),a=o.__text,s=i.length,l=e;0>l&&(l=s+l,0>l&&(l=0));let c=pn();return r&&bt(c)&&(e+=s,c.setTextNodeRange(o,e,o,e)),n=a.slice(0,l)+i+a.slice(l+n),o.__text=n,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){mo();var n=this.getLatest(),i=n.getTextContent(),r=n.__key,o=ou(),a=new Set(e);e=[];for(var s=i.length,l="",c=0;cd&&_.offset<=m&&(_.key=x,_.offset-=d,n.dirty=!0),O.key===r&&O.type==="text"&&O.offset>d&&O.offset<=m&&(O.key=x,O.offset-=d,n.dirty=!0)}o===r&&Zi(x),d=m,l.push(g)}return r=this.getPreviousSibling(),o=this.getNextSibling(),r!==null&&mO(r),o!==null&&mO(o),r=i.getWritable(),o=this.getIndexWithinParent(),s?(r.splice(o,0,l),this.remove()):r.splice(o,1,l),bt(n)&&kO(n,i,o,a-1),l}mergeWithSibling(e){var n=e===this.getPreviousSibling();n||e===this.getNextSibling()||Fe(50);var i=this.__key;let r=e.__key,o=this.__text,a=o.length;ou()===r&&Zi(i);let s=pn();if(bt(s)){let l=s.anchor,c=s.focus;l!==null&&l.key===r&&(JQ(l,n,i,e,a),s.dirty=!0),c!==null&&c.key===r&&(JQ(c,n,i,e,a),s.dirty=!0)}return i=e.__text,this.setTextContent(n?i+o:o+i),n=this.getWritable(),e.remove(),n}isTextEntity(){return!1}};function H0e(t){let e=t.style.fontWeight==="700",n=t.style.textDecoration==="line-through",i=t.style.fontStyle==="italic",r=t.style.textDecoration==="underline",o=t.style.verticalAlign;return{forChild:a=>(Ue(a)&&(e&&a.toggleFormat("bold"),n&&a.toggleFormat("strikethrough"),i&&a.toggleFormat("italic"),r&&a.toggleFormat("underline"),o==="sub"&&a.toggleFormat("subscript"),o==="super"&&a.toggleFormat("superscript")),a),node:null}}function Z0e(t){let e=t.style.fontWeight==="normal";return{forChild:n=>(Ue(n)&&!e&&n.toggleFormat("bold"),n),node:null}}var HQ=new WeakMap;function q0e(t){t.parentElement===null&&Fe(129);for(var e=t.textContent||"",n,i=t.parentNode,r=[t];i!==null&&(n=HQ.get(i))===void 0&&!(i.nodeName==="PRE"||i.nodeType===1&&i.style!==void 0&&i.style.whiteSpace!==void 0&&i.style.whiteSpace.startsWith("pre"));)r.push(i),i=i.parentNode;for(n=n===void 0?i:n,i=0;i(Ue(n)&&!n.hasFormat(e)&&n.toggleFormat(e),n),node:null}}function br(t=""){return kw(new gh(t))}function Ue(t){return t instanceof gh}var JS=class dK extends gh{static getType(){return"tab"}static clone(e){let n=new dK(e.__key);return n.__text=e.__text,n.__format=e.__format,n.__style=e.__style,n}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}static importJSON(e){let n=e4();return n.setFormat(e.format),n.setStyle(e.style),n}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){Fe(126)}setDetail(){Fe(127)}setMode(){Fe(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function e4(){return kw(new JS)}function uK(t){return t instanceof JS}var BM=class{constructor(e,n,i){this._selection=null,this.key=e,this.offset=n,this.type=i}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let n=this.getNode(),i=e.getNode(),r=this.offset;if(e=e.offset,xe(n)){var o=n.getDescendantByIndex(r);n=o??n}return xe(i)&&(o=i.getDescendantByIndex(e),i=o??i),n===i?re&&(i=e);else if(!xe(e)){var o=e.getNextSibling();Ue(o)?(n=o.__key,i=0,r="text"):(o=e.getParent())&&(n=o.__key,i=e.getIndexWithinParent()+1)}t.set(n,i,r)}function qQ(t,e){if(xe(e)){let n=e.getLastDescendant();xe(n)||Ue(n)?kT(t,n):kT(t,e)}else kT(t,e)}function UQ(t,e,n,i){let r=t.getNode(),o=r.getChildAtIndex(t.offset),a=br(),s=xa(r)?zc().append(a):a;a.setFormat(n),a.setStyle(i),o===null?r.append(s):o.insertBefore(s),t.is(e)&&e.set(a.__key,0,"text"),t.set(a.__key,0,"text")}function Yd(t,e,n,i){t.key=e,t.offset=n,t.type=i}var fK=class hK{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!xw(e))return!1;let n=this._nodes,i=e._nodes;return n.size===i.size&&Array.from(n).every(r=>i.has(r))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new hK(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(e){let n=this.getNodes(),i=n.length;var r=n[i-1];if(Ue(r))r=r.select();else{let o=r.getIndexWithinParent()+1;r=r.getParentOrThrow().select(o,o)}for(r.insertNodes(e),e=0;e(xe(s)||li(s))&&!s.isInline())){n=K0e(e),e=n.getLastDescendant();var o=n.getChildren();n=xe(i)&&i.isEmpty()?null:this.insertParagraph(),r=o[o.length-1];var a=o[0];(s=>xe(s)&&Tg(s)&&!s.isEmpty()&&xe(i)&&(!i.isEmpty()||"__value"in i&&"__checked"in i))(a)&&(xe(i)||Fe(135),i.append(...a.getChildren()),a=o[1]),a&&W0e(i,a),o=gT(e,Tg),n&&xe(o)&&("__value"in n&&"__checked"in n||Tg(r))&&(o.append(...n.getChildren()),n.remove()),xe(i)&&i.isEmpty()&&i.remove(),e.selectEnd(),e=xe(i)?i.getLastChild():null,ph(e)&&o!==i&&e.remove()}else xe(i)||Fe(135),r=xT(this),i.splice(r,0,e),n.selectEnd()}}insertParagraph(){if(this.anchor.key==="root"){var e=zc();return Ea().splice(this.anchor.offset,0,[e]),e.select(),e}var n=xT(this);return e=gT(this.anchor.getNode(),Tg),xe(e)||Fe(136),n=(n=e.getChildAtIndex(n))?[n,...n.getNextSiblings()]:[],(e=e.insertNewAfter(this,!1))?(e.append(...n),e.selectStart(),e):null}insertLineBreak(e){var n=xm();this.insertNodes([n]),e&&(e=n.getParentOrThrow(),n=n.getIndexWithinParent(),e.select(n,n))}extract(){var e=this.getNodes(),n=e.length,i=n-1,r=this.anchor;let o=this.focus;var a=e[0];let s=e[i],[l,c]=HM(this);return n===0?[]:n===1?Ue(a)&&!this.isCollapsed()?(e=l>c?c:l,i=a.splitText(e,l>c?l:c),e=e===0?i[0]:i[1],e!=null?[e]:[]):[a]:(n=r.isBefore(o),Ue(a)&&(r=n?l:c,r===a.getTextContentSize()?e.shift():r!==0&&([,a]=a.splitText(r),e[0]=a)),Ue(s)&&(a=s.getTextContent().length,n=n?c:l,n===0?e.pop():n!==a&&([s]=s.splitText(n),e[i]=s)),e)}modify(e,n,i){var r=this.focus,o=this.anchor,a=e==="move",s=NM(r,n);if(li(s)&&!s.isIsolated())a&&s.isKeyboardSelectable()?(n=ZM(),n.add(s.__key),Il(n)):(e=n?s.getPreviousSibling():s.getNextSibling(),Ue(e)?(s=e.__key,n=n?e.getTextContent().length:0,r.set(s,n,"text"),a&&o.set(s,n,"text")):(i=s.getParentOrThrow(),xe(e)?(i=e.__key,s=n?e.getChildrenSize():0):(s=s.getIndexWithinParent(),i=i.__key,n||s++),r.set(i,s,"element"),a&&o.set(i,s,"element")));else if(o=Qn(),r=ql(o._window)){var l=o._blockCursorElement,c=o._rootElement;if(c===null||l===null||!xe(s)||s.isInline()||s.canBeEmpty()||PM(l,o,c),r.modify(e,n?"backward":"forward",i),0n||c){i.splice(s,1),c&&(a=void 0);break}}e=i.join("").trim(),e===""?t.remove():(t.setTextContent(e),t.select(a,a))}function XQ(t,e,n,i){var r=e;if(t.nodeType===1){let s=!1;var o=t.childNodes,a=o.length;r===a&&(s=!0,r=a-1);let l=o[r];if(a=!1,l===i._blockCursorElement?(l=o[r+1],a=!0):i._blockCursorElement!==null&&r--,i=zg(l),Ue(i))r=s?i.getTextContentSize():0;else{if(o=zg(t),o===null)return null;if(xe(o)?(t=o.getChildAtIndex(r),(e=xe(t))&&(e=t.getParent(),e=n===null||e===null||!e.canBeEmpty()||e!==n.getNode()),e&&(n=s?t.getLastDescendant():t.getFirstDescendant(),n===null?(o=t,r=0):(t=n,o=xe(t)?t:t.getParentOrThrow())),Ue(t)?(i=t,o=null,r=s?t.getTextContentSize():0):t!==o&&s&&!a&&r++):(r=o.getIndexWithinParent(),r=e===0&&li(o)&&zg(t)===o?r:r+1,o=o.getParentOrThrow()),xe(o))return Ls(o.__key,r,"element")}}else i=zg(t);return Ue(i)?Ls(i.__key,r,"text"):null}function GQ(t,e,n){var i=t.offset,r=t.getNode();i===0?(i=r.getPreviousSibling(),r=r.getParent(),e?(n||!e)&&i===null&&xe(r)&&r.isInline()&&(e=r.getPreviousSibling(),Ue(e)&&(t.key=e.__key,t.offset=e.getTextContent().length)):xe(i)&&!n&&i.isInline()?(t.key=i.__key,t.offset=i.getChildrenSize(),t.type="element"):Ue(i)&&(t.key=i.__key,t.offset=i.getTextContent().length)):i===r.getTextContent().length&&(i=r.getNextSibling(),r=r.getParent(),e&&xe(i)&&i.isInline()?(t.key=i.__key,t.offset=0,t.type="element"):(n||e)&&i===null&&xe(r)&&r.isInline()&&!r.canInsertTextAfter()&&(e=r.getNextSibling(),Ue(e)&&(t.key=e.__key,t.offset=0)))}function gK(t,e,n){if(t.type==="text"&&e.type==="text"){var i=t.isBefore(e);let r=t.is(e);GQ(t,i,r),GQ(e,!i,r),r&&(e.key=t.key,e.offset=t.offset,e.type=t.type),i=Qn(),i.isComposing()&&i._compositionKey!==t.key&&bt(n)&&(i=n.anchor,n=n.focus,Yd(t,i.key,i.offset,i.type),Yd(e,n.key,n.offset,n.type))}}function mK(t,e,n,i,r,o){return t===null||n===null||!bw(r,t,n)||(e=XQ(t,e,bt(o)?o.anchor:null,r),e===null)||(i=XQ(n,i,bt(o)?o.focus:null,r),i===null||e.type==="element"&&i.type==="element"&&(t=zg(t),n=zg(n),li(t)&&li(n)))?null:(gK(e,i,o),[e,i])}function vK(t,e,n,i,r,o){let a=Ul();return t=new f0(Ls(t,e,r),Ls(n,i,o),0,""),t.dirty=!0,a._selection=t}function ZM(){return new fK(new Set)}function Y0e(t){let e=t.getEditorState()._selection,n=ql(t._window);return bt(e)||e==null?AA(e,n,t,null):e.clone()}function AA(t,e,n,i){var r=n._window;if(r===null)return null;var o=(r=i||r.event)?r.type:void 0;i=o==="selectionchange",r=!EM&&(i||o==="beforeinput"||o==="compositionstart"||o==="compositionend"||o==="click"&&r&&r.detail===3||o==="drop"||o===void 0);let a;if(!bt(t)||r){if(e===null)return null;if(r=e.anchorNode,o=e.focusNode,a=e.anchorOffset,e=e.focusOffset,i&&bt(t)&&!bw(n,r,o))return t.clone()}else return t.clone();if(n=mK(r,a,o,e,n,t),n===null)return null;let[s,l]=n;return new f0(s,l,bt(t)?t.format:0,bt(t)?t.style:"")}function pn(){return Ul()._selection}function h0(){return Qn()._editorState._selection}function kO(t,e,n,i=1){var r=t.anchor,o=t.focus,a=r.getNode(),s=o.getNode();if(e.is(a)||e.is(s)){if(a=e.__key,t.isCollapsed())e=r.offset,(n<=e&&0i)&&(n=Math.max(0,e+i),r.set(a,n,"element"),o.set(a,n,"element"),KQ(t));else{let c=t.isBackward();s=c?o:r;var l=s.getNode();r=c?r:o,o=r.getNode(),e.is(l)&&(l=s.offset,(n<=l&&0i)&&s.set(a,Math.max(0,l+i),"element")),e.is(o)&&(e=r.offset,(n<=e&&0i)&&r.set(a,Math.max(0,e+i),"element"))}KQ(t)}}function KQ(t){var e=t.anchor,n=e.offset;let i=t.focus;var r=i.offset,o=e.getNode(),a=i.getNode();if(t.isCollapsed())xe(o)&&(a=o.getChildrenSize(),a=(r=n>=a)?o.getChildAtIndex(a-1):o.getChildAtIndex(n),Ue(a)&&(n=0,r&&(n=a.getTextContentSize()),e.set(a.__key,n,"text"),i.set(a.__key,n,"text")));else{if(xe(o)){let s=o.getChildrenSize();n=(t=n>=s)?o.getChildAtIndex(s-1):o.getChildAtIndex(n),Ue(n)&&(o=0,t&&(o=n.getTextContentSize()),e.set(n.__key,o,"text"))}xe(a)&&(n=a.getChildrenSize(),r=(e=r>=n)?a.getChildAtIndex(n-1):a.getChildAtIndex(r),Ue(r)&&(a=0,e&&(a=r.getTextContentSize()),i.set(r.__key,a,"text")))}}function X0e(t,e){if(e=e.getEditorState()._selection,t=t._selection,bt(t)){var n=t.anchor;let i=t.focus,r;n.type==="text"&&(r=n.getNode(),r.selectionTransform(e,t)),i.type==="text"&&(n=i.getNode(),r!==n&&n.selectionTransform(e,t))}}function xO(t,e,n,i,r){let o=null,a=0,s=null;i!==null?(o=i.__key,Ue(i)?(a=i.getTextContentSize(),s="text"):xe(i)&&(a=i.getChildrenSize(),s="element")):r!==null&&(o=r.__key,Ue(r)?s="text":xe(r)&&(s="element")),o!==null&&s!==null?t.set(o,a,s):(a=e.getIndexWithinParent(),a===-1&&(a=n.getChildrenSize()),t.set(n.__key,a,"element"))}function JQ(t,e,n,i,r){t.type==="text"?(t.key=n,e||(t.offset+=r)):t.offset>i.getIndexWithinParent()&&--t.offset}function xT(t){t.isCollapsed()||t.removeText();var e=t.anchor;for(t=e.getNode(),e=e.offset;!Tg(t);)[t,e]=G0e(t,e);return e}function G0e(t,e){var n=t.getParent();if(!n)return n=zc(),Ea().append(n),n.select(),[Ea(),0];if(Ue(t)){var i=t.splitText(e);return i.length===0?[n,t.getIndexWithinParent()]:(t=e===0?0:1,t=i[0].getIndexWithinParent()+t,[n,t])}return!xe(t)||e===0?[n,t.getIndexWithinParent()]:((i=t.getChildAtIndex(e))&&(e=new f0(Ls(t.__key,e,"element"),Ls(t.__key,e,"element"),0,""),(e=t.insertNewAfter(e))&&e.append(i,...i.getNextSiblings())),[n,t.getIndexWithinParent()+1])}function K0e(t){let e=zc(),n=null;for(let i=0;ift&&(Yo=qe-ft),Yo!==0)if(bn)Tt.scrollBy(0,Yo);else{let ec=ve.scrollTop;ve.scrollTop+=Yo;let tc=ve.scrollTop-ec;je-=tc,qe-=tc}if(bn)break;ve=YS(ve)}}}FM=!0}}else a!==null&&bw(t,_t,Pt)&&j.removeAllRanges()}}e:{let Ze=t._blockCursorElement;if(bt(s)&&s.isCollapsed()&&s.anchor.type==="element"&&i.contains(document.activeElement)){let _t=s.anchor,Pt=_t.getNode(),ze=_t.offset,Re=Pt.getChildrenSize(),se=!1,Ye=null;if(ze===Re){let Bt=Pt.getChildAtIndex(ze-1);pT(Bt)&&(se=!0)}else{let Bt=Pt.getChildAtIndex(ze);if(pT(Bt)){let ni=Bt.getPreviousSibling();(ni===null||pT(ni))&&(se=!0,Ye=t.getElementByKey(Bt.__key))}}if(se){let Bt=t.getElementByKey(Pt.__key);if(Ze===null){let ni=t._config.theme,Tt=document.createElement("div");Tt.contentEditable="false",Tt.setAttribute("data-lexical-cursor","true");let bn=ni.blockCursor;if(bn!==void 0){if(typeof bn=="string"){let Yo=bn.split(" ");bn=ni.blockCursor=Yo}bn!==void 0&&Tt.classList.add(...bn)}t._blockCursorElement=Ze=Tt}i.style.caretColor="transparent",Ye===null?Bt.appendChild(Ze):Bt.insertBefore(Ze,Ye);break e}}Ze!==null&&PM(Ze,t,i)}g!==null&&g.observe(i,eW)}finally{rr=f,ir=c}}if(m!==null){var $e=m;let Ze=Array.from(t._listeners.mutation),_t=Ze.length;for(let Pt=0;Pt<_t;Pt++){let[ze,Re]=Ze[Pt],se=$e.get(Re);se!==void 0&&ze(se,{dirtyLeaves:O,prevEditorState:o,updateTags:T})}}bt(s)||s===null||a!==null&&a.is(s)||t.dispatchCommand(qS,void 0);var tt=t._pendingDecorators;tt!==null&&(t._decorators=tt,t._pendingDecorators=null,Sy("decorator",t,!0,tt));var Lt=RQ(e||o),Nt=RQ(n);if(Lt!==Nt&&Sy("textcontent",t,!0,Nt),Sy("update",t,!0,{dirtyElements:S,dirtyLeaves:O,editorState:n,normalizedNodes:E,prevEditorState:e||o,tags:T}),t._deferred=[],M.length!==0){let Ze=t._updating;t._updating=!0;try{for(let _t=0;_t{o=Le(t,e,n)}),o}let i=EA(t);for(let o=4;0<=o;o--)for(let a=0;a{sh(t)}):(a._flushSync=!1,s&&(i.clear(),t._deferred=[],t._pendingEditorState=null))}function Ta(t,e,n){t._updating?t._updates.push([e,n]):yK(t,e,n)}var _O=class extends wm{constructor(e){super(e)}decorate(){Fe(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}};function li(t){return t instanceof _O}var _m=class extends wm{constructor(e){super(e),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let e=this.getFormat();return _0e[e]||""}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],n=this.getFirstChild();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getChildrenKeys(){let e=[],n=this.getFirstChild();for(;n!==null;)e.push(n.__key),n=n.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let e=Qn()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(e)}getAllTextNodes(){let e=[],n=this.getFirstChild();for(;n!==null;){if(Ue(n)&&e.push(n),xe(n)){let i=n.getAllTextNodes();e.push(...i)}n=n.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;e!==null;){if(xe(e)){let n=e.getFirstChild();if(n!==null){e=n;continue}}break}return e}getLastDescendant(){let e=this.getLastChild();for(;e!==null;){if(xe(e)){let n=e.getLastChild();if(n!==null){e=n;continue}}break}return e}getDescendantByIndex(e){let n=this.getChildren(),i=n.length;return e>=i?(e=n[i-1],xe(e)&&e.getLastDescendant()||e||null):(e=n[e],xe(e)&&e.getFirstDescendant()||e||null)}getFirstChild(){let e=this.getLatest().__first;return e===null?null:Vr(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&Fe(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return e===null?null:Vr(e)}getLastChildOrThrow(){let e=this.getLastChild();return e===null&&Fe(96,this.__key),e}getChildAtIndex(e){var n=this.getChildrenSize();let i;if(e=e;){if(n===e)return i;i=i.getPreviousSibling(),n--}return null}getTextContent(){let e="",n=this.getChildren(),i=n.length;for(let r=0;rn.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let n=this.getWritable();return n.__dir=e,n}setFormat(e){return this.getWritable().__format=e!==""?DQ[e]:0,this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,n,i){let r=i.length,o=this.getChildrenSize(),a=this.getWritable(),s=a.__key;var l=[],c=[];let d=this.getChildAtIndex(e+n),f=null,h=o-n+r;if(e!==0)if(e===o)f=this.getLastChild();else{var g=this.getChildAtIndex(e);g!==null&&(f=g.getPreviousSibling())}if(0({root:bK(Ea())}))}},Sm=class t extends _m{static getType(){return"paragraph"}static clone(e){return new t(e.__key)}createDOM(e){let n=document.createElement("p");return e=xy(e.theme,"paragraph"),e!==void 0&&n.classList.add(...e),n}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:n1e,priority:0})}}exportDOM(e){if({element:e}=super.exportDOM(e),e&&GS(e)){this.isEmpty()&&e.append(document.createElement("br"));var n=this.getFormatType();e.style.textAlign=n,(n=this.getDirection())&&(e.dir=n),n=this.getIndent(),0{Object.keys(o).forEach(a=>{let s=n.get(a);s===void 0&&(s=[],n.set(a,s)),s.push(o[a])})};return t.forEach(o=>{o=o.klass.importDOM!=null?o.klass.importDOM.bind(o.klass):null,o==null||i.has(o)||(i.add(o),o=o(),o!==null&&r(o))}),e&&r(e),n}var qM=class{constructor(e,n,i,r,o,a,s){this._parentEditor=n,this._rootElement=null,this._editorState=e,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=i,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=qG(),this._onError=o,this._htmlConversions=a,this._editable=s,this._headless=n!==null&&n._headless,this._blockCursorElement=this._window=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){let n=this._listeners.update;return n.add(e),()=>{n.delete(e)}}registerEditableListener(e){let n=this._listeners.editable;return n.add(e),()=>{n.delete(e)}}registerDecoratorListener(e){let n=this._listeners.decorator;return n.add(e),()=>{n.delete(e)}}registerTextContentListener(e){let n=this._listeners.textcontent;return n.add(e),()=>{n.delete(e)}}registerRootListener(e){let n=this._listeners.root;return e(this._rootElement,null),n.add(e),()=>{e(null,this._rootElement),n.delete(e)}}registerCommand(e,n,i){i===void 0&&Fe(35);let r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);let o=r.get(e);o===void 0&&Fe(36,String(e));let a=o[i];return a.add(n),()=>{a.delete(n),o.every(s=>s.size===0)&&r.delete(e)}}registerMutationListener(e,n){this._nodes.get(e.getType())===void 0&&Fe(37,e.name);let i=this._listeners.mutation;return i.set(n,e),()=>{i.delete(n)}}registerNodeTransformToKlass(e,n){var i=e.getType();return i=this._nodes.get(i),i===void 0&&Fe(37,e.name),i.transforms.add(n),i}registerNodeTransform(e,n){var i=this.registerNodeTransformToKlass(e,n);let r=[i];return i=i.replaceWithKlass,i!=null&&(i=this.registerNodeTransformToKlass(i,n),r.push(i)),N0e(this,e.getType()),()=>{r.forEach(o=>o.transforms.delete(n))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,n){return Le(this,e,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let n=this._rootElement;if(e!==n){let a=xy(this._config.theme,"root");var i=this._pendingEditorState||this._editorState;if(this._rootElement=e,wK(this,n,e,i),n!==null){if(!this._config.disableEvents){_y!==0&&(_y--,_y===0&&n.ownerDocument.removeEventListener("selectionchange",cK));var r=n.__lexicalEditor;if(r!=null){if(r._parentEditor!==null){var o=EA(r);o=o[o.length-1]._key,Kg.get(o)===r&&Kg.delete(o)}else Kg.delete(r._key);n.__lexicalEditor=null}for(r=lK(n),o=0;o{let r=pn(),o=Ea();r!==null?r.dirty=!0:o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.selectEnd())},{onUpdate:()=>{i.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),this._pendingEditorState===null&&i.removeAttribute("autocapitalize"))}blur(){var e=this._rootElement;e!==null&&e.blur(),e=ql(this._window),e!==null&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Sy("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}};pe.$addUpdateTag=function(t){mo(),Qn()._updateTags.add(t)};pe.$applyNodeReplacement=kw;pe.$copyNode=YG;pe.$createLineBreakNode=xm;pe.$createNodeSelection=ZM;pe.$createParagraphNode=zc;pe.$createPoint=Ls;pe.$createRangeSelection=function(){let t=Ls("root",0,"element"),e=Ls("root",0,"element");return new f0(t,e,0,"")};pe.$createTabNode=e4;pe.$createTextNode=br;pe.$getAdjacentNode=NM;pe.$getCharacterOffsets=HM;pe.$getEditor=function(){return Qn()};pe.$getNearestNodeFromDOMNode=ww;pe.$getNearestRootOrShadowRoot=VG;pe.$getNodeByKey=Vr;pe.$getPreviousSelection=h0;pe.$getRoot=Ea;pe.$getSelection=pn;pe.$getTextContent=function(){let t=pn();return t===null?"":t.getTextContent()};pe.$hasAncestor=bO;pe.$hasUpdateTag=function(t){return Qn()._updateTags.has(t)};pe.$insertNodes=function(t){let e=pn()||h0();e===null&&(e=Ea().selectEnd()),e.insertNodes(t)};pe.$isBlockElementNode=function(t){return xe(t)&&!t.isInline()};pe.$isDecoratorNode=li;pe.$isElementNode=xe;pe.$isInlineElementOrDecoratorNode=function(t){return xe(t)&&t.isInline()||li(t)&&t.isInline()};pe.$isLeafNode=function(t){return Ue(t)||ph(t)||li(t)};pe.$isLineBreakNode=ph;pe.$isNodeSelection=xw;pe.$isParagraphNode=function(t){return t instanceof Sm};pe.$isRangeSelection=bt;pe.$isRootNode=xa;pe.$isRootOrShadowRoot=Cu;pe.$isTabNode=uK;pe.$isTextNode=Ue;pe.$nodesOfType=function(t){var e=Ul();let n=e._readOnly,i=t.getType();e=e._nodeMap;let r=[];for(let[,o]of e)o instanceof t&&o.__type===i&&(n||o.isAttached())&&r.push(o);return r};pe.$normalizeSelection__EXPERIMENTAL=QG;pe.$parseSerializedNode=function(t){return $A(t,Qn()._nodes)};pe.$selectAll=function(){var t=Ea();t=t.select(0,t.getChildrenSize()),Il(QG(t))};pe.$setCompositionKey=Zi;pe.$setSelection=Il;pe.$splitNode=function(t,e){let n=t.getChildAtIndex(e);n==null&&(n=t),Cu(t)&&Fe(102);let i=a=>{let s=a.getParentOrThrow(),l=Cu(s),c=a!==n||l?YG(a):a;if(l)return xe(a)&&xe(c)||Fe(133),a.insertAfter(c),[a,c,c];let[d,f,h]=i(s);return a=a.getNextSiblings(),h.append(c,...a),[d,f,c]},[r,o]=i(n);return[r,o]};pe.BLUR_COMMAND=IG;pe.CAN_REDO_COMMAND={};pe.CAN_UNDO_COMMAND={};pe.CLEAR_EDITOR_COMMAND={};pe.CLEAR_HISTORY_COMMAND={};pe.CLICK_COMMAND=vG;pe.COMMAND_PRIORITY_CRITICAL=4;pe.COMMAND_PRIORITY_EDITOR=0;pe.COMMAND_PRIORITY_HIGH=3;pe.COMMAND_PRIORITY_LOW=1;pe.COMMAND_PRIORITY_NORMAL=2;pe.CONTROLLED_TEXT_INSERTION_COMMAND=Gg;pe.COPY_COMMAND=wA;pe.CUT_COMMAND=kA;pe.DELETE_CHARACTER_COMMAND=Xg;pe.DELETE_LINE_COMMAND=nb;pe.DELETE_WORD_COMMAND=tb;pe.DRAGEND_COMMAND=$G;pe.DRAGOVER_COMMAND=AG;pe.DRAGSTART_COMMAND=PG;pe.DROP_COMMAND=NG;pe.DecoratorNode=_O;pe.ElementNode=_m;pe.FOCUS_COMMAND=DG;pe.FORMAT_ELEMENT_COMMAND={};pe.FORMAT_TEXT_COMMAND=ru;pe.INDENT_CONTENT_COMMAND={};pe.INSERT_LINE_BREAK_COMMAND=ky;pe.INSERT_PARAGRAPH_COMMAND=OM;pe.INSERT_TAB_COMMAND={};pe.KEY_ARROW_DOWN_COMMAND=OG;pe.KEY_ARROW_LEFT_COMMAND=kG;pe.KEY_ARROW_RIGHT_COMMAND=bG;pe.KEY_ARROW_UP_COMMAND=_G;pe.KEY_BACKSPACE_COMMAND=CG;pe.KEY_DELETE_COMMAND=TG;pe.KEY_DOWN_COMMAND=yG;pe.KEY_ENTER_COMMAND=hO;pe.KEY_ESCAPE_COMMAND=EG;pe.KEY_MODIFIER_COMMAND=LG;pe.KEY_SPACE_COMMAND=SG;pe.KEY_TAB_COMMAND=MG;pe.LineBreakNode=km;pe.MOVE_TO_END=wG;pe.MOVE_TO_START=xG;pe.OUTDENT_CONTENT_COMMAND={};pe.PASTE_COMMAND=vA;pe.ParagraphNode=Sm;pe.REDO_COMMAND=bA;pe.REMOVE_TEXT_COMMAND=SM;pe.RootNode=Om;pe.SELECTION_CHANGE_COMMAND=qS;pe.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND={};pe.SELECT_ALL_COMMAND=CM;pe.TabNode=JS;pe.TextNode=gh;pe.UNDO_COMMAND=yA;pe.createCommand=function(){return{}};pe.createEditor=function(t){var e=t||{},n=rr,i=e.theme||{};let r=t===void 0?n:e.parentEditor||null,o=e.disableEvents||!1,a=DA(),s=e.namespace||(r!==null?r._config.namespace:qG()),l=e.editorState,c=[Om,gh,km,JS,Sm,...e.nodes||[]],{onError:d,html:f}=e;if(e=e.editable!==void 0?e.editable:!0,t===void 0&&n!==null)t=n._nodes;else for(t=new Map,n=0;nJ.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},J.createElement("path",{d:"M9 20.4214C9.93991 20.785 10.9427 21 12 21C17.1812 21 21.0543 15.8362 22.6273 13.3309C22.8699 12.9407 23 12.4761 23 12C23 11.5239 22.8699 11.0593 22.6273 10.6691C22.2278 10.0328 21.68 9.22509 21 8.37401M5.63183 18.3627C3.66995 16.7105 2.20181 14.6514 1.37268 13.3309C1.1301 12.9407 1 12.4761 1 12C1 11.5239 1.1301 11.0593 1.37268 10.6691C2.94573 8.16375 6.81884 3 12 3C14.4123 3 16.5411 4.11939 18.2862 5.56867",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),J.createElement("path",{d:"M17 12C17 14.7614 14.7614 17 12 17M8.42928 15.5C7.54516 14.5981 7 13.3627 7 12C7 9.23858 9.23858 7 12 7C13.3627 7 14.5981 7.54516 15.5 8.42928",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),J.createElement("path",{d:"M2 22L22 2",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),u1e={wide:["w-[calc(75vw-var(--kg-breakout-adjustment-with-fallback)+2px)] mx-[calc(50%-(50vw-var(--kg-breakout-adjustment-with-fallback))-.8rem)] min-w-[calc(100%+3.6rem)] translate-x-[calc(50vw-50%+.8rem-var(--kg-breakout-adjustment-with-fallback))]","md:min-w-[calc(100%+10rem)]","lg:min-w-[calc(100%+18rem)]"].join(" "),full:"inset-x-[-1px] mx-[calc(50%-50vw)] w-[calc(100vw+2px)] lg:mx-[calc(50%-50vw+(var(--kg-breakout-adjustment-with-fallback)/2))] lg:w-[calc(100vw-var(--kg-breakout-adjustment-with-fallback)+2px)]"},oW={top:".6rem"},IA=N.default.forwardRef(({cardType:t,cardWidth:e="regular",feature:n,IndicatorIcon:i,indicatorPosition:r=oW,isDragging:o,isEditing:a,isSelected:s,isVisibilityActive:l,onIndicatorClick:c,wrapperStyle:d,children:f,...h},g)=>{let m=()=>d==="wide"&&(a||s)?"!-mx-3 !px-3":d==="code-card"&&a?"-mx-6":d==="wide"?"hover:-mx-3 hover:px-3":"border",b=["relative border-transparent caret-grey-800",s?"z-20":"z-10",s&&!o?"shadow-[0_0_0_2px] shadow-green":"",!s&&!o?"hover:shadow-[0_0_0_1px] hover:shadow-green":"",u1e[e]||"",m()].join(" "),x={...oW,...r||{},...t==="call-to-action"&&{top:"1.4rem"}},_;return l?_=w.jsx("div",{className:"sticky top-0 lg:top-8",children:w.jsx(d1e,{"aria-label":"Card is hidden for select audiences",className:"absolute left-[-6rem] size-5 cursor-pointer text-grey","data-testid":"visibility-indicator",style:{left:x.left,top:x.top},onClick:c})}):i&&(_=w.jsx("div",{className:"sticky top-0 lg:top-8",children:w.jsx(i,{"aria-label":`${t} indicator`,className:"absolute left-[-6rem] size-5 text-grey",style:{left:x.left,top:x.top}})})),w.jsxs(w.Fragment,{children:[_,w.jsx("div",{ref:g,className:b,"data-kg-card":t,"data-kg-card-editing":a,"data-kg-card-selected":s,...h,children:f})]})});IA.displayName="CardWrapper";IA.propTypes={isSelected:$.bool,isEditing:$.bool,cardWidth:$.oneOf(["regular","wide","full"]),icon:$.string,indicatorPosition:$.shape({left:$.string,top:$.string})};function f1e(t){return t.replace(/]*>((.*?){.*?}(.*?))<\/code>/gi,"$1")}function ki(t="",e={}){let n=Object.assign({},{},e);if(!n.createDocument){let r=typeof DOMParser<"u"&&DOMParser||typeof window<"u"&&window.DOMParser;if(!r)throw new Error("cleanBasicHtml() must be passed a `createDocument` function as an option when used in a non-browser environment");n.createDocument=function(o){return new r().parseFromString(o,"text/html")}}let i=t;if((!n.allowBr||i==="
")&&(i=i.replace(//g," ")),n.removeCodeWrappers&&(i=f1e(i)),i=i.replace(/(\s| ){2,}/g," ").trim().replace(/^ | $/g,"").trim(),i){let r=n.createDocument(i);if(r.body.textContent==="")return null;r.body.querySelectorAll("*").forEach(o=>{if(!o.textContent.trim().replace(/\u200c+/g,"")){if(n.allowBr&&o.tagName==="BR")return;if(n.allowBr&&o.querySelector("br"))return o.replaceWith(r.createElement("br"));if(o.textContent.length>0){let a=r.createTextNode(" ");return o.replaceWith(a)}return o.remove()}}),n.firstChildInnerContent&&r.body.firstElementChild?i=r.body.firstElementChild.innerHTML.trim():i=r.body.innerHTML.trim()}return i}var _w={},aW={};function h1e(t){let e=aW[t];if(e)return e;e=aW[t]=[];for(let n=0;n<128;n++){let i=String.fromCharCode(n);e.push(i)}for(let n=0;n=55296&&d<=57343?r+="\uFFFD\uFFFD\uFFFD":r+=String.fromCharCode(d),o+=6;continue}}if((s&248)===240&&o+91114111?r+="\uFFFD\uFFFD\uFFFD\uFFFD":(f-=65536,r+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),o+=9;continue}}r+="\uFFFD"}return r})}t4.defaultChars=";/?:@&=+$,#";t4.componentChars="";var sW={};function p1e(t){let e=sW[t];if(e)return e;e=sW[t]=[];for(let n=0;n<128;n++){let i=String.fromCharCode(n);/^[0-9a-z]$/i.test(i)?e.push(i):e.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);let i=p1e(e),r="";for(let o=0,a=t.length;o=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1=56320&&l<=57343){r+=encodeURIComponent(t[o]+t[o+1]),o++;continue}}r+="%EF%BF%BD";continue}r+=encodeURIComponent(t[o])}return r}n4.defaultChars=";/?:@&=+$,-_.!~*'()#";n4.componentChars="-_.!~*'()";function g1e(t){let e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||"",e}function SO(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var m1e=/^([a-z0-9.+-]+:)/i,v1e=/:[0-9]*$/,y1e=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,b1e=["<",">",'"',"`"," ","\r",` `," "],w1e=["{","}","|","\\","^","`"].concat(b1e),k1e=["'"].concat(w1e),lW=["%","/","?",";","#"].concat(k1e),cW=["/","?","#"],x1e=255,dW=/^[+a-z0-9A-Z_-]{0,63}$/,_1e=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,uW={javascript:!0,"javascript:":!0},fW={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function O1e(t,e){if(t&&t instanceof SO)return t;let n=new SO;return n.parse(t,e),n}SO.prototype.parse=function(t,e){let n,i,r,o=t;if(o=o.trim(),!e&&t.split("#").length===1){let c=y1e.exec(o);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let a=m1e.exec(o);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(e||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(r=o.substr(0,2)==="//",r&&!(a&&uW[a])&&(o=o.substr(2),this.slashes=!0)),!uW[a]&&(r||a&&!fW[a])){let c=-1;for(let m=0;m127?O+="x":O+=_[S];if(!O.match(dW)){let S=m.slice(0,b),E=m.slice(b+1),T=_.match(_1e);T&&(S.push(T[1]),E.unshift(T[2])),E.length&&(o=E.join(".")+o),this.hostname=S.join(".");break}}}}this.hostname.length>x1e&&(this.hostname=""),g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let s=o.indexOf("#");s!==-1&&(this.hash=o.substr(s),o=o.slice(0,s));let l=o.indexOf("?");return l!==-1&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),fW[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};SO.prototype.parseHost=function(t){let e=v1e.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};_w.decode=t4;_w.encode=n4;_w.format=g1e;_w.parse=O1e;var Yh={},S1e=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C1e=/[\0-\x1F\x7F-\x9F]/,E1e=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,T1e=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,M1e=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;Yh.Any=S1e;Yh.Cc=C1e;Yh.Cf=E1e;Yh.P=T1e;Yh.Z=M1e;var OK={},UM={},LA={};Object.defineProperty(LA,"__esModule",{value:!0});LA.default=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(function(t){return t.charCodeAt(0)}));var jA={};Object.defineProperty(jA,"__esModule",{value:!0});jA.default=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(function(t){return t.charCodeAt(0)}));var VM={};(function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);t.fromCodePoint=(e=String.fromCodePoint)!==null&&e!==void 0?e:function(o){var a="";return o>65535&&(o-=65536,a+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),a+=String.fromCharCode(o),a};function i(o){var a;return o>=55296&&o<=57343||o>1114111?65533:(a=n.get(o))!==null&&a!==void 0?a:o}t.replaceCodePoint=i;function r(o){return(0,t.fromCodePoint)(i(o))}t.default=r})(VM);(function(t){var e=rn&&rn.__createBinding||(Object.create?function(j,H,X,B){B===void 0&&(B=X);var R=Object.getOwnPropertyDescriptor(H,X);(!R||("get"in R?!H.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return H[X]}}),Object.defineProperty(j,B,R)}:function(j,H,X,B){B===void 0&&(B=X),j[B]=H[X]}),n=rn&&rn.__setModuleDefault||(Object.create?function(j,H){Object.defineProperty(j,"default",{enumerable:!0,value:H})}:function(j,H){j.default=H}),i=rn&&rn.__importStar||function(j){if(j&&j.__esModule)return j;var H={};if(j!=null)for(var X in j)X!=="default"&&Object.prototype.hasOwnProperty.call(j,X)&&e(H,j,X);return n(H,j),H},r=rn&&rn.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTMLAttribute=t.decodeHTML=t.determineBranch=t.EntityDecoder=t.DecodingMode=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var o=r(LA);t.htmlDecodeTree=o.default;var a=r(jA);t.xmlDecodeTree=a.default;var s=i(VM);t.decodeCodePoint=s.default;var l=VM;Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return l.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return l.fromCodePoint}});var c;(function(j){j[j.NUM=35]="NUM",j[j.SEMI=59]="SEMI",j[j.EQUALS=61]="EQUALS",j[j.ZERO=48]="ZERO",j[j.NINE=57]="NINE",j[j.LOWER_A=97]="LOWER_A",j[j.LOWER_F=102]="LOWER_F",j[j.LOWER_X=120]="LOWER_X",j[j.LOWER_Z=122]="LOWER_Z",j[j.UPPER_A=65]="UPPER_A",j[j.UPPER_F=70]="UPPER_F",j[j.UPPER_Z=90]="UPPER_Z"})(c||(c={}));var d=32,f;(function(j){j[j.VALUE_LENGTH=49152]="VALUE_LENGTH",j[j.BRANCH_LENGTH=16256]="BRANCH_LENGTH",j[j.JUMP_TABLE=127]="JUMP_TABLE"})(f=t.BinTrieFlags||(t.BinTrieFlags={}));function h(j){return j>=c.ZERO&&j<=c.NINE}function g(j){return j>=c.UPPER_A&&j<=c.UPPER_F||j>=c.LOWER_A&&j<=c.LOWER_F}function m(j){return j>=c.UPPER_A&&j<=c.UPPER_Z||j>=c.LOWER_A&&j<=c.LOWER_Z||h(j)}function b(j){return j===c.EQUALS||m(j)}var x;(function(j){j[j.EntityStart=0]="EntityStart",j[j.NumericStart=1]="NumericStart",j[j.NumericDecimal=2]="NumericDecimal",j[j.NumericHex=3]="NumericHex",j[j.NamedEntity=4]="NamedEntity"})(x||(x={}));var _;(function(j){j[j.Legacy=0]="Legacy",j[j.Strict=1]="Strict",j[j.Attribute=2]="Attribute"})(_=t.DecodingMode||(t.DecodingMode={}));var O=function(){function j(H,X,B){this.decodeTree=H,this.emitCodePoint=X,this.errors=B,this.state=x.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=_.Strict}return j.prototype.startEntity=function(H){this.decodeMode=H,this.state=x.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},j.prototype.write=function(H,X){switch(this.state){case x.EntityStart:return H.charCodeAt(X)===c.NUM?(this.state=x.NumericStart,this.consumed+=1,this.stateNumericStart(H,X+1)):(this.state=x.NamedEntity,this.stateNamedEntity(H,X));case x.NumericStart:return this.stateNumericStart(H,X);case x.NumericDecimal:return this.stateNumericDecimal(H,X);case x.NumericHex:return this.stateNumericHex(H,X);case x.NamedEntity:return this.stateNamedEntity(H,X)}},j.prototype.stateNumericStart=function(H,X){return X>=H.length?-1:(H.charCodeAt(X)|d)===c.LOWER_X?(this.state=x.NumericHex,this.consumed+=1,this.stateNumericHex(H,X+1)):(this.state=x.NumericDecimal,this.stateNumericDecimal(H,X))},j.prototype.addToNumericResult=function(H,X,B,R){if(X!==B){var U=B-X;this.result=this.result*Math.pow(R,U)+parseInt(H.substr(X,U),R),this.consumed+=U}},j.prototype.stateNumericHex=function(H,X){for(var B=X;X>14;X>14,U!==0){if(V===c.SEMI)return this.emitNamedEntityData(this.treeIndex,U,this.consumed+this.excess);this.decodeMode!==_.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},j.prototype.emitNotTerminatedNamedEntity=function(){var H,X=this,B=X.result,R=X.decodeTree,U=(R[B]&f.VALUE_LENGTH)>>14;return this.emitNamedEntityData(B,U,this.consumed),(H=this.errors)===null||H===void 0||H.missingSemicolonAfterCharacterReference(),this.consumed},j.prototype.emitNamedEntityData=function(H,X,B){var R=this.decodeTree;return this.emitCodePoint(X===1?R[H]&~f.VALUE_LENGTH:R[H+1],B),X===3&&this.emitCodePoint(R[H+2],B),B},j.prototype.end=function(){var H;switch(this.state){case x.NamedEntity:return this.result!==0&&(this.decodeMode!==_.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case x.NumericDecimal:return this.emitNumericEntity(0,2);case x.NumericHex:return this.emitNumericEntity(0,3);case x.NumericStart:return(H=this.errors)===null||H===void 0||H.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case x.EntityStart:return 0}},j}();t.EntityDecoder=O;function S(j){var H="",X=new O(j,function(B){return H+=(0,s.fromCodePoint)(B)});return function(B,R){for(var U=0,V=0;(V=B.indexOf("&",V))>=0;){H+=B.slice(U,V),X.startEntity(R);var K=X.write(B,V+1);if(K<0){U=V+X.end();break}U=V+K,V=K===0?U+1:U}var te=H+B.slice(U);return H="",te}}function E(j,H,X,B){var R=(H&f.BRANCH_LENGTH)>>7,U=H&f.JUMP_TABLE;if(R===0)return U!==0&&B===U?X:-1;if(U){var V=B-U;return V<0||V>=R?-1:j[X+V]-1}for(var K=X,te=K+R-1;K<=te;){var oe=K+te>>>1,le=j[oe];if(leB)te=oe-1;else return j[oe+R]}return-1}t.determineBranch=E;var T=S(o.default),M=S(a.default);function I(j,H){return H===void 0&&(H=_.Legacy),T(j,H)}t.decodeHTML=I;function F(j){return T(j,_.Attribute)}t.decodeHTMLAttribute=F;function W(j){return T(j,_.Strict)}t.decodeHTMLStrict=W;function Z(j){return M(j,_.Strict)}t.decodeXML=Z})(UM);var mh={},RA={};Object.defineProperty(RA,"__esModule",{value:!0});function k2(t){for(var e=1;e$\x80-\uFFFF]/g;var e=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);t.getCodePoint=String.prototype.codePointAt!=null?function(r,o){return r.codePointAt(o)}:function(r,o){return(r.charCodeAt(o)&64512)===55296?(r.charCodeAt(o)-55296)*1024+r.charCodeAt(o+1)-56320+65536:r.charCodeAt(o)};function n(r){for(var o="",a=0,s;(s=t.xmlReplacer.exec(r))!==null;){var l=s.index,c=r.charCodeAt(l),d=e.get(c);d!==void 0?(o+=r.substring(a,l)+d,a=l+1):(o+="".concat(r.substring(a,l),"&#x").concat((0,t.getCodePoint)(r,l).toString(16),";"),a=t.xmlReplacer.lastIndex+=+((c&64512)===55296))}return o+r.substr(a)}t.encodeXML=n,t.escape=n;function i(r,o){return function(a){for(var s,l=0,c="";s=r.exec(a);)l!==s.index&&(c+=a.substring(l,s.index)),c+=o.get(s[0].charCodeAt(0)),l=s.index+1;return c+a.substring(l)}}t.escapeUTF8=i(/[&<>'"]/g,e),t.escapeAttribute=i(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t.escapeText=i(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(CO);var N1e=rn&&rn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mh,"__esModule",{value:!0});mh.encodeNonAsciiHTML=mh.encodeHTML=void 0;var P1e=N1e(RA),SK=CO,A1e=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function $1e(t){return CK(A1e,t)}mh.encodeHTML=$1e;function D1e(t){return CK(SK.xmlReplacer,t)}mh.encodeNonAsciiHTML=D1e;function CK(t,e){for(var n="",i=0,r;(r=t.exec(e))!==null;){var o=r.index;n+=e.substring(i,o);var a=e.charCodeAt(o),s=P1e.default.get(a);if(typeof s=="object"){if(o+1|$))",e.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+e.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+e.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function YM(t){return Array.prototype.slice.call(arguments,1).forEach(function(e){e&&Object.keys(e).forEach(function(n){t[n]=e[n]})}),t}function i4(t){return Object.prototype.toString.call(t)}function L1e(t){return i4(t)==="[object String]"}function j1e(t){return i4(t)==="[object Object]"}function R1e(t){return i4(t)==="[object RegExp]"}function hW(t){return i4(t)==="[object Function]"}function F1e(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var EK={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function z1e(t){return Object.keys(t||{}).reduce(function(e,n){return e||EK.hasOwnProperty(n)},!1)}var Q1e={"http:":{validate:function(t,e,n){let i=t.slice(e);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(i)?i.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,n){let i=t.slice(e);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(i)?e>=3&&t[e-3]===":"||e>=3&&t[e-3]==="/"?0:i.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,n){let i=t.slice(e);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(i)?i.match(n.re.mailto)[0].length:0}}},W1e="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",B1e="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function H1e(t){t.__index__=-1,t.__text_cache__=""}function Z1e(t){return function(e,n){let i=e.slice(n);return t.test(i)?i.match(t)[0].length:0}}function pW(){return function(t,e){e.normalize(t)}}function EO(t){let e=t.re=I1e(t.__opts__),n=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||n.push(W1e),n.push(e.src_xn),e.src_tlds=n.join("|");function i(s){return s.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(i(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(i(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(i(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(i(e.tpl_host_fuzzy_test),"i");let r=[];t.__compiled__={};function o(s,l){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+l)}Object.keys(t.__schemas__).forEach(function(s){let l=t.__schemas__[s];if(l===null)return;let c={validate:null,link:null};if(t.__compiled__[s]=c,j1e(l)){R1e(l.validate)?c.validate=Z1e(l.validate):hW(l.validate)?c.validate=l.validate:o(s,l),hW(l.normalize)?c.normalize=l.normalize:l.normalize?o(s,l):c.normalize=pW();return}if(L1e(l)){r.push(s);return}o(s,l)}),r.forEach(function(s){t.__compiled__[t.__schemas__[s]]&&(t.__compiled__[s].validate=t.__compiled__[t.__schemas__[s]].validate,t.__compiled__[s].normalize=t.__compiled__[t.__schemas__[s]].normalize)}),t.__compiled__[""]={validate:null,normalize:pW()};let a=Object.keys(t.__compiled__).filter(function(s){return s.length>0&&t.__compiled__[s]}).map(F1e).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+e.src_ZPCc+"))("+a+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+e.src_ZPCc+"))("+a+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),H1e(t)}function q1e(t,e){let n=t.__index__,i=t.__last_index__,r=t.__text_cache__.slice(n,i);this.schema=t.__schema__.toLowerCase(),this.index=n+e,this.lastIndex=i+e,this.raw=r,this.text=r,this.url=r}function XM(t,e){let n=new q1e(t,e);return t.__compiled__[n.schema].normalize(n,t),n}function Ma(t,e){if(!(this instanceof Ma))return new Ma(t,e);e||z1e(t)&&(e=t,t={}),this.__opts__=YM({},EK,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=YM({},Q1e,t),this.__compiled__={},this.__tlds__=B1e,this.__tlds_replaced__=!1,this.re={},EO(this)}Ma.prototype.add=function(t,e){return this.__schemas__[t]=e,EO(this),this};Ma.prototype.set=function(t){return this.__opts__=YM(this.__opts__,t),this};Ma.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let e,n,i,r,o,a,s,l,c;if(this.re.schema_test.test(t)){for(s=this.re.schema_search,s.lastIndex=0;(e=s.exec(t))!==null;)if(r=this.testSchemaAt(t,e[2],s.lastIndex),r){this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+r;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&(i=t.match(this.re.email_fuzzy))!==null&&(o=i.index+i[1].length,a=i.index+i[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a))),this.__index__>=0};Ma.prototype.pretest=function(t){return this.re.pretest.test(t)};Ma.prototype.testSchemaAt=function(t,e,n){return this.__compiled__[e.toLowerCase()]?this.__compiled__[e.toLowerCase()].validate(t,n,this):0};Ma.prototype.match=function(t){let e=[],n=0;this.__index__>=0&&this.__text_cache__===t&&(e.push(XM(this,n)),n=this.__last_index__);let i=n?t.slice(n):t;for(;this.test(i);)e.push(XM(this,n)),i=i.slice(this.__last_index__),n+=this.__last_index__;return e.length?e:null};Ma.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;let e=this.re.schema_at_start.exec(t);if(!e)return null;let n=this.testSchemaAt(t,e[2],e[0].length);return n?(this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+n,XM(this,0)):null};Ma.prototype.tlds=function(t,e){return t=Array.isArray(t)?t:[t],e?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(n,i,r){return n!==r[i-1]}).reverse(),EO(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,EO(this),this)};Ma.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Ma.prototype.onCompile=function(){};var U1e=Ma,Jg=2147483647,Sl=36,FA=1,sb=26,V1e=38,Y1e=700,TK=72,MK=128,NK="-",X1e=/^xn--/,G1e=/[^\0-\x7F]/,K1e=/[\x2E\u3002\uFF0E\uFF61]/g,J1e={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},OT=Sl-FA,Cl=Math.floor,ST=String.fromCharCode;function Xd(t){throw new RangeError(J1e[t])}function eve(t,e){let n=[],i=t.length;for(;i--;)n[i]=e(t[i]);return n}function PK(t,e){let n=t.split("@"),i="";n.length>1&&(i=n[0]+"@",t=n[1]),t=t.replace(K1e,".");let r=t.split("."),o=eve(r,e).join(".");return i+o}function zA(t){let e=[],n=0,i=t.length;for(;n=55296&&r<=56319&&nString.fromCodePoint(...t),tve=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:Sl},gW=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},$K=function(t,e,n){let i=0;for(t=n?Cl(t/Y1e):t>>1,t+=Cl(t/e);t>OT*sb>>1;i+=Sl)t=Cl(t/OT);return Cl(i+(OT+1)*t/(t+V1e))},QA=function(t){let e=[],n=t.length,i=0,r=MK,o=TK,a=t.lastIndexOf(NK);a<0&&(a=0);for(let s=0;s=128&&Xd("not-basic"),e.push(t.charCodeAt(s));for(let s=a>0?a+1:0;s=n&&Xd("invalid-input");let h=tve(t.charCodeAt(s++));h>=Sl&&Xd("invalid-input"),h>Cl((Jg-i)/d)&&Xd("overflow"),i+=h*d;let g=f<=o?FA:f>=o+sb?sb:f-o;if(hCl(Jg/m)&&Xd("overflow"),d*=m}let c=e.length+1;o=$K(i-l,c,l==0),Cl(i/c)>Jg-r&&Xd("overflow"),r+=Cl(i/c),i%=c,e.splice(i++,0,r)}return String.fromCodePoint(...e)},WA=function(t){let e=[];t=zA(t);let n=t.length,i=MK,r=0,o=TK;for(let l of t)l<128&&e.push(ST(l));let a=e.length,s=a;for(a&&e.push(NK);s=i&&dCl((Jg-r)/c)&&Xd("overflow"),r+=(l-i)*c,i=l;for(let d of t)if(dJg&&Xd("overflow"),d===i){let f=r;for(let h=Sl;;h+=Sl){let g=h<=o?FA:h>=o+sb?sb:h-o;if(f=55296&&t<=57343||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534||t>=0&&t<=8||t===11||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function TO(t){if(t>65535){t-=65536;let e=55296+(t>>10),n=56320+(t&1023);return String.fromCharCode(e,n)}return String.fromCharCode(t)}var QK=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,uve=/&([a-z#][a-z0-9]{1,31});/gi,fve=new RegExp(QK.source+"|"+uve.source,"gi"),hve=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function pve(t,e){if(e.charCodeAt(0)===35&&hve.test(e)){let i=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return HA(i)?TO(i):t}let n=LK.decodeHTML(t);return n!==t?n:t}function gve(t){return t.indexOf("\\")<0?t:t.replace(QK,"$1")}function lb(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(fve,function(e,n,i){return n||pve(e,i)})}var mve=/[&<>"]/,vve=/[&<>"]/g,yve={"&":"&","<":"<",">":">",'"':"""};function bve(t){return yve[t]}function Mu(t){return mve.test(t)?t.replace(vve,bve):t}var wve=/[.?*+^$[\]\\(){}|-]/g;function kve(t){return t.replace(wve,"\\$&")}function gn(t){switch(t){case 9:case 32:return!0}return!1}function cb(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function db(t){return FK.P.test(t)}function ub(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function o4(t){return t=t.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(t=t.replace(/ẞ/g,"\xDF")),t.toLowerCase().toUpperCase()}var xve={mdurl:au,ucmicro:FK},_ve=Object.freeze({__proto__:null,arrayReplaceAt:zK,assign:r4,escapeHtml:Mu,escapeRE:kve,fromCodePoint:TO,has:dve,isMdAsciiPunct:ub,isPunctChar:db,isSpace:gn,isString:BA,isValidEntityCode:HA,isWhiteSpace:cb,lib:xve,normalizeReference:o4,unescapeAll:lb,unescapeMd:gve});function Ove(t,e,n){let i,r,o,a,s=t.posMax,l=t.pos;for(t.pos=e+1,i=1;t.pos32))return o;if(i===41){if(a===0)break;a--}r++}return e===r||a!==0||(o.str=lb(t.slice(e,r)),o.pos=r,o.ok=!0),o}function Cve(t,e,n){let i,r,o=0,a=e,s={ok:!1,pos:0,lines:0,str:""};if(a>=n||(r=t.charCodeAt(a),r!==34&&r!==39&&r!==40))return s;for(a++,r===40&&(r=41);a"+Mu(o.content)+""};Vl.code_block=function(t,e,n,i,r){let o=t[e];return""+Mu(t[e].content)+` `};Vl.fence=function(t,e,n,i,r){let o=t[e],a=o.info?lb(o.info).trim():"",s="",l="";if(a){let d=a.split(/(\s+)/g);s=d[0],l=d.slice(2).join("")}let c;if(n.highlight?c=n.highlight(o.content,s,l)||Mu(o.content):c=Mu(o.content),c.indexOf("${c} `}return`
${c}
`};Vl.image=function(t,e,n,i,r){let o=t[e];return o.attrs[o.attrIndex("alt")][1]=r.renderInlineAsText(o.children,n,i),r.renderToken(t,e,n)};Vl.hardbreak=function(t,e,n){return n.xhtmlOut?`
`:`
`};Vl.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?`
`:`
`:` `};Vl.text=function(t,e){return Mu(t[e].content)};Vl.html_block=function(t,e){return t[e].content};Vl.html_inline=function(t,e){return t[e].content};function g0(){this.rules=r4({},Vl)}g0.prototype.renderAttrs=function(t){let e,n,i;if(!t.attrs)return"";for(i="",e=0,n=t.attrs.length;e `:">",r};g0.prototype.renderInline=function(t,e,n){let i="",r=this.rules;for(let o=0,a=t.length;o=0&&(n=this.attrs[e][1]),n};Hs.prototype.attrJoin=function(t,e){let n=this.attrIndex(t);n<0?this.attrPush([t,e]):this.attrs[n][1]=this.attrs[n][1]+" "+e};function WK(t,e,n){this.src=t,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=e}WK.prototype.Token=Hs;var Tve=/\r\n?|\n/g,Mve=/\0/g;function Nve(t){let e;e=t.src.replace(Tve,` `),e=e.replace(Mve,"\uFFFD"),t.src=e}function Pve(t){let e;t.inlineMode?(e=new t.Token("inline","",0),e.content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}function Ave(t){let e=t.tokens;for(let n=0,i=e.length;n\s]/i.test(t)}function Dve(t){return/^<\/a\s*>/i.test(t)}function Ive(t){let e=t.tokens;if(t.md.options.linkify)for(let n=0,i=e.length;n=0;a--){let s=r[a];if(s.type==="link_close"){for(a--;r[a].level!==s.level&&r[a].type!=="link_open";)a--;continue}if(s.type==="html_inline"&&($ve(s.content)&&o>0&&o--,Dve(s.content)&&o++),!(o>0)&&s.type==="text"&&t.md.linkify.test(s.content)){let l=s.content,c=t.md.linkify.match(l),d=[],f=s.level,h=0;c.length>0&&c[0].index===0&&a>0&&r[a-1].type==="text_special"&&(c=c.slice(1));for(let g=0;gh){let T=new t.Token("text","",0);T.content=l.slice(h,_),T.level=f,d.push(T)}let O=new t.Token("link_open","a",1);O.attrs=[["href",b]],O.level=f++,O.markup="linkify",O.info="auto",d.push(O);let S=new t.Token("text","",0);S.content=x,S.level=f,d.push(S);let E=new t.Token("link_close","a",-1);E.level=--f,E.markup="linkify",E.info="auto",d.push(E),h=c[g].lastIndex}if(h=0;n--){let i=t[n];i.type==="text"&&!e&&(i.content=i.content.replace(jve,Fve)),i.type==="link_open"&&i.info==="auto"&&e--,i.type==="link_close"&&i.info==="auto"&&e++}}function Qve(t){let e=0;for(let n=t.length-1;n>=0;n--){let i=t[n];i.type==="text"&&!e&&BK.test(i.content)&&(i.content=i.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),i.type==="link_open"&&i.info==="auto"&&e--,i.type==="link_close"&&i.info==="auto"&&e++}}function Wve(t){let e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)t.tokens[e].type==="inline"&&(Lve.test(t.tokens[e].content)&&zve(t.tokens[e].children),BK.test(t.tokens[e].content)&&Qve(t.tokens[e].children))}var Bve=/['"]/,mW=/['"]/g,vW="\u2019";function _2(t,e,n){return t.slice(0,e)+n+t.slice(e+1)}function Hve(t,e){let n,i=[];for(let r=0;r=0&&!(i[n].level<=a);n--);if(i.length=n+1,o.type!=="text")continue;let s=o.content,l=0,c=s.length;e:for(;l=0)m=s.charCodeAt(d.index-1);else for(n=r-1;n>=0&&!(t[n].type==="softbreak"||t[n].type==="hardbreak");n--)if(t[n].content){m=t[n].content.charCodeAt(t[n].content.length-1);break}let b=32;if(l=48&&m<=57&&(h=f=!1),f&&h&&(f=x,h=_),!f&&!h){g&&(o.content=_2(o.content,d.index,vW));continue}if(h)for(n=i.length-1;n>=0;n--){let E=i[n];if(i[n].level=0;e--)t.tokens[e].type!=="inline"||!Bve.test(t.tokens[e].content)||Hve(t.tokens[e].children,t)}function qve(t){let e,n,i=t.tokens,r=i.length;for(let o=0;o0&&this.level++,this.tokens.push(i),i};Yl.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Yl.prototype.skipEmptyLines=function(t){for(let e=this.lineMax;te;)if(!gn(this.src.charCodeAt(--t)))return t+1;return t};Yl.prototype.skipChars=function(t,e){for(let n=this.src.length;tn;)if(e!==this.src.charCodeAt(--t))return t+1;return t};Yl.prototype.getLines=function(t,e,n,i){if(t>=e)return"";let r=new Array(e-t);for(let o=0,a=t;an?r[o]=new Array(s-n+1).join(" ")+this.src.slice(c,d):r[o]=this.src.slice(c,d)}return r.join("")};Yl.prototype.Token=Hs;function ET(t,e){let n=t.bMarks[e]+t.tShift[e],i=t.eMarks[e];return t.src.slice(n,i)}function yW(t){let e=[],n=t.length,i=0,r=t.charCodeAt(i),o=!1,a=0,s="";for(;in)return!1;let r=e+1;if(t.sCount[r]=4)return!1;let o=t.bMarks[r]+t.tShift[r];if(o>=t.eMarks[r])return!1;let a=t.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=t.eMarks[r])return!1;let s=t.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58&&!gn(s)||a===45&&gn(s))return!1;for(;o=4)return!1;c=yW(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();let f=c.length;if(f===0||f!==d.length)return!1;if(i)return!0;let h=t.parentType;t.parentType="table";let g=t.md.block.ruler.getRules("blockquote"),m=t.push("table_open","table",1),b=[e,0];m.map=b;let x=t.push("thead_open","thead",1);x.map=[e,e+1];let _=t.push("tr_open","tr",1);_.map=[e,e+1];for(let S=0;S=4)break;if(c=yW(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),r===e+2){let T=t.push("tbody_open","tbody",1);T.map=O=[e+2,0]}let E=t.push("tr_open","tr",1);E.map=[r,r+1];for(let T=0;T=4){i++,r=i;continue}break}t.line=r;let o=t.push("code_block","code",0);return o.content=t.getLines(e,r,4+t.blkIndent,!1)+` `,o.map=[e,t.line],!0}function Yve(t,e,n,i){let r=t.bMarks[e]+t.tShift[e],o=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||r+3>o)return!1;let a=t.src.charCodeAt(r);if(a!==126&&a!==96)return!1;let s=r;r=t.skipChars(r,a);let l=r-s;if(l<3)return!1;let c=t.src.slice(s,r),d=t.src.slice(r,o);if(a===96&&d.indexOf(String.fromCharCode(a))>=0)return!1;if(i)return!0;let f=e,h=!1;for(;f++,!(f>=n||(r=s=t.bMarks[f]+t.tShift[f],o=t.eMarks[f],r=4)&&(r=t.skipChars(r,a),!(r-s=4||t.src.charCodeAt(r)!==62)return!1;if(i)return!0;let s=[],l=[],c=[],d=[],f=t.md.block.ruler.getRules("blockquote"),h=t.parentType;t.parentType="blockquote";let g=!1,m;for(m=e;m=o)break;if(t.src.charCodeAt(r++)===62&&!S){let T=t.sCount[m]+1,M,I;t.src.charCodeAt(r)===32?(r++,T++,I=!1,M=!0):t.src.charCodeAt(r)===9?(M=!0,(t.bsCount[m]+T)%4===3?(r++,T++,I=!1):I=!0):M=!1;let F=T;for(s.push(t.bMarks[m]),t.bMarks[m]=r;r=o,l.push(t.bsCount[m]),t.bsCount[m]=t.sCount[m]+1+(M?1:0),c.push(t.sCount[m]),t.sCount[m]=F-T,d.push(t.tShift[m]),t.tShift[m]=r-t.bMarks[m];continue}if(g)break;let E=!1;for(let T=0,M=f.length;T";let _=[e,0];x.map=_,t.md.block.tokenize(t,e,m);let O=t.push("blockquote_close","blockquote",-1);O.markup=">",t.lineMax=a,t.parentType=h,_[1]=t.line;for(let S=0;S=4)return!1;let o=t.bMarks[e]+t.tShift[e],a=t.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;o=i)return-1;let o=t.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=i)return-1;if(o=t.src.charCodeAt(r++),o>=48&&o<=57){if(r-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return r=4||t.listIndent>=0&&t.sCount[l]-t.listIndent>=4&&t.sCount[l]=t.blkIndent&&(d=!0);let f,h,g;if((g=wW(t,l))>=0){if(f=!0,a=t.bMarks[l]+t.tShift[l],h=Number(t.src.slice(a,g-1)),d&&h!==1)return!1}else if((g=bW(t,l))>=0)f=!1;else return!1;if(d&&t.skipSpaces(g)>=t.eMarks[l])return!1;if(i)return!0;let m=t.src.charCodeAt(g-1),b=t.tokens.length;f?(s=t.push("ordered_list_open","ol",1),h!==1&&(s.attrs=[["start",h]])):s=t.push("bullet_list_open","ul",1);let x=[l,0];s.map=x,s.markup=String.fromCharCode(m);let _=!1,O=t.md.block.ruler.getRules("list"),S=t.parentType;for(t.parentType="list";l=r?I=1:I=T-E,I>4&&(I=1);let F=E+I;s=t.push("list_item_open","li",1),s.markup=String.fromCharCode(m);let W=[l,0];s.map=W,f&&(s.info=t.src.slice(a,g-1));let Z=t.tight,j=t.tShift[l],H=t.sCount[l],X=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=F,t.tight=!0,t.tShift[l]=M-t.bMarks[l],t.sCount[l]=T,M>=r&&t.isEmpty(l+1)?t.line=Math.min(t.line+2,n):t.md.block.tokenize(t,l,n,!0),(!t.tight||_)&&(c=!1),_=t.line-l>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=X,t.tShift[l]=j,t.sCount[l]=H,t.tight=Z,s=t.push("list_item_close","li",-1),s.markup=String.fromCharCode(m),l=t.line,W[1]=l,l>=n||t.sCount[l]=4)break;let B=!1;for(let R=0,U=O.length;R=4||t.src.charCodeAt(o)!==91)return!1;for(;++o3||t.sCount[s]<0)continue;let T=!1;for(let M=0,I=c.length;M"u"&&(t.env.references={}),typeof t.env.references[E]>"u"&&(t.env.references[E]={title:S,href:m}),t.parentType=d,t.line=e+r+1),!0):!1}var tye=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],nye="[a-zA-Z_:][a-zA-Z0-9:._-]*",iye="[^\"'=<>`\\x00-\\x20]+",rye="'[^']*'",oye='"[^"]*"',aye="(?:"+iye+"|"+rye+"|"+oye+")",sye="(?:\\s+"+nye+"(?:\\s*=\\s*"+aye+")?)",HK="<[A-Za-z][A-Za-z0-9\\-]*"+sye+"*\\s*\\/?>",ZK="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",lye="|",cye="<[?][\\s\\S]*?[?]>",dye="]*>",uye="",fye=new RegExp("^(?:"+HK+"|"+ZK+"|"+lye+"|"+cye+"|"+dye+"|"+uye+")"),hye=new RegExp("^(?:"+HK+"|"+ZK+")"),hg=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(hye.source+"\\s*$"),/^$/,!1]];function pye(t,e,n,i){let r=t.bMarks[e]+t.tShift[e],o=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(r)!==60)return!1;let a=t.src.slice(r,o),s=0;for(;s=4)return!1;let a=t.src.charCodeAt(r);if(a!==35||r>=o)return!1;let s=1;for(a=t.src.charCodeAt(++r);a===35&&r6||rr&&gn(t.src.charCodeAt(l-1))&&(o=l),t.line=e+1;let c=t.push("heading_open","h"+String(s),1);c.markup="########".slice(0,s),c.map=[e,t.line];let d=t.push("inline","",0);d.content=t.src.slice(r,o).trim(),d.map=[e,t.line],d.children=[];let f=t.push("heading_close","h"+String(s),-1);return f.markup="########".slice(0,s),!0}function mye(t,e,n){let i=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;let r=t.parentType;t.parentType="paragraph";let o=0,a,s=e+1;for(;s3)continue;if(t.sCount[s]>=t.blkIndent){let g=t.bMarks[s]+t.tShift[s],m=t.eMarks[s];if(g=m))){o=a===61?1:2;break}}if(t.sCount[s]<0)continue;let h=!1;for(let g=0,m=i.length;g3||t.sCount[o]<0)continue;let c=!1;for(let d=0,f=i.length;d=n||t.sCount[a]=o){t.line=n;break}let l=t.line,c=!1;for(let d=0;d=t.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");t.tight=!s,t.isEmpty(t.line-1)&&(s=!0),a=t.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(r),i};Ow.prototype.scanDelims=function(t,e){let n,i,r=!0,o=!0,a=this.posMax,s=this.src.charCodeAt(t),l=t>0?this.src.charCodeAt(t-1):32,c=t;for(;c0)return!1;let n=t.pos,i=t.posMax;if(n+3>i||t.src.charCodeAt(n)!==58||t.src.charCodeAt(n+1)!==47||t.src.charCodeAt(n+2)!==47)return!1;let r=t.pending.match(wye);if(!r)return!1;let o=r[1],a=t.md.linkify.matchAtStart(t.src.slice(n-o.length));if(!a)return!1;let s=a.url;if(s.length<=o.length)return!1;s=s.replace(/\*+$/,"");let l=t.md.normalizeLink(s);if(!t.md.validateLink(l))return!1;if(!e){t.pending=t.pending.slice(0,-o.length);let c=t.push("link_open","a",1);c.attrs=[["href",l]],c.markup="linkify",c.info="auto";let d=t.push("text","",0);d.content=t.md.normalizeLinkText(s);let f=t.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return t.pos+=s.length-o.length,!0}function xye(t,e){let n=t.pos;if(t.src.charCodeAt(n)!==10)return!1;let i=t.pending.length-1,r=t.posMax;if(!e)if(i>=0&&t.pending.charCodeAt(i)===32)if(i>=1&&t.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&t.pending.charCodeAt(o-1)===32;)o--;t.pending=t.pending.slice(0,o),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(t){qA[t.charCodeAt(0)]=1});function _ye(t,e){let n=t.pos,i=t.posMax;if(t.src.charCodeAt(n)!==92||(n++,n>=i))return!1;let r=t.src.charCodeAt(n);if(r===10){for(e||t.push("hardbreak","br",0),n++;n=55296&&r<=56319&&n+1=56320&&s<=57343&&(o+=t.src[n+1],n++)}let a="\\"+o;if(!e){let s=t.push("text_special","",0);r<256&&qA[r]!==0?s.content=o:s.content=a,s.markup=a,s.info="escape"}return t.pos=n+1,!0}function Oye(t,e){let n=t.pos;if(t.src.charCodeAt(n)!==96)return!1;let i=n;n++;let r=t.posMax;for(;n=0;i--){let r=e[i];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;let o=e[r.end],a=i>0&&e[i-1].end===r.end+1&&e[i-1].marker===r.marker&&e[i-1].token===r.token-1&&e[r.end+1].token===o.token+1,s=String.fromCharCode(r.marker),l=t.tokens[r.token];l.type=a?"strong_open":"em_open",l.tag=a?"strong":"em",l.nesting=1,l.markup=a?s+s:s,l.content="";let c=t.tokens[o.token];c.type=a?"strong_close":"em_close",c.tag=a?"strong":"em",c.nesting=-1,c.markup=a?s+s:s,c.content="",a&&(t.tokens[e[i-1].token].content="",t.tokens[e[r.end+1].token].content="",i--)}}function Tye(t){let e=t.tokens_meta,n=t.tokens_meta.length;xW(t,t.delimiters);for(let i=0;i=f)return!1;if(l=m,r=t.md.helpers.parseLinkDestination(t.src,m,t.posMax),r.ok){for(a=t.md.normalizeLink(r.str),t.md.validateLink(a)?m=r.pos:a="",l=m;m=f||t.src.charCodeAt(m)!==41)&&(c=!0),m++}if(c){if(typeof t.env.references>"u")return!1;if(m=0?i=t.src.slice(l,m++):m=g+1):m=g+1,i||(i=t.src.slice(h,g)),o=t.env.references[o4(i)],!o)return t.pos=d,!1;a=o.href,s=o.title}if(!e){t.pos=h,t.posMax=g;let b=t.push("link_open","a",1),x=[["href",a]];b.attrs=x,s&&x.push(["title",s]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=m,t.posMax=f,!0}function Nye(t,e){let n,i,r,o,a,s,l,c,d="",f=t.pos,h=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91)return!1;let g=t.pos+2,m=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(m<0)return!1;if(o=m+1,o=h)return!1;for(c=o,s=t.md.helpers.parseLinkDestination(t.src,o,t.posMax),s.ok&&(d=t.md.normalizeLink(s.str),t.md.validateLink(d)?o=s.pos:d=""),c=o;o=h||t.src.charCodeAt(o)!==41)return t.pos=f,!1;o++}else{if(typeof t.env.references>"u")return!1;if(o=0?r=t.src.slice(c,o++):o=m+1):o=m+1,r||(r=t.src.slice(g,m)),a=t.env.references[o4(r)],!a)return t.pos=f,!1;d=a.href,l=a.title}if(!e){i=t.src.slice(g,m);let b=[];t.md.inline.parse(i,t.md,t.env,b);let x=t.push("image","img",0),_=[["src",d],["alt",""]];x.attrs=_,x.children=b,x.content=i,l&&_.push(["title",l])}return t.pos=o,t.posMax=h,!0}var Pye=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Aye=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function $ye(t,e){let n=t.pos;if(t.src.charCodeAt(n)!==60)return!1;let i=t.pos,r=t.posMax;for(;;){if(++n>=r)return!1;let a=t.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}let o=t.src.slice(i+1,n);if(Aye.test(o)){let a=t.md.normalizeLink(o);if(!t.md.validateLink(a))return!1;if(!e){let s=t.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";let l=t.push("text","",0);l.content=t.md.normalizeLinkText(o);let c=t.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return t.pos+=o.length+2,!0}if(Pye.test(o)){let a=t.md.normalizeLink("mailto:"+o);if(!t.md.validateLink(a))return!1;if(!e){let s=t.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";let l=t.push("text","",0);l.content=t.md.normalizeLinkText(o);let c=t.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return t.pos+=o.length+2,!0}return!1}function Dye(t){return/^\s]/i.test(t)}function Iye(t){return/^<\/a\s*>/i.test(t)}function Lye(t){let e=t|32;return e>=97&&e<=122}function jye(t,e){if(!t.md.options.html)return!1;let n=t.posMax,i=t.pos;if(t.src.charCodeAt(i)!==60||i+2>=n)return!1;let r=t.src.charCodeAt(i+1);if(r!==33&&r!==63&&r!==47&&!Lye(r))return!1;let o=t.src.slice(i).match(fye);if(!o)return!1;if(!e){let a=t.push("html_inline","",0);a.content=o[0],Dye(a.content)&&t.linkLevel++,Iye(a.content)&&t.linkLevel--}return t.pos+=o[0].length,!0}var Rye=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Fye=/^&([a-z][a-z0-9]{1,31});/i;function zye(t,e){let n=t.pos,i=t.posMax;if(t.src.charCodeAt(n)!==38||n+1>=i)return!1;if(t.src.charCodeAt(n+1)===35){let r=t.src.slice(n).match(Rye);if(r){if(!e){let o=r[1][0].toLowerCase()==="x"?parseInt(r[1].slice(1),16):parseInt(r[1],10),a=t.push("text_special","",0);a.content=HA(o)?TO(o):TO(65533),a.markup=r[0],a.info="entity"}return t.pos+=r[0].length,!0}}else{let r=t.src.slice(n).match(Fye);if(r){let o=LK.decodeHTML(r[0]);if(o!==r[0]){if(!e){let a=t.push("text_special","",0);a.content=o,a.markup=r[0],a.info="entity"}return t.pos+=r[0].length,!0}}}return!1}function _W(t){let e={},n=t.length;if(!n)return;let i=0,r=-2,o=[];for(let a=0;al;c-=o[c]+1){let f=t[c];if(f.marker===s.marker&&f.open&&f.end<0){let h=!1;if((f.close||s.open)&&(f.length+s.length)%3===0&&(f.length%3!==0||s.length%3!==0)&&(h=!0),!h){let g=c>0&&!t[c-1].open?o[c-1]+1:0;o[a]=a-c+g,o[c]=g,s.open=!1,f.end=a,f.close=!1,d=-1,r=-2;break}}}d!==-1&&(e[s.marker][(s.open?3:0)+(s.length||0)%3]=d)}}function Qye(t){let e=t.tokens_meta,n=t.tokens_meta.length;_W(t.delimiters);for(let i=0;i0&&i++,r[e].type==="text"&&e+1=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;a||t.pos++,o[e]=t.pos};Sw.prototype.tokenize=function(t){let e=this.ruler.getRules(""),n=e.length,i=t.posMax,r=t.md.options.maxNesting;for(;t.pos=t.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(t.pos>=i)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()};Sw.prototype.parse=function(t,e,n,i){let r=new this.State(t,e,n,i);this.tokenize(r);let o=this.ruler2.getRules(""),a=o.length;for(let s=0;s=0))try{e.hostname=jK.toASCII(e.hostname)}catch{}return au.encode(au.format(e))}function Gye(t){let e=au.parse(t,!0);if(e.hostname&&(!e.protocol||VK.indexOf(e.protocol)>=0))try{e.hostname=jK.toUnicode(e.hostname)}catch{}return au.decode(au.format(e),au.decode.defaultChars+"%")}function os(t,e){if(!(this instanceof os))return new os(t,e);e||BA(t)||(e=t||{},t="default"),this.inline=new Sw,this.block=new a4,this.core=new ZA,this.renderer=new g0,this.linkify=new sve,this.validateLink=Yye,this.normalizeLink=Xye,this.normalizeLinkText=Gye,this.utils=_ve,this.helpers=r4({},Eve),this.options={},this.configure(t),e&&this.set(e)}os.prototype.set=function(t){return r4(this.options,t),this};os.prototype.configure=function(t){let e=this;if(BA(t)){let n=t;if(t=qye[n],!t)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach(function(n){t.components[n].rules&&e[n].ruler.enableOnly(t.components[n].rules),t.components[n].rules2&&e[n].ruler2.enableOnly(t.components[n].rules2)}),this};os.prototype.enable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.enable(t,!0))},this),n=n.concat(this.inline.ruler2.enable(t,!0));let i=t.filter(function(r){return n.indexOf(r)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this};os.prototype.disable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.disable(t,!0))},this),n=n.concat(this.inline.ruler2.disable(t,!0));let i=t.filter(function(r){return n.indexOf(r)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this};os.prototype.use=function(t){let e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this};os.prototype.parse=function(t,e){if(typeof t!="string")throw new Error("Input data should be a String");let n=new this.core.State(t,this,e);return this.core.process(n),n.tokens};os.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)};os.prototype.parseInline=function(t,e){let n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens};os.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};var YK=os,GM={exports:{}},Kye="2.0.0",XK=256,Jye=Number.MAX_SAFE_INTEGER||9007199254740991,ebe=16,tbe=XK-6,nbe=["major","premajor","minor","preminor","patch","prepatch","prerelease"],s4={MAX_LENGTH:XK,MAX_SAFE_COMPONENT_LENGTH:ebe,MAX_SAFE_BUILD_LENGTH:tbe,MAX_SAFE_INTEGER:Jye,RELEASE_TYPES:nbe,SEMVER_SPEC_VERSION:Kye,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},ibe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{},l4=ibe;(function(t,e){let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:r}=s4,o=l4;e=t.exports={};let a=e.re=[],s=e.safeRe=[],l=e.src=[],c=e.safeSrc=[],d=e.t={},f=0,h="[a-zA-Z0-9-]",g=[["\\s",1],["\\d",r],[h,i]],m=x=>{for(let[_,O]of g)x=x.split(`${_}*`).join(`${_}{0,${O}}`).split(`${_}+`).join(`${_}{1,${O}}`);return x},b=(x,_,O)=>{let S=m(_),E=f++;o(x,E,_),d[x]=E,l[E]=_,c[E]=S,a[E]=new RegExp(_,O?"g":void 0),s[E]=new RegExp(S,O?"g":void 0)};b("NUMERICIDENTIFIER","0|[1-9]\\d*"),b("NUMERICIDENTIFIERLOOSE","\\d+"),b("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),b("MAINVERSION",`(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})`),b("MAINVERSIONLOOSE",`(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})`),b("PRERELEASEIDENTIFIER",`(?:${l[d.NONNUMERICIDENTIFIER]}|${l[d.NUMERICIDENTIFIER]})`),b("PRERELEASEIDENTIFIERLOOSE",`(?:${l[d.NONNUMERICIDENTIFIER]}|${l[d.NUMERICIDENTIFIERLOOSE]})`),b("PRERELEASE",`(?:-(${l[d.PRERELEASEIDENTIFIER]}(?:\\.${l[d.PRERELEASEIDENTIFIER]})*))`),b("PRERELEASELOOSE",`(?:-?(${l[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[d.PRERELEASEIDENTIFIERLOOSE]})*))`),b("BUILDIDENTIFIER",`${h}+`),b("BUILD",`(?:\\+(${l[d.BUILDIDENTIFIER]}(?:\\.${l[d.BUILDIDENTIFIER]})*))`),b("FULLPLAIN",`v?${l[d.MAINVERSION]}${l[d.PRERELEASE]}?${l[d.BUILD]}?`),b("FULL",`^${l[d.FULLPLAIN]}$`),b("LOOSEPLAIN",`[v=\\s]*${l[d.MAINVERSIONLOOSE]}${l[d.PRERELEASELOOSE]}?${l[d.BUILD]}?`),b("LOOSE",`^${l[d.LOOSEPLAIN]}$`),b("GTLT","((?:<|>)?=?)"),b("XRANGEIDENTIFIERLOOSE",`${l[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),b("XRANGEIDENTIFIER",`${l[d.NUMERICIDENTIFIER]}|x|X|\\*`),b("XRANGEPLAIN",`[v=\\s]*(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:${l[d.PRERELEASE]})?${l[d.BUILD]}?)?)?`),b("XRANGEPLAINLOOSE",`[v=\\s]*(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:${l[d.PRERELEASELOOSE]})?${l[d.BUILD]}?)?)?`),b("XRANGE",`^${l[d.GTLT]}\\s*${l[d.XRANGEPLAIN]}$`),b("XRANGELOOSE",`^${l[d.GTLT]}\\s*${l[d.XRANGEPLAINLOOSE]}$`),b("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),b("COERCE",`${l[d.COERCEPLAIN]}(?:$|[^\\d])`),b("COERCEFULL",l[d.COERCEPLAIN]+`(?:${l[d.PRERELEASE]})?(?:${l[d.BUILD]})?(?:$|[^\\d])`),b("COERCERTL",l[d.COERCE],!0),b("COERCERTLFULL",l[d.COERCEFULL],!0),b("LONETILDE","(?:~>?)"),b("TILDETRIM",`(\\s*)${l[d.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",b("TILDE",`^${l[d.LONETILDE]}${l[d.XRANGEPLAIN]}$`),b("TILDELOOSE",`^${l[d.LONETILDE]}${l[d.XRANGEPLAINLOOSE]}$`),b("LONECARET","(?:\\^)"),b("CARETTRIM",`(\\s*)${l[d.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",b("CARET",`^${l[d.LONECARET]}${l[d.XRANGEPLAIN]}$`),b("CARETLOOSE",`^${l[d.LONECARET]}${l[d.XRANGEPLAINLOOSE]}$`),b("COMPARATORLOOSE",`^${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]})$|^$`),b("COMPARATOR",`^${l[d.GTLT]}\\s*(${l[d.FULLPLAIN]})$|^$`),b("COMPARATORTRIM",`(\\s*)${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]}|${l[d.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",b("HYPHENRANGE",`^\\s*(${l[d.XRANGEPLAIN]})\\s+-\\s+(${l[d.XRANGEPLAIN]})\\s*$`),b("HYPHENRANGELOOSE",`^\\s*(${l[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[d.XRANGEPLAINLOOSE]})\\s*$`),b("STAR","(<|>)?=?\\s*\\*"),b("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),b("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(GM,GM.exports);var Cw=GM.exports,rbe=Object.freeze({loose:!0}),obe=Object.freeze({}),abe=t=>t?typeof t!="object"?rbe:t:obe,UA=abe,OW=/^[0-9]+$/,GK=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:tGK(e,t),KK={compareIdentifiers:GK,rcompareIdentifiers:sbe},S2=l4,{MAX_LENGTH:SW,MAX_SAFE_INTEGER:C2}=s4,{safeRe:E2,t:T2}=Cw,lbe=UA,{compareIdentifiers:NT}=KK,cbe=class gl{constructor(e,n){if(n=lbe(n),e instanceof gl){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>SW)throw new TypeError(`version is longer than ${SW} characters`);S2("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=e.trim().match(n.loose?E2[T2.LOOSE]:E2[T2.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>C2||this.major<0)throw new TypeError("Invalid major version");if(this.minor>C2||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>C2||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){let o=+r;if(o>=0&&oe.major?1:this.minore.minor?1:this.patche.patch?1:0}comparePre(e){if(e instanceof gl||(e=new gl(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let i=this.prerelease[n],r=e.prerelease[n];if(S2("prerelease compare",n,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i!==r)return NT(i,r)}while(++n)}compareBuild(e){e instanceof gl||(e=new gl(e,this.options));let n=0;do{let i=this.build[n],r=e.build[n];if(S2("build compare",n,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i!==r)return NT(i,r)}while(++n)}inc(e,n,i){if(e.startsWith("pre")){if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let r=`-${n}`.match(this.options.loose?E2[T2.PRERELEASELOOSE]:E2[T2.PRERELEASE]);if(!r||r[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let r=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[r];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(n){let o=[n,r];i===!1&&(o=[n]),NT(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}},Eo=cbe,CW=Eo,dbe=(t,e,n=!1)=>{if(t instanceof CW)return t;try{return new CW(t,e)}catch(i){if(!n)return null;throw i}},m0=dbe,ube=m0,fbe=(t,e)=>{let n=ube(t,e);return n?n.version:null},hbe=fbe,pbe=m0,gbe=(t,e)=>{let n=pbe(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null},mbe=gbe,EW=Eo,vbe=(t,e,n,i,r)=>{typeof n=="string"&&(r=i,i=n,n=void 0);try{return new EW(t instanceof EW?t.version:t,n).inc(e,i,r).version}catch{return null}},ybe=vbe,TW=m0,bbe=(t,e)=>{let n=TW(t,null,!0),i=TW(e,null,!0),r=n.compare(i);if(r===0)return null;let o=r>0,a=o?n:i,s=o?i:n,l=!!a.prerelease.length;if(s.prerelease.length&&!l){if(!s.patch&&!s.minor)return"major";if(s.compareMain(a)===0)return s.minor&&!s.patch?"minor":"patch"}let c=l?"pre":"";return n.major!==i.major?c+"major":n.minor!==i.minor?c+"minor":n.patch!==i.patch?c+"patch":"prerelease"},wbe=bbe,kbe=Eo,xbe=(t,e)=>new kbe(t,e).major,_be=xbe,Obe=Eo,Sbe=(t,e)=>new Obe(t,e).minor,Cbe=Sbe,Ebe=Eo,Tbe=(t,e)=>new Ebe(t,e).patch,Mbe=Tbe,Nbe=m0,Pbe=(t,e)=>{let n=Nbe(t,e);return n&&n.prerelease.length?n.prerelease:null},Abe=Pbe,MW=Eo,$be=(t,e,n)=>new MW(t,n).compare(new MW(e,n)),Zs=$be,Dbe=Zs,Ibe=(t,e,n)=>Dbe(e,t,n),Lbe=Ibe,jbe=Zs,Rbe=(t,e)=>jbe(t,e,!0),Fbe=Rbe,NW=Eo,zbe=(t,e,n)=>{let i=new NW(t,n),r=new NW(e,n);return i.compare(r)||i.compareBuild(r)},VA=zbe,Qbe=VA,Wbe=(t,e)=>t.sort((n,i)=>Qbe(n,i,e)),Bbe=Wbe,Hbe=VA,Zbe=(t,e)=>t.sort((n,i)=>Hbe(i,n,e)),qbe=Zbe,Ube=Zs,Vbe=(t,e,n)=>Ube(t,e,n)>0,c4=Vbe,Ybe=Zs,Xbe=(t,e,n)=>Ybe(t,e,n)<0,YA=Xbe,Gbe=Zs,Kbe=(t,e,n)=>Gbe(t,e,n)===0,JK=Kbe,Jbe=Zs,ewe=(t,e,n)=>Jbe(t,e,n)!==0,eJ=ewe,twe=Zs,nwe=(t,e,n)=>twe(t,e,n)>=0,XA=nwe,iwe=Zs,rwe=(t,e,n)=>iwe(t,e,n)<=0,GA=rwe,owe=JK,awe=eJ,swe=c4,lwe=XA,cwe=YA,dwe=GA,uwe=(t,e,n,i)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return owe(t,n,i);case"!=":return awe(t,n,i);case">":return swe(t,n,i);case">=":return lwe(t,n,i);case"<":return cwe(t,n,i);case"<=":return dwe(t,n,i);default:throw new TypeError(`Invalid operator: ${e}`)}},tJ=uwe,fwe=Eo,hwe=m0,{safeRe:M2,t:N2}=Cw,pwe=(t,e)=>{if(t instanceof fwe)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?M2[N2.COERCEFULL]:M2[N2.COERCE]);else{let l=e.includePrerelease?M2[N2.COERCERTLFULL]:M2[N2.COERCERTL],c;for(;(c=l.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||c.index+c[0].length!==n.index+n[0].length)&&(n=c),l.lastIndex=c.index+c[1].length+c[2].length;l.lastIndex=-1}if(n===null)return null;let i=n[2],r=n[3]||"0",o=n[4]||"0",a=e.includePrerelease&&n[5]?`-${n[5]}`:"",s=e.includePrerelease&&n[6]?`+${n[6]}`:"";return hwe(`${i}.${r}.${o}${a}${s}`,e)},gwe=pwe,KM=class{constructor(){this.max=1e3,this.map=new Map}get(e){let n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,n)}return this}},mwe=KM,PT,PW;function qs(){if(PW)return PT;PW=1;let t=/\s+/g;class e{constructor(R,U){if(U=r(U),R instanceof e)return R.loose===!!U.loose&&R.includePrerelease===!!U.includePrerelease?R:new e(R.raw,U);if(R instanceof o)return this.raw=R.value,this.set=[[R]],this.formatted=void 0,this;if(this.options=U,this.loose=!!U.loose,this.includePrerelease=!!U.includePrerelease,this.raw=R.trim().replace(t," "),this.set=this.raw.split("||").map(V=>this.parseRange(V.trim())).filter(V=>V.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let V=this.set[0];if(this.set=this.set.filter(K=>!b(K[0])),this.set.length===0)this.set=[V];else if(this.set.length>1){for(let K of this.set)if(K.length===1&&x(K[0])){this.set=[K];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let R=0;R0&&(this.formatted+="||");let U=this.set[R];for(let V=0;V0&&(this.formatted+=" "),this.formatted+=U[V].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(R){let U=((this.options.includePrerelease&&g)|(this.options.loose&&m))+":"+R,V=i.get(U);if(V)return V;let K=this.options.loose,te=K?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];R=R.replace(te,H(this.options.includePrerelease)),a("hyphen replace",R),R=R.replace(l[c.COMPARATORTRIM],d),a("comparator trim",R),R=R.replace(l[c.TILDETRIM],f),a("tilde trim",R),R=R.replace(l[c.CARETTRIM],h),a("caret trim",R);let oe=R.split(" ").map(ae=>O(ae,this.options)).join(" ").split(/\s+/).map(ae=>j(ae,this.options));K&&(oe=oe.filter(ae=>(a("loose invalid filter",ae,this.options),!!ae.match(l[c.COMPARATORLOOSE])))),a("range list",oe);let le=new Map,q=oe.map(ae=>new o(ae,this.options));for(let ae of q){if(b(ae))return[ae];le.set(ae.value,ae)}le.size>1&&le.has("")&&le.delete("");let z=[...le.values()];return i.set(U,z),z}intersects(R,U){if(!(R instanceof e))throw new TypeError("a Range is required");return this.set.some(V=>_(V,U)&&R.set.some(K=>_(K,U)&&V.every(te=>K.every(oe=>te.intersects(oe,U)))))}test(R){if(!R)return!1;if(typeof R=="string")try{R=new s(R,this.options)}catch{return!1}for(let U=0;UB.value==="<0.0.0-0",x=B=>B.value==="",_=(B,R)=>{let U=!0,V=B.slice(),K=V.pop();for(;U&&V.length;)U=V.every(te=>K.intersects(te,R)),K=V.pop();return U},O=(B,R)=>(B=B.replace(l[c.BUILD],""),a("comp",B,R),B=M(B,R),a("caret",B),B=E(B,R),a("tildes",B),B=F(B,R),a("xrange",B),B=Z(B,R),a("stars",B),B),S=B=>!B||B.toLowerCase()==="x"||B==="*",E=(B,R)=>B.trim().split(/\s+/).map(U=>T(U,R)).join(" "),T=(B,R)=>{let U=R.loose?l[c.TILDELOOSE]:l[c.TILDE];return B.replace(U,(V,K,te,oe,le)=>{a("tilde",B,V,K,te,oe,le);let q;return S(K)?q="":S(te)?q=`>=${K}.0.0 <${+K+1}.0.0-0`:S(oe)?q=`>=${K}.${te}.0 <${K}.${+te+1}.0-0`:le?(a("replaceTilde pr",le),q=`>=${K}.${te}.${oe}-${le} <${K}.${+te+1}.0-0`):q=`>=${K}.${te}.${oe} <${K}.${+te+1}.0-0`,a("tilde return",q),q})},M=(B,R)=>B.trim().split(/\s+/).map(U=>I(U,R)).join(" "),I=(B,R)=>{a("caret",B,R);let U=R.loose?l[c.CARETLOOSE]:l[c.CARET],V=R.includePrerelease?"-0":"";return B.replace(U,(K,te,oe,le,q)=>{a("caret",B,K,te,oe,le,q);let z;return S(te)?z="":S(oe)?z=`>=${te}.0.0${V} <${+te+1}.0.0-0`:S(le)?te==="0"?z=`>=${te}.${oe}.0${V} <${te}.${+oe+1}.0-0`:z=`>=${te}.${oe}.0${V} <${+te+1}.0.0-0`:q?(a("replaceCaret pr",q),te==="0"?oe==="0"?z=`>=${te}.${oe}.${le}-${q} <${te}.${oe}.${+le+1}-0`:z=`>=${te}.${oe}.${le}-${q} <${te}.${+oe+1}.0-0`:z=`>=${te}.${oe}.${le}-${q} <${+te+1}.0.0-0`):(a("no pr"),te==="0"?oe==="0"?z=`>=${te}.${oe}.${le}${V} <${te}.${oe}.${+le+1}-0`:z=`>=${te}.${oe}.${le}${V} <${te}.${+oe+1}.0-0`:z=`>=${te}.${oe}.${le} <${+te+1}.0.0-0`),a("caret return",z),z})},F=(B,R)=>(a("replaceXRanges",B,R),B.split(/\s+/).map(U=>W(U,R)).join(" ")),W=(B,R)=>{B=B.trim();let U=R.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return B.replace(U,(V,K,te,oe,le,q)=>{a("xRange",B,V,K,te,oe,le,q);let z=S(te),ae=z||S(oe),ue=ae||S(le),he=ue;return K==="="&&he&&(K=""),q=R.includePrerelease?"-0":"",z?K===">"||K==="<"?V="<0.0.0-0":V="*":K&&he?(ae&&(oe=0),le=0,K===">"?(K=">=",ae?(te=+te+1,oe=0,le=0):(oe=+oe+1,le=0)):K==="<="&&(K="<",ae?te=+te+1:oe=+oe+1),K==="<"&&(q="-0"),V=`${K+te}.${oe}.${le}${q}`):ae?V=`>=${te}.0.0${q} <${+te+1}.0.0-0`:ue&&(V=`>=${te}.${oe}.0${q} <${te}.${+oe+1}.0-0`),a("xRange return",V),V})},Z=(B,R)=>(a("replaceStars",B,R),B.trim().replace(l[c.STAR],"")),j=(B,R)=>(a("replaceGTE0",B,R),B.trim().replace(l[R.includePrerelease?c.GTE0PRE:c.GTE0],"")),H=B=>(R,U,V,K,te,oe,le,q,z,ae,ue,he)=>(S(V)?U="":S(K)?U=`>=${V}.0.0${B?"-0":""}`:S(te)?U=`>=${V}.${K}.0${B?"-0":""}`:oe?U=`>=${U}`:U=`>=${U}${B?"-0":""}`,S(z)?q="":S(ae)?q=`<${+z+1}.0.0-0`:S(ue)?q=`<${z}.${+ae+1}.0-0`:he?q=`<=${z}.${ae}.${ue}-${he}`:B?q=`<${z}.${ae}.${+ue+1}-0`:q=`<=${q}`,`${U} ${q}`.trim()),X=(B,R,U)=>{for(let V=0;V0){let K=B[V].semver;if(K.major===R.major&&K.minor===R.minor&&K.patch===R.patch)return!0}return!1}return!0};return PT}var AT,AW;function d4(){if(AW)return AT;AW=1;let t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(d,f){if(f=n(f),d instanceof e){if(d.loose===!!f.loose)return d;d=d.value}d=d.trim().split(/\s+/).join(" "),a("comparator",d,f),this.options=f,this.loose=!!f.loose,this.parse(d),this.semver===t?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(d){let f=this.options.loose?i[r.COMPARATORLOOSE]:i[r.COMPARATOR],h=d.match(f);if(!h)throw new TypeError(`Invalid comparator: ${d}`);this.operator=h[1]!==void 0?h[1]:"",this.operator==="="&&(this.operator=""),h[2]?this.semver=new s(h[2],this.options.loose):this.semver=t}toString(){return this.value}test(d){if(a("Comparator.test",d,this.options.loose),this.semver===t||d===t)return!0;if(typeof d=="string")try{d=new s(d,this.options)}catch{return!1}return o(d,this.operator,this.semver,this.options)}intersects(d,f){if(!(d instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(d.value,f).test(this.value):d.operator===""?d.value===""?!0:new l(this.value,f).test(d.semver):(f=n(f),f.includePrerelease&&(this.value==="<0.0.0-0"||d.value==="<0.0.0-0")||!f.includePrerelease&&(this.value.startsWith("<0.0.0")||d.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&d.operator.startsWith(">")||this.operator.startsWith("<")&&d.operator.startsWith("<")||this.semver.version===d.semver.version&&this.operator.includes("=")&&d.operator.includes("=")||o(this.semver,"<",d.semver,f)&&this.operator.startsWith(">")&&d.operator.startsWith("<")||o(this.semver,">",d.semver,f)&&this.operator.startsWith("<")&&d.operator.startsWith(">")))}}AT=e;let n=UA,{safeRe:i,t:r}=Cw,o=tJ,a=l4,s=Eo,l=qs();return AT}var vwe=qs(),ywe=(t,e,n)=>{try{e=new vwe(e,n)}catch{return!1}return e.test(t)},u4=ywe,bwe=qs(),wwe=(t,e)=>new bwe(t,e).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" ")),kwe=wwe,xwe=Eo,_we=qs(),Owe=(t,e,n)=>{let i=null,r=null,o=null;try{o=new _we(e,n)}catch{return null}return t.forEach(a=>{o.test(a)&&(!i||r.compare(a)===-1)&&(i=a,r=new xwe(i,n))}),i},Swe=Owe,Cwe=Eo,Ewe=qs(),Twe=(t,e,n)=>{let i=null,r=null,o=null;try{o=new Ewe(e,n)}catch{return null}return t.forEach(a=>{o.test(a)&&(!i||r.compare(a)===1)&&(i=a,r=new Cwe(i,n))}),i},Mwe=Twe,$T=Eo,Nwe=qs(),$W=c4,Pwe=(t,e)=>{t=new Nwe(t,e);let n=new $T("0.0.0");if(t.test(n)||(n=new $T("0.0.0-0"),t.test(n)))return n;n=null;for(let i=0;i{let s=new $T(a.semver.version);switch(a.operator){case">":s.prerelease.length===0?s.patch++:s.prerelease.push(0),s.raw=s.format();case"":case">=":(!o||$W(s,o))&&(o=s);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),o&&(!n||$W(n,o))&&(n=o)}return n&&t.test(n)?n:null},Awe=Pwe,$we=qs(),Dwe=(t,e)=>{try{return new $we(t,e).range||"*"}catch{return null}},Iwe=Dwe,Lwe=Eo,nJ=d4(),{ANY:jwe}=nJ,Rwe=qs(),Fwe=u4,DW=c4,IW=YA,zwe=GA,Qwe=XA,Wwe=(t,e,n,i)=>{t=new Lwe(t,i),e=new Rwe(e,i);let r,o,a,s,l;switch(n){case">":r=DW,o=zwe,a=IW,s=">",l=">=";break;case"<":r=IW,o=Qwe,a=DW,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Fwe(t,e,i))return!1;for(let c=0;c{g.semver===jwe&&(g=new nJ(">=0.0.0")),f=f||g,h=h||g,r(g.semver,f.semver,i)?f=g:a(g.semver,h.semver,i)&&(h=g)}),f.operator===s||f.operator===l||(!h.operator||h.operator===s)&&o(t,h.semver)||h.operator===l&&a(t,h.semver))return!1}return!0},KA=Wwe,Bwe=KA,Hwe=(t,e,n)=>Bwe(t,e,">",n),Zwe=Hwe,qwe=KA,Uwe=(t,e,n)=>qwe(t,e,"<",n),Vwe=Uwe,LW=qs(),Ywe=(t,e,n)=>(t=new LW(t,n),e=new LW(e,n),t.intersects(e,n)),Xwe=Ywe,Gwe=u4,Kwe=Zs,Jwe=(t,e,n)=>{let i=[],r=null,o=null,a=t.sort((d,f)=>Kwe(d,f,n));for(let d of a)Gwe(d,e,n)?(o=d,r||(r=d)):(o&&i.push([r,o]),o=null,r=null);r&&i.push([r,null]);let s=[];for(let[d,f]of i)d===f?s.push(d):!f&&d===a[0]?s.push("*"):f?d===a[0]?s.push(`<=${f}`):s.push(`${d} - ${f}`):s.push(`>=${d}`);let l=s.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{if(t===e)return!0;t=new jW(t,n),e=new jW(e,n);let i=!1;e:for(let r of t.set){for(let o of e.set){let a=nke(r,o,n);if(i=i||a!==null,a)continue e}if(i)return!1}return!0},tke=[new JA(">=0.0.0-0")],RW=[new JA(">=0.0.0")],nke=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===DT){if(e.length===1&&e[0].semver===DT)return!0;n.includePrerelease?t=tke:t=RW}if(e.length===1&&e[0].semver===DT){if(n.includePrerelease)return!0;e=RW}let i=new Set,r,o;for(let g of t)g.operator===">"||g.operator===">="?r=FW(r,g,n):g.operator==="<"||g.operator==="<="?o=zW(o,g,n):i.add(g.semver);if(i.size>1)return null;let a;if(r&&o&&(a=e$(r.semver,o.semver,n),a>0||a===0&&(r.operator!==">="||o.operator!=="<=")))return null;for(let g of i){if(r&&!uv(g,String(r),n)||o&&!uv(g,String(o),n))return null;for(let m of e)if(!uv(g,String(m),n))return!1;return!0}let s,l,c,d,f=o&&!n.includePrerelease&&o.semver.prerelease.length?o.semver:!1,h=r&&!n.includePrerelease&&r.semver.prerelease.length?r.semver:!1;f&&f.prerelease.length===1&&o.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let g of e){if(d=d||g.operator===">"||g.operator===">=",c=c||g.operator==="<"||g.operator==="<=",r){if(h&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===h.major&&g.semver.minor===h.minor&&g.semver.patch===h.patch&&(h=!1),g.operator===">"||g.operator===">="){if(s=FW(r,g,n),s===g&&s!==r)return!1}else if(r.operator===">="&&!uv(r.semver,String(g),n))return!1}if(o){if(f&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===f.major&&g.semver.minor===f.minor&&g.semver.patch===f.patch&&(f=!1),g.operator==="<"||g.operator==="<="){if(l=zW(o,g,n),l===g&&l!==o)return!1}else if(o.operator==="<="&&!uv(o.semver,String(g),n))return!1}if(!g.operator&&(o||r)&&a!==0)return!1}return!(r&&c&&!o&&a!==0||o&&d&&!r&&a!==0||h||f)},FW=(t,e,n)=>{if(!t)return e;let i=e$(t.semver,e.semver,n);return i>0?t:i<0||e.operator===">"&&t.operator===">="?e:t},zW=(t,e,n)=>{if(!t)return e;let i=e$(t.semver,e.semver,n);return i<0?t:i>0||e.operator==="<"&&t.operator==="<="?e:t},ike=eke,IT=Cw,QW=s4,rke=Eo,WW=KK,oke=m0,ake=hbe,ske=mbe,lke=ybe,cke=wbe,dke=_be,uke=Cbe,fke=Mbe,hke=Abe,pke=Zs,gke=Lbe,mke=Fbe,vke=VA,yke=Bbe,bke=qbe,wke=c4,kke=YA,xke=JK,_ke=eJ,Oke=XA,Ske=GA,Cke=tJ,Eke=gwe,Tke=d4(),Mke=qs(),Nke=u4,Pke=kwe,Ake=Swe,$ke=Mwe,Dke=Awe,Ike=Iwe,Lke=KA,jke=Zwe,Rke=Vwe,Fke=Xwe,zke=Jwe,Qke=ike,f4={parse:oke,valid:ake,clean:ske,inc:lke,diff:cke,major:dke,minor:uke,patch:fke,prerelease:hke,compare:pke,rcompare:gke,compareLoose:mke,compareBuild:vke,sort:yke,rsort:bke,gt:wke,lt:kke,eq:xke,neq:_ke,gte:Oke,lte:Ske,cmp:Cke,coerce:Eke,Comparator:Tke,Range:Mke,satisfies:Nke,toComparators:Pke,maxSatisfying:Ake,minSatisfying:$ke,minVersion:Dke,validRange:Ike,outside:Lke,gtr:jke,ltr:Rke,intersects:Fke,simplifyRange:zke,subset:Qke,SemVer:rke,re:IT.re,src:IT.src,tokens:IT.t,SEMVER_SPEC_VERSION:QW.SEMVER_SPEC_VERSION,RELEASE_TYPES:QW.RELEASE_TYPES,compareIdentifiers:WW.compareIdentifiers,rcompareIdentifiers:WW.rcompareIdentifiers},BW=f4,Wke=function(t="",{ghostVersion:e="4.0",type:n="mobiledoc"}={}){let i=BW.coerce(e);return typeof t!="string"||(t||"").trim()===""?"":BW.satisfies(i,"<4.x")?n==="markdown"?t.replace(/[^\w]/g,"").toLowerCase():t.replace(/[<>&"?]/g,"").trim().replace(/[^\w]/g,"-").replace(/-{2,}/g,"-").toLowerCase():encodeURIComponent(t.trim().toLowerCase().replace(/[\][!"#$%&'()*+,./:;<=>?@\\^_{|}~]/g,"").replace(/\s+/g,"-").replace(/^-|-{2,}|-$/g,""))},Bke={slugify:Wke},Hke=Bke,LT,HW;function MO(){if(HW)return LT;HW=1;function t(c,d,f,h){let g=Number(c[d].meta.id+1).toString(),m="";return typeof h.docId=="string"&&(m=`-${h.docId}-`),m+g}function e(c,d){let f=Number(c[d].meta.id+1).toString();return c[d].meta.subId>0&&(f+=`:${c[d].meta.subId}`),`[${f}]`}function n(c,d,f,h,g){let m=g.rules.footnote_anchor_name(c,d,f,h,g),b=g.rules.footnote_caption(c,d,f,h,g),x=m;return c[d].meta.subId>0&&(x+=`:${c[d].meta.subId}`),`${b}`}function i(c,d,f){return(f.xhtmlOut?`
`:`
`)+`
    `}function r(){return`
`}function o(c,d,f,h,g){let m=g.rules.footnote_anchor_name(c,d,f,h,g);return c[d].meta.subId>0&&(m+=`:${c[d].meta.subId}`),`
  • `}function a(){return`
  • `}function s(c,d,f,h,g){let m=g.rules.footnote_anchor_name(c,d,f,h,g);return c[d].meta.subId>0&&(m+=`:${c[d].meta.subId}`),` \u21A9\uFE0E`}function l(c){let d=c.helpers.parseLinkLabel,f=c.utils.isSpace;c.renderer.rules.footnote_ref=n,c.renderer.rules.footnote_block_open=i,c.renderer.rules.footnote_block_close=r,c.renderer.rules.footnote_open=o,c.renderer.rules.footnote_close=a,c.renderer.rules.footnote_anchor=s,c.renderer.rules.footnote_caption=e,c.renderer.rules.footnote_anchor_name=t;function h(x,_,O,S){let E=x.bMarks[_]+x.tShift[_],T=x.eMarks[_];if(E+4>T||x.src.charCodeAt(E)!==91||x.src.charCodeAt(E+1)!==94)return!1;let M;for(M=E+2;M=T||x.src.charCodeAt(++M)!==58)return!1;if(S)return!0;M++,x.env.footnotes||(x.env.footnotes={}),x.env.footnotes.refs||(x.env.footnotes.refs={});let I=x.src.slice(E+2,M-2);x.env.footnotes.refs[`:${I}`]=-1;let F=new x.Token("footnote_reference_open","",1);F.meta={label:I},F.level=x.level++,x.tokens.push(F);let W=x.bMarks[_],Z=x.tShift[_],j=x.sCount[_],H=x.parentType,X=M,B=x.sCount[_]+M-(x.bMarks[_]+x.tShift[_]),R=B;for(;M=O||x.src.charCodeAt(S)!==94||x.src.charCodeAt(S+1)!==91)return!1;let E=S+2,T=d(x,S+1);if(T<0)return!1;if(!_){x.env.footnotes||(x.env.footnotes={}),x.env.footnotes.list||(x.env.footnotes.list=[]);let M=x.env.footnotes.list.length,I=[];x.md.inline.parse(x.src.slice(E,T),x.md,x.env,I);let F=x.push("footnote_ref","",0);F.meta={id:M},x.env.footnotes.list[M]={content:x.src.slice(E,T),tokens:I}}return x.pos=T+1,x.posMax=O,!0}function m(x,_){let O=x.posMax,S=x.pos;if(S+3>O||!x.env.footnotes||!x.env.footnotes.refs||x.src.charCodeAt(S)!==91||x.src.charCodeAt(S+1)!==94)return!1;let E;for(E=S+2;E=O)return!1;E++;let T=x.src.slice(S+2,E-1);if(typeof x.env.footnotes.refs[`:${T}`]>"u")return!1;if(!_){x.env.footnotes.list||(x.env.footnotes.list=[]);let M;x.env.footnotes.refs[`:${T}`]<0?(M=x.env.footnotes.list.length,x.env.footnotes.list[M]={label:T,count:0},x.env.footnotes.refs[`:${T}`]=M):M=x.env.footnotes.refs[`:${T}`];let I=x.env.footnotes.list[M].count;x.env.footnotes.list[M].count++;let F=x.push("footnote_ref","",0);F.meta={id:M,subId:I,label:T}}return x.pos=E,x.posMax=O,!0}function b(x){let _,O,S,E=!1,T={};if(!x.env.footnotes||(x.tokens=x.tokens.filter(function(I){return I.type==="footnote_reference_open"?(E=!0,O=[],S=I.meta.label,!1):I.type==="footnote_reference_close"?(E=!1,T[":"+S]=O,!1):(E&&O.push(I),!E)}),!x.env.footnotes.list))return;let M=x.env.footnotes.list;x.tokens.push(new x.Token("footnote_block_open","",1));for(let I=0,F=M.length;I0?M[I].count:1;for(let H=0;H=f)return!1;for(s=1,a=n.src.charCodeAt(++d);a===35&&d6?!1:(o||(f=n.skipCharsBack(f,32,d),l=n.skipCharsBack(f,35,d),l>d&&n.src.charCodeAt(l-1)===32&&(f=l),n.line=i+1,c=n.push("heading_open","h"+String(s),1),c.markup="########".slice(0,s),c.map=[i,n.line],c=n.push("inline","",0),c.content=n.src.slice(d,f).trim(),c.map=[i,n.line],c.children=[],c=n.push("heading_close","h"+String(s),-1),c.markup="########".slice(0,s)),!0)}t.block.ruler.at("heading",e,{alt:["paragraph","reference","blockquote"]})}),ZW}var jT,UW;function PO(){if(UW)return jT;UW=1;function t(e){function n(r,o){let a=r.pos,s=r.src.charCodeAt(a);if(o||s!==61)return!1;let l=r.scanDelims(r.pos,!0),c=l.length,d=String.fromCharCode(s);if(c<2)return!1;if(c%2){let f=r.push("text","",0);f.content=d,c--}for(let f=0;f0&&(W=T[0]),W instanceof Error)throw W;var Z=new Error("Unhandled error."+(W?" ("+W.message+")":""));throw Z.context=W,Z}var j=F[E];if(j===void 0)return!1;if(typeof j=="function")e(j,this,T);else for(var H=j.length,X=m(j,H),M=0;M0&&Z.length>F&&!Z.warned){Z.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+Z.length+" "+String(T)+" listeners added. Use emitter.setMaxListeners() to increase limit");j.name="MaxListenersExceededWarning",j.emitter=E,j.type=T,j.count=Z.length,i(j)}return E}o.prototype.addListener=function(E,T){return c(this,E,T,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(E,T){return c(this,E,T,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(E,T,M){var I={fired:!1,wrapFn:void 0,target:E,type:T,listener:M},F=d.bind(I);return F.listener=M,I.wrapFn=F,F}o.prototype.once=function(E,T){return s(T),this.on(E,f(this,E,T)),this},o.prototype.prependOnceListener=function(E,T){return s(T),this.prependListener(E,f(this,E,T)),this},o.prototype.removeListener=function(E,T){var M,I,F,W,Z;if(s(T),I=this._events,I===void 0)return this;if(M=I[E],M===void 0)return this;if(M===T||M.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete I[E],I.removeListener&&this.emit("removeListener",E,M.listener||T));else if(typeof M!="function"){for(F=-1,W=M.length-1;W>=0;W--)if(M[W]===T||M[W].listener===T){Z=M[W].listener,F=W;break}if(F<0)return this;F===0?M.shift():b(M,F),M.length===1&&(I[E]=M[0]),I.removeListener!==void 0&&this.emit("removeListener",E,Z||T)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(E){var T,M,I;if(M=this._events,M===void 0)return this;if(M.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):M[E]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[E]),this;if(arguments.length===0){var F=Object.keys(M),W;for(I=0;I=0;I--)this.removeListener(E,T[I]);return this};function h(E,T,M){var I=E._events;if(I===void 0)return[];var F=I[T];return F===void 0?[]:typeof F=="function"?M?[F.listener||F]:[F]:M?x(F):m(F,F.length)}o.prototype.listeners=function(E){return h(this,E,!0)},o.prototype.rawListeners=function(E){return h(this,E,!1)},o.listenerCount=function(E,T){return typeof E.listenerCount=="function"?E.listenerCount(T):g.call(E,T)},o.prototype.listenerCount=g;function g(E){var T=this._events;if(T!==void 0){var M=T[E];if(typeof M=="function")return 1;if(M!==void 0)return M.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function m(E,T){for(var M=new Array(T),I=0;I=this.concurrency)return;if(this.jobs.length===0){this.pending===0&&s.call(this);return}var c=this,d=this.jobs.shift(),f=!0,h=this.session,g=null,m=!1,b=null,x=d.hasOwnProperty("timeout")?d.timeout:this.timeout;function _(S,E){f&&c.session===h&&(f=!1,c.pending--,g!==null&&(delete c.timers[g],clearTimeout(g)),S?c.emit("error",S,d):m===!1&&(b!==null&&(c.results[b]=Array.prototype.slice.call(arguments,1)),c.emit("success",E,d)),c.session===h&&(c.pending===0&&c.jobs.length===0?s.call(c):c.running&&c.start()))}x&&(g=setTimeout(function(){m=!0,c.listeners("timeout").length>0?c.emit("timeout",_,d):_()},x),this.timers[g]=g),this.results&&(b=this.results.length,this.results[b]=null),this.pending++,c.emit("start",d);var O=d(_);O&&O.then&&typeof O.then=="function"&&O.then(function(S){return _(null,S)}).catch(function(S){return _(S||!0)}),this.running&&this.jobs.length>0&&this.start()},n.prototype.stop=function(){this.running=!1},n.prototype.end=function(l){o.call(this),this.jobs.length=0,this.pending=0,s.call(this,l)};function o(){for(var l in this.timers){var c=this.timers[l];delete this.timers[l],clearTimeout(c)}}function a(l){var c=this;this.on("error",d),this.on("end",f);function d(h){c.end(h)}function f(h){c.removeListener("error",d),c.removeListener("end",f),l(h,this.results)}}function s(l){this.session++,this.running=!1,this.emit("end",l)}return P2.exports}var fv={},hv={},GW={},KW;function dr(){return KW||(KW=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.findBox=t.readUInt=t.readUInt32LE=t.readUInt32BE=t.readInt32LE=t.readUInt24LE=t.readUInt16LE=t.readUInt16BE=t.readInt16LE=t.toHexString=t.toUTF8String=void 0;let e=new TextDecoder,n=(b,x=0,_=b.length)=>e.decode(b.slice(x,_));t.toUTF8String=n;let i=(b,x=0,_=b.length)=>b.slice(x,_).reduce((O,S)=>O+("0"+S.toString(16)).slice(-2),"");t.toHexString=i;let r=(b,x=0)=>{let _=b[x]+b[x+1]*256;return _|(_&2**15)*131070};t.readInt16LE=r;let o=(b,x=0)=>b[x]*2**8+b[x+1];t.readUInt16BE=o;let a=(b,x=0)=>b[x]+b[x+1]*2**8;t.readUInt16LE=a;let s=(b,x=0)=>b[x]+b[x+1]*2**8+b[x+2]*2**16;t.readUInt24LE=s;let l=(b,x=0)=>b[x]+b[x+1]*2**8+b[x+2]*2**16+(b[x+3]<<24);t.readInt32LE=l;let c=(b,x=0)=>b[x]*2**24+b[x+1]*2**16+b[x+2]*2**8+b[x+3];t.readUInt32BE=c;let d=(b,x=0)=>b[x]+b[x+1]*2**8+b[x+2]*2**16+b[x+3]*2**24;t.readUInt32LE=d;let f={readUInt16BE:t.readUInt16BE,readUInt16LE:t.readUInt16LE,readUInt32BE:t.readUInt32BE,readUInt32LE:t.readUInt32LE};function h(b,x,_,O){_=_||0;let S=O?"BE":"LE",E="readUInt"+x+S;return f[E](b,_)}t.readUInt=h;function g(b,x){if(b.length-x<4)return;let _=(0,t.readUInt32BE)(b,x);if(!(b.length-x<_))return{name:(0,t.toUTF8String)(b,4+x,8+x),offset:x,size:_}}function m(b,x,_){for(;_(0,t.toUTF8String)(e,0,2)==="BM",calculate:e=>({height:Math.abs((0,t.readInt32LE)(e,22)),width:(0,t.readUInt32LE)(e,18)})},hv}var pv={},gv={},eB;function iJ(){if(eB)return gv;eB=1,Object.defineProperty(gv,"__esModule",{value:!0}),gv.ICO=void 0;let t=dr(),e=1,n=6,i=16;function r(a,s){let l=a[s];return l===0?256:l}function o(a,s){let l=n+s*i;return{height:r(a,l+1),width:r(a,l)}}return gv.ICO={validate(a){let s=(0,t.readUInt16LE)(a,0),l=(0,t.readUInt16LE)(a,4);return s!==0||l===0?!1:(0,t.readUInt16LE)(a,2)===e},calculate(a){let s=(0,t.readUInt16LE)(a,4),l=o(a,0);if(s===1)return l;let c=[l];for(let d=1;dt.ICO.calculate(i)},pv}var mv={},nB;function Kke(){if(nB)return mv;nB=1,Object.defineProperty(mv,"__esModule",{value:!0}),mv.DDS=void 0;let t=dr();return mv.DDS={validate:e=>(0,t.readUInt32LE)(e,0)===542327876,calculate:e=>({height:(0,t.readUInt32LE)(e,12),width:(0,t.readUInt32LE)(e,16)})},mv}var vv={},iB;function Jke(){if(iB)return vv;iB=1,Object.defineProperty(vv,"__esModule",{value:!0}),vv.GIF=void 0;let t=dr(),e=/^GIF8[79]a/;return vv.GIF={validate:n=>e.test((0,t.toUTF8String)(n,0,6)),calculate:n=>({height:(0,t.readUInt16LE)(n,8),width:(0,t.readUInt16LE)(n,6)})},vv}var yv={},rB;function exe(){if(rB)return yv;rB=1,Object.defineProperty(yv,"__esModule",{value:!0}),yv.HEIF=void 0;let t=dr(),e={avif:"avif",mif1:"heif",msf1:"heif",heic:"heic",heix:"heic",hevc:"heic",hevx:"heic"};return yv.HEIF={validate(n){let i=(0,t.toUTF8String)(n,4,8),r=(0,t.toUTF8String)(n,8,12);return i==="ftyp"&&r in e},calculate(n){let i=(0,t.findBox)(n,"meta",0),r=i&&(0,t.findBox)(n,"iprp",i.offset+12),o=r&&(0,t.findBox)(n,"ipco",r.offset+8),a=o&&(0,t.findBox)(n,"ispe",o.offset+8);if(a)return{height:(0,t.readUInt32BE)(n,a.offset+16),width:(0,t.readUInt32BE)(n,a.offset+12),type:(0,t.toUTF8String)(n,8,12)};throw new TypeError("Invalid HEIF, no size found")}},yv}var bv={},oB;function txe(){if(oB)return bv;oB=1,Object.defineProperty(bv,"__esModule",{value:!0}),bv.ICNS=void 0;let t=dr(),e=8,n=4,i=4,r={ICON:32,"ICN#":32,"icm#":16,icm4:16,icm8:16,"ics#":16,ics4:16,ics8:16,is32:16,s8mk:16,icp4:16,icl4:32,icl8:32,il32:32,l8mk:32,icp5:32,ic11:32,ich4:48,ich8:48,ih32:48,h8mk:48,icp6:64,ic12:32,it32:128,t8mk:128,ic07:128,ic08:256,ic13:256,ic09:512,ic14:512,ic10:1024};function o(s,l){let c=l+i;return[(0,t.toUTF8String)(s,l,c),(0,t.readUInt32BE)(s,c)]}function a(s){let l=r[s];return{width:l,height:l,type:s}}return bv.ICNS={validate:s=>(0,t.toUTF8String)(s,0,4)==="icns",calculate(s){let l=s.length,c=(0,t.readUInt32BE)(s,n),d=e,f=o(s,d),h=a(f[0]);if(d+=f[1],d===c)return h;let g={height:h.height,images:[h],width:h.width};for(;d(0,t.toHexString)(e,0,4)==="ff4fff51",calculate:e=>({height:(0,t.readUInt32BE)(e,12),width:(0,t.readUInt32BE)(e,8)})},wv}var kv={},sB;function ixe(){if(sB)return kv;sB=1,Object.defineProperty(kv,"__esModule",{value:!0}),kv.JP2=void 0;let t=dr();return kv.JP2={validate(e){if((0,t.readUInt32BE)(e,4)!==1783636e3||(0,t.readUInt32BE)(e,0)<1)return!1;let n=(0,t.findBox)(e,"ftyp",0);return n?(0,t.readUInt32BE)(e,n.offset+4)===1718909296:!1},calculate(e){let n=(0,t.findBox)(e,"jp2h",0),i=n&&(0,t.findBox)(e,"ihdr",n.offset+8);if(i)return{height:(0,t.readUInt32BE)(e,i.offset+8),width:(0,t.readUInt32BE)(e,i.offset+12)};throw new TypeError("Unsupported JPEG 2000 format")}},kv}var xv={},lB;function rxe(){if(lB)return xv;lB=1,Object.defineProperty(xv,"__esModule",{value:!0}),xv.JPG=void 0;let t=dr(),e="45786966",n=2,i=6,r=2,o="4d4d",a="4949",s=12,l=2;function c(m){return(0,t.toHexString)(m,2,6)===e}function d(m,b){return{height:(0,t.readUInt16BE)(m,b),width:(0,t.readUInt16BE)(m,b+2)}}function f(m,b){let x=i+8,_=(0,t.readUInt)(m,16,x,b);for(let O=0;O<_;O++){let S=x+l+O*s,E=S+s;if(S>m.length)return;let T=m.slice(S,E);if((0,t.readUInt)(T,16,0,b)===274)return(0,t.readUInt)(T,16,2,b)!==3||(0,t.readUInt)(T,32,4,b)!==1?void 0:(0,t.readUInt)(T,16,8,b)}}function h(m,b){let x=m.slice(n,b),_=(0,t.toHexString)(x,i,i+r),O=_===o;if(O||_===a)return f(x,O)}function g(m,b){if(b>m.length)throw new TypeError("Corrupt JPG, exceeded buffer limits")}return xv.JPG={validate:m=>(0,t.toHexString)(m,0,2)==="ffd8",calculate(m){m=m.slice(4);let b,x;for(;m.length;){let _=(0,t.readUInt16BE)(m,0);if(m[_]!==255){m=m.slice(1);continue}if(c(m)&&(b=h(m,_)),g(m,_),x=m[_+1],x===192||x===193||x===194){let O=d(m,_+5);return b?{height:O.height,orientation:b,width:O.width}:O}m=m.slice(_+2)}throw new TypeError("Invalid JPG, no size found")}},xv}var _v={},cB;function oxe(){if(cB)return _v;cB=1,Object.defineProperty(_v,"__esModule",{value:!0}),_v.KTX=void 0;let t=dr();return _v.KTX={validate:e=>{let n=(0,t.toUTF8String)(e,1,7);return["KTX 11","KTX 20"].includes(n)},calculate:e=>{let n=e[5]===49?"ktx":"ktx2",i=n==="ktx"?36:20;return{height:(0,t.readUInt32LE)(e,i+4),width:(0,t.readUInt32LE)(e,i),type:n}}},_v}var Ov={},dB;function axe(){if(dB)return Ov;dB=1,Object.defineProperty(Ov,"__esModule",{value:!0}),Ov.PNG=void 0;let t=dr(),e=`PNG\r  `,n="IHDR",i="CgBI";return Ov.PNG={validate(r){if(e===(0,t.toUTF8String)(r,1,8)){let o=(0,t.toUTF8String)(r,12,16);if(o===i&&(o=(0,t.toUTF8String)(r,28,32)),o!==n)throw new TypeError("Invalid PNG");return!0}return!1},calculate(r){return(0,t.toUTF8String)(r,12,16)===i?{height:(0,t.readUInt32BE)(r,36),width:(0,t.readUInt32BE)(r,32)}:{height:(0,t.readUInt32BE)(r,20),width:(0,t.readUInt32BE)(r,16)}}},Ov}var Sv={},uB;function sxe(){if(uB)return Sv;uB=1,Object.defineProperty(Sv,"__esModule",{value:!0}),Sv.PNM=void 0;let t=dr(),e={P1:"pbm/ascii",P2:"pgm/ascii",P3:"ppm/ascii",P4:"pbm",P5:"pgm",P6:"ppm",P7:"pam",PF:"pfm"},n={default:i=>{let r=[];for(;i.length>0;){let o=i.shift();if(o[0]!=="#"){r=o.split(" ");break}}if(r.length===2)return{height:parseInt(r[1],10),width:parseInt(r[0],10)};throw new TypeError("Invalid PNM")},pam:i=>{let r={};for(;i.length>0;){let o=i.shift();if(o.length>16||o.charCodeAt(0)>128)continue;let[a,s]=o.split(" ");if(a&&s&&(r[a.toLowerCase()]=parseInt(s,10)),r.height&&r.width)break}if(r.height&&r.width)return{height:r.height,width:r.width};throw new TypeError("Invalid PAM")}};return Sv.PNM={validate:i=>(0,t.toUTF8String)(i,0,2)in e,calculate(i){let r=(0,t.toUTF8String)(i,0,2),o=e[r],a=(0,t.toUTF8String)(i,3).split(/[\r\n]+/);return(n[o]||n.default)(a)}},Sv}var Cv={},fB;function lxe(){if(fB)return Cv;fB=1,Object.defineProperty(Cv,"__esModule",{value:!0}),Cv.PSD=void 0;let t=dr();return Cv.PSD={validate:e=>(0,t.toUTF8String)(e,0,4)==="8BPS",calculate:e=>({height:(0,t.readUInt32BE)(e,14),width:(0,t.readUInt32BE)(e,18)})},Cv}var Ev={},hB;function cxe(){if(hB)return Ev;hB=1,Object.defineProperty(Ev,"__esModule",{value:!0}),Ev.SVG=void 0;let t=dr(),e=/"']|"[^"]*"|'[^']*')*>/,n={height:/\sheight=(['"])([^%]+?)\1/,root:e,viewbox:/\sviewBox=(['"])(.+?)\1/i,width:/\swidth=(['"])([^%]+?)\1/},i=2.54,r={in:96,cm:96/i,em:16,ex:8,m:96/i*100,mm:96/i/10,pc:96/72/12,pt:96/72,px:1},o=new RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(r).join("|")})?$`);function a(f){let h=o.exec(f);if(h)return Math.round(Number(h[1])*(r[h[2]]||1))}function s(f){let h=f.split(" ");return{height:a(h[3]),width:a(h[2])}}function l(f){let h=f.match(n.width),g=f.match(n.height),m=f.match(n.viewbox);return{height:g&&a(g[2]),viewbox:m&&s(m[2]),width:h&&a(h[2])}}function c(f){return{height:f.height,width:f.width}}function d(f,h){let g=h.width/h.height;return f.width?{height:Math.floor(f.width/g),width:f.width}:f.height?{height:f.height,width:Math.floor(f.height*g)}:{height:h.height,width:h.width}}return Ev.SVG={validate:f=>e.test((0,t.toUTF8String)(f,0,1e3)),calculate(f){let h=(0,t.toUTF8String)(f).match(n.root);if(h){let g=l(h[0]);if(g.width&&g.height)return c(g);if(g.viewbox)return d(g,g.viewbox)}throw new TypeError("Invalid SVG")}},Ev}var Tv={},pB;function dxe(){if(pB)return Tv;pB=1,Object.defineProperty(Tv,"__esModule",{value:!0}),Tv.TGA=void 0;let t=dr();return Tv.TGA={validate(e){return(0,t.readUInt16LE)(e,0)===0&&(0,t.readUInt16LE)(e,4)===0},calculate(e){return{height:(0,t.readUInt16LE)(e,14),width:(0,t.readUInt16LE)(e,12)}}},Tv}var Mv={},gB;function uxe(){if(gB)return Mv;gB=1,Object.defineProperty(Mv,"__esModule",{value:!0}),Mv.TIFF=void 0;let t=fb,e=dr();function n(l,c,d){let f=(0,e.readUInt)(l,32,4,d),h=1024,g=t.statSync(c).size;f+h>g&&(h=g-f-10);let m=new Uint8Array(h),b=t.openSync(c,"r");return t.readSync(b,m,0,h,f),t.closeSync(b),m.slice(2)}function i(l,c){let d=(0,e.readUInt)(l,16,8,c);return((0,e.readUInt)(l,16,10,c)<<16)+d}function r(l){if(l.length>24)return l.slice(12)}function o(l,c){let d={},f=l;for(;f&&f.length;){let h=(0,e.readUInt)(f,16,0,c),g=(0,e.readUInt)(f,16,2,c),m=(0,e.readUInt)(f,32,4,c);if(h===0)break;m===1&&(g===3||g===4)&&(d[h]=i(f,c)),f=r(f)}return d}function a(l){let c=(0,e.toUTF8String)(l,0,2);if(c==="II")return"LE";if(c==="MM")return"BE"}let s=["49492a00","4d4d002a"];return Mv.TIFF={validate:l=>s.includes((0,e.toHexString)(l,0,4)),calculate(l,c){if(!c)throw new TypeError("Tiff doesn't support buffer");let d=a(l)==="BE",f=n(l,c,d),h=o(f,d),g=h[256],m=h[257];if(!g||!m)throw new TypeError("Invalid Tiff. Missing tags");return{height:m,width:g}}},Mv}var Nv={},mB;function fxe(){if(mB)return Nv;mB=1,Object.defineProperty(Nv,"__esModule",{value:!0}),Nv.WEBP=void 0;let t=dr();function e(r){return{height:1+(0,t.readUInt24LE)(r,7),width:1+(0,t.readUInt24LE)(r,4)}}function n(r){return{height:1+((r[4]&15)<<10|r[3]<<2|(r[2]&192)>>6),width:1+((r[2]&63)<<8|r[1])}}function i(r){return{height:(0,t.readInt16LE)(r,8)&16383,width:(0,t.readInt16LE)(r,6)&16383}}return Nv.WEBP={validate(r){let o=(0,t.toUTF8String)(r,0,4)==="RIFF",a=(0,t.toUTF8String)(r,8,12)==="WEBP",s=(0,t.toUTF8String)(r,12,15)==="VP8";return o&&a&&s},calculate(r){let o=(0,t.toUTF8String)(r,12,16);if(r=r.slice(20,30),o==="VP8X"){let s=r[0],l=(s&192)===0,c=(s&1)===0;if(l&&c)return e(r);throw new TypeError("Invalid WebP")}if(o==="VP8 "&&r[0]!==47)return i(r);let a=(0,t.toHexString)(r,3,6);if(o==="VP8L"&&a!=="9d012a")return n(r);throw new TypeError("Invalid WebP")}},Nv}var vB;function rJ(){if(vB)return fv;vB=1,Object.defineProperty(fv,"__esModule",{value:!0}),fv.typeHandlers=void 0;let t=Xke(),e=Gke(),n=Kke(),i=Jke(),r=exe(),o=txe(),a=iJ(),s=nxe(),l=ixe(),c=rxe(),d=oxe(),f=axe(),h=sxe(),g=lxe(),m=cxe(),b=dxe(),x=uxe(),_=fxe();return fv.typeHandlers={bmp:t.BMP,cur:e.CUR,dds:n.DDS,gif:i.GIF,heif:r.HEIF,icns:o.ICNS,ico:a.ICO,j2c:s.J2C,jp2:l.JP2,jpg:c.JPG,ktx:d.KTX,png:f.PNG,pnm:h.PNM,psd:g.PSD,svg:m.SVG,tga:b.TGA,tiff:x.TIFF,webp:_.WEBP},fv}var Pv={},yB;function hxe(){if(yB)return Pv;yB=1,Object.defineProperty(Pv,"__esModule",{value:!0}),Pv.detector=void 0;let t=rJ(),e=Object.keys(t.typeHandlers),n={56:"psd",66:"bmp",68:"dds",71:"gif",73:"tiff",77:"tiff",82:"webp",105:"icns",137:"png",255:"jpg"};function i(r){let o=r[0];if(o in n){let s=n[o];if(s&&t.typeHandlers[s].validate(r))return s}let a=s=>t.typeHandlers[s].validate(r);return e.find(a)}return Pv.detector=i,Pv}var bB;function pxe(){return bB||(bB=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.types=e.setConcurrency=e.disableTypes=e.disableFS=e.imageSize=void 0;let n=fb,i=fb,r=Yke(),o=rJ(),a=hxe(),s=512*1024,l=new r.default({concurrency:100,autostart:!0}),c={disabledFS:!1,disabledTypes:[]};function d(_,O){let S=(0,a.detector)(_);if(typeof S<"u"){if(c.disabledTypes.indexOf(S)>-1)throw new TypeError("disabled file type: "+S);if(S in o.typeHandlers){let E=o.typeHandlers[S].calculate(_,O);if(E!==void 0)return E.type=E.type??S,E}}throw new TypeError("unsupported file type: "+S+" (file: "+O+")")}async function f(_){let O=await n.promises.open(_,"r");try{let{size:S}=await O.stat();if(S<=0)throw new Error("Empty file");let E=Math.min(S,s),T=new Uint8Array(E);return await O.read(T,0,E,0),T}finally{await O.close()}}function h(_){let O=n.openSync(_,"r");try{let{size:S}=n.fstatSync(O);if(S<=0)throw new Error("Empty file");let E=Math.min(S,s),T=new Uint8Array(E);return n.readSync(O,T,0,E,0),T}finally{n.closeSync(O)}}t.exports=e=g,e.default=g;function g(_,O){if(_ instanceof Uint8Array)return d(_);if(typeof _!="string"||c.disabledFS)throw new TypeError("invalid invocation. input should be a Uint8Array");let S=i.resolve(_);if(typeof O=="function")l.push(()=>f(S).then(E=>process.nextTick(O,null,d(E,S))).catch(O));else{let E=h(S);return d(E,S)}}e.imageSize=g;let m=_=>{c.disabledFS=_};e.disableFS=m;let b=_=>{c.disabledTypes=_};e.disableTypes=b;let x=_=>{l.concurrency=_};e.setConcurrency=x,e.types=Object.keys(o.typeHandlers)}(RT,RT.exports)),RT.exports}var zT,wB;function AO(){if(wB)return zT;wB=1;var t=pxe(),e=fb;function n(i,r){var o=i.renderer.rules.image;i.renderer.rules.image=function(a,s,l,c,d){var f=a[s];if(f.attrSet("loading","lazy"),r&&r.decoding===!0&&f.attrSet("decoding","async"),r&&r.base_path&&r.image_size===!0){let h=f.attrGet("src"),g=e.join(r.base_path,h),m=t(g);f.attrSet("width",m.width),f.attrSet("height",m.height)}return o(a,s,l,c,d)}}return zT=n,zT}var QT,kB;function $O(){if(kB)return QT;kB=1;let t=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function e(i,r){let o=i.posMax,a=i.pos;if(i.src.charCodeAt(a)!==126||r||a+2>=o)return!1;i.pos=a+1;let s=!1;for(;i.pos?@[\]^_`{|}~-])/g;function e(i,r){let o=i.posMax,a=i.pos;if(i.src.charCodeAt(a)!==94||r||a+2>=o)return!1;i.pos=a+1;let s=!1;for(;i.pos=0?g:1e3+g,(f-h)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},CB={};function Cxe(t,e={}){let n=JSON.stringify([t,e]),i=CB[n];return i||(i=new Intl.ListFormat(t,e),CB[n]=i),i}var n9={};function i9(t,e={}){let n=JSON.stringify([t,e]),i=n9[n];return i||(i=new Intl.DateTimeFormat(t,e),n9[n]=i),i}var r9={};function Exe(t,e={}){let n=JSON.stringify([t,e]),i=r9[n];return i||(i=new Intl.NumberFormat(t,e),r9[n]=i),i}var o9={};function Txe(t,e={}){let{base:n,...i}=e,r=JSON.stringify([t,i]),o=o9[r];return o||(o=new Intl.RelativeTimeFormat(t,e),o9[r]=o),o}var N_=null;function Mxe(){return N_||(N_=new Intl.DateTimeFormat().resolvedOptions().locale,N_)}var EB={};function Nxe(t){let e=EB[t];if(!e){let n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,EB[t]=e}return e}function Pxe(t){let e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));let n=t.indexOf("-u-");if(n===-1)return[t];{let i,r;try{i=i9(t).resolvedOptions(),r=t}catch{let s=t.substring(0,n);i=i9(s).resolvedOptions(),r=s}let{numberingSystem:o,calendar:a}=i;return[r,o,a]}}function Axe(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function $xe(t){let e=[];for(let n=1;n<=12;n++){let i=on.utc(2009,n,1);e.push(t(i))}return e}function Dxe(t){let e=[];for(let n=1;n<=7;n++){let i=on.utc(2016,11,13+n);e.push(t(i))}return e}function D2(t,e,n,i){let r=t.listingMode();return r==="error"?null:r==="en"?n(e):i(e)}function Ixe(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}var a9=class{constructor(e,n,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;let{padTo:r,floor:o,...a}=i;if(!n||Object.keys(a).length>0){let s={useGrouping:!1,...i};i.padTo>0&&(s.minimumIntegerDigits=i.padTo),this.inf=Exe(e,s)}}format(e){if(this.inf){let n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{let n=this.floor?Math.floor(e):o$(e,3);return Ci(n,this.padTo)}}},s9=class{constructor(e,n,i){this.opts=i,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let a=-1*(e.offset/60),s=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&Nu.create(s).valid?(r=s,this.dt=e):(r="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let o={...this.opts};o.timeZone=o.timeZone||r,this.dtf=i9(n,o)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){let i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:i}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},l9=class{constructor(e,n,i){this.opts={style:"long",...i},!n&&PJ()&&(this.rtf=Txe(e,i))}format(e,n){return this.rtf?this.rtf.format(e,n):i2e(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}},Lxe={firstDay:1,minimalDays:4,weekend:[6,7]},tn=class t{static fromOpts(e){return t.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,i,r,o=!1){let a=e||jn.defaultLocale,s=a||(o?"en-US":Mxe()),l=n||jn.defaultNumberingSystem,c=i||jn.defaultOutputCalendar,d=d9(r)||jn.defaultWeekSettings;return new t(s,l,c,d,a)}static resetCache(){N_=null,n9={},r9={},o9={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:i,weekSettings:r}={}){return t.create(e,n,i,r)}constructor(e,n,i,r,o){let[a,s,l]=Pxe(e);this.locale=a,this.numberingSystem=n||s||null,this.outputCalendar=i||l||null,this.weekSettings=r,this.intl=Axe(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Ixe(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,d9(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return D2(this,e,LJ,()=>{let i=n?{month:e,day:"numeric"}:{month:e},r=n?"format":"standalone";return this.monthsCache[r][e]||(this.monthsCache[r][e]=$xe(o=>this.extract(o,i,"month"))),this.monthsCache[r][e]})}weekdays(e,n=!1){return D2(this,e,FJ,()=>{let i=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=n?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=Dxe(o=>this.extract(o,i,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return D2(this,void 0,()=>zJ,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[on.utc(2016,11,13,9),on.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return D2(this,e,QJ,()=>{let n={era:e};return this.eraCache[e]||(this.eraCache[e]=[on.utc(-40,1,1),on.utc(2017,1,1)].map(i=>this.extract(i,n,"era"))),this.eraCache[e]})}extract(e,n,i){let r=this.dtFormatter(e,n),o=r.formatToParts(),a=o.find(s=>s.type.toLowerCase()===i);return a?a.value:null}numberFormatter(e={}){return new a9(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new s9(e,this.intl,n)}relFormatter(e={}){return new l9(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Cxe(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:AJ()?Nxe(this.locale):Lxe}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},HT=null,Ja=class t extends vh{static get utcInstance(){return HT===null&&(HT=new t(0)),HT}static instance(e){return e===0?t.utcInstance:new t(e)}static parseSpecifier(e){if(e){let n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(g4(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Cy(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Cy(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Cy(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},c9=class extends vh{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function eu(t,e){if(vt(t)||t===null)return e;if(t instanceof vh)return t;if(Wxe(t)){let n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?jO.instance:n==="utc"||n==="gmt"?Ja.utcInstance:Ja.parseSpecifier(n)||Nu.create(t)}else return pu(t)?Ja.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new c9(t)}var t$={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},TB={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},jxe=t$.hanidec.replace(/[\[|\]]/g,"").split("");function Rxe(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n=o&&i<=a&&(e+=i-o)}}return parseInt(e,10)}else return e}var Ng={};function Fxe(){Ng={}}function Ms({numberingSystem:t},e=""){let n=t||"latn";return Ng[n]||(Ng[n]={}),Ng[n][e]||(Ng[n][e]=new RegExp(`${t$[n]}${e}`)),Ng[n][e]}var MB=()=>Date.now(),NB="system",PB=null,AB=null,$B=null,DB=60,IB,LB=null,jn=class{static get now(){return MB}static set now(e){MB=e}static set defaultZone(e){NB=e}static get defaultZone(){return eu(NB,jO.instance)}static get defaultLocale(){return PB}static set defaultLocale(e){PB=e}static get defaultNumberingSystem(){return AB}static set defaultNumberingSystem(e){AB=e}static get defaultOutputCalendar(){return $B}static set defaultOutputCalendar(e){$B=e}static get defaultWeekSettings(){return LB}static set defaultWeekSettings(e){LB=d9(e)}static get twoDigitCutoffYear(){return DB}static set twoDigitCutoffYear(e){DB=e%100}static get throwOnInvalid(){return IB}static set throwOnInvalid(e){IB=e}static resetCaches(){tn.resetCache(),Nu.resetCache(),on.resetCache(),Fxe()}},ya=class{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},SJ=[0,31,59,90,120,151,181,212,243,273,304,334],CJ=[0,31,60,91,121,152,182,213,244,274,305,335];function Ya(t,e){return new ya("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function n$(t,e,n){let i=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);let r=i.getUTCDay();return r===0?7:r}function EJ(t,e,n){return n+(Ew(t)?CJ:SJ)[e-1]}function TJ(t,e){let n=Ew(t)?CJ:SJ,i=n.findIndex(o=>ohb(i,e,n)?(c=i+1,l=1):c=i,{weekYear:c,weekNumber:l,weekday:s,...m4(t)}}function jB(t,e=4,n=1){let{weekYear:i,weekNumber:r,weekday:o}=t,a=i$(n$(i,1,e),n),s=em(i),l=r*7+o-a-7+e,c;l<1?(c=i-1,l+=em(c)):l>s?(c=i+1,l-=em(i)):c=i;let{month:d,day:f}=TJ(c,l);return{year:c,month:d,day:f,...m4(t)}}function ZT(t){let{year:e,month:n,day:i}=t,r=EJ(e,n,i);return{year:e,ordinal:r,...m4(t)}}function RB(t){let{year:e,ordinal:n}=t,{month:i,day:r}=TJ(e,n);return{year:e,month:i,day:r,...m4(t)}}function FB(t,e){if(!vt(t.localWeekday)||!vt(t.localWeekNumber)||!vt(t.localWeekYear)){if(!vt(t.weekday)||!vt(t.weekNumber)||!vt(t.weekYear))throw new su("Cannot mix locale-based week fields with ISO-based week fields");return vt(t.localWeekday)||(t.weekday=t.localWeekday),vt(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),vt(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function zxe(t,e=4,n=1){let i=h4(t.weekYear),r=Xa(t.weekNumber,1,hb(t.weekYear,e,n)),o=Xa(t.weekday,1,7);return i?r?o?!1:Ya("weekday",t.weekday):Ya("week",t.weekNumber):Ya("weekYear",t.weekYear)}function Qxe(t){let e=h4(t.year),n=Xa(t.ordinal,1,em(t.year));return e?n?!1:Ya("ordinal",t.ordinal):Ya("year",t.year)}function MJ(t){let e=h4(t.year),n=Xa(t.month,1,12),i=Xa(t.day,1,FO(t.year,t.month));return e?n?i?!1:Ya("day",t.day):Ya("month",t.month):Ya("year",t.year)}function NJ(t){let{hour:e,minute:n,second:i,millisecond:r}=t,o=Xa(e,0,23)||e===24&&n===0&&i===0&&r===0,a=Xa(n,0,59),s=Xa(i,0,59),l=Xa(r,0,999);return o?a?s?l?!1:Ya("millisecond",r):Ya("second",i):Ya("minute",n):Ya("hour",e)}function vt(t){return typeof t>"u"}function pu(t){return typeof t=="number"}function h4(t){return typeof t=="number"&&t%1===0}function Wxe(t){return typeof t=="string"}function Bxe(t){return Object.prototype.toString.call(t)==="[object Date]"}function PJ(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function AJ(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Hxe(t){return Array.isArray(t)?t:[t]}function zB(t,e,n){if(t.length!==0)return t.reduce((i,r)=>{let o=[e(r),r];return i&&n(i[0],o[0])===i[0]?i:o},null)[1]}function Zxe(t,e){return e.reduce((n,i)=>(n[i]=t[i],n),{})}function Cm(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function d9(t){if(t==null)return null;if(typeof t!="object")throw new Ji("Week settings must be an object");if(!Xa(t.firstDay,1,7)||!Xa(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!Xa(e,1,7)))throw new Ji("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Xa(t,e,n){return h4(t)&&t>=e&&t<=n}function qxe(t,e){return t-e*Math.floor(t/e)}function Ci(t,e=2){let n=t<0,i;return n?i="-"+(""+-t).padStart(e,"0"):i=(""+t).padStart(e,"0"),i}function Gd(t){if(!(vt(t)||t===null||t===""))return parseInt(t,10)}function $f(t){if(!(vt(t)||t===null||t===""))return parseFloat(t)}function r$(t){if(!(vt(t)||t===null||t==="")){let e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function o$(t,e,n=!1){let i=10**e;return(n?Math.trunc:Math.round)(t*i)/i}function Ew(t){return t%4===0&&(t%100!==0||t%400===0)}function em(t){return Ew(t)?366:365}function FO(t,e){let n=qxe(e-1,12)+1,i=t+(e-n)/12;return n===2?Ew(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function p4(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function QB(t,e,n){return-i$(n$(t,1,e),n)+e-1}function hb(t,e=4,n=1){let i=QB(t,e,n),r=QB(t+1,e,n);return(em(t)-i+r)/7}function u9(t){return t>99?t:t>jn.twoDigitCutoffYear?1900+t:2e3+t}function $J(t,e,n,i=null){let r=new Date(t),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);let a={timeZoneName:e,...o},s=new Intl.DateTimeFormat(n,a).formatToParts(r).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function g4(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);let i=parseInt(e,10)||0,r=n<0||Object.is(n,-0)?-i:i;return n*60+r}function DJ(t){let e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new Ji(`Invalid unit value ${t}`);return e}function zO(t,e){let n={};for(let i in t)if(Cm(t,i)){let r=t[i];if(r==null)continue;n[e(i)]=DJ(r)}return n}function Cy(t,e){let n=Math.trunc(Math.abs(t/60)),i=Math.trunc(Math.abs(t%60)),r=t>=0?"+":"-";switch(e){case"short":return`${r}${Ci(n,2)}:${Ci(i,2)}`;case"narrow":return`${r}${n}${i>0?`:${i}`:""}`;case"techie":return`${r}${Ci(n,2)}${Ci(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function m4(t){return Zxe(t,["hour","minute","second","millisecond"])}var Uxe=["January","February","March","April","May","June","July","August","September","October","November","December"],IJ=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Vxe=["J","F","M","A","M","J","J","A","S","O","N","D"];function LJ(t){switch(t){case"narrow":return[...Vxe];case"short":return[...IJ];case"long":return[...Uxe];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var jJ=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],RJ=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Yxe=["M","T","W","T","F","S","S"];function FJ(t){switch(t){case"narrow":return[...Yxe];case"short":return[...RJ];case"long":return[...jJ];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var zJ=["AM","PM"],Xxe=["Before Christ","Anno Domini"],Gxe=["BC","AD"],Kxe=["B","A"];function QJ(t){switch(t){case"narrow":return[...Kxe];case"short":return[...Gxe];case"long":return[...Xxe];default:return null}}function Jxe(t){return zJ[t.hour<12?0:1]}function e2e(t,e){return FJ(e)[t.weekday-1]}function t2e(t,e){return LJ(e)[t.month-1]}function n2e(t,e){return QJ(e)[t.year<0?0:1]}function i2e(t,e,n="always",i=!1){let r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&o){let f=t==="days";switch(e){case 1:return f?"tomorrow":`next ${r[t][0]}`;case-1:return f?"yesterday":`last ${r[t][0]}`;case 0:return f?"today":`this ${r[t][0]}`}}let a=Object.is(e,-0)||e<0,s=Math.abs(e),l=s===1,c=r[t],d=i?l?c[1]:c[2]||c[1]:l?r[t][0]:t;return a?`${s} ${d} ago`:`in ${s} ${d}`}function WB(t,e){let n="";for(let i of t)i.literal?n+=i.val:n+=e(i.val);return n}var r2e={D:LO,DD:aJ,DDD:sJ,DDDD:lJ,t:cJ,tt:dJ,ttt:uJ,tttt:fJ,T:hJ,TT:pJ,TTT:gJ,TTTT:mJ,f:vJ,ff:bJ,fff:kJ,ffff:_J,F:yJ,FF:wJ,FFF:xJ,FFFF:OJ},ga=class t{static create(e,n={}){return new t(e,n)}static parseFormat(e){let n=null,i="",r=!1,o=[];for(let a=0;a0&&o.push({literal:r||/^\s+$/.test(i),val:i}),n=null,i="",r=!r):r||s===n?i+=s:(i.length>0&&o.push({literal:/^\s+$/.test(i),val:i}),i=s,n=s)}return i.length>0&&o.push({literal:r||/^\s+$/.test(i),val:i}),o}static macroTokenToFormatOpts(e){return r2e[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return Ci(e,n);let i={...this.opts};return n>0&&(i.padTo=n),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,n){let i=this.loc.listingMode()==="en",r=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(g,m)=>this.loc.extract(e,g,m),a=g=>e.isOffsetFixed&&e.offset===0&&g.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,g.format):"",s=()=>i?Jxe(e):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(g,m)=>i?t2e(e,g):o(m?{month:g}:{month:g,day:"numeric"},"month"),c=(g,m)=>i?e2e(e,g):o(m?{weekday:g}:{weekday:g,month:"long",day:"numeric"},"weekday"),d=g=>{let m=t.macroTokenToFormatOpts(g);return m?this.formatWithSystemDefault(e,m):g},f=g=>i?n2e(e,g):o({era:g},"era"),h=g=>{switch(g){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return s();case"d":return r?o({day:"numeric"},"day"):this.num(e.day);case"dd":return r?o({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return r?o({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?o({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return r?o({month:"numeric"},"month"):this.num(e.month);case"MM":return r?o({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return r?o({year:"numeric"},"year"):this.num(e.year);case"yy":return r?o({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?o({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?o({year:"numeric"},"year"):this.num(e.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return d(g)}};return WB(t.parseFormat(n),h)}formatDurationFromString(e,n){let i=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},r=l=>c=>{let d=i(c);return d?this.num(l.get(d),c.length):c},o=t.parseFormat(n),a=o.reduce((l,{literal:c,val:d})=>c?l:l.concat(d),[]),s=e.shiftTo(...a.map(i).filter(l=>l));return WB(o,r(s))}},WJ=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function v0(...t){let e=t.reduce((n,i)=>n+i.source,"");return RegExp(`^${e}$`)}function y0(...t){return e=>t.reduce(([n,i,r],o)=>{let[a,s,l]=o(e,r);return[{...n,...a},s||i,l]},[{},null,1]).slice(0,2)}function b0(t,...e){if(t==null)return[null,null];for(let[n,i]of e){let r=n.exec(t);if(r)return i(r)}return[null,null]}function BJ(...t){return(e,n)=>{let i={},r;for(r=0;rg!==void 0&&(m||g&&d)?-g:g;return[{years:h($f(n)),months:h($f(i)),weeks:h($f(r)),days:h($f(o)),hours:h($f(a)),minutes:h($f(s)),seconds:h($f(l),l==="-0"),milliseconds:h(r$(c),f)}]}var v2e={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function l$(t,e,n,i,r,o,a){let s={year:e.length===2?u9(Gd(e)):Gd(e),month:IJ.indexOf(n)+1,day:Gd(i),hour:Gd(r),minute:Gd(o)};return a&&(s.second=Gd(a)),t&&(s.weekday=t.length>3?jJ.indexOf(t)+1:RJ.indexOf(t)+1),s}var y2e=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function b2e(t){let[,e,n,i,r,o,a,s,l,c,d,f]=t,h=l$(e,r,i,n,o,a,s),g;return l?g=v2e[l]:c?g=0:g=g4(d,f),[h,new Ja(g)]}function w2e(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var k2e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,x2e=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,_2e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function BB(t){let[,e,n,i,r,o,a,s]=t;return[l$(e,r,i,n,o,a,s),Ja.utcInstance]}function O2e(t){let[,e,n,i,r,o,a,s]=t;return[l$(e,s,n,i,r,o,a),Ja.utcInstance]}var S2e=v0(a2e,s$),C2e=v0(s2e,s$),E2e=v0(l2e,s$),T2e=v0(ZJ),UJ=y0(h2e,w0,Tw,Mw),M2e=y0(c2e,w0,Tw,Mw),N2e=y0(d2e,w0,Tw,Mw),P2e=y0(w0,Tw,Mw);function A2e(t){return b0(t,[S2e,UJ],[C2e,M2e],[E2e,N2e],[T2e,P2e])}function $2e(t){return b0(w2e(t),[y2e,b2e])}function D2e(t){return b0(t,[k2e,BB],[x2e,BB],[_2e,O2e])}function I2e(t){return b0(t,[g2e,m2e])}var L2e=y0(w0);function j2e(t){return b0(t,[p2e,L2e])}var R2e=v0(u2e,f2e),F2e=v0(qJ),z2e=y0(w0,Tw,Mw);function Q2e(t){return b0(t,[R2e,UJ],[F2e,z2e])}var HB="Invalid Duration",VJ={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},W2e={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...VJ},Ba=146097/400,gg=146097/4800,B2e={years:{quarters:4,months:12,weeks:Ba/7,days:Ba,hours:Ba*24,minutes:Ba*24*60,seconds:Ba*24*60*60,milliseconds:Ba*24*60*60*1e3},quarters:{months:3,weeks:Ba/28,days:Ba/4,hours:Ba*24/4,minutes:Ba*24*60/4,seconds:Ba*24*60*60/4,milliseconds:Ba*24*60*60*1e3/4},months:{weeks:gg/7,days:gg,hours:gg*24,minutes:gg*24*60,seconds:gg*24*60*60,milliseconds:gg*24*60*60*1e3},...VJ},Vf=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],H2e=Vf.slice(0).reverse();function Wd(t,e,n=!1){let i={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new tr(i)}function YJ(t,e){let n=e.milliseconds??0;for(let i of H2e.slice(1))e[i]&&(n+=e[i]*t[i].milliseconds);return n}function ZB(t,e){let n=YJ(t,e)<0?-1:1;Vf.reduceRight((i,r)=>{if(vt(e[r]))return i;if(i){let o=e[i]*n,a=t[r][i],s=Math.floor(o/a);e[r]+=s*n,e[i]-=s*a*n}return r},null),Vf.reduce((i,r)=>{if(vt(e[r]))return i;if(i){let o=e[i]%1;e[i]-=o,e[r]+=o*t[i][r]}return r},null)}function Z2e(t){let e={};for(let[n,i]of Object.entries(t))i!==0&&(e[n]=i);return e}var tr=class t{constructor(e){let n=e.conversionAccuracy==="longterm"||!1,i=n?B2e:W2e;e.matrix&&(i=e.matrix),this.values=e.values,this.loc=e.loc||tn.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(e,n){return t.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new Ji(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new t({values:zO(e,t.normalizeUnit),loc:tn.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(pu(e))return t.fromMillis(e);if(t.isDuration(e))return e;if(typeof e=="object")return t.fromObject(e);throw new Ji(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){let[i]=I2e(e);return i?t.fromObject(i,n):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){let[i]=j2e(e);return i?t.fromObject(i,n):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new Ji("need to specify a reason the Duration is invalid");let i=e instanceof ya?e:new ya(e,n);if(jn.throwOnInvalid)throw new t9(i);return new t({invalid:i})}static normalizeUnit(e){let n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new IO(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){let i={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?ga.create(this.loc,i).formatDurationFromString(this,e):HB}toHuman(e={}){if(!this.isValid)return HB;let n=Vf.map(i=>{let r=this.values[i];return vt(r)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(r)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=o$(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},on.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?YJ(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let n=t.fromDurationLike(e),i={};for(let r of Vf)(Cm(n.values,r)||Cm(this.values,r))&&(i[r]=n.get(r)+this.get(r));return Wd(this,{values:i},!0)}minus(e){if(!this.isValid)return this;let n=t.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;let n={};for(let i of Object.keys(this.values))n[i]=DJ(e(this.values[i],i));return Wd(this,{values:n},!0)}get(e){return this[t.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let n={...this.values,...zO(e,t.normalizeUnit)};return Wd(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:i,matrix:r}={}){let o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:r,conversionAccuracy:i};return Wd(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return ZB(this.matrix,e),Wd(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=Z2e(this.normalize().shiftToAll().toObject());return Wd(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>t.normalizeUnit(a));let n={},i={},r=this.toObject(),o;for(let a of Vf)if(e.indexOf(a)>=0){o=a;let s=0;for(let c in i)s+=this.matrix[c][a]*i[c],i[c]=0;pu(r[a])&&(s+=r[a]);let l=Math.trunc(s);n[a]=l,i[a]=(s*1e3-l*1e3)/1e3}else pu(r[a])&&(i[a]=r[a]);for(let a in i)i[a]!==0&&(n[o]+=a===o?i[a]:i[a]/this.matrix[o][a]);return ZB(this.matrix,n),Wd(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return Wd(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(i,r){return i===void 0||i===0?r===void 0||r===0:i===r}for(let i of Vf)if(!n(this.values[i],e.values[i]))return!1;return!0}},mg="Invalid Interval";function q2e(t,e){return!t||!t.isValid?nm.invalid("missing or invalid start"):!e||!e.isValid?nm.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?t.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];let n=e.map(Av).filter(a=>this.contains(a)).sort((a,s)=>a.toMillis()-s.toMillis()),i=[],{s:r}=this,o=0;for(;r+this.e?this.e:a;i.push(t.fromDateTimes(r,s)),r=s,o+=1}return i}splitBy(e){let n=tr.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:i}=this,r=1,o,a=[];for(;il*r));o=+s>+this.e?this.e:s,a.push(t.fromDateTimes(i,o)),i=o,r+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let n=this.s>e.s?this.s:e.s,i=this.e=i?null:t.fromDateTimes(n,i)}union(e){if(!this.isValid)return this;let n=this.se.e?this.e:e.e;return t.fromDateTimes(n,i)}static merge(e){let[n,i]=e.sort((r,o)=>r.s-o.s).reduce(([r,o],a)=>o?o.overlaps(a)||o.abutsStart(a)?[r,o.union(a)]:[r.concat([o]),a]:[r,a],[[],null]);return i&&n.push(i),n}static xor(e){let n=null,i=0,r=[],o=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),a=Array.prototype.concat(...o),s=a.sort((l,c)=>l.time-c.time);for(let l of s)i+=l.type==="s"?1:-1,i===1?n=l.time:(n&&+n!=+l.time&&r.push(t.fromDateTimes(n,l.time)),n=null);return t.merge(r)}difference(...e){return t.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:mg}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=LO,n={}){return this.isValid?ga.create(this.s.loc.clone(n),e).formatInterval(this):mg}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:mg}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:mg}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:mg}toFormat(e,{separator:n=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:mg}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):tr.invalid(this.invalidReason)}mapEndpoints(e){return t.fromDateTimes(e(this.s),e(this.e))}},Qg=class{static hasDST(e=jn.defaultZone){let n=on.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return Nu.isValidZone(e)}static normalizeZone(e){return eu(e,jn.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||tn.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||tn.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||tn.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:i=null,locObj:r=null,outputCalendar:o="gregory"}={}){return(r||tn.create(n,i,o)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:i=null,locObj:r=null,outputCalendar:o="gregory"}={}){return(r||tn.create(n,i,o)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:i=null,locObj:r=null}={}){return(r||tn.create(n,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:i=null,locObj:r=null}={}){return(r||tn.create(n,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return tn.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return tn.create(n,null,"gregory").eras(e)}static features(){return{relative:PJ(),localeWeek:AJ()}}};function qB(t,e){let n=r=>r.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(e)-n(t);return Math.floor(tr.fromMillis(i).as("days"))}function U2e(t,e,n){let i=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{let d=qB(l,c);return(d-d%7)/7}],["days",qB]],r={},o=t,a,s;for(let[l,c]of i)n.indexOf(l)>=0&&(a=l,r[l]=c(t,e),s=o.plus(r),s>e?(r[l]--,t=o.plus(r),t>e&&(s=t,r[l]--,t=o.plus(r))):t=s);return[t,r,s,a]}function V2e(t,e,n,i){let[r,o,a,s]=U2e(t,e,n),l=e-r,c=n.filter(f=>["hours","minutes","seconds","milliseconds"].indexOf(f)>=0);c.length===0&&(a0?tr.fromMillis(l,i).shiftTo(...c).plus(d):d}var Y2e="missing Intl.DateTimeFormat.formatToParts support";function Zt(t,e=n=>n){return{regex:t,deser:([n])=>e(Rxe(n))}}var X2e="\xA0",XJ=`[ ${X2e}]`,GJ=new RegExp(XJ,"g");function G2e(t){return t.replace(/\./g,"\\.?").replace(GJ,XJ)}function UB(t){return t.replace(/\./g,"").replace(GJ," ").toLowerCase()}function Ns(t,e){return t===null?null:{regex:RegExp(t.map(G2e).join("|")),deser:([n])=>t.findIndex(i=>UB(n)===UB(i))+e}}function VB(t,e){return{regex:t,deser:([,n,i])=>g4(n,i),groups:e}}function I2(t){return{regex:t,deser:([e])=>e}}function K2e(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function J2e(t,e){let n=Ms(e),i=Ms(e,"{2}"),r=Ms(e,"{3}"),o=Ms(e,"{4}"),a=Ms(e,"{6}"),s=Ms(e,"{1,2}"),l=Ms(e,"{1,3}"),c=Ms(e,"{1,6}"),d=Ms(e,"{1,9}"),f=Ms(e,"{2,4}"),h=Ms(e,"{4,6}"),g=b=>({regex:RegExp(K2e(b.val)),deser:([x])=>x,literal:!0}),m=(b=>{if(t.literal)return g(b);switch(b.val){case"G":return Ns(e.eras("short"),0);case"GG":return Ns(e.eras("long"),0);case"y":return Zt(c);case"yy":return Zt(f,u9);case"yyyy":return Zt(o);case"yyyyy":return Zt(h);case"yyyyyy":return Zt(a);case"M":return Zt(s);case"MM":return Zt(i);case"MMM":return Ns(e.months("short",!0),1);case"MMMM":return Ns(e.months("long",!0),1);case"L":return Zt(s);case"LL":return Zt(i);case"LLL":return Ns(e.months("short",!1),1);case"LLLL":return Ns(e.months("long",!1),1);case"d":return Zt(s);case"dd":return Zt(i);case"o":return Zt(l);case"ooo":return Zt(r);case"HH":return Zt(i);case"H":return Zt(s);case"hh":return Zt(i);case"h":return Zt(s);case"mm":return Zt(i);case"m":return Zt(s);case"q":return Zt(s);case"qq":return Zt(i);case"s":return Zt(s);case"ss":return Zt(i);case"S":return Zt(l);case"SSS":return Zt(r);case"u":return I2(d);case"uu":return I2(s);case"uuu":return Zt(n);case"a":return Ns(e.meridiems(),0);case"kkkk":return Zt(o);case"kk":return Zt(f,u9);case"W":return Zt(s);case"WW":return Zt(i);case"E":case"c":return Zt(n);case"EEE":return Ns(e.weekdays("short",!1),1);case"EEEE":return Ns(e.weekdays("long",!1),1);case"ccc":return Ns(e.weekdays("short",!0),1);case"cccc":return Ns(e.weekdays("long",!0),1);case"Z":case"ZZ":return VB(new RegExp(`([+-]${s.source})(?::(${i.source}))?`),2);case"ZZZ":return VB(new RegExp(`([+-]${s.source})(${i.source})?`),2);case"z":return I2(/[a-z_+-/]{1,256}?/i);case" ":return I2(/[^\S\n\r]/);default:return g(b)}})(t)||{invalidReason:Y2e};return m.token=t,m}var e_e={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function t_e(t,e,n){let{type:i,value:r}=t;if(i==="literal"){let l=/^\s+$/.test(r);return{literal:!l,val:l?" ":r}}let o=e[i],a=i;i==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let s=e_e[a];if(typeof s=="object"&&(s=s[o]),s)return{literal:!1,val:s}}function n_e(t){return[`^${t.map(e=>e.regex).reduce((e,n)=>`${e}(${n.source})`,"")}$`,t]}function i_e(t,e,n){let i=t.match(e);if(i){let r={},o=1;for(let a in n)if(Cm(n,a)){let s=n[a],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(r[s.token.val[0]]=s.deser(i.slice(o,o+l))),o+=l}return[i,r]}else return[i,{}]}function r_e(t){let e=r=>{switch(r){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},n=null,i;return vt(t.z)||(n=Nu.create(t.z)),vt(t.Z)||(n||(n=new Ja(t.Z)),i=t.Z),vt(t.q)||(t.M=(t.q-1)*3+1),vt(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),vt(t.u)||(t.S=r$(t.u)),[Object.keys(t).reduce((r,o)=>{let a=e(o);return a&&(r[a]=t[o]),r},{}),n,i]}var qT=null;function o_e(){return qT||(qT=on.fromMillis(1555555555555)),qT}function a_e(t,e){if(t.literal)return t;let n=ga.macroTokenToFormatOpts(t.val),i=eee(n,e);return i==null||i.includes(void 0)?t:i}function KJ(t,e){return Array.prototype.concat(...t.map(n=>a_e(n,e)))}var QO=class{constructor(e,n){if(this.locale=e,this.format=n,this.tokens=KJ(ga.parseFormat(n),e),this.units=this.tokens.map(i=>J2e(i,e)),this.disqualifyingUnit=this.units.find(i=>i.invalidReason),!this.disqualifyingUnit){let[i,r]=n_e(this.units);this.regex=RegExp(i,"i"),this.handlers=r}}explainFromTokens(e){if(this.isValid){let[n,i]=i_e(e,this.regex,this.handlers),[r,o,a]=i?r_e(i):[null,null,void 0];if(Cm(i,"a")&&Cm(i,"H"))throw new su("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:i,result:r,zone:o,specificOffset:a}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function JJ(t,e,n){return new QO(t,n).explainFromTokens(e)}function s_e(t,e,n){let{result:i,zone:r,specificOffset:o,invalidReason:a}=JJ(t,e,n);return[i,r,o,a]}function eee(t,e){if(!t)return null;let n=ga.create(e,t).dtFormatter(o_e()),i=n.formatToParts(),r=n.resolvedOptions();return i.map(o=>t_e(o,t,r))}var UT="Invalid DateTime",YB=864e13;function ny(t){return new ya("unsupported zone",`the zone "${t.name}" is not supported`)}function VT(t){return t.weekData===null&&(t.weekData=RO(t.c)),t.weekData}function YT(t){return t.localWeekData===null&&(t.localWeekData=RO(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Df(t,e){let n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new on({...n,...e,old:n})}function tee(t,e,n){let i=t-e*60*1e3,r=n.offset(i);if(e===r)return[i,e];i-=(r-e)*60*1e3;let o=n.offset(i);return r===o?[i,r]:[t-Math.min(r,o)*60*1e3,Math.max(r,o)]}function L2(t,e){t+=e*60*1e3;let n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function P_(t,e,n){return tee(p4(t),e,n)}function XB(t,e){let n=t.o,i=t.c.year+Math.trunc(e.years),r=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,o={...t.c,year:i,month:r,day:Math.min(t.c.day,FO(i,r))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=tr.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),s=p4(o),[l,c]=tee(s,n,t.zone);return a!==0&&(l+=a,c=t.zone.offset(l)),{ts:l,o:c}}function vg(t,e,n,i,r,o){let{setZone:a,zone:s}=n;if(t&&Object.keys(t).length!==0||e){let l=e||s,c=on.fromObject(t,{...n,zone:l,specificOffset:o});return a?c:c.setZone(s)}else return on.invalid(new ya("unparsable",`the input "${r}" can't be parsed as ${i}`))}function j2(t,e,n=!0){return t.isValid?ga.create(tn.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function XT(t,e){let n=t.c.year>9999||t.c.year<0,i="";return n&&t.c.year>=0&&(i+="+"),i+=Ci(t.c.year,n?6:4),e?(i+="-",i+=Ci(t.c.month),i+="-",i+=Ci(t.c.day)):(i+=Ci(t.c.month),i+=Ci(t.c.day)),i}function GB(t,e,n,i,r,o){let a=Ci(t.c.hour);return e?(a+=":",a+=Ci(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(a+=":")):a+=Ci(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(a+=Ci(t.c.second),(t.c.millisecond!==0||!i)&&(a+=".",a+=Ci(t.c.millisecond,3))),r&&(t.isOffsetFixed&&t.offset===0&&!o?a+="Z":t.o<0?(a+="-",a+=Ci(Math.trunc(-t.o/60)),a+=":",a+=Ci(Math.trunc(-t.o%60))):(a+="+",a+=Ci(Math.trunc(t.o/60)),a+=":",a+=Ci(Math.trunc(t.o%60)))),o&&(a+="["+t.zone.ianaName+"]"),a}var nee={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},l_e={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},c_e={ordinal:1,hour:0,minute:0,second:0,millisecond:0},iee=["year","month","day","hour","minute","second","millisecond"],d_e=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],u_e=["year","ordinal","hour","minute","second","millisecond"];function f_e(t){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new IO(t);return e}function KB(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return f_e(t)}}function h_e(t){return $_[t]||(A_===void 0&&(A_=jn.now()),$_[t]=t.offset(A_)),$_[t]}function JB(t,e){let n=eu(e.zone,jn.defaultZone);if(!n.isValid)return on.invalid(ny(n));let i=tn.fromObject(e),r,o;if(vt(t.year))r=jn.now();else{for(let l of iee)vt(t[l])&&(t[l]=nee[l]);let a=MJ(t)||NJ(t);if(a)return on.invalid(a);let s=h_e(n);[r,o]=P_(t,s,n)}return new on({ts:r,zone:n,loc:i,o})}function eH(t,e,n){let i=vt(n.round)?!0:n.round,r=(a,s)=>(a=o$(a,i||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(a,s)),o=a=>n.calendary?e.hasSame(t,a)?0:e.startOf(a).diff(t.startOf(a),a).get(a):e.diff(t,a).get(a);if(n.unit)return r(o(n.unit),n.unit);for(let a of n.units){let s=o(a);if(Math.abs(s)>=1)return r(s,a)}return r(t>e?-0:0,n.units[n.units.length-1])}function tH(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}var A_,$_={},on=class t{constructor(e){let n=e.zone||jn.defaultZone,i=e.invalid||(Number.isNaN(e.ts)?new ya("invalid input"):null)||(n.isValid?null:ny(n));this.ts=vt(e.ts)?jn.now():e.ts;let r=null,o=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[r,o]=[e.old.c,e.old.o];else{let a=pu(e.o)&&!e.old?e.o:n.offset(this.ts);r=L2(this.ts,a),i=Number.isNaN(r.year)?new ya("invalid input"):null,r=i?null:r,o=i?null:a}this._zone=n,this.loc=e.loc||tn.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=r,this.o=o,this.isLuxonDateTime=!0}static now(){return new t({})}static local(){let[e,n]=tH(arguments),[i,r,o,a,s,l,c]=n;return JB({year:i,month:r,day:o,hour:a,minute:s,second:l,millisecond:c},e)}static utc(){let[e,n]=tH(arguments),[i,r,o,a,s,l,c]=n;return e.zone=Ja.utcInstance,JB({year:i,month:r,day:o,hour:a,minute:s,second:l,millisecond:c},e)}static fromJSDate(e,n={}){let i=Bxe(e)?e.valueOf():NaN;if(Number.isNaN(i))return t.invalid("invalid input");let r=eu(n.zone,jn.defaultZone);return r.isValid?new t({ts:i,zone:r,loc:tn.fromObject(n)}):t.invalid(ny(r))}static fromMillis(e,n={}){if(pu(e))return e<-YB||e>YB?t.invalid("Timestamp out of range"):new t({ts:e,zone:eu(n.zone,jn.defaultZone),loc:tn.fromObject(n)});throw new Ji(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(pu(e))return new t({ts:e*1e3,zone:eu(n.zone,jn.defaultZone),loc:tn.fromObject(n)});throw new Ji("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};let i=eu(n.zone,jn.defaultZone);if(!i.isValid)return t.invalid(ny(i));let r=tn.fromObject(n),o=zO(e,KB),{minDaysInFirstWeek:a,startOfWeek:s}=FB(o,r),l=jn.now(),c=vt(n.specificOffset)?i.offset(l):n.specificOffset,d=!vt(o.ordinal),f=!vt(o.year),h=!vt(o.month)||!vt(o.day),g=f||h,m=o.weekYear||o.weekNumber;if((g||d)&&m)throw new su("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&d)throw new su("Can't mix ordinal dates with month/day");let b=m||o.weekday&&!g,x,_,O=L2(l,c);b?(x=d_e,_=l_e,O=RO(O,a,s)):d?(x=u_e,_=c_e,O=ZT(O)):(x=iee,_=nee);let S=!1;for(let Z of x){let j=o[Z];vt(j)?S?o[Z]=_[Z]:o[Z]=O[Z]:S=!0}let E=b?zxe(o,a,s):d?Qxe(o):MJ(o),T=E||NJ(o);if(T)return t.invalid(T);let M=b?jB(o,a,s):d?RB(o):o,[I,F]=P_(M,c,i),W=new t({ts:I,zone:i,o:F,loc:r});return o.weekday&&g&&e.weekday!==W.weekday?t.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${W.toISO()}`):W.isValid?W:t.invalid(W.invalid)}static fromISO(e,n={}){let[i,r]=A2e(e);return vg(i,r,n,"ISO 8601",e)}static fromRFC2822(e,n={}){let[i,r]=$2e(e);return vg(i,r,n,"RFC 2822",e)}static fromHTTP(e,n={}){let[i,r]=D2e(e);return vg(i,r,n,"HTTP",n)}static fromFormat(e,n,i={}){if(vt(e)||vt(n))throw new Ji("fromFormat requires an input string and a format");let{locale:r=null,numberingSystem:o=null}=i,a=tn.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0}),[s,l,c,d]=s_e(a,e,n);return d?t.invalid(d):vg(s,l,i,`format ${n}`,e,c)}static fromString(e,n,i={}){return t.fromFormat(e,n,i)}static fromSQL(e,n={}){let[i,r]=Q2e(e);return vg(i,r,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new Ji("need to specify a reason the DateTime is invalid");let i=e instanceof ya?e:new ya(e,n);if(jn.throwOnInvalid)throw new JM(i);return new t({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){let i=eee(e,tn.fromObject(n));return i?i.map(r=>r?r.val:null).join(""):null}static expandFormat(e,n={}){return KJ(ga.parseFormat(e),tn.fromObject(n)).map(i=>i.val).join("")}static resetCache(){A_=void 0,$_={}}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?VT(this).weekYear:NaN}get weekNumber(){return this.isValid?VT(this).weekNumber:NaN}get weekday(){return this.isValid?VT(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?YT(this).weekday:NaN}get localWeekNumber(){return this.isValid?YT(this).weekNumber:NaN}get localWeekYear(){return this.isValid?YT(this).weekYear:NaN}get ordinal(){return this.isValid?ZT(this.c).ordinal:NaN}get monthShort(){return this.isValid?Qg.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Qg.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Qg.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Qg.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,n=6e4,i=p4(this.c),r=this.zone.offset(i-e),o=this.zone.offset(i+e),a=this.zone.offset(i-r*n),s=this.zone.offset(i-o*n);if(a===s)return[this];let l=i-a*n,c=i-s*n,d=L2(l,a),f=L2(c,s);return d.hour===f.hour&&d.minute===f.minute&&d.second===f.second&&d.millisecond===f.millisecond?[Df(this,{ts:l}),Df(this,{ts:c})]:[this]}get isInLeapYear(){return Ew(this.year)}get daysInMonth(){return FO(this.year,this.month)}get daysInYear(){return this.isValid?em(this.year):NaN}get weeksInWeekYear(){return this.isValid?hb(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?hb(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:n,numberingSystem:i,calendar:r}=ga.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:i,outputCalendar:r}}toUTC(e=0,n={}){return this.setZone(Ja.instance(e),n)}toLocal(){return this.setZone(jn.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:i=!1}={}){if(e=eu(e,jn.defaultZone),e.equals(this.zone))return this;if(e.isValid){let r=this.ts;if(n||i){let o=e.offset(this.ts),a=this.toObject();[r]=P_(a,o,e)}return Df(this,{ts:r,zone:e})}else return t.invalid(ny(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:i}={}){let r=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:i});return Df(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let n=zO(e,KB),{minDaysInFirstWeek:i,startOfWeek:r}=FB(n,this.loc),o=!vt(n.weekYear)||!vt(n.weekNumber)||!vt(n.weekday),a=!vt(n.ordinal),s=!vt(n.year),l=!vt(n.month)||!vt(n.day),c=s||l,d=n.weekYear||n.weekNumber;if((c||a)&&d)throw new su("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&a)throw new su("Can't mix ordinal dates with month/day");let f;o?f=jB({...RO(this.c,i,r),...n},i,r):vt(n.ordinal)?(f={...this.toObject(),...n},vt(n.day)&&(f.day=Math.min(FO(f.year,f.month),f.day))):f=RB({...ZT(this.c),...n});let[h,g]=P_(f,this.o,this.zone);return Df(this,{ts:h,o:g})}plus(e){if(!this.isValid)return this;let n=tr.fromDurationLike(e);return Df(this,XB(this,n))}minus(e){if(!this.isValid)return this;let n=tr.fromDurationLike(e).negate();return Df(this,XB(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;let i={},r=tr.normalizeUnit(e);switch(r){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0;break}if(r==="weeks")if(n){let o=this.loc.getStartOfWeek(),{weekday:a}=this;athis.valueOf(),s=a?this:e,l=a?e:this,c=V2e(s,l,o,r);return a?c.negate():c}diffNow(e="milliseconds",n={}){return this.diff(t.now(),e,n)}until(e){return this.isValid?nm.fromDateTimes(this,e):this}hasSame(e,n,i){if(!this.isValid)return!1;let r=e.valueOf(),o=this.setZone(e.zone,{keepLocalTime:!0});return o.startOf(n,i)<=r&&r<=o.endOf(n,i)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let n=e.base||t.fromObject({},{zone:this.zone}),i=e.padding?thisn.valueOf(),Math.min)}static max(...e){if(!e.every(t.isDateTime))throw new Ji("max requires all arguments be DateTimes");return zB(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,i={}){let{locale:r=null,numberingSystem:o=null}=i,a=tn.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});return JJ(a,e,n)}static fromStringExplain(e,n,i={}){return t.fromFormatExplain(e,n,i)}static buildFormatParser(e,n={}){let{locale:i=null,numberingSystem:r=null}=n,o=tn.fromOpts({locale:i,numberingSystem:r,defaultToEN:!0});return new QO(o,e)}static fromFormatParser(e,n,i={}){if(vt(e)||vt(n))throw new Ji("fromFormatParser requires an input string and a format parser");let{locale:r=null,numberingSystem:o=null}=i,a=tn.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});if(!a.equals(n.locale))throw new Ji(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${n.locale}`);let{result:s,zone:l,specificOffset:c,invalidReason:d}=n.explainFromTokens(e);return d?t.invalid(d):vg(s,l,i,`format ${n.format}`,e,c)}static get DATE_SHORT(){return LO}static get DATE_MED(){return aJ}static get DATE_MED_WITH_WEEKDAY(){return wxe}static get DATE_FULL(){return sJ}static get DATE_HUGE(){return lJ}static get TIME_SIMPLE(){return cJ}static get TIME_WITH_SECONDS(){return dJ}static get TIME_WITH_SHORT_OFFSET(){return uJ}static get TIME_WITH_LONG_OFFSET(){return fJ}static get TIME_24_SIMPLE(){return hJ}static get TIME_24_WITH_SECONDS(){return pJ}static get TIME_24_WITH_SHORT_OFFSET(){return gJ}static get TIME_24_WITH_LONG_OFFSET(){return mJ}static get DATETIME_SHORT(){return vJ}static get DATETIME_SHORT_WITH_SECONDS(){return yJ}static get DATETIME_MED(){return bJ}static get DATETIME_MED_WITH_SECONDS(){return wJ}static get DATETIME_MED_WITH_WEEKDAY(){return kxe}static get DATETIME_FULL(){return kJ}static get DATETIME_FULL_WITH_SECONDS(){return xJ}static get DATETIME_HUGE(){return _J}static get DATETIME_HUGE_WITH_SECONDS(){return OJ}};function Av(t){if(on.isDateTime(t))return t;if(t&&t.valueOf&&pu(t.valueOf()))return on.fromJSDate(t);if(t&&typeof t=="object")return on.fromObject(t);throw new Ji(`Unknown datetime argument: ${t}, of type ${typeof t}`)}var p_e=typeof rn=="object"&&rn&&rn.Object===Object&&rn,ree=p_e,g_e=ree,m_e=typeof self=="object"&&self&&self.Object===Object&&self,v_e=g_e||m_e||Function("return this")(),Us=v_e,y_e=Us,b_e=y_e.Symbol,k0=b_e;function w_e(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n-1&&t%1==0&&t<=FOe}var d$=zOe,QOe=see,WOe=d$;function BOe(t){return t!=null&&WOe(t.length)&&!QOe(t)}var u$=BOe,HOe=Array.isArray,td=HOe;function ZOe(t){return t!=null&&typeof t=="object"}var Gh=ZOe,qOe=x0,UOe=td,VOe=Gh,YOe="[object String]";function XOe(t){return typeof t=="string"||!UOe(t)&&VOe(t)&&qOe(t)==YOe}var GOe=XOe;function KOe(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}var JOe=KOe;function e3e(t){var e=-1,n=Array(t.size);return t.forEach(function(i,r){n[++e]=[r,i]}),n}var t3e=e3e;function n3e(t){var e=-1,n=Array(t.size);return t.forEach(function(i){n[++e]=i}),n}var i3e=n3e;function r3e(t){return t.split("")}var o3e=r3e,a3e="\\ud800-\\udfff",s3e="\\u0300-\\u036f",l3e="\\ufe20-\\ufe2f",c3e="\\u20d0-\\u20ff",d3e=s3e+l3e+c3e,u3e="\\ufe0e\\ufe0f",f3e="\\u200d",h3e=RegExp("["+f3e+a3e+d3e+u3e+"]");function p3e(t){return h3e.test(t)}var g3e=p3e,dee="\\ud800-\\udfff",m3e="\\u0300-\\u036f",v3e="\\ufe20-\\ufe2f",y3e="\\u20d0-\\u20ff",b3e=m3e+v3e+y3e,w3e="\\ufe0e\\ufe0f",k3e="["+dee+"]",v9="["+b3e+"]",y9="\\ud83c[\\udffb-\\udfff]",x3e="(?:"+v9+"|"+y9+")",uee="[^"+dee+"]",fee="(?:\\ud83c[\\udde6-\\uddff]){2}",hee="[\\ud800-\\udbff][\\udc00-\\udfff]",_3e="\\u200d",pee=x3e+"?",gee="["+w3e+"]?",O3e="(?:"+_3e+"(?:"+[uee,fee,hee].join("|")+")"+gee+pee+")*",S3e=gee+pee+O3e,C3e="(?:"+[uee+v9+"?",v9,fee,hee,k3e].join("|")+")",E3e=RegExp(y9+"(?="+y9+")|"+C3e+S3e,"g");function T3e(t){return t.match(E3e)||[]}var M3e=T3e,N3e=o3e,P3e=g3e,A3e=M3e;function $3e(t){return P3e(t)?A3e(t):N3e(t)}var D3e=$3e;function I3e(t,e){for(var n=-1,i=t==null?0:t.length,r=Array(i);++n-1&&t%1==0&&t-1}var F4e=R4e,z4e=b4;function Q4e(t,e){var n=this.__data__,i=z4e(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}var W4e=Q4e,B4e=S4e,H4e=$4e,Z4e=L4e,q4e=F4e,U4e=W4e;function O0(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e(a instanceof Function?r[o]=a(n[o]):a===null?delete r[o]:r[o]=a,r),{...n});let i=XTe(e);t.setStyle(i),ZO.set(i,e)}function GTe(t){for(;t!==null&&!et.$isRootOrShadowRoot(t);){let e=t.getLatest(),n=t.getParent();e.getChildrenSize()===0&&t.remove(!0),t=n}}function JT(t,e,n,i,r=null){if(e.length!==0){var o=e[0],a=new Map,s=[];o=et.$isElementNode(o)?o:o.getParentOrThrow(),o.isInline()&&(o=o.getParentOrThrow());for(var l=!1;o!==null;){var c=o.getPreviousSibling();if(c!==null){o=c,l=!0;break}if(o=o.getParentOrThrow(),et.$isRootOrShadowRoot(o))break}c=new Set;for(var d=0;d{m.append(b),h.add(b.getKey()),et.$isElementNode(b)&&b.getChildrenKeys().forEach(x=>h.add(x))}),GTe(g)}}else if(c.has(f.getKey())){if(!et.$isElementNode(f))throw Error("Expected node in emptyElements to be an ElementNode");g=i(),g.setFormat(f.getFormatType()),g.setIndent(f.getIndent()),s.push(g),f.remove(!0)}}if(r!==null)for(e=0;ec?c:d,t=m==="element"?l:d>c?d:c,h!==t&&(h===0&&t===l?(yg(r,e),r.select(h,t)):(n=r.splitText(h,t),n=h===0?n[0]:n[1],yg(n,e),n.select(0,t-h))));else for(et.$isTextNode(r)&&hd?d:c,a=c>d?c:d):o?(i=n?d:c,a=void 0):r&&(n=n?c:d,i=0,a=n),e.__text=e.__text.slice(i,a)}}return e};ur.$wrapNodes=function(t,e,n=null){var i=t.getStartEndPoints(),r=i?i[0]:null;i=t.getNodes();let o=i.length;if(r!==null&&(o===0||o===1&&r.type==="element"&&r.getNode().getChildrenSize()===0)){t=r.type==="text"?r.getNode().getParentOrThrow():r.getNode(),i=t.getChildren();let s=e();s.setFormat(t.getFormatType()),s.setIndent(t.getIndent()),i.forEach(l=>s.append(l)),n&&(s=n.append(s)),t.replace(s)}else{r=null;var a=[];for(let s=0;s{let s=o.top-a.top;return 3>=Math.abs(s)?o.left-a.left:s});let r;for(let o=0;oa.top&&r.left+r.width>a.left||s?(e.splice(o--,1),i--):r=a}return e};ur.getStyleObjectFromCSS=qO;ur.trimTextContentFromAnchor=function(t,e,n){let i=e.getNode();if(et.$isElementNode(i)){var r=i.getDescendantByIndex(e.offset);r!==null&&(i=r)}for(;0=r)s=i.getParent(),i.remove(),s==null||s.getChildrenSize()!==0||et.$isRootNode(s)||s.remove(),n-=r+a,i=o;else{let l=i.getKey();a=t.getEditorState().read(()=>{let d=et.$getNodeByKey(l);return et.$isTextNode(d)&&d.isSimpleText()?d.getTextContent():null}),o=r-n;let c=s.slice(0,o);a!==null&&a!==s?(n=et.$getPreviousSelection(),r=i,i.isSimpleText()?i.setTextContent(a):(r=et.$createTextNode(a),i.replace(r)),et.$isRangeSelection(n)&&n.isCollapsed()&&(n=n.anchor.offset,r.select(n,n))):i.isSimpleText()?(a=e.key===l,s=e.offset,s{t.forEach(e=>e())}}var e8e={attributes:!0,characterData:!0,childList:!0,subtree:!0};function jee(t,e,n){function i(){if(a===null)throw Error("Unexpected null rootDOMNode");if(s===null)throw Error("Unexpected null parentDOMNode");let{left:h,top:g}=a.getBoundingClientRect();var m=s;let b=Iee.createRectsFromDOMRange(t,e);d.isConnected||m.append(d),m=!1;for(let O=0;Ob.length;)c.pop();m&&n(c)}function r(){a=s=null,l!==null&&l.disconnect(),l=null,d.remove();for(let h of c)h.remove();c=[]}function o(){let h=t.getRootElement();if(h===null)return r();let g=h.parentElement;if(!(g instanceof HTMLElement))return r();r(),a=h,s=g,l=new MutationObserver(m=>{let b=t.getRootElement(),x=b&&b.parentElement;if(b!==a||x!==s)return o();for(let _ of m)if(!d.contains(_.target))return i()}),l.observe(g,e8e),i()}let a=null,s=null,l=null,c=[],d=document.createElement("div"),f=t.registerRootListener(o);return()=>{f(),r()}}function Ree(t,e){for(let n of e)if(t.type.startsWith(n))return!0;return!1}var Fee=(t,e)=>{for(;t!==Rn.$getRoot()&&t!=null;){if(e(t))return t;t=t.getParent()}return null};hi.$splitNode=Rn.$splitNode;hi.isHTMLAnchorElement=Rn.isHTMLAnchorElement;hi.isHTMLElement=Rn.isHTMLElement;hi.$dfs=function(t,e){let n=[];t=(t||Rn.$getRoot()).getLatest(),e=e||(Rn.$isElementNode(t)?t.getLastDescendant():t);for(var i=t,r=0;(i=i.getParent())!==null;)r++;for(i=r;t!==null&&!t.is(e);)if(n.push({depth:i,node:t}),Rn.$isElementNode(t)&&0Rn.$isElementNode(n)&&!n.isInline());return Rn.$isElementNode(e)||JTe(4,t.__key),e};hi.$getNearestNodeOfType=function(t,e){for(;t!=null;){if(t instanceof e)return t;t=t.getParent()}return null};hi.$insertFirst=function(t,e){let n=t.getFirstChild();n!==null?n.insertBefore(e):t.append(e)};hi.$insertNodeToNearestRoot=function(t){var e=Rn.$getSelection()||Rn.$getPreviousSelection();if(Rn.$isRangeSelection(e)){var{focus:n}=e;if(e=n.getNode(),n=n.offset,Rn.$isRootOrShadowRoot(e))n=e.getChildAtIndex(n),n==null?e.append(t):n.insertBefore(t),t.selectNext();else{let i,r;Rn.$isTextNode(e)?(i=e.getParentOrThrow(),r=e.getIndexWithinParent(),0{typeof n=="string"&&(n=n.split(" ").filter(i=>i!==""),t.classList.add(...n))})};hi.isMimeType=Ree;hi.markSelection=function(t,e){function n(l){l.read(()=>{var c=Rn.$getSelection();if(Rn.$isRangeSelection(c)){var{anchor:d,focus:f}=c;c=d.getNode();var h=c.getKey(),g=d.offset,m=f.getNode(),b=m.getKey(),x=f.offset,_=t.getElementByKey(h),O=t.getElementByKey(b);if(h=i===null||_===null||g!==r||h!==i.getKey()||c!==i&&(!(i instanceof Rn.TextNode)||c.updateDOM(i,_,t._config)),b=o===null||O===null||x!==a||b!==o.getKey()||m!==o&&(!(o instanceof Rn.TextNode)||m.updateDOM(o,O,t._config)),h||b){_=t.getElementByKey(d.getNode().getKey());var S=t.getElementByKey(f.getNode().getKey());if(_!==null&&S!==null&&_.tagName==="SPAN"&&S.tagName==="SPAN"){if(b=document.createRange(),f.isBefore(d)?(h=S,O=f.offset,S=_,_=d.offset):(h=_,O=d.offset,_=f.offset),h=h.firstChild,h===null||(S=S.firstChild,S===null))throw Error("Expected text node to be first child of span");b.setStart(h,O),b.setEnd(S,_),s(),s=jee(t,b,E=>{for(let T of E){let M=T.style;M.background!=="Highlight"&&(M.background="Highlight"),M.color!=="HighlightText"&&(M.color="HighlightText"),M.zIndex!=="-1"&&(M.zIndex="-1"),M.pointerEvents!=="none"&&(M.pointerEvents="none"),M.marginTop!=="-1.5px"&&(M.marginTop="-1.5px"),M.paddingTop!=="4px"&&(M.paddingTop="4px"),M.paddingBottom!=="0px"&&(M.paddingBottom="0px")}e!==void 0&&e(E)})}}i=c,r=g,o=m,a=x}else a=o=r=i=null,s(),s=()=>{}})}let i=null,r=null,o=null,a=null,s=()=>{};return n(t.getEditorState()),Lee(t.registerUpdateListener(({editorState:l})=>n(l)),s,()=>{s()})};hi.mediaFileReader=function(t,e){let n=t[Symbol.iterator]();return new Promise((i,r)=>{let o=[],a=()=>{let{done:s,value:l}=n.next();if(s)return i(o);let c=new FileReader;c.addEventListener("error",r),c.addEventListener("load",()=>{let d=c.result;typeof d=="string"&&o.push({file:l,result:d}),a()}),Ree(l,e)?c.readAsDataURL(l):a()};a()})};hi.mergeRegister=Lee;hi.objectKlassEquals=function(t,e){return t!==null?Object.getPrototypeOf(t).constructor.name===e.name:!1};hi.positionNodeOnRange=jee;hi.registerNestedElementResolver=function(t,e,n,i){return t.registerNodeTransform(e,r=>{e:{for(var o=r.getChildren(),a=0;a{typeof n=="string"&&t.classList.remove(...n.split(" "))})};var t8e=hi,ct=t8e,PH=Ui,n8e=ct,Wg=A;function zee(t,e,n,i=null){let r=i!==null?e.isSelected(i):!0,o=Wg.$isElementNode(e)&&e.excludeFromCopy("html");var a=e;i!==null&&(a=PH.$cloneWithProperties(e),a=Wg.$isTextNode(a)&&i!==null?PH.$sliceSelectedTextNodeContent(i,a):a);let s=Wg.$isElementNode(a)?a.getChildren():[];var l=t._nodes.get(a.getType());l=l&&l.exportDOM!==void 0?l.exportDOM(t,a):a.exportDOM(t);let{element:c,after:d}=l;if(!c)return!1;l=document.createDocumentFragment();for(let f=0;f"u"||typeof window>"u"&&typeof rn.window>"u")throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let n=document.createElement("div"),i=Wg.$getRoot().getChildren();for(let r=0;r{t.update(()=>{a($H(t,e))})});var n=t.getRootElement();let i=t._window==null?window.document:t._window.document,r=Hee?(t._window||window).getSelection():null;if(n===null||r===null)return!1;let o=i.createElement("span");return o.style.cssText="position: fixed; top: -1000px;",o.append(i.createTextNode("#")),n.append(o),n=new Range,n.setStart(o,0),n.setEnd(o,1),r.removeAllRanges(),r.addRange(n),new Promise(a=>{let s=t.registerCommand(Ti.COPY_COMMAND,l=>(r8e.objectKlassEquals(l,ClipboardEvent)&&(s(),bg!==null&&(window.clearTimeout(bg),bg=null),a($H(t,l))),!0),Ti.COMMAND_PRIORITY_CRITICAL);bg=window.setTimeout(()=>{s(),bg=null,a(!1)},50),i.execCommand("copy"),o.remove()})};var o8e=nd,yh=o8e,UO=yh,R2=Ui,El=ct,ce=A;function DH(t,e){return typeof document.caretRangeFromPoint<"u"?(t=document.caretRangeFromPoint(t,e),t===null?null:{node:t.startContainer,offset:t.startOffset}):document.caretPositionFromPoint!=="undefined"?(t=document.caretPositionFromPoint(t,e),t===null?null:{node:t.offsetNode,offset:t.offset}):null}var T0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a8e=T0&&"documentMode"in document?document.documentMode:null,s8e=T0&&"InputEvent"in window&&!a8e?"getTargetRanges"in new window.InputEvent("input"):!1,l8e=T0&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),c8e=T0&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,d8e=T0&&/^(?=.*Chrome).*/i.test(navigator.userAgent),u8e=T0&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!d8e,k9=ce.createCommand("DRAG_DROP_PASTE_FILE"),_$=class Xee extends ce.ElementNode{static getType(){return"quote"}static clone(e){return new Xee(e.__key)}constructor(e){super(e)}createDOM(e){let n=document.createElement("blockquote");return El.addClassNamesToElement(n,e.theme.quote),n}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:f8e,priority:0})}}exportDOM(e){if({element:e}=super.exportDOM(e),e&&El.isHTMLElement(e)){this.isEmpty()&&e.append(document.createElement("br"));var n=this.getFormatType();e.style.textAlign=n,(n=this.getDirection())&&(e.dir=n)}return{element:e}}static importJSON(e){let n=O$();return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(e,n){e=ce.$createParagraphNode();let i=this.getDirection();return e.setDirection(i),this.insertAfter(e,n),e}collapseAtStart(){let e=ce.$createParagraphNode();return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}};function O$(){return ce.$applyNodeReplacement(new _$)}var S$=class Gee extends ce.ElementNode{static getType(){return"heading"}static clone(e){return new Gee(e.__tag,e.__key)}constructor(e,n){super(n),this.__tag=e}getTag(){return this.__tag}createDOM(e){let n=this.__tag,i=document.createElement(n);return e=e.theme.heading,e!==void 0&&El.addClassNamesToElement(i,e[n]),i}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:wg,priority:0}),h2:()=>({conversion:wg,priority:0}),h3:()=>({conversion:wg,priority:0}),h4:()=>({conversion:wg,priority:0}),h5:()=>({conversion:wg,priority:0}),h6:()=>({conversion:wg,priority:0}),p:e=>(e=e.firstChild,e!==null&&IH(e)?{conversion:()=>({node:null}),priority:3}:null),span:e=>IH(e)?{conversion:()=>({node:Bg("h1")}),priority:3}:null}}exportDOM(e){if({element:e}=super.exportDOM(e),e&&El.isHTMLElement(e)){this.isEmpty()&&e.append(document.createElement("br"));var n=this.getFormatType();e.style.textAlign=n,(n=this.getDirection())&&(e.dir=n)}return{element:e}}static importJSON(e){let n=Bg(e.tag);return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(e,n=!0){let i=e?e.anchor.offset:0,r=i!==this.getTextContentSize()&&e?Bg(this.getTag()):ce.$createParagraphNode(),o=this.getDirection();return r.setDirection(o),this.insertAfter(r,n),i===0&&!this.isEmpty()&&e&&(e=ce.$createParagraphNode(),e.select(),this.replace(e,!0)),r}collapseAtStart(){let e=this.isEmpty()?ce.$createParagraphNode():Bg(this.getTag());return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}extractWithChild(){return!0}};function IH(t){return t.nodeName.toLowerCase()==="span"?t.style.fontSize==="26pt":!1}function wg(t){let e=t.nodeName.toLowerCase(),n=null;return(e==="h1"||e==="h2"||e==="h3"||e==="h4"||e==="h5"||e==="h6")&&(n=Bg(e),t.style!==null&&n.setFormat(t.style.textAlign)),{node:n}}function f8e(t){let e=O$();return t.style!==null&&e.setFormat(t.style.textAlign),{node:e}}function Bg(t){return ce.$applyNodeReplacement(new S$(t))}function h8e(t,e){t.preventDefault(),e.update(()=>{let n=ce.$getSelection(),i=t instanceof InputEvent||t instanceof KeyboardEvent?null:t.clipboardData;i!=null&&n!==null&&UO.$insertDataTransferForRichText(i,n,e)},{tag:"paste"})}async function p8e(t,e){await UO.copyToClipboard(e,El.objectKlassEquals(t,ClipboardEvent)?t:null),e.update(()=>{let n=ce.$getSelection();ce.$isRangeSelection(n)?n.removeText():ce.$isNodeSelection(n)&&n.getNodes().forEach(i=>i.remove())})}function iy(t){let e=null;if(t instanceof DragEvent?e=t.dataTransfer:t instanceof ClipboardEvent&&(e=t.clipboardData),e===null)return[!1,[],!1];var n=e.types;return t=n.includes("Files"),n=n.includes("text/html")||n.includes("text/plain"),[t,Array.from(e.files),n]}function LH(t){var e=ce.$getSelection();if(!ce.$isRangeSelection(e))return!1;let n=new Set;e=e.getNodes();for(let o=0;o{let e=ce.$getSelection();return ce.$isNodeSelection(e)?(e.clear(),!0):!1},0),t.registerCommand(ce.DELETE_CHARACTER_COMMAND,e=>{let n=ce.$getSelection();return ce.$isRangeSelection(n)?(n.deleteCharacter(e),!0):!1},ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.DELETE_WORD_COMMAND,e=>{let n=ce.$getSelection();return ce.$isRangeSelection(n)?(n.deleteWord(e),!0):!1},ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.DELETE_LINE_COMMAND,e=>{let n=ce.$getSelection();return ce.$isRangeSelection(n)?(n.deleteLine(e),!0):!1},ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.CONTROLLED_TEXT_INSERTION_COMMAND,e=>{let n=ce.$getSelection();if(typeof e=="string")n!==null&&n.insertText(e);else{if(n===null)return!1;let i=e.dataTransfer;i!=null?UO.$insertDataTransferForRichText(i,n,t):ce.$isRangeSelection(n)&&(e=e.data)&&n.insertText(e)}return!0},ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.REMOVE_TEXT_COMMAND,()=>{let e=ce.$getSelection();return ce.$isRangeSelection(e)?(e.removeText(),!0):!1},ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.FORMAT_TEXT_COMMAND,e=>{let n=ce.$getSelection();return ce.$isRangeSelection(n)?(n.formatText(e),!0):!1},ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.FORMAT_ELEMENT_COMMAND,e=>{var n=ce.$getSelection();if(!ce.$isRangeSelection(n)&&!ce.$isNodeSelection(n))return!1;n=n.getNodes();for(let i of n)n=El.$findMatchingParent(i,r=>ce.$isElementNode(r)&&!r.isInline()),n!==null&&n.setFormat(e);return!0},ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.INSERT_LINE_BREAK_COMMAND,e=>{let n=ce.$getSelection();return ce.$isRangeSelection(n)?(n.insertLineBreak(e),!0):!1},ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.INSERT_PARAGRAPH_COMMAND,()=>{let e=ce.$getSelection();return ce.$isRangeSelection(e)?(e.insertParagraph(),!0):!1},ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.INSERT_TAB_COMMAND,()=>(ce.$insertNodes([ce.$createTabNode()]),!0),ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.INDENT_CONTENT_COMMAND,()=>LH(e=>{let n=e.getIndent();e.setIndent(n+1)}),ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.OUTDENT_CONTENT_COMMAND,()=>LH(e=>{let n=e.getIndent();0{var n=ce.$getSelection();if(ce.$isNodeSelection(n)&&!F2(e.target)){if(e=n.getNodes(),0{var n=ce.$getSelection();if(ce.$isNodeSelection(n)){if(e=n.getNodes(),0{let n=ce.$getSelection();if(ce.$isNodeSelection(n)){var i=n.getNodes();if(0{let n=ce.$getSelection();if(ce.$isNodeSelection(n)&&!F2(e.target)){var i=n.getNodes();if(0{if(F2(e.target))return!1;let n=ce.$getSelection();if(!ce.$isRangeSelection(n))return!1;e.preventDefault(),{anchor:e}=n;let i=e.getNode();return n.isCollapsed()&&e.offset===0&&!ce.$isRootNode(i)&&0{if(F2(e.target))return!1;let n=ce.$getSelection();return ce.$isRangeSelection(n)?(e.preventDefault(),t.dispatchCommand(ce.DELETE_CHARACTER_COMMAND,!1)):!1},ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.KEY_ENTER_COMMAND,e=>{let n=ce.$getSelection();if(!ce.$isRangeSelection(n))return!1;if(e!==null){if((c8e||l8e||u8e)&&s8e)return!1;if(e.preventDefault(),e.shiftKey)return t.dispatchCommand(ce.INSERT_LINE_BREAK_COMMAND,!1)}return t.dispatchCommand(ce.INSERT_PARAGRAPH_COMMAND,void 0)},ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.KEY_ESCAPE_COMMAND,()=>{let e=ce.$getSelection();return ce.$isRangeSelection(e)?(t.blur(),!0):!1},ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.DROP_COMMAND,e=>{let[,n]=iy(e);if(0{[e]=iy(e);let n=ce.$getSelection();return!(e&&!ce.$isRangeSelection(n))},ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.DRAGOVER_COMMAND,e=>{var[n]=iy(e);let i=ce.$getSelection();return n&&!ce.$isRangeSelection(i)?!1:(n=DH(e.clientX,e.clientY),n!==null&&(n=ce.$getNearestNodeFromDOMNode(n.node),ce.$isDecoratorNode(n)&&e.preventDefault()),!0)},ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.SELECT_ALL_COMMAND,()=>(ce.$selectAll(),!0),ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.COPY_COMMAND,e=>(UO.copyToClipboard(t,El.objectKlassEquals(e,ClipboardEvent)?e:null),!0),ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.CUT_COMMAND,e=>(p8e(e,t),!0),ce.COMMAND_PRIORITY_EDITOR),t.registerCommand(ce.PASTE_COMMAND,e=>{let[,n,i]=iy(e);return 0{o=A.$getRoot().getTextContent()}),o}return""}function Jr(t){return{element:t.createElement("span"),type:"inner"}}var es="status:free,status:-free",Kee="status:-free",Jee="status:free",im="",v8e={web:{nonMember:!0,memberSegment:es},email:{memberSegment:es}};function zf(t){return t==null}function VO(){return JSON.parse(JSON.stringify(v8e))}function C$(t){return!Object.prototype.hasOwnProperty.call(t,"web")||!Object.prototype.hasOwnProperty.call(t,"email")||!Object.prototype.hasOwnProperty.call(t.web,"nonMember")||zf(t.web.memberSegment)||zf(t.email.memberSegment)}function ete(t){return C$(t)?t.showOnEmail===!1||t.showOnWeb===!1||t.emailOnly===!0||t.segment!=="":t.web.nonMember===!1||t.web.memberSegment!==es||t.email.memberSegment!==es}function E$(t){if(!t||!C$(t))return t;let e=JSON.parse(JSON.stringify(t));return e.web??(e.web={}),e.email??(e.email={}),zf(t.showOnWeb)&&zf(t.emailOnly)?e.web=VO().web:zf(t.emailOnly)?(e.web.nonMember=t.showOnWeb,e.web.memberSegment=t.showOnWeb?es:im):(e.web.nonMember=!t.emailOnly,e.web.memberSegment=t.emailOnly?im:es),zf(t.showOnEmail)&&zf(t.emailOnly)?e.email=VO().email:t.showOnEmail===!1||t.segment==="status:-free+status:-paid"?e.email.memberSegment=im:t.segment==="status:free"?e.email.memberSegment=Jee:t.segment==="status:paid"||t.segment==="status:-free"?e.email.memberSegment=Kee:t.segment||(e.email.memberSegment=es),e}function gb(t,e,n){let i=t.element.ownerDocument,r=y8e(t);return e=E$(e),n.target==="email"?e.email.memberSegment===im?Jr(i):e.email.memberSegment===es?t:b8e(i,r,e.email):e.web.nonMember===!1&&e.web.memberSegment===im?Jr(i):e.web.nonMember!==!0||e.web.memberSegment!==es?w8e(i,r,e.web):t}function y8e({element:t,type:e}){return e==="inner"?t.innerHTML:e==="value"?"value"in t?t.value:"":t.outerHTML}function b8e(t,e,n){let{memberSegment:i}=n,r=t.createElement("div");return r.innerHTML=e,r.setAttribute("data-gh-segment",i),r.classList.add("kg-visibility-wrapper"),{element:r,type:"html"}}function w8e(t,e,n){let{nonMember:i,memberSegment:r}=n,o=` ${e} `,a=t.createElement("textarea");return a.value=o,{element:a,type:"value"}}var k8e=Object.freeze({__proto__:null,ALL_MEMBERS_SEGMENT:es,FREE_MEMBERS_SEGMENT:Jee,NO_MEMBERS_SEGMENT:im,PAID_MEMBERS_SEGMENT:Kee,buildDefaultVisibility:VO,isOldVisibilityFormat:C$,isVisibilityRestricted:ete,migrateOldVisibilityFormat:E$,renderWithVisibility:gb});function x8e(t,e){if(!t)throw new Error({message:'[generateDecoratorNode] A unique "nodeType" should be provided'});e.forEach(n=>{if(!("name"in n)||!("default"in n))throw new Error({message:'[generateDecoratorNode] Properties should have both "name" and "default" attributes.'});if(n.urlType&&!["url","html","markdown"].includes(n.urlType))throw new Error({message:'[generateDecoratorNode] "urlType" should be either "url", "html" or "markdown"'});if("wordCount"in n&&typeof n.wordCount!="boolean")throw new Error({message:'[generateDecoratorNode] "wordCount" should be of boolean type.'})})}function ei({nodeType:t,properties:e=[],defaultRenderFn:n,version:i=1,hasVisibility:r=!1}){x8e(t,e),e=e.map(a=>({...a,privateName:`__${a.name}`})),r&&e.push({name:"visibility",get default(){return VO()},privateName:"__visibility"});class o extends pb{constructor(s={},l){super(l),e.forEach(c=>{typeof c.default=="boolean"?this[c.privateName]=s[c.name]??c.default:this[c.privateName]=s[c.name]||c.default})}static getType(){return t}static clone(s){return new this(s.getDataset(),s.__key)}static getPropertyDefaults(){return e.reduce((s,l)=>(s[l.name]=l.default,s),{})}static get urlTransformMap(){let s={};return e.forEach(l=>{l.urlType&&(l.urlPath?s[l.urlPath]=l.urlType:s[l.name]=l.urlType)}),s}getDataset(){let s=this.getLatest(),l={};return e.forEach(c=>{l[c.name]=s[c.privateName]}),l}static importJSON(s){let l={};return s.visibility=E$(s.visibility),e.forEach(c=>{l[c.name]=s[c.name]}),new this(l)}exportJSON(){return{type:t,version:i,...e.reduce((s,l)=>(s[l.name]=this[l.name],s),{})}}exportDOM(s={}){var l;let c=this.__version||i;if((l=s.nodeRenderers)!=null&&l[t]){let d=s.nodeRenderers[t];if(typeof d=="object"){let f=d[c];if(!f)throw new Error(`[generateDecoratorNode] ${t}: options.nodeRenderers['${t}'] for version ${c} is required`);return f(this,s)}else return d(this,s)}if(typeof n=="object"){let d=n[c];if(!d)throw new Error(`[generateDecoratorNode] ${t}: "defaultRenderFn" for version ${c} is required`);return d(this,s)}if(!n)throw new Error(`[generateDecoratorNode] ${t}: "defaultRenderFn" is required`);return n(this,s)}createDOM(){return document.createElement("div")}updateDOM(){return!1}isInline(){return!1}hasDynamicData(){return!1}hasEditMode(){return!0}getTextContent(){let s=this.getLatest(),l=e.filter(c=>!!c.wordCount).map(c=>m8e(s,c.name)).filter(Boolean).join(` `);return l?`${l} `:""}getIsVisibilityActive(){if(!e.some(l=>l.name==="visibility"))return!1;let s=this.getLatest().__visibility;return ete(s)}}return e.forEach(a=>{Object.defineProperty(o.prototype,a.name,{get:function(){return this.getLatest()[a.privateName]},set:function(s){let l=this.getWritable();l[a.privateName]=s}})}),o}function tte(t){return function(e,n={}){return ki(e,{createDocument:i=>{let r=t.ownerDocument.implementation.createHTMLDocument();return r.body.innerHTML=i,r},...n})}}function Ds(t,{selector:e="figcaption"}={}){let n=tte(t),i,r=Array.from(t.querySelectorAll(e));return r.length&&r.forEach(o=>{let a=n(o.innerHTML);i=i?`${i} / ${a}`:a}),i}function YO(t){let e={};if(t.src&&(e.src=t.src),t.width?e.width=t.width:t.dataset&&t.dataset.width&&(e.width=parseInt(t.dataset.width,10)),t.height?e.height=t.height:t.dataset&&t.dataset.height&&(e.height=parseInt(t.dataset.height,10)),!t.width&&!t.height&&t.getAttribute("data-image-dimensions")){let[,n,i]=/^(\d*)x(\d*)$/gi.exec(t.getAttribute("data-image-dimensions"));e.width=parseInt(n,10),e.height=parseInt(i,10)}if(t.alt&&(e.alt=t.alt),t.title&&(e.title=t.title),t.parentNode.tagName==="A"){let n=t.parentNode.href;n!==e.src&&(e.href=n)}return e}function _8e(t){return{img:()=>({conversion(e){if(e.tagName==="IMG"){let{src:n,width:i,height:r,alt:o,title:a,href:s}=YO(e);return{node:new t({alt:o,src:n,title:a,width:i,height:r,href:s})}}return null},priority:1}),figure:e=>{let n=e.querySelector("img");return n?{conversion(i){let r=i.className.match(/kg-width-(wide|full)/),o=i.className.match(/graf--layout(FillWidth|OutsetCenter)/);if(!n)return null;let a=YO(n);r?a.cardWidth=r[1]:o&&(a.cardWidth=o[1]==="FillWidth"?"full":"wide"),a.caption=Ds(i);let{src:s,width:l,height:c,alt:d,title:f,caption:h,cardWidth:g,href:m}=a;return{node:new t({alt:d,src:s,title:f,width:l,height:c,caption:h,cardWidth:g,href:m})}},priority:0}:null}}}var T$=function(t,e){let n=Object.values(e).map(({width:r})=>r).sort((r,o)=>r-o),i=n.filter(r=>r<=t.width);return t.width>i[i.length-1]&&t.width{s===e?a.push(`${t} ${s}w`):s<=e&&a.push(`${r}/size/w${s}/${o} ${s}w`)}),a.length)return a.join(", ")}if(nte(t)){let r=new URL(t),o=[];return i.forEach(a=>{r.searchParams.set("w",a),o.push(`${r.href} ${a}w`)}),o.join(", ")}},rte=function(t,e,n){if(!t||!["IMG","SOURCE"].includes(t.tagName)||!t.getAttribute("src")||!e)return;let{src:i,width:r}=e,o=ite({src:i,width:r,options:n});o&&t.setAttribute("srcset",o)},Em=function(t,{width:e,height:n}={}){let{width:i,height:r}=t,o=i/r;if(e){let a=Math.round(e/o);return{width:e,height:a}}if(n)return{width:Math.round(n*o),height:n}};function ti(t){if(!t.createDocument&&t.dom&&(t.createDocument=function(){return t.dom.window.document}),!t.createDocument){let e=typeof window<"u"&&window.document;if(!e)throw new Error("Must be passed a `createDocument` function as an option when used in a non-browser environment");t.createDocument=function(){return e}}}function O8e(t,e={}){var n;ti(e);let i=e.createDocument();if(!t.src||t.src.trim()==="")return Jr(i);let r=i.createElement("figure"),o="kg-card kg-image-card";t.cardWidth!=="regular"&&(o+=` kg-width-${t.cardWidth}`),t.caption&&(o+=" kg-card-hascaption"),r.setAttribute("class",o);let a=i.createElement("img");a.setAttribute("src",t.src),a.setAttribute("class","kg-image"),a.setAttribute("alt",t.alt),a.setAttribute("loading","lazy"),t.title&&a.setAttribute("title",t.title),t.width&&t.height&&(a.setAttribute("width",t.width),a.setAttribute("height",t.height));let{canTransformImage:s}=e,{defaultMaxWidth:l}=e.imageOptimization||{};if(l&&t.width>l&&bh(t.src,e.siteUrl)&&s&&s(t.src)){let c={width:t.width,height:t.height},{width:d,height:f}=Em(c,{width:l});a.setAttribute("width",d),a.setAttribute("height",f)}if(e.target!=="email"){let c={src:t.src,width:t.width,height:t.height};rte(a,c,e),a.getAttribute("srcset")&&t.width&&t.width>=720&&((!t.cardWidth||t.cardWidth==="regular")&&a.setAttribute("sizes","(min-width: 720px) 720px"),t.cardWidth==="wide"&&t.width>=1200&&a.setAttribute("sizes","(min-width: 1200px) 1200px"))}if(e.target==="email"&&t.width&&t.height){let c={width:t.width,height:t.height};if(t.width>=600&&(c=Em(c,{width:600})),a.setAttribute("width",c.width),a.setAttribute("height",c.height),bh(t.src,e.siteUrl)&&(n=e.canTransformImage)!=null&&n.call(e,t.src)){let d=T$(t,e.imageOptimization.contentImageSizes).find(f=>f>=1200);if(!(!d||d===t.width)){let[,f,h]=t.src.match(/(.*\/content\/images)\/(.*)/);a.setAttribute("src",`${f}/size/w${d}/${h}`)}}}if(t.href){let c=i.createElement("a");c.setAttribute("href",t.href),c.appendChild(a),r.appendChild(c)}else r.appendChild(a);if(t.caption){let c=i.createElement("figcaption");c.innerHTML=t.caption,r.appendChild(c)}return{element:r}}var Nw=class extends ei({nodeType:"image",properties:[{name:"src",default:"",urlType:"url"},{name:"caption",default:"",urlType:"html",wordCount:!0},{name:"title",default:""},{name:"alt",default:""},{name:"cardWidth",default:"regular"},{name:"width",default:null},{name:"height",default:null},{name:"href",default:"",urlType:"url"}],defaultRenderFn:O8e}){exportJSON(){let{src:t,width:e,height:n,title:i,alt:r,caption:o,cardWidth:a,href:s}=this;return{type:"image",version:1,src:t&&t.startsWith("data:")?"":t,width:e,height:n,title:i,alt:r,caption:o,cardWidth:a,href:s}}static importDOM(){return _8e(this)}hasEditMode(){return!1}},S8e=t=>new Nw(t);function C8e(t){return t instanceof Nw}function E8e(t){return{figure:e=>{let n=e.querySelector("pre");return e.tagName==="FIGURE"&&n?{conversion(i){let r=n.querySelector("code"),o=i.querySelector("figcaption");if(!r||!o)return null;let a={code:r.textContent,caption:Ds(i)},s=n.getAttribute("class")||"",l=r.getAttribute("class")||"",c=/lang(?:uage)?-(.*?)(?:\s|$)/i,d=s.match(c)||l.match(c);return d&&(a.language=d[1].toLowerCase()),{node:new t(a)}},priority:2}:null},pre:()=>({conversion(e){if(e.tagName==="PRE"){let[n]=e.children;if(n&&n.tagName==="CODE"){let i={code:n.textContent},r=e.getAttribute("class")||"",o=n.getAttribute("class")||"",a=/lang(?:uage)?-(.*?)(?:\s|$)/i,s=r.match(a)||o.match(a);return s&&(i.language=s[1].toLowerCase()),{node:new t(i)}}}return null},priority:1})}}function T8e(t,e={}){ti(e);let n=e.createDocument();if(!t.code||t.code.trim()==="")return Jr(n);let i=n.createElement("pre"),r=n.createElement("code");if(t.language&&r.setAttribute("class",`language-${t.language}`),r.appendChild(n.createTextNode(t.code)),i.appendChild(r),t.caption){let o=n.createElement("figure");o.setAttribute("class","kg-card kg-code-card"),o.appendChild(i);let a=n.createElement("figcaption");return a.innerHTML=t.caption,o.appendChild(a),{element:o}}else return{element:i}}var Pw=class extends ei({nodeType:"codeblock",properties:[{name:"code",default:"",wordCount:!0},{name:"language",default:""},{name:"caption",default:"",urlType:"html",wordCount:!0}],defaultRenderFn:T8e}){static importDOM(){return E8e(this)}isEmpty(){return!this.__code}};function M8e(t){return new Pw(t)}function N8e(t){return t instanceof Pw}function P8e(t,e={}){ti(e);let n=e.createDocument(),i=bxe.render(t.markdown||"",e),r=n.createElement("div");return r.innerHTML=i,{element:r,type:"inner"}}var Aw=class extends ei({nodeType:"markdown",properties:[{name:"markdown",default:"",urlType:"markdown",wordCount:!0}],defaultRenderFn:P8e}){isEmpty(){return!this.__markdown}};function A8e(t){return new Aw(t)}function $8e(t){return t instanceof Aw}function D8e(t){return{figure:e=>{var n;let i=(n=e.classList)==null?void 0:n.contains("kg-video-card");return e.tagName==="FIGURE"&&i?{conversion(r){let o=r.querySelector(".kg-video-container video"),a=r.querySelector(".kg-video-duration"),s=o&&o.src,l=o&&o.width,c=o&&o.height,d=a&&a.innerHTML.trim(),f=Ds(r);if(!s)return null;let h={src:s,loop:!!o.loop,cardWidth:I8e(o)};if(d){let[g,m]=d.split(":");try{h.duration=parseInt(g)*60+parseInt(m)}catch{}}return r.dataset.kgThumbnail&&(h.thumbnailSrc=r.dataset.kgThumbnail),r.dataset.kgCustomThumbnail&&(h.customThumbnailSrc=r.dataset.kgCustomThumbnail),f&&(h.caption=f),l&&(h.width=l),c&&(h.height=c),{node:new t(h)}},priority:1}:null}}}function I8e(t){return t.classList.contains("kg-width-full")?"full":t.classList.contains("kg-width-wide")?"wide":"regular"}function L8e(t,e={}){ti(e);let n=e.createDocument();if(!t.src||t.src.trim()==="")return Jr(n);let i=F8e(t).join(" "),r=e.target==="email"?R8e({node:t,options:e,cardClasses:i}):j8e({node:t,cardClasses:i}),o=n.createElement("div");return o.innerHTML=r.trim(),{element:o.firstElementChild}}function j8e({node:t,cardClasses:e}){let n=t.width,i=t.height,r=`https://img.spacergif.org/v1/${n}x${i}/0a/spacer.png`,o=t.loop?"loop autoplay muted":"",a=t.customThumbnailSrc||t.thumbnailSrc,s=t.loop?" kg-video-hide":"";return`
    0:00
    /${t.formattedDuration}
    ${t.caption?`
    ${t.caption}
    `:""}
    `}function R8e({node:t,options:e,cardClasses:n}){let i=t.customThumbnailSrc||t.thumbnailSrc,r=600,o=t.width/t.height,a=Math.round(r/4),s=Math.round(r/o),l=`https://img.spacergif.org/v1/${a}x${s}/0a/spacer.png`,c=Math.round(r/2-39),d=Math.round(s/2-39),f=Math.round(r/2-11),h=Math.round(s/2-17);return`
     
    ${t.caption?`
    ${t.caption}
    `:""}
    `}function F8e(t){let e=["kg-card kg-video-card"];return t.cardWidth&&e.push(`kg-width-${t.cardWidth}`),t.caption&&e.push("kg-card-hascaption"),e}var $w=class extends ei({nodeType:"video",properties:[{name:"src",default:"",urlType:"url"},{name:"caption",default:"",urlType:"html",wordCount:!0},{name:"fileName",default:""},{name:"mimeType",default:""},{name:"width",default:null},{name:"height",default:null},{name:"duration",default:0},{name:"thumbnailSrc",default:"",urlType:"url"},{name:"customThumbnailSrc",default:"",urlType:"url"},{name:"thumbnailWidth",default:null},{name:"thumbnailHeight",default:null},{name:"cardWidth",default:"regular"},{name:"loop",default:!1}],defaultRenderFn:L8e}){exportJSON(){let{src:t,caption:e,fileName:n,mimeType:i,width:r,height:o,duration:a,thumbnailSrc:s,customThumbnailSrc:l,thumbnailWidth:c,thumbnailHeight:d,cardWidth:f,loop:h}=this;return{type:"video",version:1,src:t&&t.startsWith("data:")?"":t,caption:e,fileName:n,mimeType:i,width:r,height:o,duration:a,thumbnailSrc:s,customThumbnailSrc:l,thumbnailWidth:c,thumbnailHeight:d,cardWidth:f,loop:h}}static importDOM(){return D8e(this)}get formattedDuration(){let t=Math.floor(this.duration/60),e=Math.floor(this.duration-t*60),n=String(e).padStart(2,"0");return`${t}:${n}`}},z8e=t=>new $w(t);function Q8e(t){return t instanceof $w}function W8e(t){return{div:e=>{var n;let i=(n=e.classList)==null?void 0:n.contains("kg-audio-card");return e.tagName==="DIV"&&i?{conversion(r){let o=r?.querySelector(".kg-audio-title"),a=r?.querySelector(".kg-audio-player-container audio"),s=r?.querySelector(".kg-audio-duration"),l=r?.querySelector(".kg-audio-thumbnail"),c=o&&o.innerHTML.trim(),d=a&&a.src,f=l&&l.src,h=s&&s.innerHTML.trim(),g={src:d,title:c};if(f&&(g.thumbnailSrc=f),h){let[m,b=0]=h.split(":");try{g.duration=parseInt(m)*60+parseInt(b)}catch{}}return{node:new t(g)}},priority:1}:null}}}function B8e(t,e={}){ti(e);let n=e.createDocument();if(!t.src||t.src.trim()==="")return Jr(n);let i=q8e(t),r=U8e(t);return e.target==="email"?Z8e(t,n,e,i,r):H8e(t,n,i,r)}function H8e(t,e,n,i){let r=e.createElement("div");r.setAttribute("class","kg-card kg-audio-card");let o=e.createElement("img");o.src=t.thumbnailSrc,o.alt="audio-thumbnail",o.setAttribute("class",n),r.appendChild(o);let a=e.createElement("div");a.setAttribute("class",i);let s=e.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("width","24"),s.setAttribute("height","24"),s.setAttribute("fill","none");let l=e.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("fill-rule","evenodd"),l.setAttribute("clip-rule","evenodd"),l.setAttribute("d","M7.5 15.33a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm-2.25.75a2.25 2.25 0 1 1 4.5 0 2.25 2.25 0 0 1-4.5 0ZM15 13.83a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm-2.25.75a2.25 2.25 0 1 1 4.5 0 2.25 2.25 0 0 1-4.5 0Z"),s.appendChild(l);let c=e.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill-rule","evenodd"),c.setAttribute("clip-rule","evenodd"),c.setAttribute("d","M14.486 6.81A2.25 2.25 0 0 1 17.25 9v5.579a.75.75 0 0 1-1.5 0v-5.58a.75.75 0 0 0-.932-.727.755.755 0 0 1-.059.013l-4.465.744a.75.75 0 0 0-.544.72v6.33a.75.75 0 0 1-1.5 0v-6.33a2.25 2.25 0 0 1 1.763-2.194l4.473-.746Z"),s.appendChild(c);let d=e.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill-rule","evenodd"),d.setAttribute("clip-rule","evenodd"),d.setAttribute("d","M3 1.5a.75.75 0 0 0-.75.75v19.5a.75.75 0 0 0 .75.75h18a.75.75 0 0 0 .75-.75V5.133a.75.75 0 0 0-.225-.535l-.002-.002-3-2.883A.75.75 0 0 0 18 1.5H3ZM1.409.659A2.25 2.25 0 0 1 3 0h15a2.25 2.25 0 0 1 1.568.637l.003.002 3 2.883a2.25 2.25 0 0 1 .679 1.61V21.75A2.25 2.25 0 0 1 21 24H3a2.25 2.25 0 0 1-2.25-2.25V2.25c0-.597.237-1.169.659-1.591Z"),s.appendChild(d),a.appendChild(s),r.appendChild(a);let f=e.createElement("div");f.setAttribute("class","kg-audio-player-container");let h=e.createElement("audio");h.setAttribute("src",t.src),h.setAttribute("preload","metadata"),f.appendChild(h);let g=e.createElement("div");g.setAttribute("class","kg-audio-title"),g.textContent=t.title,f.appendChild(g);let m=e.createElement("div");m.setAttribute("class","kg-audio-player");let b=e.createElement("button");b.setAttribute("class","kg-audio-play-icon"),b.setAttribute("aria-label","Play audio");let x=e.createElementNS("http://www.w3.org/2000/svg","svg");x.setAttribute("viewBox","0 0 24 24");let _=e.createElementNS("http://www.w3.org/2000/svg","path");_.setAttribute("d","M23.14 10.608 2.253.164A1.559 1.559 0 0 0 0 1.557v20.887a1.558 1.558 0 0 0 2.253 1.392L23.14 13.393a1.557 1.557 0 0 0 0-2.785Z"),x.appendChild(_),b.appendChild(x),m.appendChild(b);let O=e.createElement("button");O.setAttribute("class","kg-audio-pause-icon kg-audio-hide"),O.setAttribute("aria-label","Pause audio");let S=e.createElementNS("http://www.w3.org/2000/svg","svg");S.setAttribute("viewBox","0 0 24 24");let E=e.createElementNS("http://www.w3.org/2000/svg","rect");E.setAttribute("x","3"),E.setAttribute("y","1"),E.setAttribute("width","7"),E.setAttribute("height","22"),E.setAttribute("rx","1.5"),E.setAttribute("ry","1.5"),S.appendChild(E);let T=e.createElementNS("http://www.w3.org/2000/svg","rect");T.setAttribute("x","14"),T.setAttribute("y","1"),T.setAttribute("width","7"),T.setAttribute("height","22"),T.setAttribute("rx","1.5"),T.setAttribute("ry","1.5"),S.appendChild(T),O.appendChild(S),m.appendChild(O);let M=e.createElement("span");M.setAttribute("class","kg-audio-current-time"),M.textContent="0:00",m.appendChild(M);let I=e.createElement("div");I.setAttribute("class","kg-audio-time"),I.textContent="/";let F=e.createElement("span");F.setAttribute("class","kg-audio-duration"),F.textContent=t.duration,I.appendChild(F),m.appendChild(I);let W=e.createElement("input");W.setAttribute("type","range"),W.setAttribute("class","kg-audio-seek-slider"),W.setAttribute("max","100"),W.setAttribute("value","0"),m.appendChild(W);let Z=e.createElement("button");Z.setAttribute("class","kg-audio-playback-rate"),Z.setAttribute("aria-label","Adjust playback speed"),Z.innerHTML="1×",m.appendChild(Z);let j=e.createElement("button");j.setAttribute("class","kg-audio-unmute-icon"),j.setAttribute("aria-label","Unmute");let H=e.createElementNS("http://www.w3.org/2000/svg","svg");H.setAttribute("viewBox","0 0 24 24");let X=e.createElementNS("http://www.w3.org/2000/svg","path");X.setAttribute("d","M15.189 2.021a9.728 9.728 0 0 0-7.924 4.85.249.249 0 0 1-.221.133H5.25a3 3 0 0 0-3 3v2a3 3 0 0 0 3 3h1.794a.249.249 0 0 1 .221.133 9.73 9.73 0 0 0 7.924 4.85h.06a1 1 0 0 0 1-1V3.02a1 1 0 0 0-1.06-.998Z"),H.appendChild(X),j.appendChild(H),m.appendChild(j);let B=e.createElement("button");B.setAttribute("class","kg-audio-mute-icon kg-audio-hide"),B.setAttribute("aria-label","Mute");let R=e.createElementNS("http://www.w3.org/2000/svg","svg");R.setAttribute("viewBox","0 0 24 24");let U=e.createElementNS("http://www.w3.org/2000/svg","path");U.setAttribute("d","M16.177 4.3a.248.248 0 0 0 .073-.176v-1.1a1 1 0 0 0-1.061-1 9.728 9.728 0 0 0-7.924 4.85.249.249 0 0 1-.221.133H5.25a3 3 0 0 0-3 3v2a3 3 0 0 0 3 3h.114a.251.251 0 0 0 .177-.073ZM23.707 1.706A1 1 0 0 0 22.293.292l-22 22a1 1 0 0 0 0 1.414l.009.009a1 1 0 0 0 1.405-.009l6.63-6.631A.251.251 0 0 1 8.515 17a.245.245 0 0 1 .177.075 10.081 10.081 0 0 0 6.5 2.92 1 1 0 0 0 1.061-1V9.266a.247.247 0 0 1 .073-.176Z"),R.appendChild(U),B.appendChild(R),m.appendChild(B);let V=e.createElement("input");return V.setAttribute("type","range"),V.setAttribute("class","kg-audio-volume-slider"),V.setAttribute("max","100"),V.setAttribute("value","100"),m.appendChild(V),f.appendChild(m),r.appendChild(f),{element:r}}function Z8e(t,e,n,i,r){let o=`
    ${t.thumbnailSrc?` `:` `}
    ${t.title}
    ${V8e(t.duration)} \u2022 Click to play audio
    `,a=e.createElement("div");return a.innerHTML=o.trim(),{element:a.firstElementChild}}function q8e(t){let e="kg-audio-thumbnail";return t.thumbnailSrc||(e+=" kg-audio-hide"),e}function U8e(t){let e="kg-audio-thumbnail placeholder";return t.thumbnailSrc&&(e+=" kg-audio-hide"),e}function V8e(t=200){let e=Math.floor(t/60),n=Math.floor(t-e*60),i=String(n).padStart(2,"0");return`${e}:${i}`}var Dw=class extends ei({nodeType:"audio",properties:[{name:"duration",default:0},{name:"mimeType",default:""},{name:"src",default:"",urlType:"url"},{name:"title",default:""},{name:"thumbnailSrc",default:""}],defaultRenderFn:B8e}){static importDOM(){return W8e(this)}},Y8e=t=>new Dw(t);function X8e(t){return t instanceof Dw}function ote(t,e){for(let n=0;n{var e,n;let i=(n=(e=t.classList)==null?void 0:e.value)==null?void 0:n.match(/kg-callout-card-(\w+)/);return i&&i[1]};function J8e(t){return{div:e=>{var n;let i=(n=e.classList)==null?void 0:n.contains("kg-callout-card");return e.tagName==="DIV"&&i?{conversion(r){let o=r?.querySelector(".kg-callout-text"),a=r?.querySelector(".kg-callout-emoji"),s=K8e(r),l={calloutText:o&&o.innerHTML.trim()||"",calloutEmoji:a&&a.innerHTML.trim()||"",backgroundColor:s};return{node:new t(l)}},priority:1}:null}}}var Iw=class extends ei({nodeType:"callout",properties:[{name:"calloutText",default:"",wordCount:!0},{name:"calloutEmoji",default:"\u{1F4A1}"},{name:"backgroundColor",default:"blue"}],defaultRenderFn:G8e}){constructor({calloutText:t,calloutEmoji:e,backgroundColor:n}={},i){super(i),this.__calloutText=t||"",this.__calloutEmoji=e!==void 0?e:"\u{1F4A1}",this.__backgroundColor=n||"blue"}static importDOM(){return J8e(this)}};function eMe(t){return t instanceof Iw}var tMe=t=>new Iw(t),Hg=t=>t.showButton&&t.buttonUrl&&t.buttonText,ry=(t,e)=>Hg(t)?`${e}`:e;function nMe(t){(!t.buttonColor||!t.buttonColor.match(/^[a-zA-Z\d-]+|#([a-fA-F\d]{3}|[a-fA-F\d]{6})$/))&&(t.buttonColor="accent");let e=t.buttonColor==="accent"?"kg-style-accent":"",n=t.buttonColor==="accent"?`style="color: ${t.buttonTextColor};"`:`style="background-color: ${t.buttonColor}; color: ${t.buttonTextColor};"`;return`
    ${t.hasSponsorLabel?`
    ${t.sponsorLabel}
    `:""}
    ${t.imageUrl?`
    ${ry(t,`CTA Image`)}
    `:""} ${t.textValue||t.showButton?`
    ${t.textValue?`
    ${t.textValue}
    `:""} ${Hg(t)?` ${t.buttonText} `:""}
    `:""}
    `}function iMe(t,e={}){var n,i,r,o,a,s,l,c;let d=t.buttonColor==="accent"?`color: ${t.buttonTextColor};`:`background-color: ${t.buttonColor}; color: ${t.buttonTextColor};`,f=d;((n=e?.feature)!=null&&n.emailCustomization||(i=e?.feature)!=null&&i.emailCustomizationAlpha)&&((r=e?.design)==null?void 0:r.buttonStyle)==="outline"&&t.buttonColor!=="accent"&&(d=` border: 1px solid ${t.buttonColor}; background-color: transparent; color: ${t.buttonColor}; `,f=` background-color: transparent; color: ${t.buttonColor}; `);let h;if(t.imageUrl&&t.imageWidth&&t.imageHeight&&(h={width:t.imageWidth,height:t.imageHeight},t.imageWidth>=560&&(h=Em(h,{width:560}))),t.layout==="minimal"&&t.imageUrl&&bh(t.imageUrl,e.siteUrl)&&(o=e.canTransformImage)!=null&&o.call(e,t.imageUrl)){let[,g,m]=t.imageUrl.match(/(.*\/content\/images)\/(.*)/),b=((s=(a=e?.imageOptimization)==null?void 0:a.internalImageSizes)==null?void 0:s["email-cta-minimal-image"])||{width:256,height:256};t.imageUrl=`${g}/size/w${b.width}h${b.height}/${m}`}if((l=e.feature)!=null&&l.emailCustomization||(c=e.feature)!=null&&c.emailCustomizationAlpha){let g=()=>t.layout==="minimal"?` ${t.imageUrl?` `:""}
    ${ry(t,`CTA Image`)} ${t.textValue?` `:""} ${Hg(t)?` `:""}
    ${t.textValue}
    ${t.buttonText}
    `:` ${t.imageUrl?` `:""} ${Hg(t)?` `:""}
    ${ry(t,`CTA Image`)}
    ${t.textValue}
    ${t.buttonText}
    `;return` ${t.hasSponsorLabel?` `:""} ${g()}
    ${t.sponsorLabel}
    `}else{let g=()=>t.layout==="minimal"?` ${t.imageUrl?` `:""}
    ${ry(t,`CTA Image`)} ${t.textValue?` `:""} ${Hg(t)?` `:""}
    ${t.textValue}
    ${t.buttonText}
    `:` ${t.imageUrl?` `:""} ${Hg(t)?` `:""}
    ${ry(t,`CTA Image`)}
    ${t.textValue}
    ${t.buttonText}
    `;return` ${t.hasSponsorLabel?` `:""} ${g()}
    ${t.sponsorLabel}
    `}}function rMe(t,e={}){ti(e);let n=e.createDocument(),i={layout:t.layout,alignment:t.alignment,textValue:t.textValue,showButton:t.showButton,showDividers:t.showDividers,buttonText:t.buttonText,buttonUrl:t.buttonUrl,buttonColor:t.buttonColor,buttonTextColor:t.buttonTextColor,hasSponsorLabel:t.hasSponsorLabel,backgroundColor:t.backgroundColor,sponsorLabel:t.sponsorLabel,imageUrl:t.imageUrl,imageWidth:t.imageWidth,imageHeight:t.imageHeight,linkColor:t.linkColor};if((!i.backgroundColor||!i.backgroundColor.match(/^[a-zA-Z\d-]+|#([a-fA-F\d]{3}|[a-fA-F\d]{6})$/))&&(i.backgroundColor="white"),e.target==="email"){let a=e.createDocument().createElement("div");return a.innerHTML=iMe(i,e),gb({element:a.firstElementChild},t.visibility,e)}let r=n.createElement("div");if(i.hasSponsorLabel){let a=tte(r)(i.sponsorLabel,{firstChildInnerContent:!0});i.sponsorLabel=a}let o=nMe(i);return r.innerHTML=o?.trim(),gb({element:r.firstElementChild},t.visibility,e)}var Xf=t=>{if(t==="transparent")return t;try{let[e,n,i]=t.match(/\d+/g),r=parseInt(e,10).toString(16).padStart(2,"0"),o=parseInt(n,10).toString(16).padStart(2,"0"),a=parseInt(i,10).toString(16).padStart(2,"0");return`#${r}${o}${a}`}catch{return null}};function oMe(t){return{div:e=>{var n;return(n=e.classList)!=null&&n.contains("kg-cta-card")?{conversion(i){let r=i,o=r.getAttribute("data-layout")||"minimal",a=r.getAttribute("data-alignment")||"left",s=i.querySelector(".kg-cta-text"),l=i.querySelector(".kg-cta-button"),c=l?.style||{},d=c.backgroundColor||"#000000",f=c.color||"#ffffff",h=i.querySelector(".kg-cta-sponsor-label"),g=r.className.match(/kg-cta-bg-(\w+)/),m=g?g[1]:"grey",b=r.classList.contains("kg-cta-has-dividers"),x=i.querySelector(".kg-cta-image-container"),_=x?.querySelector("img"),O={imageUrl:"",imageWidth:null,imageHeight:null};if(_){let{src:E,width:T,height:M}=YO(_);O.imageUrl=E,O.imageWidth=T||null,O.imageHeight=M||null}h&&(h.innerHTML=`

    ${h.innerHTML.trim()}

    `);let S={layout:o,alignment:a,textValue:s.textContent.trim()||"",showButton:!!l,showDividers:b,buttonText:l?.textContent.trim()||"",buttonUrl:l?.getAttribute("href"),buttonColor:Xf(d),buttonTextColor:Xf(f),hasSponsorLabel:!!h,sponsorLabel:h?.innerHTML||"",backgroundColor:m,imageUrl:O.imageUrl,imageWidth:O.imageWidth,imageHeight:O.imageHeight};return{node:new t(S)}},priority:1}:null}}}var Lw=class extends ei({nodeType:"call-to-action",hasVisibility:!0,properties:[{name:"layout",default:"minimal"},{name:"alignment",default:"left"},{name:"textValue",default:"",wordCount:!0},{name:"showButton",default:!0},{name:"showDividers",default:!0},{name:"buttonText",default:"Learn more"},{name:"buttonUrl",default:""},{name:"buttonColor",default:"#000000"},{name:"buttonTextColor",default:"#ffffff"},{name:"hasSponsorLabel",default:!0},{name:"sponsorLabel",default:'

    SPONSORED

    '},{name:"backgroundColor",default:"grey"},{name:"linkColor",default:"text"},{name:"imageUrl",default:""},{name:"imageWidth",default:null},{name:"imageHeight",default:null}],defaultRenderFn:rMe}){static importDOM(){return oMe(this)}},aMe=t=>new Lw(t),sMe=t=>t instanceof Lw,x9=class{constructor(e){this.NodeClass=e}get DOMConversionMap(){let e=this;return{blockquote:()=>({conversion(n){var i;let r=(i=n.classList)==null?void 0:i.contains("kg-blockquote-alt");return n.tagName==="BLOCKQUOTE"&&r?{node:new e.NodeClass}:null},priority:0})}}},jw=class extends A.ElementNode{static getType(){return"aside"}static clone(t){return new this(t.__key)}static get urlTransformMap(){return{}}constructor(t){super(t)}static importJSON(t){let e=new this;return e.setFormat(t.format),e.setIndent(t.indent),e.setDirection(t.direction),e}exportJSON(){return{...super.exportJSON(),type:"aside",version:1}}static importDOM(){return new x9(this).DOMConversionMap}createDOM(){return document.createElement("div")}updateDOM(){return!1}isInline(){return!1}extractWithChild(){return!0}};function lMe(){return new jw}function cMe(t){return t instanceof jw}function dMe(t,e={}){return ti(e),{element:e.createDocument().createElement("hr")}}function uMe(t){return{hr:()=>({conversion(){return{node:new t}},priority:0})}}var Rw=class extends ei({nodeType:"horizontalrule",defaultRenderFn:dMe}){static importDOM(){return uMe(this)}getTextContent(){return`--- `}hasEditMode(){return!1}};function fMe(){return new Rw}function hMe(t){return t instanceof Rw}function pMe(t,e={}){ti(e);let n=e.createDocument(),i=t.html;if(!i)return Jr(n);let r=` ${i} `,o=n.createElement("textarea");return o.value=r,t.visibility?gb({element:o,type:"value"},t.visibility,e):{element:o,type:"value"}}function gMe(t){return{"#comment":e=>e.nodeType===8&&e.nodeValue.trim().match(/^kg-card-begin:\s?html$/)?{conversion(n){let i=[],r=n.nextSibling;for(;r&&!mMe(r);){let a=r;i.push(a.outerHTML),r=a.nextSibling,a.remove()}let o={html:i.join(` `).trim()};return{node:new t(o)}},priority:0}:null,table:e=>e.nodeType===1&&e.tagName==="TABLE"&&e.parentNode.tagName!=="TABLE"?{conversion(n){let i={html:n.outerHTML};return{node:new t(i)}},priority:0}:null}}function mMe(t){return t&&t.nodeType===8&&t.nodeValue.trim().match(/^kg-card-end:\s?html$/)}var Fw=class extends ei({nodeType:"html",hasVisibility:!0,properties:[{name:"html",default:"",urlType:"html",wordCount:!0}],defaultRenderFn:pMe}){static importDOM(){return gMe(this)}isEmpty(){return!this.__html}};function vMe(t){return new Fw(t)}function yMe(t){return t instanceof Fw}function bMe(t){return{div:e=>{var n;let i=(n=e.classList)==null?void 0:n.contains("kg-toggle-card");return e.tagName==="DIV"&&i?{conversion(r){let o=r.querySelector(".kg-toggle-heading-text").textContent,a=r.querySelector(".kg-toggle-content").textContent,s={heading:o,content:a};return{node:new t(s)}},priority:1}:null}}}var ate=function(t,...e){return typeof t=="string"?t.replace(/\n\s+/g,"").trim():t.reduce((n,i,r)=>n+i+(e[r]||""),"").replace(/\n\s+/g,"").trim()},rm=ate,wMe=Object.freeze({__proto__:null,html:rm,oneline:ate});function kMe({node:t}){return`

    ${t.heading}

    ${t.content}
    `}function xMe({node:t},e={}){var n,i;return(n=e.feature)!=null&&n.emailCustomization||(i=e.feature)!=null&&i.emailCustomizationAlpha?rm`

    ${t.heading}

    ${t.content}
    `:`

    ${t.heading}

    ${t.content}
    `}function _Me(t,e={}){ti(e);let n=e.createDocument(),i=e.target==="email"?xMe({node:t},e):kMe({node:t}),r=n.createElement("div");return r.innerHTML=i.trim(),{element:r.firstElementChild}}var zw=class extends ei({nodeType:"toggle",properties:[{name:"heading",default:"",urlType:"html",wordCount:!0},{name:"content",default:"",urlType:"html",wordCount:!0}],defaultRenderFn:_Me}){static importDOM(){return bMe(this)}},OMe=t=>new zw(t);function SMe(t){return t instanceof zw}function CMe(t){return{div:e=>{var n;let i=(n=e.classList)==null?void 0:n.contains("kg-button-card");return e.tagName==="DIV"&&i?{conversion(r){let o=e.className.match(/kg-align-(left|center)/),a;o&&(a=o[1]);let s=r?.querySelector(".kg-btn"),l=s.getAttribute("href"),c={buttonText:s.textContent,alignment:a,buttonUrl:l};return{node:new t(c)}},priority:1}:null}}}function EMe({alignment:t="",color:e="accent",text:n="",url:i=""}={}){let r=rt("btn",e==="accent"&&"btn-accent");return rm`
    ${n}
    `}function TMe(t,e={}){ti(e);let n=e.createDocument();return!t.buttonUrl||t.buttonUrl.trim()===""?Jr(n):e.target==="email"?NMe(t,e,n):MMe(t,n)}function MMe(t,e){let n=PMe(t),i=e.createElement("div");i.setAttribute("class",n);let r=e.createElement("a");return r.setAttribute("href",t.buttonUrl),r.setAttribute("class","kg-btn kg-btn-accent"),r.textContent=t.buttonText||"Button Title",i.appendChild(r),{element:i}}function NMe(t,e,n){var i,r;let{buttonUrl:o,buttonText:a}=t,s;if((i=e.feature)!=null&&i.emailCustomization){s=rm`
    ${a}
    `;let l=n.createElement("p");return l.innerHTML=s,{element:l}}else if((r=e.feature)!=null&&r.emailCustomizationAlpha){let l=EMe({alignment:t.alignment,color:"accent",url:o,text:a});s=rm`
    ${l}
    `;let c=n.createElement("div");return c.innerHTML=s,{element:c,type:"inner"}}else{s=rm` `;let l=n.createElement("p");return l.innerHTML=s,{element:l}}}function PMe(t){let e=["kg-card kg-button-card"];return t.alignment&&e.push(`kg-align-${t.alignment}`),e.join(" ")}var Qw=class extends ei({nodeType:"button",properties:[{name:"buttonText",default:""},{name:"alignment",default:"center"},{name:"buttonUrl",default:"",urlType:"url"}],defaultRenderFn:TMe}){static importDOM(){return CMe(this)}},AMe=t=>new Qw(t);function $Me(t){return t instanceof Qw}function DMe(t){return{figure:e=>{var n;let i=(n=e.classList)==null?void 0:n.contains("kg-bookmark-card");return e.tagName==="FIGURE"&&i?{conversion(r){var o,a,s,l,c,d,f,h;let g=(o=r?.querySelector(".kg-bookmark-container"))==null?void 0:o.getAttribute("href"),m=(a=r?.querySelector(".kg-bookmark-icon"))==null?void 0:a.src,b=(s=r?.querySelector(".kg-bookmark-title"))==null?void 0:s.textContent,x=(l=r?.querySelector(".kg-bookmark-description"))==null?void 0:l.textContent,_=(c=r?.querySelector(".kg-bookmark-publisher"))==null?void 0:c.textContent,O=(d=r?.querySelector(".kg-bookmark-author"))==null?void 0:d.textContent,S=(f=r?.querySelector(".kg-bookmark-thumbnail img"))==null?void 0:f.src,E=(h=r?.querySelector("figure.kg-bookmark-card figcaption"))==null?void 0:h.textContent,T={url:g,metadata:{icon:m,title:b,description:x,author:_,publisher:O,thumbnail:S},caption:E};return{node:new t(T)}},priority:1}:null},div:e=>e.nodeType===1&&e.tagName==="DIV"&&e.className.match(/graf--mixtapeEmbed/)?{conversion(n){let i=n.querySelector(".markup--mixtapeEmbed-anchor"),r=i.querySelector(".markup--mixtapeEmbed-strong"),o=i.querySelector(".markup--mixtapeEmbed-em"),a=n.querySelector(".mixtapeImage");n.querySelector("br").remove();let s=i.getAttribute("href"),l="",c="",d="";r&&r.innerHTML&&(l=r.innerHTML.trim(),i.removeChild(r)),o&&o.innerHTML&&(c=o.innerHTML.trim(),i.removeChild(o));let f=i.innerHTML.trim();a&&a.style["background-image"]&&(d=a.style["background-image"].match(/url\(([^)]*?)\)/)[1]);let h={url:s,metadata:{title:l,description:c,publisher:f,thumbnail:d}};return{node:new t(h)}},priority:1}:null}}function Hi(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function jH(t,e,n){if(t.length<=n)return Hi(t);if(t&&t.length>n){let i="";return t.length>n&&t.length<=e?i='\u2026':t.length>e&&(i="\u2026"),Hi(t.substring(0,n-1))+''+Hi(t.substring(n-1,e-1))+""+i}else return Hi(t??"")}function IMe(t,e={}){ti(e);let n=e.createDocument();return!t.url||t.url.trim()===""?Jr(n):e.target==="email"?LMe(t,n):jMe(t,n)}function LMe(t,e){let n=Hi(t.title),i=Hi(t.publisher),r=Hi(t.author),o=Hi(t.description),a=t.icon,s=t.url,l=t.thumbnail,c=t.caption,d=e.createElement("div"),f=`
    ${n}
    ${jH(o,120,90)}
    ${l?`
    `:""}
    ${c?`
    ${c}
    `:""}
    `;return d.innerHTML=f,{element:d}}function jMe(t,e){let n=e.createElement("figure"),i=t.caption,r="kg-card kg-bookmark-card";i&&(r+=" kg-card-hascaption"),n.setAttribute("class",r);let o=e.createElement("a");o.setAttribute("class","kg-bookmark-container"),o.href=t.url,n.appendChild(o);let a=e.createElement("div");a.setAttribute("class","kg-bookmark-content"),o.appendChild(a);let s=e.createElement("div");s.setAttribute("class","kg-bookmark-title"),s.textContent=t.title,a.appendChild(s);let l=e.createElement("div");l.setAttribute("class","kg-bookmark-description"),l.textContent=t.description,a.appendChild(l);let c=e.createElement("div");if(c.setAttribute("class","kg-bookmark-metadata"),a.appendChild(c),c.icon=t.icon,c.icon){let d=e.createElement("img");d.setAttribute("class","kg-bookmark-icon"),d.src=c.icon,d.alt="",c.appendChild(d)}if(c.publisher=t.publisher,c.publisher){let d=e.createElement("span");d.setAttribute("class","kg-bookmark-author"),d.textContent=c.publisher,c.appendChild(d)}if(c.author=t.author,c.author){let d=e.createElement("span");d.setAttribute("class","kg-bookmark-publisher"),d.textContent=c.author,c.appendChild(d)}if(c.thumbnail=t.thumbnail,c.thumbnail){let d=e.createElement("div");d.setAttribute("class","kg-bookmark-thumbnail"),o.appendChild(d);let f=e.createElement("img");f.src=c.thumbnail,f.alt="",f.setAttribute("onerror","this.style.display = 'none'"),d.appendChild(f)}if(i){let d=e.createElement("figcaption");d.innerHTML=i,n.appendChild(d)}return{element:n}}var Ww=class extends ei({nodeType:"bookmark",properties:[{name:"title",default:"",wordCount:!0},{name:"description",default:"",wordCount:!0},{name:"url",default:"",urlType:"url",wordCount:!0},{name:"caption",default:"",wordCount:!0},{name:"author",default:""},{name:"publisher",default:""},{name:"icon",urlPath:"metadata.icon",default:"",urlType:"url"},{name:"thumbnail",urlPath:"metadata.thumbnail",default:"",urlType:"url"}],defaultRenderFn:IMe}){static importDOM(){return DMe(this)}constructor({url:t,metadata:e,caption:n}={},i){super(i),this.__url=t||"",this.__icon=e?.icon||"",this.__title=e?.title||"",this.__description=e?.description||"",this.__author=e?.author||"",this.__publisher=e?.publisher||"",this.__thumbnail=e?.thumbnail||"",this.__caption=n||""}getDataset(){let t=this.getLatest();return{url:t.__url,metadata:{icon:t.__icon,title:t.__title,description:t.__description,author:t.__author,publisher:t.__publisher,thumbnail:t.__thumbnail},caption:t.__caption}}static importJSON(t){let{url:e,metadata:n,caption:i}=t;return new this({url:e,metadata:n,caption:i})}exportJSON(){return{type:"bookmark",version:1,url:this.url,metadata:{icon:this.icon,title:this.title,description:this.description,author:this.author,publisher:this.publisher,thumbnail:this.thumbnail},caption:this.caption}}isEmpty(){return!this.url}},RMe=t=>new Ww(t);function FMe(t){return t instanceof Ww}function zMe(t){if(!t)return 0;let e=["Bytes","KB","MB","GB","TB"],n=t.split(" "),i=parseFloat(n[0]),r=n[1],o=e.indexOf(r);return o===-1?0:Math.round(i*Math.pow(1024,o))}function ste(t){if(!t)return"0 Byte";let e=["Bytes","KB","MB","GB","TB"];if(t===0)return"0 Byte";let n=parseInt(Math.floor(Math.log(t)/Math.log(1024)));return Math.round(t/Math.pow(1024,n))+" "+e[n]}function QMe(t,e={}){ti(e);let n=e.createDocument();return!t.src||t.src.trim()===""?Jr(n):e.target==="email"?WMe(t,n,e):BMe(t,n)}function WMe(t,e,n){let i;!t.fileTitle&&!t.fileCaption?i="margin-top: 6px; height: 20px; width: 20px; max-width: 20px; padding-top: 4px; padding-bottom: 4px;":i="margin-top: 6px; height: 24px; width: 24px; max-width: 24px;";let r=`
    ${t.fileTitle?`
    ${Hi(t.fileTitle)}
    `:""} ${t.fileCaption?`
    ${Hi(t.fileCaption)}
    `:""}
    ${Hi(t.fileName)} • ${ste(t.fileSize)}
    `,o=e.createElement("div");return o.innerHTML=r.trim(),{element:o.firstElementChild}}function BMe(t,e){let n=e.createElement("div");n.setAttribute("class","kg-card kg-file-card");let i=e.createElement("a");i.setAttribute("class","kg-file-card-container"),i.setAttribute("href",t.src),i.setAttribute("title","Download"),i.setAttribute("download","");let r=e.createElement("div");r.setAttribute("class","kg-file-card-contents");let o=e.createElement("div");o.setAttribute("class","kg-file-card-title"),o.textContent=t.fileTitle||"";let a=e.createElement("div");a.setAttribute("class","kg-file-card-caption"),a.textContent=t.fileCaption||"";let s=e.createElement("div");s.setAttribute("class","kg-file-card-metadata");let l=e.createElement("div");l.setAttribute("class","kg-file-card-filename"),l.textContent=t.fileName||"";let c=e.createElement("div");c.setAttribute("class","kg-file-card-filesize"),c.textContent=t.formattedFileSize||"",s.appendChild(l),s.appendChild(c),r.appendChild(o),r.appendChild(a),r.appendChild(s),i.appendChild(r);let d=e.createElement("div");d.setAttribute("class","kg-file-card-icon");let f=e.createElementNS("http://www.w3.org/2000/svg","svg");f.setAttribute("viewBox","0 0 24 24");let h=e.createElementNS("http://www.w3.org/2000/svg","defs"),g=e.createElementNS("http://www.w3.org/2000/svg","style");g.textContent=".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;}",h.appendChild(g);let m=e.createElementNS("http://www.w3.org/2000/svg","title");m.textContent="download-circle";let b=e.createElementNS("http://www.w3.org/2000/svg","polyline");b.setAttribute("class","a"),b.setAttribute("points","8.25 14.25 12 18 15.75 14.25");let x=e.createElementNS("http://www.w3.org/2000/svg","line");x.setAttribute("class","a"),x.setAttribute("x1","12"),x.setAttribute("y1","6.75"),x.setAttribute("x2","12"),x.setAttribute("y2","18");let _=e.createElementNS("http://www.w3.org/2000/svg","circle");return _.setAttribute("class","a"),_.setAttribute("cx","12"),_.setAttribute("cy","12"),_.setAttribute("r","11.25"),f.appendChild(h),f.appendChild(m),f.appendChild(b),f.appendChild(x),f.appendChild(_),d.appendChild(f),i.appendChild(d),n.appendChild(i),{element:n}}function HMe(t){return{div:e=>{var n;let i=(n=e.classList)==null?void 0:n.contains("kg-file-card");return e.tagName==="DIV"&&i?{conversion(r){var o,a,s,l;let c=r.querySelector("a").getAttribute("href"),d=((o=r.querySelector(".kg-file-card-title"))==null?void 0:o.textContent)||"",f=((a=r.querySelector(".kg-file-card-caption"))==null?void 0:a.textContent)||"",h=((s=r.querySelector(".kg-file-card-filename"))==null?void 0:s.textContent)||"",g=zMe(((l=r.querySelector(".kg-file-card-filesize"))==null?void 0:l.textContent)||""),m={src:c,fileTitle:d,fileCaption:f,fileName:h,fileSize:g};return{node:new t(m)}},priority:1}:null}}}var Bw=class extends ei({nodeType:"file",properties:[{name:"src",default:"",urlType:"url"},{name:"fileTitle",default:"",wordCount:!0},{name:"fileCaption",default:"",wordCount:!0},{name:"fileName",default:""},{name:"fileSize",default:""}],defaultRenderFn:QMe}){exportJSON(){let{src:t,fileTitle:e,fileCaption:n,fileName:i,fileSize:r}=this;return{type:"file",src:t&&t.startsWith("data:")?"":t,fileTitle:e,fileCaption:n,fileName:i,fileSize:r}}static importDOM(){return HMe(this)}get formattedFileSize(){return ste(this.fileSize)}};function ZMe(t){return t instanceof Bw}var qMe=t=>new Bw(t);function XO(t){return t=t.replace(/<[^>]*>?/gm,""),t=t.replace(/[^\w\s]/gi,""),t=t.replace(/\s+/g,"-"),t=t.toLowerCase(),t}function UMe(t,e={}){ti(e);let n=e.createDocument();if(!t.header&&!t.subheader&&(!t.buttonEnabled||!t.buttonUrl||!t.buttonText))return Jr(n);let i={size:t.size,style:t.style,buttonEnabled:t.buttonEnabled&&!!t.buttonUrl&&!!t.buttonText,buttonUrl:t.buttonUrl,buttonText:t.buttonText,header:t.header,headerSlug:XO(t.header),subheader:t.subheader,subheaderSlug:XO(t.subheader),hasHeader:!!t.header,hasSubheader:!!t.subheader&&!!t.subheader.replace(/(
    )+$/g).trim(),backgroundImageStyle:t.style==="image"?`background-image: url(${t.backgroundImageSrc})`:"",backgroundImageSrc:t.backgroundImageSrc},r=n.createElement("div");if(r.classList.add("kg-card","kg-header-card","kg-width-full",`kg-size-${i.size}`,`kg-style-${i.style}`),r.setAttribute("data-kg-background-image",i.backgroundImageSrc),r.setAttribute("style",i.backgroundImageStyle),i.hasHeader){let o=n.createElement("h2");o.classList.add("kg-header-card-header"),o.setAttribute("id",i.headerSlug),o.innerHTML=i.header,r.appendChild(o)}if(i.hasSubheader){let o=n.createElement("h3");o.classList.add("kg-header-card-subheader"),o.setAttribute("id",i.subheaderSlug),o.innerHTML=i.subheader,r.appendChild(o)}if(i.buttonEnabled){let o=n.createElement("a");o.classList.add("kg-header-card-button"),o.setAttribute("href",i.buttonUrl),o.textContent=i.buttonText,r.appendChild(o)}return{element:r}}function VMe(t){return{div:e=>{var n,i,r,o;let a=((n=e.classList)==null?void 0:n.contains("kg-header-card"))&&!((i=e.classList)!=null&&i.contains("kg-v2")),s=((r=e.classList)==null?void 0:r.contains("kg-header-card"))&&((o=e.classList)==null?void 0:o.contains("kg-v2"));return e.tagName==="DIV"&&a?{conversion(l){let c=l,d=l.querySelector(".kg-header-card-header"),f=l.querySelector(".kg-header-card-subheader"),h=l.querySelector(".kg-header-card-button"),g=c.classList.contains("kg-size-large")?"large":"small",m=c.classList.contains("kg-style-image")?"image":"text",b=c.getAttribute("data-kg-background-image"),x=d?d.textContent:"",_=f?f.textContent:"",O=!!h,S=O?h.getAttribute("href"):"",E=O?h.textContent:"",T={size:g,style:m,backgroundImageSrc:b,header:x,subheader:_,buttonEnabled:O,buttonUrl:S,buttonText:E,version:1};return{node:new t(T)}},priority:1}:e.tagName==="DIV"&&s?{conversion(l){var c;let d=l,f=d.querySelector(".kg-header-card-heading"),h=d.querySelector(".kg-header-card-subheading"),g=d.querySelector(".kg-header-card-button"),m=d.classList.contains("kg-align-center")?"center":"",b=(c=d.querySelector(".kg-header-card-image"))==null?void 0:c.getAttribute("src"),x=b?"split":"",_=d.classList.contains("kg-style-accent")?"accent":d.getAttribute("data-background-color"),O=g?.getAttribute("data-button-color")||"",S=f?.getAttribute("data-text-color")||"",E=g?.getAttribute("data-button-text-color")||"",T=f?.textContent||"",M=h?.textContent||"",I=!!g,F=I?g.getAttribute("href"):"",W=I?g.textContent:"",Z={backgroundColor:_,buttonColor:O,alignment:m,backgroundImageSrc:b,layout:x,textColor:S,header:T,subheader:M,buttonEnabled:I,buttonUrl:F,buttonText:W,buttonTextColor:E,version:2};return{node:new t(Z)}},priority:1}:null}}}function YMe(t,e={}){let n=KMe(t).join(" "),i=t.backgroundColor==="accent"?"kg-style-accent":"",r=t.buttonColor==="accent"?"kg-style-accent":"",o=t.buttonColor!=="accent"?`background-color: ${t.buttonColor};`:"",a=t.alignment==="center"?"kg-align-center":"",s=t.backgroundColor!=="accent"&&(!t.backgroundImageSrc||t.layout==="split")?`background-color: ${t.backgroundColor}`:"",l="";if(t.backgroundImageSrc){let g={src:t.backgroundImageSrc,width:t.backgroundImageWidth,height:t.backgroundImageHeight},m=ite({...g,options:e}),b=m?`srcset="${m}"`:"";l=` `}let c=()=>t.header?`

    ${t.header}

    `:"",d=()=>t.subheader?`

    ${t.subheader}

    `:"",f=()=>t.buttonEnabled&&t.buttonUrl&&t.buttonUrl.trim()!==""?`${t.buttonText}`:"",h=s?`style="${s};"`:"";return`
    ${t.layout!=="split"?l:""}
    ${t.layout==="split"?l:""}
    ${c()} ${d()} ${f()}
    `}function XMe(t,e){var n,i,r,o,a;let s=t.backgroundColor==="accent"?`background-color: ${t.accentColor};`:"",l=t.buttonColor==="accent"?`background-color: ${t.accentColor};`:t.buttonColor,c=t.buttonColor!=="accent"?`background-color: ${t.buttonColor};`:"",d=t.buttonTextColor,f=t.alignment==="center"?"text-align: center;":"",h=t.backgroundImageSrc?t.layout!=="split"?`background-image: url(${t.backgroundImageSrc}); background-size: cover; background-position: center center;`:`background-color: ${t.backgroundColor};`:`background-color: ${t.backgroundColor};`,g=`background-image: url(${t.backgroundImageSrc}); background-size: ${t.backgroundSize!=="contain"?"cover":"50%"}; background-position: center`;return((n=e?.feature)!=null&&n.emailCustomization||(i=e?.feature)!=null&&i.emailCustomizationAlpha)&&((r=e?.design)==null?void 0:r.buttonStyle)==="outline"&&(t.buttonColor==="accent"?(l="",c=` border: 1px solid ${t.accentColor}; background-color: transparent; color: ${t.accentColor} !important; `,d=t.accentColor):(c=` border: 1px solid ${t.buttonColor}; background-color: transparent; color: ${t.buttonColor} !important; `,d=t.buttonColor)),(o=e?.feature)!=null&&o.emailCustomization||(a=e?.feature)!=null&&a.emailCustomizationAlpha?`
    ${t.layout==="split"&&t.backgroundImageSrc?`
    `:""}
    ${t.buttonEnabled&&t.buttonUrl&&t.buttonUrl.trim()!==""?` `:""}

    ${t.header}

    ${t.subheader}

    ${t.buttonText}
    `:`
    ${t.layout==="split"&&t.backgroundImageSrc?`
    `:""}

    ${t.header}

    ${t.subheader}

    ${t.buttonEnabled&&t.buttonUrl&&t.buttonUrl.trim()!==""?` ${t.buttonText} `:""}
    `}function GMe(t,e={}){var n;ti(e);let i=e.createDocument(),r={alignment:t.__alignment,buttonText:t.__buttonText,buttonEnabled:t.__buttonEnabled,buttonUrl:t.__buttonUrl,header:t.__header,subheader:t.__subheader,backgroundImageSrc:t.__backgroundImageSrc,backgroundImageWidth:t.__backgroundImageWidth,backgroundImageHeight:t.__backgroundImageHeight,backgroundSize:t.__backgroundSize,backgroundColor:t.__backgroundColor,buttonColor:t.__buttonColor,layout:t.__layout,textColor:t.__textColor,buttonTextColor:t.__buttonTextColor,swapped:t.__swapped,accentColor:t.__accentColor};if(e.target==="email"){let s=e.createDocument().createElement("div");return s.innerHTML=(n=XMe(r,e))==null?void 0:n.trim(),{element:s.firstElementChild}}let o=YMe(r,e),a=i.createElement("div");if(a.innerHTML=o?.trim(),r.header===""){let s=a.querySelector(".kg-header-card-heading");s&&s.remove()}if(r.subheader===""){let s=a.querySelector(".kg-header-card-subheading");s&&s.remove()}return{element:a.firstElementChild}}function KMe(t){let e=["kg-card kg-header-card kg-v2"];return t.layout&&t.layout!=="split"&&e.push(`kg-width-${t.layout}`),t.layout==="split"&&e.push("kg-layout-split kg-width-full"),t.swapped&&t.layout==="split"&&e.push("kg-swapped"),t.layout&&t.layout==="full"&&e.push("kg-content-wide"),t.layout==="split"&&t.backgroundSize==="contain"&&e.push("kg-content-wide"),e}var Hw=class extends ei({nodeType:"header",properties:[{name:"size",default:"small"},{name:"style",default:"dark"},{name:"buttonEnabled",default:!1},{name:"buttonUrl",default:"",urlType:"url"},{name:"buttonText",default:""},{name:"header",default:"",urlType:"html",wordCount:!0},{name:"subheader",default:"",urlType:"html",wordCount:!0},{name:"backgroundImageSrc",default:"",urlType:"url"},{name:"version",default:1},{name:"accentColor",default:"#FF1A75"},{name:"alignment",default:"center"},{name:"backgroundColor",default:"#000000"},{name:"backgroundImageWidth",default:null},{name:"backgroundImageHeight",default:null},{name:"backgroundSize",default:"cover"},{name:"textColor",default:"#FFFFFF"},{name:"buttonColor",default:"#ffffff"},{name:"buttonTextColor",default:"#000000"},{name:"layout",default:"full"},{name:"swapped",default:!1}],defaultRenderFn:{1:UMe,2:GMe}}){static importDOM(){return VMe(this)}},JMe=t=>new Hw(t);function e9e(t){return t instanceof Hw}function t9e(t){return{"#comment":e=>e.nodeType===8&&e.nodeValue.trim()==="members-only"?{conversion(){return{node:new t}},priority:0}:null}}function n9e(t,e={}){ti(e);let n=e.createDocument().createElement("div");return n.innerHTML="",{element:n,type:"inner"}}var Zw=class extends ei({nodeType:"paywall",defaultRenderFn:n9e}){static importDOM(){return t9e(this)}},i9e=t=>new Zw(t);function r9e(t){return t instanceof Zw}function o9e(t){return{div:e=>{var n;let i=(n=e.classList)==null?void 0:n.contains("kg-product-card");return e.tagName==="DIV"&&i?{conversion(r){let o=Ds(r,{selector:".kg-product-card-title"}),a=Ds(r,{selector:".kg-product-card-description"}),s={productButtonEnabled:!1,productRatingEnabled:!1,productTitle:o,productDescription:a},l=r.querySelector(".kg-product-card-image");l&&l.getAttribute("src")&&(s.productImageSrc=l.getAttribute("src"),l.getAttribute("width")&&(s.productImageWidth=l.getAttribute("width")),l.getAttribute("height")&&(s.productImageHeight=l.getAttribute("height")));let c=[...r.querySelectorAll(".kg-product-card-rating-active")].length;c&&(s.productRatingEnabled=!0,s.productStarRating=c);let d=r.querySelector("a");if(d){let f=d.getAttribute("href"),h=a9e(d);f&&h&&(s.productButtonEnabled=!0,s.productButton=h,s.productUrl=f)}return!o&&!a&&!l&&!d?null:{node:new t(s)}},priority:1}:null}}}function a9e(t){let e=t.textContent;return e&&(e=e.replace(/\n/g," ").replace(/\s+/g," ").trim()),e}function s9e(t,e={}){var n,i,r;ti(e);let o=e.createDocument();if(t.isEmpty())return Jr(o);let a="5px";((n=e.design)==null?void 0:n.buttonCorners)==="rounded"?a="6px":((i=e.design)==null?void 0:i.buttonCorners)==="square"?a="0px":((r=e.design)==null?void 0:r.buttonCorners)==="pill"&&(a="9999px");let s={...t.getDataset(),starIcon:'',buttonBorderRadius:a},l="kg-product-card-rating-active";for(let f=1;f<=5;f++)s["star"+f]="",t.productStarRating>=f&&(s["star"+f]=l);let c=e.target==="email"?c9e({data:s,feature:e.feature}):l9e({data:s,feature:e.feature}),d=o.createElement("div");return d.innerHTML=c.trim(),{element:d.firstElementChild}}function l9e({data:t}){return`
    ${t.productImageSrc?``:""}

    ${t.productTitle}

    ${t.productRatingEnabled?`
    ${t.starIcon} ${t.starIcon} ${t.starIcon} ${t.starIcon} ${t.starIcon}
    `:""}
    ${t.productDescription}
    ${t.productButtonEnabled?` ${t.productButton} `:""}
    `}function c9e({data:t,feature:e}){let n;return t.productImageWidth&&t.productImageHeight&&(n={width:t.productImageWidth,height:t.productImageHeight},t.productImageWidth>=560&&(n=Em(n,{width:560}))),e!=null&&e.emailCustomization||e!=null&&e.emailCustomizationAlpha?`
    ${t.productImageSrc?` `:""} ${t.productRatingEnabled?` `:""} ${t.productButtonEnabled?` `:""}

    ${t.productTitle}

    ${t.productDescription}
    ${t.productButton}
    `:` ${t.productImageSrc?` `:""} ${t.productRatingEnabled?` `:""} ${t.productButtonEnabled?` `:""}

    ${t.productTitle}

    ${t.productDescription}
    `}var qw=class extends ei({nodeType:"product",properties:[{name:"productImageSrc",default:"",urlType:"url"},{name:"productImageWidth",default:null},{name:"productImageHeight",default:null},{name:"productTitle",default:"",urlType:"html",wordCount:!0},{name:"productDescription",default:"",urlType:"html",wordCount:!0},{name:"productRatingEnabled",default:!1},{name:"productStarRating",default:5},{name:"productButtonEnabled",default:!1},{name:"productButton",default:""},{name:"productUrl",default:""}],defaultRenderFn:s9e}){exportJSON(){let{productImageSrc:t,productImageWidth:e,productImageHeight:n,productTitle:i,productDescription:r,productRatingEnabled:o,productStarRating:a,productButtonEnabled:s,productButton:l,productUrl:c}=this;return{type:"product",version:1,productImageSrc:t&&t.startsWith("data:")?"":t,productImageWidth:e,productImageHeight:n,productTitle:i,productDescription:r,productRatingEnabled:o,productStarRating:a,productButtonEnabled:s,productButton:l,productUrl:c}}static importDOM(){return o9e(this)}isEmpty(){let t=this.__productButtonEnabled&&this.__productUrl&&this.__productButton;return!this.__productTitle&&!this.__productDescription&&!t&&!this.__productImageSrc&&!this.__productRatingEnabled}},d9e=t=>new qw(t);function u9e(t){return t instanceof qw}function f9e(t){return{figure:e=>{if(e.nodeType===1&&e.tagName==="FIGURE"){let n=e.querySelector("iframe");if(n)return{conversion(i){let r=RH(n);return r?(r.caption=Ds(i),{node:new t(r)}):null},priority:1};if(e.querySelector("blockquote"))return{conversion(i){let r=i.querySelector("a");if(!r)return null;let o=r.getAttribute("href");if(!o||!o.match(/^https?:\/\//i))return null;let a={url:o};a.caption=Ds(i);let s=i.querySelector("figcaption");return s?.remove(),a.html=i.innerHTML,{node:new t(a)}},priority:1}}return null},iframe:e=>e.nodeType===1&&e.tagName==="IFRAME"?{conversion(n){let i=RH(n);return i?{node:new t(i)}:null},priority:1}:null}}function RH(t){if(!t.src||!t.src.match(/^(https?:)?\/\//i))return;t.src.match(/^\/\//)&&(t.src=`https:${t.src}`);let e={url:t.src};return e.html=t.outerHTML,e}function h9e(t,e,n){let i=t.metadata,r=e.createElement("figure");r.setAttribute("class","kg-card kg-embed-card");let o=t.html,a=i&&i.tweet_data,s=n.target==="email";if(a&&s){let c=a.id,d=new Intl.NumberFormat("en-US",{style:"decimal",notation:"compact",unitDisplay:"narrow",maximumFractionDigits:1}),f=d.format(a.public_metrics.retweet_count),h=d.format(a.public_metrics.like_count),g=a.users&&a.users.find(F=>F.id===a.author_id),m=on.fromISO(a.created_at).toLocaleString(on.TIME_SIMPLE),b=on.fromISO(a.created_at).toLocaleString(on.DATE_MED),x=a.entities&&a.entities.mentions||[],_=a.entities&&a.entities.urls||[],O=a.entities&&a.entities.hashtags||[],S=x.concat(_).concat(O).sort((F,W)=>F.start-W.start),E=a.text,T=null,M=a.attachments&&a.attachments&&a.attachments.media_keys;M&&(T=a.includes.media[0].preview_image_url||a.includes.media[0].url);let I=a.attachments&&a.attachments&&a.attachments.poll_ids;if(x){let F=0,W=[],Z=_4e(E);for(let j of S){let H="text",X=Z.slice(j.start,j.end+1).join("").replace(/\n/g,"
    ");j.url&&(!j.display_url||j.display_url.startsWith("pic.twitter.com")?H="img_url":(H="url",X=X.replace(j.url,j.display_url))),j.username&&(H="mention"),j.tag&&(H="hashtag"),W.push({type:"text",data:Z.slice(F,j.start).join("").replace(/\n/g,"
    ")}),W.push({type:H,data:X}),F=j.end+1}W.push({type:"text",data:Z.slice(F,Z.length).join("").replace(/\n/g,"
    ")}),E=W.reduce((j,H)=>H.type==="text"?j+H.data:H.type==="mention"?j+`${H.data}`:H.type==="hashtag"?j+`${H.data}`:H.type==="url"?j+`${H.data}`:j,"")}o=`
    ${g?` ${g.profile_image_url?``:""} ${g.name?` `:""} `:""} ${M?``:""}
    ${g.name}
    @${g.username}
    ${E} ${I?'
    View poll →':""}
    ${m} • ${b}
    ${h} likes • ${f} retweets
    `}r.innerHTML=o.trim();let l=t.caption;if(l){let c=e.createElement("figcaption");c.innerHTML=l,r.appendChild(c),r.setAttribute("class",`${r.getAttribute("class")} kg-card-hascaption`)}return{element:r}}function p9e(t,e={}){ti(e);let n=e.createDocument();return t.embedType==="twitter"?h9e(t,n,e):g9e(t,n,e)}function g9e(t,e,n){if(t.isEmpty())return Jr(e);let i=n.target==="email",r=t.metadata,o=t.url,a=t.embedType==="video"&&r&&r.thumbnail_url,s=e.createElement("figure");if(s.setAttribute("class","kg-card kg-embed-card"),i&&a){let c=r.thumbnail_width/r.thumbnail_height,d=Math.round(600/4),f=Math.round(600/c),h=`
     
    `;s.innerHTML=h.trim()}else s.innerHTML=t.html;let l=t.caption;if(l){let c=e.createElement("figcaption");c.innerHTML=l,s.appendChild(c),s.setAttribute("class",`${s.getAttribute("class")} kg-card-hascaption`)}return{element:s}}var Uw=class extends ei({nodeType:"embed",properties:[{name:"url",default:"",urlType:"url"},{name:"embedType",default:""},{name:"html",default:""},{name:"metadata",default:{}},{name:"caption",default:"",wordCount:!0}],defaultRenderFn:p9e}){static importDOM(){return f9e(this)}isEmpty(){return!this.__url&&!this.__html}},m9e=t=>new Uw(t);function v9e(t){return t instanceof Uw}function _9(t){return t.replace(/\n/g," ").replace(/\s+/g," ").trim()}function O9(t){return t.replace(/\{(\w*?)(?:,? *"(.*?)")?\}/g,"%%$&%%")}function S9(t,e){let n=e.createElement("div");return n.innerHTML=t,n.querySelectorAll("code").forEach(i=>{if(i.textContent.match(/((.*?){.*?}(.*?))/gi)){let r=i.innerHTML;i.parentNode.replaceChild(e.createRange().createContextualFragment(r),i)}}),n.innerHTML}function y9e(t,e={}){ti(e);let n=e.createDocument(),i=t.html;if(!i||e.target!=="email")return Jr(n);let r=O9(S9(_9(i),n)),o=n.createElement("div");return o.innerHTML=r,{element:o,type:"inner"}}var Vw=class extends ei({nodeType:"email",properties:[{name:"html",default:"",urlType:"html"}],defaultRenderFn:y9e}){},b9e=t=>new Vw(t);function w9e(t){return t instanceof Vw}function t8(t,e){let n=YO(t);return n.fileName=t.src.match(/[^/]*$/)[0],n.row=Math.floor(e/3),n}function k9e(t){return{figure:e=>{var n;return(n=e.classList)!=null&&n.contains("kg-gallery-card")?{conversion(i){let r={},o=Array.from(i.querySelectorAll("img"));return r.images=o.map(t8),r.caption=Ds(i),{node:new t(r)}},priority:1}:null},div:e=>{function n(r){var o;return r.tagName==="DIV"&&((o=r.dataset)==null?void 0:o.paragraphCount)&&r.querySelectorAll("img").length>0}if(n(e))return{conversion(r){let o={caption:Ds(r)},a=Array.from(r.querySelectorAll("img")),s=r.nextElementSibling;for(;s&&n(s);){let l=s;a=a.concat(Array.from(l.querySelectorAll("img")));let c=Ds(l);c&&(o.caption=`${o.caption} / ${c}`),s=l.nextElementSibling,l.remove()}return o.images=a.map(t8),{node:new t(o)}},priority:1};function i(r){return r.tagName==="DIV"&&r.className.match(/sqs-gallery-container/)&&!r.className.match(/summary-/)}return i(e)?{conversion(r){let o={},a=Array.from(r.querySelectorAll("img.thumb-image"));return a=a.map(s=>{if(!s.getAttribute("src"))if(s.previousElementSibling.tagName==="NOSCRIPT"&&s.previousElementSibling.getElementsByTagName("img").length){let l=s.previousElementSibling;s.setAttribute("src",s.getAttribute("data-src")),l.remove()}else return;return s}).filter(s=>s!==void 0),o.images=a.map(t8),o.caption=Ds(r,{selector:".meta-title"}),{node:new t(o)}},priority:1}:null}}}var x9e=3;function _9e(t){return t.fileName&&t.src&&t.width&&t.height}function O9e(t){let e=[],n=t.length;return t.forEach((i,r)=>{let o=i.row;n>1&&n%x9e===1&&r===n-2&&(o=o+1),e[o]||(e[o]=[]),e[o].push(i)}),e}function S9e(t,e={}){ti(e);let n=e.createDocument(),i=t.images.filter(_9e);if(!i.length)return Jr(n);let r=n.createElement("figure");r.setAttribute("class","kg-card kg-gallery-card kg-width-wide");let o=n.createElement("div");o.setAttribute("class","kg-gallery-container"),r.appendChild(o);let a=O9e(i);if(a.forEach(s=>{let l=n.createElement("div");l.setAttribute("class","kg-gallery-row"),s.forEach(c=>{let d=n.createElement("div");d.setAttribute("class","kg-gallery-image");let f=n.createElement("img");f.setAttribute("src",c.src),f.setAttribute("width",c.width),f.setAttribute("height",c.height),f.setAttribute("loading","lazy"),f.setAttribute("alt",c.alt||""),c.title&&f.setAttribute("title",c.title);let{canTransformImage:h}=e,{defaultMaxWidth:g}=e.imageOptimization||{};if(g&&c.width>g&&bh(c.src,e.siteUrl)&&h&&h(c.src)){let{width:m,height:b}=Em(c,{width:g});f.setAttribute("width",m),f.setAttribute("height",b)}if(e.target!=="email"&&(rte(f,c,e),f.getAttribute("srcset")&&c.width>=720&&(a.length===1&&s.length===1&&c.width>=1200?f.setAttribute("sizes","(min-width: 1200px) 1200px"):f.setAttribute("sizes","(min-width: 720px) 720px"))),e.target==="email"){if(c.width>600){let m=Em(c,{width:600});f.setAttribute("width",m.width),f.setAttribute("height",m.height)}if(bh(c.src,e.siteUrl)&&e.canTransformImage&&e.canTransformImage(c.src)){let m=T$(c,e.imageOptimization.contentImageSizes).find(b=>b>=1200);if(!(!m||m===c.width)){let[,b,x]=c.src.match(/(.*\/content\/images)\/(.*)/);f.setAttribute("src",`${b}/size/w${m}/${x}`)}}if(nte(c.src)){let m=new URL(c.src);m.searchParams.set("w",1200),f.setAttribute("src",m.href)}}if(c.href){let m=n.createElement("a");m.setAttribute("href",c.href),m.appendChild(f),d.appendChild(m)}else d.appendChild(f);l.appendChild(d)}),o.appendChild(l)}),t.caption){let s=n.createElement("figcaption");s.innerHTML=t.caption,r.appendChild(s),r.setAttribute("class",`${r.getAttribute("class")} kg-card-hascaption`)}return{element:r}}var Yw=class extends ei({nodeType:"gallery",properties:[{name:"images",default:[]},{name:"caption",default:"",wordCount:!0}],defaultRenderFn:S9e}){static get urlTransformMap(){return{caption:"html",images:{src:"url",caption:"html"}}}static importDOM(){return k9e(this)}hasEditMode(){return!1}},C9e=t=>new Yw(t);function E9e(t){return t instanceof Yw}function T9e(t,e={}){ti(e);let n=e.createDocument(),{html:i,buttonText:r,buttonUrl:o,showButton:a,alignment:s,segment:l,showDividers:c}=t,d=a&&!!r&&!!o;if(!i&&!d||e.target!=="email")return Jr(n);let f=n.createElement("div");l&&f.setAttribute("data-gh-segment",l),s==="center"&&f.setAttribute("class","align-center"),c&&f.appendChild(n.createElement("hr"));let h=O9(S9(_9(i),n));if(f.innerHTML=f.innerHTML+h,d){let g=`

    `,m=O9(S9(_9(g),n));f.innerHTML=f.innerHTML+m}return c&&f.appendChild(n.createElement("hr")),{element:f}}var Xw=class extends ei({nodeType:"email-cta",properties:[{name:"alignment",default:"left"},{name:"buttonText",default:""},{name:"buttonUrl",default:"",urlType:"url"},{name:"html",default:"",urlType:"html"},{name:"segment",default:"status:free"},{name:"showButton",default:!1},{name:"showDividers",default:!0}],defaultRenderFn:T9e}){},M9e=t=>new Xw(t);function N9e(t){return t instanceof Xw}function P9e(t){return t.classList.contains("kg-layout-split")?"split":t.classList.contains("kg-layout-full")?"full":t.classList.contains("kg-layout-wide")?"wide":"regular"}function A9e(t){return{div:e=>{var n;let i=((n=e.dataset)==null?void 0:n.lexicalSignupForm)==="";return e.tagName==="DIV"&&i?{conversion(r){var o,a,s,l,c,d,f,h,g,m,b,x,_,O,S;let E=P9e(r),T=((o=r.querySelector("h2"))==null?void 0:o.textContent)||"",M=((a=r.querySelector("h3"))==null?void 0:a.textContent)||"",I=((s=r.querySelector("p"))==null?void 0:s.textContent)||"",F=(l=r.querySelector(".kg-signup-card-image"))==null?void 0:l.getAttribute("src"),W=r.style.backgroundColor||"",Z=((c=r.querySelector(".kg-signup-card-button"))==null?void 0:c.style.backgroundColor)||"",j=((f=(d=r.querySelector(".kg-signup-card-button-default"))==null?void 0:d.textContent)==null?void 0:f.trim())||"Subscribe",H=((h=r.querySelector(".kg-signup-card-button"))==null?void 0:h.style.color)||"",X=((g=r.querySelector(".kg-signup-card-success"))==null?void 0:g.style.color)||"",B=(m=r.querySelector(".kg-signup-card-text"))!=null&&m.classList.contains("kg-align-center")?"center":"left",R=((x=(b=r.querySelector(".kg-signup-card-success"))==null?void 0:b.textContent)==null?void 0:x.trim())||"",U=[...r.querySelectorAll("input[data-members-label]")].map(q=>q.value),V=((_=r.classList)==null?void 0:_.contains("kg-style-accent"))??!1,K=((S=(O=r.querySelector(".kg-signup-card-button"))==null?void 0:O.classList)==null?void 0:S.contains("kg-style-accent"))??!1,te=r.classList.contains("kg-swapped"),oe=r.classList.contains("kg-content-wide")?"contain":"cover",le={layout:E,buttonText:j,header:T,subheader:M,disclaimer:I,backgroundImageSrc:F,backgroundSize:oe,backgroundColor:V?"accent":Xf(W)||"#ffffff",buttonColor:K?"accent":Xf(Z)||"#ffffff",textColor:Xf(X)||"#ffffff",buttonTextColor:Xf(H)||"#000000",alignment:B,successMessage:R,labels:U,swapped:te};return{node:new t(le)}},priority:1}:null}}}function $9e(t){let e=L9e(t).join(" "),n=j9e(t),i=t.buttonColor==="accent"?"kg-style-accent":"",r=t.buttonColor!=="accent"?`background-color: ${t.buttonColor};`:"",o=t.alignment==="center"?"kg-align-center":"",a=t.backgroundColor!=="accent"&&(!t.backgroundImageSrc||t.layout==="split")?`background-color: ${t.backgroundColor}`:"",s=t.backgroundImageSrc?` `:"",l=` `;return` `}function D9e(){return` `}function I9e(t,e={}){ti(e);let n=e.createDocument(),i={alignment:t.__alignment,buttonText:t.__buttonText,header:t.__header,subheader:t.__subheader,disclaimer:t.__disclaimer,backgroundImageSrc:t.__backgroundImageSrc,backgroundSize:t.__backgroundSize,backgroundColor:t.__backgroundColor,buttonColor:t.__buttonColor,labels:t.__labels,layout:t.__layout,textColor:t.__textColor,buttonTextColor:t.__buttonTextColor,successMessage:t.__successMessage,swapped:t.__swapped};if(e.target==="email")return{element:n.createElement("div")};let r=$9e(i),o=n.createElement("div");if(o.innerHTML=r?.trim(),i.header===""){let a=o.querySelector(".kg-signup-card-heading");a&&a.remove()}if(i.subheader===""){let a=o.querySelector(".kg-signup-card-subheading");a&&a.remove()}if(i.disclaimer===""){let a=o.querySelector(".kg-signup-card-disclaimer");a&&a.remove()}return{element:o.firstElementChild}}function L9e(t){let e=["kg-card kg-signup-card"];return t.layout&&t.layout!=="split"&&e.push(`kg-width-${t.layout}`),t.layout==="split"&&e.push("kg-layout-split kg-width-full"),t.swapped&&t.layout==="split"&&e.push("kg-swapped"),t.layout&&t.layout==="full"&&e.push("kg-content-wide"),t.layout==="split"&&t.backgroundSize==="contain"&&e.push("kg-content-wide"),e}var j9e=t=>t.layout==="split"&&t.backgroundColor==="accent"||t.layout!=="split"&&!t.backgroundImageSrc&&t.backgroundColor==="accent"?"kg-style-accent":"",Gw=class extends ei({nodeType:"signup",properties:[{name:"alignment",default:"left"},{name:"backgroundColor",default:"#F0F0F0"},{name:"backgroundImageSrc",default:""},{name:"backgroundSize",default:"cover"},{name:"textColor",default:""},{name:"buttonColor",default:"accent"},{name:"buttonTextColor",default:"#FFFFFF"},{name:"buttonText",default:"Subscribe"},{name:"disclaimer",default:"",wordCount:!0},{name:"header",default:"",wordCount:!0},{name:"labels",default:[]},{name:"layout",default:"wide"},{name:"subheader",default:"",wordCount:!0},{name:"successMessage",default:"Email sent! Check your inbox to complete your signup."},{name:"swapped",default:!1}],defaultRenderFn:I9e}){constructor({alignment:t,backgroundColor:e,backgroundImageSrc:n,backgroundSize:i,textColor:r,buttonColor:o,buttonTextColor:a,buttonText:s,disclaimer:l,header:c,labels:d,layout:f,subheader:h,successMessage:g,swapped:m}={},b){super(b),this.__alignment=t||"left",this.__backgroundColor=e||"#F0F0F0",this.__backgroundImageSrc=n||"",this.__backgroundSize=i||"cover",this.__textColor=e==="transparent"&&(f==="split"||!n)?"":r||"#000000",this.__buttonColor=o||"accent",this.__buttonTextColor=a||"#FFFFFF",this.__buttonText=s||"Subscribe",this.__disclaimer=l||"",this.__header=c||"",this.__labels=d||[],this.__layout=f||"wide",this.__subheader=h||"",this.__successMessage=g||"Email sent! Check your inbox to complete your signup.",this.__swapped=m||!1}static importDOM(){return A9e(this)}setLabels(t){if(!Array.isArray(t)||!t.every(n=>typeof n=="string"))throw new Error("Invalid argument: Expected an array of strings.");let e=this.getWritable();e.__labels=t}addLabel(t){this.getWritable().__labels.push(t)}removeLabel(t){let e=this.getWritable();e.__labels=e.__labels.filter(n=>n!==t)}},R9e=t=>new Gw(t);function F9e(t){return t instanceof Gw}function z9e(t,e){ti(e);let n=e.createDocument(),i=t.accentColor,r=t.backgroundColor,o="https://partner.transistor.fm/ghost/embed/{uuid}",a=new URLSearchParams;i&&a.set("color",i.replace(/^#/,"")),r&&a.set("background",r.replace(/^#/,""));let s=a.toString(),l=s?`${o}?${s}`:o,c=n.createElement("iframe");c.setAttribute("width","100%"),c.setAttribute("height","180"),c.setAttribute("frameborder","no"),c.setAttribute("scrolling","no"),c.setAttribute("seamless",""),c.setAttribute("src",l);let d=n.createElement("figure");return d.setAttribute("class","kg-card kg-transistor-card"),d.appendChild(c),gb({element:d,type:"inner"},t.visibility,e)}var FH={web:{nonMember:!1,memberSegment:es},email:{memberSegment:es}},Kw=class extends ei({nodeType:"transistor",hasVisibility:!0,properties:[{name:"accentColor",default:""},{name:"backgroundColor",default:""}],defaultRenderFn:z9e}){constructor(t={},e){super(t,e),t.visibility||(this.__visibility=TH(FH))}static getPropertyDefaults(){let t=super.getPropertyDefaults();return t.visibility=TH(FH),t}isEmpty(){return!1}hasEditMode(){return!0}},Q9e=t=>new Kw(t),W9e=t=>t instanceof Kw,O4={replace:A.TextNode,with:t=>new Rs(t.__text)},Rs=class t extends A.TextNode{constructor(e,n){super(e,n)}static getType(){return"extended-text"}static clone(e){return new t(e.__text,e.__key)}static importDOM(){let e=A.TextNode.importDOM();return{...e,span:()=>({conversion:B9e(e?.span,H9e),priority:1})}}static importJSON(e){return A.TextNode.importJSON(e)}exportJSON(){let e=super.exportJSON();return e.type="extended-text",e}isSimpleText(){return(this.__type==="text"||this.__type==="extended-text")&&this.__mode===0}isInline(){return!0}};function B9e(t,e){return n=>{let i=t?.(n);if(!i)return null;let r=i.conversion(n);return r&&{...r,forChild:(o,a)=>{let s=(r?.forChild??(l=>l))(o,a);return A.$isTextNode(s)?e(s,n):s}}}}function H9e(t,e){var n,i,r,o,a;let s=e,l=s.style.fontWeight==="bold"||((n=s.parentElement)==null?void 0:n.style.fontWeight)==="bold",c=s.style.fontStyle==="italic"||((i=s.parentElement)==null?void 0:i.style.fontStyle)==="italic",d=s.style.textDecoration==="underline"||((r=s.parentElement)==null?void 0:r.style.textDecoration)==="underline",f=s.classList.contains("Strikethrough")||((o=s.parentElement)==null?void 0:o.classList.contains("Strikethrough")),h=s.classList.contains("Highlight")||((a=s.parentElement)==null?void 0:a.classList.contains("Highlight"));return l&&!t.hasFormat("bold")&&(t=t.toggleFormat("bold")),c&&!t.hasFormat("italic")&&(t=t.toggleFormat("italic")),d&&!t.hasFormat("underline")&&(t=t.toggleFormat("underline")),f&&!t.hasFormat("strikethrough")&&(t=t.toggleFormat("strikethrough")),h&&!t.hasFormat("highlight")&&(t=t.toggleFormat("highlight")),t}var S4={replace:Jt.HeadingNode,with:t=>new Pu(t.__tag)},Pu=class t extends Jt.HeadingNode{constructor(e,n){super(e,n)}static getType(){return"extended-heading"}static clone(e){return new t(e.__tag,e.__key)}static importDOM(){let e=Jt.HeadingNode.importDOM();return{...e,p:Z9e(e?.p)}}static importJSON(e){return Jt.HeadingNode.importJSON(e)}exportJSON(){let e=super.exportJSON();return e.type="extended-heading",e}};function Z9e(t){return e=>{let n=t?.(e);if(n)return n;let i=e,r=i.getAttribute("role")==="heading",o=i.getAttribute("aria-level");if(r&&o){let a=parseInt(o,10);if(a>0&&a<7)return{conversion:()=>({node:new Pu(`h${a}`)}),priority:1}}return null}}var M$={replace:Jt.QuoteNode,with:()=>new wh},wh=class t extends Jt.QuoteNode{constructor(e){super(e)}static getType(){return"extended-quote"}static clone(e){return new t(e.__key)}static importDOM(){return{...Jt.QuoteNode.importDOM(),blockquote:q9e}}static importJSON(e){return Jt.QuoteNode.importJSON(e)}exportJSON(){let e=super.exportJSON();return e.type="extended-quote",e}extractWithChild(){return!0}};function q9e(){return{conversion:()=>({node:new wh,after:t=>{let e=[];return t.forEach(n=>{A.$isParagraphNode(n)?(e.length>0&&(e.push(A.$createLineBreakNode()),e.push(A.$createLineBreakNode())),e.push(...n.getChildren())):e.push(n)}),e}}),priority:1}}var ts=class t extends A.TextNode{static getType(){return"tk"}static clone(e){return new t(e.__text,e.__key)}constructor(e,n){super(e,n)}createDOM(e){var n;let i=super.createDOM(e),r=((n=e.theme.tk)==null?void 0:n.split(" "))||[];return i.classList.add(...r),i.dataset.kgTk=!0,i}static importJSON(e){let n=N$(e.text);return n.setFormat(e.format),n.setDetail(e.detail),n.setMode(e.mode),n.setStyle(e.style),n}exportJSON(){return{...super.exportJSON(),type:"tk"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}};function N$(t){return A.$applyNodeReplacement(new ts(t))}function lte(t){return t instanceof ts}var U9e=` `,Ll=class t extends A.ElementNode{constructor(e,n){super(n),we(this,"__linkFormat",null),this.__linkFormat=e}static getType(){return"at-link"}static clone(e){return new t(e.__linkFormat,e.__key)}static importJSON({linkFormat:e}){return P$(e)}exportJSON(){return{...super.exportJSON(),type:"at-link",version:1,linkFormat:this.__linkFormat}}createDOM(e){let n=document.createElement("span"),i=(e.theme.atLink||"").split(" ").filter(Boolean),r=(e.theme.atLinkIcon||"").split(" ").filter(Boolean);n.classList.add(...i);let o=new DOMParser().parseFromString(U9e,"image/svg+xml").documentElement;return o.classList.add(...r),n.appendChild(o),n}updateDOM(){return!1}exportDOM(){return null}static importDOM(){return null}getTextContent(){return""}isInline(){return!0}canBeEmpty(){return!1}setLinkFormat(e){let n=this.getWritable();n.__linkFormat=e}getLinkFormat(){return this.getLatest().__linkFormat}};function P$(t){return A.$applyNodeReplacement(new Ll(t))}function Tc(t){return t instanceof Ll}var Au=class t extends A.TextNode{constructor(e,n,i){super(e,i),we(this,"__placeholder",null),we(this,"defaultPlaceholder","Find a post, tag or author"),this.__placeholder=n}static getType(){return"at-link-search"}static clone(e){return new t(e.__text,e.__placeholder,e.__key)}static importJSON({text:e,placeholder:n}){return Ey(e,n)}exportJSON(){return{...super.exportJSON(),type:"at-link-search",version:1,placeholder:this.__placeholder}}createDOM(e){let n=super.createDOM(e);return n.dataset.placeholder="",this.__text?n.dataset.placeholder=this.__placeholder||"":n.dataset.placeholder=this.__placeholder??this.defaultPlaceholder,n.classList.add(...e.theme.atLinkSearch.split(" ")),n}updateDOM(e,n){return this.__text&&(n.dataset.placeholder=this.__placeholder??""),super.updateDOM(...arguments)}exportDOM(){return null}static importDOM(){return null}canHaveFormat(){return!1}setPlaceholder(e){let n=this.getWritable();n.__placeholder=e}getPlaceholder(){return this.getLatest().__placeholder}getChildrenSize(){return 0}getChildAtIndex(){return null}};function Ey(t="",e=null){return A.$applyNodeReplacement(new Au(t,e))}function Mc(t){return t instanceof Au}var kh=class t extends A.TextNode{static getType(){return"zwnj"}static clone(e){return new t("",e.__key)}createDOM(e){let n=super.createDOM(e);return n.innerHTML="‌",n}updateDOM(){return!1}exportJSON(){return{...super.exportJSON(),type:"zwnj",version:1}}getTextContent(){return""}isToken(){return!0}};function C9(){return new kh("")}function Pg(t){return t instanceof kh}var V9e={import:{br:t=>{var e,n;let i=!!t.closest('[id^="docs-internal-guid-"]'),r=(e=t.previousElementSibling)==null?void 0:e.nodeName,o=(n=t.nextElementSibling)==null?void 0:n.nodeName,a=["H1","H2","H3","H4","H5","H6"],s=["UL","OL","DL"];return i&&(r==="P"&&o==="P"||r==="BR"||o==="BR"||[...a,...s].includes(r)&&o==="P"||r==="P"&&[...a,...s].includes(o))?{conversion:()=>null,priority:1}:null}}},Y9e={import:{p:t=>t.closest('[id^="docs-internal-guid-"]')&&t.textContent===""?{conversion:()=>null,priority:1}:null}},cte={generateDecoratorNode:ei,visibility:k8e,rgbToHex:Xf,taggedTemplateFns:wMe},E9={linebreak:V9e,paragraph:Y9e},dte={html:{import:{...E9.linebreak.import,...E9.paragraph.import}}},X9e=[Rs,O4,Pu,S4,wh,M$,Pw,Nw,Aw,$w,Dw,Iw,Lw,jw,Rw,Fw,Bw,zw,Qw,Hw,Ww,Zw,qw,Uw,Vw,Yw,Xw,Gw,Kw,ts,Ll,Au,kh],G9e=Object.freeze(Object.defineProperty({__proto__:null,$createAsideNode:lMe,$createAtLinkNode:P$,$createAtLinkSearchNode:Ey,$createAudioNode:Y8e,$createBookmarkNode:RMe,$createButtonNode:AMe,$createCallToActionNode:aMe,$createCalloutNode:tMe,$createCodeBlockNode:M8e,$createEmailCtaNode:M9e,$createEmailNode:b9e,$createEmbedNode:m9e,$createFileNode:qMe,$createGalleryNode:C9e,$createHeaderNode:JMe,$createHorizontalRuleNode:fMe,$createHtmlNode:vMe,$createImageNode:S8e,$createMarkdownNode:A8e,$createPaywallNode:i9e,$createProductNode:d9e,$createSignupNode:R9e,$createTKNode:N$,$createToggleNode:OMe,$createTransistorNode:Q9e,$createVideoNode:z8e,$createZWNJNode:C9,$isAsideNode:cMe,$isAtLinkNode:Tc,$isAtLinkSearchNode:Mc,$isAudioNode:X8e,$isBookmarkNode:FMe,$isButtonNode:$Me,$isCallToActionNode:sMe,$isCalloutNode:eMe,$isCodeBlockNode:N8e,$isEmailCtaNode:N9e,$isEmailNode:w9e,$isEmbedNode:v9e,$isFileNode:ZMe,$isGalleryNode:E9e,$isHeaderNode:e9e,$isHorizontalRuleNode:hMe,$isHtmlNode:yMe,$isImageNode:C8e,$isKoenigCard:Yf,$isMarkdownNode:$8e,$isPaywallNode:r9e,$isProductNode:u9e,$isSignupNode:F9e,$isTKNode:lte,$isToggleNode:SMe,$isTransistorNode:W9e,$isVideoNode:Q8e,$isZWNJNode:Pg,AsideNode:jw,AtLinkNode:Ll,AtLinkSearchNode:Au,AudioNode:Dw,BookmarkNode:Ww,ButtonNode:Qw,CallToActionNode:Lw,CalloutNode:Iw,CodeBlockNode:Pw,DEFAULT_CONFIG:dte,DEFAULT_NODES:X9e,EmailCtaNode:Xw,EmailNode:Vw,EmbedNode:Uw,ExtendedHeadingNode:Pu,ExtendedQuoteNode:wh,ExtendedTextNode:Rs,FileNode:Bw,GalleryNode:Yw,HeaderNode:Hw,HorizontalRuleNode:Rw,HtmlNode:Fw,ImageNode:Nw,KoenigDecoratorNode:pb,MarkdownNode:Aw,PaywallNode:Zw,ProductNode:qw,SignupNode:Gw,TKNode:ts,ToggleNode:zw,TransistorNode:Kw,VideoNode:$w,ZWNJNode:kh,extendedHeadingNodeReplacement:S4,extendedQuoteNodeReplacement:M$,extendedTextNodeReplacement:O4,serializers:E9,utils:cte},Symbol.toStringTag,{value:"Module"})),mb=class extends jw{createDOM(e){let n=document.createElement("aside");return ct.addClassNamesToElement(n,e.theme.aside),n}insertNewAfter(){let e=A.$createParagraphNode(),n=this.getDirection();return e.setDirection(n),this.insertAfter(e),e}collapseAtStart(){let e=A.$createParagraphNode();return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}};function ute(){return new mb}function zH(t){return t instanceof mb}var K9e=t=>J.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t},J.createElement("g",{fill:"none",fillRule:"evenodd"},J.createElement("path",{d:"M32 2.667C32 .889 31.111 0 29.333 0H2.667C1.93 0 1.302.26.78.781.261 1.301 0 1.931 0 2.667v26.666C0 31.111.889 32 2.667 32h26.666C31.111 32 32 31.111 32 29.333V2.667z",fill:"#465961",fillRule:"nonzero"}),J.createElement("path",{stroke:"#FFF",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 12l-4 4.333 4 3.667M21.5 12l4 4.333-4 3.667M18 11l-4 10"}))),fte=N.default.createContext({}),J9e=({children:t})=>{let[e,n]=N.default.useState(null),[i,r]=N.default.useState(!1),[o,a]=N.default.useState(!1),[s,l]=N.default.useState(!1),c=N.default.useMemo(()=>({selectedCardKey:e,setSelectedCardKey:n,isEditingCard:i,setIsEditingCard:r,isDragging:o,setIsDragging:a,showVisibilitySettings:s,setShowVisibilitySettings:l}),[e,n,i,r,o,a,s,l]);return w.jsx(fte.Provider,{value:c,children:t})},Kh=()=>N.default.useContext(fte);function xt({isVisible:t,children:e,...n}){let{isDragging:i}=Kh();if(t&&!i)return w.jsx("div",{className:"not-kg-prose absolute left-1/2 top-[-46px] z-[1000] -translate-x-1/2",...n,children:e})}function T9(){return T9=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[r]=t[r]);return n}var Vt=class hte{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=Tm(this,e,n);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),om.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Tm(this,e,n);let i=[];return this.decompose(e,n,i,0),om.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new lh(this),o=new lh(e);for(let a=n,s=n;;){if(r.next(a),o.next(a),a=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(s+=r.value.length,r.done||s>=i)return!0}}iter(e=1){return new lh(this,e)}iterRange(e,n=this.length){return new GO(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new KO(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?hte.empty:e.length<=32?new ba(e):om.from(ba.split(e,[]))}},ba=class t extends Vt{constructor(e,n=tNe(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let o=0;;o++){let a=this.text[o],s=r+a.length;if((n?i:s)>=e)return new M9(r,s,i,a);r=s+1,i++}}decompose(e,n,i,r){let o=e<=0&&n>=this.length?this:new t(QH(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let a=i.pop(),s=I_(o.text,a.text.slice(),0,o.length);if(s.length<=32)i.push(new t(s,a.length+o.length));else{let l=s.length>>1;i.push(new t(s.slice(0,l)),new t(s.slice(l)))}}else i.push(o)}replace(e,n,i){if(!(i instanceof t))return super.replace(e,n,i);[e,n]=Tm(this,e,n);let r=I_(this.text,I_(i.text,QH(this.text,0,e)),n),o=this.length+i.length-(n-e);return r.length<=32?new t(r,o):om.from(t.split(r,[]),o)}sliceString(e,n=this.length,i=` `){[e,n]=Tm(this,e,n);let r="";for(let o=0,a=0;o<=n&&ae&&a&&(r+=i),eo&&(r+=s.slice(Math.max(0,e-o),n-o)),o=l+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],r=-1;for(let o of e)i.push(o),r+=o.length+1,i.length==32&&(n.push(new t(i,r)),i=[],r=-1);return r>-1&&n.push(new t(i,r)),n}},om=class t extends Vt{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,r){for(let o=0;;o++){let a=this.children[o],s=r+a.length,l=i+a.lines-1;if((n?l:s)>=e)return a.lineInner(e,n,i,r);r=s+1,i=l+1}}decompose(e,n,i,r){for(let o=0,a=0;a<=n&&o=a){let c=r&((a<=e?1:0)|(l>=n?2:0));a>=e&&l<=n&&!c?i.push(s):s.decompose(e-a,n-a,i,c)}a=l+1}}replace(e,n,i){if([e,n]=Tm(this,e,n),i.lines=o&&n<=s){let l=a.replace(e-o,n-o,i),c=this.lines-a.lines+l.lines;if(l.lines>4&&l.lines>c>>6){let d=this.children.slice();return d[r]=l,new t(d,this.length-(n-e)+i.length)}return super.replace(o,s,l)}o=s+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=` `){[e,n]=Tm(this,e,n);let r="";for(let o=0,a=0;oe&&o&&(r+=i),ea&&(r+=s.sliceString(e-a,n-a,i)),a=l+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof t))return 0;let i=0,[r,o,a,s]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,o+=n){if(r==a||o==s)return i;let l=this.children[r],c=e.children[o];if(l!=c)return i+l.scanIdentical(c,n);i+=l.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let g of e)i+=g.lines;if(i<32){let g=[];for(let m of e)m.flatten(g);return new ba(g,n)}let r=Math.max(32,i>>5),o=r<<1,a=r>>1,s=[],l=0,c=-1,d=[];function f(g){let m;if(g.lines>o&&g instanceof t)for(let b of g.children)f(b);else g.lines>a&&(l>a||!l)?(h(),s.push(g)):g instanceof ba&&l&&(m=d[d.length-1])instanceof ba&&g.lines+m.lines<=32?(l+=g.lines,c+=g.length+1,d[d.length-1]=new ba(m.text.concat(g.text),m.length+1+g.length)):(l+g.lines>r&&h(),l+=g.lines,c+=g.length+1,d.push(g))}function h(){l!=0&&(s.push(d.length==1?d[0]:t.from(d,c)),c=-1,l=d.length=0)}for(let g of e)f(g);return h(),s.length==1?s[0]:new t(s,n)}};Vt.empty=new ba([""],0);function tNe(t){let e=-1;for(let n of t)e+=n.length+1;return e}function I_(t,e,n=0,i=1e9){for(let r=0,o=0,a=!0;o=n&&(l>i&&(s=s.slice(0,i-r)),r0?1:(e instanceof ba?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],o=this.offsets[i],a=o>>1,s=r instanceof ba?r.text.length:r.children.length;if(a==(n>0?s:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=` `,this;e--}else if(r instanceof ba){let l=r.text[a+(n<0?-1:0)];if(this.offsets[i]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[a+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof ba?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},GO=class{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new lh(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}},KO=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<"u"&&(Vt.prototype[Symbol.iterator]=function(){return this.iter()},lh.prototype[Symbol.iterator]=GO.prototype[Symbol.iterator]=KO.prototype[Symbol.iterator]=function(){return this});var M9=class{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}};function Tm(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}var am="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;tt)return am[e-1]<=t;return!1}function WH(t){return t>=127462&&t<=127487}var BH=8205;function Er(t,e,n=!0,i=!0){return(n?pte:iNe)(t,e,i)}function pte(t,e,n){if(e==t.length)return e;e&>e(t.charCodeAt(e))&&mte(t.charCodeAt(e-1))&&e--;let i=xr(t,e);for(e+=Va(i);e=0&&WH(xr(t,a));)o++,a-=2;if(o%2==0)break;e+=2}else break}return e}function iNe(t,e,n){for(;e>0;){let i=pte(t,e-2,n);if(i=56320&&t<57344}function mte(t){return t>=55296&&t<56320}function xr(t,e){let n=t.charCodeAt(e);if(!mte(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return gte(i)?(n-55296<<10)+(i-56320)+65536:n}function A$(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Va(t){return t<65536?1:2}var N9=/\r\n?|\n/,_r=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(_r||(_r={})),gu=class t{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return o+(e-r);o+=s}else{if(i!=_r.Simple&&c>=e&&(i==_r.TrackDel&&re||i==_r.TrackBefore&&re))return null;if(c>e||c==e&&n<0&&!s)return e==r||n<0?o:o+l;o+=l}r=c}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return o}touchesRange(e,n=e){for(let i=0,r=0;i=0&&r<=n&&s>=e)return rn?"cover":!0;r=s}return!1}toString(){let e="";for(let n=0;n=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new t(e)}static create(e){return new t(e)}},Na=class t extends gu{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return P9(this,(n,i,r,o,a)=>e=e.replace(r,r+(i-n),a),!1),e}mapDesc(e,n=!1){return A9(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,o=0;r=0){n[r]=s,n[r+1]=a;let l=r>>1;for(;i.length0&&lu(i,n,o.text),o.forward(d),s+=d}let c=e[a++];for(;s>1].toJSON()))}return e}static of(e,n,i){let r=[],o=[],a=0,s=null;function l(d=!1){if(!d&&!r.length)return;ah||f<0||h>n)throw new RangeError(`Invalid change range ${f} to ${h} (in doc of length ${n})`);let m=g?typeof g=="string"?Vt.of(g.split(i||N9)):g:Vt.empty,b=m.length;if(f==h&&b==0)return;fa&&qr(r,f-a,-1),qr(r,h-f,b),lu(o,r,m),a=h}}return c(e),l(!s),s}static empty(e){return new t(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;rs&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;i.length=0&&n<=0&&n==t[r+1]?t[r]+=e:e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function lu(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)s=t.sections[a++],l=t.sections[a++];e(r,c,o,d,f),r=c,o=d}}}function A9(t,e,n,i=!1){let r=[],o=i?[]:null,a=new xh(t),s=new xh(e);for(let l=-1;;)if(a.ins==-1&&s.ins==-1){let c=Math.min(a.len,s.len);qr(r,c,-1),a.forward(c),s.forward(c)}else if(s.ins>=0&&(a.ins<0||l==a.i||a.off==0&&(s.len=0&&l=0){let c=0,d=a.len;for(;d;)if(s.ins==-1){let f=Math.min(d,s.len);c+=f,d-=f,s.forward(f)}else if(s.ins==0&&s.lenl||a.ins>=0&&a.len>l)&&(s||i.length>c),o.forward2(l),a.forward(l)}}}}var xh=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?Vt.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?Vt.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},Zg=class t{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}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 e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new t(i,r,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return ye.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return ye.range(this.anchor,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ye.range(e.anchor,e.head)}static create(e,n,i){return new t(e,n,i)}},ye=class t{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:t.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(e.ranges.map(n=>Zg.fromJSON(n)),e.main)}static single(e,n=e){return new t([t.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;re?8:0)|o)}static normalized(e,n=0){let i=e[n];e.sort((r,o)=>r.from-o.from),n=e.indexOf(i);for(let r=1;ro.head?t.range(l,s):t.range(s,l))}}return new t(e,n)}};function yte(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}var $$=0,He=class t{constructor(e,n,i,r,o){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=$$++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new t(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:D$),!!e.static,e.enables)}of(e){return new sm([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new sm(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new sm(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}};function D$(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}var sm=class{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=$$++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,o=this.id,a=e[o]>>1,s=this.type==2,l=!1,c=!1,d=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?c=!0:((n=e[f.id])!==null&&n!==void 0?n:1)&1||d.push(e[f.id]);return{create(f){return f.values[a]=i(f),1},update(f,h){if(l&&h.docChanged||c&&(h.docChanged||h.selection)||$9(f,d)){let g=i(f);if(s?!HH(g,f.values[a],r):!r(g,f.values[a]))return f.values[a]=g,1}return 0},reconfigure:(f,h)=>{let g,m=h.config.address[o];if(m!=null){let b=n3(h,m);if(this.dependencies.every(x=>x instanceof He?h.facet(x)===f.facet(x):x instanceof sr?h.field(x,!1)==f.field(x,!1):!0)||(s?HH(g=i(f),b,r):r(g=i(f),b)))return f.values[a]=b,0}else g=i(f);return f.values[a]=g,1}}}};function HH(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it[l.id]),r=n.map(l=>l.type),o=i.filter(l=>!(l&1)),a=t[e.id]>>1;function s(l){let c=[];for(let d=0;di===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(ZH).find(i=>i.field==this);return(n?.create||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let o=i.values[n],a=this.updateF(o,r);return this.compareF(o,a)?0:(i.values[n]=a,1)},reconfigure:(i,r)=>r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}init(e){return[this,ZH.of({field:this,create:e})]}get extension(){return this}},Qf={lowest:4,low:3,default:2,high:1,highest:0};function Dv(t){return e=>new JO(e,t)}var Jh={highest:Dv(Qf.highest),high:Dv(Qf.high),default:Dv(Qf.default),low:Dv(Qf.low),lowest:Dv(Qf.lowest)},JO=class{constructor(e,n){this.inner=e,this.prec=n}},e3=class t{of(e){return new vb(this,e)}reconfigure(e){return t.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}},vb=class{constructor(e,n){this.compartment=e,this.inner=n}},t3=class t{constructor(e,n,i,r,o,a){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=o,this.facets=a,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,i){let r=[],o=Object.create(null),a=new Map;for(let h of oNe(e,n,a))h instanceof sr?r.push(h):(o[h.facet.id]||(o[h.facet.id]=[])).push(h);let s=Object.create(null),l=[],c=[];for(let h of r)s[h.id]=c.length<<1,c.push(g=>h.slot(g));let d=i?.config.facets;for(let h in o){let g=o[h],m=g[0].facet,b=d&&d[h]||[];if(g.every(x=>x.type==0))if(s[m.id]=l.length<<1|1,D$(b,g))l.push(i.facet(m));else{let x=m.combine(g.map(_=>_.value));l.push(i&&m.compare(x,i.facet(m))?i.facet(m):x)}else{for(let x of g)x.type==0?(s[x.id]=l.length<<1|1,l.push(x.value)):(s[x.id]=c.length<<1,c.push(_=>x.dynamicSlot(_)));s[m.id]=c.length<<1,c.push(x=>rNe(x,m,g))}}let f=c.map(h=>h(s));return new t(e,a,f,s,l,o)}};function oNe(t,e,n){let i=[[],[],[],[],[]],r=new Map;function o(a,s){let l=r.get(a);if(l!=null){if(l<=s)return;let c=i[l].indexOf(a);c>-1&&i[l].splice(c,1),a instanceof vb&&n.delete(a.compartment)}if(r.set(a,s),Array.isArray(a))for(let c of a)o(c,s);else if(a instanceof vb){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(a.compartment)||a.inner;n.set(a.compartment,c),o(c,s)}else if(a instanceof JO)o(a.inner,a.prec);else if(a instanceof sr)i[s].push(a),a.provides&&o(a.provides,s);else if(a instanceof sm)i[s].push(a),a.facet.extensions&&o(a.facet.extensions,Qf.default);else{let c=a.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(c,s)}}return o(t,Qf.default),i.reduce((a,s)=>a.concat(s))}function Ty(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function n3(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}var bte=He.define(),D9=He.define({combine:t=>t.some(e=>e),static:!0}),wte=He.define({combine:t=>t.length?t[0]:void 0,static:!0}),kte=He.define(),xte=He.define(),_te=He.define(),Ote=He.define({combine:t=>t.length?t[0]:!1}),as=class{constructor(e,n){this.type=e,this.value=n}static define(){return new I9}},I9=class{of(e){return new as(this,e)}},L9=class{constructor(e){this.map=e}of(e){return new kt(this,e)}},kt=class t{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new t(this.type,n)}is(e){return this.type==e}static define(e={}){return new L9(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let o=r.map(n);o&&i.push(o)}return i}};kt.reconfigure=kt.define();kt.appendConfig=kt.define();var ko=class oy{constructor(e,n,i,r,o,a){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=o,this.scrollIntoView=a,this._doc=null,this._state=null,i&&yte(i,n.newLength),o.some(s=>s.type==oy.time)||(this.annotations=o.concat(oy.time.of(Date.now())))}static create(e,n,i,r,o,a){return new oy(e,n,i,r,o,a)}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(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(oy.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}};ko.time=as.define();ko.userEvent=as.define();ko.addToHistory=as.define();ko.remote=as.define();function aNe(t,e){let n=[];for(let i=0,r=0;;){let o,a;if(i=t[i]))o=t[i++],a=t[i++];else if(r=0;r--){let o=i[r](t);o instanceof ko?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof ko?t=o[0]:t=Cte(e,lm(o),!1)}return t}function lNe(t){let e=t.startState,n=e.facet(_te),i=t;for(let r=n.length-1;r>=0;r--){let o=n[r](t);o&&Object.keys(o).length&&(i=Ste(i,j9(e,o,t.changes.newLength),!0))}return i==t?t:ko.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}var cNe=[];function lm(t){return t==null?cNe:Array.isArray(t)?t:[t]}var zn=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(zn||(zn={})),dNe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,R9;try{R9=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function uNe(t){if(R9)return R9.test(t);for(let e=0;e"\x80"&&(n.toUpperCase()!=n.toLowerCase()||dNe.test(n)))return!0}return!1}function fNe(t){return e=>{if(!/\S/.test(e))return zn.Space;if(uNe(e))return zn.Word;for(let n=0;n-1)return zn.Word;return zn.Other}}var mn=class t{constructor(e,n,i,r,o,a){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=o,a&&(a._state=this);for(let s=0;sr.set(c,l)),n=null),r.set(s.value.compartment,s.value.extension)):s.is(kt.reconfigure)?(n=null,i=s.value):s.is(kt.appendConfig)&&(n=null,i=lm(i).concat(s.value));let o;n?o=e.startState.values.slice():(n=t3.resolve(i,r,this),o=new t(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(s,l)=>l.reconfigure(s,this),null).values);let a=e.startState.facet(D9)?e.newSelection:e.newSelection.asSingle();new t(n,e.newDoc,a,o,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:ye.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),o=[i.range],a=lm(i.effects);for(let s=1;sa.spec.fromJSON(s,l)))}}return t.create({doc:e.doc,selection:ye.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=t3.resolve(e.extensions||[],new Map),i=e.doc instanceof Vt?e.doc:Vt.of((e.doc||"").split(n.staticFacet(t.lineSeparator)||N9)),r=e.selection?e.selection instanceof ye?e.selection:ye.single(e.selection.anchor,e.selection.head):ye.single(0);return yte(r,i.length),n.staticFacet(D9)||(r=r.asSingle()),new t(n,i,r,n.dynamicSlots.map(()=>null),(o,a)=>a.create(o),null)}get tabSize(){return this.facet(t.tabSize)}get lineBreak(){return this.facet(t.lineSeparator)||` `}get readOnly(){return this.facet(Ote)}phrase(e,...n){for(let i of this.facet(t.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let o=+(r||1);return!o||o>n.length?i:n[o-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let o of this.facet(bte))for(let a of o(this,n,i))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){return fNe(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),o=this.charCategorizer(e),a=e-i,s=e-i;for(;a>0;){let l=Er(n,a,!1);if(o(n.slice(l,a))!=zn.Word)break;a=l}for(;st.length?t[0]:4});mn.lineSeparator=wte;mn.readOnly=Ote;mn.phrases=He.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});mn.languageData=bte;mn.changeFilter=kte;mn.transactionFilter=xte;mn.transactionExtender=_te;e3.reconfigure=kt.define();function Gl(t,e,n={}){let i={};for(let r of t)for(let o of Object.keys(r)){let a=r[o],s=i[o];if(s===void 0)i[o]=a;else if(!(s===a||a===void 0))if(Object.hasOwnProperty.call(n,o))i[o]=n[o](s,a);else throw new Error("Config merge conflict for field "+o)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}var Wc=class{eq(e){return this==e}range(e,n=e){return F9.create(e,n,this)}};Wc.prototype.startSide=Wc.prototype.endSide=0;Wc.prototype.point=!1;Wc.prototype.mapMode=_r.TrackDel;var F9=class Ete{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new Ete(e,n,i)}};function z9(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}var Q9=class t{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,r=0){let o=i?this.to:this.from;for(let a=r,s=o.length;;){if(a==s)return a;let l=a+s>>1,c=o[l]-e||(i?this.value[l].endSide:this.value[l].startSide)-n;if(l==a)return c>=0?a:s;c>=0?s=l:a=l+1}}between(e,n,i,r){for(let o=this.findIndex(n,-1e9,!0),a=this.findIndex(i,1e9,!1,o);og||h==g&&c.startSide>0&&c.endSide<=0)continue;(g-h||c.endSide-c.startSide)<0||(a<0&&(a=h),c.point&&(s=Math.max(s,g-h)),i.push(c),r.push(h-a),o.push(g-a))}return{mapped:i.length?new t(r,o,i,s):null,pos:a}}},yn=class t{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new t(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:o=this.length}=e,a=e.filter;if(n.length==0&&!a)return this;if(i&&(n=n.slice().sort(z9)),this.isEmpty)return n.length?t.of(n):this;let s=new i3(this,null,-1).goto(0),l=0,c=[],d=new $u;for(;s.value||l=0){let f=n[l++];d.addInner(f.from,f.to,f.value)||c.push(f)}else s.rangeIndex==1&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||os.to||o=o&&e<=o+a.length&&a.between(o,e-o,n-o,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return yb.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return yb.from(e).goto(n)}static compare(e,n,i,r,o=-1){let a=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o),s=n.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o),l=qH(a,s,i),c=new Wf(a,l,o),d=new Wf(s,l,o);i.iterGaps((f,h,g)=>UH(c,f,d,h,g,r)),i.empty&&i.length==0&&UH(c,0,d,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=999999999);let o=e.filter(d=>!d.isEmpty&&n.indexOf(d)<0),a=n.filter(d=>!d.isEmpty&&e.indexOf(d)<0);if(o.length!=a.length)return!1;if(!o.length)return!0;let s=qH(o,a),l=new Wf(o,s,0).goto(i),c=new Wf(a,s,0).goto(i);for(;;){if(l.to!=c.to||!W9(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>r)return!0;l.next(),c.next()}}static spans(e,n,i,r,o=-1){let a=new Wf(e,null,o).goto(n),s=n,l=a.openStart;for(;;){let c=Math.min(a.to,i);if(a.point){let d=a.activeForPoint(a.to),f=a.pointFroms&&(r.span(s,c,a.active,l),l=a.openEnd(c));if(a.to>i)return l+(a.point&&a.to>i?1:0);s=a.to,a.next()}}static of(e,n=!1){let i=new $u;for(let r of e instanceof F9?[e]:n?hNe(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return t.empty;let n=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=t.empty;r=r.nextLayer)n=new t(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}};yn.empty=new yn([],[],null,-1);function hNe(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(z9);e=i}return t}yn.empty.nextLayer=yn.empty;var $u=class t{finishChunk(e){this.chunks.push(new Q9(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new t)).add(e,n,i)}addInner(e,n,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(yn.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=yn.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}};function qH(t,e,n){let i=new Map;for(let o of t)for(let a=0;a=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&r.push(new i3(a,n,i,o));return r.length==1?r[0]:new t(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)n8(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)n8(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),n8(this.heap,0)}}};function n8(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}var Wf=class{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=yb.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){z2(this.active,e),z2(this.activeTo,e),z2(this.activeRank,e),this.minActive=VH(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:o}=this.cursor;for(;n0;)n++;Q2(this.active,n,i),Q2(this.activeTo,n,r),Q2(this.activeRank,n,o),e&&Q2(e,n,this.cursor.from),this.minActive=VH(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&z2(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[r]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}};function UH(t,e,n,i,r,o){t.goto(e),n.goto(i);let a=i+r,s=i,l=i-e;for(;;){let c=t.to+l-n.to||t.endSide-n.endSide,d=c<0?t.to+l:n.to,f=Math.min(d,a);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&W9(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(s,f,t.point,n.point):f>s&&!W9(t.active,n.active)&&o.compareRange(s,f,t.active,n.active),d>a)break;s=d,c<=0&&t.next(),c>=0&&n.next()}}function W9(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function VH(t,e){let n=-1,i=1e9;for(let r=0;r=e)return r;if(r==t.length)break;o+=t.charCodeAt(r)==9?n-o%n:1,r=Er(t,r)}return i===!0?-1:t.length}var H9="\u037C",YH=typeof Symbol>"u"?"__"+H9:Symbol.for(H9),Z9=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),XH=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},jl=class{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,s,l,c){let d=[],f=/^@(\w+)\b/.exec(a[0]),h=f&&f[1]=="keyframes";if(f&&s==null)return l.push(a[0]+";");for(let g in s){let m=s[g];if(/&/.test(g))o(g.split(/,\s*/).map(b=>a.map(x=>b.replace(/&/,x))).reduce((b,x)=>b.concat(x)),m,l);else if(m&&typeof m=="object"){if(!f)throw new RangeError("The value of a property ("+g+") should be a primitive value.");o(r(g),m,d,h)}else m!=null&&d.push(g.replace(/_.*/,"").replace(/[A-Z]/g,b=>"-"+b.toLowerCase())+": "+m+";")}(d.length||h)&&l.push((i&&!f&&!c?a.map(i):a).join(", ")+" {"+d.join(" ")+"}")}for(let a in e)o(r(a),e[a],this.rules)}getRules(){return this.rules.join(` `)}static newName(){let e=XH[YH]||1;return XH[YH]=e+1,H9+e.toString(36)}static mount(e,n,i){let r=e[Z9],o=i&&i.nonce;r?o&&r.setNonce(o):r=new q9(e,o),r.mount(Array.isArray(n)?n:[n])}},GH=new Map,q9=class{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let o=GH.get(i);if(o)return e.adoptedStyleSheets=[o.sheet,...e.adoptedStyleSheets],e[Z9]=o;this.sheet=new r.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],GH.set(i,this)}else{this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);let o=e.head||e;o.insertBefore(this.styleTag,o.firstChild)}this.modules=[],e[Z9]=this}mount(e){let n=this.sheet,i=0,r=0;for(let o=0;o-1&&(this.modules.splice(s,1),r--,s=-1),s==-1){if(this.modules.splice(r++,0,a),n)for(let l=0;l",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},pNe=typeof navigator<"u"&&/Mac/.test(navigator.platform),gNe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Ei=0;Ei<10;Ei++)Du[48+Ei]=Du[96+Ei]=String(Ei);var Ei;for(Ei=1;Ei<=24;Ei++)Du[Ei+111]="F"+Ei;var Ei;for(Ei=65;Ei<=90;Ei++)Du[Ei]=String.fromCharCode(Ei+32),bb[Ei]=String.fromCharCode(Ei);var Ei;for(W2 in Du)bb.hasOwnProperty(W2)||(bb[W2]=Du[W2]);var W2;function mNe(t){var e=pNe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||gNe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?bb:Du)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function r3(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function U9(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function vNe(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function L_(t,e){if(!e.anchorNode)return!1;try{return U9(t,e.anchorNode)}catch{return!1}}function Mm(t){return t.nodeType==3?_h(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function My(t,e,n,i){return n?KH(t,e,n,i,-1)||KH(t,e,n,i,1):!1}function wb(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function KH(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:Bc(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=wb(t)+(r<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=r<0?Bc(t):0}else return!1}}function Bc(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function C4(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function yNe(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function Tte(t,e){let n=e.width/t.offsetWidth,i=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function bNe(t,e,n,i,r,o,a,s){let l=t.ownerDocument,c=l.defaultView||window;for(let d=t,f=!1;d&&!f;)if(d.nodeType==1){let h,g=d==l.body,m=1,b=1;if(g)h=yNe(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(d).position)&&(f=!0),d.scrollHeight<=d.clientHeight&&d.scrollWidth<=d.clientWidth){d=d.assignedSlot||d.parentNode;continue}let O=d.getBoundingClientRect();({scaleX:m,scaleY:b}=Tte(d,O)),h={left:O.left,right:O.left+d.clientWidth*m,top:O.top,bottom:O.top+d.clientHeight*b}}let x=0,_=0;if(r=="nearest")e.top0&&e.bottom>h.bottom+_&&(_=e.bottom-h.bottom+_+a)):e.bottom>h.bottom&&(_=e.bottom-h.bottom+a,n<0&&e.top-_0&&e.right>h.right+x&&(x=e.right-h.right+x+o)):e.right>h.right&&(x=e.right-h.right+o,n<0&&e.leftn.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}var V9=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?Bc(n):0),i,Math.min(e.focusOffset,i?Bc(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}},kg=null;function Mte(t){if(t.setActive)return t.setActive();if(kg)return t.focus(kg);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(kg==null?{get preventScroll(){return kg={preventScroll:!0},!0}}:void 0),!kg){kg=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}var vo=class t{constructor(e,n,i=!0){this.node=e,this.offset=n,this.precise=i}static before(e,n){return new t(e.parentNode,wb(e),n)}static after(e,n){return new t(e.parentNode,wb(e)+1,n)}},I$=[],Fn=class t{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let i of this.children){if(i==e)return n;n+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let i=this.dom,r=null,o;for(let a of this.children){if(a.flags&7){if(!a.dom&&(o=r?r.nextSibling:i.firstChild)){let s=t.get(o);(!s||!s.parent&&s.canReuseDOM(a))&&a.reuseDOM(o)}a.sync(e,n),a.flags&=-8}if(o=r?r.nextSibling:i.firstChild,n&&!n.written&&n.node==i&&o!=a.dom&&(n.written=!0),a.dom.parentNode==i)for(;o&&o!=a.dom;)o=eZ(o);else i.insertBefore(a.dom,o);r=a.dom}for(o=r?r.nextSibling:i.firstChild,o&&n&&n.node==i&&(n.written=!0);o;)o=eZ(o)}else if(this.flags&1)for(let i of this.children)i.flags&7&&(i.sync(e,n),i.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let i;if(e==this.dom)i=this.dom.childNodes[n];else{let r=Bc(e)==0?0:n==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;r==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?r=-1:r=1),e=o}r<0?i=e:i=e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!t.get(i);)i=i.nextSibling;if(!i)return this.length;for(let r=0,o=0;;r++){let a=this.children[r];if(a.dom==i)return o;o+=a.length+a.breakAfter}}domBoundsAround(e,n,i=0){let r=-1,o=-1,a=-1,s=-1;for(let l=0,c=i,d=i;ln)return f.domBoundsAround(e,n,c);if(h>=e&&r==-1&&(r=l,o=c),c>n&&f.dom.parentNode==this.dom){a=l,s=d;break}d=h,c=h+f.breakAfter}return{from:o,to:s<0?i+this.length:s,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,i=I$){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}};function Ate(t,e,n,i,r,o,a,s,l){let{children:c}=t,d=c.length?c[e]:null,f=o.length?o[o.length-1]:null,h=f?f.breakAfter:a;if(!(e==i&&d&&!a&&!h&&o.length<2&&d.merge(n,r,o.length?f:null,n==0,s,l))){if(i0&&(!a&&o.length&&d.merge(n,d.length,o[0],!1,s,0)?d.breakAfter=o.shift().breakAfter:(n2),Ve={mac:nZ||/Mac/.test(ma.platform),windows:/Win/.test(ma.platform),linux:/Linux|X11/.test(ma.platform),ie:E4,ie_version:Dte?Y9.documentMode||6:G9?+G9[1]:X9?+X9[1]:0,gecko:tZ,gecko_version:tZ?+(/Firefox\/(\d+)/.exec(ma.userAgent)||[0,0])[1]:0,chrome:!!i8,chrome_version:i8?+i8[1]:0,ios:nZ,android:/Android\b/.test(ma.userAgent),safari:Ite,webkit_version:_Ne?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:Y9.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"},ONe=256,Iu=class t extends Fn{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,i){return this.flags&8||i&&(!(i instanceof t)||this.length-(n-e)+i.length>ONe||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new t(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new vo(this.dom,e)}domBoundsAround(e,n,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return SNe(this.dom,e,n)}},Lu=class t extends Fn{constructor(e,n=[],i=0){super(),this.mark=e,this.children=n,this.length=i;for(let r of n)r.setParent(this)}setAttrs(e){if(Nte(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,i,r,o,a){return i&&(!(i instanceof t&&i.mark.eq(this.mark))||e&&o<=0||ne&&n.push(i=e&&(r=o),i=l,o++}let a=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new t(this.mark,n,a)}domAtPos(e){return Lte(this,e)}coordsAt(e,n){return Rte(this,e,n)}};function SNe(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let r=e,o=e,a=0;e==0&&n<0||e==i&&n>=0?Ve.chrome||Ve.gecko||(e?(r--,a=1):o=0)?0:s.length-1];return Ve.safari&&!a&&l.width==0&&(l=Array.prototype.find.call(s,c=>c.width)||l),a?C4(l,a<0):l||null}var kb=class t extends Fn{static create(e,n,i){return new t(e,n,i)}constructor(e,n,i){super(),this.widget=e,this.length=n,this.side=i,this.prevWidget=null}split(e){let n=t.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,i,r,o,a){return i&&(!(i instanceof t)||!this.widget.compare(i.widget)||e>0&&o<=0||n0)?vo.before(this.dom):vo.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;let r=this.dom.getClientRects(),o=null;if(!r.length)return null;let a=this.side?this.side<0:e>0;for(let s=a?r.length-1:0;o=r[s],!(e>0?s==0:s==r.length-1||o.top0?vo.before(this.dom):vo.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Vt.empty}get isHidden(){return!0}};Iu.prototype.children=kb.prototype.children=xb.prototype.children=I$;function Lte(t,e){let n=t.dom,{children:i}=t,r=0;for(let o=0;ro&&e0;o--){let a=i[o-1];if(a.dom.parentNode==n)return a.domAtPos(a.length)}for(let o=r;o0&&e instanceof Lu&&r.length&&(i=r[r.length-1])instanceof Lu&&i.mark.eq(e.mark)?jte(i,e.children[0],n-1):(r.push(e),e.setParent(t)),t.length+=e.length}function Rte(t,e,n){let i=null,r=-1,o=null,a=-1;function s(c,d){for(let f=0,h=0;f=d&&(g.children.length?s(g,d-h):(!o||o.isHidden&&n>0)&&(m>d||h==m&&g.getSide()>0)?(o=g,a=d-h):(h-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let o of i)if(o!=n&&(r.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function J9(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function ENe(t){let e=Object.create(null);for(let n=0;n0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){L$(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){jte(this,e,n)}addLineDeco(e){let n=e.spec.attributes,i=e.spec.class;n&&(this.attrs=K9(n,this.attrs||{})),i&&(this.attrs=K9({class:i},this.attrs||{}))}domAtPos(e){return Lte(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var i;this.dom?this.flags&4&&(Nte(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(J9(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let r=this.dom.lastChild;for(;r&&Fn.get(r)instanceof Lu;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((i=Fn.get(r))===null||i===void 0?void 0:i.isEditable)==!1&&(!Ve.ios||!this.children.some(o=>o instanceof Iu))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let i of this.children){if(!(i instanceof Iu)||/[^ -~]/.test(i.text))return null;let r=Mm(i.dom);if(r.length!=1)return null;e+=r[0].width,n=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let i=Rte(this,e,n);if(!this.children.length&&i&&this.parent){let{heightOracle:r}=this.parent.view.viewState,o=i.bottom-i.top;if(Math.abs(o-r.lineHeight)<2&&r.textHeight=n){if(o instanceof t)return o;if(a>n)break}r=a+o.breakAfter}return null}},dm=class t extends Fn{constructor(e,n,i){super(),this.widget=e,this.length=n,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,n,i,r,o,a){return i&&(!(i instanceof t)||!this.widget.compare(i.widget)||e>0&&o<=0||n0}},ss=class{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},xo=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(xo||(xo={})),ot=class extends Wc{constructor(e,n,i,r){super(),this.startSide=e,this.endSide=n,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(e){return new _b(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return n+=i&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new ju(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:o,end:a}=Fte(e,n);i=(o?n?-3e8:-1:5e8)-1,r=(a?n?2e8:1:-6e8)+1}return new ju(e,i,r,n,e.widget||null,!0)}static line(e){return new Ob(e)}static set(e,n=!1){return yn.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};ot.none=yn.empty;var _b=class t extends ot{constructor(e){let{start:n,end:i}=Fte(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,i;return this==e||e instanceof t&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&L$(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}};_b.prototype.point=!1;var Ob=class t extends ot{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof t&&this.spec.class==e.spec.class&&L$(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}};Ob.prototype.mapMode=_r.TrackBefore;Ob.prototype.point=!0;var ju=class t extends ot{constructor(e,n,i,r,o,a){super(n,i,o,e),this.block=r,this.isReplace=a,this.mapMode=r?n<=0?_r.TrackBefore:_r.TrackAfter:_r.TrackDel}get type(){return this.startSide!=this.endSide?xo.WidgetRange:this.startSide<=0?xo.WidgetBefore:xo.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof t&&TNe(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}};ju.prototype.point=!0;function Fte(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function TNe(t,e){return t==e||!!(t&&e&&t.compare(e))}function eN(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}var Ny=class t{constructor(e,n,i,r){this.doc=e,this.pos=n,this.end=i,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof dm&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new yr),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(B2(new xb(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof dm)&&this.getLine()}buildText(e,n,i){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:a,done:s}=this.cursor.next(this.skip);if(this.skip=0,s)throw new Error("Ran out of text content when drawing inline views");if(a){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-i)),this.getLine().append(B2(new Iu(this.text.slice(this.textOff,this.textOff+r)),n),i),this.atCursorPos=!0,this.textOff+=r,e-=r,i=0}}span(e,n,i,r){this.buildText(n-e,i,r),this.pos=n,this.openStart<0&&(this.openStart=r)}point(e,n,i,r,o,a){if(this.disallowBlockEffectsFor[a]&&i instanceof ju){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=n-e;if(i instanceof ju)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new dm(i.widget||new a3("div"),s,i));else{let l=kb.create(i.widget||new a3("span"),s,s?0:i.startSide),c=this.atCursorPos&&!l.isEditable&&o<=r.length&&(e0),d=!l.isEditable&&(er.length||i.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!c&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),c&&(f.append(B2(new xb(1),r),o),o=r.length+Math.max(0,o-r.length)),f.append(B2(l,r),o),this.atCursorPos=d,this.pendingBuffer=d?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,i,r,o){let a=new t(e,n,i,o);return a.openEnd=yn.spans(r,n,i,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}};function B2(t,e){for(let n of e)t=new Lu(n,[t],t.length);return t}var a3=class extends ss{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}},An=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(An||(An={})),Oh=An.LTR,j$=An.RTL;function zte(t){let e=[];for(let n=0;n=n){if(s.level==i)return a;(o<0||(r!=0?r<0?s.fromn:e[o].level>s.level))&&(o=a)}}if(o<0)throw new RangeError("Index out of range");return o}};function Wte(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;b-=3)if(dl[b+1]==-g){let x=dl[b+2],_=x&2?r:x&4?x&1?o:r:0;_&&(nn[f]=nn[dl[b]]=_),s=b;break}}else{if(dl.length==189)break;dl[s++]=f,dl[s++]=h,dl[s++]=l}else if((m=nn[f])==2||m==1){let b=m==r;l=b?0:1;for(let x=s-3;x>=0;x-=3){let _=dl[x+2];if(_&2)break;if(b)dl[x+2]|=2;else{if(_&4)break;dl[x+2]|=4}}}}}function DNe(t,e,n,i){for(let r=0,o=i;r<=n.length;r++){let a=r?n[r-1].to:t,s=rl;)m==x&&(m=n[--b].from,x=b?n[b-1].to:t),nn[--m]=g;l=d}else o=c,l++}}}function nN(t,e,n,i,r,o,a){let s=i%2?2:1;if(i%2==r%2)for(let l=e,c=0;ll&&a.push(new Tl(l,b.from,g));let x=b.direction==Oh!=!(g%2);iN(t,x?i+1:i,r,b.inner,b.from,b.to,a),l=b.to}m=b.to}else{if(m==n||(d?nn[m]!=s:nn[m]==s))break;m++}h?nN(t,l,m,i+1,r,h,a):le;){let d=!0,f=!1;if(!c||l>o[c-1].to){let b=nn[l-1];b!=s&&(d=!1,f=b==16)}let h=!d&&s==1?[]:null,g=d?i:i+1,m=l;e:for(;;)if(c&&m==o[c-1].to){if(f)break e;let b=o[--c];if(!d)for(let x=b.from,_=c;;){if(x==e)break e;if(_&&o[_-1].to==x)x=o[--_].from;else{if(nn[x-1]==s)break e;break}}if(h)h.push(b);else{b.tonn.length;)nn[nn.length]=256;let i=[],r=e==Oh?0:1;return iN(t,r,r,n,0,t.length,i),i}function Bte(t){return[new Tl(0,t,0)]}var Hte="";function LNe(t,e,n,i,r){var o;let a=i.head-t.from,s=Tl.find(e,a,(o=i.bidiLevel)!==null&&o!==void 0?o:-1,i.assoc),l=e[s],c=l.side(r,n);if(a==c){let h=s+=r?1:-1;if(h<0||h>=e.length)return null;l=e[s=h],a=l.side(!r,n),c=l.side(r,n)}let d=Er(t.text,a,l.forward(r,n));(dl.to)&&(d=c),Hte=t.text.slice(Math.min(a,d),Math.max(a,d));let f=s==(r?e.length-1:0)?null:e[s+(r?1:-1)];return f&&d==c&&f.level+(r?0:1)t.some(e=>e)}),Kte=He.define({combine:t=>t.some(e=>e)}),Py=class t{constructor(e,n="nearest",i="nearest",r=5,o=5,a=!1){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=o,this.isSnapshot=a}map(e){return e.empty?this:new t(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new t(ye.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},H2=kt.define({map:(t,e)=>t.map(e)});function ns(t,e,n){let i=t.facet(Vte);i.length?i[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}var T4=He.define({combine:t=>t.length?t[0]:!0}),RNe=0,ay=He.define(),Ai=class t{constructor(e,n,i,r,o){this.id=e,this.create=n,this.domEventHandlers=i,this.domEventObservers=r,this.extension=o(this)}static define(e,n){let{eventHandlers:i,eventObservers:r,provide:o,decorations:a}=n||{};return new t(RNe++,e,i,r,s=>{let l=[ay.of(s)];return a&&l.push(Sb.of(c=>{let d=c.plugin(s);return d?a(d):ot.none})),o&&l.push(o(s)),l})}static fromClass(e,n){return t.define(i=>new e(i),n)}},Ay=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(ns(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){ns(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){ns(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}},Jte=He.define(),R$=He.define(),Sb=He.define(),ene=He.define(),F$=He.define(),tne=He.define();function rZ(t,e){let n=t.state.facet(tne);if(!n.length)return n;let i=n.map(o=>o instanceof Function?o(t):o),r=[];return yn.spans(i,e.from,e.to,{point(){},span(o,a,s,l){let c=o-e.from,d=a-e.from,f=r;for(let h=s.length-1;h>=0;h--,l--){let g=s[h].spec.bidiIsolate,m;if(g==null&&(g=jNe(e.text,c,d)),l>0&&f.length&&(m=f[f.length-1]).to==c&&m.direction==g)m.to=d,f=m.inner;else{let b={from:c,to:d,direction:g,inner:[]};f.push(b),f=b.inner}}}}),r}var nne=He.define();function ine(t){let e=0,n=0,i=0,r=0;for(let o of t.state.facet(nne)){let a=o(t);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(i=Math.max(i,a.top)),a.bottom!=null&&(r=Math.max(r,a.bottom)))}return{left:e,right:n,top:i,bottom:r}}var sy=He.define(),Pl=class t{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new t(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toAd)break;o+=2}if(!l)return i;new t(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),a=l.toA,s=l.toB}}},s3=class t{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=Na.empty(this.startState.doc.length);for(let o of i)this.changes=this.changes.compose(o.changes);let r=[];this.changes.iterChangedRanges((o,a,s,l)=>r.push(new Pl(o,a,s,l))),this.changedRanges=r}static create(e,n,i){return new t(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},l3=class extends Fn{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new yr],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Pl(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:c,toA:d})=>dthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!ZNe(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let o=r>-1?zNe(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:d}=this.hasComposition;i=new Pl(c,d,e.changes.mapPos(c,-1),e.changes.mapPos(d,1)).addToSet(i.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Ve.ie||Ve.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,s=this.updateDeco(),l=BNe(a,s,e.changes);return i=Pl.extendWithRanges(i,l),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,i);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=Ve.chrome||Ve.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||r.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to=0?r[a]:null;if(!s)break;let{fromA:l,toA:c,fromB:d,toB:f}=s,h,g,m,b;if(i&&i.range.fromBd){let E=Ny.build(this.view.state.doc,d,i.range.fromB,this.decorations,this.dynamicDecorationMap),T=Ny.build(this.view.state.doc,i.range.toB,f,this.decorations,this.dynamicDecorationMap);g=E.breakAtStart,m=E.openStart,b=T.openEnd;let M=this.compositionView(i);T.breakAtStart?M.breakAfter=1:T.content.length&&M.merge(M.length,M.length,T.content[0],!1,T.openStart,0)&&(M.breakAfter=T.content[0].breakAfter,T.content.shift()),E.content.length&&M.merge(0,0,E.content[E.content.length-1],!0,0,E.openEnd)&&E.content.pop(),h=E.content.concat(M).concat(T.content)}else({content:h,breakAtStart:g,openStart:m,openEnd:b}=Ny.build(this.view.state.doc,d,f,this.decorations,this.dynamicDecorationMap));let{i:x,off:_}=o.findPos(c,1),{i:O,off:S}=o.findPos(l,-1);Ate(this,O,S,x,_,h,g,m,b)}i&&this.fixCompositionDOM(i)}compositionView(e){let n=new Iu(e.text.nodeValue);n.flags|=8;for(let{deco:r}of e.marks)n=new Lu(r,[n],n.length);let i=new yr;return i.append(n,0),i}fixCompositionDOM(e){let n=(o,a)=>{a.flags|=8|(a.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(a);let s=Fn.get(o);s&&s!=a&&(s.dom=null),a.setDOM(o)},i=this.childPos(e.range.fromB,1),r=this.children[i.i];n(e.line,r);for(let o=e.marks.length-1;o>=-1;o--)i=r.childPos(i.off,1),r=r.children[i.i],n(o>=0?e.marks[o].node:e.text,r)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,o=!r&&L_(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||n||o))return;let a=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(s.anchor)),c=s.empty?l:this.moveToLine(this.domAtPos(s.head));if(Ve.gecko&&s.empty&&!this.hasComposition&&FNe(l)){let f=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(f,l.node.childNodes[l.offset]||null)),l=c=new vo(f,0),a=!0}let d=this.view.observer.selectionRange;(a||!d.focusNode||(!My(l.node,l.offset,d.anchorNode,d.anchorOffset)||!My(c.node,c.offset,d.focusNode,d.focusOffset))&&!this.suppressWidgetCursorChange(d,s))&&(this.view.observer.ignore(()=>{Ve.android&&Ve.chrome&&this.dom.contains(d.focusNode)&&HNe(d.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=r3(this.view.root);if(f)if(s.empty){if(Ve.gecko){let h=QNe(l.node,l.offset);if(h&&h!=3){let g=one(l.node,l.offset,h==1?1:-1);g&&(l=new vo(g.node,g.offset))}}f.collapse(l.node,l.offset),s.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=s.bidiLevel)}else if(f.extend){f.collapse(l.node,l.offset);try{f.extend(c.node,c.offset)}catch{}}else{let h=document.createRange();s.anchor>s.head&&([l,c]=[c,l]),h.setEnd(c.node,c.offset),h.setStart(l.node,l.offset),f.removeAllRanges(),f.addRange(h)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new vo(d.anchorNode,d.anchorOffset),this.impreciseHead=c.precise?null:new vo(d.focusNode,d.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&My(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=r3(e.root),{anchorNode:r,anchorOffset:o}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let a=yr.find(this,n.head);if(!a)return;let s=a.posAtStart;if(n.head==s||n.head==s+a.length)return;let l=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let d=this.domAtPos(n.head+n.assoc);i.collapse(d.node,d.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=n.from&&i.collapse(r,o)}moveToLine(e){let n=this.dom,i;if(e.node!=n)return e;for(let r=e.offset;!i&&r=0;r--){let o=Fn.get(n.childNodes[r]);o instanceof yr&&(i=o.domAtPos(o.length))}return i?new vo(i.node,i.offset,!0):e}nearest(e){for(let n=e;n;){let i=Fn.get(n);if(i&&i.rootView==this)return i;n=n.parentNode}return null}posFromDOM(e,n){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,n)+i.posAtStart}domAtPos(e){let{i:n,off:i}=this.childCursor().findPos(e,-1);for(;n=0;a--){let s=this.children[a],l=o-s.breakAfter,c=l-s.length;if(le||s.covers(1))&&(!i||s instanceof yr&&!(i instanceof yr&&n>=0))&&(i=s,r=c),o=c}return i?i.coordsAt(e-r,n):null}coordsForChar(e){let{i:n,off:i}=this.childPos(e,1),r=this.children[n];if(!(r instanceof yr))return null;for(;r.children.length;){let{i:s,off:l}=r.childPos(i,1);for(;;s++){if(s==r.children.length)return null;if((r=r.children[s]).length)break}i=l}if(!(r instanceof Iu))return null;let o=Er(r.text,i);if(o==i)return null;let a=_h(r.dom,i,o).getClientRects();for(let s=0;sMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,l=this.view.textDirection==An.LTR;for(let c=0,d=0;dr)break;if(c>=i){let g=f.dom.getBoundingClientRect();if(n.push(g.height),a){let m=f.dom.lastChild,b=m?Mm(m):[];if(b.length){let x=b[b.length-1],_=l?x.right-g.left:g.right-x.left;_>s&&(s=_,this.minWidth=o,this.minWidthFrom=c,this.minWidthTo=h)}}}c=h+f.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?An.RTL:An.LTR}measureTextSize(){for(let o of this.children)if(o instanceof yr){let a=o.measureTextSize();if(a)return a}let e=document.createElement("div"),n,i,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=Mm(e.firstChild)[0];n=e.getBoundingClientRect().height,i=o?o.width/27:7,r=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:i,textHeight:r}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new o3(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let o=r==n.viewports.length?null:n.viewports[r],a=o?o.from-1:this.length;if(a>i){let s=(n.lineBlockAt(a).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(ot.replace({widget:new c3(s),block:!0,inclusive:!0,isBlockGap:!0}).range(i,a))}if(!o)break;i=o.to+1}return ot.set(e)}updateDeco(){let e=this.view.state.facet(Sb).map((r,o)=>(this.dynamicDecorationMap[o]=typeof r=="function")?r(this.view):r),n=!1,i=this.view.state.facet(ene).map((r,o)=>{let a=typeof r=="function";return a&&(n=!0),a?r(this.view):r});i.length&&(this.dynamicDecorationMap[e.length]=n,e.push(yn.join(i)));for(let r=e.length;rn.anchor?-1:1),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let o=ine(this.view),a={left:i.left-o.left,top:i.top-o.top,right:i.right+o.right,bottom:i.bottom+o.bottom},{offsetWidth:s,offsetHeight:l}=this.view.scrollDOM;bNe(this.view.scrollDOM,a,n.head0)i=i.childNodes[r-1],r=Bc(i);else break}if(n>=0)for(let i=t,r=e;;){if(i.nodeType==3)return{node:i,offset:r};if(i.nodeType==1&&r=0)i=i.childNodes[r],r=0;else break}return null}function QNe(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e{ie.from&&(n=!0)}),n}function qNe(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),o=e-r.from;if(r.length==0)return ye.cursor(e);o==0?n=1:o==r.length&&(n=-1);let a=o,s=o;n<0?a=Er(r.text,o,!1):s=Er(r.text,o);let l=i(r.text.slice(a,s));for(;a>0;){let c=Er(r.text,a,!1);if(i(r.text.slice(c,a))!=l)break;a=c}for(;st?e.left-t:Math.max(0,t-e.right)}function VNe(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function r8(t,e){return t.tope.top+1}function oZ(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function oN(t,e,n){let i,r,o,a,s=!1,l,c,d,f;for(let m=t.firstChild;m;m=m.nextSibling){let b=Mm(m);for(let x=0;xS||a==S&&o>O){i=m,r=_,o=O,a=S;let E=S?n<_.top?-1:1:O?e<_.left?-1:1:0;s=!E||(E>0?x0)}O==0?n>_.bottom&&(!d||d.bottom<_.bottom)?(l=m,d=_):n<_.top&&(!f||f.top>_.top)&&(c=m,f=_):d&&r8(d,_)?d=aZ(d,_.bottom):f&&r8(f,_)&&(f=oZ(f,_.top))}}if(d&&d.bottom>=n?(i=l,r=d):f&&f.top<=n&&(i=c,r=f),!i)return{node:t,offset:0};let h=Math.max(r.left,Math.min(r.right,e));if(i.nodeType==3)return sZ(i,h,n);if(s&&i.contentEditable!="false")return oN(i,h,n);let g=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(r.left+r.right)/2?1:0);return{node:t,offset:g}}function sZ(t,e,n){let i=t.nodeValue.length,r=-1,o=1e9,a=0;for(let s=0;sn?d.top-n:n-d.bottom)-1;if(d.left-1<=e&&d.right+1>=e&&f=(d.left+d.right)/2,g=h;if((Ve.chrome||Ve.gecko)&&_h(t,s).getBoundingClientRect().left==d.right&&(g=!h),f<=0)return{node:t,offset:s+(g?1:0)};r=s+(g?1:0),o=f}}}return{node:t,offset:r>-1?r:a>0?t.nodeValue.length:0}}function ane(t,e,n,i=-1){var r,o;let a=t.contentDOM.getBoundingClientRect(),s=a.top+t.viewState.paddingTop,l,{docHeight:c}=t.viewState,{x:d,y:f}=e,h=f-s;if(h<0)return 0;if(h>c)return t.state.doc.length;for(let E=t.viewState.heightOracle.textHeight/2,T=!1;l=t.elementAtHeight(h),l.type!=xo.Text;)for(;h=i>0?l.bottom+E:l.top-E,!(h>=0&&h<=c);){if(T)return n?null:0;T=!0,i=-i}f=s+h;let g=l.from;if(gt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:lZ(t,a,l,d,f);let m=t.dom.ownerDocument,b=t.root.elementFromPoint?t.root:m,x=b.elementFromPoint(d,f);x&&!t.contentDOM.contains(x)&&(x=null),x||(d=Math.max(a.left+1,Math.min(a.right-1,d)),x=b.elementFromPoint(d,f),x&&!t.contentDOM.contains(x)&&(x=null));let _,O=-1;if(x&&((r=t.docView.nearest(x))===null||r===void 0?void 0:r.isEditable)!=!1){if(m.caretPositionFromPoint){let E=m.caretPositionFromPoint(d,f);E&&({offsetNode:_,offset:O}=E)}else if(m.caretRangeFromPoint){let E=m.caretRangeFromPoint(d,f);E&&({startContainer:_,startOffset:O}=E,(!t.contentDOM.contains(_)||Ve.safari&&YNe(_,O,d)||Ve.chrome&&XNe(_,O,d))&&(_=void 0))}}if(!_||!t.docView.dom.contains(_)){let E=yr.find(t.docView,g);if(!E)return h>l.top+l.height/2?l.to:l.from;({node:_,offset:O}=oN(E.dom,d,f))}let S=t.docView.nearest(_);if(!S)return null;if(S.isWidget&&((o=S.dom)===null||o===void 0?void 0:o.nodeType)==1){let E=S.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let s=t.viewState.heightOracle.textHeight,l=Math.floor((r-n.top-(t.defaultLineHeight-s)*.5)/s);o+=l*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+B9(a,o,t.state.tabSize)}function YNe(t,e,n){let i;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(let r=t.nextSibling;r;r=r.nextSibling)if(r.nodeType!=1||r.nodeName!="BR")return!1;return _h(t,i-1,i).getBoundingClientRect().left>n}function XNe(t,e,n){if(e!=0)return!1;for(let r=t;;){let o=r.parentNode;if(!o||o.nodeType!=1||o.firstChild!=r)return!1;if(o.classList.contains("cm-line"))break;r=o}let i=t.nodeType==1?t.getBoundingClientRect():_h(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}function aN(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let i of n.type)if(i.to>e||i.to==e&&(i.to==n.to||i.type==xo.Text))return i}return n}function GNe(t,e,n,i){let r=aN(t,e.head),o=!i||r.type!=xo.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(o){let a=t.dom.getBoundingClientRect(),s=t.textDirectionAt(r.from),l=t.posAtCoords({x:n==(s==An.LTR)?a.right-1:a.left+1,y:(o.top+o.bottom)/2});if(l!=null)return ye.cursor(l,n?-1:1)}return ye.cursor(n?r.to:r.from,n?-1:1)}function cZ(t,e,n,i){let r=t.state.doc.lineAt(e.head),o=t.bidiSpans(r),a=t.textDirectionAt(r.from);for(let s=e,l=null;;){let c=LNe(r,o,a,s,n),d=Hte;if(!c){if(r.number==(n?t.state.doc.lines:1))return s;d=` `,r=t.state.doc.line(r.number+(n?1:-1)),o=t.bidiSpans(r),c=t.visualLineSide(r,!n)}if(l){if(!l(d))return s}else{if(!i)return c;l=i(d)}s=c}}function KNe(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return o=>{let a=i(o);return r==zn.Space&&(r=a),r==a}}function JNe(t,e,n,i){let r=e.head,o=n?1:-1;if(r==(n?t.state.doc.length:0))return ye.cursor(r,e.assoc);let a=e.goalColumn,s,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(r,e.assoc||-1),d=t.documentTop;if(c)a==null&&(a=c.left-l.left),s=o<0?c.top:c.bottom;else{let g=t.viewState.lineBlockAt(r);a==null&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(r-g.from))),s=(o<0?g.top:g.bottom)+d}let f=l.left+a,h=i??t.viewState.heightOracle.textHeight>>1;for(let g=0;;g+=10){let m=s+(h+g)*o,b=ane(t,{x:f,y:m},!1,o);if(ml.bottom||(o<0?br)){let x=t.docView.coordsForChar(b),_=!x||m{if(e>o&&er(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:ye.cursor(i,inull),Ve.gecko&&p7e(e.contentDOM.ownerDocument)}handleEvent(e){!a7e(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=e7e(e),i=this.handlers,r=this.view.contentDOM;for(let o in n)if(o!="scroll"){let a=!n[o].handlers.length,s=i[o];s&&a!=!s.handlers.length&&(r.removeEventListener(o,this.handleEvent),s=null),s||r.addEventListener(o,this.handleEvent,{passive:a})}for(let o in i)o!="scroll"&&!n[o]&&r.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()i.keyCode==e.keyCode))&&!e.ctrlKey||t7e.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(){let e=this.pendingIOSKey;return e?(this.pendingIOSKey=void 0,cm(this.view.contentDOM,e.key,e.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Ve.safari&&!Ve.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function dZ(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){ns(n.state,r)}}}function e7e(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec;if(r&&r.domEventHandlers)for(let o in r.domEventHandlers){let a=r.domEventHandlers[o];a&&n(o).handlers.push(dZ(i.value,a))}if(r&&r.domEventObservers)for(let o in r.domEventObservers){let a=r.domEventObservers[o];a&&n(o).observers.push(dZ(i.value,a))}}for(let i in Fs)n(i).handlers.push(Fs[i]);for(let i in zs)n(i).observers.push(zs[i]);return e}var sne=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],t7e="dthko",lne=[16,17,18,20,91,92,224,225],Z2=6;function q2(t){return Math.max(0,t)*.7+8}function n7e(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}var lN=class{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=wNe(e.contentDOM),this.atoms=e.state.facet(F$).map(a=>a(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(mn.allowMultipleSelections)&&i7e(e,n),this.dragging=o7e(e,n)&&fne(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var n;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&n7e(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let i=0,r=0,o=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},a=ine(this.view);e.clientX-a.left<=o.left+Z2?i=-q2(o.left-e.clientX):e.clientX+a.right>=o.right-Z2&&(i=q2(e.clientX-o.right)),e.clientY-a.top<=o.top+Z2?r=-q2(o.top-e.clientY):e.clientY+a.bottom>=o.bottom-Z2&&(r=q2(e.clientY-o.bottom)),this.setScrollSpeed(i,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let i=0;ithis.select(this.lastEvent),20)}};function i7e(t,e){let n=t.state.facet(Zte);return n.length?n[0](e):Ve.mac?e.metaKey:e.ctrlKey}function r7e(t,e){let n=t.state.facet(qte);return n.length?n[0](e):Ve.mac?!e.altKey:!e.ctrlKey}function o7e(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=r3(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let o=0;o=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function a7e(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=Fn.get(n))&&i.ignoreEvent(e))return!1;return!0}var Fs=Object.create(null),zs=Object.create(null),cne=Ve.ie&&Ve.ie_version<15||Ve.ios&&Ve.webkit_version<604;function s7e(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),dne(t,n.value)},50)}function dne(t,e){let{state:n}=t,i,r=1,o=n.toText(e),a=o.lines==n.selection.ranges.length;if(cN!=null&&n.selection.ranges.every(s=>s.empty)&&cN==o.toString()){let s=-1;i=n.changeByRange(l=>{let c=n.doc.lineAt(l.from);if(c.from==s)return{range:l};s=c.from;let d=n.toText((a?o.line(r++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:d},range:ye.cursor(l.from+d.length)}})}else a?i=n.changeByRange(s=>{let l=o.line(r++);return{changes:{from:s.from,to:s.to,insert:l.text},range:ye.cursor(s.from+l.length)}}):i=n.replaceSelection(o);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}zs.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Fs.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&(t.inputState.lastEscPress=Date.now()),!1);zs.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};zs.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Fs.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(Ute))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=d7e(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new lN(t,e,n,i)),i&&t.observer.ignore(()=>Mte(t.contentDOM));let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}return!1};function uZ(t,e,n,i){if(i==1)return ye.cursor(e,n);if(i==2)return qNe(t.state,e,n);{let r=yr.find(t.docView,e),o=t.state.doc.lineAt(r?r.posAtEnd:e),a=r?r.posAtStart:o.from,s=r?r.posAtEnd:o.to;return st>=e.top&&t<=e.bottom,fZ=(t,e,n)=>une(e,n)&&t>=n.left&&t<=n.right;function l7e(t,e,n,i){let r=yr.find(t.docView,e);if(!r)return 1;let o=e-r.posAtStart;if(o==0)return 1;if(o==r.length)return-1;let a=r.coordsAt(o,-1);if(a&&fZ(n,i,a))return-1;let s=r.coordsAt(o,1);return s&&fZ(n,i,s)?1:a&&une(i,a)?-1:1}function hZ(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:l7e(t,n,e.clientX,e.clientY)}}var c7e=Ve.ie&&Ve.ie_version<=11,pZ=null,gZ=0,mZ=0;function fne(t){if(!c7e)return t.detail;let e=pZ,n=mZ;return pZ=t,mZ=Date.now(),gZ=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(gZ+1)%3:1}function d7e(t,e){let n=hZ(t,e),i=fne(e),r=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),r=r.map(o.changes))},get(o,a,s){let l=hZ(t,o),c,d=uZ(t,l.pos,l.bias,i);if(n.pos!=l.pos&&!a){let f=uZ(t,n.pos,n.bias,i),h=Math.min(f.from,d.from),g=Math.max(f.to,d.to);d=h1&&(c=u7e(r,l.pos))?c:s?r.addRange(d):ye.create([d])}}}function u7e(t,e){for(let n=0;n=e)return ye.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Fs.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let o=r.posAtStart,a=o+r.length;(o>=n.to||a<=n.from)&&(n=ye.range(o,a))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove"),!1};Fs.dragend=t=>(t.inputState.draggedContent=null,!1);function vZ(t,e,n,i){if(!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,a=i&&o&&r7e(t,e)?{from:o.from,to:o.to}:null,s={from:r,insert:n},l=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Fs.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,o=()=>{++r==n.length&&vZ(t,e,i.filter(a=>a!=null).join(t.state.lineBreak),!1)};for(let a=0;a{/[\x00-\x08\x0e-\x1f]{2}/.test(s.result)||(i[a]=s.result),o()},s.readAsText(n[a])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return vZ(t,e,i,!0),!0}return!1};Fs.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=cne?null:e.clipboardData;return n?(dne(t,n.getData("text/plain")||n.getData("text/uri-text")),!0):(s7e(t),!1)};function f7e(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function h7e(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:o}of t.selection.ranges){let a=t.doc.lineAt(o);a.number>r&&(e.push(a.text),n.push({from:a.from,to:Math.min(t.doc.length,a.to+1)})),r=a.number}i=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:i}}var cN=null;Fs.copy=Fs.cut=(t,e)=>{let{text:n,ranges:i,linewise:r}=h7e(t.state);if(!n&&!r)return!1;cN=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let o=cne?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(f7e(t,n),!1)};var hne=as.define();function pne(t,e){let n=[];for(let i of t.facet(Xte)){let r=i(t,e);r&&n.push(r)}return n?t.update({effects:n,annotations:hne.of(!0)}):null}function gne(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=pne(t.state,e);n?t.dispatch(n):t.update([])}},10)}zs.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),gne(t)};zs.blur=t=>{t.observer.clearSelectionRange(),gne(t)};zs.compositionstart=zs.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};zs.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Ve.chrome&&Ve.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50)};zs.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Fs.beforeinput=(t,e)=>{var n;let i;if(Ve.chrome&&Ve.android&&(i=sne.find(r=>r.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let r=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return!1};var yZ=new Set;function p7e(t){yZ.has(t)||(yZ.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}var bZ=["pre-wrap","normal","pre-line","break-spaces"],dN=class{constructor(e){this.lineWrapping=e,this.doc=Vt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return bZ.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=o,l){this.heightSamples={};for(let c=0;c0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>R_&&(e.heightChanged=!0),this.height=n)}replace(e,n,i){return t.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let o=this,a=i.doc;for(let s=r.length-1;s>=0;s--){let{fromA:l,toA:c,fromB:d,toB:f}=r[s],h=o.lineAt(l,Tn.ByPosNoHeight,i.setDoc(n),0,0),g=h.to>=c?h:o.lineAt(c,Tn.ByPosNoHeight,i,0,0);for(f+=g.to-c,c=g.to;s>0&&h.from<=r[s-1].toA;)l=r[s-1].fromA,d=r[s-1].fromB,s--,lo*2){let s=e[n-1];s.break?e.splice(--n,1,s.left,null,s.right):e.splice(--n,1,s.left,s.right),i+=1+s.break,r-=s.size}else if(o>r*2){let s=e[i];s.break?e.splice(i,1,s.left,null,s.right):e.splice(i,1,s.left,s.right),i+=2+s.break,o-=s.size}else break;else if(r=o&&a(this.blockAt(0,i,r,o))}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}},qa=class t extends d3{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,i,r){return new Ol(r,this.length,i,this.height,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof t||r instanceof mu&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof mu?r=new t(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):Oa.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setHeight(e,r.heights[r.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}},mu=class t extends Oa{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,o=r-i+1,a,s=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*o);a=l/o,this.length>o+1&&(s=(this.height-l)/(this.length-o-1))}else a=this.height/o;return{firstLine:i,lastLine:r,perLine:a,perChar:s}}blockAt(e,n,i,r){let{firstLine:o,lastLine:a,perLine:s,perChar:l}=this.heightMetrics(n,r);if(n.lineWrapping){let c=r+Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length),d=n.doc.lineAt(c),f=s+d.length*l,h=Math.max(i,e-f/2);return new Ol(d.from,d.length,h,f,0)}else{let c=Math.max(0,Math.min(a-o,Math.floor((e-i)/s))),{from:d,length:f}=n.doc.line(o+c);return new Ol(d,f,i+s*c,s,0)}}lineAt(e,n,i,r,o){if(n==Tn.ByHeight)return this.blockAt(e,i,r,o);if(n==Tn.ByPosNoHeight){let{from:g,to:m}=i.doc.lineAt(e);return new Ol(g,m-g,0,0,0)}let{firstLine:a,perLine:s,perChar:l}=this.heightMetrics(i,o),c=i.doc.lineAt(e),d=s+c.length*l,f=c.number-a,h=r+s*f+l*(c.from-o-f);return new Ol(c.from,c.length,Math.max(r,Math.min(h,r+this.height-d)),d,0)}forEachLine(e,n,i,r,o,a){e=Math.max(e,o),n=Math.min(n,o+this.length);let{firstLine:s,perLine:l,perChar:c}=this.heightMetrics(i,o);for(let d=e,f=r;d<=n;){let h=i.doc.lineAt(d);if(d==e){let m=h.number-s;f+=l*m+c*(e-o-m)}let g=l+c*h.length;a(new Ol(h.from,h.length,f,g,0)),f+=g,d=h.to+1}}replace(e,n,i){let r=this.length-n;if(r>0){let o=i[i.length-1];o instanceof t?i[i.length-1]=new t(o.length+r):i.push(null,new t(r-1))}if(e>0){let o=i[0];o instanceof t?i[0]=new t(e+o.length):i.unshift(new t(e-1),null)}return Oa.of(i)}decomposeLeft(e,n){n.push(new t(e-1),null)}decomposeRight(e,n){n.push(null,new t(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let o=n+this.length;if(r&&r.from<=n+this.length&&r.more){let a=[],s=Math.max(n,r.from),l=-1;for(r.from>n&&a.push(new t(r.from-n-1).updateHeight(e,n));s<=o&&r.more;){let d=e.doc.lineAt(s).length;a.length&&a.push(null);let f=r.heights[r.index++];l==-1?l=f:Math.abs(f-l)>=R_&&(l=-2);let h=new qa(d,f);h.outdated=!1,a.push(h),s+=d+1}s<=o&&a.push(null,new t(o-s).updateHeight(e,s));let c=Oa.of(a);return(l<0||Math.abs(c.height-this.height)>=R_||Math.abs(l-this.heightMetrics(e,n).perLine)>=R_)&&(e.heightChanged=!0),c}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},fN=class extends Oa{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let o=i+this.left.height;return es))return c;let d=n==Tn.ByPosNoHeight?Tn.ByPosNoHeight:Tn.ByPos;return l?c.join(this.right.lineAt(s,d,i,a,s)):this.left.lineAt(s,d,i,r,o).join(c)}forEachLine(e,n,i,r,o,a){let s=r+this.left.height,l=o+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,i,s,l,a);else{let c=this.lineAt(l,Tn.ByPos,i,r,o);e=e&&c.from<=n&&a(c),n>c.to&&this.right.forEachLine(c.to+1,n,i,s,l,a)}}replace(e,n,i){let r=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let o=[];e>0&&this.decomposeLeft(e,o);let a=o.length;for(let s of i)o.push(s);if(e>0&&wZ(o,a-1),n=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e2*n.size||n.size>2*e.size?Oa.of(this.break?[e,null,n]:[e,n]):(this.left=e,this.right=n,this.height=e.height+n.height,this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:o,right:a}=this,s=n+o.length+this.break,l=null;return r&&r.from<=n+o.length&&r.more?l=o=o.updateHeight(e,n,i,r):o.updateHeight(e,n,i),r&&r.from<=s+a.length&&r.more?l=a=a.updateHeight(e,s,i,r):a.updateHeight(e,s,i),l?this.balanced(o,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}};function wZ(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof mu&&(i=t[e+1])instanceof mu&&t.splice(e-1,3,new mu(n.length+1+i.length))}var g7e=5,hN=class t{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof qa?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new qa(i-this.pos,-1)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e=g7e)&&this.addLineDeco(r,o,a)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new qa(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let i=new mu(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof qa)return e;let n=new qa(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof qa)&&!this.isCovered?this.nodes.push(new qa(0,-1)):(this.writtenTod.clientHeight||d.scrollWidth>d.clientWidth)&&f.overflow!="visible"){let h=d.getBoundingClientRect();o=Math.max(o,h.left),a=Math.min(a,h.right),s=Math.max(s,h.top),l=c==t.parentNode?h.bottom:Math.min(l,h.bottom)}c=f.position=="absolute"||f.position=="fixed"?d.offsetParent:d.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:o-n.left,right:Math.max(o,a)-n.left,top:s-(n.top+e),bottom:Math.max(s,l)-(n.top+e)}}function y7e(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}var $y=class{constructor(e,n,i){this.from=e,this.to=n,this.size=i}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new dN(n),this.stateDeco=e.facet(Sb).filter(i=>typeof i!="function"),this.heightMap=Oa.empty().applyChanges(this.stateDeco,Vt.empty,this.heightOracle.setDoc(e.doc),[new Pl(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ot.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:o,to:a})=>r>=o&&r<=a)){let{from:o,to:a}=this.lineBlockAt(r);e.push(new qg(o,a))}}this.viewports=e.sort((i,r)=>i.from-r.from),this.scaler=this.heightMap.height<=7e6?kZ:new mN(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:ly(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Sb).filter(d=>typeof d!="function");let r=e.changedRanges,o=Pl.extendWithRanges(r,m7e(i,this.stateDeco,e?e.changes:Na.empty(this.state.doc.length))),a=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=a&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let c=!e.changes.empty||e.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),c&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Kte)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?An.RTL:An.LTR;let a=this.heightOracle.mustRefreshForWrapping(o),s=n.getBoundingClientRect(),l=a||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let c=0,d=0;if(s.width&&s.height){let{scaleX:E,scaleY:T}=Tte(n,s);(this.scaleX!=E||this.scaleY!=T)&&(this.scaleX=E,this.scaleY=T,c|=8,a=l=!0)}let f=(parseInt(i.paddingTop)||0)*this.scaleY,h=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=h)&&(this.paddingTop=f,this.paddingBottom=h,c|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=8);let g=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=g&&(this.scrollAnchorHeight=-1,this.scrollTop=g),this.scrolledToBottom=Pte(e.scrollDOM);let m=(this.printing?y7e:v7e)(n,this.paddingTop),b=m.top-this.pixelViewport.top,x=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let _=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(_!=this.inView&&(this.inView=_,_&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let O=s.width;if((this.contentDOMWidth!=O||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,c|=8),l){let E=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(E)&&(a=!0),a||r.lineWrapping&&Math.abs(O-this.contentDOMWidth)>r.charWidth){let{lineHeight:T,charWidth:M,textHeight:I}=e.docView.measureTextSize();a=T>0&&r.refresh(o,T,M,I,O/M,E),a&&(e.docView.minWidth=0,c|=8)}b>0&&x>0?d=Math.max(b,x):b<0&&x<0&&(d=Math.min(b,x)),r.heightChanged=!1;for(let T of this.viewports){let M=T.from==this.viewport.from?E:e.docView.measureVisibleLineHeights(T);this.heightMap=(a?Oa.empty().applyChanges(this.stateDeco,Vt.empty,this.heightOracle,[new Pl(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new uN(T.from,M))}r.heightChanged&&(c|=2)}let S=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return S&&(this.viewport=this.getViewport(d,this.scrollTarget)),this.updateForViewport(),(c&2||S)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,o=this.heightOracle,{visibleTop:a,visibleBottom:s}=this,l=new qg(r.lineAt(a-i*1e3,Tn.ByHeight,o,0,0).from,r.lineAt(s+(1-i)*1e3,Tn.ByHeight,o,0,0).to);if(n){let{head:c}=n.range;if(cl.to){let d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=r.lineAt(c,Tn.ByPos,o,0,0),h;n.y=="center"?h=(f.top+f.bottom)/2-d/2:n.y=="start"||n.y=="nearest"&&c=s+Math.max(10,Math.min(i,250)))&&r>a-2*1e3&&o>1,a=r<<1;if(this.defaultTextDirection!=An.LTR&&!i)return[];let s=[],l=(c,d,f,h)=>{if(d-cc&&xx.from>=f.from&&x.to<=f.to&&Math.abs(x.from-c)x.from<_&&x.to>_));if(!b){if(dx.from<=d&&x.to>=d)){let x=n.moveToLineBoundary(ye.cursor(d),!1,!0).head;x>c&&(d=x)}b=new $y(c,d,this.gapSize(f,c,d,h))}s.push(b)};for(let c of this.viewportLines){if(c.lengthc.from&&l(c.from,h,c,d),gn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];yn.spans(e,this.viewport.from,this.viewport.to,{span(r,o){n.push({from:r,to:o})},point(){}},20);let i=n.length!=this.visibleRanges.length||this.visibleRanges.some((r,o)=>r.from!=n[o].from||r.to!=n[o].to);return this.visibleRanges=n,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||ly(this.heightMap.lineAt(e,Tn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return ly(this.heightMap.lineAt(this.scaler.fromDOM(e),Tn.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return ly(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},qg=class{constructor(e,n){this.from=e,this.to=n}};function b7e(t,e,n){let i=[],r=t,o=0;return yn.spans(n,t,e,{span(){},point(a,s){a>r&&(i.push({from:r,to:a}),o+=a-r),r=s}},20),r=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:o,to:a}=e[r],s=a-o;if(i<=s)return o+i;i-=s}}function V2(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function w7e(t,e){for(let n of t)if(e(n))return n}var kZ={toDOM(t){return t},fromDOM(t){return t},scale:1},mN=class{constructor(e,n,i){let r=0,o=0,a=0;this.viewports=i.map(({from:s,to:l})=>{let c=n.lineAt(s,Tn.ByPos,e,0,0).top,d=n.lineAt(l,Tn.ByPos,e,0,0).bottom;return r+=d-c,{from:s,to:l,top:c,bottom:d,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let s of this.viewports)s.domTop=a+(s.top-o)*this.scale,a=s.domBottom=s.domTop+(s.bottom-s.top),o=s.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let o=nly(r,e)):t._content)}var Y2=He.define({combine:t=>t.join(" ")}),vN=He.define({combine:t=>t.indexOf(!0)>-1}),yN=jl.newName(),mne=jl.newName(),vne=jl.newName(),yne={"&light":"."+mne,"&dark":"."+vne};function bN(t,e,n){return new jl(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}var k7e=bN("."+yN,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},yne),cy="\uFFFF",wN=class{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(mn.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=cy}readRange(e,n){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let o=this.text.length;this.readNode(r);let a=r.nextSibling;if(a==n)break;let s=Fn.get(r),l=Fn.get(a);(s&&l?s.breakAfter:(s?s.breakAfter:xZ(r))||xZ(a)&&(r.nodeName!="BR"||r.cmIgnore)&&this.text.length>o)&&this.lineBreak(),r=a}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,a=1,s;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,i),a=this.lineSeparator.length):(s=r.exec(n))&&(o=s.index,a=s[0].length),this.append(n.slice(i,o<0?n.length:o)),o<0)break;if(this.lineBreak(),a>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=a-1);i=o+a}}readNode(e){if(e.cmIgnore)return;let n=Fn.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(x7e(e,i.node,i.offset)?n:0))}};function x7e(t,e,n){for(;;){if(!e||n-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,i,0))){let s=o||a?[]:S7e(e),l=new wN(s,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=C7e(s,this.bounds.from)}else{let s=e.observer.selectionRange,l=o&&o.node==s.focusNode&&o.offset==s.focusOffset||!U9(e.contentDOM,s.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(s.focusNode,s.focusOffset),c=a&&a.node==s.anchorNode&&a.offset==s.anchorOffset||!U9(e.contentDOM,s.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(s.anchorNode,s.anchorOffset),d=e.viewport;if(Ve.ios&&e.state.selection.main.empty&&l!=c&&(d.from>0||d.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:s}=e.bounds,l=r.from,c=null;(o===8||Ve.android&&e.text.length=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:(Ve.mac||Ve.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=ye.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:Vt.of([" "])}):Ve.chrome&&n&&n.from==n.to&&n.from==r.head&&n.insert.toString()==` `&&t.lineWrapping&&(i&&(i=ye.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:Vt.of([" "])}),n){if(Ve.ios&&t.inputState.flushIOSKey()||Ve.android&&(n.from==r.from&&n.to==r.to&&n.insert.length==1&&n.insert.lines==2&&cm(t.contentDOM,"Enter",13)||(n.from==r.from-1&&n.to==r.to&&n.insert.length==0||o==8&&n.insert.lengthr.head)&&cm(t.contentDOM,"Backspace",8)||n.from==r.from&&n.to==r.to+1&&n.insert.length==0&&cm(t.contentDOM,"Delete",46)))return!0;let a=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let s,l=()=>s||(s=_7e(t,n,i));return t.state.facet(Yte).some(c=>c(t,n.from,n.to,a,l))||t.dispatch(l()),!0}else if(i&&!i.main.eq(r)){let a=!1,s="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(a=!0),s=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:a,userEvent:s}),!0}else return!1}function _7e(t,e,n){let i,r=t.state,o=r.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let s=o.frome.to?r.sliceDoc(e.to,o.to):"";i=r.replaceSelection(t.state.toText(s+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let s=r.changes(e),l=n&&n.main.to<=s.newLength?n.main:void 0;if(r.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let c=t.state.sliceDoc(e.from,e.to),d,f=n&&rne(t,n.main.head);if(f){let m=e.insert.length-(e.to-e.from);d={from:f.from,to:f.to-m}}else d=t.state.doc.lineAt(o.head);let h=o.to-e.to,g=o.to-o.from;i=r.changeByRange(m=>{if(m.from==o.from&&m.to==o.to)return{changes:s,range:l||m.map(s)};let b=m.to-h,x=b-c.length;if(m.to-m.from!=g||t.state.sliceDoc(x,b)!=c||m.to>=d.from&&m.from<=d.to)return{range:m};let _=r.changes({from:x,to:b,insert:e.insert}),O=m.to-o.to;return{changes:_,range:l?ye.range(Math.max(0,l.anchor+O),Math.max(0,l.head+O)):m.map(_)}})}else i={changes:s,selection:l&&r.selection.replaceRange(l)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:a,scrollIntoView:!0})}function O7e(t,e,n,i){let r=Math.min(t.length,e.length),o=0;for(;o0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;if(i=="end"){let l=Math.max(0,o-Math.min(a,s));n-=a+l-o}if(a=a?o-n:0;o-=l,s=o+(s-a),a=o}else if(s=s?o-n:0;o-=l,a=o+(a-s),s=o}return{from:o,toA:a,toB:s}}function S7e(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new f3(n,i)),(r!=n||o!=i)&&e.push(new f3(r,o))),e}function C7e(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?ye.single(n+e,i+e):null}var E7e={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},a8=Ve.ie&&Ve.ie_version<=11,xN=class{constructor(e){this.view=e,this.active=!1,this.selectionRange=new V9,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(Ve.ie&&Ve.ie_version<=11||Ve.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),a8&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(T4)?i.root.activeElement!=this.dom:!L_(i.dom,r))return;let o=r.anchorNode&&i.docView.nearest(r.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Ve.ie&&Ve.ie_version<=11||Ve.android&&Ve.chrome)&&!i.state.selection.main.empty&&r.focusNode&&My(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Ve.safari&&e.root.nodeType==11&&vNe(this.dom.ownerDocument)==this.dom&&T7e(this.view)||r3(e.root);if(!n||this.selectionRange.eq(n))return!1;let i=L_(this.dom,n);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&cm(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let o of e){let a=this.readMutation(o);a&&(a.typeOver&&(r=!0),n==-1?{from:n,to:i}=a:(n=Math.min(a.from,n),i=Math.max(a.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&L_(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new kN(this.view,e,n,i);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=bne(this.view,n);return this.view.state==i&&this.view.update([]),r}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let i=_Z(n,e.previousSibling||e.target.previousSibling,-1),r=_Z(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}};function _Z(t,e,n){for(;e;){let i=Fn.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function T7e(t){let e=null;function n(l){l.preventDefault(),l.stopImmediatePropagation(),e=l.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),!e)return null;let i=e.startContainer,r=e.startOffset,o=e.endContainer,a=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);return My(s.node,s.offset,o,a)&&([i,r,o,a]=[o,a,i,r]),{anchorNode:i,anchorOffset:r,focusNode:o,focusOffset:a}}var Ne=class t{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(i=>i.forEach(r=>n(r,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||kNe(e.parent)||document,this.viewState=new u3(e.state||mn.create(e)),e.scrollTo&&e.scrollTo.is(H2)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(ay).map(i=>new Ay(i));for(let i of this.plugins)i.update(this);this.observer=new xN(this),this.inputState=new sN(this),this.inputState.ensureHandlers(this.plugins),this.docView=new l3(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...e){let n=e.length==1&&e[0]instanceof ko?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,o=this.state;for(let h of e){if(h.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=h.state}if(this.destroyed){this.viewState.state=o;return}let a=this.hasFocus,s=0,l=null;e.some(h=>h.annotation(hne))?(this.inputState.notifiedFocused=a,s=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,l=pne(o,a),l||(s=1));let c=this.observer.delayedAndroidKey,d=null;if(c?(this.observer.clearDelayedAndroidKey(),d=this.observer.readChange(),(d&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(d=null)):this.observer.clear(),o.facet(mn.phrases)!=this.state.facet(mn.phrases))return this.setState(o);r=s3.create(this,o,e),r.flags|=s;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let h of e){if(f&&(f=f.map(h.changes)),h.scrollIntoView){let{main:g}=h.state.selection;f=new Py(g.empty?g:ye.cursor(g.head,g.head>g.anchor?-1:1))}for(let g of h.effects)g.is(H2)&&(f=g.value.clip(this.state))}this.viewState.update(r,f),this.bidiCache=h3.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(sy)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(h=>h.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(Y2)!=r.state.facet(Y2)&&(this.viewState.mustMeasureContent=!0),(n||i||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!r.empty)for(let h of this.state.facet(rN))try{h(r)}catch(g){ns(this.state,g,"update listener")}(l||d)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),d&&!bne(this,d)&&c.force&&cm(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new u3(e),this.plugins=e.facet(ay).map(i=>new Ay(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new l3(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(ay),i=e.state.facet(ay);if(n!=i){let r=[];for(let o of i){let a=n.indexOf(o);if(a<0)r.push(new Ay(o));else{let s=this.plugins[a];s.mustUpdate=e,r.push(s)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:a}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let s=0;;s++){if(a<0)if(Pte(i))o=-1,a=this.viewState.heightMap.height;else{let g=this.viewState.scrollAnchorAt(r);o=g.from,a=g.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(s>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let d=c.map(g=>{try{return g.read(this)}catch(m){return ns(this.state,m),OZ}}),f=s3.create(this,this.state,[]),h=!1;f.flags|=l,n?n.flags|=l:n=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),h=this.docView.update(f));for(let g=0;g1||g<-1){r=r+g,i.scrollTop=r/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let s of this.state.facet(rN))s(n)}get themeClasses(){return yN+" "+(this.state.facet(vN)?vne:mne)+" "+this.state.facet(Y2)}updateAttrs(){let e=SZ(this,Jte,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(T4)?"true":"false",class:"cm-content",style:`${Ve.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),SZ(this,R$,n);let i=this.observer.ignore(()=>{let r=J9(this.contentDOM,this.contentAttrs,n),o=J9(this.dom,this.editorAttrs,e);return r||o});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(t.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(sy);let e=this.state.facet(t.cspNonce);jl.mount(this.root,this.styleModules.concat(k7e).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;ni.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return o8(this,e,cZ(this,e,n,i))}moveByGroup(e,n){return o8(this,e,cZ(this,e,n,i=>KNe(this,e.head,i)))}visualLineSide(e,n){let i=this.bidiSpans(e),r=this.textDirectionAt(e.from),o=i[n?i.length-1:0];return ye.cursor(o.side(n,r)+e.from,o.forward(!n,r)?1:-1)}moveToLineBoundary(e,n,i=!0){return GNe(this,e,n,i)}moveVertically(e,n,i){return o8(this,e,JNe(this,e,n,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),ane(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),o=this.bidiSpans(r),a=o[Tl.find(o,e-r.from,-1,n)];return C4(i,a.dir==An.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Gte)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>M7e)return Bte(e.length);let n=this.textDirectionAt(e.from),i;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||Wte(o.isolates,i=rZ(this,e))))return o.order;i||(i=rZ(this,e));let r=INe(e.text,n,i);return this.bidiCache.push(new h3(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Ve.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Mte(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return H2.of(new Py(typeof e=="number"?ye.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return H2.of(new Py(ye.cursor(i.from),"start","start",i.top-e,n,!0))}static domEventHandlers(e){return Ai.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ai.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=jl.newName(),r=[Y2.of(i),sy.of(bN(`.${i}`,e))];return n&&n.dark&&r.push(vN.of(!0)),r}static baseTheme(e){return Jh.lowest(sy.of(bN("."+yN,e,yne)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&Fn.get(i)||Fn.get(e);return((n=r?.rootView)===null||n===void 0?void 0:n.view)||null}};Ne.styleModule=sy;Ne.inputHandler=Yte;Ne.focusChangeEffect=Xte;Ne.perLineTextDirection=Gte;Ne.exceptionSink=Vte;Ne.updateListener=rN;Ne.editable=T4;Ne.mouseSelectionStyle=Ute;Ne.dragMovesSelection=qte;Ne.clickAddsSelectionRange=Zte;Ne.decorations=Sb;Ne.outerDecorations=ene;Ne.atomicRanges=F$;Ne.bidiIsolatedRanges=tne;Ne.scrollMargins=nne;Ne.darkTheme=vN;Ne.cspNonce=He.define({combine:t=>t.length?t[0]:""});Ne.contentAttributes=R$;Ne.editorAttributes=Jte;Ne.lineWrapping=Ne.contentAttributes.of({class:"cm-lineWrapping"});Ne.announce=kt.define();var M7e=4096,OZ={},h3=class t{constructor(e,n,i,r,o,a){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=o,this.order=a}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:An.LTR;for(let o=Math.max(0,e.length-10);o=0;r--){let o=i[r],a=typeof o=="function"?o(t):o;a&&K9(a,n)}return n}var N7e=Ve.mac?"mac":Ve.windows?"win":Ve.linux?"linux":"key";function P7e(t,e){let n=t.split(/-(?!$)/),i=n[n.length-1];i=="Space"&&(i=" ");let r,o,a,s;for(let l=0;li.concat(r),[]))),n}function $7e(t,e,n){return kne(wne(t.state),e,t,n)}var tu=null,D7e=4e3;function I7e(t,e=N7e){let n=Object.create(null),i=Object.create(null),r=(a,s)=>{let l=i[a];if(l==null)i[a]=s;else if(l!=s)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},o=(a,s,l,c,d)=>{var f,h;let g=n[a]||(n[a]=Object.create(null)),m=s.split(/ (?!$)/).map(_=>P7e(_,e));for(let _=1;_{let E=tu={view:S,prefix:O,scope:a};return setTimeout(()=>{tu==E&&(tu=null)},D7e),!0}]})}let b=m.join(" ");r(b,!1);let x=g[b]||(g[b]={preventDefault:!1,stopPropagation:!1,run:((h=(f=g._any)===null||f===void 0?void 0:f.run)===null||h===void 0?void 0:h.slice())||[]});l&&x.run.push(l),c&&(x.preventDefault=!0),d&&(x.stopPropagation=!0)};for(let a of t){let s=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let c of s){let d=n[c]||(n[c]=Object.create(null));d._any||(d._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let f in d)d[f].run.push(a.any)}let l=a[e]||a.key;if(l)for(let c of s)o(c,l,a.run,a.preventDefault,a.stopPropagation),a.shift&&o(c,"Shift-"+l,a.shift,a.preventDefault,a.stopPropagation)}return n}function kne(t,e,n,i){let r=mNe(e),o=xr(r,0),a=Va(o)==r.length&&r!=" ",s="",l=!1,c=!1,d=!1;tu&&tu.view==n&&tu.scope==i&&(s=tu.prefix+" ",lne.indexOf(e.keyCode)<0&&(c=!0,tu=null));let f=new Set,h=x=>{if(x){for(let _ of x.run)if(!f.has(_)&&(f.add(_),_(n,e)))return x.stopPropagation&&(d=!0),!0;x.preventDefault&&(x.stopPropagation&&(d=!0),c=!0)}return!1},g=t[i],m,b;return g&&(h(g[s+X2(r,e,!a)])?l=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Ve.windows&&e.ctrlKey&&e.altKey)&&(m=Du[e.keyCode])&&m!=r?(h(g[s+X2(m,e,!0)])||e.shiftKey&&(b=bb[e.keyCode])!=r&&b!=m&&h(g[s+X2(b,e,!1)]))&&(l=!0):a&&e.shiftKey&&h(g[s+X2(r,e,!0)])&&(l=!0),!l&&h(g._any)&&(l=!0)),c&&(l=!0),l&&d&&e.stopPropagation(),l}var Cb=class t{constructor(e,n,i,r,o){this.className=e,this.left=n,this.top=i,this.width=r,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let o=xne(e);return[new t(n,r.left-o.left,r.top-o.top,null,r.bottom-r.top)]}else return L7e(e,n,i)}};function xne(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==An.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function EZ(t,e,n){let i=ye.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(i,!0,!0).from),type:xo.Text}}function L7e(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),o=t.textDirection==An.LTR,a=t.contentDOM,s=a.getBoundingClientRect(),l=xne(t),c=a.querySelector(".cm-line"),d=c&&window.getComputedStyle(c),f=s.left+(d?parseInt(d.paddingLeft)+Math.min(0,parseInt(d.textIndent)):0),h=s.right-(d?parseInt(d.paddingRight):0),g=aN(t,i),m=aN(t,r),b=g.type==xo.Text?g:null,x=m.type==xo.Text?m:null;if(b&&(t.lineWrapping||g.widgetLineBreaks)&&(b=EZ(t,i,b)),x&&(t.lineWrapping||m.widgetLineBreaks)&&(x=EZ(t,r,x)),b&&x&&b.from==x.from)return O(S(n.from,n.to,b));{let T=b?S(n.from,null,b):E(g,!1),M=x?S(null,n.to,x):E(m,!0),I=[];return(b||g).to<(x||m).from-(b&&x?1:0)||g.widgetLineBreaks>1&&T.bottom+t.defaultLineHeight/2H&&B.from=U)break;oe>R&&j(Math.max(te,R),T==null&&te<=H,Math.min(oe,U),M==null&&oe>=X,K.dir)}if(R=V.to+1,R>=U)break}return Z.length==0&&j(H,T==null,X,M==null,t.textDirection),{top:F,bottom:W,horizontal:Z}}function E(T,M){let I=s.top+(M?T.top:T.bottom);return{top:I,bottom:I,horizontal:[]}}}function j7e(t,e){return t.constructor==e.constructor&&t.eq(e)}var _N=class{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(F_)!=e.state.facet(F_)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}setOrder(e){let n=0,i=e.facet(F_);for(;n!j7e(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}},F_=He.define();function _ne(t){return[Ai.define(e=>new _N(e,t)),F_.of(t)]}var One=!Ve.ios,Eb=He.define({combine(t){return Gl(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function Sne(t={}){return[Eb.of(t),R7e,F7e,z7e,Kte.of(!0)]}function Cne(t){return t.startState.facet(Eb)!=t.state.facet(Eb)}var R7e=_ne({above:!0,markers(t){let{state:e}=t,n=e.facet(Eb),i=[];for(let r of e.selection.ranges){let o=r==e.selection.main;if(r.empty?!o||One:n.drawRangeCursor){let a=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",s=r.empty?r:ye.cursor(r.head,r.head>r.anchor?-1:1);for(let l of Cb.forRange(t,a,s))i.push(l)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=Cne(t);return n&&TZ(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){TZ(e.state,t)},class:"cm-cursorLayer"});function TZ(t,e){e.style.animationDuration=t.facet(Eb).cursorBlinkRate+"ms"}var F7e=_ne({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Cb.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||Cne(t)},class:"cm-selectionLayer"}),ON={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};One&&(ON[".cm-line"].caretColor="transparent !important",ON[".cm-content"]={caretColor:"transparent !important"});var z7e=Jh.highest(Ne.theme(ON)),Ene=kt.define({map(t,e){return t==null?null:e.mapPos(t)}}),dy=sr.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(Ene)?i.value:n,t)}}),Q7e=Ai.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(dy);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(dy)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(dy),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(dy)!=t&&this.view.dispatch({effects:Ene.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function W7e(){return[dy,Q7e]}function MZ(t,e,n,i,r){e.lastIndex=0;for(let o=t.iterRange(n,i),a=n,s;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;s=e.exec(o.value);)r(a+s.index,s)}function B7e(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:o}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=o:i.push({from:r,to:o});return i}var SN=class{constructor(e){let{regexp:n,decoration:i,decorate:r,boundary:o,maxLength:a=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(s,l,c,d)=>r(d,c,c+s[0].length,s,l);else if(typeof i=="function")this.addMatch=(s,l,c,d)=>{let f=i(s,l,c);f&&d(c,c+s[0].length,f)};else if(i)this.addMatch=(s,l,c,d)=>d(c,c+s[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=a}createDeco(e){let n=new $u,i=n.add.bind(n);for(let{from:r,to:o}of B7e(e,this.maxLength))MZ(e.state.doc,this.regexp,r,o,(a,s)=>this.addMatch(s,e,a,i));return n.finish()}updateDeco(e,n){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((o,a,s,l)=>{l>e.view.viewport.from&&s1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,n.map(e.changes),i,r):n}updateRange(e,n,i,r){for(let o of e.visibleRanges){let a=Math.max(o.from,i),s=Math.min(o.to,r);if(s>a){let l=e.state.doc.lineAt(a),c=l.tol.from;a--)if(this.boundary.test(l.text[a-1-l.from])){d=a;break}for(;sh.push(_.range(b,x));if(l==c)for(this.regexp.lastIndex=d-l.from;(g=this.regexp.exec(l.text))&&g.indexthis.addMatch(x,e,b,m));n=n.update({filterFrom:d,filterTo:f,filter:(b,x)=>bf,add:h})}}return n}},CN=/x/.unicode!=null?"gu":"g",H7e=new RegExp(`[\0-\b -\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,CN),Z7e={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"},s8=null;function q7e(){var t;if(s8==null&&typeof document<"u"&&document.body){let e=document.body.style;s8=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return s8||!1}var z_=He.define({combine(t){let e=Gl(t,{render:null,specialChars:H7e,addSpecialChars:null});return(e.replaceTabs=!q7e())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,CN)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,CN)),e}});function Tne(t={}){return[z_.of(t),U7e()]}var NZ=null;function U7e(){return NZ||(NZ=Ai.fromClass(class{constructor(t){this.view=t,this.decorations=ot.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(z_)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new SN({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,o=xr(e[0],0);if(o==9){let a=r.lineAt(i),s=n.state.tabSize,l=M0(a.text,s,i-a.from);return ot.replace({widget:new TN((s-l%s)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=ot.replace({widget:new EN(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(z_);t.startState.facet(z_)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}var V7e="\u2022";function Y7e(t){return t>=32?V7e:t==10?"\u2424":String.fromCharCode(9216+t)}var EN=class extends ss{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=Y7e(this.code),i=e.state.phrase("Control character")+" "+(Z7e[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let o=document.createElement("span");return o.textContent=n,o.title=i,o.setAttribute("aria-label",i),o.className="cm-specialChar",o}ignoreEvent(){return!1}},TN=class extends ss{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}};function X7e(){return K7e}var G7e=ot.line({class:"cm-activeLine"}),K7e=Ai.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(G7e.range(r.from)),e=r.from)}return ot.set(n)}},{decorations:t=>t.decorations}),J7e=class extends ss{constructor(t){super(),this.content=t}toDOM(){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?t.setAttribute("aria-label","placeholder "+this.content):t.setAttribute("aria-hidden","true"),t}coordsAt(t){let e=t.firstChild?Mm(t.firstChild):[];if(!e.length)return null;let n=window.getComputedStyle(t.parentNode),i=C4(e[0],n.direction!="rtl"),r=parseInt(n.lineHeight);return i.bottom-i.top>r*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+r}:i}ignoreEvent(){return!1}};function ePe(t){return Ai.fromClass(class{constructor(e){this.view=e,this.placeholder=t?ot.set([ot.widget({widget:new J7e(t),side:1}).range(0)]):ot.none}get decorations(){return this.view.state.doc.length?ot.none:this.placeholder}},{decorations:e=>e.decorations})}var MN=2e3;function tPe(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),o=[];if(e.off>MN||n.off>MN||e.col<0||n.col<0){let a=Math.min(e.off,n.off),s=Math.max(e.off,n.off);for(let l=i;l<=r;l++){let c=t.doc.line(l);c.length<=s&&o.push(ye.range(c.from+a,c.to+s))}}else{let a=Math.min(e.col,n.col),s=Math.max(e.col,n.col);for(let l=i;l<=r;l++){let c=t.doc.line(l),d=B9(c.text,a,t.tabSize,!0);if(d<0)o.push(ye.cursor(c.to));else{let f=B9(c.text,s,t.tabSize);o.push(ye.range(c.from+d,c.from+f))}}}return o}function nPe(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function PZ(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),r=n-i.from,o=r>MN?-1:r==i.length?nPe(t,e.clientX):M0(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:o,off:r}}function iPe(t,e){let n=PZ(t,e),i=t.state.selection;return n?{update(r){if(r.docChanged){let o=r.changes.mapPos(r.startState.doc.line(n.line).from),a=r.state.doc.lineAt(o);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},i=i.map(r.changes)}},get(r,o,a){let s=PZ(t,r);if(!s)return i;let l=tPe(t.state,n,s);return l.length?a?ye.create(l.concat(i.ranges)):ye.create(l):i}}:null}function rPe(t){let e=n=>n.altKey&&n.button==0;return Ne.mouseSelectionStyle.of((n,i)=>e(i)?iPe(n,i):null)}var oPe={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},aPe={style:"cursor: crosshair"};function sPe(t={}){let[e,n]=oPe[t.key||"Alt"],i=Ai.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||n(r))},keyup(r){(r.keyCode==e||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,Ne.contentAttributes.of(r=>{var o;return!((o=r.plugin(i))===null||o===void 0)&&o.isDown?aPe:null})]}var Iv="-10000px",p3=class{constructor(e,n,i){this.facet=n,this.createTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(r=>r),this.tooltipViews=this.tooltips.map(i)}update(e,n){var i;let r=e.state.facet(this.facet),o=r.filter(l=>l);if(r===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let a=[],s=n?[]:null;for(let l=0;ln[c]=l),n.length=s.length),this.input=r,this.tooltips=o,this.tooltipViews=a,!0}};function lPe(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}var l8=He.define({combine:t=>{var e,n,i;return{position:Ve.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||lPe}}}),AZ=new WeakMap,z$=Ai.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(l8);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new p3(t,Q$,n=>this.createTooltip(n)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(l8);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let n=document.createElement("div");n.className="cm-tooltip-arrow",e.dom.appendChild(n)}return e.dom.style.position=this.position,e.dom.style.top=Iv,e.dom.style.left="0px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var t,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(t=n.destroy)===null||t===void 0||t.call(n);this.parent&&this.container.remove(),(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,n=1,i=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(Ve.gecko)i=r.offsetParent!=this.container.ownerDocument.body;else if(r.style.top==Iv&&r.style.left=="0px"){let o=r.getBoundingClientRect();i=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(i||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(e=r.width/this.parent.offsetWidth,n=r.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:n}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((r,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(l8).tooltipSpace(this.view),scaleX:e,scaleY:n,makeAbsolute:i}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let s of this.manager.tooltipViews)s.dom.style.position="absolute"}let{editor:n,space:i,scaleX:r,scaleY:o}=t,a=[];for(let s=0;s=Math.min(n.bottom,i.bottom)||f.rightMath.min(n.right,i.right)+.1){d.style.top=Iv;continue}let g=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,m=g?7:0,b=h.right-h.left,x=(e=AZ.get(c))!==null&&e!==void 0?e:h.bottom-h.top,_=c.offset||dPe,O=this.view.textDirection==An.LTR,S=h.width>i.right-i.left?O?i.left:i.right-h.width:O?Math.min(f.left-(g?14:0)+_.x,i.right-b):Math.max(i.left,f.left-b+(g?14:0)-_.x),E=this.above[s];!l.strictSide&&(E?f.top-(h.bottom-h.top)-_.yi.bottom)&&E==i.bottom-f.bottom>f.top-i.top&&(E=this.above[s]=!E);let T=(E?f.top-i.top:i.bottom-f.bottom)-m;if(TS&&F.topM&&(M=E?F.top-x-2-m:F.bottom+m+2);if(this.position=="absolute"?(d.style.top=(M-t.parent.top)/o+"px",d.style.left=(S-t.parent.left)/r+"px"):(d.style.top=M/o+"px",d.style.left=S/r+"px"),g){let F=f.left+(O?_.x:-_.x)-(S+14-7);g.style.left=F/r+"px"}c.overlap!==!0&&a.push({left:S,top:M,right:I,bottom:M+x}),d.classList.toggle("cm-tooltip-above",E),d.classList.toggle("cm-tooltip-below",!E),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Iv}},{eventObservers:{scroll(){this.maybeMeasure()}}}),cPe=Ne.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"}}}),dPe={x:0,y:0},Q$=He.define({enables:[z$,cPe]}),g3=He.define(),m3=class t{static create(e){return new t(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new p3(e,g3,n=>this.createHostedView(n))}createHostedView(e){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(n.dom),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}},uPe=Q$.compute([g3],t=>{let e=t.facet(g3).filter(n=>n);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:m3.create,above:e[0].above,arrow:e.some(n=>n.arrow)}}),NN=class{constructor(e,n,i,r,o){this.view=e,this.source=n,this.field=i,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.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)return;let e=Date.now()-this.lastMove.time;es.bottom||n.xs.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(r)).find(d=>d.from<=r&&d.to>=r),c=l&&l.dir==An.RTL?-1:1;o=n.x{this.pending==s&&(this.pending=null,l&&e.dispatch({effects:this.setHover.of(l)}))},l=>ns(e.state,l,"hover tooltip"))}else a&&e.dispatch({effects:this.setHover.of(a)})}get tooltip(){let e=this.view.plugin(z$),n=e?e.manager.tooltips.findIndex(i=>i.create==m3.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:r}=this;if(i&&r&&!fPe(r.dom,e)||this.pending){let{pos:o}=i||this.pending,a=(n=i?.end)!==null&&n!==void 0?n:o;(o==a?this.view.posAtCoords(this.lastMove)!=o:!hPe(this.view,o,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of(null)})}}watchTooltipLeave(e){let n=i=>{e.removeEventListener("mouseleave",n),this.active&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}},G2=4;function fPe(t,e){let n=t.getBoundingClientRect();return e.clientX>=n.left-G2&&e.clientX<=n.right+G2&&e.clientY>=n.top-G2&&e.clientY<=n.bottom+G2}function hPe(t,e,n,i,r,o){let a=t.scrollDOM.getBoundingClientRect(),s=t.documentTop+t.documentPadding.top+t.contentHeight;if(a.left>i||a.rightr||Math.min(a.bottom,s)=e&&l<=n}function pPe(t,e={}){let n=kt.define(),i=sr.define({create(){return null},update(r,o){if(r&&(e.hideOnChange&&(o.docChanged||o.selection)||e.hideOn&&e.hideOn(o,r)))return null;if(r&&o.docChanged){let a=o.changes.mapPos(r.pos,-1,_r.TrackDel);if(a==null)return null;let s=Object.assign(Object.create(null),r);s.pos=a,r.end!=null&&(s.end=o.changes.mapPos(r.end)),r=s}for(let a of o.effects)a.is(n)&&(r=a.value),a.is(gPe)&&(r=null);return r},provide:r=>g3.from(r)});return[i,Ai.define(r=>new NN(r,t,i,n,e.hoverTime||300)),uPe]}function Mne(t,e){let n=t.plugin(z$);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}var gPe=kt.define(),$Z=He.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Tb(t,e){let n=t.plugin(Nne),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}var Nne=Ai.fromClass(class{constructor(t){this.input=t.state.facet(Mb),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet($Z);this.top=new Ug(t,!0,e.topContainer),this.bottom=new Ug(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet($Z);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Ug(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Ug(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Mb);if(n!=this.input){let i=n.filter(l=>l),r=[],o=[],a=[],s=[];for(let l of i){let c=this.specs.indexOf(l),d;c<0?(d=l(t.view),s.push(d)):(d=this.panels[c],d.update&&d.update(t)),r.push(d),(d.top?o:a).push(d)}this.specs=i,this.panels=r,this.top.sync(o),this.bottom.sync(a);for(let l of s)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Ne.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})}),Ug=class{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,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 n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=DZ(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=DZ(e)}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 e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}};function DZ(t){let e=t.nextSibling;return t.remove(),e}var Mb=He.define({enables:Nne}),Qs=class extends Wc{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};Qs.prototype.elementClass="";Qs.prototype.toDOM=void 0;Qs.prototype.mapMode=_r.TrackBefore;Qs.prototype.startSide=Qs.prototype.endSide=-1;Qs.prototype.point=!0;var Q_=He.define(),mPe={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>yn.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Dy=He.define();function vPe(t){return[Pne(),Dy.of(Object.assign(Object.assign({},mPe),t))]}var IZ=He.define({combine:t=>t.some(e=>e)});function Pne(t){return[yPe]}var yPe=Ai.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Dy).map(e=>new v3(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(IZ),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(IZ)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=yn.iter(this.view.state.facet(Q_),this.view.viewport.from),i=[],r=this.gutters.map(o=>new AN(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(o.type)){let a=!0;for(let s of o.type)if(s.type==xo.Text&&a){PN(n,i,s.from);for(let l of r)l.line(this.view,s,i);a=!1}else if(s.widget)for(let l of r)l.widget(this.view,s)}else if(o.type==xo.Text){PN(n,i,o.from);for(let a of r)a.line(this.view,o,i)}else if(o.widget)for(let a of r)a.widget(this.view,o);for(let o of r)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Dy),n=t.state.facet(Dy),i=t.docChanged||t.heightChanged||t.viewportChanged||!yn.eq(t.startState.facet(Q_),t.state.facet(Q_),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let o of n){let a=e.indexOf(o);a<0?r.push(new v3(this.view,o)):(this.gutters[a].update(t),r.push(this.gutters[a]))}for(let o of this.gutters)o.dom.remove(),r.indexOf(o)<0&&o.destroy();for(let o of r)this.dom.appendChild(o.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>Ne.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==An.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function LZ(t){return Array.isArray(t)?t:[t]}function PN(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}var AN=class{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=yn.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,o=(n.top-this.height)/e.scaleY,a=n.height/e.scaleY;if(this.i==r.elements.length){let s=new y3(e,a,o,i);r.elements.push(s),r.dom.appendChild(s.dom)}else r.elements[this.i].update(e,a,o,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];PN(this.cursor,r,n.from),i.length&&(r=r.concat(i));let o=this.gutter.config.lineMarker(e,n,r);o&&r.unshift(o);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n);i&&this.addElement(e,n,[i])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}},v3=class{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let o=r.target,a;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let l=o.getBoundingClientRect();a=(l.top+l.bottom)/2}else a=r.clientY;let s=e.lineBlockAtHeight(a-e.documentTop);n.domEventHandlers[i](e,s,r)&&r.preventDefault()});this.markers=LZ(n.markers(e)),n.initialSpacer&&(this.spacer=new y3(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=LZ(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!yn.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},y3=class{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),bPe(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let o=0,a=0;;){let s=a,l=oo(s,l,c)||a(s,l,c):a}return i}})}}),Iy=class extends Qs{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};function c8(t,e){return t.state.facet(Vg).formatNumber(e,t.state)}var kPe=Dy.compute([Vg],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(wPe)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new Iy(c8(e,e.state.doc.lineAt(n.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(Vg)!=e.state.facet(Vg),initialSpacer(e){return new Iy(c8(e,jZ(e.state.doc.lines)))},updateSpacer(e,n){let i=c8(n.view,jZ(n.view.state.doc.lines));return i==e.number?e:new Iy(i)},domEventHandlers:t.facet(Vg).domEventHandlers}));function W$(t={}){return[Vg.of(t),Pne(),kPe]}function jZ(t){let e=9;for(;e{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(xPe.range(r)))}return yn.of(e)});function OPe(){return _Pe}var Ane=1024,SPe=0,Ga=class{constructor(t,e){this.from=t,this.to=e}},St=class{constructor(e={}){this.id=SPe++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=_o.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}};St.closedBy=new St({deserialize:t=>t.split(" ")});St.openedBy=new St({deserialize:t=>t.split(" ")});St.group=new St({deserialize:t=>t.split(" ")});St.isolate=new St({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});St.contextHash=new St({perNode:!0});St.lookAhead=new St({perNode:!0});St.mounted=new St({perNode:!0});var Sh=class{constructor(e,n,i){this.tree=e,this.overlay=n,this.parser=i}static get(e){return e&&e.props&&e.props[St.mounted.id]}},CPe=Object.create(null),_o=class t{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):CPe,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new t(e.name||"",n,e.id,i);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(r)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return r}prop(e){return this.props[e.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(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(St.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(St.group),o=-1;o<(r?r.length:0);o++){let a=n[o<0?i.name:r[o]];if(a)return a}}}};_o.none=new _o("",Object.create(null),0,8);var $N=class t{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(a|hn.IncludeAnonymous);;){let c=!1;if(l.from<=o&&l.to>=r&&(!s&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&i&&(s||!l.type.isAnonymous)&&i(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:H$(_o.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new t(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new t(_o.none,n,i,r)))}static build(e){return TPe(e)}};ci.empty=new ci(_o.none,[],[],0);var DN=class t{constructor(e,n){this.buffer=e,this.index=n}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 t(this.buffer,this.index)}},Ru=class t{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return _o.none}toString(){let e=[];for(let n=0;n0));l=a[l+3]);return s}slice(e,n,i){let r=this.buffer,o=new Uint16Array(n-e),a=0;for(let s=e,l=0;s=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function Nb(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?s.length:-1;e!=c;e+=n){let d=s[e],f=l[e]+a.from;if($ne(r,i,f,f+d.length)){if(d instanceof Ru){if(o&hn.ExcludeBuffers)continue;let h=d.findChild(0,d.buffer.length,n,i-f,r);if(h>-1)return new Ch(new LN(a,d,e,f),null,h)}else if(o&hn.IncludeAnonymous||!d.type.isAnonymous||B$(d)){let h;if(!(o&hn.IgnoreMounts)&&(h=Sh.get(d))&&!h.overlay)return new t(h.tree,f,e,a);let g=new t(d,f,e,a);return o&hn.IncludeAnonymous||!g.type.isAnonymous?g:g.nextChild(n<0?d.children.length-1:0,n,i,r)}}}if(o&hn.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+n:e=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))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(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,i=0){let r;if(!(i&hn.IgnoreOverlays)&&(r=Sh.get(this._tree))&&r.overlay){let o=e-this.from;for(let{from:a,to:s}of r.overlay)if((n>0?a<=o:a=o:s>o))return new t(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}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 FZ(t,e,n,i){let r=t.cursor(),o=[];if(!r.firstChild())return o;if(n!=null){for(let a=!1;!a;)if(a=r.type.is(n),!r.nextSibling())return o}for(;;){if(i!=null&&r.type.is(i))return o;if(r.type.is(e)&&o.push(r.node),!r.nextSibling())return i==null?o:[]}}function IN(t,e,n=e.length-1){for(let i=t;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}var LN=class{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}},Ch=class t extends b3{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(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return o<0?null:new t(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,i=0){if(i&hn.ExcludeBuffers)return null;let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new t(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new t(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new t(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,o=i.buffer[this.index+3];if(o>r){let a=i.buffer[this.index+1];e.push(i.slice(r,o,a)),n.push(0)}return new ci(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function Dne(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;on.from||a.to=e){let s=new qo(a.tree,a.overlay[0].from+o.from,-1,o);(r||(r=[i])).push(Nb(s,e,n,!1))}}return r?Dne(r):i}var Nm=class{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof qo)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof qo?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&hn.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&hn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&hn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let o=n+e,a=e<0?-1:i._tree.children.length;o!=a;o+=e){let s=i._tree.children[o];if(this.mode&hn.IncludeAnonymous||s instanceof Ru||!s.type.isAnonymous||B$(s))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;n=a,i=o+1;break e}r=this.stack[--o]}for(let r=i;r=0;o--){if(o<0)return IN(this._tree,e,r);let a=i[n.buffer[this.stack[o]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function B$(t){return t.children.some(e=>e instanceof Ru||!e.type.isAnonymous||B$(e))}function TPe(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=Ane,reused:o=[],minRepeatType:a=i.types.length}=t,s=Array.isArray(n)?new DN(n,n.length):n,l=i.types,c=0,d=0;function f(T,M,I,F,W,Z){let{id:j,start:H,end:X,size:B}=s,R=d,U=c;if(B<0)if(s.next(),B==-1){let le=o[j];I.push(le),F.push(H-T);return}else if(B==-3){c=j;return}else if(B==-4){d=j;return}else throw new RangeError(`Unrecognized record size: ${B}`);let V=l[j],K,te,oe=H-T;if(X-H<=r&&(te=x(s.pos-M,W))){let le=new Uint16Array(te.size-te.skip),q=s.pos-te.size,z=le.length;for(;s.pos>q;)z=_(te.start,le,z);K=new Ru(le,X-te.start,i),oe=te.start-T}else{let le=s.pos-B;s.next();let q=[],z=[],ae=j>=a?j:-1,ue=0,he=X;for(;s.pos>le;)ae>=0&&s.id==ae&&s.size>=0?(s.end<=he-r&&(m(q,z,H,ue,s.end,he,ae,R,U),ue=q.length,he=s.end),s.next()):Z>2500?h(H,le,q,z):f(H,le,q,z,ae,Z+1);if(ae>=0&&ue>0&&ue-1&&ue>0){let je=g(V,U);K=H$(V,q,z,0,q.length,0,X-H,je,je)}else K=b(V,q,z,X-H,R-X,U)}I.push(K),F.push(oe)}function h(T,M,I,F){let W=[],Z=0,j=-1;for(;s.pos>M;){let{id:H,start:X,end:B,size:R}=s;if(R>4)s.next();else{if(j>-1&&X=0;B-=3)H[R++]=W[B],H[R++]=W[B+1]-X,H[R++]=W[B+2]-X,H[R++]=R;I.push(new Ru(H,W[2]-X,i)),F.push(X-T)}}function g(T,M){return(I,F,W)=>{let Z=0,j=I.length-1,H,X;if(j>=0&&(H=I[j])instanceof ci){if(!j&&H.type==T&&H.length==W)return H;(X=H.prop(St.lookAhead))&&(Z=F[j]+H.length+X)}return b(T,I,F,W,Z,M)}}function m(T,M,I,F,W,Z,j,H,X){let B=[],R=[];for(;T.length>F;)B.push(T.pop()),R.push(M.pop()+I-W);T.push(b(i.types[j],B,R,Z-W,H-Z,X)),M.push(W-I)}function b(T,M,I,F,W,Z,j){if(Z){let H=[St.contextHash,Z];j=j?[H].concat(j):[H]}if(W>25){let H=[St.lookAhead,W];j=j?[H].concat(j):[H]}return new ci(T,M,I,F,j)}function x(T,M){let I=s.fork(),F=0,W=0,Z=0,j=I.end-r,H={size:0,start:0,skip:0};e:for(let X=I.pos-T;I.pos>X;){let B=I.size;if(I.id==M&&B>=0){H.size=F,H.start=W,H.skip=Z,Z+=4,F+=4,I.next();continue}let R=I.pos-B;if(B<0||R=a?4:0,V=I.start;for(I.next();I.pos>R;){if(I.size<0)if(I.size==-3)U+=4;else break e;else I.id>=a&&(U+=4);I.next()}W=V,F+=B,Z+=U}return(M<0||F==T)&&(H.size=F,H.start=W,H.skip=Z),H.size>4?H:void 0}function _(T,M,I){let{id:F,start:W,end:Z,size:j}=s;if(s.next(),j>=0&&F4){let X=s.pos-(j-4);for(;s.pos>X;)I=_(T,M,I)}M[--I]=H,M[--I]=Z-T,M[--I]=W-T,M[--I]=F}else j==-3?c=F:j==-4&&(d=F);return I}let O=[],S=[];for(;s.pos>0;)f(t.start||0,t.bufferStart||0,O,S,-1,0);let E=(e=t.length)!==null&&e!==void 0?e:O.length?S[0]+O[0].length:0;return new ci(l[t.topID],O.reverse(),S.reverse(),E)}var zZ=new WeakMap;function W_(t,e){if(!t.isAnonymous||e instanceof Ru||e.type!=t)return 1;let n=zZ.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof ci)){n=1;break}n+=W_(t,i)}zZ.set(e,n)}return n}function H$(t,e,n,i,r,o,a,s,l){let c=0;for(let m=i;m=d)break;M+=I}if(S==E+1){if(M>d){let I=m[E];g(I.children,I.positions,0,I.children.length,b[E]+O);continue}f.push(m[E])}else{let I=b[S-1]+m[S-1].length-T;f.push(H$(t,m,b,E,S,T,I,null,l))}h.push(T+O-o)}}return g(e,n,i,r,0),(s||l)(f,h,a)}var w3=class{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof Ch?this.setBuffer(e.context.buffer,e.index,n):e instanceof qo&&this.map.set(e.tree,n)}get(e){return e instanceof Ch?this.getBuffer(e.context.buffer,e.index):e instanceof qo?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}},vu=class t{constructor(e,n,i,r,o=!1,a=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(o?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new t(0,e.length,e,0,!1,i)];for(let o of n)o.to>e.length&&r.push(o);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],o=1,a=e.length?e[0]:null;for(let s=0,l=0,c=0;;s++){let d=s=i)for(;a&&a.from=h.from||f<=h.to||c){let g=Math.max(h.from,l)-c,m=Math.min(h.to,f)-c;h=g>=m?null:new t(g,m,h.tree,h.offset+c,s>0,!!d)}if(h&&r.push(h),a.to>f)break;a=onew Ga(r.from,r.to)):[new Ga(0,0)]:[new Ga(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let o=r.advance();if(o)return o}}},RN=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}};function MPe(t){return(e,n,i,r)=>new QN(e,t,n,i,r)}var x3=class{constructor(e,n,i,r,o){this.parser=e,this.parse=n,this.overlay=i,this.target=r,this.from=o}};function QZ(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}var FN=class{constructor(e,n,i,r,o,a,s){this.parser=e,this.predicate=n,this.mounts=i,this.index=r,this.start=o,this.target=a,this.prev=s,this.depth=0,this.ranges=[]}},zN=new St({perNode:!0}),QN=class{constructor(e,n,i,r,o){this.nest=n,this.input=i,this.fragments=r,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new ci(i.type,i.children,i.positions,i.length,i.propValues.concat([[zN,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[St.mounted.id]=new Sh(n,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n=this.stoppedAt)s=!1;else if(e.hasNode(r)){if(n){let c=n.mounts.find(d=>d.frag.from<=r.from&&d.frag.to>=r.to&&d.mount.overlay);if(c)for(let d of c.mount.overlay){let f=d.from+c.pos,h=d.to+c.pos;f>=r.from&&h<=r.to&&!n.ranges.some(g=>g.fromf)&&n.ranges.push({from:f,to:h})}}s=!1}else if(i&&(a=NPe(i.ranges,r.from,r.to)))s=a!=2;else if(!r.type.isAnonymous&&(o=this.nest(r,this.input))&&(r.fromnew Ga(f.from-r.from,f.to-r.from)):null,r.tree,d.length?d[0].from:r.from)),o.overlay?d.length&&(i={ranges:d,depth:0,prev:i}):s=!1}}else if(n&&(l=n.predicate(r))&&(l===!0&&(l=new Ga(r.from,r.to)),l.from=0&&n.ranges[c].to==l.from?n.ranges[c]={from:n.ranges[c].from,to:l.to}:n.ranges.push(l)}if(s&&r.firstChild())n&&n.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(n&&!--n.depth){let c=BZ(this.ranges,n.ranges);c.length&&(QZ(c),this.inner.splice(n.index,0,new x3(n.parser,n.parser.startParse(this.input,HZ(n.mounts,c),c),n.ranges.map(d=>new Ga(d.from-n.start,d.to-n.start)),n.target,c[0].from))),n=n.prev}i&&!--i.depth&&(i=i.prev)}}}};function NPe(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}function WZ(t,e,n,i,r,o){if(e=e&&n.enter(i,1,hn.IgnoreOverlays|hn.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof ci)n=n.children[0];else break}return!1}},APe=class{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let n=this.curFrag=t[0];this.curTo=(e=n.tree.prop(zN))!==null&&e!==void 0?e:n.to,this.inner=new _3(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=(t=e.tree.prop(zN))!==null&&t!==void 0?t:e.to,this.inner=new _3(e.tree,-e.offset)}}findMounts(t,e){var n;let i=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let r=this.inner.cursor.node;r;r=r.parent){let o=(n=r.tree)===null||n===void 0?void 0:n.prop(St.mounted);if(o&&o.parser==e)for(let a=this.fragI;a=r.to)break;s.tree==this.curFrag.tree&&i.push({frag:s,pos:r.from-s.offset,mount:o})}}}return i}};function BZ(t,e){let n=null,i=e;for(let r=1,o=0;r=s)break;l.to<=a||(n||(i=n=e.slice()),l.froms&&n.splice(o+1,0,new Ga(s,l.to))):l.to>s?n[o--]=new Ga(s,l.to):n.splice(o--,1))}}return i}function $Pe(t,e,n,i){let r=0,o=0,a=!1,s=!1,l=-1e9,c=[];for(;;){let d=r==t.length?1e9:a?t[r].to:t[r].from,f=o==e.length?1e9:s?e[o].to:e[o].from;if(a!=s){let h=Math.max(l,n),g=Math.min(d,f,i);hnew Ga(h.from+i,h.to+i)),f=$Pe(e,d,l,c);for(let h=0,g=l;;h++){let m=h==f.length,b=m?c:f[h].from;if(b>g&&n.push(new vu(g,b,r.tree,-a,o.from>=g||o.openStart,o.to<=b||o.openEnd)),m)break;g=f[h].to}}else n.push(new vu(l,c,r.tree,-a,o.from>=a||o.openStart,o.to<=s||o.openEnd))}return n}var DPe=0,$s=class t{constructor(e,n,i,r){this.name=e,this.set=n,this.base=i,this.modified=r,this.id=DPe++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let i=typeof e=="string"?e:"?";if(e instanceof t&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let r=new t(i,[],null,[]);if(r.set.push(r),n)for(let o of n.set)r.set.push(o);return r}static defineModifier(e){let n=new O3(e);return i=>i.modified.indexOf(n)>-1?i:O3.get(i.base||i,i.modified.concat(n).sort((r,o)=>r.id-o.id))}},IPe=0,O3=class t{constructor(e){this.name=e,this.instances=[],this.id=IPe++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(s=>s.base==e&&LPe(n,s.modified));if(i)return i;let r=[],o=new $s(e.name,r,e,n);for(let s of n)s.instances.push(o);let a=jPe(n);for(let s of e.set)if(!s.modified.length)for(let l of a)r.push(t.get(s,l));return o}};function LPe(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function jPe(t){let e=[[]];for(let n=0;ni.length-n.length)}function M4(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let o=[],a=2,s=r;for(let f=0;;){if(s=="..."&&f>0&&f+3==r.length){a=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!h)throw new RangeError("Invalid path: "+r);if(o.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),f+=h[0].length,f==r.length)break;let g=r[f++];if(f==r.length&&g=="!"){a=0;break}if(g!="/")throw new RangeError("Invalid path: "+r);s=r.slice(f)}let l=o.length-1,c=o[l];if(!c)throw new RangeError("Invalid path: "+r);let d=new Eh(i,a,l>0?o.slice(0,l):null);e[c]=d.sort(e[c])}}return Ine.add(e)}var Ine=new St({combine(t,e){let n,i,r;for(;t||e;){if(!t||e&&t.depth>=e.depth?(r=e,e=e.next):(r=t,t=t.next),n&&n.mode==r.mode&&!r.context&&!n.context)continue;let o=new Eh(r.tags,r.mode,r.context);n?n.next=o:i=o,n=o}return i}}),Eh=class{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let a=r;for(let s of o)for(let l of s.set){let c=n[l.id];if(c){a=a?a+" "+c:c;break}}return a},scope:i}}function RPe(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function FPe(t,e,n,i=0,r=t.length){let o=new WN(i,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),i,r,"",o.highlighters),o.flush(r)}var WN=class{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,o){let{type:a,from:s,to:l}=e;if(s>=i||l<=n)return;a.isTop&&(o=this.highlighters.filter(g=>!g.scope||g.scope(a)));let c=r,d=zPe(e)||Eh.empty,f=RPe(o,d.tags);if(f&&(c&&(c+=" "),c+=f,d.mode==1&&(r+=(r?" ":"")+f)),this.startSpan(Math.max(n,s),c),d.opaque)return;let h=e.tree&&e.tree.prop(St.mounted);if(h&&h.overlay){let g=e.node.enter(h.overlay[0].from+s,1),m=this.highlighters.filter(x=>!x.scope||x.scope(h.tree.type)),b=e.firstChild();for(let x=0,_=s;;x++){let O=x=S||!e.nextSibling())););if(!O||S>i)break;_=O.to+s,_>n&&(this.highlightRange(g.cursor(),Math.max(n,O.from+s),Math.min(i,_),"",m),this.startSpan(Math.min(i,_),c))}b&&e.parent()}else if(e.firstChild()){h&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,o),this.startSpan(Math.min(i,e.to),c)}while(e.nextSibling());e.parent()}}};function zPe(t){let e=t.type.prop(Ine);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}var Me=$s.define,J2=Me(),Kd=Me(),ZZ=Me(Kd),qZ=Me(Kd),Jd=Me(),e_=Me(Jd),d8=Me(Jd),ml=Me(),If=Me(ml),ul=Me(),fl=Me(),BN=Me(),Lv=Me(BN),t_=Me(),Y={comment:J2,lineComment:Me(J2),blockComment:Me(J2),docComment:Me(J2),name:Kd,variableName:Me(Kd),typeName:ZZ,tagName:Me(ZZ),propertyName:qZ,attributeName:Me(qZ),className:Me(Kd),labelName:Me(Kd),namespace:Me(Kd),macroName:Me(Kd),literal:Jd,string:e_,docString:Me(e_),character:Me(e_),attributeValue:Me(e_),number:d8,integer:Me(d8),float:Me(d8),bool:Me(Jd),regexp:Me(Jd),escape:Me(Jd),color:Me(Jd),url:Me(Jd),keyword:ul,self:Me(ul),null:Me(ul),atom:Me(ul),unit:Me(ul),modifier:Me(ul),operatorKeyword:Me(ul),controlKeyword:Me(ul),definitionKeyword:Me(ul),moduleKeyword:Me(ul),operator:fl,derefOperator:Me(fl),arithmeticOperator:Me(fl),logicOperator:Me(fl),bitwiseOperator:Me(fl),compareOperator:Me(fl),updateOperator:Me(fl),definitionOperator:Me(fl),typeOperator:Me(fl),controlOperator:Me(fl),punctuation:BN,separator:Me(BN),bracket:Lv,angleBracket:Me(Lv),squareBracket:Me(Lv),paren:Me(Lv),brace:Me(Lv),content:ml,heading:If,heading1:Me(If),heading2:Me(If),heading3:Me(If),heading4:Me(If),heading5:Me(If),heading6:Me(If),contentSeparator:Me(ml),list:Me(ml),quote:Me(ml),emphasis:Me(ml),strong:Me(ml),link:Me(ml),monospace:Me(ml),strikethrough:Me(ml),inserted:Me(),deleted:Me(),changed:Me(),invalid:Me(),meta:t_,documentMeta:Me(t_),annotation:Me(t_),processingInstruction:Me(t_),definition:$s.defineModifier("definition"),constant:$s.defineModifier("constant"),function:$s.defineModifier("function"),standard:$s.defineModifier("standard"),local:$s.defineModifier("local"),special:$s.defineModifier("special")};for(let t in Y){let e=Y[t];e instanceof $s&&(e.name=t)}Lne([{tag:Y.link,class:"tok-link"},{tag:Y.heading,class:"tok-heading"},{tag:Y.emphasis,class:"tok-emphasis"},{tag:Y.strong,class:"tok-strong"},{tag:Y.keyword,class:"tok-keyword"},{tag:Y.atom,class:"tok-atom"},{tag:Y.bool,class:"tok-bool"},{tag:Y.url,class:"tok-url"},{tag:Y.labelName,class:"tok-labelName"},{tag:Y.inserted,class:"tok-inserted"},{tag:Y.deleted,class:"tok-deleted"},{tag:Y.literal,class:"tok-literal"},{tag:Y.string,class:"tok-string"},{tag:Y.number,class:"tok-number"},{tag:[Y.regexp,Y.escape,Y.special(Y.string)],class:"tok-string2"},{tag:Y.variableName,class:"tok-variableName"},{tag:Y.local(Y.variableName),class:"tok-variableName tok-local"},{tag:Y.definition(Y.variableName),class:"tok-variableName tok-definition"},{tag:Y.special(Y.variableName),class:"tok-variableName2"},{tag:Y.definition(Y.propertyName),class:"tok-propertyName tok-definition"},{tag:Y.typeName,class:"tok-typeName"},{tag:Y.namespace,class:"tok-namespace"},{tag:Y.className,class:"tok-className"},{tag:Y.macroName,class:"tok-macroName"},{tag:Y.propertyName,class:"tok-propertyName"},{tag:Y.operator,class:"tok-operator"},{tag:Y.comment,class:"tok-comment"},{tag:Y.meta,class:"tok-meta"},{tag:Y.invalid,class:"tok-invalid"},{tag:Y.punctuation,class:"tok-punctuation"}]);var u8,Yg=new St;function jne(t){return He.define({combine:t?e=>e.concat(t):void 0})}var Z$=new St,wa=class{constructor(e,n,i=[],r=""){this.data=e,this.name=r,mn.prototype.hasOwnProperty("tree")||Object.defineProperty(mn.prototype,"tree",{get(){return ui(this)}}),this.parser=n,this.extension=[Fu.of(this),mn.languageData.of((o,a,s)=>{let l=UZ(o,a,s),c=l.type.prop(Yg);if(!c)return[];let d=o.facet(c),f=l.type.prop(Z$);if(f){let h=l.resolve(a-l.from,s);for(let g of f)if(g.test(h,o)){let m=o.facet(g.facet);return g.type=="replace"?m:m.concat(d)}}return d})].concat(i)}isActiveAt(e,n,i=-1){return UZ(e,n,i).type.prop(Yg)==this.data}findRegions(e){let n=e.facet(Fu);if(n?.data==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(o,a)=>{if(o.prop(Yg)==this.data){i.push({from:a,to:a+o.length});return}let s=o.prop(St.mounted);if(s){if(s.tree.prop(Yg)==this.data){if(s.overlay)for(let l of s.overlay)i.push({from:l.from+a,to:l.to+a});else i.push({from:a,to:a+o.length});return}else if(s.overlay){let l=i.length;if(r(s.tree,s.overlay[0].from+a),i.length>l)return}}for(let l=0;li.isTop?n:void 0)]}),e.name)}configure(e,n){return new t(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function ui(t){let e=t.field(wa.state,!1);return e?e.tree:ci.empty}var HN=class{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}},jv=null,ZN=class t{constructor(e,n,i=[],r,o,a,s,l){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=o,this.viewport=a,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new t(e,n,[],ci.empty,0,i,[],null)}startParse(){return this.parser.startParse(new HN(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=ci.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(vu.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=jv;jv=this;try{return e()}finally{jv=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=VZ(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:o,viewport:a,skipped:s}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,d,f,h)=>l.push({fromA:c,toA:d,fromB:f,toB:h})),i=vu.applyChanges(i,l),r=ci.empty,o=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){s=[];for(let c of this.skipped){let d=e.mapPos(c.from,1),f=e.mapPos(c.to,-1);de.from&&(this.fragments=VZ(this.fragments,r,o),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends k3{createParse(n,i,r){let o=r[0].from,a=r[r.length-1].to;return{parsedPos:o,advance(){let s=jv;if(s){for(let l of r)s.tempSkipped.push(l);e&&(s.scheduleOn=s.scheduleOn?Promise.all([s.scheduleOn,e]):e)}return this.parsedPos=a,new ci(_o.none,[],[],a-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return jv}};function VZ(t,e,n){return vu.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}var Ab=class t{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new t(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=ZN.create(e.facet(Fu).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new t(i)}};wa.state=sr.define({create:Ab.init,update(t,e){for(let n of e.effects)if(n.is(wa.setState))return n.value;return e.startState.facet(Fu)!=e.state.facet(Fu)?Ab.init(e.state):t.apply(e)}});var Rne=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Rne=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});var f8=typeof navigator<"u"&&!((u8=navigator.scheduling)===null||u8===void 0)&&u8.isInputPending?()=>navigator.scheduling.isInputPending():null,QPe=Ai.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(wa.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(wa.state);(e.tree!=e.context.tree||!e.context.isDone(t.doc.length))&&(this.working=Rne(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEndi+1e3,s=r.context.work(()=>f8&&f8()||Date.now()>o,i+(a?0:1e5));this.chunkBudget-=Date.now()-e,(s||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:wa.setState.of(new Ab(r.context))})),this.chunkBudget>0&&!(s&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(e=>ns(this.view.state,e)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Fu=He.define({combine(t){return t.length?t[0]:null},enables:t=>[wa.state,QPe,Ne.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]}),$b=class{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}},WPe=He.define(),Jw=He.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function S3(t){let e=t.facet(Jw);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Db(t,e){let n="",i=t.tabSize,r=t.facet(Jw)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let o=0;o=e?BPe(t,n,e):null}var Pm=class{constructor(e,n={}){this.state=e,this.options=n,this.unit=S3(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:o}=this.options;return r!=null&&r>=i.from&&r<=i.to?o&&r==e?{text:"",from:e}:(n<0?r-1&&(o+=a-this.countColumn(i,i.search(/\S|$/))),o}countColumn(e,n=e.length){return M0(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let a=o(r);if(a>-1)return a}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},N4=new St;function BPe(t,e,n){let i=e.resolveStack(n),r=i.node.enterUnfinishedNodesBefore(n);if(r!=i.node){let o=[];for(let a=r;a!=i.node;a=a.parent)o.push(a);for(let a=o.length-1;a>=0;a--)i={node:o[a],next:i}}return Fne(i,t,n)}function Fne(t,e,n){for(let i=t;i;i=i.next){let r=ZPe(i.node);if(r)return r(qN.create(e,n,i))}return 0}function HPe(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function ZPe(t){let e=t.type.prop(N4);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(St.closedBy))){let r=t.lastChild,o=r&&i.indexOf(r.name)>-1;return a=>zne(a,!0,1,void 0,o&&!HPe(a)?r.from:void 0)}return t.parent==null?qPe:null}function qPe(){return 0}var qN=class t extends Pm{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new t(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(UPe(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return Fne(this.context.next,this.base,this.pos)}};function UPe(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function VPe(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),a=r==null||r<=o.from?o.to:Math.min(o.to,r);for(let s=n.to;;){let l=e.childAfter(s);if(!l||l==i)return null;if(!l.type.isSkipped)return l.fromzne(i,e,n,t)}function zne(t,e,n,i,r){let o=t.textAfter,a=o.match(/^\s*/)[0].length,s=i&&o.slice(a,a+i.length)==i||r==t.pos+a,l=e?VPe(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*n)}var XPe=t=>t.baseIndent;function B_({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}var GPe=200;function KPe(){return mn.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+GPe)return t;let o=n.sliceString(r.from,i);if(!e.some(c=>c.test(o)))return t;let{state:a}=t,s=-1,l=[];for(let{head:c}of a.selection.ranges){let d=a.doc.lineAt(c);if(d.from==s)continue;s=d.from;let f=q$(a,d.from);if(f==null)continue;let h=/^\s*/.exec(d.text)[0],g=Db(a,f);h!=g&&l.push({from:d.from,to:d.from+h.length,insert:g})}return l.length?[t,{changes:l,sequential:!0}]:t})}var JPe=He.define(),P4=new St;function Qne(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(o&&s.from=e&&c.to>n&&(o=c)}}return o}function tAe(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function C3(t,e,n){for(let i of t.facet(JPe)){let r=i(t,e,n);if(r)return r}return eAe(t,e,n)}function Wne(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}var A4=kt.define({map:Wne}),ek=kt.define({map:Wne});function Bne(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}var Th=sr.define({create(){return ot.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(A4)&&!nAe(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(qne),r=i?ot.replace({widget:new UN(i(e.state,n.value))}):YZ;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(ek)&&(t=t.update({filter:(i,r)=>n.value.from!=i||n.value.to!=r,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:i}=e.selection.main;t.between(i,i,(r,o)=>{ri&&(n=!0)}),n&&(t=t.update({filterFrom:i,filterTo:i,filter:(r,o)=>o<=i||r>=i}))}return t},provide:t=>Ne.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!r||r.from>o)&&(r={from:o,to:a})}),r}function nAe(t,e,n){let i=!1;return t.between(e,e,(r,o)=>{r==e&&o==n&&(i=!0)}),i}function Hne(t,e){return t.field(Th,!1)?e:e.concat(kt.appendConfig.of(Une()))}var iAe=t=>{for(let e of Bne(t)){let n=C3(t.state,e.from,e.to);if(n)return t.dispatch({effects:Hne(t.state,[A4.of(n),Zne(t,n)])}),!0}return!1},rAe=t=>{if(!t.state.field(Th,!1))return!1;let e=[];for(let n of Bne(t)){let i=E3(t.state,n.from,n.to);i&&e.push(ek.of(i),Zne(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function Zne(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return Ne.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}var oAe=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(Th,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(ek.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},sAe=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:iAe},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:rAe},{key:"Ctrl-Alt-[",run:oAe},{key:"Ctrl-Alt-]",run:aAe}],lAe={placeholderDOM:null,preparePlaceholder:null,placeholderText:"\u2026"},qne=He.define({combine(t){return Gl(t,lAe)}});function Une(t){return[Th,uAe]}function Vne(t,e){let{state:n}=t,i=n.facet(qne),r=a=>{let s=t.lineBlockAt(t.posAtDOM(a.target)),l=E3(t.state,s.from,s.to);l&&t.dispatch({effects:ek.of(l)}),a.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let o=document.createElement("span");return o.textContent=i.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=r,o}var YZ=ot.replace({widget:new class extends ss{toDOM(t){return Vne(t,null)}}}),UN=class extends ss{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Vne(e,this.value)}},cAe={openText:"\u2304",closedText:"\u203A",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1},Ly=class extends Qs{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}};function dAe(t={}){let e=Object.assign(Object.assign({},cAe),t),n=new Ly(e,!0),i=new Ly(e,!1),r=Ai.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(Fu)!=a.state.facet(Fu)||a.startState.field(Th,!1)!=a.state.field(Th,!1)||ui(a.startState)!=ui(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let s=new $u;for(let l of a.viewportLineBlocks){let c=E3(a.state,l.from,l.to)?i:C3(a.state,l.from,l.to)?n:null;c&&s.add(l.from,l.from,c)}return s.finish()}}),{domEventHandlers:o}=e;return[r,vPe({class:"cm-foldGutter",markers(a){var s;return((s=a.plugin(r))===null||s===void 0?void 0:s.markers)||yn.empty},initialSpacer(){return new Ly(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(a,s,l)=>{if(o.click&&o.click(a,s,l))return!0;let c=E3(a.state,s.from,s.to);if(c)return a.dispatch({effects:ek.of(c)}),!0;let d=C3(a.state,s.from,s.to);return d?(a.dispatch({effects:A4.of(d)}),!0):!1}})}),Une()]}var uAe=Ne.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"}}),Zc=class t{constructor(e,n){this.specs=e;let i;function r(s){let l=jl.newName();return(i||(i=Object.create(null)))["."+l]=s,l}let o=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,a=n.scope;this.scope=a instanceof wa?s=>s.prop(Yg)==a.data:a?s=>s==a:void 0,this.style=Lne(e.map(s=>({tag:s.tag,class:s.class||r(Object.assign({},s,{tag:null}))})),{all:o}).style,this.module=i?new jl(i):null,this.themeType=n.themeType}static define(e,n){return new t(e,n||{})}},VN=He.define(),Yne=He.define({combine(t){return t.length?[t[0]]:null}});function h8(t){let e=t.facet(VN);return e.length?e:t.facet(Yne)}function tk(t,e){let n=[fAe],i;return t instanceof Zc&&(t.module&&n.push(Ne.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push(Yne.of(t)):i?n.push(VN.computeN([Ne.darkTheme],r=>r.facet(Ne.darkTheme)==(i=="dark")?[t]:[])):n.push(VN.of(t)),n}var YN=class{constructor(e){this.markCache=Object.create(null),this.tree=ui(e.state),this.decorations=this.buildDeco(e,h8(e.state))}update(e){let n=ui(e.state),i=h8(e.state),r=i!=h8(e.startState);n.length{i.add(a,s,this.markCache[l]||(this.markCache[l]=ot.mark({class:l})))},r,o);return i.finish()}},fAe=Jh.high(Ai.fromClass(YN,{decorations:t=>t.decorations})),Xne=Zc.define([{tag:Y.meta,color:"#404740"},{tag:Y.link,textDecoration:"underline"},{tag:Y.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Y.emphasis,fontStyle:"italic"},{tag:Y.strong,fontWeight:"bold"},{tag:Y.strikethrough,textDecoration:"line-through"},{tag:Y.keyword,color:"#708"},{tag:[Y.atom,Y.bool,Y.url,Y.contentSeparator,Y.labelName],color:"#219"},{tag:[Y.literal,Y.inserted],color:"#164"},{tag:[Y.string,Y.deleted],color:"#a11"},{tag:[Y.regexp,Y.escape,Y.special(Y.string)],color:"#e40"},{tag:Y.definition(Y.variableName),color:"#00f"},{tag:Y.local(Y.variableName),color:"#30a"},{tag:[Y.typeName,Y.namespace],color:"#085"},{tag:Y.className,color:"#167"},{tag:[Y.special(Y.variableName),Y.macroName],color:"#256"},{tag:Y.definition(Y.propertyName),color:"#00c"},{tag:Y.comment,color:"#940"},{tag:Y.invalid,color:"#f00"}]),hAe=Ne.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Gne=1e4,Kne="()[]{}",Jne=He.define({combine(t){return Gl(t,{afterCursor:!0,brackets:Kne,maxScanDistance:Gne,renderMatch:mAe})}}),pAe=ot.mark({class:"cm-matchingBracket"}),gAe=ot.mark({class:"cm-nonmatchingBracket"});function mAe(t){let e=[],n=t.matched?pAe:gAe;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}var vAe=sr.define({create(){return ot.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(Jne);for(let r of e.state.selection.ranges){if(!r.empty)continue;let o=Ml(e.state,r.head,-1,i)||r.head>0&&Ml(e.state,r.head-1,1,i)||i.afterCursor&&(Ml(e.state,r.head,1,i)||r.headNe.decorations.from(t)}),yAe=[vAe,hAe];function bAe(t={}){return[Jne.of(t),yAe]}var eie=new St;function XN(t,e,n){let i=t.prop(e<0?St.openedBy:St.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function GN(t){let e=t.type.prop(eie);return e?e(t.node):t}function Ml(t,e,n,i={}){let r=i.maxScanDistance||Gne,o=i.brackets||Kne,a=ui(t),s=a.resolveInner(e,n);for(let l=s;l;l=l.parent){let c=XN(l.type,n,o);if(c&&l.from0?e>=d.from&&ed.from&&e<=d.to))return wAe(t,e,n,l,d,c,o)}}return kAe(t,e,n,a,s.type,r,o)}function wAe(t,e,n,i,r,o,a){let s=i.parent,l={from:r.from,to:r.to},c=0,d=s?.cursor();if(d&&(n<0?d.childBefore(i.from):d.childAfter(i.to)))do if(n<0?d.to<=i.from:d.from>=i.to){if(c==0&&o.indexOf(d.type.name)>-1&&d.from0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},d=t.doc.iterRange(e,n>0?t.doc.length:0),f=0;for(let h=0;!d.next().done&&h<=o;){let g=d.value;n<0&&(h+=g.length);let m=e+h*n;for(let b=n>0?0:g.length-1,x=n>0?g.length:-1;b!=x;b+=n){let _=a.indexOf(g[b]);if(!(_<0||i.resolveInner(m+b,1).type!=r))if(_%2==0==n>0)f++;else{if(f==1)return{start:c,end:{from:m+b,to:m+b+1},matched:_>>1==l>>1};f--}}n>0&&(h+=g.length)}return d.done?{start:c,matched:!1}:null}var xAe=Object.create(null),XZ=[_o.none],GZ=[],KZ=Object.create(null),_Ae=Object.create(null);for(let[t,e]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"]])_Ae[t]=OAe(xAe,e);function p8(t,e){GZ.indexOf(t)>-1||(GZ.push(t),console.warn(e))}function OAe(t,e){let n=[];for(let s of e.split(" ")){let l=[];for(let c of s.split(".")){let d=t[c]||Y[c];d?typeof d=="function"?l.length?l=l.map(d):p8(c,`Modifier ${c} used at start of tag`):l.length?p8(c,`Tag ${c} used as modifier`):l=Array.isArray(d)?d:[d]:p8(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+n.map(s=>s.id),o=KZ[r];if(o)return o.id;let a=KZ[r]=_o.define({id:XZ.length,name:i,props:[M4({[i]:n})]});return XZ.push(a),a.id}An.RTL,An.LTR;var SAe=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=V$(t.state,n.from);return i.line?CAe(t):i.block?TAe(t):!1};function U$(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}var CAe=U$(PAe,0),EAe=U$(tie,0),TAe=U$((t,e)=>tie(t,e,NAe(e)),0);function V$(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}var Rv=50;function MAe(t,{open:e,close:n},i,r){let o=t.sliceDoc(i-Rv,i),a=t.sliceDoc(r,r+Rv),s=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(a)[0].length,c=o.length-s;if(o.slice(c-e.length,c)==e&&a.slice(l,l+n.length)==n)return{open:{pos:i-s,margin:s&&1},close:{pos:r+l,margin:l&&1}};let d,f;r-i<=2*Rv?d=f=t.sliceDoc(i,r):(d=t.sliceDoc(i,i+Rv),f=t.sliceDoc(r-Rv,r));let h=/^\s*/.exec(d)[0].length,g=/\s*$/.exec(f)[0].length,m=f.length-g-n.length;return d.slice(h,h+e.length)==e&&f.slice(m,m+n.length)==n?{open:{pos:i+h+e.length,margin:/\s/.test(d.charAt(h+e.length))?1:0},close:{pos:r-g-n.length,margin:/\s/.test(f.charAt(m-1))?1:0}}:null}function NAe(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to),o=e.length-1;o>=0&&e[o].to>i.from?e[o].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function tie(t,e,n=e.selection.ranges){let i=n.map(o=>V$(e,o.from).block);if(!i.every(o=>o))return null;let r=n.map((o,a)=>MAe(e,i[a],o.from,o.to));if(t!=2&&!r.every(o=>o))return{changes:e.changes(n.map((o,a)=>r[a]?[]:[{from:o.from,insert:i[a].open+" "},{from:o.to,insert:" "+i[a].close}]))};if(t!=1&&r.some(o=>o)){let o=[];for(let a=0,s;ar&&(o==a||a>f.from)){r=f.from;let h=/^\s*/.exec(f.text)[0].length,g=h==f.length,m=f.text.slice(h,h+c.length)==c?h:-1;ho.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:s,token:l,indent:c,empty:d,single:f}of i)(f||!d)&&o.push({from:s.from+c,insert:l+" "});let a=e.changes(o);return{changes:a,selection:e.selection.map(a,1)}}else if(t!=1&&i.some(o=>o.comment>=0)){let o=[];for(let{line:a,comment:s,token:l}of i)if(s>=0){let c=a.from+s,d=c+l.length;a.text[d-a.from]==" "&&d++,o.push({from:c,to:d})}return{changes:o}}return null}var KN=as.define(),AAe=as.define(),$Ae=He.define(),nie=He.define({combine(t){return Gl(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}}),iie=sr.define({create(){return ch.empty},update(t,e){let n=e.state.facet(nie),i=e.annotation(KN);if(i){let l=Is.fromTransaction(e,i.selection),c=i.side,d=c==0?t.undone:t.done;return l?d=T3(d,d.length,n.minDepth,l):d=aie(d,e.startState.selection),new ch(c==0?i.rest:d,c==0?d:i.rest)}let r=e.annotation(AAe);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(ko.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=Is.fromTransaction(e),a=e.annotation(ko.time),s=e.annotation(ko.userEvent);return o?t=t.addChanges(o,a,s,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,s,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new ch(t.done.map(Is.fromJSON),t.undone.map(Is.fromJSON))}});function $4(t={}){return[iie,nie.of(t),Ne.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?rie:e.inputType=="historyRedo"?JN:null;return i?(e.preventDefault(),i(n)):!1}})]}function D4(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(iie,!1);if(!r)return!1;let o=r.pop(t,n,e);return o?(i(o),!0):!1}}var rie=D4(0,!1),JN=D4(1,!1),DAe=D4(0,!0),IAe=D4(1,!0),Is=class t{constructor(e,n,i,r,o){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=o}setSelAfter(e){return new t(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new t(e.changes&&Na.fromJSON(e.changes),[],e.mapped&&gu.fromJSON(e.mapped),e.startSelection&&ye.fromJSON(e.startSelection),e.selectionsAfter.map(ye.fromJSON))}static fromTransaction(e,n){let i=Ka;for(let r of e.startState.facet($Ae)){let o=r(e);o.length&&(i=i.concat(o))}return!i.length&&e.changes.empty?null:new t(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,Ka)}static selection(e){return new t(void 0,Ka,void 0,void 0,e)}};function T3(t,e,n,i){let r=e+1>n+20?e-n-1:0,o=t.slice(r,e);return o.push(i),o}function LAe(t,e){let n=[],i=!1;return t.iterChangedRanges((r,o)=>n.push(r,o)),e.iterChangedRanges((r,o,a,s)=>{for(let l=0;l=c&&a<=d&&(i=!0)}}),i}function jAe(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function oie(t,e){return t.length?e.length?t.concat(e):t:e}var Ka=[],RAe=200;function aie(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-RAe));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),T3(t,t.length-1,1e9,n.setSelAfter(i)))}else return[Is.selection([e])]}function FAe(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function g8(t,e){if(!t.length)return t;let n=t.length,i=Ka;for(;n;){let r=zAe(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let o=t.slice(0,n);return o[n-1]=r,o}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[Is.selection(i)]:Ka}function zAe(t,e,n){let i=oie(t.selectionsAfter.length?t.selectionsAfter.map(s=>s.map(e)):Ka,n);if(!t.changes)return Is.selection(i);let r=t.changes.map(e),o=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(o):o;return new Is(r,kt.mapEffects(t.effects,e),a,t.startSelection.map(o),i)}var QAe=/^(input\.type|delete)($|\.)/,ch=class t{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new t(this.done,this.undone):this}addChanges(e,n,i,r,o){let a=this.done,s=a[a.length-1];return s&&s.changes&&!s.changes.empty&&e.changes&&(!i||QAe.test(i))&&(!s.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):I4(n,e))}function eo(t){return t.textDirectionAt(t.state.selection.main.head)==An.LTR}var cie=t=>lie(t,!eo(t)),die=t=>lie(t,eo(t));function uie(t,e){return Vs(t,n=>n.empty?t.moveByGroup(n,e):I4(n,e))}var WAe=t=>uie(t,!eo(t)),BAe=t=>uie(t,eo(t));function HAe(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function L4(t,e,n){let i=ui(t).resolveInner(e.head),r=n?St.closedBy:St.openedBy;for(let l=e.head;;){let c=n?i.childAfter(l):i.childBefore(l);if(!c)break;HAe(t,c,r)?i=c:l=n?c.to:c.from}let o=i.type.prop(r),a,s;return o&&(a=n?Ml(t,i.from,1):Ml(t,i.to,-1))&&a.matched?s=n?a.end.to:a.end.from:s=n?i.to:i.from,ye.cursor(s,n?-1:1)}var ZAe=t=>Vs(t,e=>L4(t.state,e,!eo(t))),qAe=t=>Vs(t,e=>L4(t.state,e,eo(t)));function fie(t,e){return Vs(t,n=>{if(!n.empty)return I4(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}var hie=t=>fie(t,!1),pie=t=>fie(t,!0);function gie(t){let e=t.scrollDOM.clientHeighta.empty?t.moveVertically(a,e,n.height):I4(a,e));if(r.eq(i.selection))return!1;let o;if(n.selfScroll){let a=t.coordsAtPos(i.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),l=s.top+n.marginTop,c=s.bottom-n.marginBottom;a&&a.top>l&&a.bottommie(t,!1),e7=t=>mie(t,!0);function Ku(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let o=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;o&&e.head!=i.from+o&&(r=ye.cursor(i.from+o))}return r}var UAe=t=>Vs(t,e=>Ku(t,e,!0)),VAe=t=>Vs(t,e=>Ku(t,e,!1)),YAe=t=>Vs(t,e=>Ku(t,e,!eo(t))),XAe=t=>Vs(t,e=>Ku(t,e,eo(t))),GAe=t=>Vs(t,e=>ye.cursor(t.lineBlockAt(e.head).from,1)),KAe=t=>Vs(t,e=>ye.cursor(t.lineBlockAt(e.head).to,-1));function JAe(t,e,n){let i=!1,r=N0(t.selection,o=>{let a=Ml(t,o.head,-1)||Ml(t,o.head,1)||o.head>0&&Ml(t,o.head-1,1)||o.headJAe(t,e);function fs(t,e){let n=N0(t.state.selection,i=>{let r=e(i);return ye.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Kl(t.state,n)),!0)}function vie(t,e){return fs(t,n=>t.moveByChar(n,e))}var yie=t=>vie(t,!eo(t)),bie=t=>vie(t,eo(t));function wie(t,e){return fs(t,n=>t.moveByGroup(n,e))}var t$e=t=>wie(t,!eo(t)),n$e=t=>wie(t,eo(t)),i$e=t=>fs(t,e=>L4(t.state,e,!eo(t))),r$e=t=>fs(t,e=>L4(t.state,e,eo(t)));function kie(t,e){return fs(t,n=>t.moveVertically(n,e))}var xie=t=>kie(t,!1),_ie=t=>kie(t,!0);function Oie(t,e){return fs(t,n=>t.moveVertically(n,e,gie(t).height))}var eq=t=>Oie(t,!1),tq=t=>Oie(t,!0),o$e=t=>fs(t,e=>Ku(t,e,!0)),a$e=t=>fs(t,e=>Ku(t,e,!1)),s$e=t=>fs(t,e=>Ku(t,e,!eo(t))),l$e=t=>fs(t,e=>Ku(t,e,eo(t))),c$e=t=>fs(t,e=>ye.cursor(t.lineBlockAt(e.head).from)),d$e=t=>fs(t,e=>ye.cursor(t.lineBlockAt(e.head).to)),nq=({state:t,dispatch:e})=>(e(Kl(t,{anchor:0})),!0),iq=({state:t,dispatch:e})=>(e(Kl(t,{anchor:t.doc.length})),!0),rq=({state:t,dispatch:e})=>(e(Kl(t,{anchor:t.selection.main.anchor,head:0})),!0),oq=({state:t,dispatch:e})=>(e(Kl(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),u$e=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),f$e=({state:t,dispatch:e})=>{let n=j4(t).map(({from:i,to:r})=>ye.range(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:ye.create(n),userEvent:"select"})),!0},h$e=({state:t,dispatch:e})=>{let n=N0(t.selection,i=>{var r;let o=ui(t).resolveStack(i.from,1);for(let a=o;a;a=a.next){let{node:s}=a;if((s.from=i.to||s.to>i.to&&s.from<=i.from)&&!((r=s.parent)===null||r===void 0)&&r.parent)return ye.range(s.to,s.from)}return i});return e(Kl(t,n)),!0},p$e=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=ye.create([n.main]):n.main.empty||(i=ye.create([ye.cursor(n.main.head)])),i?(e(Kl(t,i)),!0):!1};function nk(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(o=>{let{from:a,to:s}=o;if(a==s){let l=e(o);la&&(n="delete.forward",l=n_(t,l,!0)),a=Math.min(a,l),s=Math.max(s,l)}else a=n_(t,a,!1),s=n_(t,s,!0);return a==s?{range:o}:{changes:{from:a,to:s},range:ye.cursor(a,ar(t)))i.between(e,e,(r,o)=>{re&&(e=n?o:r)});return e}var Sie=(t,e)=>nk(t,n=>{let i=n.from,{state:r}=t,o=r.doc.lineAt(i),a,s;if(!e&&i>o.from&&iSie(t,!1),Cie=t=>Sie(t,!0),Eie=(t,e)=>nk(t,n=>{let i=n.head,{state:r}=t,o=r.doc.lineAt(i),a=r.charCategorizer(i);for(let s=null;;){if(i==(e?o.to:o.from)){i==n.head&&o.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let l=Er(o.text,i-o.from,e)+o.from,c=o.text.slice(Math.min(i,l)-o.from,Math.max(i,l)-o.from),d=a(c);if(s!=null&&d!=s)break;(c!=" "||i!=n.head)&&(s=d),i=l}return i}),Tie=t=>Eie(t,!1),g$e=t=>Eie(t,!0),m$e=t=>nk(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headnk(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),y$e=t=>nk(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:Vt.of(["",""])},range:ye.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},w$e=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,o=t.doc.lineAt(r),a=r==o.from?r-1:Er(o.text,r-o.from,!1)+o.from,s=r==o.to?r+1:Er(o.text,r-o.from,!0)+o.from;return{changes:{from:a,to:s,insert:t.doc.slice(r,s).append(t.doc.slice(a,r))},range:ye.cursor(s)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function j4(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),o=t.doc.lineAt(i.to);if(!i.empty&&i.to==o.from&&(o=t.doc.lineAt(i.to-1)),n>=r.number){let a=e[e.length-1];a.to=o.to,a.ranges.push(i)}else e.push({from:r.from,to:o.to,ranges:[i]});n=o.number+1}return e}function Mie(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let o of j4(t)){if(n?o.to==t.doc.length:o.from==0)continue;let a=t.doc.lineAt(n?o.to+1:o.from-1),s=a.length+1;if(n){i.push({from:o.to,to:a.to},{from:o.from,insert:a.text+t.lineBreak});for(let l of o.ranges)r.push(ye.range(Math.min(t.doc.length,l.anchor+s),Math.min(t.doc.length,l.head+s)))}else{i.push({from:a.from,to:o.from},{from:o.to,insert:t.lineBreak+a.text});for(let l of o.ranges)r.push(ye.range(l.anchor-s,l.head-s))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:ye.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}var k$e=({state:t,dispatch:e})=>Mie(t,e,!1),x$e=({state:t,dispatch:e})=>Mie(t,e,!0);function Nie(t,e,n){if(t.readOnly)return!1;let i=[];for(let r of j4(t))n?i.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):i.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var _$e=({state:t,dispatch:e})=>Nie(t,e,!1),O$e=({state:t,dispatch:e})=>Nie(t,e,!0),S$e=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(j4(e).map(({from:r,to:o})=>(r>0?r--:ot.moveVertically(r,!0)).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function C$e(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=ui(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),o;return i&&r&&i.to<=e&&r.from>=e&&(o=i.type.prop(St.closedBy))&&o.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}var E$e=Pie(!1),T$e=Pie(!0);function Pie(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:o,to:a}=r,s=e.doc.lineAt(o),l=!t&&o==a&&C$e(e,o);t&&(o=a=(a<=s.to?s:e.doc.lineAt(a)).to);let c=new Pm(e,{simulateBreak:o,simulateDoubleBreak:!!l}),d=q$(c,o);for(d==null&&(d=M0(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));as.from&&o{let r=[];for(let a=i.from;a<=i.to;){let s=t.doc.lineAt(a);s.number>n&&(i.empty||i.to>s.from)&&(e(s,r,i),n=s.number),a=s.to+1}let o=t.changes(r);return{changes:r,range:ye.range(o.mapPos(i.anchor,1),o.mapPos(i.head,1))}})}var M$e=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new Pm(t,{overrideIndentation:o=>n[o]??-1}),r=Y$(t,(o,a,s)=>{let l=q$(i,o.from);if(l==null)return;/\S/.test(o.text)||(l=0);let c=/^\s*/.exec(o.text)[0],d=Db(t,l);(c!=d||s.fromt.readOnly?!1:(e(t.update(Y$(t,(n,i)=>{i.push({from:n.from,insert:t.facet(Jw)})}),{userEvent:"input.indent"})),!0),$ie=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Y$(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let o=M0(r,t.tabSize),a=0,s=Db(t,Math.max(0,o-S3(t)));for(;a({mac:t.key,run:t.run,shift:t.shift}))),Die=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:ZAe,shift:i$e},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:qAe,shift:r$e},{key:"Alt-ArrowUp",run:k$e},{key:"Shift-Alt-ArrowUp",run:_$e},{key:"Alt-ArrowDown",run:x$e},{key:"Shift-Alt-ArrowDown",run:O$e},{key:"Escape",run:p$e},{key:"Mod-Enter",run:T$e},{key:"Alt-l",mac:"Ctrl-l",run:f$e},{key:"Mod-i",run:h$e,preventDefault:!0},{key:"Mod-[",run:$ie},{key:"Mod-]",run:Aie},{key:"Mod-Alt-\\",run:M$e},{key:"Shift-Mod-k",run:S$e},{key:"Shift-Mod-\\",run:e$e},{key:"Mod-/",run:SAe},{key:"Alt-A",run:EAe}].concat(X$),P$e={key:"Tab",run:Aie,shift:$ie};function dn(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;et.normalize("NFKD"):t=>t,zu=class{constructor(e,n,i=0,r=e.length,o,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=o?s=>o(aq(s)):aq,this.query=this.normalize(n)}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 xr(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=A$(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Va(e);let r=this.normalize(n);for(let o=0,a=i;;o++){let s=r.charCodeAt(o),l=this.match(s,a);if(o==r.length-1){if(l)return this.value=l,this;break}a==i&&othis.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 e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=A3(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||r.to<=n){let s=new t(n,e.sliceString(n,i));return m8.set(e,s),s}if(r.from==n&&r.to==i)return r;let{text:o,from:a}=r;return a>n&&(o=e.sliceString(n,a)+o,a=n),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this.matchPos=A3(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=N3.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<"u"&&(M3.prototype[Symbol.iterator]=P3.prototype[Symbol.iterator]=function(){return this});function A$e(t){try{return new RegExp(t,G$),!0}catch{return!1}}function A3(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function n7(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=dn("input",{class:"cm-textfield",name:"line",value:e}),i=dn("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:$3.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),r())},onsubmit:o=>{o.preventDefault(),r()}},dn("label",t.state.phrase("Go to line"),": ",n)," ",dn("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function r(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:a}=t,s=a.doc.lineAt(a.selection.main.head),[,l,c,d,f]=o,h=d?+d.slice(1):0,g=c?+c:s.number;if(c&&f){let x=g/100;l&&(x=x*(l=="-"?-1:1)+s.number/a.doc.lines),g=Math.round(a.doc.lines*x)}else c&&l&&(g=g*(l=="-"?-1:1)+s.number);let m=a.doc.line(Math.max(1,Math.min(a.doc.lines,g))),b=ye.cursor(m.from+Math.max(0,Math.min(h,m.length)));t.dispatch({effects:[$3.of(!1),Ne.scrollIntoView(b.from,{y:"center"})],selection:b}),t.focus()}return{dom:i}}var $3=kt.define(),sq=sr.define({create(){return!0},update(t,e){for(let n of e.effects)n.is($3)&&(t=n.value);return t},provide:t=>Mb.from(t,e=>e?n7:null)}),$$e=t=>{let e=Tb(t,n7);if(!e){let n=[$3.of(!0)];t.state.field(sq,!1)==null&&n.push(kt.appendConfig.of([sq,D$e])),t.dispatch({effects:n}),e=Tb(t,n7)}return e&&e.dom.querySelector("input").select(),!0},D$e=Ne.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),I$e={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},L$e=He.define({combine(t){return Gl(t,I$e,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function j$e(t){return[W$e,Q$e]}var R$e=ot.mark({class:"cm-selectionMatch"}),F$e=ot.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function lq(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=zn.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=zn.Word)}function z$e(t,e,n,i){return t(e.sliceDoc(n,n+1))==zn.Word&&t(e.sliceDoc(i-1,i))==zn.Word}var Q$e=Ai.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(L$e),{state:n}=t,i=n.selection;if(i.ranges.length>1)return ot.none;let r=i.main,o,a=null;if(r.empty){if(!e.highlightWordAroundCursor)return ot.none;let l=n.wordAt(r.head);if(!l)return ot.none;a=n.charCategorizer(r.head),o=n.sliceDoc(l.from,l.to)}else{let l=r.to-r.from;if(l200)return ot.none;if(e.wholeWords){if(o=n.sliceDoc(r.from,r.to),a=n.charCategorizer(r.head),!(lq(a,n,r.from,r.to)&&z$e(a,n,r.from,r.to)))return ot.none}else if(o=n.sliceDoc(r.from,r.to).trim(),!o)return ot.none}let s=[];for(let l of t.visibleRanges){let c=new zu(n.doc,o,l.from,l.to);for(;!c.next().done;){let{from:d,to:f}=c.value;if((!a||lq(a,n,d,f))&&(r.empty&&d<=r.from&&f>=r.to?s.push(F$e.range(d,f)):(d>=r.to||f<=r.from)&&s.push(R$e.range(d,f)),s.length>e.maxMatches))return ot.none}}return ot.set(s)}},{decorations:t=>t.decorations}),W$e=Ne.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),B$e=({state:t,dispatch:e})=>{let{selection:n}=t,i=ye.create(n.ranges.map(r=>t.wordAt(r.head)||ye.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function H$e(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),o=r&&r.from==n.from&&r.to==n.to;for(let a=!1,s=new zu(t.doc,e,i[i.length-1].to);;)if(s.next(),s.done){if(a)return null;s=new zu(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),a=!0}else{if(a&&i.some(l=>l.from==s.value.from))continue;if(o){let l=t.wordAt(s.value.from);if(!l||l.from!=s.value.from||l.to!=s.value.to)continue}return s.value}}var Z$e=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return B$e({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=i))return!1;let r=H$e(t,i);return r?(e(t.update({selection:t.selection.addRange(ye.range(r.from,r.to),!1),effects:Ne.scrollIntoView(r.to)})),!0):!1},P0=He.define({combine(t){return Gl(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new a7(e),scrollToMatch:e=>Ne.scrollIntoView(e)})}}),D3=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||A$e(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` `:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new r7(this):new i7(this)}getCursor(e,n=0,i){let r=e.doc?e:mn.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?$g(this,r,n,i):Ag(this,r,n,i)}},I3=class{constructor(e){this.spec=e}};function Ag(t,e,n,i){return new zu(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:r=>r.toLowerCase(),t.wholeWord?q$e(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function q$e(t,e){return(n,i,r,o)=>((o>n||o+r.length=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let o=Ag(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}};function $g(t,e,n,i){return new M3(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?U$e(e.charCategorizer(e.selection.main.head)):void 0},n,i)}function L3(t,e){return t.slice(Er(t,e,!1),e)}function j3(t,e){return t.slice(e,Er(t,e))}function U$e(t){return(e,n,i)=>!i[0].length||(t(L3(i.input,i.index))!=zn.Word||t(j3(i.input,i.index))!=zn.Word)&&(t(j3(i.input,i.index+i[0].length))!=zn.Word||t(L3(i.input,i.index+i[0].length))!=zn.Word)}var r7=class extends I3{nextMatch(e,n,i){let r=$g(this.spec,e,i,e.doc.length).next();return r.done&&(r=$g(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let o=Math.max(n,i-r*1e4),a=$g(this.spec,e,o,i),s=null;for(;!a.next().done;)s=a.value;if(s&&(o==n||s.from>o+10))return s;if(o==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(n,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let o=$g(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}},Ib=kt.define(),K$=kt.define(),yu=sr.define({create(t){return new jy(o7(t).create(),null)},update(t,e){for(let n of e.effects)n.is(Ib)?t=new jy(n.value.create(),t.panel):n.is(K$)&&(t=new jy(t.query,n.value?J$:null));return t},provide:t=>Mb.from(t,e=>e.panel)}),jy=class{constructor(e,n){this.query=e,this.panel=n}},V$e=ot.mark({class:"cm-searchMatch"}),Y$e=ot.mark({class:"cm-searchMatch cm-searchMatch-selected"}),X$e=Ai.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(yu))}update(t){let e=t.state.field(yu);(e!=t.startState.field(yu)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return ot.none;let{view:n}=this,i=new $u;for(let r=0,o=n.visibleRanges,a=o.length;ro[r+1].from-2*250;)l=o[++r].to;t.highlight(n.state,s,l,(c,d)=>{let f=n.state.selection.ranges.some(h=>h.from==c&&h.to==d);i.add(c,d,f?Y$e:V$e)})}return i.finish()}},{decorations:t=>t.decorations});function ik(t){return e=>{let n=e.state.field(yu,!1);return n&&n.query.spec.valid?t(e,n):Fie(e)}}var R3=ik((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=ye.single(i.from,i.to),o=t.state.facet(P0);return t.dispatch({selection:r,effects:[eD(t,i),o.scrollToMatch(r.main,t)],userEvent:"select.search"}),Rie(t),!0}),F3=ik((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let o=ye.single(r.from,r.to),a=t.state.facet(P0);return t.dispatch({selection:o,effects:[eD(t,r),a.scrollToMatch(o.main,t)],userEvent:"select.search"}),Rie(t),!0}),G$e=ik((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:ye.create(n.map(i=>ye.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),K$e=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,o=[],a=0;for(let s=new zu(t.doc,t.sliceDoc(i,r));!s.next().done;){if(o.length>1e3)return!1;s.value.from==i&&(a=o.length),o.push(ye.range(s.value.from,s.value.to))}return e(t.update({selection:ye.create(o,a),userEvent:"select.search.matches"})),!0},cq=ik((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,i,i);if(!o)return!1;let a=[],s,l,c=[];if(o.from==i&&o.to==r&&(l=n.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:l}),o=e.nextMatch(n,o.from,o.to),c.push(Ne.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))),o){let d=a.length==0||a[0].from>=o.to?0:o.to-o.from-l.length;s=ye.single(o.from-d,o.to-d),c.push(eD(t,o)),c.push(n.facet(P0).scrollToMatch(s.main,t))}return t.dispatch({changes:a,selection:s,effects:c,userEvent:"input.replace"}),!0}),J$e=ik((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(r=>{let{from:o,to:a}=r;return{from:o,to:a,insert:e.getReplacement(r)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Ne.announce.of(i),userEvent:"input.replace.all"}),!0});function J$(t){return t.state.facet(P0).createPanel(t)}function o7(t,e){var n,i,r,o,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let c=t.facet(P0);return new D3({search:((n=e?.literal)!==null&&n!==void 0?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(i=e?.caseSensitive)!==null&&i!==void 0?i:c.caseSensitive,literal:(r=e?.literal)!==null&&r!==void 0?r:c.literal,regexp:(o=e?.regexp)!==null&&o!==void 0?o:c.regexp,wholeWord:(a=e?.wholeWord)!==null&&a!==void 0?a:c.wholeWord})}function jie(t){let e=Tb(t,J$);return e&&e.dom.querySelector("[main-field]")}function Rie(t){let e=jie(t);e&&e==t.root.activeElement&&e.select()}var Fie=t=>{let e=t.state.field(yu,!1);if(e&&e.panel){let n=jie(t);if(n&&n!=t.root.activeElement){let i=o7(t.state,e.query.spec);i.valid&&t.dispatch({effects:Ib.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[K$.of(!0),e?Ib.of(o7(t.state,e.query.spec)):kt.appendConfig.of(nDe)]});return!0},zie=t=>{let e=t.state.field(yu,!1);if(!e||!e.panel)return!1;let n=Tb(t,J$);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:K$.of(!1)}),!0},eDe=[{key:"Mod-f",run:Fie,scope:"editor search-panel"},{key:"F3",run:R3,shift:F3,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:R3,shift:F3,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:zie,scope:"editor search-panel"},{key:"Mod-Shift-l",run:K$e},{key:"Mod-Alt-g",run:$$e},{key:"Mod-d",run:Z$e,preventDefault:!0}],a7=class{constructor(e){this.view=e;let n=this.query=e.state.field(yu).query.spec;this.commit=this.commit.bind(this),this.searchField=dn("input",{value:n.search,placeholder:oa(e,"Find"),"aria-label":oa(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=dn("input",{value:n.replace,placeholder:oa(e,"Replace"),"aria-label":oa(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=dn("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=dn("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=dn("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,o,a){return dn("button",{class:"cm-button",name:r,onclick:o,type:"button"},a)}this.dom=dn("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>R3(e),[oa(e,"next")]),i("prev",()=>F3(e),[oa(e,"previous")]),i("select",()=>G$e(e),[oa(e,"all")]),dn("label",null,[this.caseField,oa(e,"match case")]),dn("label",null,[this.reField,oa(e,"regexp")]),dn("label",null,[this.wordField,oa(e,"by word")]),...e.state.readOnly?[]:[dn("br"),this.replaceField,i("replace",()=>cq(e),[oa(e,"replace")]),i("replaceAll",()=>J$e(e),[oa(e,"replace all")])],dn("button",{name:"close",onclick:()=>zie(e),"aria-label":oa(e,"close"),type:"button"},["\xD7"])])}commit(){let e=new D3({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Ib.of(e)}))}keydown(e){$7e(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?F3:R3)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),cq(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(Ib)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(P0).top}};function oa(t,e){return t.state.phrase(e)}var i_=30,r_=/[\s\.,:;?!]/;function eD(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,o=Math.max(i.from,e-i_),a=Math.min(r,n+i_),s=t.state.sliceDoc(o,a);if(o!=i.from){for(let l=0;ls.length-i_;l--)if(!r_.test(s[l-1])&&r_.test(s[l])){s=s.slice(0,l);break}}return Ne.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${i.number}.`)}var tDe=Ne.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"}}),nDe=[yu,Jh.low(X$e),tDe],z3=class{constructor(e,n,i){this.state=e,this.pos=n,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let n=ui(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),o=r.search(Wie(e,!1));return o<0?null:{from:i+o,to:this.pos,text:r.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}};function dq(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function iDe(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let o=1;otypeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:iDe(e);return r=>{let o=r.matchBefore(i);return o||r.explicit?{from:o?o.from:r.pos,options:e,validFor:n}:null}}function rDe(t,e){return n=>{for(let i=ui(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}var Q3=class{constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}};function bu(t){return t.selection.main.from}function Wie(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",o=i[i.length-1]!="$";return!r&&!o?t:new RegExp(`${r?"^":""}(?:${i})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}var Bie=as.define();function oDe(t,e,n,i){let{main:r}=t.selection,o=n-r.from,a=i-r.from;return Object.assign(Object.assign({},t.changeByRange(s=>s!=r&&n!=i&&t.sliceDoc(s.from+o,s.from+a)!=t.sliceDoc(n,i)?{range:s}:{changes:{from:s.from+o,to:i==r.from?s.to:s.from+a,insert:e},range:ye.cursor(s.from+o+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}var uq=new WeakMap;function aDe(t){if(!Array.isArray(t))return t;let e=uq.get(t);return e||uq.set(t,e=Qie(t)),e}var W3=kt.define(),Lb=kt.define(),s7=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&T<=57||T>=97&&T<=122?2:T>=65&&T<=90?1:0:(M=A$(T))!=M.toLowerCase()?1:M!=M.toUpperCase()?2:0;(!O||I==1&&x||E==0&&I!=0)&&(n[f]==T||i[f]==T&&(h=!0)?a[f++]=O:a.length&&(_=!1)),E=I,O+=Va(T)}return f==l&&a[0]==0&&_?this.result(-100+(h?-200:0),a,e):g==l&&m==0?this.ret(-200-e.length+(b==e.length?0:-100),[0,b]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):g==l?this.ret(-900-e.length,[m,b]):f==l?this.result(-100+(h?-200:0)+-700+(_?0:-1100),a,e):n.length==2?!1:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],o=0;for(let a of n){let s=a+(this.astral?Va(xr(i,a)):1);o&&r[o-1]==a?r[o-1]=s:(r[o++]=a,r[o++]=s)}return this.ret(e-i.length,r)}},Or=He.define({combine(t){return Gl(t,{activateOnTyping:!0,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:sDe,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>fq(e(i),n(i)),optionClass:(e,n)=>i=>fq(e(i),n(i)),addToOptions:(e,n)=>e.concat(n)})}});function fq(t,e){return t?e?t+" "+e:t:e}function sDe(t,e,n,i,r,o){let a=t.textDirection==An.RTL,s=a,l=!1,c="top",d,f,h=e.left-r.left,g=r.right-e.right,m=i.right-i.left,b=i.bottom-i.top;if(s&&h=b||O>e.top?d=n.bottom-e.top:(c="bottom",d=e.bottom-n.top)}let x=(e.bottom-e.top)/o.offsetHeight,_=(e.right-e.left)/o.offsetWidth;return{style:`${c}: ${d/x}px; max-width: ${f/_}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":s?"left":"right")}}function lDe(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r,o){let a=document.createElement("span");a.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let c=0;cl&&a.appendChild(document.createTextNode(s.slice(l,d)));let h=a.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(s.slice(d,f))),h.className="cm-completionMatchedText",l=f}return ln.position-i.position).map(n=>n.render)}function v8(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}var l7=class{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:o,selected:a}=r.open,s=e.state.facet(Or);this.optionContent=lDe(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=v8(o.length,a,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(n).open;for(let d=l.target,f;d&&d!=this.dom;d=d.parentNode)if(d.nodeName=="LI"&&(f=/-(\d+)$/.exec(d.id))&&+f[1]{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(Or).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:Lb.of(null)})}),this.showOptions(o,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:o,selected:a,disabled:s}=i.open;(!r.open||r.open.options!=o)&&(this.range=v8(o.length,a,e.state.facet(Or).maxRenderedOptions),this.showOptions(o,i.id)),this.updateSel(),s!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=v8(n.options.length,n.selected,this.view.state.facet(Or).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:r}=i;if(!r)return;let o=typeof r=="string"?document.createTextNode(r):r(i);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,i)}).catch(a=>ns(this.view.state,a,"completion info")):this.addInfoPane(o,i)}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:o}=e;i.appendChild(r),this.infoDestroy=o||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return n&&dDe(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),o=this.space;if(!o){let a=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:a.innerWidth,bottom:a.innerHeight}}return r.top>Math.min(o.bottom,n.bottom)-10||r.bottomi.from||i.from==0))if(o=h,typeof c!="string"&&c.header)r.appendChild(c.header(c));else{let g=r.appendChild(document.createElement("completion-section"));g.textContent=h}}let d=r.appendChild(document.createElement("li"));d.id=n+"-"+a,d.setAttribute("role","option");let f=this.optionClass(s);f&&(d.className=f);for(let h of this.optionContent){let g=h(s,this.view.state,this.view,l);g&&d.appendChild(g)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.tonew l7(n,t,e)}function dDe(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.topn.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function hq(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function uDe(t,e){let n=[],i=null,r=l=>{n.push(l);let{section:c}=l.completion;if(c){i||(i=[]);let d=typeof c=="string"?c:c.name;i.some(f=>f.name==d)||i.push(typeof c=="string"?{name:d}:c)}};for(let l of t)if(l.hasResult()){let c=l.result.getMatch;if(l.result.filter===!1)for(let d of l.result.options)r(new Q3(d,l.source,c?c(d):[],1e9-n.length));else{let d=new s7(e.sliceDoc(l.from,l.to));for(let f of l.result.options)if(d.match(f.label)){let h=f.displayLabel?c?c(f,d.matched):[]:d.matched;r(new Q3(f,l.source,h,d.score+(f.boost||0)))}}}if(i){let l=Object.create(null),c=0,d=(f,h)=>{var g,m;return((g=f.rank)!==null&&g!==void 0?g:1e9)-((m=h.rank)!==null&&m!==void 0?m:1e9)||(f.named.score-c.score||s(c.completion,d.completion))){let c=l.completion;!a||a.label!=c.label||a.detail!=c.detail||a.type!=null&&c.type!=null&&a.type!=c.type||a.apply!=c.apply||a.boost!=c.boost?o.push(l):hq(l.completion)>hq(a)&&(o[o.length-1]=l),a=l.completion}return o}var c7=class t{constructor(e,n,i,r,o,a){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=o,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new t(this.options,pq(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,o){let a=uDe(e,n);if(!a.length)return r&&e.some(l=>l.state==1)?new t(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let s=n.facet(Or).selectOnOpen?0:-1;if(r&&r.selected!=s&&r.selected!=-1){let l=r.options[r.selected].completion;for(let c=0;cc.hasResult()?Math.min(l,c.from):l,1e8),create:mDe,above:o.aboveCursor},r?r.timestamp:Date.now(),s,!1)}map(e){return new t(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}},d7=class t{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new t(pDe,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(Or),r=(i.override||n.languageDataAt("autocomplete",bu(n)).map(aDe)).map(a=>(this.active.find(s=>s.source==a)||new Dc(a,this.active.some(s=>s.state!=0)?1:0)).update(e,i));r.length==this.active.length&&r.every((a,s)=>a==this.active[s])&&(r=this.active);let o=this.open;o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(a=>a.hasResult()&&e.changes.touchesRange(a.from,a.to))||!fDe(r,this.active)?o=c7.build(r,n,this.id,o,i):o&&o.disabled&&!r.some(a=>a.state==1)&&(o=null),!o&&r.every(a=>a.state!=1)&&r.some(a=>a.hasResult())&&(r=r.map(a=>a.hasResult()?new Dc(a.source,0):a));for(let a of e.effects)a.is(Zie)&&(o=o&&o.setSelected(a.value,this.id));return r==this.active&&o==this.open?this:new t(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:hDe}};function fDe(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}var pDe=[];function u7(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}var Dc=class t{constructor(e,n,i=-1){this.source=e,this.state=n,this.explicitPos=i}hasResult(){return!1}update(e,n){let i=u7(e),r=this;i?r=r.handleUserEvent(e,i,n):e.docChanged?r=r.handleChange(e):e.selection&&r.state!=0&&(r=new t(r.source,0));for(let o of e.effects)if(o.is(W3))r=new t(r.source,1,o.value?bu(e.state):-1);else if(o.is(Lb))r=new t(r.source,0);else if(o.is(Hie))for(let a of o.value)a.source==r.source&&(r=a);return r}handleUserEvent(e,n,i){return n=="delete"||!i.activateOnTyping?this.map(e.changes):new t(this.source,1)}handleChange(e){return e.changes.touchesRange(bu(e.startState))?new t(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new t(this.source,this.state,e.mapPos(this.explicitPos))}},B3=class t extends Dc{constructor(e,n,i,r,o){super(e,2,n),this.result=i,this.from=r,this.to=o}hasResult(){return!0}handleUserEvent(e,n,i){var r;let o=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),s=bu(e.state);if((this.explicitPos<0?s<=o:sa||n=="delete"&&bu(e.startState)==this.from)return new Dc(this.source,n=="input"&&i.activateOnTyping?1:0);let l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),c;return gDe(this.result.validFor,e.state,o,a)?new t(this.source,l,this.result,o,a):this.result.update&&(c=this.result.update(this.result,o,a,new z3(e.state,s,l>=0)))?new t(this.source,l,c,c.from,(r=c.to)!==null&&r!==void 0?r:bu(e.state)):new Dc(this.source,1,l)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Dc(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new t(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}};function gDe(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return typeof t=="function"?t(r,n,i,e):Wie(t,!0).test(r)}var Hie=kt.define({map(t,e){return t.map(n=>n.map(e))}}),Zie=kt.define(),pa=sr.define({create(){return d7.start()},update(t,e){return t.update(e)},provide:t=>[Q$.from(t,e=>e.tooltip),Ne.contentAttributes.from(t,e=>e.attrs)]});function qie(t,e){let n=e.completion.apply||e.completion.label,i=t.state.field(pa).active.find(r=>r.source==e.source);return i instanceof B3?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},oDe(t.state,n,i.from,i.to)),{annotations:Bie.of(e.completion)})):n(t,e.completion,i.from,i.to),!0):!1}var mDe=cDe(pa,qie);function o_(t,e="option"){return n=>{let i=n.state.field(pa,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+r*(t?1:-1):t?0:a-1;return s<0?s=e=="page"?0:a-1:s>=a&&(s=e=="page"?a-1:0),n.dispatch({effects:Zie.of(s)}),!0}}var vDe=t=>{let e=t.state.field(pa,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(pa,!1)?(t.dispatch({effects:W3.of(!0)}),!0):!1,bDe=t=>{let e=t.state.field(pa,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:Lb.of(null)}),!0)},f7=class{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}},wDe=50,kDe=1e3,xDe=Ai.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(pa).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(pa);if(!t.selectionSet&&!t.docChanged&&t.startState.field(pa)==e)return;let n=t.transactions.some(r=>(r.selection||r.docChanged)&&!u7(r));for(let r=0;rwDe&&Date.now()-o.time>kDe){for(let a of o.context.abortListeners)try{a()}catch(s){ns(this.view.state,s)}o.context.abortListeners=null,this.running.splice(r--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(r=>r.effects.some(o=>o.is(W3)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.state.facet(Or).activateOnTypingDelay;if(this.debounceUpdate=e.active.some(r=>r.state==1&&!this.running.some(o=>o.active.source==r.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let r of t.transactions)u7(r)=="input"?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(pa);for(let n of e.active)n.state==1&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=bu(e),i=new z3(e,n,t.explicitPos==n),r=new f7(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(o=>{r.context.aborted||(r.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:Lb.of(null)}),ns(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Or).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Or);for(let i=0;ia.source==r.active.source);if(o&&o.state==1)if(r.done==null){let a=new Dc(r.active.source,0);for(let s of r.updates)a=a.update(s,n);a.state!=1&&e.push(a)}else this.startQuery(o)}e.length&&this.view.dispatch({effects:Hie.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(pa,!1);if(e&&e.tooltip&&this.view.state.facet(Or).closeOnBlur){let n=e.open&&Mne(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Lb.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:W3.of(!1)}),20),this.composing=0}}}),Uie=Ne.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:'"\xB7\xB7\xB7"',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:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25CB'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25CC'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1D465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1D436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1D461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222A'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25A1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1F511}\uFE0E'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25A2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),h7=class{constructor(e,n,i,r){this.field=e,this.line=n,this.from=i,this.to=r}},p7=class t{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,_r.TrackDel),i=e.mapPos(this.to,1,_r.TrackDel);return n==null||i==null?null:new t(this.field,n,i)}},g7=class t{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],r=[n],o=e.doc.lineAt(n),a=/^\s*/.exec(o.text)[0];for(let l of this.lines){if(i.length){let c=a,d=/^\t*/.exec(l)[0].length;for(let f=0;fnew p7(l.field,r[l.line]+l.from,r[l.line]+l.to));return{text:i,ranges:s}}static parse(e){let n=[],i=[],r=[],o;for(let a of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(a);){let s=o[1]?+o[1]:null,l=o[2]||o[3]||"",c=-1;for(let d=0;d=c&&f.field++}r.push(new h7(c,i.length,o.index,o.index+l.length)),a=a.slice(0,o.index)+l+a.slice(o.index+o[0].length)}for(let s;s=/\\([{}])/.exec(a);){a=a.slice(0,s.index)+s[1]+a.slice(s.index+s[0].length);for(let l of r)l.line==i.length&&l.from>s.index&&(l.from--,l.to--)}i.push(a)}return new t(i,r)}},_De=ot.widget({widget:new class extends ss{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),ODe=ot.mark({class:"cm-snippetField"}),Am=class t{constructor(e,n){this.ranges=e,this.active=n,this.deco=ot.set(e.map(i=>(i.from==i.to?_De:ODe).range(i.from,i.to)))}map(e){let n=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;n.push(r)}return new t(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}},rk=kt.define({map(t,e){return t&&t.map(e)}}),SDe=kt.define(),jb=sr.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(rk))return n.value;if(n.is(SDe)&&t)return new Am(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Ne.decorations.from(t,e=>e?e.deco:ot.none)});function tD(t,e){return ye.create(t.filter(n=>n.field==e).map(n=>ye.range(n.from,n.to)))}function CDe(t){let e=g7.parse(t);return(n,i,r,o)=>{let{text:a,ranges:s}=e.instantiate(n.state,r),l={changes:{from:r,to:o,insert:Vt.of(a)},scrollIntoView:!0,annotations:i?[Bie.of(i),ko.userEvent.of("input.complete")]:void 0};if(s.length&&(l.selection=tD(s,0)),s.some(c=>c.field>0)){let c=new Am(s,0),d=l.effects=[rk.of(c)];n.state.field(jb,!1)===void 0&&d.push(kt.appendConfig.of([jb,PDe,ADe,Uie]))}n.dispatch(n.state.update(l))}}function Vie(t){return({state:e,dispatch:n})=>{let i=e.field(jb,!1);if(!i||t<0&&i.active==0)return!1;let r=i.active+t,o=t>0&&!i.ranges.some(a=>a.field==r+t);return n(e.update({selection:tD(i.ranges,r),effects:rk.of(o?null:new Am(i.ranges,r)),scrollIntoView:!0})),!0}}var EDe=({state:t,dispatch:e})=>t.field(jb,!1)?(e(t.update({effects:rk.of(null)})),!0):!1,TDe=Vie(1),MDe=Vie(-1),NDe=[{key:"Tab",run:TDe,shift:MDe},{key:"Escape",run:EDe}],gq=He.define({combine(t){return t.length?t[0]:NDe}}),PDe=Jh.highest(Hc.compute([gq],t=>t.facet(gq)));function zo(t,e){return Object.assign(Object.assign({},e),{apply:CDe(t)})}var ADe=Ne.domEventHandlers({mousedown(t,e){let n=e.state.field(jb,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=n.ranges.find(o=>o.from<=i&&o.to>=i);return!r||r.field==n.active?!1:(e.dispatch({selection:tD(n.ranges,r.field),effects:rk.of(n.ranges.some(o=>o.field>r.field)?new Am(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),Rb={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Gf=kt.define({map(t,e){return e.mapPos(t,-1,_r.TrackAfter)??void 0}}),nD=new class extends Wc{};nD.startSide=1;nD.endSide=-1;var Yie=sr.define({create(){return yn.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of e.effects)n.is(Gf)&&(t=t.update({add:[nD.range(n.value,n.value+1)]}));return t}});function Xie(){return[DDe,Yie]}var y8="()[]{}<>";function Gie(t){for(let e=0;e{if(($De?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(i.length>2||i.length==2&&Va(xr(i,0))==1||e!=r.from||n!=r.to)return!1;let o=LDe(t.state,i);return o?(t.dispatch(o),!0):!1}),IDe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Kie(t,t.selection.main.head).brackets||Rb.brackets,i=null,r=t.changeByRange(o=>{if(o.empty){let a=jDe(t.doc,o.head);for(let s of n)if(s==a&&R4(t.doc,o.head)==Gie(xr(s,0)))return{changes:{from:o.head-s.length,to:o.head+s.length},range:ye.cursor(o.head-s.length)}}return{range:i=o}});return i||e(t.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},Jie=[{key:"Backspace",run:IDe}];function LDe(t,e){let n=Kie(t,t.selection.main.head),i=n.brackets||Rb.brackets;for(let r of i){let o=Gie(xr(r,0));if(e==r)return o==r?zDe(t,r,i.indexOf(r+r+r)>-1,n):RDe(t,r,o,n.before||Rb.before);if(e==o&&ere(t,t.selection.main.from))return FDe(t,r,o)}return null}function ere(t,e){let n=!1;return t.field(Yie).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function R4(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Va(xr(n,0)))}function jDe(t,e){let n=t.sliceString(e-2,e);return Va(xr(n,0))==n.length?n:n.slice(1)}function RDe(t,e,n,i){let r=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:Gf.of(a.to+e.length),range:ye.range(a.anchor+e.length,a.head+e.length)};let s=R4(t.doc,a.head);return!s||/\s/.test(s)||i.indexOf(s)>-1?{changes:{insert:e+n,from:a.head},effects:Gf.of(a.head+e.length),range:ye.cursor(a.head+e.length)}:{range:r=a}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function FDe(t,e,n){let i=null,r=t.changeByRange(o=>o.empty&&R4(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:ye.cursor(o.head+n.length)}:i={range:o});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function zDe(t,e,n,i){let r=i.stringPrefixes||Rb.stringPrefixes,o=null,a=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:Gf.of(s.to+e.length),range:ye.range(s.anchor+e.length,s.head+e.length)};let l=s.head,c=R4(t.doc,l),d;if(c==e){if(mq(t,l))return{changes:{insert:e+e,from:l},effects:Gf.of(l+e.length),range:ye.cursor(l+e.length)};if(ere(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:ye.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(d=vq(t,l-2*e.length,r))>-1&&mq(t,d))return{changes:{insert:e+e+e+e,from:l},effects:Gf.of(l+e.length),range:ye.cursor(l+e.length)};if(t.charCategorizer(l)(c)!=zn.Word&&vq(t,l,r)>-1&&!QDe(t,l,e,r))return{changes:{insert:e+e,from:l},effects:Gf.of(l+e.length),range:ye.cursor(l+e.length)}}return{range:o=s}});return o?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function mq(t,e){let n=ui(t).resolveInner(e+1);return n.parent&&n.from==e}function QDe(t,e,n,i){let r=ui(t).resolveInner(e,-1),o=i.reduce((a,s)=>Math.max(a,s.length),0);for(let a=0;a<5;a++){let s=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+o)),l=s.indexOf(n);if(!l||l>-1&&i.indexOf(s.slice(0,l))>-1){let d=r.firstChild;for(;d&&d.from==r.from&&d.to-d.from>n.length+l;){if(t.sliceDoc(d.to-n.length,d.to)==n)return!1;d=d.firstChild}return!0}let c=r.to==e&&r.parent;if(!c)break;r=c}return!1}function vq(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=zn.Word)return e;for(let r of n){let o=e-r.length;if(t.sliceDoc(o,e)==r&&i(t.sliceDoc(o-1,o))!=zn.Word)return o}return-1}function WDe(t={}){return[pa,Or.of(t),xDe,BDe,Uie]}var tre=[{key:"Ctrl-Space",run:yDe},{key:"Escape",run:bDe},{key:"ArrowDown",run:o_(!0)},{key:"ArrowUp",run:o_(!1)},{key:"PageDown",run:o_(!0,"page")},{key:"PageUp",run:o_(!1,"page")},{key:"Enter",run:vDe}],BDe=Jh.highest(Hc.computeN([Or],t=>t.facet(Or).defaultKeymap?[tre]:[])),m7=class{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}},Bf=class t{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let r=e,o=i.facet(rre).markerFilter;o&&(r=o(r));let a=ot.set(r.map(s=>s.from==s.to||s.from==s.to-1&&i.doc.lineAt(s.from).to==s.from?ot.widget({widget:new v7(s),diagnostic:s}).range(s.from):ot.mark({attributes:{class:"cm-lintRange cm-lintRange-"+s.severity+(s.markClass?" "+s.markClass:"")},diagnostic:s}).range(s.from,s.to)),!0);return new t(a,n,$m(a))}};function $m(t,e=null,n=0){let i=null;return t.between(n,1e9,(r,o,{spec:a})=>{if(!(e&&a.diagnostic!=e))return i=new m7(r,o,a.diagnostic),!1}),i}function HDe(t,e){let n=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(i=>i.is(nre))||t.changes.touchesRange(n.from,n.to))}function ZDe(t,e){return t.field(ka,!1)?e:e.concat(kt.appendConfig.of(eIe))}var nre=kt.define(),iD=kt.define(),ire=kt.define(),ka=sr.define({create(){return new Bf(ot.none,null,null)},update(t,e){if(e.docChanged){let n=t.diagnostics.map(e.changes),i=null;if(t.selected){let r=e.changes.mapPos(t.selected.from,1);i=$m(n,t.selected.diagnostic,r)||$m(n,null,r)}t=new Bf(n,t.panel,i)}for(let n of e.effects)n.is(nre)?t=Bf.init(n.value,t.panel,e.state):n.is(iD)?t=new Bf(t.diagnostics,n.value?Z3.open:null,t.selected):n.is(ire)&&(t=new Bf(t.diagnostics,t.panel,n.value));return t},provide:t=>[Mb.from(t,e=>e.panel),Ne.decorations.from(t,e=>e.diagnostics)]}),qDe=ot.mark({class:"cm-lintRange cm-lintRange-active"});function UDe(t,e,n){let{diagnostics:i}=t.state.field(ka),r=[],o=2e8,a=0;i.between(e-(n<0?1:0),e+(n>0?1:0),(l,c,{spec:d})=>{e>=l&&e<=c&&(l==c||(e>l||n>0)&&(eare(t,n,!1)))}var YDe=t=>{let e=t.state.field(ka,!1);(!e||!e.panel)&&t.dispatch({effects:ZDe(t.state,[iD.of(!0)])});let n=Tb(t,Z3.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},yq=t=>{let e=t.state.field(ka,!1);return!e||!e.panel?!1:(t.dispatch({effects:iD.of(!1)}),!0)},XDe=t=>{let e=t.state.field(ka,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},GDe=[{key:"Mod-Shift-m",run:YDe,preventDefault:!0},{key:"F8",run:XDe}],rre=He.define({combine(t){return Object.assign({sources:t.map(e=>e.source)},Gl(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n}))}});function ore(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;io.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function are(t,e,n){var i;let r=n?ore(e.actions):[];return dn("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},dn("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(i=e.actions)===null||i===void 0?void 0:i.map((o,a)=>{let s=!1,l=h=>{if(h.preventDefault(),s)return;s=!0;let g=$m(t.state.field(ka).diagnostics,e);g&&o.apply(t,g.from,g.to)},{name:c}=o,d=r[a]?c.indexOf(r[a]):-1,f=d<0?c:[c.slice(0,d),dn("u",c.slice(d,d+1)),c.slice(d+1)];return dn("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${c}${d<0?"":` (access key "${r[a]})"`}.`},f)}),e.source&&dn("div",{class:"cm-diagnosticSource"},e.source))}var v7=class extends ss{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return dn("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}},H3=class{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=are(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}},Z3=class t{constructor(e){this.view=e,this.items=[];let n=r=>{if(r.keyCode==27)yq(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],a=ore(o.actions);for(let s=0;s{for(let o=0;oyq(this.view)},"\xD7")),this.update()}get selectedIndex(){let e=this.view.state.field(ka).selected;if(!e)return-1;for(let n=0;n{let c=-1,d;for(let f=i;fi&&(this.items.splice(i,c-i),r=!0)),n&&d.diagnostic==n.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),o=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),i++});i({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:s})=>{let l=s.height/this.list.offsetHeight;a.tops.bottom&&(this.list.scrollTop+=(a.bottom-s.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(ka),i=$m(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:ire.of(i)})}static open(e){return new t(e)}};function KDe(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function a_(t){return KDe(``,'width="6" height="3"')}var JDe=Ne.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:a_("#d11")},".cm-lintRange-warning":{backgroundImage:a_("orange")},".cm-lintRange-info":{backgroundImage:a_("#999")},".cm-lintRange-hint":{backgroundImage:a_("#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}}}),eIe=[ka,Ne.decorations.compute([ka],t=>{let{selected:e,panel:n}=t.field(ka);return!e||!n||e.from==e.to?ot.none:ot.set([qDe.range(e.from,e.to)])}),pPe(UDe,{hideOn:HDe}),JDe],bq=function(t){t===void 0&&(t={});var{crosshairCursor:e=!1}=t,n=[];t.closeBracketsKeymap!==!1&&(n=n.concat(Jie)),t.defaultKeymap!==!1&&(n=n.concat(Die)),t.searchKeymap!==!1&&(n=n.concat(eDe)),t.historyKeymap!==!1&&(n=n.concat(sie)),t.foldKeymap!==!1&&(n=n.concat(sAe)),t.completionKeymap!==!1&&(n=n.concat(tre)),t.lintKeymap!==!1&&(n=n.concat(GDe));var i=[];return t.lineNumbers!==!1&&i.push(W$()),t.highlightActiveLineGutter!==!1&&i.push(OPe()),t.highlightSpecialChars!==!1&&i.push(Tne()),t.history!==!1&&i.push($4()),t.foldGutter!==!1&&i.push(dAe()),t.drawSelection!==!1&&i.push(Sne()),t.dropCursor!==!1&&i.push(W7e()),t.allowMultipleSelections!==!1&&i.push(mn.allowMultipleSelections.of(!0)),t.indentOnInput!==!1&&i.push(KPe()),t.syntaxHighlighting!==!1&&i.push(tk(Xne,{fallback:!0})),t.bracketMatching!==!1&&i.push(bAe()),t.closeBrackets!==!1&&i.push(Xie()),t.autocompletion!==!1&&i.push(WDe()),t.rectangularSelection!==!1&&i.push(rPe()),e!==!1&&i.push(sPe()),t.highlightActiveLine!==!1&&i.push(X7e()),t.highlightSelectionMatches!==!1&&i.push(j$e()),t.tabSize&&typeof t.tabSize=="number"&&i.push(Jw.of(" ".repeat(t.tabSize))),i.concat([Hc.of(n.flat())]).filter(Boolean)},sre=function(t){t===void 0&&(t={});var e=[];t.defaultKeymap!==!1&&(e=e.concat(Die)),t.historyKeymap!==!1&&(e=e.concat(sie));var n=[];return t.highlightSpecialChars!==!1&&n.push(Tne()),t.history!==!1&&n.push($4()),t.drawSelection!==!1&&n.push(Sne()),t.syntaxHighlighting!==!1&&n.push(tk(Xne,{fallback:!0})),n.concat([Hc.of(e.flat())]).filter(Boolean)},tIe="#e5c07b",wq="#e06c75",nIe="#56b6c2",iIe="#ffffff",H_="#abb2bf",y7="#7d8799",rIe="#61afef",oIe="#98c379",kq="#d19a66",aIe="#c678dd",sIe="#21252b",xq="#2c313a",_q="#282c34",b8="#353a42",lIe="#3E4451",Oq="#528bff",cIe=Ne.theme({"&":{color:H_,backgroundColor:_q},".cm-content":{caretColor:Oq},".cm-cursor, .cm-dropCursor":{borderLeftColor:Oq},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:lIe},".cm-panels":{backgroundColor:sIe,color:H_},".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:_q,color:y7,border:"none"},".cm-activeLineGutter":{backgroundColor:xq},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:b8},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:b8,borderBottomColor:b8},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:xq,color:H_}}},{dark:!0}),dIe=Zc.define([{tag:Y.keyword,color:aIe},{tag:[Y.name,Y.deleted,Y.character,Y.propertyName,Y.macroName],color:wq},{tag:[Y.function(Y.variableName),Y.labelName],color:rIe},{tag:[Y.color,Y.constant(Y.name),Y.standard(Y.name)],color:kq},{tag:[Y.definition(Y.name),Y.separator],color:H_},{tag:[Y.typeName,Y.className,Y.number,Y.changed,Y.annotation,Y.modifier,Y.self,Y.namespace],color:tIe},{tag:[Y.operator,Y.operatorKeyword,Y.url,Y.escape,Y.regexp,Y.link,Y.special(Y.string)],color:nIe},{tag:[Y.meta,Y.comment],color:y7},{tag:Y.strong,fontWeight:"bold"},{tag:Y.emphasis,fontStyle:"italic"},{tag:Y.strikethrough,textDecoration:"line-through"},{tag:Y.link,color:y7,textDecoration:"underline"},{tag:Y.heading,fontWeight:"bold",color:wq},{tag:[Y.atom,Y.bool,Y.special(Y.variableName)],color:kq},{tag:[Y.processingInstruction,Y.string,Y.inserted],color:oIe},{tag:Y.invalid,color:iIe}]),uIe=[cIe,tk(dIe)],fIe=Ne.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),hIe=function(t){t===void 0&&(t={});var{indentWithTab:e=!0,editable:n=!0,readOnly:i=!1,theme:r="light",placeholder:o="",basicSetup:a=!0}=t,s=[];switch(e&&s.unshift(Hc.of([P$e])),a&&(typeof a=="boolean"?s.unshift(bq()):s.unshift(bq(a))),o&&s.unshift(ePe(o)),r){case"light":s.push(fIe);break;case"dark":s.push(uIe);break;case"none":break;default:s.push(r);break}return n===!1&&s.push(Ne.editable.of(!1)),i&&s.push(mn.readOnly.of(!0)),[...s]},pIe=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)}),Sq=as.define(),gIe=[];function mIe(t){var{value:e,selection:n,onChange:i,onStatistics:r,onCreateEditor:o,onUpdate:a,extensions:s=gIe,autoFocus:l,theme:c="light",height:d=null,minHeight:f=null,maxHeight:h=null,width:g=null,minWidth:m=null,maxWidth:b=null,placeholder:x="",editable:_=!0,readOnly:O=!1,indentWithTab:S=!0,basicSetup:E=!0,root:T,initialState:M}=t,[I,F]=(0,N.useState)(),[W,Z]=(0,N.useState)(),[j,H]=(0,N.useState)(),X=Ne.theme({"&":{height:d,minHeight:f,maxHeight:h,width:g,minWidth:m,maxWidth:b},"& .cm-scroller":{height:"100% !important"}}),B=Ne.updateListener.of(V=>{if(V.docChanged&&typeof i=="function"&&!V.transactions.some(oe=>oe.annotation(Sq))){var K=V.state.doc,te=K.toString();i(te,V)}r&&r(pIe(V))}),R=hIe({theme:c,editable:_,readOnly:O,placeholder:x,indentWithTab:S,basicSetup:E}),U=[B,X,...R];return a&&typeof a=="function"&&U.push(Ne.updateListener.of(a)),U=U.concat(s),(0,N.useEffect)(()=>{if(I&&!j){var V={doc:e,selection:n,extensions:U},K=M?mn.fromJSON(M.json,V,M.fields):mn.create(V);if(H(K),!W){var te=new Ne({state:K,parent:I,root:T});Z(te),o&&o(te,K)}}return()=>{W&&(H(void 0),Z(void 0))}},[I,j]),(0,N.useEffect)(()=>F(t.container),[t.container]),(0,N.useEffect)(()=>()=>{W&&(W.destroy(),Z(void 0))},[W]),(0,N.useEffect)(()=>{l&&W&&W.focus()},[l,W]),(0,N.useEffect)(()=>{W&&W.dispatch({effects:kt.reconfigure.of(U)})},[c,s,d,f,h,g,m,b,x,_,O,S,E,i,a]),(0,N.useEffect)(()=>{if(e!==void 0){var V=W?W.state.doc.toString():"";W&&e!==V&&W.dispatch({changes:{from:0,to:V.length,insert:e||""},annotations:[Sq.of(!0)]})}},[e,W]),{state:j,setState:H,view:W,setView:Z,container:I,setContainer:F}}var vIe=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],rD=(0,N.forwardRef)((t,e)=>{var{className:n,value:i="",selection:r,extensions:o=[],onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,autoFocus:d,theme:f="light",height:h,minHeight:g,maxHeight:m,width:b,minWidth:x,maxWidth:_,basicSetup:O,placeholder:S,indentWithTab:E,editable:T,readOnly:M,root:I,initialState:F}=t,W=eNe(t,vIe),Z=(0,N.useRef)(null),{state:j,view:H,container:X}=mIe({container:Z.current,root:I,value:i,autoFocus:d,theme:f,height:h,minHeight:g,maxHeight:m,width:b,minWidth:x,maxWidth:_,basicSetup:O,placeholder:S,indentWithTab:E,editable:T,readOnly:M,selection:r,onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,extensions:o,initialState:F});if((0,N.useImperativeHandle)(e,()=>({editor:Z.current,state:j,view:H}),[Z,X,j,H]),typeof i!="string")throw new Error("value must be typeof string but got "+typeof i);var B=typeof f=="string"?"cm-theme-"+f:"cm-theme";return w.jsx("div",T9({ref:Z,className:""+B+(n?" "+n:"")},W))});rD.displayName="CodeMirror";function ep({children:t,to:e,className:n,...i}){let{darkMode:r}=N.default.useContext(ut),o=e||document.body;if(!o)return t;function a(s){s.stopPropagation()}return(0,u0.createPortal)(w.jsx("div",{className:"koenig-lexical",style:{width:"fit-content"},"data-kg-portal":!0,onMouseDown:a,...i,children:w.jsx("div",{className:`${r?"dark":""} ${n||""}`,children:t})}),o)}var yIe=[{id:"people",emojis:["grinning","smiley","smile","grin","laughing","sweat_smile","rolling_on_the_floor_laughing","joy","slightly_smiling_face","upside_down_face","melting_face","wink","blush","innocent","smiling_face_with_3_hearts","heart_eyes","star-struck","kissing_heart","kissing","relaxed","kissing_closed_eyes","kissing_smiling_eyes","smiling_face_with_tear","yum","stuck_out_tongue","stuck_out_tongue_winking_eye","zany_face","stuck_out_tongue_closed_eyes","money_mouth_face","hugging_face","face_with_hand_over_mouth","face_with_open_eyes_and_hand_over_mouth","face_with_peeking_eye","shushing_face","thinking_face","saluting_face","zipper_mouth_face","face_with_raised_eyebrow","neutral_face","expressionless","no_mouth","dotted_line_face","face_in_clouds","smirk","unamused","face_with_rolling_eyes","grimacing","face_exhaling","lying_face","shaking_face","relieved","pensive","sleepy","drooling_face","sleeping","mask","face_with_thermometer","face_with_head_bandage","nauseated_face","face_vomiting","sneezing_face","hot_face","cold_face","woozy_face","dizzy_face","face_with_spiral_eyes","exploding_head","face_with_cowboy_hat","partying_face","disguised_face","sunglasses","nerd_face","face_with_monocle","confused","face_with_diagonal_mouth","worried","slightly_frowning_face","white_frowning_face","open_mouth","hushed","astonished","flushed","pleading_face","face_holding_back_tears","frowning","anguished","fearful","cold_sweat","disappointed_relieved","cry","sob","scream","confounded","persevere","disappointed","sweat","weary","tired_face","yawning_face","triumph","rage","angry","face_with_symbols_on_mouth","smiling_imp","imp","skull","skull_and_crossbones","hankey","clown_face","japanese_ogre","japanese_goblin","ghost","alien","space_invader","wave","raised_back_of_hand","raised_hand_with_fingers_splayed","hand","spock-hand","rightwards_hand","leftwards_hand","palm_down_hand","palm_up_hand","leftwards_pushing_hand","rightwards_pushing_hand","ok_hand","pinched_fingers","pinching_hand","v","crossed_fingers","hand_with_index_finger_and_thumb_crossed","i_love_you_hand_sign","the_horns","call_me_hand","point_left","point_right","point_up_2","middle_finger","point_down","point_up","index_pointing_at_the_viewer","+1","-1","fist","facepunch","left-facing_fist","right-facing_fist","clap","raised_hands","heart_hands","open_hands","palms_up_together","handshake","pray","writing_hand","nail_care","selfie","muscle","mechanical_arm","mechanical_leg","leg","foot","ear","ear_with_hearing_aid","nose","brain","anatomical_heart","lungs","tooth","bone","eyes","eye","tongue","lips","biting_lip","baby","child","boy","girl","adult","person_with_blond_hair","man","bearded_person","man_with_beard","woman_with_beard","red_haired_man","curly_haired_man","white_haired_man","bald_man","woman","red_haired_woman","red_haired_person","curly_haired_woman","curly_haired_person","white_haired_woman","white_haired_person","bald_woman","bald_person","blond-haired-woman","blond-haired-man","older_adult","older_man","older_woman","person_frowning","man-frowning","woman-frowning","person_with_pouting_face","man-pouting","woman-pouting","no_good","man-gesturing-no","woman-gesturing-no","ok_woman","man-gesturing-ok","woman-gesturing-ok","information_desk_person","man-tipping-hand","woman-tipping-hand","raising_hand","man-raising-hand","woman-raising-hand","deaf_person","deaf_man","deaf_woman","bow","man-bowing","woman-bowing","face_palm","man-facepalming","woman-facepalming","shrug","man-shrugging","woman-shrugging","health_worker","male-doctor","female-doctor","student","male-student","female-student","teacher","male-teacher","female-teacher","judge","male-judge","female-judge","farmer","male-farmer","female-farmer","cook","male-cook","female-cook","mechanic","male-mechanic","female-mechanic","factory_worker","male-factory-worker","female-factory-worker","office_worker","male-office-worker","female-office-worker","scientist","male-scientist","female-scientist","technologist","male-technologist","female-technologist","singer","male-singer","female-singer","artist","male-artist","female-artist","pilot","male-pilot","female-pilot","astronaut","male-astronaut","female-astronaut","firefighter","male-firefighter","female-firefighter","cop","male-police-officer","female-police-officer","sleuth_or_spy","male-detective","female-detective","guardsman","male-guard","female-guard","ninja","construction_worker","male-construction-worker","female-construction-worker","person_with_crown","prince","princess","man_with_turban","man-wearing-turban","woman-wearing-turban","man_with_gua_pi_mao","person_with_headscarf","person_in_tuxedo","man_in_tuxedo","woman_in_tuxedo","bride_with_veil","man_with_veil","woman_with_veil","pregnant_woman","pregnant_man","pregnant_person","breast-feeding","woman_feeding_baby","man_feeding_baby","person_feeding_baby","angel","santa","mrs_claus","mx_claus","superhero","male_superhero","female_superhero","supervillain","male_supervillain","female_supervillain","mage","male_mage","female_mage","fairy","male_fairy","female_fairy","vampire","male_vampire","female_vampire","merperson","merman","mermaid","elf","male_elf","female_elf","genie","male_genie","female_genie","zombie","male_zombie","female_zombie","troll","massage","man-getting-massage","woman-getting-massage","haircut","man-getting-haircut","woman-getting-haircut","walking","man-walking","woman-walking","standing_person","man_standing","woman_standing","kneeling_person","man_kneeling","woman_kneeling","person_with_probing_cane","man_with_probing_cane","woman_with_probing_cane","person_in_motorized_wheelchair","man_in_motorized_wheelchair","woman_in_motorized_wheelchair","person_in_manual_wheelchair","man_in_manual_wheelchair","woman_in_manual_wheelchair","runner","man-running","woman-running","dancer","man_dancing","man_in_business_suit_levitating","dancers","men-with-bunny-ears-partying","women-with-bunny-ears-partying","person_in_steamy_room","man_in_steamy_room","woman_in_steamy_room","person_climbing","man_climbing","woman_climbing","fencer","horse_racing","skier","snowboarder","golfer","man-golfing","woman-golfing","surfer","man-surfing","woman-surfing","rowboat","man-rowing-boat","woman-rowing-boat","swimmer","man-swimming","woman-swimming","person_with_ball","man-bouncing-ball","woman-bouncing-ball","weight_lifter","man-lifting-weights","woman-lifting-weights","bicyclist","man-biking","woman-biking","mountain_bicyclist","man-mountain-biking","woman-mountain-biking","person_doing_cartwheel","man-cartwheeling","woman-cartwheeling","wrestlers","man-wrestling","woman-wrestling","water_polo","man-playing-water-polo","woman-playing-water-polo","handball","man-playing-handball","woman-playing-handball","juggling","man-juggling","woman-juggling","person_in_lotus_position","man_in_lotus_position","woman_in_lotus_position","bath","sleeping_accommodation","people_holding_hands","two_women_holding_hands","man_and_woman_holding_hands","two_men_holding_hands","couplekiss","woman-kiss-man","man-kiss-man","woman-kiss-woman","couple_with_heart","woman-heart-man","man-heart-man","woman-heart-woman","family","man-woman-boy","man-woman-girl","man-woman-girl-boy","man-woman-boy-boy","man-woman-girl-girl","man-man-boy","man-man-girl","man-man-girl-boy","man-man-boy-boy","man-man-girl-girl","woman-woman-boy","woman-woman-girl","woman-woman-girl-boy","woman-woman-boy-boy","woman-woman-girl-girl","man-boy","man-boy-boy","man-girl","man-girl-boy","man-girl-girl","woman-boy","woman-boy-boy","woman-girl","woman-girl-boy","woman-girl-girl","speaking_head_in_silhouette","bust_in_silhouette","busts_in_silhouette","people_hugging","footprints","robot_face","smiley_cat","smile_cat","joy_cat","heart_eyes_cat","smirk_cat","kissing_cat","scream_cat","crying_cat_face","pouting_cat","see_no_evil","hear_no_evil","speak_no_evil","love_letter","cupid","gift_heart","sparkling_heart","heartpulse","heartbeat","revolving_hearts","two_hearts","heart_decoration","heavy_heart_exclamation_mark_ornament","broken_heart","heart_on_fire","mending_heart","heart","pink_heart","orange_heart","yellow_heart","green_heart","blue_heart","light_blue_heart","purple_heart","brown_heart","black_heart","grey_heart","white_heart","kiss","100","anger","boom","dizzy","sweat_drops","dash","hole","speech_balloon","eye-in-speech-bubble","left_speech_bubble","right_anger_bubble","thought_balloon","zzz"]},{id:"nature",emojis:["monkey_face","monkey","gorilla","orangutan","dog","dog2","guide_dog","service_dog","poodle","wolf","fox_face","raccoon","cat","cat2","black_cat","lion_face","tiger","tiger2","leopard","horse","moose","donkey","racehorse","unicorn_face","zebra_face","deer","bison","cow","ox","water_buffalo","cow2","pig","pig2","boar","pig_nose","ram","sheep","goat","dromedary_camel","camel","llama","giraffe_face","elephant","mammoth","rhinoceros","hippopotamus","mouse","mouse2","rat","hamster","rabbit","rabbit2","chipmunk","beaver","hedgehog","bat","bear","polar_bear","koala","panda_face","sloth","otter","skunk","kangaroo","badger","feet","turkey","chicken","rooster","hatching_chick","baby_chick","hatched_chick","bird","penguin","dove_of_peace","eagle","duck","swan","owl","dodo","feather","flamingo","peacock","parrot","wing","black_bird","goose","frog","crocodile","turtle","lizard","snake","dragon_face","dragon","sauropod","t-rex","whale","whale2","dolphin","seal","fish","tropical_fish","blowfish","shark","octopus","shell","coral","jellyfish","snail","butterfly","bug","ant","bee","beetle","ladybug","cricket","cockroach","spider","spider_web","scorpion","mosquito","fly","worm","microbe","bouquet","cherry_blossom","white_flower","lotus","rosette","rose","wilted_flower","hibiscus","sunflower","blossom","tulip","hyacinth","seedling","potted_plant","evergreen_tree","deciduous_tree","palm_tree","cactus","ear_of_rice","herb","shamrock","four_leaf_clover","maple_leaf","fallen_leaf","leaves","empty_nest","nest_with_eggs","mushroom"]},{id:"foods",emojis:["grapes","melon","watermelon","tangerine","lemon","banana","pineapple","mango","apple","green_apple","pear","peach","cherries","strawberry","blueberries","kiwifruit","tomato","olive","coconut","avocado","eggplant","potato","carrot","corn","hot_pepper","bell_pepper","cucumber","leafy_green","broccoli","garlic","onion","peanuts","beans","chestnut","ginger_root","pea_pod","bread","croissant","baguette_bread","flatbread","pretzel","bagel","pancakes","waffle","cheese_wedge","meat_on_bone","poultry_leg","cut_of_meat","bacon","hamburger","fries","pizza","hotdog","sandwich","taco","burrito","tamale","stuffed_flatbread","falafel","egg","fried_egg","shallow_pan_of_food","stew","fondue","bowl_with_spoon","green_salad","popcorn","butter","salt","canned_food","bento","rice_cracker","rice_ball","rice","curry","ramen","spaghetti","sweet_potato","oden","sushi","fried_shrimp","fish_cake","moon_cake","dango","dumpling","fortune_cookie","takeout_box","crab","lobster","shrimp","squid","oyster","icecream","shaved_ice","ice_cream","doughnut","cookie","birthday","cake","cupcake","pie","chocolate_bar","candy","lollipop","custard","honey_pot","baby_bottle","glass_of_milk","coffee","teapot","tea","sake","champagne","wine_glass","cocktail","tropical_drink","beer","beers","clinking_glasses","tumbler_glass","pouring_liquid","cup_with_straw","bubble_tea","beverage_box","mate_drink","ice_cube","chopsticks","knife_fork_plate","fork_and_knife","spoon","hocho","jar","amphora"]},{id:"activity",emojis:["jack_o_lantern","christmas_tree","fireworks","sparkler","firecracker","sparkles","balloon","tada","confetti_ball","tanabata_tree","bamboo","dolls","flags","wind_chime","rice_scene","red_envelope","ribbon","gift","reminder_ribbon","admission_tickets","ticket","medal","trophy","sports_medal","first_place_medal","second_place_medal","third_place_medal","soccer","baseball","softball","basketball","volleyball","football","rugby_football","tennis","flying_disc","bowling","cricket_bat_and_ball","field_hockey_stick_and_ball","ice_hockey_stick_and_puck","lacrosse","table_tennis_paddle_and_ball","badminton_racquet_and_shuttlecock","boxing_glove","martial_arts_uniform","goal_net","golf","ice_skate","fishing_pole_and_fish","diving_mask","running_shirt_with_sash","ski","sled","curling_stone","dart","yo-yo","kite","gun","8ball","crystal_ball","magic_wand","video_game","joystick","slot_machine","game_die","jigsaw","teddy_bear","pinata","mirror_ball","nesting_dolls","spades","hearts","diamonds","clubs","chess_pawn","black_joker","mahjong","flower_playing_cards","performing_arts","frame_with_picture","art","thread","sewing_needle","yarn","knot"]},{id:"places",emojis:["earth_africa","earth_americas","earth_asia","globe_with_meridians","world_map","japan","compass","snow_capped_mountain","mountain","volcano","mount_fuji","camping","beach_with_umbrella","desert","desert_island","national_park","stadium","classical_building","building_construction","bricks","rock","wood","hut","house_buildings","derelict_house_building","house","house_with_garden","office","post_office","european_post_office","hospital","bank","hotel","love_hotel","convenience_store","school","department_store","factory","japanese_castle","european_castle","wedding","tokyo_tower","statue_of_liberty","church","mosque","hindu_temple","synagogue","shinto_shrine","kaaba","fountain","tent","foggy","night_with_stars","cityscape","sunrise_over_mountains","sunrise","city_sunset","city_sunrise","bridge_at_night","hotsprings","carousel_horse","playground_slide","ferris_wheel","roller_coaster","barber","circus_tent","steam_locomotive","railway_car","bullettrain_side","bullettrain_front","train2","metro","light_rail","station","tram","monorail","mountain_railway","train","bus","oncoming_bus","trolleybus","minibus","ambulance","fire_engine","police_car","oncoming_police_car","taxi","oncoming_taxi","car","oncoming_automobile","blue_car","pickup_truck","truck","articulated_lorry","tractor","racing_car","racing_motorcycle","motor_scooter","manual_wheelchair","motorized_wheelchair","auto_rickshaw","bike","scooter","skateboard","roller_skate","busstop","motorway","railway_track","oil_drum","fuelpump","wheel","rotating_light","traffic_light","vertical_traffic_light","octagonal_sign","construction","anchor","ring_buoy","boat","canoe","speedboat","passenger_ship","ferry","motor_boat","ship","airplane","small_airplane","airplane_departure","airplane_arriving","parachute","seat","helicopter","suspension_railway","mountain_cableway","aerial_tramway","satellite","rocket","flying_saucer","bellhop_bell","luggage","hourglass","hourglass_flowing_sand","watch","alarm_clock","stopwatch","timer_clock","mantelpiece_clock","clock12","clock1230","clock1","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","clock10","clock1030","clock11","clock1130","new_moon","waxing_crescent_moon","first_quarter_moon","moon","full_moon","waning_gibbous_moon","last_quarter_moon","waning_crescent_moon","crescent_moon","new_moon_with_face","first_quarter_moon_with_face","last_quarter_moon_with_face","thermometer","sunny","full_moon_with_face","sun_with_face","ringed_planet","star","star2","stars","milky_way","cloud","partly_sunny","thunder_cloud_and_rain","mostly_sunny","barely_sunny","partly_sunny_rain","rain_cloud","snow_cloud","lightning","tornado","fog","wind_blowing_face","cyclone","rainbow","closed_umbrella","umbrella","umbrella_with_rain_drops","umbrella_on_ground","zap","snowflake","snowman","snowman_without_snow","comet","fire","droplet","ocean"]},{id:"objects",emojis:["eyeglasses","dark_sunglasses","goggles","lab_coat","safety_vest","necktie","shirt","jeans","scarf","gloves","coat","socks","dress","kimono","sari","one-piece_swimsuit","briefs","shorts","bikini","womans_clothes","folding_hand_fan","purse","handbag","pouch","shopping_bags","school_satchel","thong_sandal","mans_shoe","athletic_shoe","hiking_boot","womans_flat_shoe","high_heel","sandal","ballet_shoes","boot","hair_pick","crown","womans_hat","tophat","mortar_board","billed_cap","military_helmet","helmet_with_white_cross","prayer_beads","lipstick","ring","gem","mute","speaker","sound","loud_sound","loudspeaker","mega","postal_horn","bell","no_bell","musical_score","musical_note","notes","studio_microphone","level_slider","control_knobs","microphone","headphones","radio","saxophone","accordion","guitar","musical_keyboard","trumpet","violin","banjo","drum_with_drumsticks","long_drum","maracas","flute","iphone","calling","phone","telephone_receiver","pager","fax","battery","low_battery","electric_plug","computer","desktop_computer","printer","keyboard","three_button_mouse","trackball","minidisc","floppy_disk","cd","dvd","abacus","movie_camera","film_frames","film_projector","clapper","tv","camera","camera_with_flash","video_camera","vhs","mag","mag_right","candle","bulb","flashlight","izakaya_lantern","diya_lamp","notebook_with_decorative_cover","closed_book","book","green_book","blue_book","orange_book","books","notebook","ledger","page_with_curl","scroll","page_facing_up","newspaper","rolled_up_newspaper","bookmark_tabs","bookmark","label","moneybag","coin","yen","dollar","euro","pound","money_with_wings","credit_card","receipt","chart","email","e-mail","incoming_envelope","envelope_with_arrow","outbox_tray","inbox_tray","package","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","postbox","ballot_box_with_ballot","pencil2","black_nib","lower_left_fountain_pen","lower_left_ballpoint_pen","lower_left_paintbrush","lower_left_crayon","memo","briefcase","file_folder","open_file_folder","card_index_dividers","date","calendar","spiral_note_pad","spiral_calendar_pad","card_index","chart_with_upwards_trend","chart_with_downwards_trend","bar_chart","clipboard","pushpin","round_pushpin","paperclip","linked_paperclips","straight_ruler","triangular_ruler","scissors","card_file_box","file_cabinet","wastebasket","lock","unlock","lock_with_ink_pen","closed_lock_with_key","key","old_key","hammer","axe","pick","hammer_and_pick","hammer_and_wrench","dagger_knife","crossed_swords","bomb","boomerang","bow_and_arrow","shield","carpentry_saw","wrench","screwdriver","nut_and_bolt","gear","compression","scales","probing_cane","link","chains","hook","toolbox","magnet","ladder","alembic","test_tube","petri_dish","dna","microscope","telescope","satellite_antenna","syringe","drop_of_blood","pill","adhesive_bandage","crutch","stethoscope","x-ray","door","elevator","mirror","window","bed","couch_and_lamp","chair","toilet","plunger","shower","bathtub","mouse_trap","razor","lotion_bottle","safety_pin","broom","basket","roll_of_paper","bucket","soap","bubbles","toothbrush","sponge","fire_extinguisher","shopping_trolley","smoking","coffin","headstone","funeral_urn","nazar_amulet","hamsa","moyai","placard","identification_card"]},{id:"symbols",emojis:["atm","put_litter_in_its_place","potable_water","wheelchair","mens","womens","restroom","baby_symbol","wc","passport_control","customs","baggage_claim","left_luggage","warning","children_crossing","no_entry","no_entry_sign","no_bicycles","no_smoking","do_not_litter","non-potable_water","no_pedestrians","no_mobile_phones","underage","radioactive_sign","biohazard_sign","arrow_up","arrow_upper_right","arrow_right","arrow_lower_right","arrow_down","arrow_lower_left","arrow_left","arrow_upper_left","arrow_up_down","left_right_arrow","leftwards_arrow_with_hook","arrow_right_hook","arrow_heading_up","arrow_heading_down","arrows_clockwise","arrows_counterclockwise","back","end","on","soon","top","place_of_worship","atom_symbol","om_symbol","star_of_david","wheel_of_dharma","yin_yang","latin_cross","orthodox_cross","star_and_crescent","peace_symbol","menorah_with_nine_branches","six_pointed_star","khanda","aries","taurus","gemini","cancer","leo","virgo","libra","scorpius","sagittarius","capricorn","aquarius","pisces","ophiuchus","twisted_rightwards_arrows","repeat","repeat_one","arrow_forward","fast_forward","black_right_pointing_double_triangle_with_vertical_bar","black_right_pointing_triangle_with_double_vertical_bar","arrow_backward","rewind","black_left_pointing_double_triangle_with_vertical_bar","arrow_up_small","arrow_double_up","arrow_down_small","arrow_double_down","double_vertical_bar","black_square_for_stop","black_circle_for_record","eject","cinema","low_brightness","high_brightness","signal_strength","wireless","vibration_mode","mobile_phone_off","female_sign","male_sign","transgender_symbol","heavy_multiplication_x","heavy_plus_sign","heavy_minus_sign","heavy_division_sign","heavy_equals_sign","infinity","bangbang","interrobang","question","grey_question","grey_exclamation","exclamation","wavy_dash","currency_exchange","heavy_dollar_sign","medical_symbol","recycle","fleur_de_lis","trident","name_badge","beginner","o","white_check_mark","ballot_box_with_check","heavy_check_mark","x","negative_squared_cross_mark","curly_loop","loop","part_alternation_mark","eight_spoked_asterisk","eight_pointed_black_star","sparkle","copyright","registered","tm","hash","keycap_star","zero","one","two","three","four","five","six","seven","eight","nine","keycap_ten","capital_abcd","abcd","1234","symbols","abc","a","ab","b","cl","cool","free","information_source","id","m","new","ng","o2","ok","parking","sos","up","vs","koko","sa","u6708","u6709","u6307","ideograph_advantage","u5272","u7121","u7981","accept","u7533","u5408","u7a7a","congratulations","secret","u55b6","u6e80","red_circle","large_orange_circle","large_yellow_circle","large_green_circle","large_blue_circle","large_purple_circle","large_brown_circle","black_circle","white_circle","large_red_square","large_orange_square","large_yellow_square","large_green_square","large_blue_square","large_purple_square","large_brown_square","black_large_square","white_large_square","black_medium_square","white_medium_square","black_medium_small_square","white_medium_small_square","black_small_square","white_small_square","large_orange_diamond","large_blue_diamond","small_orange_diamond","small_blue_diamond","small_red_triangle","small_red_triangle_down","diamond_shape_with_a_dot_inside","radio_button","white_square_button","black_square_button"]},{id:"flags",emojis:["checkered_flag","cn","crossed_flags","de","es","flag-ac","flag-ad","flag-ae","flag-af","flag-ag","flag-ai","flag-al","flag-am","flag-ao","flag-aq","flag-ar","flag-as","flag-at","flag-au","flag-aw","flag-ax","flag-az","flag-ba","flag-bb","flag-bd","flag-be","flag-bf","flag-bg","flag-bh","flag-bi","flag-bj","flag-bl","flag-bm","flag-bn","flag-bo","flag-bq","flag-br","flag-bs","flag-bt","flag-bv","flag-bw","flag-by","flag-bz","flag-ca","flag-cc","flag-cd","flag-cf","flag-cg","flag-ch","flag-ci","flag-ck","flag-cl","flag-cm","flag-co","flag-cp","flag-cr","flag-cu","flag-cv","flag-cw","flag-cx","flag-cy","flag-cz","flag-dg","flag-dj","flag-dk","flag-dm","flag-do","flag-dz","flag-ea","flag-ec","flag-ee","flag-eg","flag-eh","flag-england","flag-er","flag-et","flag-eu","flag-fi","flag-fj","flag-fk","flag-fm","flag-fo","flag-ga","flag-gd","flag-ge","flag-gf","flag-gg","flag-gh","flag-gi","flag-gl","flag-gm","flag-gn","flag-gp","flag-gq","flag-gr","flag-gs","flag-gt","flag-gu","flag-gw","flag-gy","flag-hk","flag-hm","flag-hn","flag-hr","flag-ht","flag-hu","flag-ic","flag-id","flag-ie","flag-il","flag-im","flag-in","flag-io","flag-iq","flag-ir","flag-is","flag-je","flag-jm","flag-jo","flag-ke","flag-kg","flag-kh","flag-ki","flag-km","flag-kn","flag-kp","flag-kw","flag-ky","flag-kz","flag-la","flag-lb","flag-lc","flag-li","flag-lk","flag-lr","flag-ls","flag-lt","flag-lu","flag-lv","flag-ly","flag-ma","flag-mc","flag-md","flag-me","flag-mf","flag-mg","flag-mh","flag-mk","flag-ml","flag-mm","flag-mn","flag-mo","flag-mp","flag-mq","flag-mr","flag-ms","flag-mt","flag-mu","flag-mv","flag-mw","flag-mx","flag-my","flag-mz","flag-na","flag-nc","flag-ne","flag-nf","flag-ng","flag-ni","flag-nl","flag-no","flag-np","flag-nr","flag-nu","flag-nz","flag-om","flag-pa","flag-pe","flag-pf","flag-pg","flag-ph","flag-pk","flag-pl","flag-pm","flag-pn","flag-pr","flag-ps","flag-pt","flag-pw","flag-py","flag-qa","flag-re","flag-ro","flag-rs","flag-rw","flag-sa","flag-sb","flag-sc","flag-scotland","flag-sd","flag-se","flag-sg","flag-sh","flag-si","flag-sj","flag-sk","flag-sl","flag-sm","flag-sn","flag-so","flag-sr","flag-ss","flag-st","flag-sv","flag-sx","flag-sy","flag-sz","flag-ta","flag-tc","flag-td","flag-tf","flag-tg","flag-th","flag-tj","flag-tk","flag-tl","flag-tm","flag-tn","flag-to","flag-tr","flag-tt","flag-tv","flag-tw","flag-tz","flag-ua","flag-ug","flag-um","flag-un","flag-uy","flag-uz","flag-va","flag-vc","flag-ve","flag-vg","flag-vi","flag-vn","flag-vu","flag-wales","flag-wf","flag-ws","flag-xk","flag-ye","flag-yt","flag-za","flag-zm","flag-zw","fr","gb","it","jp","kr","pirate_flag","rainbow-flag","ru","transgender_flag","triangular_flag_on_post","us","waving_black_flag","waving_white_flag"]}],bIe={100:{id:"100",name:"Hundred Points",keywords:["100","score","perfect","numbers","century","exam","quiz","test","pass"],skins:[{unified:"1f4af",native:"\u{1F4AF}"}],version:1},1234:{id:"1234",name:"Input Numbers",keywords:["1234","blue","square","1","2","3","4"],skins:[{unified:"1f522",native:"\u{1F522}"}],version:1},grinning:{id:"grinning",name:"Grinning Face",emoticons:[":D"],keywords:["smile","happy","joy",":D","grin"],skins:[{unified:"1f600",native:"\u{1F600}"}],version:1},smiley:{id:"smiley",name:"Grinning Face with Big Eyes",emoticons:[":)","=)","=-)"],keywords:["smiley","happy","joy","haha",":D",":)","smile","funny"],skins:[{unified:"1f603",native:"\u{1F603}"}],version:1},smile:{id:"smile",name:"Grinning Face with Smiling Eyes",emoticons:[":)","C:","c:",":D",":-D"],keywords:["smile","happy","joy","funny","haha","laugh","like",":D",":)"],skins:[{unified:"1f604",native:"\u{1F604}"}],version:1},grin:{id:"grin",name:"Beaming Face with Smiling Eyes",keywords:["grin","happy","smile","joy","kawaii"],skins:[{unified:"1f601",native:"\u{1F601}"}],version:1},laughing:{id:"laughing",name:"Grinning Squinting Face",emoticons:[":>",":->"],keywords:["laughing","satisfied","happy","joy","lol","haha","glad","XD","laugh"],skins:[{unified:"1f606",native:"\u{1F606}"}],version:1},sweat_smile:{id:"sweat_smile",name:"Grinning Face with Sweat",keywords:["smile","hot","happy","laugh","relief"],skins:[{unified:"1f605",native:"\u{1F605}"}],version:1},rolling_on_the_floor_laughing:{id:"rolling_on_the_floor_laughing",name:"Rolling on the Floor Laughing",keywords:["face","lol","haha","rofl"],skins:[{unified:"1f923",native:"\u{1F923}"}],version:3},joy:{id:"joy",name:"Face with Tears of Joy",keywords:["cry","weep","happy","happytears","haha"],skins:[{unified:"1f602",native:"\u{1F602}"}],version:1},slightly_smiling_face:{id:"slightly_smiling_face",name:"Slightly Smiling Face",emoticons:[":)","(:",":-)"],keywords:["smile"],skins:[{unified:"1f642",native:"\u{1F642}"}],version:1},upside_down_face:{id:"upside_down_face",name:"Upside-Down Face",keywords:["upside","down","flipped","silly","smile"],skins:[{unified:"1f643",native:"\u{1F643}"}],version:1},melting_face:{id:"melting_face",name:"Melting Face",keywords:["hot","heat"],skins:[{unified:"1fae0",native:"\u{1FAE0}"}],version:14},wink:{id:"wink",name:"Winking Face",emoticons:[";)",";-)"],keywords:["wink","happy","mischievous","secret",";)","smile","eye"],skins:[{unified:"1f609",native:"\u{1F609}"}],version:1},blush:{id:"blush",name:"Smiling Face with Smiling Eyes",emoticons:[":)"],keywords:["blush","smile","happy","flushed","crush","embarrassed","shy","joy"],skins:[{unified:"1f60a",native:"\u{1F60A}"}],version:1},innocent:{id:"innocent",name:"Smiling Face with Halo",keywords:["innocent","angel","heaven"],skins:[{unified:"1f607",native:"\u{1F607}"}],version:1},smiling_face_with_3_hearts:{id:"smiling_face_with_3_hearts",name:"Smiling Face with Hearts",keywords:["3","love","like","affection","valentines","infatuation","crush","adore"],skins:[{unified:"1f970",native:"\u{1F970}"}],version:11},heart_eyes:{id:"heart_eyes",name:"Smiling Face with Heart-Eyes",keywords:["heart","eyes","love","like","affection","valentines","infatuation","crush"],skins:[{unified:"1f60d",native:"\u{1F60D}"}],version:1},"star-struck":{id:"star-struck",name:"Star-Struck",keywords:["star","struck","grinning","face","with","eyes","smile","starry"],skins:[{unified:"1f929",native:"\u{1F929}"}],version:5},kissing_heart:{id:"kissing_heart",name:"Face Blowing a Kiss",emoticons:[":*",":-*"],keywords:["kissing","heart","love","like","affection","valentines","infatuation"],skins:[{unified:"1f618",native:"\u{1F618}"}],version:1},kissing:{id:"kissing",name:"Kissing Face",keywords:["love","like","3","valentines","infatuation","kiss"],skins:[{unified:"1f617",native:"\u{1F617}"}],version:1},relaxed:{id:"relaxed",name:"Smiling Face",keywords:["relaxed","blush","massage","happiness"],skins:[{unified:"263a-fe0f",native:"\u263A\uFE0F"}],version:1},kissing_closed_eyes:{id:"kissing_closed_eyes",name:"Kissing Face with Closed Eyes",keywords:["love","like","affection","valentines","infatuation","kiss"],skins:[{unified:"1f61a",native:"\u{1F61A}"}],version:1},kissing_smiling_eyes:{id:"kissing_smiling_eyes",name:"Kissing Face with Smiling Eyes",keywords:["affection","valentines","infatuation","kiss"],skins:[{unified:"1f619",native:"\u{1F619}"}],version:1},smiling_face_with_tear:{id:"smiling_face_with_tear",name:"Smiling Face with Tear",keywords:["sad","cry","pretend"],skins:[{unified:"1f972",native:"\u{1F972}"}],version:13},yum:{id:"yum",name:"Face Savoring Food",keywords:["yum","happy","joy","tongue","smile","silly","yummy","nom","delicious","savouring"],skins:[{unified:"1f60b",native:"\u{1F60B}"}],version:1},stuck_out_tongue:{id:"stuck_out_tongue",name:"Face with Tongue",emoticons:[":p",":-p",":P",":-P",":b",":-b"],keywords:["stuck","out","prank","childish","playful","mischievous","smile"],skins:[{unified:"1f61b",native:"\u{1F61B}"}],version:1},stuck_out_tongue_winking_eye:{id:"stuck_out_tongue_winking_eye",name:"Winking Face with Tongue",emoticons:[";p",";-p",";b",";-b",";P",";-P"],keywords:["stuck","out","eye","prank","childish","playful","mischievous","smile","wink"],skins:[{unified:"1f61c",native:"\u{1F61C}"}],version:1},zany_face:{id:"zany_face",name:"Zany Face",keywords:["grinning","with","one","large","and","small","eye","goofy","crazy"],skins:[{unified:"1f92a",native:"\u{1F92A}"}],version:5},stuck_out_tongue_closed_eyes:{id:"stuck_out_tongue_closed_eyes",name:"Squinting Face with Tongue",keywords:["stuck","out","closed","eyes","prank","playful","mischievous","smile"],skins:[{unified:"1f61d",native:"\u{1F61D}"}],version:1},money_mouth_face:{id:"money_mouth_face",name:"Money-Mouth Face",keywords:["money","mouth","rich","dollar"],skins:[{unified:"1f911",native:"\u{1F911}"}],version:1},hugging_face:{id:"hugging_face",name:"Hugging Face",keywords:["smile","hug"],skins:[{unified:"1f917",native:"\u{1F917}"}],version:1},face_with_hand_over_mouth:{id:"face_with_hand_over_mouth",name:"Face with Hand over Mouth",keywords:["smiling","eyes","and","covering","whoops","shock","surprise"],skins:[{unified:"1f92d",native:"\u{1F92D}"}],version:5},face_with_open_eyes_and_hand_over_mouth:{id:"face_with_open_eyes_and_hand_over_mouth",name:"Face with Open Eyes and Hand over Mouth",keywords:["silence","secret","shock","surprise"],skins:[{unified:"1fae2",native:"\u{1FAE2}"}],version:14},face_with_peeking_eye:{id:"face_with_peeking_eye",name:"Face with Peeking Eye",keywords:["scared","frightening","embarrassing","shy"],skins:[{unified:"1fae3",native:"\u{1FAE3}"}],version:14},shushing_face:{id:"shushing_face",name:"Shushing Face",keywords:["with","finger","covering","closed","lips","quiet","shhh"],skins:[{unified:"1f92b",native:"\u{1F92B}"}],version:5},thinking_face:{id:"thinking_face",name:"Thinking Face",keywords:["hmmm","think","consider"],skins:[{unified:"1f914",native:"\u{1F914}"}],version:1},saluting_face:{id:"saluting_face",name:"Saluting Face",keywords:["respect","salute"],skins:[{unified:"1fae1",native:"\u{1FAE1}"}],version:14},zipper_mouth_face:{id:"zipper_mouth_face",name:"Zipper-Mouth Face",keywords:["zipper","mouth","sealed","secret"],skins:[{unified:"1f910",native:"\u{1F910}"}],version:1},face_with_raised_eyebrow:{id:"face_with_raised_eyebrow",name:"Face with Raised Eyebrow",keywords:["one","distrust","scepticism","disapproval","disbelief","surprise"],skins:[{unified:"1f928",native:"\u{1F928}"}],version:5},neutral_face:{id:"neutral_face",name:"Neutral Face",emoticons:[":|",":-|"],keywords:["indifference","meh",":",""],skins:[{unified:"1f610",native:"\u{1F610}"}],version:1},expressionless:{id:"expressionless",name:"Expressionless Face",emoticons:["-_-"],keywords:["indifferent","-","","meh","deadpan"],skins:[{unified:"1f611",native:"\u{1F611}"}],version:1},no_mouth:{id:"no_mouth",name:"Face Without Mouth",keywords:["no","hellokitty"],skins:[{unified:"1f636",native:"\u{1F636}"}],version:1},dotted_line_face:{id:"dotted_line_face",name:"Dotted Line Face",keywords:["invisible","lonely","isolation","depression"],skins:[{unified:"1fae5",native:"\u{1FAE5}"}],version:14},face_in_clouds:{id:"face_in_clouds",name:"Face in Clouds",keywords:["shower","steam","dream"],skins:[{unified:"1f636-200d-1f32b-fe0f",native:"\u{1F636}\u200D\u{1F32B}\uFE0F"}],version:13.1},smirk:{id:"smirk",name:"Smirking Face",keywords:["smirk","smile","mean","prank","smug","sarcasm"],skins:[{unified:"1f60f",native:"\u{1F60F}"}],version:1},unamused:{id:"unamused",name:"Unamused Face",emoticons:[":("],keywords:["indifference","bored","straight","serious","sarcasm","unimpressed","skeptical","dubious","side","eye"],skins:[{unified:"1f612",native:"\u{1F612}"}],version:1},face_with_rolling_eyes:{id:"face_with_rolling_eyes",name:"Face with Rolling Eyes",keywords:["eyeroll","frustrated"],skins:[{unified:"1f644",native:"\u{1F644}"}],version:1},grimacing:{id:"grimacing",name:"Grimacing Face",keywords:["grimace","teeth"],skins:[{unified:"1f62c",native:"\u{1F62C}"}],version:1},face_exhaling:{id:"face_exhaling",name:"Face Exhaling",keywords:["relieve","relief","tired","sigh"],skins:[{unified:"1f62e-200d-1f4a8",native:"\u{1F62E}\u200D\u{1F4A8}"}],version:13.1},lying_face:{id:"lying_face",name:"Lying Face",keywords:["lie","pinocchio"],skins:[{unified:"1f925",native:"\u{1F925}"}],version:3},shaking_face:{id:"shaking_face",name:"Shaking Face",keywords:["dizzy","shock","blurry","earthquake"],skins:[{unified:"1fae8",native:"\u{1FAE8}"}],version:15},relieved:{id:"relieved",name:"Relieved Face",keywords:["relaxed","phew","massage","happiness"],skins:[{unified:"1f60c",native:"\u{1F60C}"}],version:1},pensive:{id:"pensive",name:"Pensive Face",keywords:["sad","depressed","upset"],skins:[{unified:"1f614",native:"\u{1F614}"}],version:1},sleepy:{id:"sleepy",name:"Sleepy Face",keywords:["tired","rest","nap"],skins:[{unified:"1f62a",native:"\u{1F62A}"}],version:1},drooling_face:{id:"drooling_face",name:"Drooling Face",keywords:[],skins:[{unified:"1f924",native:"\u{1F924}"}],version:3},sleeping:{id:"sleeping",name:"Sleeping Face",keywords:["tired","sleepy","night","zzz"],skins:[{unified:"1f634",native:"\u{1F634}"}],version:1},mask:{id:"mask",name:"Face with Medical Mask",keywords:["sick","ill","disease","covid"],skins:[{unified:"1f637",native:"\u{1F637}"}],version:1},face_with_thermometer:{id:"face_with_thermometer",name:"Face with Thermometer",keywords:["sick","temperature","cold","fever","covid"],skins:[{unified:"1f912",native:"\u{1F912}"}],version:1},face_with_head_bandage:{id:"face_with_head_bandage",name:"Face with Head-Bandage",keywords:["head","bandage","injured","clumsy","hurt"],skins:[{unified:"1f915",native:"\u{1F915}"}],version:1},nauseated_face:{id:"nauseated_face",name:"Nauseated Face",keywords:["vomit","gross","green","sick","throw","up","ill"],skins:[{unified:"1f922",native:"\u{1F922}"}],version:3},face_vomiting:{id:"face_vomiting",name:"Face Vomiting",keywords:["with","open","mouth","sick"],skins:[{unified:"1f92e",native:"\u{1F92E}"}],version:5},sneezing_face:{id:"sneezing_face",name:"Sneezing Face",keywords:["gesundheit","sneeze","sick","allergy"],skins:[{unified:"1f927",native:"\u{1F927}"}],version:3},hot_face:{id:"hot_face",name:"Hot Face",keywords:["feverish","heat","red","sweating"],skins:[{unified:"1f975",native:"\u{1F975}"}],version:11},cold_face:{id:"cold_face",name:"Cold Face",keywords:["blue","freezing","frozen","frostbite","icicles"],skins:[{unified:"1f976",native:"\u{1F976}"}],version:11},woozy_face:{id:"woozy_face",name:"Woozy Face",keywords:["dizzy","intoxicated","tipsy","wavy"],skins:[{unified:"1f974",native:"\u{1F974}"}],version:11},dizzy_face:{id:"dizzy_face",name:"Dizzy Face",keywords:["spent","unconscious","xox"],skins:[{unified:"1f635",native:"\u{1F635}"}],version:1},face_with_spiral_eyes:{id:"face_with_spiral_eyes",name:"Face with Spiral Eyes",keywords:["sick","ill","confused","nauseous","nausea"],skins:[{unified:"1f635-200d-1f4ab",native:"\u{1F635}\u200D\u{1F4AB}"}],version:13.1},exploding_head:{id:"exploding_head",name:"Exploding Head",keywords:["shocked","face","with","mind","blown"],skins:[{unified:"1f92f",native:"\u{1F92F}"}],version:5},face_with_cowboy_hat:{id:"face_with_cowboy_hat",name:"Cowboy Hat Face",keywords:["with","cowgirl"],skins:[{unified:"1f920",native:"\u{1F920}"}],version:3},partying_face:{id:"partying_face",name:"Partying Face",keywords:["celebration","woohoo"],skins:[{unified:"1f973",native:"\u{1F973}"}],version:11},disguised_face:{id:"disguised_face",name:"Disguised Face",keywords:["pretent","brows","glasses","moustache"],skins:[{unified:"1f978",native:"\u{1F978}"}],version:13},sunglasses:{id:"sunglasses",name:"Smiling Face with Sunglasses",emoticons:["8)"],keywords:["cool","smile","summer","beach","sunglass"],skins:[{unified:"1f60e",native:"\u{1F60E}"}],version:1},nerd_face:{id:"nerd_face",name:"Nerd Face",keywords:["nerdy","geek","dork"],skins:[{unified:"1f913",native:"\u{1F913}"}],version:1},face_with_monocle:{id:"face_with_monocle",name:"Face with Monocle",keywords:["stuffy","wealthy"],skins:[{unified:"1f9d0",native:"\u{1F9D0}"}],version:5},confused:{id:"confused",name:"Confused Face",emoticons:[":\\",":-\\",":/",":-/"],keywords:["indifference","huh","weird","hmmm",":/"],skins:[{unified:"1f615",native:"\u{1F615}"}],version:1},face_with_diagonal_mouth:{id:"face_with_diagonal_mouth",name:"Face with Diagonal Mouth",keywords:["skeptic","confuse","frustrated","indifferent"],skins:[{unified:"1fae4",native:"\u{1FAE4}"}],version:14},worried:{id:"worried",name:"Worried Face",keywords:["concern","nervous",":("],skins:[{unified:"1f61f",native:"\u{1F61F}"}],version:1},slightly_frowning_face:{id:"slightly_frowning_face",name:"Slightly Frowning Face",keywords:["disappointed","sad","upset"],skins:[{unified:"1f641",native:"\u{1F641}"}],version:1},white_frowning_face:{id:"white_frowning_face",name:"Frowning Face",keywords:["white","sad","upset","frown"],skins:[{unified:"2639-fe0f",native:"\u2639\uFE0F"}],version:1},open_mouth:{id:"open_mouth",name:"Face with Open Mouth",emoticons:[":o",":-o",":O",":-O"],keywords:["surprise","impressed","wow","whoa",":O"],skins:[{unified:"1f62e",native:"\u{1F62E}"}],version:1},hushed:{id:"hushed",name:"Hushed Face",keywords:["woo","shh"],skins:[{unified:"1f62f",native:"\u{1F62F}"}],version:1},astonished:{id:"astonished",name:"Astonished Face",keywords:["xox","surprised","poisoned"],skins:[{unified:"1f632",native:"\u{1F632}"}],version:1},flushed:{id:"flushed",name:"Flushed Face",keywords:["blush","shy","flattered"],skins:[{unified:"1f633",native:"\u{1F633}"}],version:1},pleading_face:{id:"pleading_face",name:"Pleading Face",keywords:["begging","mercy","cry","tears","sad","grievance"],skins:[{unified:"1f97a",native:"\u{1F97A}"}],version:11},face_holding_back_tears:{id:"face_holding_back_tears",name:"Face Holding Back Tears",keywords:["touched","gratitude","cry"],skins:[{unified:"1f979",native:"\u{1F979}"}],version:14},frowning:{id:"frowning",name:"Frowning Face with Open Mouth",keywords:["aw","what"],skins:[{unified:"1f626",native:"\u{1F626}"}],version:1},anguished:{id:"anguished",name:"Anguished Face",emoticons:["D:"],keywords:["stunned","nervous"],skins:[{unified:"1f627",native:"\u{1F627}"}],version:1},fearful:{id:"fearful",name:"Fearful Face",keywords:["scared","terrified","nervous"],skins:[{unified:"1f628",native:"\u{1F628}"}],version:1},cold_sweat:{id:"cold_sweat",name:"Anxious Face with Sweat",keywords:["cold","nervous"],skins:[{unified:"1f630",native:"\u{1F630}"}],version:1},disappointed_relieved:{id:"disappointed_relieved",name:"Sad but Relieved Face",keywords:["disappointed","phew","sweat","nervous"],skins:[{unified:"1f625",native:"\u{1F625}"}],version:1},cry:{id:"cry",name:"Crying Face",emoticons:[":'("],keywords:["cry","tears","sad","depressed","upset",":'("],skins:[{unified:"1f622",native:"\u{1F622}"}],version:1},sob:{id:"sob",name:"Loudly Crying Face",emoticons:[":'("],keywords:["sob","cry","tears","sad","upset","depressed"],skins:[{unified:"1f62d",native:"\u{1F62D}"}],version:1},scream:{id:"scream",name:"Face Screaming in Fear",keywords:["scream","munch","scared","omg"],skins:[{unified:"1f631",native:"\u{1F631}"}],version:1},confounded:{id:"confounded",name:"Confounded Face",keywords:["confused","sick","unwell","oops",":S"],skins:[{unified:"1f616",native:"\u{1F616}"}],version:1},persevere:{id:"persevere",name:"Persevering Face",keywords:["persevere","sick","no","upset","oops"],skins:[{unified:"1f623",native:"\u{1F623}"}],version:1},disappointed:{id:"disappointed",name:"Disappointed Face",emoticons:["):",":(",":-("],keywords:["sad","upset","depressed",":("],skins:[{unified:"1f61e",native:"\u{1F61E}"}],version:1},sweat:{id:"sweat",name:"Face with Cold Sweat",keywords:["downcast","hot","sad","tired","exercise"],skins:[{unified:"1f613",native:"\u{1F613}"}],version:1},weary:{id:"weary",name:"Weary Face",keywords:["tired","sleepy","sad","frustrated","upset"],skins:[{unified:"1f629",native:"\u{1F629}"}],version:1},tired_face:{id:"tired_face",name:"Tired Face",keywords:["sick","whine","upset","frustrated"],skins:[{unified:"1f62b",native:"\u{1F62B}"}],version:1},yawning_face:{id:"yawning_face",name:"Yawning Face",keywords:["tired","sleepy"],skins:[{unified:"1f971",native:"\u{1F971}"}],version:12},triumph:{id:"triumph",name:"Face with Look of Triumph",keywords:["steam","from","nose","gas","phew","proud","pride"],skins:[{unified:"1f624",native:"\u{1F624}"}],version:1},rage:{id:"rage",name:"Pouting Face",keywords:["rage","angry","mad","hate","despise"],skins:[{unified:"1f621",native:"\u{1F621}"}],version:1},angry:{id:"angry",name:"Angry Face",emoticons:[">:(",">:-("],keywords:["mad","annoyed","frustrated"],skins:[{unified:"1f620",native:"\u{1F620}"}],version:1},face_with_symbols_on_mouth:{id:"face_with_symbols_on_mouth",name:"Face with Symbols on Mouth",keywords:["serious","covering","swearing","cursing","cussing","profanity","expletive"],skins:[{unified:"1f92c",native:"\u{1F92C}"}],version:5},smiling_imp:{id:"smiling_imp",name:"Smiling Face with Horns",keywords:["imp","devil"],skins:[{unified:"1f608",native:"\u{1F608}"}],version:1},imp:{id:"imp",name:"Imp",keywords:["angry","face","with","horns","devil"],skins:[{unified:"1f47f",native:"\u{1F47F}"}],version:1},skull:{id:"skull",name:"Skull",keywords:["dead","skeleton","creepy","death"],skins:[{unified:"1f480",native:"\u{1F480}"}],version:1},skull_and_crossbones:{id:"skull_and_crossbones",name:"Skull and Crossbones",keywords:["poison","danger","deadly","scary","death","pirate","evil"],skins:[{unified:"2620-fe0f",native:"\u2620\uFE0F"}],version:1},hankey:{id:"hankey",name:"Pile of Poo",keywords:["hankey","poop","shit","shitface","fail","turd"],skins:[{unified:"1f4a9",native:"\u{1F4A9}"}],version:1},clown_face:{id:"clown_face",name:"Clown Face",keywords:[],skins:[{unified:"1f921",native:"\u{1F921}"}],version:3},japanese_ogre:{id:"japanese_ogre",name:"Ogre",keywords:["japanese","monster","red","mask","halloween","scary","creepy","devil","demon"],skins:[{unified:"1f479",native:"\u{1F479}"}],version:1},japanese_goblin:{id:"japanese_goblin",name:"Goblin",keywords:["japanese","red","evil","mask","monster","scary","creepy"],skins:[{unified:"1f47a",native:"\u{1F47A}"}],version:1},ghost:{id:"ghost",name:"Ghost",keywords:["halloween","spooky","scary"],skins:[{unified:"1f47b",native:"\u{1F47B}"}],version:1},alien:{id:"alien",name:"Alien",keywords:["UFO","paul","weird","outer","space"],skins:[{unified:"1f47d",native:"\u{1F47D}"}],version:1},space_invader:{id:"space_invader",name:"Alien Monster",keywords:["space","invader","game","arcade","play"],skins:[{unified:"1f47e",native:"\u{1F47E}"}],version:1},robot_face:{id:"robot_face",name:"Robot",keywords:["face","computer","machine","bot"],skins:[{unified:"1f916",native:"\u{1F916}"}],version:1},smiley_cat:{id:"smiley_cat",name:"Grinning Cat",keywords:["smiley","animal","cats","happy","smile"],skins:[{unified:"1f63a",native:"\u{1F63A}"}],version:1},smile_cat:{id:"smile_cat",name:"Grinning Cat with Smiling Eyes",keywords:["smile","animal","cats"],skins:[{unified:"1f638",native:"\u{1F638}"}],version:1},joy_cat:{id:"joy_cat",name:"Cat with Tears of Joy",keywords:["animal","cats","haha","happy"],skins:[{unified:"1f639",native:"\u{1F639}"}],version:1},heart_eyes_cat:{id:"heart_eyes_cat",name:"Smiling Cat with Heart-Eyes",keywords:["heart","eyes","animal","love","like","affection","cats","valentines"],skins:[{unified:"1f63b",native:"\u{1F63B}"}],version:1},smirk_cat:{id:"smirk_cat",name:"Cat with Wry Smile",keywords:["smirk","animal","cats"],skins:[{unified:"1f63c",native:"\u{1F63C}"}],version:1},kissing_cat:{id:"kissing_cat",name:"Kissing Cat",keywords:["animal","cats","kiss"],skins:[{unified:"1f63d",native:"\u{1F63D}"}],version:1},scream_cat:{id:"scream_cat",name:"Weary Cat",keywords:["scream","animal","cats","munch","scared"],skins:[{unified:"1f640",native:"\u{1F640}"}],version:1},crying_cat_face:{id:"crying_cat_face",name:"Crying Cat",keywords:["face","animal","tears","weep","sad","cats","upset","cry"],skins:[{unified:"1f63f",native:"\u{1F63F}"}],version:1},pouting_cat:{id:"pouting_cat",name:"Pouting Cat",keywords:["animal","cats"],skins:[{unified:"1f63e",native:"\u{1F63E}"}],version:1},see_no_evil:{id:"see_no_evil",name:"See-No-Evil Monkey",keywords:["see","no","evil","animal","nature","haha"],skins:[{unified:"1f648",native:"\u{1F648}"}],version:1},hear_no_evil:{id:"hear_no_evil",name:"Hear-No-Evil Monkey",keywords:["hear","no","evil","animal","nature"],skins:[{unified:"1f649",native:"\u{1F649}"}],version:1},speak_no_evil:{id:"speak_no_evil",name:"Speak-No-Evil Monkey",keywords:["speak","no","evil","animal","nature","omg"],skins:[{unified:"1f64a",native:"\u{1F64A}"}],version:1},love_letter:{id:"love_letter",name:"Love Letter",keywords:["email","like","affection","envelope","valentines"],skins:[{unified:"1f48c",native:"\u{1F48C}"}],version:1},cupid:{id:"cupid",name:"Heart with Arrow",keywords:["cupid","love","like","affection","valentines"],skins:[{unified:"1f498",native:"\u{1F498}"}],version:1},gift_heart:{id:"gift_heart",name:"Heart with Ribbon",keywords:["gift","love","valentines"],skins:[{unified:"1f49d",native:"\u{1F49D}"}],version:1},sparkling_heart:{id:"sparkling_heart",name:"Sparkling Heart",keywords:["love","like","affection","valentines"],skins:[{unified:"1f496",native:"\u{1F496}"}],version:1},heartpulse:{id:"heartpulse",name:"Growing Heart",keywords:["heartpulse","like","love","affection","valentines","pink"],skins:[{unified:"1f497",native:"\u{1F497}"}],version:1},heartbeat:{id:"heartbeat",name:"Beating Heart",keywords:["heartbeat","love","like","affection","valentines","pink"],skins:[{unified:"1f493",native:"\u{1F493}"}],version:1},revolving_hearts:{id:"revolving_hearts",name:"Revolving Hearts",keywords:["love","like","affection","valentines"],skins:[{unified:"1f49e",native:"\u{1F49E}"}],version:1},two_hearts:{id:"two_hearts",name:"Two Hearts",keywords:["love","like","affection","valentines","heart"],skins:[{unified:"1f495",native:"\u{1F495}"}],version:1},heart_decoration:{id:"heart_decoration",name:"Heart Decoration",keywords:["purple","square","love","like"],skins:[{unified:"1f49f",native:"\u{1F49F}"}],version:1},heavy_heart_exclamation_mark_ornament:{id:"heavy_heart_exclamation_mark_ornament",name:"Heart Exclamation",keywords:["heavy","mark","ornament","decoration","love"],skins:[{unified:"2763-fe0f",native:"\u2763\uFE0F"}],version:1},broken_heart:{id:"broken_heart",name:"Broken Heart",emoticons:["{let r="[^"+t+"\\s]",o=new RegExp("["+t+"]((?:"+r+"){0,"+n+"})$").exec(i);if(o!==null){let a=o[1];if(a.length>=e)return{leadOffset:o.index,matchingString:a,replaceableString:o[0]}}return null},[n,e,t])}var Ju={},F4={},cre=N.default;function _Ie(t){let e=new URLSearchParams;e.append("code",t);for(let n=1;n{let e=document.getElementById("typeahead-menu");if(e){var n=e.getBoundingClientRect();n.top+n.height>window.innerHeight&&e.scrollIntoView({block:"center"}),0>n.top&&e.scrollIntoView({block:"center"}),t.scrollIntoView({block:"nearest"})}};function EIe(t){var e=nr.$getSelection();if(!nr.$isRangeSelection(e)||!e.isCollapsed())return null;var n=e.anchor;if(n.type!=="text"||(e=n.getNode(),!e.isSimpleText()))return null;n=n.offset;let i=e.getTextContent().slice(0,n);var r=t.matchingString;t=t.replaceableString.length;for(let a=t;a<=r.length;a++)i.substr(-a)===r.substr(0,a)&&(t=a);if(t=n-t,0>t)return null;let o;return t===0?[o]=e.splitText(n):[,o]=e.splitText(t,n),o}function TIe(t,e){let n=getComputedStyle(t),i=n.position==="absolute";if(e=e?/(auto|scroll|hidden)/:/(auto|scroll)/,n.position==="fixed")return document.body;for(;t=t.parentElement;)if(n=getComputedStyle(t),(!i||n.position!=="static")&&e.test(n.overflow+n.overflowY+n.overflowX))return t;return document.body}function Tq(t,e){return t=t.getBoundingClientRect(),e=e.getBoundingClientRect(),t.top>e.top&&t.top{if(e!=null&&t!=null){let o=r.getRootElement(),a=o!=null?TIe(o,!1):document.body,s=!1,l=Tq(e,a),c=function(){s||(window.requestAnimationFrame(function(){n(),s=!1}),s=!0);let f=Tq(e,a);f!==l&&(l=f,i?.(f))},d=new ResizeObserver(n);return window.addEventListener("resize",n),document.addEventListener("scroll",c,{capture:!0,passive:!0}),d.observe(e),()=>{d.unobserve(e),window.removeEventListener("resize",n),document.removeEventListener("scroll",c,!0)}}},[e,r,i,n,t])}var Mq=nr.createCommand("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");function MIe({close:t,editor:e,anchorElementRef:n,resolution:i,options:r,menuRenderFn:o,onSelectOption:a,shouldSplitNodeWithQuery:s=!1,commandPriority:l=nr.COMMAND_PRIORITY_LOW}){let[c,d]=Vn.useState(null);Vn.useEffect(()=>{d(0)},[i.match&&i.match.matchingString]);let f=Vn.useCallback(m=>{e.update(()=>{let b=i.match!=null&&s?EIe(i.match):null;a(m,b,t,i.match?i.match.matchingString:"")})},[e,s,i.match,a,t]),h=Vn.useCallback(m=>{let b=e.getRootElement();b!==null&&(b.setAttribute("aria-activedescendant","typeahead-item-"+m),d(m))},[e]);Vn.useEffect(()=>()=>{let m=e.getRootElement();m!==null&&m.removeAttribute("aria-activedescendant")},[e]),SIe(()=>{r===null?d(null):c===null&&h(0)},[r,c,h]),Vn.useEffect(()=>Cq.mergeRegister(e.registerCommand(Mq,({option:m})=>m.ref&&m.ref.current!=null?(Eq(m.ref.current),!0):!1,l)),[e,h,l]),Vn.useEffect(()=>Cq.mergeRegister(e.registerCommand(nr.KEY_ARROW_DOWN_COMMAND,m=>{if(r!==null&&r.length&&c!==null){let b=c!==r.length-1?c+1:0;h(b);let x=r[b];x.ref!=null&&x.ref.current&&e.dispatchCommand(Mq,{index:b,option:x}),m.preventDefault(),m.stopImmediatePropagation()}return!0},l),e.registerCommand(nr.KEY_ARROW_UP_COMMAND,m=>{if(r!==null&&r.length&&c!==null){var b=c!==0?c-1:r.length-1;h(b),b=r[b],b.ref!=null&&b.ref.current&&Eq(b.ref.current),m.preventDefault(),m.stopImmediatePropagation()}return!0},l),e.registerCommand(nr.KEY_ESCAPE_COMMAND,m=>(m.preventDefault(),m.stopImmediatePropagation(),t(),!0),l),e.registerCommand(nr.KEY_TAB_COMMAND,m=>r===null||c===null||r[c]==null?!1:(m.preventDefault(),m.stopImmediatePropagation(),f(r[c]),!0),l),e.registerCommand(nr.KEY_ENTER_COMMAND,m=>r===null||c===null||r[c]==null?!1:(m!==null&&(m.preventDefault(),m.stopImmediatePropagation()),f(r[c]),!0),l)),[f,t,e,r,c,h,l]);let g=Vn.useMemo(()=>({options:r,selectOptionAndCleanUp:f,selectedIndex:c,setHighlightedIndex:d}),[f,c,r]);return o(n,g,i.match?i.match.matchingString:"")}function NIe(t,e,n,i=document.body){let[r]=oD.useLexicalComposerContext(),o=Vn.useRef(document.createElement("div")),a=Vn.useCallback(()=>{o.current.style.top=o.current.style.bottom;let l=r.getRootElement(),c=o.current;var d=c.firstChild;if(l!==null&&t!==null){let{left:h,top:g,width:m,height:b}=t.getRect();if(c.style.top=`${g+window.pageYOffset+o.current.offsetHeight+3}px`,c.style.left=`${h+window.pageXOffset}px`,c.style.height=`${b}px`,c.style.width=`${m}px`,d!==null){d.style.top=`${g}`;var f=d.getBoundingClientRect();d=f.height,f=f.width;let x=l.getBoundingClientRect();h+f>x.right&&(c.style.left=`${x.right-f+window.pageXOffset}px`),(g+d>window.innerHeight||g+d>x.bottom)&&g-x.top>d&&(c.style.top=`${g-d+window.pageYOffset-b}px`)}c.isConnected||(n!=null&&(c.className=n),c.setAttribute("aria-label","Typeahead menu"),c.setAttribute("id","typeahead-menu"),c.setAttribute("role","listbox"),c.style.display="block",c.style.position="absolute",i.append(c)),o.current=c,l.setAttribute("aria-controls","typeahead-menu")}},[r,t,n,i]);Vn.useEffect(()=>{let l=r.getRootElement();if(t!==null)return a(),()=>{l!==null&&l.removeAttribute("aria-controls");let c=o.current;c!==null&&c.isConnected&&c.remove()}},[r,a,t]);let s=Vn.useCallback(l=>{t!==null&&(l||e(null))},[t,e]);return ure(t,o.current,a,s),o}function PIe(t,e,n){var i=n.getSelection();if(i===null||!i.isCollapsed||(n=i.anchorNode,i=i.anchorOffset,n==null||i==null))return!1;try{e.setStart(n,t),e.setEnd(n,i)}catch{return!1}return!0}function AIe(t){let e=null;return t.getEditorState().read(()=>{var n=nr.$getSelection();if(nr.$isRangeSelection(n)){var i=n.anchor;i.type!=="text"?e=null:(n=i.getNode(),n.isSimpleText()?(i=i.offset,e=n.getTextContent().slice(0,i)):e=null)}}),e}function $Ie(t,e){return e!==0?!1:t.getEditorState().read(()=>{var n=nr.$getSelection();return nr.$isRangeSelection(n)?(n=n.anchor.getNode().getPreviousSibling(),nr.$isTextNode(n)&&n.isTextEntity()):!1})}function DIe(t){Vn.startTransition?Vn.startTransition(t):t()}var IIe=nr.createCommand("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");Ju.LexicalTypeaheadMenuPlugin=function({options:t,onQueryChange:e,onSelectOption:n,onOpen:i,onClose:r,menuRenderFn:o,triggerFn:a,anchorClassName:s,commandPriority:l=nr.COMMAND_PRIORITY_LOW,parent:c}){let[d]=oD.useLexicalComposerContext(),[f,h]=Vn.useState(null);s=NIe(f,h,s,c);let g=Vn.useCallback(()=>{h(null),r!=null&&f!==null&&r()},[r,f]),m=Vn.useCallback(b=>{h(b),i!=null&&f===null&&i(b)},[i,f]);return Vn.useEffect(()=>{let b=d.registerUpdateListener(()=>{d.getEditorState().read(()=>{let x=d._window||window,_=x.document.createRange(),O=nr.$getSelection(),S=AIe(d);if(nr.$isRangeSelection(O)&&O.isCollapsed()&&S!==null&&_!==null){var E=a(S,d);e(E?E.matchingString:null),E===null||$Ie(d,E.leadOffset)||PIe(E.leadOffset,_,x)===null?g():DIe(()=>m({getRect:()=>_.getBoundingClientRect(),match:E}))}else g()})});return()=>{b()}},[d,a,e,f,g,m]),f===null||d===null?null:Vn.createElement(MIe,{close:g,resolution:f,editor:d,anchorElementRef:s,options:t,menuRenderFn:o,shouldSplitNodeWithQuery:!0,onSelectOption:n,commandPriority:l})};Ju.MenuOption=CIe;Ju.PUNCTUATION=`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`;Ju.SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND=IIe;Ju.getScrollParent=function(t,e){let n=getComputedStyle(t),i=n.position==="absolute";if(e=e?/(auto|scroll|hidden)/:/(auto|scroll)/,n.position==="fixed")return document.body;for(;t=t.parentElement;)if(n=getComputedStyle(t),(!i||n.position!=="static")&&e.test(n.overflow+n.overflowY+n.overflowX))return t;return document.body};Ju.useBasicTypeaheadTriggerMatch=function(t,{minLength:e=1,maxLength:n=75}){return Vn.useCallback(i=>{if(i=new RegExp("(^|\\s|\\()(["+t+"]((?:[^"+(t+`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;\\s]){0,`)+n+"}))$").exec(i),i!==null){let r=i[1],o=i[3];if(o.length>=e)return{leadOffset:i.index+r.length,matchingString:o,replaceableString:i[2]}}return null},[n,e,t])};Ju.useDynamicPositioning=ure;var LIe=Ju,jIe=LIe;function fre(t){return t&&t.__esModule?t.default:t}function Ha(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var z4,dt,hre,Ry,pre,Nq,q3={},gre=[],RIe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function cu(t,e){for(var n in e)t[n]=e[n];return t}function mre(t){var e=t.parentNode;e&&e.removeChild(t)}function b7(t,e,n){var i,r,o,a={};for(o in e)o=="key"?i=e[o]:o=="ref"?r=e[o]:a[o]=e[o];if(arguments.length>2&&(a.children=arguments.length>3?z4.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)a[o]===void 0&&(a[o]=t.defaultProps[o]);return Z_(t,a,i,r,null)}function Z_(t,e,n,i,r){var o={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r??++hre};return r==null&&dt.vnode!=null&&dt.vnode(o),o}function _c(){return{current:null}}function Dm(t){return t.children}function Al(t,e){this.props=t,this.context=e}function Im(t,e){if(e==null)return t.__?Im(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e0?Z_(g.type,g.props,g.key,null,g.__v):g)!=null){if(g.__=n,g.__b=n.__b+1,(h=_[d])===null||h&&g.key==h.key&&g.type===h.type)_[d]=void 0;else for(f=0;f{let t=null;try{navigator.userAgent.includes("jsdom")||(t=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}))}catch{}if(!t)return()=>!1;let e=25,n=20,i=Math.floor(e/2);return t.font=i+"px Arial, Sans-Serif",t.textBaseline="top",t.canvas.width=n*2,t.canvas.height=e,r=>{t.clearRect(0,0,n*2,e),t.fillStyle="#FF0000",t.fillText(r,0,22),t.fillStyle="#0000FF",t.fillText(r,n,22);let o=t.getImageData(0,0,n,e).data,a=o.length,s=0;for(;s=a)return!1;let l=n+s/4%n,c=Math.floor(s/4/n),d=t.getImageData(l,c,1,1).data;return!(o[s]!==d[0]||o[s+2]!==d[2]||t.measureText(r).width>=n)}})(),Iq={latestVersion:qIe,noCountryFlags:UIe},w7=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"],vr=null;function YIe(t){vr||(vr=wu.get("frequently")||{});let e=t.id||t;e&&(vr[e]||(vr[e]=0),vr[e]+=1,wu.set("last",e),wu.set("frequently",vr))}function XIe({maxFrequentRows:t,perLine:e}){if(!t)return[];vr||(vr=wu.get("frequently"));let n=[];if(!vr){vr={};for(let o in w7.slice(0,e)){let a=w7[o];vr[a]=e-o,n.push(a)}return n}let i=t*e,r=wu.get("last");for(let o in vr)n.push(o);if(n.sort((o,a)=>{let s=vr[a],l=vr[o];return s==l?o.localeCompare(a):s-l}),n.length>i){let o=n.slice(i);n=n.slice(0,i);for(let a of o)a!=r&&delete vr[a];r&&n.indexOf(r)==-1&&(delete vr[n[n.length-1]],n.splice(-1,1,r)),wu.set("frequently",vr)}return n}var Cre={add:YIe,get:XIe,DEFAULTS:w7},Ere={};Ere=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn\u2019t be found","pick":"Pick an emoji\u2026","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var $c={autoFocus:{value:!1},dynamicWidth:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:15,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14,15]},exceptEmojis:{value:[]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","be","cs","de","es","fa","fi","fr","hi","it","ja","ko","nl","pl","pt","ru","sa","tr","uk","vi","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}},Qr=null,Dt=null,k8={};async function Lq(t){if(k8[t])return k8[t];let e=await(await fetch(t)).json();return k8[t]=e,e}var x8=null,Tre=null,Mre=!1;function ok(t,{caller:e}={}){return x8||(x8=new Promise(n=>{Tre=n})),t?GIe(t):e&&!Mre&&console.warn(`\`${e}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),x8}async function GIe(t){Mre=!0;let{emojiVersion:e,set:n,locale:i}=t;if(e||(e=$c.emojiVersion.value),n||(n=$c.set.value),i||(i=$c.locale.value),Dt)Dt.categories=Dt.categories.filter(l=>!l.name);else{Dt=(typeof t.data=="function"?await t.data():t.data)||await Lq(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${e}/${n}.json`),Dt.emoticons={},Dt.natives={},Dt.categories.unshift({id:"frequent",emojis:[]});for(let l in Dt.aliases){let c=Dt.aliases[l],d=Dt.emojis[c];d&&(d.aliases||(d.aliases=[]),d.aliases.push(l))}Dt.originalCategories=Dt.categories}if(Qr=(typeof t.i18n=="function"?await t.i18n():t.i18n)||(i=="en"?fre(Ere):await Lq(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)),t.custom)for(let l in t.custom){l=parseInt(l);let c=t.custom[l],d=t.custom[l-1];if(!(!c.emojis||!c.emojis.length)){c.id||(c.id=`custom_${l+1}`),c.name||(c.name=Qr.categories.custom),d&&!c.icon&&(c.target=d.target||d),Dt.categories.push(c);for(let f of c.emojis)Dt.emojis[f.id]=f}}t.categories&&(Dt.categories=Dt.originalCategories.filter(l=>t.categories.indexOf(l.id)!=-1).sort((l,c)=>{let d=t.categories.indexOf(l.id),f=t.categories.indexOf(c.id);return d-f}));let r=null,o=null;n=="native"&&(r=Iq.latestVersion(),o=t.noCountryFlags||Iq.noCountryFlags());let a=Dt.categories.length,s=!1;for(;a--;){let l=Dt.categories[a];if(l.id=="frequent"){let{maxFrequentRows:f,perLine:h}=t;f=f>=0?f:$c.maxFrequentRows.value,h||(h=$c.perLine.value),l.emojis=Cre.get({maxFrequentRows:f,perLine:h})}if(!l.emojis||!l.emojis.length){Dt.categories.splice(a,1);continue}let{categoryIcons:c}=t;if(c){let f=c[l.id];f&&!l.icon&&(l.icon=f)}let d=l.emojis.length;for(;d--;){let f=l.emojis[d],h=f.id?f:Dt.emojis[f],g=()=>{l.emojis.splice(d,1)};if(!h||t.exceptEmojis&&t.exceptEmojis.includes(h.id)){g();continue}if(r&&h.version>r){g();continue}if(o&&l.id=="flags"&&!nLe.includes(h.id)){g();continue}if(!h.search){if(s=!0,h.search=","+[[h.id,!1],[h.name,!0],[h.keywords,!1],[h.emoticons,!1]].map(([b,x])=>{if(b)return(Array.isArray(b)?b:[b]).map(_=>(x?_.split(/[-|_|\s]+/):[_]).map(O=>O.toLowerCase())).flat()}).flat().filter(b=>b&&b.trim()).join(","),h.emoticons)for(let b of h.emoticons)Dt.emoticons[b]||(Dt.emoticons[b]=h.id);let m=0;for(let b of h.skins){if(!b)continue;m++;let{native:x}=b;x&&(Dt.natives[x]=h.id,h.search+=`,${x}`);let _=m==1?"":`:skin-tone-${m}:`;b.shortcodes=`:${h.id}:${_}`}}}}s&&Nl.reset(),Tre()}function Nre(t,e,n){t||(t={});let i={};for(let r in e)i[r]=Pre(r,t,e,n);return i}function Pre(t,e,n,i){let r=n[t],o=i&&i.getAttribute(t)||(e[t]!=null&&e[t]!=null?e[t]:null);return r&&(o!=null&&r.value&&typeof r.value!=typeof o&&(typeof r.value=="boolean"?o=o!="false":o=r.value.constructor(o)),r.transform&&o&&(o=r.transform(o)),(o==null||r.choices&&r.choices.indexOf(o)==-1)&&(o=r.value)),o}var KIe=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/,k7=null;function JIe(t){return t.id?t:Dt.emojis[t]||Dt.emojis[Dt.aliases[t]]||Dt.emojis[Dt.natives[t]]}function eLe(){k7=null}async function tLe(t,{maxResults:e,caller:n}={}){if(!t||!t.trim().length)return null;e||(e=90),await ok(null,{caller:n||"SearchIndex.search"});let i=t.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((s,l,c)=>s.trim()&&c.indexOf(s)==l);if(!i.length)return;let r=k7||(k7=Object.values(Dt.emojis)),o,a;for(let s of i){if(!r.length)break;o=[],a={};for(let l of r){if(!l.search)continue;let c=l.search.indexOf(`,${s}`);c!=-1&&(o.push(l),a[l.id]||(a[l.id]=0),a[l.id]+=l.id==s?0:c+1)}r=o}return o.length<2||(o.sort((s,l)=>{let c=a[s.id],d=a[l.id];return c==d?s.id.localeCompare(l.id):c-d}),o.length>e&&(o=o.slice(0,e))),o}var Nl={search:tLe,get:JIe,reset:eLe,SHORTCODES_REGEX:KIe},nLe=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function iLe(t,e){return Array.isArray(t)&&Array.isArray(e)&&t.length===e.length&&t.every((n,i)=>n==e[i])}async function rLe(t=1){for(let e in[...Array(t).keys()])await new Promise(requestAnimationFrame)}function oLe(t,{skinIndex:e=0}={}){let n=t.skins[e]||(e=0,t.skins[e]),i={id:t.id,name:t.name,native:n.native,unified:n.unified,keywords:t.keywords,shortcodes:n.shortcodes||t.shortcodes};return t.skins.length>1&&(i.skin=e+1),n.src&&(i.src=n.src),t.aliases&&t.aliases.length&&(i.aliases=t.aliases),t.emoticons&&t.emoticons.length&&(i.emoticons=t.emoticons),i}var aLe={activity:{outline:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:ge("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:ge("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:ge("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:ge("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:ge("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:ge("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:ge("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[ge("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),ge("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:ge("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[ge("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),ge("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:ge("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[ge("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),ge("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:ge("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[ge("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),ge("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:ge("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[ge("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),ge("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:ge("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:ge("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:ge("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},sLe={loupe:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:ge("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:ge("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})},X3={categories:aLe,search:sLe};function x7(t){let{id:e,skin:n,emoji:i}=t;if(t.shortcodes){let s=t.shortcodes.match(Nl.SHORTCODES_REGEX);s&&(e=s[1],s[2]&&(n=s[2]))}if(i||(i=Nl.get(e||t.native)),!i)return t.fallback;let r=i.skins[n-1]||i.skins[0],o=r.src||(t.set!="native"&&!t.spritesheet?typeof t.getImageURL=="function"?t.getImageURL(t.set,r.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${t.set}@15.0.1/img/${t.set}/64/${r.unified}.png`:void 0),a=typeof t.getSpritesheetURL=="function"?t.getSpritesheetURL(t.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${t.set}@15.0.1/img/${t.set}/sheets-256/64.png`;return ge("span",{class:"emoji-mart-emoji","data-emoji-set":t.set,children:o?ge("img",{style:{maxWidth:t.size||"1em",maxHeight:t.size||"1em",display:"inline-block"},alt:r.native||r.shortcodes,src:o}):t.set=="native"?ge("span",{style:{fontSize:t.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:r.native}):ge("span",{style:{display:"block",width:t.size,height:t.size,backgroundImage:`url(${a})`,backgroundSize:`${100*Dt.sheet.cols}% ${100*Dt.sheet.rows}%`,backgroundPosition:`${100/(Dt.sheet.cols-1)*r.x}% ${100/(Dt.sheet.rows-1)*r.y}%`}})})}var lLe=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object,G3=class extends lLe{static get observedAttributes(){return Object.keys(this.Props)}update(e={}){for(let n in e)this.attributeChangedCallback(n,null,e[n])}attributeChangedCallback(e,n,i){if(!this.component)return;let r=Pre(e,{[e]:i},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[e]:r}):(this.component.props[e]=r,this.component.forceUpdate())}disconnectedCallback(){this.disconnected=!0,this.component&&this.component.unregister&&this.component.unregister()}constructor(e={}){if(super(),this.props=e,e.parent||e.ref){let n=null,i=e.parent||(n=e.ref&&e.ref.current);n&&(n.innerHTML=""),i&&i.appendChild(this)}}},_7=class extends G3{setShadow(){this.attachShadow({mode:"open"})}injectStyles(e){if(!e)return;let n=document.createElement("style");n.textContent=e,this.shadowRoot.insertBefore(n,this.shadowRoot.firstChild)}constructor(e,{styles:n}={}){super(e),this.setShadow(),this.injectStyles(n)}},Are={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:t=>/\D/.test(t)?t:`${t}px`},set:$c.set,skin:$c.skin},K3=class extends G3{async connectedCallback(){let e=Nre(this.props,Are,this);e.element=this,e.ref=n=>{this.component=n},await ok(),!this.disconnected&&Ore(ge(x7,{...e}),this)}constructor(e){super(e)}};Ha(K3,"Props",Are);typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",K3);var jq,O7=[],Rq=dt.__b,Fq=dt.__r,zq=dt.diffed,Qq=dt.__c,Wq=dt.unmount;function cLe(){var t;for(O7.sort(function(e,n){return e.__v.__b-n.__v.__b});t=O7.pop();)if(t.__P)try{t.__H.__h.forEach(q_),t.__H.__h.forEach(S7),t.__H.__h=[]}catch(e){t.__H.__h=[],dt.__e(e,t.__v)}}dt.__b=function(t){Rq&&Rq(t)},dt.__r=function(t){Fq&&Fq(t);var e=t.__c.__H;e&&(e.__h.forEach(q_),e.__h.forEach(S7),e.__h=[])},dt.diffed=function(t){zq&&zq(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(O7.push(e)!==1&&jq===dt.requestAnimationFrame||((jq=dt.requestAnimationFrame)||function(n){var i,r=function(){clearTimeout(o),Bq&&cancelAnimationFrame(i),setTimeout(n)},o=setTimeout(r,100);Bq&&(i=requestAnimationFrame(r))})(cLe))},dt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(q_),n.__h=n.__h.filter(function(i){return!i.__||S7(i)})}catch(i){e.some(function(r){r.__h&&(r.__h=[])}),e=[],dt.__e(i,n.__v)}}),Qq&&Qq(t,e)},dt.unmount=function(t){Wq&&Wq(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(i){try{q_(i)}catch(r){e=r}}),e&&dt.__e(e,n.__v))};var Bq=typeof requestAnimationFrame=="function";function q_(t){var e=t.__c;typeof e=="function"&&(t.__c=void 0,e())}function S7(t){t.__c=t.__()}function dLe(t,e){for(var n in e)t[n]=e[n];return t}function Hq(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var i in e)if(i!=="__source"&&t[i]!==e[i])return!0;return!1}function J3(t){this.props=t}(J3.prototype=new Al).isPureReactComponent=!0,J3.prototype.shouldComponentUpdate=function(t,e){return Hq(this.props,t)||Hq(this.state,e)};var Zq=dt.__b;dt.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Zq&&Zq(t)};var uLe=dt.__e;dt.__e=function(t,e,n){if(t.then){for(var i,r=e;r=r.__;)if((i=r.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}uLe(t,e,n)};var qq=dt.unmount;function _8(){this.__u=0,this.t=null,this.__b=null}function $re(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function s_(){this.u=null,this.o=null}dt.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),qq&&qq(t)},(_8.prototype=new Al).__c=function(t,e){var n=e.__c,i=this;i.t==null&&(i.t=[]),i.t.push(n);var r=$re(i.__v),o=!1,a=function(){o||(o=!0,n.__R=null,r?r(s):s())};n.__R=a;var s=function(){if(!--i.__u){if(i.state.__e){var c=i.state.__e;i.__v.__k[0]=function f(h,g,m){return h&&(h.__v=null,h.__k=h.__k&&h.__k.map(function(b){return f(b,g,m)}),h.__c&&h.__c.__P===g&&(h.__e&&m.insertBefore(h.__e,h.__d),h.__c.__e=!0,h.__c.__P=m)),h}(c,c.__c.__P,c.__c.__O)}var d;for(i.setState({__e:i.__b=null});d=i.t.pop();)d.forceUpdate()}},l=e.__h===!0;i.__u++||l||i.setState({__e:i.__b=i.__v.__k[0]}),t.then(a,a)},_8.prototype.componentWillUnmount=function(){this.t=[]},_8.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=function o(a,s,l){return a&&(a.__c&&a.__c.__H&&(a.__c.__H.__.forEach(function(c){typeof c.__c=="function"&&c.__c()}),a.__c.__H=null),(a=dLe({},a)).__c!=null&&(a.__c.__P===l&&(a.__c.__P=s),a.__c=null),a.__k=a.__k&&a.__k.map(function(c){return o(c,s,l)})),a}(this.__b,n,i.__O=i.__P)}this.__b=null}var r=e.__e&&b7(Dm,null,t.fallback);return r&&(r.__h=null),[b7(Dm,null,e.__e?null:t.children),r]};var Uq=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]{let r=n.name||Qr.categories[n.id],o=!this.props.unfocused&&n.id==this.state.categoryId;return o&&(e=i),ge("button",{"aria-label":r,"aria-selected":o||void 0,title:r,type:"button",class:"flex flex-grow flex-center",onMouseDown:a=>a.preventDefault(),onClick:()=>{this.props.onClick({category:n,i})},children:this.renderIcon(n)})}),ge("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:e==null?0:1,transform:this.props.dir==="rtl"?`scaleX(-1) translateX(${e*100}%)`:`translateX(${e*100}%)`}})]})})}constructor(){super(),this.categories=Dt.categories.filter(e=>!e.target),this.state={categoryId:this.categories[0].id}}},E7=class extends J3{shouldComponentUpdate(e){for(let n in e)if(n!="children"&&e[n]!=this.props[n])return!0;return!1}render(){return this.props.children}},l_={rowsPerRender:10},T7=class extends Al{getInitialState(e=this.props){return{skin:wu.get("skin")||e.skin,theme:this.initTheme(e.theme)}}componentWillMount(){this.dir=Qr.rtl?"rtl":"ltr",this.refs={menu:_c(),navigation:_c(),scroll:_c(),search:_c(),searchInput:_c(),skinToneButton:_c(),skinToneRadio:_c()},this.initGrid(),this.props.stickySearch==!1&&this.props.searchPosition=="sticky"&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){let{searchInput:e}=this.refs;e.current&&e.current.focus()}}componentWillReceiveProps(e){this.nextState||(this.nextState={});for(let n in e)this.nextState[n]=e[n];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout(()=>{let n=!1;for(let r in this.nextState)this.props[r]=this.nextState[r],(r==="custom"||r==="categories")&&(n=!0);delete this.nextState;let i=this.getInitialState();if(n)return this.reset(i);this.setState(i)})}componentWillUnmount(){this.unregister()}async reset(e={}){await ok(this.props),this.initGrid(),this.unobserve(),this.setState(e,()=>{this.observeCategories(),this.observeRows()})}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){var e;document.removeEventListener("click",this.handleClickOutside),(e=this.darkMedia)==null||e.removeEventListener("change",this.darkMediaCallback),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve({except:e=[]}={}){Array.isArray(e)||(e=[e]);for(let n of this.observers)e.includes(n)||n.disconnect();this.observers=[].concat(e)}initGrid(){let{categories:e}=Dt;this.refs.categories=new Map;let n=Dt.categories.map(r=>r.id).join(",");this.navKey&&this.navKey!=n&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=n,this.grid=[],this.grid.setsize=0;let i=(r,o)=>{let a=[];a.__categoryId=o.id,a.__index=r.length,this.grid.push(a);let s=this.grid.length-1,l=s%l_.rowsPerRender?{}:_c();return l.index=s,l.posinset=this.grid.setsize+1,r.push(l),a};for(let r of e){let o=[],a=i(o,r);for(let s of r.emojis)a.length==this.getPerLine()&&(a=i(o,r)),this.grid.setsize+=1,a.push(s);this.refs.categories.set(r.id,{root:_c(),rows:o})}}initTheme(e){if(e!="auto")return e;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addEventListener("change",this.darkMediaCallback)}return this.darkMedia.matches?"dark":"light"}initDynamicPerLine(e=this.props){if(!e.dynamicWidth)return;let{element:n,emojiButtonSize:i}=e,r=()=>{let{width:a}=n.getBoundingClientRect();return Math.floor(a/i)},o=new ResizeObserver(()=>{this.unobserve({except:o}),this.setState({perLine:r()},()=>{this.initGrid(),this.forceUpdate(()=>{this.observeCategories(),this.observeRows()})})});return o.observe(n),this.observers.push(o),r()}getPerLine(){return this.state.perLine||this.props.perLine}getEmojiByPos([e,n]){let i=this.state.searchResults||this.grid,r=i[e]&&i[e][n];if(r)return Nl.get(r)}observeCategories(){let e=this.refs.navigation.current;if(!e)return;let n=new Map,i=a=>{a!=e.state.categoryId&&e.setState({categoryId:a})},r={root:this.refs.scroll.current,threshold:[0,1]},o=new IntersectionObserver(a=>{for(let l of a){let c=l.target.dataset.id;n.set(c,l.intersectionRatio)}let s=[...n];for(let[l,c]of s)if(c){i(l);break}},r);for(let{root:a}of this.refs.categories.values())o.observe(a.current);this.observers.push(o)}observeRows(){let e={...this.state.visibleRows},n=new IntersectionObserver(i=>{for(let r of i){let o=parseInt(r.target.dataset.index);r.isIntersecting?e[o]=!0:delete e[o]}this.setState({visibleRows:e})},{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(l_.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*l_.rowsPerRender}px`});for(let{rows:i}of this.refs.categories.values())for(let r of i)r.current&&n.observe(r.current);this.observers.push(n)}preventDefault(e){e.preventDefault()}unfocusSearch(){let e=this.refs.searchInput.current;e&&e.blur()}navigate({e,input:n,left:i,right:r,up:o,down:a}){let s=this.state.searchResults||this.grid;if(!s.length)return;let[l,c]=this.state.pos,d=(()=>{if(l==0&&c==0&&!e.repeat&&(i||o))return null;if(l==-1)return!e.repeat&&(r||a)&&n.selectionStart==n.value.length?[0,0]:null;if(i||r){let f=s[l],h=i?-1:1;if(c+=h,!f[c]){if(l+=h,f=s[l],!f)return l=i?0:s.length-1,c=i?0:s[l].length-1,[l,c];c=i?f.length-1:0}return[l,c]}if(o||a){l+=o?-1:1;let f=s[l];return f?(f[c]||(c=f.length-1),[l,c]):(l=o?0:s.length-1,c=o?0:s[l].length-1,[l,c])}})();if(d)e.preventDefault();else{this.state.pos[0]>-1&&this.setState({pos:[-1,-1]});return}this.setState({pos:d,keyboard:!0},()=>{this.scrollTo({row:d[0]})})}scrollTo({categoryId:e,row:n}){let i=this.state.searchResults||this.grid;if(!i.length)return;let r=this.refs.scroll.current,o=r.getBoundingClientRect(),a=0;if(n>=0&&(e=i[n].__categoryId),e&&(a=(this.refs[e]||this.refs.categories.get(e).root).current.getBoundingClientRect().top-(o.top-r.scrollTop)+1),n>=0)if(!n)a=0;else{let s=i[n].__index,l=a+s*this.props.emojiButtonSize,c=l+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(lr.scrollTop+o.height)a=c-o.height;else return}this.ignoreMouse(),r.scrollTop=a}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout(()=>{delete this.mouseIsIgnored},100)}handleEmojiOver(e){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:e||[-1,-1],keyboard:!1})}handleEmojiClick({e,emoji:n,pos:i}){if(this.props.onEmojiSelect&&(!n&&i&&(n=this.getEmojiByPos(i)),n)){let r=oLe(n,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&Cre.add(r,this.props),this.props.onEmojiSelect(r,e)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(e){this.setState({tempSkin:e})}handleSkinClick(e){this.ignoreMouse(),this.closeSkins(),this.setState({skin:e,tempSkin:null}),wu.set("skin",e)}renderNav(){return ge(C7,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,dir:this.dir,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){let e=this.getEmojiByPos(this.state.pos),n=this.state.searchResults&&!this.state.searchResults.length;return ge("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[ge("div",{class:"flex flex-middle flex-grow",children:[ge("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:ge(x7,{emoji:e,id:n?this.props.noResultsEmoji||"cry":this.props.previewEmoji||(this.props.previewPosition=="top"?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),ge("div",{class:`margin-${this.dir[0]}`,children:e||n?ge("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[ge("div",{class:"preview-title ellipsis",children:e?e.name:Qr.search_no_results_1}),ge("div",{class:"preview-subtitle ellipsis color-c",children:e?e.skins[0].shortcodes:Qr.search_no_results_2})]}):ge("div",{class:"preview-placeholder color-c",children:Qr.pick})})]}),!e&&this.props.skinTonePosition=="preview"&&this.renderSkinToneButton()]})}renderEmojiButton(e,{pos:n,posinset:i,grid:r}){let o=this.props.emojiButtonSize,a=this.state.tempSkin||this.state.skin,s=(e.skins[a-1]||e.skins[0]).native,l=iLe(this.state.pos,n),c=n.concat(e.id).join("");return ge(E7,{selected:l,skin:a,size:o,children:ge("button",{"aria-label":s,"aria-selected":l||void 0,"aria-posinset":i,"aria-setsize":r.setsize,"data-keyboard":this.state.keyboard,title:this.props.previewPosition=="none"?e.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:d=>this.handleEmojiClick({e:d,emoji:e}),onMouseEnter:()=>this.handleEmojiOver(n),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[ge("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(i-1)%this.props.emojiButtonColors.length]:void 0}}),ge(x7,{emoji:e,set:this.props.set,size:this.props.emojiSize,skin:a,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},c)}renderSearch(){let e=this.props.previewPosition=="none"||this.props.skinTonePosition=="search";return ge("div",{children:[ge("div",{class:"spacer"}),ge("div",{class:"flex flex-middle",children:[ge("div",{class:"search relative flex-grow",children:[ge("input",{type:"search",ref:this.refs.searchInput,placeholder:Qr.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),ge("span",{class:"icon loupe flex",children:X3.search.loupe}),this.state.searchResults&&ge("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:X3.search.delete})]}),e&&this.renderSkinToneButton()]})]})}renderSearchResults(){let{searchResults:e}=this.state;return e?ge("div",{class:"category",ref:this.refs.search,children:[ge("div",{class:`sticky padding-small align-${this.dir[0]}`,children:Qr.categories.search}),ge("div",{children:e.length?e.map((n,i)=>ge("div",{class:"flex",children:n.map((r,o)=>this.renderEmojiButton(r,{pos:[i,o],posinset:i*this.props.perLine+o+1,grid:e}))})):ge("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&ge("a",{onClick:this.props.onAddCustomEmoji,children:Qr.add_custom})})})]}):null}renderCategories(){let{categories:e}=Dt,n=!!this.state.searchResults,i=this.getPerLine();return ge("div",{style:{visibility:n?"hidden":void 0,display:n?"none":void 0,height:"100%"},children:e.map(r=>{let{root:o,rows:a}=this.refs.categories.get(r.id);return ge("div",{"data-id":r.target?r.target.id:r.id,class:"category",ref:o,children:[ge("div",{class:`sticky padding-small align-${this.dir[0]}`,children:r.name||Qr.categories[r.id]}),ge("div",{class:"relative",style:{height:a.length*this.props.emojiButtonSize},children:a.map((s,l)=>{let c=s.index-s.index%l_.rowsPerRender,d=this.state.visibleRows[c],f="current"in s?s:void 0;if(!d&&!f)return null;let h=l*i,g=h+i,m=r.emojis.slice(h,g);return m.length{if(!b)return ge("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});let _=Nl.get(b);return this.renderEmojiButton(_,{pos:[s.index,x],posinset:s.posinset+x,grid:this.grid})})},s.index)})})]})})})}renderSkinToneButton(){return this.props.skinTonePosition=="none"?null:ge("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:ge("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":Qr.skins.choose,title:Qr.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:ge("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){let e=this.getEmojiByPos(this.state.pos),n=e?e.name:"";return ge("div",{"aria-live":"polite",class:"sr-only",children:n})}renderSkins(){let e=this.refs.skinToneButton.current.getBoundingClientRect(),n=this.base.getBoundingClientRect(),i={};return this.dir=="ltr"?i.right=n.right-e.right-3:i.left=e.left-n.left-3,this.props.previewPosition=="bottom"&&this.props.skinTonePosition=="preview"?i.bottom=n.bottom-e.top+6:(i.top=e.bottom-n.top+3,i.bottom="auto"),ge("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":Qr.skins.choose,class:"menu hidden","data-position":i.top?"top":"bottom",style:i,children:[...Array(6).keys()].map(r=>{let o=r+1,a=this.state.skin==o;return ge("div",{children:[ge("input",{type:"radio",name:"skin-tone",value:o,"aria-label":Qr.skins[o],ref:a?this.refs.skinToneRadio:null,defaultChecked:a,onChange:()=>this.handleSkinMouseOver(o),onKeyDown:s=>{(s.code=="Enter"||s.code=="Space"||s.code=="Tab")&&(s.preventDefault(),this.handleSkinClick(o))}}),ge("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(o),onMouseEnter:()=>this.handleSkinMouseOver(o),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[ge("span",{class:`skin-tone skin-tone-${o}`}),ge("span",{class:"margin-small-lr",children:Qr.skins[o]})]})]})})})}render(){let e=this.props.perLine*this.props.emojiButtonSize;return ge("section",{id:"root",class:"flex flex-column",dir:this.dir,style:{width:this.props.dynamicWidth?"100%":`calc(${e}px + (var(--padding) + var(--sidebar-width)))`},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:[this.props.previewPosition=="top"&&this.renderPreview(),this.props.navPosition=="top"&&this.renderNav(),this.props.searchPosition=="sticky"&&ge("div",{class:"padding-lr",children:this.renderSearch()}),ge("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:ge("div",{style:{width:this.props.dynamicWidth?"100%":e,height:"100%"},children:[this.props.searchPosition=="static"&&this.renderSearch(),this.renderSearchResults(),this.renderCategories()]})}),this.props.navPosition=="bottom"&&this.renderNav(),this.props.previewPosition=="bottom"&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(e){super(),Ha(this,"darkMediaCallback",()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}),Ha(this,"handleClickOutside",n=>{let{element:i}=this.props;n.target!=i&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(n))}),Ha(this,"handleBaseClick",n=>{this.state.showSkins&&(n.target.closest(".menu")||(n.preventDefault(),n.stopImmediatePropagation(),this.closeSkins()))}),Ha(this,"handleBaseKeydown",n=>{this.state.showSkins&&n.key=="Escape"&&(n.preventDefault(),n.stopImmediatePropagation(),this.closeSkins())}),Ha(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),Ha(this,"handleSearchInput",async()=>{let n=this.refs.searchInput.current;if(!n)return;let{value:i}=n,r=await Nl.search(i),o=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!r)return this.setState({searchResults:r,pos:[-1,-1]},o);let a=n.selectionStart==n.value.length?[0,0]:[-1,-1],s=[];s.setsize=r.length;let l=null;for(let c of r)(!s.length||l.length==this.getPerLine())&&(l=[],l.__categoryId="search",l.__index=s.length,s.push(l)),l.push(c);this.ignoreMouse(),this.setState({searchResults:s,pos:a},o)}),Ha(this,"handleSearchKeyDown",n=>{let i=n.currentTarget;switch(n.stopImmediatePropagation(),n.key){case"ArrowLeft":this.navigate({e:n,input:i,left:!0});break;case"ArrowRight":this.navigate({e:n,input:i,right:!0});break;case"ArrowUp":this.navigate({e:n,input:i,up:!0});break;case"ArrowDown":this.navigate({e:n,input:i,down:!0});break;case"Enter":n.preventDefault(),this.handleEmojiClick({e:n,pos:this.state.pos});break;case"Escape":n.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch();break}}),Ha(this,"clearSearch",()=>{let n=this.refs.searchInput.current;n&&(n.value="",n.focus(),this.handleSearchInput())}),Ha(this,"handleCategoryClick",({category:n,i})=>{this.scrollTo(i==0?{row:-1}:{categoryId:n.id})}),Ha(this,"openSkins",n=>{let{currentTarget:i}=n,r=i.getBoundingClientRect();this.setState({showSkins:r},async()=>{await rLe(2);let o=this.refs.menu.current;o&&(o.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))})}),this.observers=[],this.state={pos:[-1,-1],perLine:this.initDynamicPerLine(e),visibleRows:{0:!0},...this.getInitialState(e)}}},Fb=class extends _7{async connectedCallback(){let e=Nre(this.props,$c,this);e.element=this,e.ref=n=>{this.component=n},await ok(e),!this.disconnected&&Ore(ge(T7,{...e}),this.shadowRoot)}constructor(e){super(e,{styles:fre(Dre)})}};Ha(Fb,"Props",$c);typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",Fb);var Dre={};Dre=`:host { width: min-content; height: 435px; min-height: 230px; border-radius: var(--border-radius); box-shadow: var(--shadow); --border-radius: 10px; --category-icon-size: 18px; --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; --font-size: 15px; --preview-placeholder-size: 21px; --preview-title-size: 1.1em; --preview-subtitle-size: .9em; --shadow-color: 0deg 0% 0%; --shadow: .3px .5px 2.7px hsl(var(--shadow-color) / .14), .4px .8px 1px -3.2px hsl(var(--shadow-color) / .14), 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / .14); display: flex; } [data-theme="light"] { --em-rgb-color: var(--rgb-color, 34, 36, 39); --em-rgb-accent: var(--rgb-accent, 34, 102, 237); --em-rgb-background: var(--rgb-background, 255, 255, 255); --em-rgb-input: var(--rgb-input, 255, 255, 255); --em-color-border: var(--color-border, rgba(0, 0, 0, .05)); --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1)); } [data-theme="dark"] { --em-rgb-color: var(--rgb-color, 222, 222, 221); --em-rgb-accent: var(--rgb-accent, 58, 130, 247); --em-rgb-background: var(--rgb-background, 21, 22, 23); --em-rgb-input: var(--rgb-input, 0, 0, 0); --em-color-border: var(--color-border, rgba(255, 255, 255, .1)); --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2)); } #root { --color-a: rgb(var(--em-rgb-color)); --color-b: rgba(var(--em-rgb-color), .65); --color-c: rgba(var(--em-rgb-color), .45); --padding: 12px; --padding-small: calc(var(--padding) / 2); --sidebar-width: 16px; --duration: 225ms; --duration-fast: 125ms; --duration-instant: 50ms; --easing: cubic-bezier(.4, 0, .2, 1); width: 100%; text-align: left; border-radius: var(--border-radius); background-color: rgb(var(--em-rgb-background)); position: relative; } @media (prefers-reduced-motion) { #root { --duration: 0; --duration-fast: 0; --duration-instant: 0; } } #root[data-menu] button { cursor: auto; } #root[data-menu] .menu button { cursor: pointer; } :host, #root, input, button { color: rgb(var(--em-rgb-color)); font-family: var(--font-family); font-size: var(--font-size); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; line-height: normal; } *, :before, :after { box-sizing: border-box; min-width: 0; margin: 0; padding: 0; } .relative { position: relative; } .flex { display: flex; } .flex-auto { flex: none; } .flex-center { justify-content: center; } .flex-column { flex-direction: column; } .flex-grow { flex: auto; } .flex-middle { align-items: center; } .flex-wrap { flex-wrap: wrap; } .padding { padding: var(--padding); } .padding-t { padding-top: var(--padding); } .padding-lr { padding-left: var(--padding); padding-right: var(--padding); } .padding-r { padding-right: var(--padding); } .padding-small { padding: var(--padding-small); } .padding-small-b { padding-bottom: var(--padding-small); } .padding-small-lr { padding-left: var(--padding-small); padding-right: var(--padding-small); } .margin { margin: var(--padding); } .margin-r { margin-right: var(--padding); } .margin-l { margin-left: var(--padding); } .margin-small-l { margin-left: var(--padding-small); } .margin-small-lr { margin-left: var(--padding-small); margin-right: var(--padding-small); } .align-l { text-align: left; } .align-r { text-align: right; } .color-a { color: var(--color-a); } .color-b { color: var(--color-b); } .color-c { color: var(--color-c); } .ellipsis { white-space: nowrap; max-width: 100%; width: auto; text-overflow: ellipsis; overflow: hidden; } .sr-only { width: 1px; height: 1px; position: absolute; top: auto; left: -10000px; overflow: hidden; } a { cursor: pointer; color: rgb(var(--em-rgb-accent)); } a:hover { text-decoration: underline; } .spacer { height: 10px; } [dir="rtl"] .scroll { padding-left: 0; padding-right: var(--padding); } .scroll { padding-right: 0; overflow-x: hidden; overflow-y: auto; } .scroll::-webkit-scrollbar { width: var(--sidebar-width); height: var(--sidebar-width); } .scroll::-webkit-scrollbar-track { border: 0; } .scroll::-webkit-scrollbar-button { width: 0; height: 0; display: none; } .scroll::-webkit-scrollbar-corner { background-color: rgba(0, 0, 0, 0); } .scroll::-webkit-scrollbar-thumb { min-height: 20%; min-height: 65px; border: 4px solid rgb(var(--em-rgb-background)); border-radius: 8px; } .scroll::-webkit-scrollbar-thumb:hover { background-color: var(--em-color-border-over) !important; } .scroll:hover::-webkit-scrollbar-thumb { background-color: var(--em-color-border); } .sticky { z-index: 1; background-color: rgba(var(--em-rgb-background), .9); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); font-weight: 500; position: sticky; top: -1px; } [dir="rtl"] .search input[type="search"] { padding: 10px 2.2em 10px 2em; } [dir="rtl"] .search .loupe { left: auto; right: .7em; } [dir="rtl"] .search .delete { left: .7em; right: auto; } .search { z-index: 2; position: relative; } .search input, .search button { font-size: calc(var(--font-size) - 1px); } .search input[type="search"] { width: 100%; background-color: var(--em-color-border); transition-duration: var(--duration); transition-property: background-color, box-shadow; transition-timing-function: var(--easing); border: 0; border-radius: 10px; outline: 0; padding: 10px 2em 10px 2.2em; display: block; } .search input[type="search"]::-ms-input-placeholder { color: inherit; opacity: .6; } .search input[type="search"]::placeholder { color: inherit; opacity: .6; } .search input[type="search"], .search input[type="search"]::-webkit-search-decoration, .search input[type="search"]::-webkit-search-cancel-button, .search input[type="search"]::-webkit-search-results-button, .search input[type="search"]::-webkit-search-results-decoration { -webkit-appearance: none; -ms-appearance: none; appearance: none; } .search input[type="search"]:focus { background-color: rgb(var(--em-rgb-input)); box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, .2); } .search .icon { z-index: 1; color: rgba(var(--em-rgb-color), .7); position: absolute; top: 50%; transform: translateY(-50%); } .search .loupe { pointer-events: none; left: .7em; } .search .delete { right: .7em; } svg { fill: currentColor; width: 1em; height: 1em; } button { -webkit-appearance: none; -ms-appearance: none; appearance: none; cursor: pointer; color: currentColor; background-color: rgba(0, 0, 0, 0); border: 0; } #nav { z-index: 2; padding-top: 12px; padding-bottom: 12px; padding-right: var(--sidebar-width); position: relative; } #nav button { color: var(--color-b); transition: color var(--duration) var(--easing); } #nav button:hover { color: var(--color-a); } #nav svg, #nav img { width: var(--category-icon-size); height: var(--category-icon-size); } #nav[dir="rtl"] .bar { left: auto; right: 0; } #nav .bar { width: 100%; height: 3px; background-color: rgb(var(--em-rgb-accent)); transition: transform var(--duration) var(--easing); border-radius: 3px 3px 0 0; position: absolute; bottom: -12px; left: 0; } #nav button[aria-selected] { color: rgb(var(--em-rgb-accent)); } #preview { z-index: 2; padding: calc(var(--padding) + 4px) var(--padding); padding-right: var(--sidebar-width); position: relative; } #preview .preview-placeholder { font-size: var(--preview-placeholder-size); } #preview .preview-title { font-size: var(--preview-title-size); } #preview .preview-subtitle { font-size: var(--preview-subtitle-size); } #nav:before, #preview:before { content: ""; height: 2px; position: absolute; left: 0; right: 0; } #nav[data-position="top"]:before, #preview[data-position="top"]:before { background: linear-gradient(to bottom, var(--em-color-border), transparent); top: 100%; } #nav[data-position="bottom"]:before, #preview[data-position="bottom"]:before { background: linear-gradient(to top, var(--em-color-border), transparent); bottom: 100%; } .category:last-child { min-height: calc(100% + 1px); } .category button { font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif; position: relative; } .category button > * { position: relative; } .category button .background { opacity: 0; background-color: var(--em-color-border); transition: opacity var(--duration-fast) var(--easing) var(--duration-instant); position: absolute; top: 0; bottom: 0; left: 0; right: 0; } .category button:hover .background { transition-duration: var(--duration-instant); transition-delay: 0s; } .category button[aria-selected] .background { opacity: 1; } .category button[data-keyboard] .background { transition: none; } .row { width: 100%; position: absolute; top: 0; left: 0; } .skin-tone-button { border: 1px solid rgba(0, 0, 0, 0); border-radius: 100%; } .skin-tone-button:hover { border-color: var(--em-color-border); } .skin-tone-button:active .skin-tone { transform: scale(.85) !important; } .skin-tone-button .skin-tone { transition: transform var(--duration) var(--easing); } .skin-tone-button[aria-selected] { background-color: var(--em-color-border); border-top-color: rgba(0, 0, 0, .05); border-bottom-color: rgba(0, 0, 0, 0); border-left-width: 0; border-right-width: 0; } .skin-tone-button[aria-selected] .skin-tone { transform: scale(.9); } .menu { z-index: 2; white-space: nowrap; border: 1px solid var(--em-color-border); background-color: rgba(var(--em-rgb-background), .9); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition-property: opacity, transform; transition-duration: var(--duration); transition-timing-function: var(--easing); border-radius: 10px; padding: 4px; position: absolute; box-shadow: 1px 1px 5px rgba(0, 0, 0, .05); } .menu.hidden { opacity: 0; } .menu[data-position="bottom"] { transform-origin: 100% 100%; } .menu[data-position="bottom"].hidden { transform: scale(.9)rotate(-3deg)translateY(5%); } .menu[data-position="top"] { transform-origin: 100% 0; } .menu[data-position="top"].hidden { transform: scale(.9)rotate(3deg)translateY(-5%); } .menu input[type="radio"] { clip: rect(0 0 0 0); width: 1px; height: 1px; border: 0; margin: 0; padding: 0; position: absolute; overflow: hidden; } .menu input[type="radio"]:checked + .option { box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent)); } .option { width: 100%; border-radius: 6px; padding: 4px 6px; } .option:hover { color: #fff; background-color: rgb(var(--em-rgb-accent)); } .skin-tone { width: 16px; height: 16px; border-radius: 100%; display: inline-block; position: relative; overflow: hidden; } .skin-tone:after { content: ""; mix-blend-mode: overlay; background: linear-gradient(rgba(255, 255, 255, .2), rgba(0, 0, 0, 0)); border: 1px solid rgba(0, 0, 0, .8); border-radius: 100%; position: absolute; top: 0; bottom: 0; left: 0; right: 0; box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff; } .skin-tone-1 { background-color: #ffc93a; } .skin-tone-2 { background-color: #ffdab7; } .skin-tone-3 { background-color: #e7b98f; } .skin-tone-4 { background-color: #c88c61; } .skin-tone-5 { background-color: #a46134; } .skin-tone-6 { background-color: #5d4437; } [data-index] { justify-content: space-between; } [data-emoji-set="twitter"] .skin-tone:after { box-shadow: none; border-color: rgba(0, 0, 0, .5); } [data-emoji-set="twitter"] .skin-tone-1 { background-color: #fade72; } [data-emoji-set="twitter"] .skin-tone-2 { background-color: #f3dfd0; } [data-emoji-set="twitter"] .skin-tone-3 { background-color: #eed3a8; } [data-emoji-set="twitter"] .skin-tone-4 { background-color: #cfad8d; } [data-emoji-set="twitter"] .skin-tone-5 { background-color: #a8805d; } [data-emoji-set="twitter"] .skin-tone-6 { background-color: #765542; } [data-emoji-set="google"] .skin-tone:after { box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, .4); } [data-emoji-set="google"] .skin-tone-1 { background-color: #f5c748; } [data-emoji-set="google"] .skin-tone-2 { background-color: #f1d5aa; } [data-emoji-set="google"] .skin-tone-3 { background-color: #d4b48d; } [data-emoji-set="google"] .skin-tone-4 { background-color: #aa876b; } [data-emoji-set="google"] .skin-tone-5 { background-color: #916544; } [data-emoji-set="google"] .skin-tone-6 { background-color: #61493f; } [data-emoji-set="facebook"] .skin-tone:after { border-color: rgba(0, 0, 0, .4); box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff; } [data-emoji-set="facebook"] .skin-tone-1 { background-color: #f5c748; } [data-emoji-set="facebook"] .skin-tone-2 { background-color: #f1d5aa; } [data-emoji-set="facebook"] .skin-tone-3 { background-color: #d4b48d; } [data-emoji-set="facebook"] .skin-tone-4 { background-color: #aa876b; } [data-emoji-set="facebook"] .skin-tone-5 { background-color: #916544; } [data-emoji-set="facebook"] .skin-tone-6 { background-color: #61493f; } `;ok({data:lre});var wLe=function({index:t,isSelected:e,onClick:n,onMouseEnter:i,emoji:r}){let o=N.default.useRef(null);return r.ref=o,w.jsxs("li",{ref:r.ref,"aria-selected":e,className:`mb-0 flex cursor-pointer items-center gap-2 whitespace-nowrap rounded-md px-2 py-1 font-sans text-sm leading-[1.65] tracking-wide text-grey-800 dark:text-grey-200 ${e?"bg-grey-100 text-grey-900 dark:bg-grey-900 dark:text-white":""}`,"data-testid":"emoji-option-"+t,id:"emoji-option-"+t,role:"option",tabIndex:-1,onClick:n,onMouseEnter:i,children:[w.jsx("span",{className:"font-serif text-lg",children:r.skins[0].native}),w.jsx("span",{className:"truncate",children:r.id})]},r.id)};function sD(){let[t]=Oe.useLexicalComposerContext(),[e,n]=N.default.useState(null),[i,r]=N.default.useState(null),o=xIe(":",{minLength:1}),a=()=>t.getEditorState().read(()=>{let d=A.$getSelection().anchor.getNode();return!!(d&&A.$isTextNode(d)&&d.hasFormat("code"))});N.default.useEffect(()=>ct.mergeRegister(t.registerCommand(A.KEY_DOWN_COMMAND,async d=>{if(!e)return!1;if(d.key===":"){if(a()===!0)return!1;let f=await Nl.search(e);if(f.length===0)return;if(f?.[0].id===e)return s(f[0]),d.preventDefault(),!0}return!1},A.COMMAND_PRIORITY_HIGH)));let s=N.default.useCallback(d=>{t.update(()=>{let f=A.$getSelection();if(!A.$isRangeSelection(f)||d===null)return;let h=f.anchor.getNode(),g=d.id.length+1;h.spliceText(f.anchor.offset-g,g,d.skins[0].native,!0).setFormat(f.format),wi("Emoji Inserted",{method:"completed"})})},[t]);N.default.useEffect(()=>{if(!e){r(null);return}async function d(){let f=[];[")","-)"].includes(e)?f=await Nl.search("smile"):["(","-("].includes(e)?f=await Nl.search("frown"):f=await Nl.search(e),r(f)}d()},[e]);let l=N.default.useCallback((d,f,h)=>{t.update(()=>{let g=A.$getSelection();if(!A.$isRangeSelection(g)||d===null)return;f&&f.remove();let m=A.$createTextNode(d.skins[0].native);m.setFormat(g.format),g.insertNodes([m]),h(),wi("Emoji Inserted",{method:"selected"})})},[t]);N.default.useEffect(()=>{let d=f=>{f.key==="Escape"&&r(null)};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)});function c(){return{marginTop:`${window.getSelection().getRangeAt(0).getBoundingClientRect().height}px`}}return w.jsx(jIe.LexicalTypeaheadMenuPlugin,{menuRenderFn:(d,{selectedIndex:f,selectOptionAndCleanUp:h,setHighlightedIndex:g})=>d.current===null||!i||i.length===0?null:w.jsx(ep,{className:"w-[240px]",to:d.current,children:w.jsx("ul",{className:"relative z-10 max-h-[214px] select-none scroll-p-2 list-none overflow-y-auto rounded-md bg-white p-1 shadow-md dark:bg-grey-950","data-testid":"emoji-menu",style:c(),children:i.map((m,b)=>w.jsx("div",{children:w.jsx(wLe,{emoji:m,index:b,isSelected:f===b,onClick:x=>{g(b),h(m),x.stopPropagation(),x.preventDefault()},onMouseEnter:()=>{g(b)}})},m.id))})}),options:i,triggerFn:o,onQueryChange:n,onSelectOption:l})}var kLe=({text:t="Type here"})=>w.jsx("div",{className:"pointer-events-none absolute left-0 top-0 !m-0 min-w-full cursor-text font-sans text-sm font-normal leading-[24px] tracking-wide text-grey-500 dark:text-grey-800",children:t});function xLe({parentEditor:t}){let[e]=Oe.useLexicalComposerContext(),{setCaptionHasFocus:n,captionHasFocus:i,nodeKey:r,isSelected:o}=(0,N.useContext)(vn),a=(0,N.useCallback)(s=>{o&&(s.target.matches("input, textarea")||!i&&s.key.length===1&&!s.ctrlKey&&!s.metaKey&&!s.altKey&&e.focus())},[e,i,o]);return N.default.useEffect(()=>(document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}),[a,e]),N.default.useEffect(()=>ct.mergeRegister(e.registerCommand(A.FOCUS_COMMAND,()=>(n(!0),!1),A.COMMAND_PRIORITY_LOW),e.registerCommand(A.BLUR_COMMAND,()=>(n(!1),!1),A.COMMAND_PRIORITY_LOW),e.registerCommand(A.KEY_ENTER_COMMAND,s=>document.querySelector("#typeahead-menu")||s.shiftKey?!1:(s._fromNested=!0,e._parentEditor.dispatchCommand(A.KEY_ENTER_COMMAND,s),!0),A.COMMAND_PRIORITY_LOW),e.registerCommand(A.KEY_ARROW_DOWN_COMMAND,s=>document.querySelector("#typeahead-menu")?!1:(s._fromCaptionEditor=!0,e._parentEditor.dispatchCommand(A.KEY_ARROW_DOWN_COMMAND,s),!0),A.COMMAND_PRIORITY_HIGH),e.registerCommand(A.KEY_ARROW_UP_COMMAND,s=>document.querySelector("#typeahead-menu")?!1:(s._fromCaptionEditor=!0,e._parentEditor.dispatchCommand(A.KEY_ARROW_UP_COMMAND,s),!0),A.COMMAND_PRIORITY_HIGH)),[e,n,t,r]),null}var _Le=({paragraphs:t=1,captionEditor:e,captionEditorInitialState:n,placeholderText:i,className:r="koenig-lexical-caption"})=>{let[o]=Oe.useLexicalComposerContext();return w.jsx(pfe,{initialEditor:e,initialEditorState:n,initialNodes:Mr,children:w.jsxs(fI,{className:r,markdownTransformers:Wle,placeholder:w.jsx(kLe,{text:i}),children:[w.jsx(xLe,{parentEditor:o}),w.jsx(ZC,{paragraphs:t}),w.jsx(sD,{})]})})};function eS({value:t,onChange:e,...n}){let i=r=>{e(r)};return w.jsx("input",{defaultValue:t,onChange:i,...n})}var ef={},po=A;function lD(t,e=!0){return t?!1:(t=Ire(),e&&(t=t.trim()),t==="")}function Ire(){return po.$getRoot().getTextContent()}function Lre(t){if(!lD(t,!1))return!1;t=po.$getRoot().getChildren();let e=t.length;if(1Lre(t)};ef.$findTextIntersectionFromCharacters=function(t,e){var n=t.getFirstChild();t=0;e:for(;n!==null;){if(po.$isElementNode(n)){var i=n.getFirstChild();if(i!==null){n=i;continue}}else if(po.$isTextNode(n)){if(i=n.getTextContentSize(),t+i>e)return{node:n,offset:e-t};t+=i}if(i=n.getNextSibling(),i!==null)n=i;else{for(n=n.getParent();n!==null;){if(i=n.getNextSibling(),i!==null){n=i;continue e}n=n.getParent()}break}}return null};ef.$isRootTextContentEmpty=lD;ef.$isRootTextContentEmptyCurry=function(t,e){return()=>lD(t,e)};ef.$rootTextContent=Ire;ef.registerLexicalTextEntity=function(t,e,n,i){let r=a=>{let s=po.$createTextNode(a.getTextContent());s.setFormat(a.getFormat()),a.replace(s)},o=t.registerNodeTransform(po.TextNode,a=>{if(a.isSimpleText()){var s=a.getPreviousSibling(),l=a.getTextContent(),c=a;if(po.$isTextNode(s)){var d=s.getTextContent(),f=e(d+l);if(s instanceof n){if(f===null||s.getLatest().__mode!==0){r(s);return}if(f=f.end-d.length,0{var s=a.getTextContent();let l=e(s);l===null||l.start!==0?r(a):s.length>l.end?a.splitText(l.end):(s=a.getPreviousSibling(),po.$isTextNode(s)&&s.isTextEntity()&&(r(s),r(a)),s=a.getNextSibling(),po.$isTextNode(s)&&s.isTextEntity()&&(r(s),a instanceof n&&r(a)))}),[o,t]};var OLe=ef,is=OLe;function rs(t){return(t._pendingEditorState||t.getEditorState()).read(is.$canShowPlaceholderCurry(!1))}function SLe({captionEditor:t,captionEditorInitialState:e,placeholder:n,dataTestId:i}){return w.jsx("div",{className:"m-0 w-full px-9 text-center","data-testid":i,"data-kg-allow-clickthrough":!0,children:w.jsx(_Le,{captionEditor:t,captionEditorInitialState:e,placeholderText:n})})}function CLe({value:t,placeholder:e,onChange:n,readOnly:i,dataTestId:r,autoFocus:o=!0}){let a=s=>{n?.(s.target.value)};return w.jsx(eS,{autoFocus:o,className:"not-kg-prose w-full bg-transparent px-9 text-center font-sans text-sm font-normal leading-[1.625] tracking-wide text-grey-800 placeholder:text-grey-500 dark:text-grey-500 dark:placeholder:text-grey-800","data-testid":r,placeholder:e,readOnly:i,value:t,"data-koenig-dnd-disabled":!0,onChange:a})}function ELe({isEditingAlt:t,onClick:e}){return w.jsx("button",{className:`absolute bottom-0 right-0 m-2 cursor-pointer rounded-md border px-1 font-sans text-[1.3rem] font-normal leading-7 tracking-wide transition-all duration-100 ${t?"border-green bg-green text-white":"border-grey text-grey"} `,"data-testid":"alt-toggle-button",name:"alt-toggle-button",type:"button",onClick:e,children:"Alt"})}function A0({altText:t,altTextPlaceholder:e,setAltText:n,captionEditor:i,captionEditorInitialState:r,captionPlaceholder:o,isSelected:a,readOnly:s,dataTestId:l}){let[c,d]=N.default.useState(!1),f=m=>{m.stopPropagation(),d(!c)};N.default.useEffect(()=>{a||d(!1)},[a,d]);let h=rs(i),g=n&&a;return(a||!h)&&w.jsxs("figcaption",{className:"flex min-h-[40px] w-full p-2",children:[c?w.jsx(CLe,{dataTestId:l,placeholder:e,readOnly:s,value:t,onChange:n}):w.jsx(SLe,{captionEditor:i,captionEditorInitialState:r,dataTestId:l,placeholder:o}),g&&w.jsx(ELe,{isEditingAlt:c,onClick:f})]})}var M7=class t{constructor(e,n,i,r,o,a,s,l,c,d=0,f){this.p=e,this.stack=n,this.state=i,this.reducePos=r,this.pos=o,this.score=a,this.buffer=s,this.bufferBase=l,this.curContext=c,this.lookAhead=d,this.parent=f}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new t(e,[],n,i,i,0,[],0,r?new tS(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:o}=this.p,a=o.dynamicPrecedence(r);if(a&&(this.score+=a),i==0){this.pushState(o.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizes;)this.stack.pop();this.reduceContext(r,l)}storeNode(e,n,i,r=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&a.buffer[s-4]==0&&a.buffer[s-1]>-1){if(n==i)return;if(a.buffer[s-2]>=n){a.buffer[s-2]=i;return}}}if(!o||this.pos==i)this.buffer.push(e,n,i,r);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0)for(;a>0&&this.buffer[a-2]>i;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,r>4&&(r-=4);this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=i,this.buffer[a+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4);else{let o=e,{parser:a}=this.p;(r>this.pos||n<=a.maxNode)&&(this.pos=r,a.stateFlag(o,1)||(this.reducePos=r)),this.pushState(o,i),this.shiftContext(n,i),n<=a.maxNode&&this.buffer.push(n,i,r,4)}}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new t(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new N7(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if(!(i&65536))return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let o=0,a;ol&1&&s==a)||r.push(n[o],a)}n=r}let i=[];for(let r=0;r>19,r=n&65535,o=this.stack.length-i*3;if(o<0||e.getGoto(this.stack[o],r,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,o)=>{if(!n.includes(r))return n.push(r),e.allActions(r,a=>{if(!(a&393216))if(a&65536){let s=(a>>19)-o;if(s>1){let l=a&65535,c=this.stack.length-s*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return s<<19|65536|l}}else{let s=i(a,o+1);if(s!=null)return s}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},tS=class{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}},N7=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}},P7=class t{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new t(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.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 t(this.stack,this.pos,this.index)}};function uy(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,s=!0),o+=l,s)break;o*=46}n?n[r++]=o:n=new e(o)}return n}var um=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},Kq=new um,A7=class{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Kq,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,o=this.pos+e;for(;oi.to:o>=i.to;){if(r==this.ranges.length-1)return null;let a=this.ranges[++r];o+=a.from-i.to,i=a}return o}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n=this.chunk2Pos&&is.to&&(this.chunk2=this.chunk2.slice(0,s.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,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(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,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(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Kq,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}},ku=class{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;jre(this.data,e,n,this.id,i.data,i.tokenPrecTable)}};ku.prototype.contextual=ku.prototype.fallback=ku.prototype.extend=!1;var Lm=class{constructor(e,n,i){this.precTable=n,this.elseToken=i,this.data=typeof e=="string"?uy(e):e}token(e,n){let i=e.pos,r=0;for(;;){let o=e.next<0,a=e.resolveOffset(1,1);if(jre(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||r++,a==null)break;e.reset(a,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}};Lm.prototype.contextual=ku.prototype.fallback=ku.prototype.extend=!1;var Pa=class{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}};function jre(t,e,n,i,r,o){let a=0,s=1<0){let m=t[g];if(l.allows(m)&&(e.token.value==-1||e.token.value==m||TLe(m,e.token.value,r,o))){e.acceptToken(m);break}}let d=e.next,f=0,h=t[a+2];if(e.next<0&&h>f&&t[c+h*3-3]==65535){a=t[c+h*3-1];continue e}for(;f>1,m=c+g+(g<<1),b=t[m],x=t[m+1]||65536;if(d=x)f=g+1;else{a=t[m+2],e.advance();continue e}}break}}function Jq(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function TLe(t,e,n,i){let r=Jq(n,i,e);return r<0||Jq(n,i,t)e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}var $7=class{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?eU(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?eU(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=a,null;if(o instanceof ci){if(a==e){if(a=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+o.length}}},D7=class{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new um)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:o}=r,a=r.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let c=0;cf.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let h=n;if(f.extended>-1&&(n=this.addActions(e,f.extended,f.end,n)),n=this.addActions(e,f.value,f.end,n),!d.extend&&(i=f,n>h))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!i&&e.pos==this.stream.end&&(i=new um,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new um,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:o}=i.p;for(let a=0;a=0&&i.p.parser.dialect.allows(s>>1)){s&1?e.extended=s>>1:e.value=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let o=0;oe.bufferLength*4?new $7(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,o;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;an)i.push(s);else{if(this.advanceStack(s,i,e))continue;{r||(r=[],o=[]),r.push(s);let l=this.tokens.getMainToken(s);o.push(l.value,l.end)}}break}}if(!i.length){let a=r&&MLe(r);if(a)return aa&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw aa&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let a=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,o,i);if(a)return aa&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(i.length>a)for(i.sort((s,l)=>l.score-s.score);i.length>a;)i.pop();i.some(s=>s.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let a=0;a500&&c.buffer.length>500)if((s.score-c.score||s.buffer.length-c.buffer.length)>0)i.splice(l--,1);else{i.splice(a--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let a=1;a ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,d=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(r);f;){let h=this.parser.nodeSet.types[f.type.id]==f.type?o.getGoto(e.state,f.type.id):-1;if(h>-1&&f.length&&(!c||(f.prop(St.contextHash)||0)==d))return e.useNode(f,h),aa&&console.log(a+this.stackID(e)+` (via reuse of ${o.getName(f.type.id)})`),!0;if(!(f instanceof ci)||f.children.length==0||f.positions[0]>0)break;let g=f.children[0];if(g instanceof ci&&f.positions[0]==0)f=g;else break}}let s=o.stateSlot(e.state,4);if(s>0)return e.reduce(s),aa&&console.log(a+this.stackID(e)+` (via always-reduce ${o.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;cr?n.push(m):i.push(m)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return tU(e,n),!0}}runRecovery(e,n,i){let r=null,o=!1;for(let a=0;a ":"";if(s.deadEnd&&(o||(o=!0,s.restart(),aa&&console.log(d+this.stackID(s)+" (restarted)"),this.advanceFully(s,i))))continue;let f=s.split(),h=d;for(let g=0;f.forceReduce()&&g<10&&(aa&&console.log(h+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));g++)aa&&(h=this.stackID(f)+" -> ");for(let g of s.recoverByInsert(l))aa&&console.log(d+this.stackID(g)+" (via recover-insert)"),this.advanceFully(g,i);this.stream.end>s.pos?(c==s.pos&&(c++,l=0),s.recoverByDelete(l,c),aa&&console.log(d+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),tU(s,i)):(!r||r.scoret,nS=class{constructor(e){this.start=e.start,this.shift=e.shift||S8,this.reduce=e.reduce||S8,this.reuse=e.reuse||S8,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},zb=class t extends k3{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let s=0;se.topRules[s][1]),r=[];for(let s=0;s=0)o(d,l,s[c++]);else{let f=s[c+-d];for(let h=-d;h>0;h--)o(s[c++],l,f);c++}}}this.nodeSet=new $N(n.map((s,l)=>_o.define({name:l>=this.minRepeatTerm?void 0:s,id:l,props:r[l],top:i.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Ane;let a=uy(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;stypeof s=="number"?new ku(a,s):s),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new I7(this,e,n,i);for(let o of this.wrappers)r=o(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let o=r[n+1];;){let a=r[o++],s=a&1,l=r[o++];if(s&&i)return l;for(let c=o+(a>>1);o0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let o=this.stateSlot(e,1);r==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=Ac(this.data,o+2);else break;r=n(Ac(this.data,o+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Ac(this.data,i+2);else break;if(!(this.data[i+2]&1)){let r=this.data[i+1];n.some((o,a)=>a&1&&o==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(t.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(o=>o.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let o=e.specializers.find(s=>s.from==i.external);if(!o)return i;let a=Object.assign(Object.assign({},i),{external:o.to});return n.specializers[r]=nU(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let o of e.split(" ")){let a=n.indexOf(o);a>=0&&(i[a]=!0)}let r=null;for(let o=0;oi)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,i)<<1|e}return t.get}var NLe=101,iU=1,PLe=102,ALe=103,rU=2,Rre=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],$Le=58,DLe=40,Fre=95,ILe=91,U_=45,LLe=46,jLe=35,RLe=37,FLe=38,zLe=92,QLe=10;function Qb(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function zre(t){return t>=48&&t<=57}var WLe=new Pa((t,e)=>{for(let n=!1,i=0,r=0;;r++){let{next:o}=t;if(Qb(o)||o==U_||o==Fre||n&&zre(o))!n&&(o!=U_||r>0)&&(n=!0),i===r&&o==U_&&i++,t.advance();else if(o==zLe&&t.peek(1)!=QLe)t.advance(),t.next>-1&&t.advance(),n=!0;else{n&&t.acceptToken(o==DLe?PLe:i==2&&e.canShift(rU)?rU:ALe);break}}}),BLe=new Pa(t=>{if(Rre.includes(t.peek(-1))){let{next:e}=t;(Qb(e)||e==Fre||e==jLe||e==LLe||e==ILe||e==$Le&&Qb(t.peek(1))||e==U_||e==FLe)&&t.acceptToken(NLe)}}),HLe=new Pa(t=>{if(!Rre.includes(t.peek(-1))){let{next:e}=t;if(e==RLe&&(t.advance(),t.acceptToken(iU)),Qb(e)){do t.advance();while(Qb(t.next)||zre(t.next));t.acceptToken(iU)}}}),ZLe=M4({"AtKeyword import charset namespace keyframes media supports":Y.definitionKeyword,"from to selector":Y.keyword,NamespaceName:Y.namespace,KeyframeName:Y.labelName,KeyframeRangeName:Y.operatorKeyword,TagName:Y.tagName,ClassName:Y.className,PseudoClassName:Y.constant(Y.className),IdName:Y.labelName,"FeatureName PropertyName":Y.propertyName,AttributeName:Y.attributeName,NumberLiteral:Y.number,KeywordQuery:Y.keyword,UnaryQueryOp:Y.operatorKeyword,"CallTag ValueName":Y.atom,VariableName:Y.variableName,Callee:Y.operatorKeyword,Unit:Y.unit,"UniversalSelector NestingSelector":Y.definitionOperator,MatchOp:Y.compareOperator,"ChildOp SiblingOp, LogicOp":Y.logicOperator,BinOp:Y.arithmeticOperator,Important:Y.modifier,Comment:Y.blockComment,ColorLiteral:Y.color,"ParenthesizedContent StringLiteral":Y.string,":":Y.punctuation,"PseudoOp #":Y.derefOperator,"; ,":Y.separator,"( )":Y.paren,"[ ]":Y.squareBracket,"{ }":Y.brace}),qLe={__proto__:null,lang:34,"nth-child":34,"nth-last-child":34,"nth-of-type":34,"nth-last-of-type":34,dir:34,"host-context":34,url:62,"url-prefix":62,domain:62,regexp:62,selector:140},ULe={__proto__:null,"@import":120,"@media":144,"@charset":148,"@namespace":152,"@keyframes":158,"@supports":170},VLe={__proto__:null,not:134,only:134},YLe=zb.deserialize({version:14,states:":|QYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$[QXO'#CaO$fQ[O'#CiO$qQ[O'#DUO$vQ[O'#DXOOQP'#Eo'#EoO${QdO'#DhO%jQ[O'#DuO${QdO'#DwO%{Q[O'#DyO&WQ[O'#D|O&`Q[O'#ESO&nQ[O'#EUOOQS'#En'#EnOOQS'#EX'#EXQYQ[OOO&uQXO'#CdO'jQWO'#DdO'oQWO'#EtO'zQ[O'#EtQOQWOOP(UO#tO'#C_POOO)C@^)C@^OOQP'#Ch'#ChOOQP,59Q,59QO#kQ[O,59QO(aQ[O,59TO$qQ[O,59pO$vQ[O,59sO(lQ[O,59vO(lQ[O,59xO(lQ[O,59yO(lQ[O'#E^O)WQWO,58{O)`Q[O'#DcOOQS,58{,58{OOQP'#Cl'#ClOOQO'#DS'#DSOOQP,59T,59TO)gQWO,59TO)lQWO,59TOOQP'#DW'#DWOOQP,59p,59pOOQO'#DY'#DYO)qQ`O,59sOOQS'#Cq'#CqO${QdO'#CrO)yQvO'#CtO+ZQtO,5:SOOQO'#Cy'#CyO)lQWO'#CxO+oQWO'#CzO+tQ[O'#DPOOQS'#Eq'#EqOOQO'#Dk'#DkO+|Q[O'#DrO,[QWO'#EuO&`Q[O'#DpO,jQWO'#DsOOQO'#Ev'#EvO)ZQWO,5:aO,oQpO,5:cOOQS'#D{'#D{O,wQWO,5:eO,|Q[O,5:eOOQO'#EO'#EOO-UQWO,5:hO-ZQWO,5:nO-cQWO,5:pOOQS-E8V-E8VO-kQdO,5:OO-{Q[O'#E`O.YQWO,5;`O.YQWO,5;`POOO'#EW'#EWP.eO#tO,58yPOOO,58y,58yOOQP1G.l1G.lOOQP1G.o1G.oO)gQWO1G.oO)lQWO1G.oOOQP1G/[1G/[O.pQ`O1G/_O/ZQXO1G/bO/qQXO1G/dO0XQXO1G/eO0oQXO,5:xOOQO-E8[-E8[OOQS1G.g1G.gO0yQWO,59}O1OQ[O'#DTO1VQdO'#CpOOQP1G/_1G/_O${QdO1G/_O1^QpO,59^OOQS,59`,59`O${QdO,59bO1fQWO1G/nOOQS,59d,59dO1kQ!bO,59fOOQS'#DQ'#DQOOQS'#EZ'#EZO1vQ[O,59kOOQS,59k,59kO2OQWO'#DkO2ZQWO,5:WO2`QWO,5:^O&`Q[O,5:YO2hQ[O'#EaO3PQWO,5;aO3[QWO,5:[O(lQ[O,5:_OOQS1G/{1G/{OOQS1G/}1G/}OOQS1G0P1G0PO3mQWO1G0PO3rQdO'#EPOOQS1G0S1G0SOOQS1G0Y1G0YOOQS1G0[1G0[O3}QtO1G/jOOQO1G/j1G/jOOQO,5:z,5:zO4eQ[O,5:zOOQO-E8^-E8^O4rQWO1G0zPOOO-E8U-E8UPOOO1G.e1G.eOOQP7+$Z7+$ZOOQP7+$y7+$yO${QdO7+$yOOQS1G/i1G/iO4}QXO'#EsO5XQWO,59oO5^QtO'#EYO6UQdO'#EpO6`QWO,59[O6eQpO7+$yOOQS1G.x1G.xOOQS1G.|1G.|OOQS7+%Y7+%YOOQS1G/Q1G/QO6mQWO1G/QOOQS-E8X-E8XOOQS1G/V1G/VO${QdO1G/rOOQO1G/x1G/xOOQO1G/t1G/tO6rQWO,5:{OOQO-E8_-E8_O7QQXO1G/yOOQS7+%k7+%kO7XQYO'#CtOOQO'#ER'#ERO7dQ`O'#EQOOQO'#EQ'#EQO7oQWO'#EbO7wQdO,5:kOOQS,5:k,5:kO8SQtO'#E_O${QdO'#E_O9TQdO7+%UOOQO7+%U7+%UOOQO1G0f1G0fO9hQpO<PAN>PO;nQXO,5:wOOQO-E8Z-E8ZO;xQdO,5:vOOQO-E8Y-E8YOOQO<T![;'S%^;'S;=`%o<%lO%^l;TUp`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYp`#f[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[p`#f[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSu^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWkWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VUZQOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTkWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSp`#^~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#f[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU^QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S_Qp`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!Z^Oy%^z;'S%^;'S;=`%o<%lO%^dCoS}SOy%^z;'S%^;'S;=`%o<%lO%^bDQU!PQOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS!PQp`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[!]Qp`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSr^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSq^Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUp`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!cQp`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!UUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!T^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!SQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[BLe,HLe,WLe,1,2,3,4,new Lm("m~RRYZ[z{a~~g~aO#`~~dP!P!Qg~lO#a~~",28,107)],topRules:{StyleSheet:[0,4],Styles:[1,87]},specialized:[{term:102,get:t=>qLe[t]||-1},{term:59,get:t=>ULe[t]||-1},{term:103,get:t=>VLe[t]||-1}],tokenPrec:1246}),C8=null;function E8(){if(!C8&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let i in t)i!="cssText"&&i!="cssFloat"&&typeof t[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),n.has(i)||(e.push(i),n.add(i)));C8=e.sort().map(i=>({type:"property",label:i,apply:i+": "}))}return C8||[]}var oU=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),aU=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),XLe=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),GLe=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),Oc=/^(\w[\w-]*|-\w[\w-]*|)$/,KLe=/^-(-[\w-]*)?$/;function JLe(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let i=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return i?.name!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}var sU=new w3,eje=["Declaration"];function tje(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function Qre(t,e,n){if(e.to-e.from>4096){let i=sU.get(e);if(i)return i;let r=[],o=new Set,a=e.cursor(hn.IncludeAnonymous);if(a.firstChild())do for(let s of Qre(t,a.node,n))o.has(s.label)||(o.add(s.label),r.push(s));while(a.nextSibling());return sU.set(e,r),r}else{let i=[],r=new Set;return e.cursor().iterate(o=>{var a;if(n(o)&&o.matchContext(eje)&&((a=o.node.nextSibling)===null||a===void 0?void 0:a.name)==":"){let s=t.sliceString(o.from,o.to);r.has(s)||(r.add(s),i.push({label:s,type:"variable"}))}}),i}}var nje=t=>e=>{let{state:n,pos:i}=e,r=ui(n).resolveInner(i,-1),o=r.type.isError&&r.from==r.to-1&&n.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(o||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:E8(),validFor:Oc};if(r.name=="ValueName")return{from:r.from,options:aU,validFor:Oc};if(r.name=="PseudoClassName")return{from:r.from,options:oU,validFor:Oc};if(t(r)||(e.explicit||o)&&JLe(r,n.doc))return{from:t(r)||o?r.from:i,options:Qre(n.doc,tje(r),t),validFor:KLe};if(r.name=="TagName"){for(let{parent:l}=r;l;l=l.parent)if(l.name=="Block")return{from:r.from,options:E8(),validFor:Oc};return{from:r.from,options:XLe,validFor:Oc}}if(r.name=="AtKeyword")return{from:r.from,options:GLe,validFor:Oc};if(!e.explicit)return null;let a=r.resolve(i),s=a.childBefore(i);return s&&s.name==":"&&a.name=="PseudoClassSelector"?{from:i,options:oU,validFor:Oc}:s&&s.name==":"&&a.name=="Declaration"||a.name=="ArgList"?{from:i,options:aU,validFor:Oc}:a.name=="Block"||a.name=="Styles"?{from:i,options:E8(),validFor:Oc}:null},ije=nje(t=>t.name=="VariableName"),iS=Pb.define({name:"css",parser:YLe.configure({props:[N4.add({Declaration:B_()}),P4.add({"Block KeyframeList":Qne})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Wre(){return new $b(iS,iS.data.of({autocomplete:ije}))}var rje=55,oje=1,aje=56,sje=2,lje=57,cje=3,lU=4,dje=5,cD=6,Bre=7,Hre=8,Zre=9,qre=10,uje=11,fje=12,hje=13,T8=58,pje=14,gje=15,cU=59,Ure=21,mje=23,Vre=24,vje=25,j7=27,Yre=28,yje=29,bje=32,wje=35,kje=37,xje=38,_je=0,Oje=1,Sje={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Cje={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},dU={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Eje(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}var uU=null,fU=null,hU=0;function R7(t,e){let n=t.pos+e;if(hU==n&&fU==t)return uU;let i=t.peek(e),r="";for(;Eje(i);)r+=String.fromCharCode(i),i=t.peek(++e);return fU=t,hU=n,uU=r?r.toLowerCase():i==Tje||i==Mje?void 0:null}var Xre=60,rS=62,dD=47,Tje=63,Mje=33,Nje=45;function pU(t,e){this.name=t,this.parent=e}var Pje=[cD,qre,Bre,Hre,Zre],Aje=new nS({start:null,shift(t,e,n,i){return Pje.indexOf(e)>-1?new pU(R7(i,1)||"",t):t},reduce(t,e){return e==Ure&&t?t.parent:t},reuse(t,e,n,i){let r=e.type.id;return r==cD||r==kje?new pU(R7(i,1)||"",t):t},strict:!1}),$je=new Pa((t,e)=>{if(t.next!=Xre){t.next<0&&e.context&&t.acceptToken(T8);return}t.advance();let n=t.next==dD;n&&t.advance();let i=R7(t,0);if(i===void 0)return;if(!i)return t.acceptToken(n?gje:pje);let r=e.context?e.context.name:null;if(n){if(i==r)return t.acceptToken(uje);if(r&&Cje[r])return t.acceptToken(T8,-2);if(e.dialectEnabled(_je))return t.acceptToken(fje);for(let o=e.context;o;o=o.parent)if(o.name==i)return;t.acceptToken(hje)}else{if(i=="script")return t.acceptToken(Bre);if(i=="style")return t.acceptToken(Hre);if(i=="textarea")return t.acceptToken(Zre);if(Sje.hasOwnProperty(i))return t.acceptToken(qre);r&&dU[r]&&dU[r][i]?t.acceptToken(T8,-1):t.acceptToken(cD)}},{contextual:!0}),Dje=new Pa(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(cU);break}if(t.next==Nje)e++;else if(t.next==rS&&e>=2){n>=3&&t.acceptToken(cU,-2);break}else e=0;t.advance()}});function Ije(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}var Lje=new Pa((t,e)=>{if(t.next==dD&&t.peek(1)==rS){let n=e.dialectEnabled(Oje)||Ije(e.context);t.acceptToken(n?dje:lU,2)}else t.next==rS&&t.acceptToken(lU,1)});function uD(t,e,n){let i=2+t.length;return new Pa(r=>{for(let o=0,a=0,s=0;;s++){if(r.next<0){s&&r.acceptToken(e);break}if(o==0&&r.next==Xre||o==1&&r.next==dD||o>=2&&oa?r.acceptToken(e,-a):r.acceptToken(n,-(a-2));break}else if((r.next==10||r.next==13)&&s){r.acceptToken(e,1);break}else o=a=0;r.advance()}})}var jje=uD("script",rje,oje),Rje=uD("style",aje,sje),Fje=uD("textarea",lje,cje),zje=M4({"Text RawText IncompleteTag IncompleteCloseTag":Y.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":Y.angleBracket,TagName:Y.tagName,"MismatchedCloseTag/TagName":[Y.tagName,Y.invalid],AttributeName:Y.attributeName,"AttributeValue UnquotedAttributeValue":Y.attributeValue,Is:Y.definitionOperator,"EntityReference CharacterReference":Y.character,Comment:Y.blockComment,ProcessingInst:Y.processingInstruction,DoctypeDecl:Y.documentMeta}),Qje=zb.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q1G/QOOO`1G/T1G/TOOO`1G/W1G/WOOOO'#D]'#D]O+eO7[O,59cOOQW,59c,59cOOOO'#D^'#D^O+vOMhO,59cOOOO-E7Z-E7ZOOQW1G.}1G.}OOOO-E7[-E7[",stateData:",c~O!_OS~OUSOVPOWQOXROYTO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"\u26A0 StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:Aje,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[zje],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbiSlWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXiSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TalWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOc!R!RAwP;=`<%lAY!ZBRYlWc!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbiSlWc!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbiSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXiSc!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!cxaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYliSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_kiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_XaP!b`!dp!fQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZiSgQaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!b`!dpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!b`!dp!ePOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!b`!dpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!b`!dpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!b`!dpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!b`!dpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!b`!dpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!b`!dpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!b`!dpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!dpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO|PP!-nP;=`<%l!-Sq!-xS!dp|POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!b`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!b`|POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!b`!dp|POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!b`!dpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!b`!dpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!b`!dpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!b`!dpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!b`!dpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let c=s.type.id;if(c==yje)return M8(s,l,n);if(c==bje)return M8(s,l,i);if(c==wje)return M8(s,l,r);if(c==Ure&&o.length){let d=s.node,f=d.firstChild,h=f&&gU(f,l),g;if(h){for(let m of o)if(m.tag==h&&(!m.attrs||m.attrs(g||(g=Gre(f,l))))){let b=d.lastChild,x=b.type.id==xje?b.from:d.to;if(x>f.to)return{parser:m.parser,overlay:[{from:f.to,to:x}]}}}}if(a&&c==Vre){let d=s.node,f;if(f=d.firstChild){let h=a[l.read(f.from,f.to)];if(h)for(let g of h){if(g.tagName&&g.tagName!=gU(d.parent,l))continue;let m=d.lastChild;if(m.type.id==j7){let b=m.from+1,x=m.lastChild,_=m.to-(x&&x.isError?0:1);if(_>b)return{parser:g.parser,overlay:[{from:b,to:_}]}}else if(m.type.id==Yre)return{parser:g.parser,overlay:[{from:m.from,to:m.to}]}}}}return null})}var Wje=309,mU=1,Bje=2,Hje=3,Zje=310,qje=312,Uje=313,Vje=4,Yje=5,Xje=0,F7=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Jre=125,Gje=59,z7=47,Kje=42,Jje=43,eRe=45,tRe=60,nRe=44,iRe=new nS({start:!1,shift(t,e){return e==Vje||e==Yje||e==qje?t:e==Uje},strict:!1}),rRe=new Pa((t,e)=>{let{next:n}=t;(n==Jre||n==-1||e.context)&&t.acceptToken(Zje)},{contextual:!0,fallback:!0}),oRe=new Pa((t,e)=>{let{next:n}=t,i;F7.indexOf(n)>-1||n==z7&&((i=t.peek(1))==z7||i==Kje)||n!=Jre&&n!=Gje&&n!=-1&&!e.context&&t.acceptToken(Wje)},{contextual:!0}),aRe=new Pa((t,e)=>{let{next:n}=t;if((n==Jje||n==eRe)&&(t.advance(),n==t.next)){t.advance();let i=!e.context&&e.canShift(mU);t.acceptToken(i?mU:Bje)}},{contextual:!0});function N8(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}var sRe=new Pa((t,e)=>{if(t.next!=tRe||!e.dialectEnabled(Xje)||(t.advance(),t.next==z7))return;let n=0;for(;F7.indexOf(t.next)>-1;)t.advance(),n++;if(N8(t.next,!0)){for(t.advance(),n++;N8(t.next,!1);)t.advance(),n++;for(;F7.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==nRe)return;for(let i=0;;i++){if(i==7){if(!N8(t.next,!0))return;break}if(t.next!="extends".charCodeAt(i))break;t.advance(),n++}}t.acceptToken(Hje,-n)}),lRe=M4({"get set async static":Y.modifier,"for while do if else switch try catch finally return throw break continue default case":Y.controlKeyword,"in of await yield void typeof delete instanceof":Y.operatorKeyword,"let var const using function class extends":Y.definitionKeyword,"import export from":Y.moduleKeyword,"with debugger as new":Y.keyword,TemplateString:Y.special(Y.string),super:Y.atom,BooleanLiteral:Y.bool,this:Y.self,null:Y.null,Star:Y.modifier,VariableName:Y.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Y.function(Y.variableName),VariableDefinition:Y.definition(Y.variableName),Label:Y.labelName,PropertyName:Y.propertyName,PrivatePropertyName:Y.special(Y.propertyName),"CallExpression/MemberExpression/PropertyName":Y.function(Y.propertyName),"FunctionDeclaration/VariableDefinition":Y.function(Y.definition(Y.variableName)),"ClassDeclaration/VariableDefinition":Y.definition(Y.className),PropertyDefinition:Y.definition(Y.propertyName),PrivatePropertyDefinition:Y.definition(Y.special(Y.propertyName)),UpdateOp:Y.updateOperator,"LineComment Hashbang":Y.lineComment,BlockComment:Y.blockComment,Number:Y.number,String:Y.string,Escape:Y.escape,ArithOp:Y.arithmeticOperator,LogicOp:Y.logicOperator,BitOp:Y.bitwiseOperator,CompareOp:Y.compareOperator,RegExp:Y.regexp,Equals:Y.definitionOperator,Arrow:Y.function(Y.punctuation),": Spread":Y.punctuation,"( )":Y.paren,"[ ]":Y.squareBracket,"{ }":Y.brace,"InterpolationStart InterpolationEnd":Y.special(Y.brace),".":Y.derefOperator,", ;":Y.separator,"@":Y.meta,TypeName:Y.typeName,TypeDefinition:Y.definition(Y.typeName),"type enum interface implements namespace module declare":Y.definitionKeyword,"abstract global Privacy readonly override":Y.modifier,"is keyof unique infer":Y.operatorKeyword,JSXAttributeValue:Y.attributeValue,JSXText:Y.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Y.angleBracket,"JSXIdentifier JSXNameSpacedName":Y.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Y.attributeName,"JSXBuiltin/JSXIdentifier":Y.standard(Y.tagName)}),cRe={__proto__:null,export:18,as:23,from:31,default:34,async:39,function:40,extends:52,this:56,true:64,false:64,null:76,void:80,typeof:84,super:102,new:136,delete:152,yield:161,await:165,class:170,public:227,private:227,protected:227,readonly:229,instanceof:248,satisfies:251,in:252,const:254,import:286,keyof:339,unique:343,infer:349,is:385,abstract:405,implements:407,type:409,let:412,var:414,using:417,interface:423,enum:427,namespace:433,module:435,declare:439,global:443,for:462,of:471,while:474,with:478,do:482,if:486,else:488,switch:492,case:498,try:504,catch:508,finally:512,return:516,throw:520,break:524,continue:528,debugger:532},dRe={__proto__:null,async:123,get:125,set:127,declare:187,public:189,private:189,protected:189,static:191,abstract:193,override:195,readonly:201,accessor:203,new:389},uRe={__proto__:null,"<":143},fRe=zb.deserialize({version:14,states:"$RQWO'#CdO>cQWO'#H[O>kQWO'#HbO>kQWO'#HdO`Q^O'#HfO>kQWO'#HhO>kQWO'#HkO>pQWO'#HqO>uQ07iO'#HwO%[Q^O'#HyO?QQ07iO'#H{O?]Q07iO'#H}O9kQ07hO'#IPO?hQ08SO'#ChO@jQ`O'#DiQOQWOOO%[Q^O'#EPOAQQWO'#ESO:RQ7[O'#EjOA]QWO'#EjOAhQpO'#FbOOQU'#Cf'#CfOOQ07`'#Dn'#DnOOQ07`'#Jm'#JmO%[Q^O'#JmOOQO'#Jq'#JqOOQO'#Ib'#IbOBhQ`O'#EcOOQ07`'#Eb'#EbOCdQ07pO'#EcOCnQ`O'#EVOOQO'#Jp'#JpODSQ`O'#JqOEaQ`O'#EVOCnQ`O'#EcPEnO!0LbO'#CaPOOO)CDu)CDuOOOO'#IX'#IXOEyO!bO,59TOOQ07b,59T,59TOOOO'#IY'#IYOFXO#tO,59TO%[Q^O'#D`OOOO'#I['#I[OFgO?MpO,59xOOQ07b,59x,59xOFuQ^O'#I]OGYQWO'#JkOI[QrO'#JkO+}Q^O'#JkOIcQWO,5:OOIyQWO'#ElOJWQWO'#JyOJcQWO'#JxOJcQWO'#JxOJkQWO,5;YOJpQWO'#JwOOQ07f,5:Z,5:ZOJwQ^O,5:ZOLxQ08SO,5:eOMiQWO,5:mONSQ07hO'#JvONZQWO'#JuO9ZQWO'#JuONoQWO'#JuONwQWO,5;XON|QWO'#JuO!#UQrO'#JjOOQ07b'#Ch'#ChO%[Q^O'#ERO!#tQpO,5:rOOQO'#Jr'#JrOOQO-EmOOQU'#J`'#J`OOQU,5>n,5>nOOQU-EpQWO'#HQO9aQWO'#HSO!CgQWO'#HSO:RQ7[O'#HUO!ClQWO'#HUOOQU,5=j,5=jO!CqQWO'#HVO!DSQWO'#CnO!DXQWO,59OO!DcQWO,59OO!FhQ^O,59OOOQU,59O,59OO!FxQ07hO,59OO%[Q^O,59OO!ITQ^O'#H^OOQU'#H_'#H_OOQU'#H`'#H`O`Q^O,5=vO!IkQWO,5=vO`Q^O,5=|O`Q^O,5>OO!IpQWO,5>QO`Q^O,5>SO!IuQWO,5>VO!IzQ^O,5>]OOQU,5>c,5>cO%[Q^O,5>cO9kQ07hO,5>eOOQU,5>g,5>gO!NUQWO,5>gOOQU,5>i,5>iO!NUQWO,5>iOOQU,5>k,5>kO!NZQ`O'#D[O%[Q^O'#JmO!NxQ`O'#JmO# gQ`O'#DjO# xQ`O'#DjO#$ZQ^O'#DjO#$bQWO'#JlO#$jQWO,5:TO#$oQWO'#EpO#$}QWO'#JzO#%VQWO,5;ZO#%[Q`O'#DjO#%iQ`O'#EUOOQ07b,5:n,5:nO%[Q^O,5:nO#%pQWO,5:nO>pQWO,5;UO!@}Q`O,5;UO!AVQ7[O,5;UO:RQ7[O,5;UO#%xQWO,5@XO#%}Q$ISO,5:rOOQO-E<`-E<`O#'TQ07pO,5:}OCnQ`O,5:qO#'_Q`O,5:qOCnQ`O,5:}O!@rQ07hO,5:qOOQ07`'#Ef'#EfOOQO,5:},5:}O%[Q^O,5:}O#'lQ07hO,5:}O#'wQ07hO,5:}O!@}Q`O,5:qOOQO,5;T,5;TO#(VQ07hO,5:}POOO'#IV'#IVP#(kO!0LbO,58{POOO,58{,58{OOOO-EwO+}Q^O,5>wOOQO,5>},5>}O#)VQ^O'#I]OOQO-EpQ08SO1G0{O#>wQ08SO1G0{O#@oQ08SO1G0{O#CoQ(CYO'#ChO#EmQ(CYO1G1^O#EtQ(CYO'#JjO!,lQWO1G1dO#FUQ08SO,5?TOOQ07`-EkQWO1G3lO$2^Q^O1G3nO$6bQ^O'#HmOOQU1G3q1G3qO$6oQWO'#HsO>pQWO'#HuOOQU1G3w1G3wO$6wQ^O1G3wO9kQ07hO1G3}OOQU1G4P1G4POOQ07`'#GY'#GYO9kQ07hO1G4RO9kQ07hO1G4TO$;OQWO,5@XO!*fQ^O,5;[O9ZQWO,5;[O>pQWO,5:UO!*fQ^O,5:UO!@}Q`O,5:UO$;TQ(CYO,5:UOOQO,5;[,5;[O$;_Q`O'#I^O$;uQWO,5@WOOQ07b1G/o1G/oO$;}Q`O'#IdO$pQWO1G0pO!@}Q`O1G0pO!AVQ7[O1G0pOOQ07`1G5s1G5sO!@rQ07hO1G0]OOQO1G0i1G0iO%[Q^O1G0iO$wO$>TQWO1G5qO$>]QWO1G6OO$>eQrO1G6PO9ZQWO,5>}O$>oQ08SO1G5|O%[Q^O1G5|O$?PQ07hO1G5|O$?bQWO1G5{O$?bQWO1G5{O9ZQWO1G5{O$?jQWO,5?QO9ZQWO,5?QOOQO,5?Q,5?QO$@OQWO,5?QO$'TQWO,5?QOOQO-EXOOQU,5>X,5>XO%[Q^O'#HnO%7^QWO'#HpOOQU,5>_,5>_O9ZQWO,5>_OOQU,5>a,5>aOOQU7+)c7+)cOOQU7+)i7+)iOOQU7+)m7+)mOOQU7+)o7+)oO%7cQ`O1G5sO%7wQ(CYO1G0vO%8RQWO1G0vOOQO1G/p1G/pO%8^Q(CYO1G/pO>pQWO1G/pO!*fQ^O'#DjOOQO,5>x,5>xOOQO-E<[-E<[OOQO,5?O,5?OOOQO-EpQWO7+&[O!@}Q`O7+&[OOQO7+%w7+%wO$=gQ08SO7+&TOOQO7+&T7+&TO%[Q^O7+&TO%8hQ07hO7+&TO!@rQ07hO7+%wO!@}Q`O7+%wO%8sQ07hO7+&TO%9RQ08SO7++hO%[Q^O7++hO%9cQWO7++gO%9cQWO7++gOOQO1G4l1G4lO9ZQWO1G4lO%9kQWO1G4lOOQO7+%|7+%|O#%sQWO<tQ08SO1G2ZO%AVQ08SO1G2mO%CbQ08SO1G2oO%EmQ7[O,5>yOOQO-E<]-E<]O%EwQrO,5>zO%[Q^O,5>zOOQO-E<^-E<^O%FRQWO1G5uOOQ07b<YOOQU,5>[,5>[O&5cQWO1G3yO9ZQWO7+&bO!*fQ^O7+&bOOQO7+%[7+%[O&5hQ(CYO1G6PO>pQWO7+%[OOQ07b<pQWO<pQWO7+)eO'&gQWO<}AN>}O%[Q^OAN?ZOOQO<eQ(CYOG26}O!*fQ^O'#DyO1PQWO'#EWO'@ZQrO'#JiO!*fQ^O'#DqO'@bQ^O'#D}O'@iQrO'#ChO'CPQrO'#ChO!*fQ^O'#EPO'CaQ^O,5;VO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O'#IiO'EdQWO,5a#@O#@^#@d#Ax#BW#Cr#DQ#DW#D^#Dd#Dn#Dt#Dz#EU#Eh#EnPPPPPPPPPP#EtPPPPPPP#Fi#Ip#KP#KW#K`PPPP$!d$%Z$+r$+u$+x$,q$,t$,w$-O$-WPP$-^$-b$.Y$/X$/]$/qPP$/u$/{$0PP$0S$0W$0Z$1P$1h$2P$2T$2W$2Z$2a$2d$2h$2lR!{RoqOXst!Z#c%j&m&o&p&r,h,m1w1zY!uQ'Z-Y1[5]Q%pvQ%xyQ&P|Q&e!VS'R!e-QQ'a!iS'g!r!xS*c$|*hQ+f%yQ+s&RQ,X&_Q-W'YQ-b'bQ-j'hQ/|*jQ1f,YR;Y:g%OdOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%j%p%}&f&i&m&o&p&r&v'O']'m'}(P(V(^(r(v(z)y+O+S,e,h,m-^-f-t-z.l.s0[0a0q1_1o1p1r1t1w1z1|2m2s3Z5Y5d5t5u5x6]7w7|8]8gS#p]:d!r)[$[$m'S)n,y,|.{2]3p5W6S9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]Q*u%ZQ+k%{Q,Z&bQ,b&jQ.c;QQ0h+^Q0l+`Q0w+lQ1n,`Q2{.[Q4v0rQ5k1gQ6i3PQ6u;RQ7h4wR8m6j&|kOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%j%p%}&f&i&j&m&o&p&r&v'O'S']'m'}(P(V(^(r(v(z)n)y+O+S+^,e,h,m,y,|-^-f-t-z.[.l.s.{0[0a0q1_1o1p1r1t1w1z1|2]2m2s3P3Z3p5W5Y5d5t5u5x6S6]6j7w7|8]8g9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]t!nQ!r!u!x!y'R'Y'Z'g'h'i-Q-W-Y-j1[5]5_$v$si#u#w$c$d$x${%O%Q%[%]%a)u){)}*P*R*Y*`*p*q+]+`+w+z.Z.i/Z/j/k/m0Q0S0^1R1U1^3O3x4S4[4f4n4p5c6g7T7^7y8j8w9[9n:O:W:y:z:|:};O;P;S;T;U;V;W;X;_;`;a;b;c;d;g;h;i;j;k;l;m;n;q;r < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:371,context:iRe,nodeProps:[["isolate",-8,4,5,13,33,35,48,50,52,""],["group",-26,8,16,18,65,201,205,209,210,212,215,218,228,230,236,238,240,242,245,251,257,259,261,263,265,267,268,"Statement",-32,12,13,28,31,32,38,48,51,52,54,59,67,75,79,81,83,84,106,107,116,117,134,137,139,140,141,142,144,145,164,165,167,"Expression",-23,27,29,33,37,39,41,168,170,172,173,175,176,177,179,180,181,183,184,185,195,197,199,200,"Type",-3,87,99,105,"ClassItem"],["openedBy",22,"<",34,"InterpolationStart",53,"[",57,"{",72,"(",157,"JSXStartCloseTag"],["closedBy",23,">",36,"InterpolationEnd",47,"]",58,"}",73,")",162,"JSXEndTag"]],propSources:[lRe],skippedNodes:[0,4,5,271],repeatNodeCount:37,tokenData:"$Fj(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#8g!R![#:v![!]#Gv!]!^#IS!^!_#J^!_!`#Ns!`!a$#_!a!b$(l!b!c$,k!c!}Er!}#O$-u#O#P$/P#P#Q$4h#Q#R$5r#R#SEr#S#T$7P#T#o$8Z#o#p$q#r#s$?}#s$f%Z$f$g+g$g#BYEr#BY#BZ$AX#BZ$ISEr$IS$I_$AX$I_$I|Er$I|$I}$Dd$I}$JO$Dd$JO$JTEr$JT$JU$AX$JU$KVEr$KV$KW$AX$KW&FUEr&FU&FV$AX&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$AX?HUOEr(n%d_$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$f&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$f&j(R!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(R!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$f&j(OpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(OpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Op(R!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$f&j(Op(R!b't(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST(P#S$f&j'u(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$f&j(Op(R!b'u(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$f&j!o$Ip(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#t$Id$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#t$Id$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/|3l_'}$(n$f&j(R!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$f&j(R!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$f&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$a`$f&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$a``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$a`$f&j(R!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(R!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$a`(R!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k#%|:hh$f&j(Op(R!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXVS$f&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSVSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWVS(R!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]VS$f&j(OpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWVS(OpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYVS(Op(R!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%lQ^$f&j!USOY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@Y!_!}!=y!}#O!Bw#O#P!Dj#P#o!=y#o#p!@Y#p;'S!=y;'S;=`!E[<%lO!=y&n!?Ta$f&j!USO!^&c!_#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&cS!@_X!USOY!@YZ!P!@Y!P!Q!@z!Q!}!@Y!}#O!Ac#O#P!Bb#P;'S!@Y;'S;=`!Bq<%lO!@YS!APU!US#Z#[!@z#]#^!@z#a#b!@z#g#h!@z#i#j!@z#m#n!@zS!AfVOY!AcZ#O!Ac#O#P!A{#P#Q!@Y#Q;'S!Ac;'S;=`!B[<%lO!AcS!BOSOY!AcZ;'S!Ac;'S;=`!B[<%lO!AcS!B_P;=`<%l!AcS!BeSOY!@YZ;'S!@Y;'S;=`!Bq<%lO!@YS!BtP;=`<%l!@Y&n!B|[$f&jOY!BwYZ&cZ!^!Bw!^!_!Ac!_#O!Bw#O#P!Cr#P#Q!=y#Q#o!Bw#o#p!Ac#p;'S!Bw;'S;=`!Dd<%lO!Bw&n!CwX$f&jOY!BwYZ&cZ!^!Bw!^!_!Ac!_#o!Bw#o#p!Ac#p;'S!Bw;'S;=`!Dd<%lO!Bw&n!DgP;=`<%l!Bw&n!DoX$f&jOY!=yYZ&cZ!^!=y!^!_!@Y!_#o!=y#o#p!@Y#p;'S!=y;'S;=`!E[<%lO!=y&n!E_P;=`<%l!=y(Q!Eki$f&j(R!b!USOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#Z&}#Z#[!Eb#[#]&}#]#^!Eb#^#a&}#a#b!Eb#b#g&}#g#h!Eb#h#i&}#i#j!Eb#j#m&}#m#n!Eb#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!f!GaZ(R!b!USOY!GYZw!GYwx!@Yx!P!GY!P!Q!HS!Q!}!GY!}#O!Ic#O#P!Bb#P;'S!GY;'S;=`!JZ<%lO!GY!f!HZb(R!b!USOY'}Zw'}x#O'}#P#Z'}#Z#[!HS#[#]'}#]#^!HS#^#a'}#a#b!HS#b#g'}#g#h!HS#h#i'}#i#j!HS#j#m'}#m#n!HS#n;'S'};'S;=`(f<%lO'}!f!IhX(R!bOY!IcZw!Icwx!Acx#O!Ic#O#P!A{#P#Q!GY#Q;'S!Ic;'S;=`!JT<%lO!Ic!f!JWP;=`<%l!Ic!f!J^P;=`<%l!GY(Q!Jh^$f&j(R!bOY!JaYZ&cZw!Jawx!Bwx!^!Ja!^!_!Ic!_#O!Ja#O#P!Cr#P#Q!Q#V#X%Z#X#Y!4|#Y#b%Z#b#c#Zd$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#?tf$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#b%Z#b#c#cRe[t]||-1},{term:334,get:t=>dRe[t]||-1},{term:70,get:t=>uRe[t]||-1}],tokenPrec:14626}),eoe=[zo("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),zo("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),zo("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),zo("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),zo("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),zo(`try { \${} } catch (\${error}) { \${} }`,{label:"try",detail:"/ catch block",type:"keyword"}),zo("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),zo(`if (\${}) { \${} } else { \${} }`,{label:"if",detail:"/ else block",type:"keyword"}),zo(`class \${name} { constructor(\${params}) { \${} } }`,{label:"class",detail:"definition",type:"keyword"}),zo('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),zo('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],hRe=eoe.concat([zo("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),zo("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),zo("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),vU=new w3,toe=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Fv(t){return(e,n)=>{let i=e.node.getChild("VariableDefinition");return i&&n(i,t),!0}}var pRe=["FunctionDeclaration"],gRe={FunctionDeclaration:Fv("function"),ClassDeclaration:Fv("class"),ClassExpression:()=>!0,EnumDeclaration:Fv("constant"),TypeAliasDeclaration:Fv("type"),NamespaceDeclaration:Fv("namespace"),VariableDefinition(t,e){t.matchContext(pRe)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function noe(t,e){let n=vU.get(e);if(n)return n;let i=[],r=!0;function o(a,s){let l=t.sliceString(a.from,a.to);i.push({label:l,type:s})}return e.cursor(hn.IncludeAnonymous).iterate(a=>{if(r)r=!1;else if(a.name){let s=gRe[a.name];if(s&&s(a,o)||toe.has(a.name))return!1}else if(a.to-a.from>8192){for(let s of noe(t,a.node))i.push(s);return!1}}),vU.set(e,i),i}var yU=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,ioe=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function mRe(t){let e=ui(t.state).resolveInner(t.pos,-1);if(ioe.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&yU.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let r=e;r;r=r.parent)toe.has(r.name)&&(i=i.concat(noe(t.state.doc,r)));return{options:i,from:n?e.from:t.pos,validFor:yU}}var $l=Pb.define({name:"javascript",parser:fRe.configure({props:[N4.add({IfStatement:B_({except:/^\s*({|else\b)/}),TryStatement:B_({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:XPe,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:i?1:2)*t.unit},Block:YPe({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":B_({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),P4.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Qne,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),roe={test:t=>/^JSX/.test(t.name),facet:jne({commentTokens:{block:{open:"{/*",close:"*/}"}}})},ooe=$l.configure({dialect:"ts"},"typescript"),aoe=$l.configure({dialect:"jsx",props:[Z$.add(t=>t.isTop?[roe]:void 0)]}),soe=$l.configure({dialect:"jsx ts",props:[Z$.add(t=>t.isTop?[roe]:void 0)]},"typescript"),loe=t=>({label:t,type:"keyword"}),coe="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(loe),vRe=coe.concat(["declare","implements","private","protected","public"].map(loe));function Q7(t={}){let e=t.jsx?t.typescript?soe:aoe:t.typescript?ooe:$l,n=t.typescript?hRe.concat(vRe):eoe.concat(coe);return new $b(e,[$l.data.of({autocomplete:rDe(ioe,Qie(n))}),$l.data.of({autocomplete:mRe}),t.jsx?wRe:[]])}function yRe(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function bU(t,e,n=t.length){for(let i=e?.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return t.sliceString(i.from,Math.min(i.to,n));return""}var bRe=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),wRe=Ne.inputHandler.of((t,e,n,i,r)=>{if((bRe?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||i!=">"&&i!="/"||!$l.isActiveAt(t.state,e,-1))return!1;let o=r(),{state:a}=o,s=a.changeByRange(l=>{var c;let{head:d}=l,f=ui(a).resolveInner(d-1,-1),h;if(f.name=="JSXStartTag"&&(f=f.parent),!(a.doc.sliceString(d-1,d)!=i||f.name=="JSXAttributeValue"&&f.to>d)){if(i==">"&&f.name=="JSXFragmentTag")return{range:l,changes:{from:d,insert:""}};if(i=="/"&&f.name=="JSXStartCloseTag"){let g=f.parent,m=g.parent;if(m&&g.from==d-2&&((h=bU(a.doc,m.firstChild,d))||((c=m.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let b=`${h}>`;return{range:ye.cursor(d+b.length,-1),changes:{from:d,insert:b}}}}else if(i==">"){let g=yRe(f);if(g&&g.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(d,d+2))&&(h=bU(a.doc,g,d)))return{range:l,changes:{from:d,insert:``}}}}return{range:l}});return s.changes.empty?!1:(t.dispatch([o,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),zv=["_blank","_self","_top","_parent"],P8=["ascii","utf-8","utf-16","latin1","latin1"],A8=["get","post","put","delete"],$8=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],sa=["true","false"],Ke={},kRe={a:{attrs:{href:null,ping:null,type:null,media:null,target:zv,hreflang:null}},abbr:Ke,address:Ke,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Ke,aside:Ke,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Ke,base:{attrs:{href:null,target:zv}},bdi:Ke,bdo:Ke,blockquote:{attrs:{cite:null}},body:Ke,br:Ke,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:$8,formmethod:A8,formnovalidate:["novalidate"],formtarget:zv,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Ke,center:Ke,cite:Ke,code:Ke,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Ke,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Ke,div:Ke,dl:Ke,dt:Ke,em:Ke,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Ke,figure:Ke,footer:Ke,form:{attrs:{action:null,name:null,"accept-charset":P8,autocomplete:["on","off"],enctype:$8,method:A8,novalidate:["novalidate"],target:zv}},h1:Ke,h2:Ke,h3:Ke,h4:Ke,h5:Ke,h6:Ke,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Ke,hgroup:Ke,hr:Ke,html:{attrs:{manifest:null}},i:Ke,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:$8,formmethod:A8,formnovalidate:["novalidate"],formtarget:zv,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Ke,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Ke,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Ke,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:P8,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Ke,noscript:Ke,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Ke,param:{attrs:{name:null,value:null}},pre:Ke,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Ke,rt:Ke,ruby:Ke,samp:Ke,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:P8}},section:Ke,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Ke,source:{attrs:{src:null,type:null,media:null}},span:Ke,strong:Ke,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Ke,summary:Ke,sup:Ke,table:Ke,tbody:Ke,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Ke,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Ke,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Ke,time:{attrs:{datetime:null}},title:Ke,tr:Ke,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Ke,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Ke},doe={accesskey:null,class:null,contenteditable:sa,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:sa,autocorrect:sa,autocapitalize:sa,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":sa,"aria-autocomplete":["inline","list","both","none"],"aria-busy":sa,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":sa,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":sa,"aria-hidden":sa,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":sa,"aria-multiselectable":sa,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":sa,"aria-relevant":null,"aria-required":sa,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},uoe="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of uoe)doe[t]=null;var jm=class{constructor(e,n){this.tags={...kRe,...e},this.globalAttrs={...doe,...n},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};jm.default=new jm;function Rm(t,e,n=t.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,n)):""}function Fm(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function foe(t,e,n){let i=n.tags[Rm(t,Fm(e))];return i?.children||n.allTags}function fD(t,e){let n=[];for(let i=Fm(e);i&&!i.type.isTop;i=Fm(i.parent)){let r=Rm(t,i);if(r&&i.lastChild.name=="CloseTag")break;r&&n.indexOf(r)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&n.push(r)}return n}var hoe=/^[:\-\.\w\u00b7-\uffff]*$/;function wU(t,e,n,i,r){let o=/\s*>/.test(t.sliceDoc(r,r+5))?"":">",a=Fm(n,n.name=="StartTag"||n.name=="TagName");return{from:i,to:r,options:foe(t.doc,a,e).map(s=>({label:s,type:"type"})).concat(fD(t.doc,n).map((s,l)=>({label:"/"+s,apply:"/"+s+o,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function kU(t,e,n,i){let r=/\s*>/.test(t.sliceDoc(i,i+5))?"":">";return{from:n,to:i,options:fD(t.doc,e).map((o,a)=>({label:o,apply:o+r,type:"type",boost:99-a})),validFor:hoe}}function xRe(t,e,n,i){let r=[],o=0;for(let a of foe(t.doc,n,e))r.push({label:"<"+a,type:"type"});for(let a of fD(t.doc,n))r.push({label:"",type:"type",boost:99-o++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function _Re(t,e,n,i,r){let o=Fm(n),a=o?e.tags[Rm(t.doc,o)]:null,s=a&&a.attrs?Object.keys(a.attrs):[],l=a&&a.globalAttrs===!1?s:s.length?s.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:r,options:l.map(c=>({label:c,type:"property"})),validFor:hoe}}function ORe(t,e,n,i,r){var o;let a=(o=n.parent)===null||o===void 0?void 0:o.getChild("AttributeName"),s=[],l;if(a){let c=t.sliceDoc(a.from,a.to),d=e.globalAttrs[c];if(!d){let f=Fm(n),h=f?e.tags[Rm(t.doc,f)]:null;d=h?.attrs&&h.attrs[c]}if(d){let f=t.sliceDoc(i,r).toLowerCase(),h='"',g='"';/^['"]/.test(f)?(l=f[0]=='"'?/^[^"]*$/:/^[^']*$/,h="",g=t.sliceDoc(r,r+1)==f[0]?"":f[0],f=f.slice(1),i++):l=/^[^\s<>='"]*$/;for(let m of d)s.push({label:m,apply:h+m+g,type:"constant"})}}return{from:i,to:r,options:s,validFor:l}}function SRe(t,e){let{state:n,pos:i}=e,r=ui(n).resolveInner(i,-1),o=r.resolve(i);for(let a=i,s;o==r&&(s=r.childBefore(a));){let l=s.lastChild;if(!l||!l.type.isError||l.fromSRe(i,r)}var ERe=$l.parser.configure({top:"SingleExpression"}),poe=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:ooe.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:aoe.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:soe.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:ERe},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:$l.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:iS.parser}],goe=[{name:"style",parser:iS.parser.configure({top:"Styles"})}].concat(uoe.map(t=>({name:t,parser:$l.parser}))),moe=Pb.define({name:"html",parser:Qje.configure({props:[N4.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].lengtht.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),V_=moe.configure({wrap:Kre(poe,goe)});function voe(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=Kre((t.nestedLanguages||[]).concat(poe),(t.nestedAttributes||[]).concat(goe)));let i=n?moe.configure({wrap:n,dialect:e}):e?V_.configure({dialect:e}):V_;return new $b(i,[V_.data.of({autocomplete:CRe(t)}),t.autoCloseTags!==!1?TRe:[],Q7().support,Wre().support])}var xU=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),TRe=Ne.inputHandler.of((t,e,n,i,r)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!V_.isActiveAt(t.state,e,-1))return!1;let o=r(),{state:a}=o,s=a.changeByRange(l=>{var c,d,f;let h=a.doc.sliceString(l.from-1,l.to)==i,{head:g}=l,m=ui(a).resolveInner(g,-1),b;if(h&&i==">"&&m.name=="EndTag"){let x=m.parent;if(((d=(c=x.parent)===null||c===void 0?void 0:c.lastChild)===null||d===void 0?void 0:d.name)!="CloseTag"&&(b=Rm(a.doc,x.parent,g))&&!xU.has(b)){let _=g+(a.doc.sliceString(g,g+1)===">"?1:0),O=``;return{range:l,changes:{from:g,to:_,insert:O}}}}else if(h&&i=="/"&&m.name=="IncompleteCloseTag"){let x=m.parent;if(m.from==g-2&&((f=x.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(b=Rm(a.doc,x,g))&&!xU.has(b)){let _=g+(a.doc.sliceString(g,g+1)===">"?1:0),O=`${b}>`;return{range:ye.cursor(g+O.length,-1),changes:{from:g,to:_,insert:O}}}}return{range:l}});return s.changes.empty?!1:(t.dispatch([o,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function yoe({code:t,language:e,updateCode:n,updateLanguage:i}){let[r,o]=N.default.useState(!0),{darkMode:a}=N.default.useContext(ut);N.default.useEffect(()=>{let _=()=>{o(!0)};return window.addEventListener("mousemove",_),()=>{window.removeEventListener("mousemove",_)}},[]);let s=N.default.useCallback(_=>{o(!1),n(_)},[n]),l=N.default.useCallback(_=>{i(_.target.value)},[i]),c=Ne.theme({"&.cm-editor":{background:"transparent"},"&.cm-focused":{outline:"0"},"&.cm-editor .cm-content":{padding:"7px 0"},"&.cm-editor .cm-scroller":{overflow:"auto"},"&.cm-editor .cm-gutters":{background:"none",border:"none",fontFamily:"Consolas,Liberation Mono,Menlo,Courier,monospace;",color:"#CED4D9",lineHeight:"2.25rem"},"&.cm-editor .cm-gutter":{minHeight:"170px"},"&.cm-editor .cm-lineNumbers":{padding:"0"},"&.cm-editor .cm-foldGutter":{width:"0"},"&.cm-editor .cm-line":{padding:"0 .8rem",color:"#394047",fontFamily:"Consolas,Liberation Mono,Menlo,Courier,monospace;",fontSize:"1.6rem",lineHeight:"2.25rem"},"&.cm-editor .cm-activeLine, &.cm-editor .cm-activeLineGutter":{background:"none"},"&.cm-editor .cm-cursor, &.cm-editor .cm-dropCursor":{borderLeft:"1.2px solid black"}}),d=Ne.theme({"&.cm-editor":{background:"transparent"},"&.cm-focused":{outline:"0"},"&.cm-editor .cm-content":{padding:"7px 0"},"&.cm-editor .cm-scroller":{overflow:"auto"},"&.cm-editor .cm-gutters":{background:"none",border:"none",fontFamily:"Consolas,Liberation Mono,Menlo,Courier,monospace;",color:"rgb(108, 118, 127);",lineHeight:"2.25rem"},"&.cm-editor .cm-gutter":{minHeight:"170px"},"&.cm-editor .cm-lineNumbers":{padding:"0"},"&.cm-editor .cm-foldGutter":{width:"0"},"&.cm-editor .cm-line":{padding:"0 .8rem",color:"rgb(210, 215, 218)",fontFamily:"Consolas,Liberation Mono,Menlo,Courier,monospace;",fontSize:"1.6rem",lineHeight:"2.25rem"},"&.cm-editor .cm-activeLine, &.cm-editor .cm-activeLineGutter":{background:"none"},"&.cm-editor .cm-cursor, &.cm-editor .cm-dropCursor":{borderLeft:"1.2px solid white"}}),f=Zc.define([{tag:Y.keyword,color:"#5A5CAD"},{tag:Y.atom,color:"#6C8CD5"},{tag:Y.number,color:"#116644"},{tag:Y.definition(Y.variableName),textDecoration:"underline"},{tag:Y.variableName,color:"black"},{tag:Y.comment,color:"#0080FF",fontStyle:"italic",background:"rgba(0,0,0,.05)"},{tag:[Y.string,Y.special(Y.brace)],color:"#183691"},{tag:Y.meta,color:"yellow"},{tag:Y.bracket,color:"#63a35c"},{tag:Y.tagName,color:"#63a35c"},{tag:Y.attributeName,color:"#795da3"}]),h=Zc.define([{tag:Y.keyword,color:"#795da3"},{tag:Y.atom,color:"#6C8CD5"},{tag:Y.number,color:"#63a35c"},{tag:Y.definition(Y.variableName),textDecoration:"underline"},{tag:Y.variableName,color:"white"},{tag:Y.comment,color:"#0080FF",fontStyle:"italic",background:"rgba(0,0,0,.05)"},{tag:[Y.string,Y.special(Y.brace)],color:"rgb(72, 110, 225)"},{tag:Y.meta,color:"yellow"},{tag:Y.bracket,color:"#63a35c"},{tag:Y.tagName,color:"#63a35c"},{tag:Y.attributeName,color:"#795da3"},{tag:[Y.className,Y.propertyName],color:"rgb(72, 110, 225)"}]),g=a?d:c,m=a?h:f,b=[Ne.lineWrapping,tk(m),g,W$(),sre({defaultKeymap:!1,history:!1}),Hc.of(X$),$4({joinToEvent:void 0})],x={javascript:Q7,js:Q7,html:voe,css:Wre}[e?.toLowerCase().trim()]||null;return x&&b.push(x()),w.jsxs("div",{className:"not-kg-prose min-h-[170px]",children:[w.jsx(rD,{autoFocus:!0,basicSetup:!1,extensions:b,value:t,onChange:s}),w.jsx("input",{"aria-label":"Code card language",className:`z-999 absolute right-1.5 top-1.5 w-1/5 rounded-md border border-grey-300 px-2 py-1 font-sans text-[1.3rem] leading-4 text-grey-900 transition-opacity focus-visible:outline-none dark:border-grey-900 dark:text-grey-400 ${r?"opacity-100":"opacity-0"}`,"data-testid":"code-card-language",placeholder:"Language...",type:"text",value:e,onChange:l})]})}function boe({code:t,darkMode:e,language:n}){let i=e?"rounded-md border border-grey-950 bg-grey-950 px-2 py-[6px] font-mono text-[1.6rem] leading-9 text-grey-400 whitespace-pre-wrap":"rounded-md border border-grey-200 bg-grey-100 px-2 py-[6px] font-mono text-[1.6rem] leading-9 text-grey-900 whitespace-pre-wrap";return w.jsxs("div",{className:"not-kg-prose",children:[w.jsx("pre",{className:i,children:w.jsx("code",{className:n&&`language-${n}`,children:t})}),w.jsx("div",{className:"absolute right-2 top-2 flex items-center justify-center px-1",children:w.jsx("span",{className:"block font-sans text-sm font-medium leading-normal text-grey",children:n})})]})}function woe({captionEditor:t,captionEditorInitialState:e,code:n,darkMode:i,isEditing:r,isSelected:o,language:a,updateCode:s,updateLanguage:l}){return r?w.jsx(yoe,{code:n,darkMode:i,language:a,updateCode:s,updateLanguage:l}):w.jsxs(w.Fragment,{children:[w.jsx(boe,{code:n,darkMode:i,language:a}),w.jsx(A0,{captionEditor:t,captionEditorInitialState:e,captionPlaceholder:"Type caption for code block (optional)",dataTestId:"codeblock-caption",isSelected:o})]})}yoe.propTypes={code:$.string,language:$.string,updateCode:$.func,updateLanguage:$.func};boe.propTypes={code:$.string,darkMode:$.bool,language:$.string};woe.propTypes={code:$.string,darkMode:$.bool,language:$.string,captionEditor:$.object,captionEditorInitialState:$.object,isEditing:$.bool,isSelected:$.bool,updateCode:$.func,updateLanguage:$.func};var MRe=t=>J.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},J.createElement("path",{d:"M4.47 1.867a4.525 4.525 0 015.02 1.378.4.4 0 01-.618.51 3.725 3.725 0 00-6.597 2.369v.159l.817-.817a.4.4 0 11.565.565l-1.48 1.48a.4.4 0 01-.605 0l-1.48-1.48a.4.4 0 11.565-.565l.818.817v-.16A4.526 4.526 0 014.47 1.868zm5.655 3.107a.4.4 0 01.283.117l1.5 1.5a.4.4 0 01-.566.565l-.822-.822A4.525 4.525 0 012.709 9.23a.4.4 0 01.582-.55 3.725 3.725 0 006.427-2.333l-.81.81a.4.4 0 11-.566-.565l1.5-1.5a.4.4 0 01.283-.117z"})),NRe=({snippets:t,onCreateSnippet:e,onUpdateSnippet:n,value:i,isCreateButtonActive:r,onKeyDown:o,activeMenuItem:a})=>w.jsxs("ul",{className:"absolute mt-[-1px] w-full max-w-[240px] rounded-b border border-grey-200 bg-white shadow-md dark:border-grey-900 dark:bg-grey-950",tabIndex:0,onKeyDown:o,children:[w.jsx("li",{className:"mb-0 block",children:w.jsxs("button",{className:`flex w-full cursor-pointer items-center justify-between px-3 py-2 text-left text-sm font-medium text-green-600 hover:bg-grey-100 dark:hover:bg-black ${r?"bg-grey-100 dark:bg-black":""}`,type:"button",onClick:e,children:[w.jsxs("span",{children:['Create "',i,"\u201C"]}),w.jsx(mA,{className:"size-3 stroke-green-600 stroke-[3px]"})]})}),!!t.length&&w.jsx(PRe,{activeMenuItem:a,list:t,onClick:n})]}),PRe=({list:t=[],onClick:e,activeMenuItem:n})=>w.jsxs("li",{role:"separator",children:[w.jsx("span",{className:"block border-t border-grey-200 px-3 pb-2 pt-3 text-[1.1rem] font-semibold uppercase tracking-wide text-grey-600 dark:border-grey-900 dark:text-grey-800",children:"Replace existing"}),w.jsx("ul",{role:"menu",children:t.map((i,r)=>w.jsx(ARe,{active:n,index:r,name:i.name,onClick:e},i.name))})]}),ARe=({onClick:t,name:e,active:n,index:i})=>w.jsx("li",{className:"mb-1",children:w.jsxs("button",{className:`flex w-full cursor-pointer items-center justify-between px-3 py-2 text-left text-sm hover:bg-grey-100 ${i===n?"bg-grey-100 dark:bg-black":""} dark:hover:bg-black`,type:"button",onClick:()=>t(e),children:[w.jsx("span",{children:e}),w.jsx("div",{className:"size-5 fill-grey-900",children:w.jsx(MRe,{className:"size-4 fill-grey-900 dark:fill-grey-600"})})]})}),$0=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M19 5 5 19m14 0L5 5"})),$Re=({value:t,onChange:e,onClear:n,onKeyDown:i})=>w.jsxs("div",{className:"relative m-0 flex items-center justify-evenly gap-1 rounded-lg bg-white font-sans text-md font-normal text-black shadow-md dark:bg-grey-950",children:[w.jsx("input",{autoComplete:"off",autoFocus:!0,className:`mb-[1px] h-auto w-full bg-white py-1 pl-3 pr-9 font-normal leading-loose text-grey-900 selection:bg-grey/40 dark:bg-grey-950 dark:text-grey-100 dark:placeholder:text-grey-800 ${t?"rounded-b-none rounded-t":"rounded"}`,"data-testid":"snippet-name",placeholder:"Snippet name",value:t,"data-1p-ignore":!0,onChange:e,onKeyDown:i}),w.jsx("button",{"aria-label":"Close",className:"absolute right-3 cursor-pointer",type:"button",onClick:n,children:w.jsx($0,{className:"size-3 stroke-2 text-grey"})})]});function koe({value:t,onChange:e,onCreateSnippet:n,onUpdateSnippet:i,onClose:r,snippets:o=[]}){let a=(0,N.useRef)(null),[s,l]=(0,N.useState)(!0),[c,d]=(0,N.useState)(-1),[f,h]=(0,N.useState)([]);N.default.useEffect(()=>{let m=o.filter(b=>b.name.toLowerCase().includes(t.toLowerCase()));m.length===0?(l(!0),d(-1)):(l(!1),d(0)),h(m)},[t,o]),N.default.useEffect(()=>{let m=b=>{a.current&&!a.current.contains(b.target)&&r()};return window.addEventListener("mousedown",m),()=>{window.removeEventListener("mousedown",m)}},[r]);let g=m=>{if((m.key==="Escape"||m.key==="Esc")&&(m.stopPropagation(),r()),m.key==="ArrowDown"||m.key==="Down"){if(m.stopPropagation(),m.preventDefault(),f.length===0)return;if(c===-1&&!s){l(!0);return}let b=c+1;b>f.length-1?(d(-1),l(!0)):(d(b),l(!1))}if(m.key==="ArrowUp"||m.key==="Up"){if(m.stopPropagation(),m.preventDefault(),f.length===0)return;if(s){d(f.length-1),l(!1);return}let b=c-1;b<0?(d(-1),l(!0)):(d(b),l(!1))}m.key==="Enter"&&(s?(m.stopPropagation(),m.preventDefault(),n()):c>-1&&(m.stopPropagation(),m.preventDefault(),i(f[c].name)))};return w.jsxs("div",{ref:a,onClick:m=>m.stopPropagation(),children:[w.jsx($Re,{value:t,onChange:e,onClear:r,onKeyDown:g}),!!t&&w.jsx(NRe,{activeMenuItem:c,isCreateButtonActive:s,snippets:f,value:t,onCreateSnippet:n,onUpdateSnippet:i})]})}koe.propTypes={value:$.string,onChange:$.func,onCreateSnippet:$.func,onReplaceSnippet:$.func,onClose:$.func,suggestedList:$.arrayOf($.shape({name:$.string.isRequired,value:$.string.isRequired}))};function pi({onClose:t,...e}){let{cardConfig:{snippets:n,createSnippet:i},darkMode:r}=N.default.useContext(ut),[o]=Oe.useLexicalComposerContext(),{selectedCardKey:a}=Kh(),[s,l]=N.default.useState(""),c=f=>{l(f.target.value)},d=f=>{o.update(()=>{if(a){let h=A.$createNodeSelection();h.add(a);let g=yh.$generateJSONFromSelectedNodes(o,h);i({name:f,value:JSON.stringify(g)}),o.dispatchCommand(xu,{cardKey:a})}else{let h=A.$getSelection(),g=yh.$generateJSONFromSelectedNodes(o,h);i({name:f,value:JSON.stringify(g)})}t?.(),o.getRootElement().focus()})};return w.jsx(koe,{darkMode:r,snippets:n,value:s,onChange:c,onClose:t,onCreateSnippet:()=>d(s),onUpdateSnippet:f=>d(f),...e})}var DRe=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m14.2 4.3 5.5 5.5m-11 11L1 23l2.2-7.7L16.856 1.644a2.2 2.2 0 0 1 3.11 0l2.39 2.39a2.2 2.2 0 0 1 0 3.11L8.7 20.8Z"})),IRe=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M1.373 13.33A2.528 2.528 0 0 1 1 12c0-.476.13-.94.373-1.33C2.946 8.163 6.819 3 12 3c5.181 0 9.054 5.164 10.627 7.67.243.39.373.854.373 1.33 0 .476-.13.94-.373 1.33C21.054 15.837 17.181 21 12 21c-5.181 0-9.054-5.164-10.627-7.67Z"}),J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z"})),LRe=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M1 12h8v10H1V12Zm0 0C1 5 2.75 3.344 6 2m8 10h8m-8 0v10h4m-4-10c0-7 1.75-8.656 5-10m1.7 14.4 1.75-1.4h.35v7"})),jRe=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 25 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M1 12h8v10H1V12Zm0 0C1 5 2.75 3.344 6 2m8 10h8m-8 0v10h2m-2-10c0-7 1.75-8.656 5-10m.5 13.583c.517-.311 1.275-.559 1.878-.583 1.195 0 2.22.512 2.22 1.878-.015 2.205-4.098 4.78-4.098 4.78V22h4.098"})),tp=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M1.917 5.583h20.166m-8.02-3.666H9.936a1.375 1.375 0 0 0-1.374 1.375v2.291h6.874V3.292a1.375 1.375 0 0 0-1.374-1.375ZM9.938 17.27v-6.874m4.125 6.874v-6.874"}),J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M18.288 20.818a1.366 1.366 0 0 1-1.366 1.265H7.077a1.366 1.366 0 0 1-1.365-1.265L4.438 5.583h15.125l-1.275 15.235Z"})),Q4=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 25",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M1 21.094 3.913 24 17 10.906 14.125 8 1 21.094ZM11 11l3 3M5.25 4.25a2.5 2.5 0 0 0 2.5-2.5 2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0-2.5 2.5 2.5 2.5 0 0 0-2.5-2.5Zm12 0a2.5 2.5 0 0 0 2.5-2.5 2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0-2.5 2.5 2.5 2.5 0 0 0-2.5-2.5Zm0 11.99a2.5 2.5 0 0 0 2.5-2.5 2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0-2.5 2.5 2.5 2.5 0 0 0-2.5-2.5Z"}));function tf({label:t,shortcutKeys:e}){return w.jsxs("div",{className:`invisible absolute -top-8 left-1/2 z-[1000] flex -translate-x-1/2 items-center gap-1 whitespace-nowrap rounded-md bg-black py-1 font-sans text-2xs font-medium text-white group-hover:visible dark:bg-grey-900 ${e?"pl-[1rem] pr-1":"px-[1rem]"}`,children:[w.jsx("span",{children:t}),e&&e.map(n=>w.jsx("div",{className:"rounded bg-grey-900 px-2 text-2xs text-white dark:bg-grey-950",children:n},n))]})}var RRe={bold:Kme,italic:o0e,headingTwo:i0e,headingThree:n0e,quote:s0e,quoteOne:LRe,quoteTwo:jRe,link:a0e,imgRegular:HS,imgWide:ZS,imgFull:BS,imgReplace:l0e,add:Gme,edit:DRe,wand:Q4,visibility:IRe,snippet:d0e,remove:tp};function gi({children:t,hide:e,...n}){return e?null:w.jsx("ul",{className:"relative m-0 flex items-center justify-evenly gap-1 rounded-lg bg-white px-1 font-sans text-md font-normal text-black shadow-md dark:bg-grey-950",...n,children:t})}function lt({label:t,isActive:e,onClick:n,icon:i,shortcutKeys:r,secondary:o,dataTestId:a,hide:s,...l}){if(s)return null;let c=RRe[i];return w.jsxs("li",{className:"group relative m-0 flex p-0 first:m-0",...l,children:[w.jsx("button",{"aria-label":t,className:`my-1 flex h-8 w-9 cursor-pointer items-center justify-center rounded-md transition hover:bg-grey-200/80 dark:bg-grey-950 dark:hover:bg-grey-900 ${e?"bg-grey-200/80":"bg-white"}`,"data-kg-active":e,"data-testid":a,type:"button",onClick:n,children:w.jsx(c,{className:`size-4 overflow-visible transition ${o?"stroke-2":"stroke-[2.5]"} ${e?"text-green-600 dark:text-green-600":"text-black dark:text-white"}`})}),w.jsx(tf,{label:t,shortcutKeys:r})]})}function Kn({hide:t}){return t?null:w.jsx("li",{className:"m-0 w-px self-stretch bg-grey-300/80 dark:bg-grey-900"})}function FRe({nodeKey:t,captionEditor:e,captionEditorInitialState:n,code:i,language:r}){let[o]=Oe.useLexicalComposerContext(),{isEditing:a,setEditing:s,isSelected:l}=N.default.useContext(vn),{cardConfig:c,darkMode:d}=N.default.useContext(ut),[f,h]=N.default.useState(!1),g=x=>{o.update(()=>{let _=A.$getNodeByKey(t);_.code=x})},m=x=>{o.update(()=>{let _=A.$getNodeByKey(t);_.language=x})},b=x=>{x.preventDefault(),x.stopPropagation(),s(!0)};return w.jsxs(w.Fragment,{children:[w.jsx(woe,{captionEditor:e,captionEditorInitialState:n,code:i,darkMode:d,handleToolbarEdit:b,isEditing:a,isSelected:l,language:r,nodeKey:t,updateCode:g,updateLanguage:m}),w.jsx(xt,{"data-kg-card-toolbar":"button",isVisible:f,children:w.jsx(pi,{onClose:()=>h(!1)})}),w.jsx(xt,{"data-kg-card-toolbar":"button",isVisible:l&&!a,children:w.jsxs(gi,{children:[w.jsx(lt,{dataTestId:"edit-code-card",icon:"edit",isActive:!1,label:"Edit",onClick:b}),w.jsx(Kn,{hide:!c.createSnippet}),w.jsx(lt,{dataTestId:"create-snippet",hide:!c.createSnippet,icon:"snippet",isActive:!1,label:"Save as snippet",onClick:()=>h(!0)})]})})]})}function zRe(t,e){let n=new DOMParser().parseFromString(e,"text/html");return di.$generateNodesFromDOM(t,n)}function xoe({editor:t,initialHtml:e}){return e?t.update(()=>{let n=zRe(t,e);A.$getRoot().select(),A.$getRoot().clear(),A.$insertNodes(n),n.length&&A.$setSelection(null)},{discrete:!0,tag:"history-merge"}):t.update(()=>{A.$getRoot().append(A.$createParagraphNode())},{discrete:!0,tag:"history-merge"}),t.getEditorState()}var QRe=JSON.stringify({root:{children:[{children:[],direction:null,format:"",indent:0,type:"paragraph",version:1}],direction:null,format:"",indent:0,type:"root",version:1}});function Ni(t,e,{editor:n,initialEditorState:i=QRe,nodes:r=Mr}={}){if(n)t[e]=n;else{t[e]=A.createEditor({nodes:r});let o=t[e].parseEditorState(i);t[e].setEditorState(o,{tag:"history-merge"})}}function Pi(t,e,n){if(!n)return;let i=t[e],r=xoe({editor:i,initialHtml:n});i.setEditorState(r,{tag:"history-merge"}),t[`${e}InitialState`]=r}A.createCommand();var zm=class extends Pw{constructor(e={},n){super(e,n),we(this,"__openInEditMode",!1),we(this,"__captionEditor"),we(this,"__captionEditorInitialState");let{_openInEditMode:i}=e;this.__openInEditMode=i||!1,Ni(this,"__captionEditor",{editor:e.captionEditor,nodes:Mr}),!e.captionEditor&&e.caption&&Pi(this,"__captionEditor",`${e.caption}`)}getIcon(){return K9e}clearOpenInEditMode(){let e=this.getWritable();e.__openInEditMode=!1}getDataset(){let e=super.getDataset(),n=this.getLatest();return e.captionEditor=n.__captionEditor,e.captionEditorInitialState=n.__captionEditorInitialState,e}exportJSON(){let e=super.exportJSON();return this.__captionEditor&&this.__captionEditor.getEditorState().read(()=>{let n=di.$generateHtmlFromNodes(this.__captionEditor,null),i=ki(n);e.caption=i}),e}decorate(){return w.jsx(Jn,{nodeKey:this.getKey(),wrapperStyle:"code-card",children:w.jsx(FRe,{captionEditor:this.__captionEditor,captionEditorInitialState:this.__captionEditorInitialState,code:this.code,language:this.language,nodeKey:this.getKey()})})}};function W7(t){return new zm(t)}function WRe(t){return t instanceof zm}var BRe=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",...t},J.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M22.525 29 3 3h6.475L29 29h-6.475Zm5.557-26L17.789 14.075M3.918 29l10.285-11.067"})),id={},_oe=ct,Lc=A,HRe=new Set(["http:","https:","mailto:","sms:","tel:"]),W4=class Ooe extends Lc.ElementNode{static getType(){return"link"}static clone(e){return new Ooe(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e,n={},i){super(i);let{target:r=null,rel:o=null,title:a=null}=n;this.__url=e,this.__target=r,this.__rel=o,this.__title=a}createDOM(e){let n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),this.__target!==null&&(n.target=this.__target),this.__rel!==null&&(n.rel=this.__rel),this.__title!==null&&(n.title=this.__title),_oe.addClassNamesToElement(n,e.theme.link),n}updateDOM(e,n){let i=this.__url,r=this.__target,o=this.__rel,a=this.__title;return i!==e.__url&&(n.href=i),r!==e.__target&&(r?n.target=r:n.removeAttribute("target")),o!==e.__rel&&(o?n.rel=o:n.removeAttribute("rel")),a!==e.__title&&(a?n.title=a:n.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:ZRe,priority:1})}}static importJSON(e){let n=Wb(e.url,{rel:e.rel,target:e.target,title:e.title});return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}sanitizeUrl(e){try{let n=new URL(e);if(!HRe.has(n.protocol))return"about:blank"}catch{}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(e){this.getWritable().__url=e}getTarget(){return this.getLatest().__target}setTarget(e){this.getWritable().__target=e}getRel(){return this.getLatest().__rel}setRel(e){this.getWritable().__rel=e}getTitle(){return this.getLatest().__title}setTitle(e){this.getWritable().__title=e}insertNewAfter(e,n=!0){return e=Wb(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),this.insertAfter(e,n),e}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,n){if(!Lc.$isRangeSelection(n))return!1;e=n.anchor.getNode();let i=n.focus.getNode();return this.isParentOf(e)&&this.isParentOf(i)&&0{if(o=o.getParent(),Dg(o)){let a=o.getChildren();for(let s=0;s{var l=s.getParent();if(l!==a&&l!==null&&(!Lc.$isElementNode(s)||s.isInline()))if(Dg(l))a=l,l.setURL(t),n!==void 0&&l.setTarget(n),r!==null&&a.setRel(r),i!==void 0&&a.setTitle(i);else if(l.is(o)||(o=l,a=Wb(t,{rel:r,target:n,title:i}),Dg(l)?s.getPreviousSibling()===null?l.insertBefore(a):l.insertAfter(a):s.insertBefore(a)),Dg(s)){if(!s.is(a)){if(a!==null){l=s.getChildren();for(let c=0;cct.mergeRegister(n.registerCommand(A.KEY_ENTER_COMMAND,i=>(e(i),!1),A.COMMAND_PRIORITY_LOW)),[n,e,t])}function Coe({dataTestId:t,value:e,placeholder:n,handleUrlChange:i,handleUrlSubmit:r,hasError:o,handlePasteAsLink:a,handleRetry:s,handleClose:l,isLoading:c}){return N.default.useEffect(()=>{let d=f=>{f.key==="Escape"&&l()};return window.addEventListener("keydown",d),()=>{window.removeEventListener("keydown",d)}},[l]),c?w.jsx("div",{className:"flex w-full items-center justify-center rounded-md border border-grey-300 p-2 font-sans text-sm font-normal leading-snug text-grey-900 focus-visible:outline-none dark:border-grey-800 dark:bg-grey-900 dark:placeholder:text-grey-800","data-testid":`${t}-loading-container`,children:w.jsx("div",{className:"-ml-1 mr-3 inline-block size-5 animate-spin rounded-full border-4 border-green/20 text-white after:mt-[11px] after:block after:size-1 after:rounded-full after:bg-green/70 after:content-['']","data-testid":`${t}-loading-spinner`})}):o?w.jsxs("div",{className:"min-width-[500px] flex flex-row items-center justify-between rounded-md border border-grey-300 px-3 py-2 text-sm font-normal leading-snug text-grey-900","data-testid":`${t}-error-container`,children:[w.jsxs("div",{children:[w.jsx("span",{className:"mr-3","data-testid":`${t}-error-message`,children:"Oops, that link didn't work."}),w.jsx("button",{className:"mr-3 cursor-pointer","data-testid":`${t}-error-retry`,type:"button",children:w.jsx("span",{className:"font-semibold underline",onClick:s,children:"Retry"})}),w.jsx("button",{className:"mr-3 cursor-pointer","data-testid":`${t}-error-pasteAsLink`,type:"button",children:w.jsx("span",{className:"font-semibold underline",onClick:()=>a(e),children:"Paste URL as link"})})]}),w.jsx("button",{className:"cursor-pointer p-1","data-testid":`${t}-error-close`,type:"button",onClick:l,children:w.jsx($0,{className:"size-4 stroke-2 text-grey-400"})})]}):w.jsxs(w.Fragment,{children:[w.jsx(YRe,{value:e,onEnter:r}),w.jsx("input",{autoFocus:!0,className:"w-full rounded-md border border-grey-300 p-2 font-sans text-sm font-normal leading-snug text-grey-900 focus-visible:outline-none dark:border-grey-800 dark:bg-grey-950 dark:text-grey-100 dark:placeholder:text-grey-800","data-testid":t,placeholder:n,value:e,onChange:i,onKeyDown:r})]})}function XRe({children:t,waitBeforeShow:e=500}){let[n,i]=N.default.useState(e===0);return N.default.useEffect(()=>{if(n)return;let r=setTimeout(()=>{i(!0)},e);return()=>{clearTimeout(r)}},[n,e]),n?t:null}var GRe=Us,KRe=function(){return GRe.Date.now()},JRe=KRe,eFe=/\s/;function tFe(t){for(var e=t.length;e--&&eFe.test(t.charAt(e)););return e}var nFe=tFe,iFe=nFe,rFe=/^\s+/;function oFe(t){return t&&t.slice(0,iFe(t)+1).replace(rFe,"")}var aFe=oFe,sFe=x0,lFe=Gh,cFe="[object Symbol]";function dFe(t){return typeof t=="symbol"||lFe(t)&&sFe(t)==cFe}var B4=dFe,uFe=aFe,_U=ed,fFe=B4,OU=NaN,hFe=/^[-+]0x[0-9a-f]+$/i,pFe=/^0b[01]+$/i,gFe=/^0o[0-7]+$/i,mFe=parseInt;function vFe(t){if(typeof t=="number")return t;if(fFe(t))return OU;if(_U(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=_U(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=uFe(t);var n=pFe.test(t);return n||gFe.test(t)?mFe(t.slice(2),n?2:8):hFe.test(t)?OU:+t}var yFe=vFe,bFe=ed,D8=JRe,SU=yFe,wFe="Expected a function",kFe=Math.max,xFe=Math.min;function _Fe(t,e,n){var i,r,o,a,s,l,c=0,d=!1,f=!1,h=!0;if(typeof t!="function")throw new TypeError(wFe);e=SU(e)||0,bFe(n)&&(d=!!n.leading,f="maxWait"in n,o=f?kFe(SU(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function g(M){var I=i,F=r;return i=r=void 0,c=M,a=t.apply(F,I),a}function m(M){return c=M,s=setTimeout(_,e),d?g(M):a}function b(M){var I=M-l,F=M-c,W=e-I;return f?xFe(W,o-F):W}function x(M){var I=M-l,F=M-c;return l===void 0||I>=e||I<0||f&&F>=o}function _(){var M=D8();if(x(M))return O(M);s=setTimeout(_,b(M))}function O(M){return s=void 0,h&&i?g(M):(i=r=void 0,a)}function S(){s!==void 0&&clearTimeout(s),c=0,i=l=r=s=void 0}function E(){return s===void 0?a:O(D8())}function T(){var M=D8(),I=x(M);if(i=arguments,r=this,l=M,I){if(s===void 0)return m(l);if(f)return clearTimeout(s),s=setTimeout(_,e),g(l)}return s===void 0&&(s=setTimeout(_,e)),a}return T.cancel=S,T.flush=E,T}var Eoe=_Fe,D0=Da(Eoe);function pD({dataTestId:t,className:e="z-[-1] max-h-[30vh] w-full overflow-y-auto bg-white shadow rounded-lg dark:border-grey-800 dark:bg-grey-900",placementTopClass:n="-top-0.5 -translate-y-full",placementBottomClass:i="mt-0.5",children:r,...o}){let a=N.default.useRef(null),[s,l]=N.default.useState("bottom"),c=()=>{if(!a||!a.current)return;let d=a.current.parentNode.getBoundingClientRect().bottom;window.innerHeight-d{c()},[]),N.default.useEffect(()=>{let d=D0(()=>{c()},250);return window.addEventListener("resize",d,{passive:!0}),()=>{window.removeEventListener("resize",d,{passive:!0})}},[]),w.jsx("ul",{ref:a,className:rt("absolute",s==="top"&&n,s==="bottom"&&i,e),"data-testid":`${t}-dropdown`,...o,children:r})}var OFe="h-9 rounded-lg border border-grey-100 bg-grey-100 dark:bg-grey-900 dark:border-transparent dark:focus:border-green dark:hover:bg-grey-925 dark:focus:bg-grey-925 transition-colors px-3 py-1.5 font-sans text-sm font-normal text-grey-900 focus:border-green focus:bg-white focus:shadow-[0_0_0_2px_rgba(48,207,67,.25)] focus-visible:outline-none dark:text-white dark:selection:bg-grey-800 placeholder:text-grey-500 md:h-[38px] md:py-2 dark:placeholder:text-grey-700";function gD({autoFocus:t,className:e,dataTestId:n,value:i,onChange:r,...o}){let a=N.default.useRef(null),s=N.default.useRef(t),[l,c]=N.default.useState(i),d=N.default.useCallback(f=>{c(f.target.value),r&&r(f)},[r]);return N.default.useEffect(()=>{if(c(i),s.current){let f=setTimeout(()=>{a.current&&(s.current=!1,a.current.focus())},0);return()=>clearTimeout(f)}},[i]),w.jsx(w.Fragment,{children:w.jsx("div",{className:"relative",children:w.jsx("input",{ref:a,autoFocus:t,className:`relative w-full ${e||OFe}`,"data-testid":n,value:l,onChange:d,...o})})})}function mD({items:t,getItem:e,onSelect:n,defaultSelected:i}){let r=Math.max(0,t.findIndex(l=>l===i)),[o,a]=N.default.useState(r);N.default.useEffect(()=>{o>=t.length&&a(r)},[t,o,r]),N.default.useEffect(()=>{a(r)},[r]);let s=N.default.useCallback(l=>{l.key==="ArrowDown"&&(l.preventDefault(),l.stopPropagation(),a(c=>Math.min(c+1,t.length-1))),l.key==="ArrowUp"&&(l.preventDefault(),l.stopPropagation(),a(c=>Math.max(c-1,0))),l.key==="Enter"&&(l.preventDefault(),l.stopPropagation(),n(t[o]))},[t,o,n]);return N.default.useEffect(()=>(window.addEventListener("keydown",s,{capture:!0}),()=>{window.removeEventListener("keydown",s,{capture:!0})}),[s]),w.jsx(w.Fragment,{children:t.map((l,c)=>e(l,c===o))})}var SFe=({children:t})=>w.jsx(w.Fragment,{children:t});function vD({groups:t,getItem:e,getGroup:n,onSelect:i,defaultSelected:r,isLoading:o}){let a=t.flatMap(g=>g.items),s=Math.max(0,a.findIndex(g=>g===r)),[l,c]=N.default.useState(s),[d,f]=N.default.useState(!1);N.default.useEffect(()=>{l>=a.length&&c(s)},[a,l,s]),N.default.useEffect(()=>{c(s)},[s]);let h=N.default.useCallback(g=>{g.key==="ArrowDown"&&(g.preventDefault(),g.stopPropagation(),c(m=>Math.min(m+1,a.length-1)),f(!0)),g.key==="ArrowUp"&&(g.preventDefault(),g.stopPropagation(),c(m=>Math.max(m-1,0)),f(!0)),g.key==="Enter"&&(g.preventDefault(),g.stopPropagation(),i(a[l]))},[a,l,i]);return N.default.useEffect(()=>(window.addEventListener("keydown",h,{capture:!0}),()=>{window.removeEventListener("keydown",h,{capture:!0})}),[h]),w.jsx(w.Fragment,{children:t.map((g,m)=>w.jsxs(SFe,{children:[n(g,{showSpinner:m===0&&o}),(g.items||[]).map((b,x)=>{let _=t.slice(0,m).reduce((S,E)=>S+E.items.length,0)+x,O=_===l&&!!b.value;return e(b,O,()=>{b.value&&c(_),f(!1)},d)})]},g.label))})}function Toe({size:t}){let e="";switch(t){case"mini":e="h-3 w-3";break;default:e="h-5 w-5";break}return w.jsx("div",{className:"","data-testid":"spinner",children:w.jsxs("svg",{className:`${e} animate-spin text-grey-500 dark:text-grey-200`,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[w.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",style:{opacity:"0.3"}}),w.jsx("path",{d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",fill:"currentColor"})]})})}Toe.propTypes={colorClass:$.string,size:$.string};function Moe({dataTestId:t}){return w.jsx(XRe,{children:w.jsx("li",{className:"mb-0 px-4 py-2 text-left","data-testid":`${t}-loading`,children:w.jsx("span",{className:"block text-sm font-medium leading-tight text-grey-900 dark:text-white",children:"Searching..."})})})}function Noe({dataTestId:t,item:e,selected:n,onClick:i,onMouseOver:r,scrollIntoView:o,className:a,selectedClassName:s,children:l}){let c=N.default.useRef(null);N.default.useEffect(()=>{n&&o&&c.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},[n,o]);let d=h=>{h.preventDefault(),i(e)},f=e.value?"":"pointer-events-none";return w.jsx("li",{ref:c,"aria-selected":n,className:`${n?s:""} ${f} ${a}`,"data-testid":`${t}-listOption`,role:"option",onMouseDownCapture:d,onMouseOver:r,children:l})}function yD({dataTestId:t,group:e,showSpinner:n}){return w.jsx("li",{className:"mb-0 mt-2 flex items-center justify-between border-t border-grey-200 px-4 pb-2 pt-3 text-[1.1rem] font-semibold uppercase tracking-wide text-grey-600 first-of-type:mt-0 first-of-type:border-t-0 dark:border-grey-900","data-testid":`${t}-listGroup`,children:w.jsxs("div",{className:"flex items-center gap-1.5",children:[e.label,n&&w.jsx("span",{className:"ml-px","data-testid":"input-list-spinner",children:w.jsx(Toe,{size:"mini"})})]})})}function CFe(){throw new Error(" getItem function prop must be provided")}function Poe({autoFocus:t,className:e,inputClassName:n,dropdownClassName:i,dropdownPlacementBottomClass:r,dropdownPlacementTopClass:o,dataTestId:a,listOptions:s,isLoading:l,value:c,placeholder:d,onChange:f,onSelect:h,getItem:g=CFe}){var m;let[b,x]=N.default.useState(!1),_=()=>{x(!0)},O=()=>{x(!1)},S=(W,{showSpinner:Z}={})=>w.jsx(yD,{dataTestId:a,group:W,showSpinner:Z},W.label),E=W=>{f(W.target.value)},T=W=>{(h||f)(W.value,W.type)},M=s&&((m=s[0])==null?void 0:m.items),I=(l||s&&!!s.length)&&b,F=()=>w.jsxs(pD,{className:i,dataTestId:a,placementBottomClass:r,placementTopClass:o,children:[l&&!(s!=null&&s.length)&&w.jsx(Moe,{dataTestId:a}),M?w.jsx(vD,{getGroup:S,getItem:g,groups:s,isLoading:l,onSelect:T}):w.jsx(mD,{getItem:g,items:s,onSelect:T})]});return w.jsx(w.Fragment,{children:w.jsxs("div",{className:`relative z-0 ${e||""}`,children:[w.jsx(gD,{autoFocus:t,className:n,dataTestId:a,placeholder:d,value:c,onBlur:O,onChange:E,onFocus:_}),I&&w.jsx(F,{})]})})}var CU=k0,EFe=mee,TFe=td,MFe=B4,EU=CU?CU.prototype:void 0,TU=EU?EU.toString:void 0;function Aoe(t){if(typeof t=="string")return t;if(TFe(t))return EFe(t,Aoe)+"";if(MFe(t))return TU?TU.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var NFe=Aoe,PFe=NFe;function AFe(t){return t==null?"":PFe(t)}var H4=AFe,$Fe=H4,$oe=/[\\^$.*+?()[\]{}|]/g,DFe=RegExp($oe.source);function IFe(t){return t=$Fe(t),t&&DFe.test(t)?t.replace($oe,"\\$&"):t}var LFe=IFe,jFe=Da(LFe);function RFe({string:t,highlightString:e,shouldHighlight:n=!0}){if(!e||n===!1)return t;let i=t.split(new RegExp(`(${jFe(e)})`,"gi"));return w.jsx(w.Fragment,{children:i.map((r,o)=>r.toLowerCase()===e.toLowerCase()?w.jsx("span",{className:"font-bold",children:r},o):r)})}function bD({dataTestId:t,item:e,highlightString:n,selected:i,onMouseOver:r,scrollIntoView:o,onClick:a}){return w.jsxs(Noe,{className:"my-[.2rem] flex cursor-pointer items-center justify-between gap-3 rounded-md px-4 py-2 text-left text-black dark:text-white",dataTestId:t,item:e,scrollIntoView:o,selected:i,selectedClassName:"bg-grey-100 dark:bg-grey-900",onClick:a,onMouseOver:r,children:[w.jsxs("span",{className:"line-clamp-1 flex items-center gap-[.6rem]",children:[e.Icon&&w.jsx(e.Icon,{className:"size-[1.4rem] stroke-[1.5px]"}),w.jsx("span",{className:"block truncate text-sm font-medium leading-snug","data-testid":`${t}-listOption-label`,children:w.jsx(RFe,{highlightString:n,shouldHighlight:e.highlight,string:e.label})})]}),i&&(e.metaText||e.MetaIcon)&&w.jsxs("span",{className:"flex shrink-0 items-center gap-[.6rem] text-[1.3rem] leading-snug tracking-tight text-grey-600 dark:text-grey-500","data-testid":`${t}-listOption-meta`,children:[w.jsx("span",{title:e.metaIconTitle,children:e.MetaIcon&&w.jsx(e.MetaIcon,{className:"size-[1.4rem]"})}),e.metaText&&w.jsx("span",{children:e.metaText})]})]})}var Doe=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t},J.createElement("g",null,J.createElement("path",{d:"M0.75 12a11.25 11.25 0 1 0 22.5 0 11.25 11.25 0 1 0 -22.5 0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),J.createElement("path",{d:"M9.88 23.05c-1.57 -2.2 -2.63 -6.33 -2.63 -11S8.31 3.15 9.88 1",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),J.createElement("path",{d:"M14.12 23.05c1.57 -2.2 2.63 -6.33 2.63 -11S15.69 3.15 14.12 1",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),J.createElement("path",{d:"m0.75 12 22.5 0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),J.createElement("path",{d:"m2.05 17.25 19.9 0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),J.createElement("path",{d:"m2.05 6.75 19.9 0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))),FFe=100,MU=/^http|^#|^\/|^mailto:|^tel:/;function zFe(t){return[{label:"Link to web page",items:[{label:t,value:t,Icon:Doe,highlight:!1,type:"url"}]}]}function QFe(t){return[{label:"Link to web page",items:[{label:"Enter URL to create link",value:null,Icon:Doe,highlight:!1,type:"no-results"}]}]}function NU(t,{noResultOptions:e,type:n}={}){return!t||!t.length?(e||QFe)():t.map(i=>{let r=i.items.map(o=>({label:o.title,value:o.url,Icon:o.Icon,metaText:o.metaText,MetaIcon:o.MetaIcon,metaIconTitle:o.metaIconTitle,type:n||"internal"}));return{...i,items:r}})}var wD=(t,e,{noResultOptions:n}={})=>{let[i,r]=N.default.useState([]),[o,a]=N.default.useState([]),[s,l]=N.default.useState(!1),c=N.default.useMemo(()=>async function(f){if(MU.test(f)){a(zFe(f));return}l(!0);let h=await e(f);h!==void 0&&(a(NU(h,{noResultOptions:n})),l(!1))},[e,n]),d=N.default.useMemo(()=>D0(c,FFe),[c]);return N.default.useEffect(()=>{(async()=>{!t&&l(!0);let f=await e();r(NU(f,{type:"default"})),!t&&l(!1)})().catch(console.error)},[]),N.default.useEffect(()=>{MU.test(t)?(d.cancel(),c(t)):d(t)},[t,c,d]),{isSearching:s,listOptions:t?o:i}};function WFe({dataTestId:t,value:e,placeholder:n,handleUrlChange:i,handleUrlSubmit:r,hasError:o,handlePasteAsLink:a,handleRetry:s,handleClose:l,isLoading:c,searchLinks:d}){let{isSearching:f,listOptions:h}=wD(e,d);if(N.default.useEffect(()=>{e||wi("Link dropdown: Opened",{context:"bookmark"})},[]),N.default.useEffect(()=>{let _=O=>{O.key==="Escape"&&l()};return window.addEventListener("keydown",_),()=>{window.removeEventListener("keydown",_)}},[l]),c)return w.jsx("div",{className:"flex w-full items-center justify-center rounded-md border border-grey-300 p-2 font-sans text-sm font-normal leading-snug text-grey-900 focus-visible:outline-none dark:border-grey-800 dark:bg-grey-900 dark:placeholder:text-grey-800","data-testid":`${t}-loading-container`,children:w.jsx("div",{className:"-ml-1 mr-3 inline-block size-5 animate-spin rounded-full border-4 border-green/20 text-white after:mt-[11px] after:block after:size-1 after:rounded-full after:bg-green/70 after:content-['']","data-testid":`${t}-loading-spinner`})});if(o)return w.jsxs("div",{className:"min-width-[500px] flex flex-row items-center justify-between rounded-md border border-grey-300 px-3 py-2 text-sm font-normal leading-snug text-grey-900","data-testid":`${t}-error-container`,children:[w.jsxs("div",{children:[w.jsx("span",{className:"mr-3","data-testid":`${t}-error-message`,children:"Oops, that link didn't work."}),w.jsx("button",{className:"mr-3 cursor-pointer","data-testid":`${t}-error-retry`,type:"button",children:w.jsx("span",{className:"font-semibold underline",onClick:s,children:"Retry"})}),w.jsx("button",{className:"mr-3 cursor-pointer","data-testid":`${t}-error-pasteAsLink`,type:"button",children:w.jsx("span",{className:"font-semibold underline",onClick:()=>a(e),children:"Paste URL as link"})})]}),w.jsx("button",{className:"cursor-pointer p-1","data-testid":`${t}-error-close`,type:"button",onClick:l,children:w.jsx($0,{className:"size-4 stroke-2 text-grey-400"})})]});let g=async _=>{i(_)},m=(_,O)=>{if(_===null)return;let S=_&&typeof _=="string"?_:_.value;r(S,O)},b=_=>{!_.isComposing&&_.key==="Enter"&&(_.preventDefault(),r(_.target.value))},x=(_,O,S,E)=>w.jsx(bD,{dataTestId:t,highlightString:e,item:_,scrollIntoView:E,selected:O,onClick:m,onMouseOver:S},_.value);return w.jsx("div",{className:"not-kg-prose",onKeyDown:b,children:w.jsx(Poe,{autoFocus:!0,dataTestId:t,dropdownClassName:"z-[-1] max-h-[30vh] w-full overflow-y-auto bg-white px-2 py-1 shadow-md dark:bg-grey-950",dropdownPlacementBottomClass:"mt-[.6rem] rounded-md",dropdownPlacementTopClass:"top-[-.6rem] -translate-y-full rounded-md",getItem:x,inputClassName:"w-full rounded-md border border-grey-300 p-2 font-sans text-sm font-normal leading-snug text-grey-900 placeholder:text-grey-500 focus-visible:outline-none dark:border-grey-800 dark:bg-grey-950 dark:text-grey-100 dark:placeholder:text-grey-800",isLoading:f,listOptions:h,placeholder:n,value:e,onChange:g,onSelect:m})})}function Ioe({author:t,handleClose:e,handlePasteAsLink:n,handleRetry:i,handleUrlChange:r,handleUrlSubmit:o,url:a,urlInputValue:s,urlPlaceholder:l,thumbnail:c,title:d,description:f,icon:h,publisher:g,captionEditor:m,captionEditorInitialState:b,isSelected:x,isLoading:_,urlError:O,searchLinks:S}){let[E,T]=N.default.useState(!0),M=()=>{T(!1)};return a&&!O&&d?w.jsxs("div",{children:[w.jsxs("div",{className:"not-kg-prose relative flex min-h-[120px] w-full rounded-md border border-grey/40 bg-transparent font-sans dark:border-grey/20","data-testid":"bookmark-container",children:[w.jsxs("div",{className:"flex grow basis-full flex-col items-start justify-start p-5","data-testid":"bookmark-text-container",children:[w.jsx("div",{className:"text-[1.5rem] font-semibold leading-normal tracking-normal text-grey-900 dark:text-grey-100","data-testid":"bookmark-title",children:d}),w.jsx("div",{className:"mt-1 line-clamp-2 max-h-[44px] overflow-y-hidden text-sm font-normal leading-normal text-grey-800 dark:text-grey-600","data-testid":"bookmark-description",children:f}),w.jsxs("div",{className:"mt-[20px] flex items-center text-sm font-medium leading-9 text-grey-900",children:[h&&w.jsx(Loe,{src:h}),w.jsx("span",{className:" db max-w-[240px] truncate leading-6 text-grey-900 dark:text-grey-100","data-testid":"bookmark-publisher",children:g}),t&&w.jsx("span",{className:"font-normal text-grey-800 before:mx-1.5 before:text-grey-900 before:content-['\u2022'] dark:text-grey-600 dark:before:text-grey-100","data-testid":"bookmark-author",children:t})]})]}),c&&E&&w.jsx("div",{className:"grow-1 relative m-0 min-w-[33%]","data-testid":"bookmark-thumbnail-container",children:w.jsx("img",{alt:"",className:"absolute inset-0 size-full rounded-r-[.5rem] object-cover","data-testid":"bookmark-thumbnail",src:c,onError:M})}),w.jsx("div",{className:"absolute inset-0 z-50 mt-0"})]}),w.jsx(A0,{captionEditor:m,captionEditorInitialState:b,captionPlaceholder:"Type caption for bookmark (optional)",dataTestId:"bookmark-caption",isSelected:x})]}):typeof S=="function"?w.jsx(WFe,{dataTestId:"bookmark-url",handleClose:e,handlePasteAsLink:n,handleRetry:i,handleUrlChange:r,handleUrlSubmit:o,hasError:O,isLoading:_,placeholder:l,searchLinks:S,value:s}):w.jsx(Coe,{dataTestId:"bookmark-url",handleClose:e,handlePasteAsLink:n,handleRetry:i,handleUrlChange:r,handleUrlSubmit:o,hasError:O,isLoading:_,placeholder:l,value:s})}function Loe({src:t}){return w.jsx("img",{alt:"",className:"mr-2 size-5 shrink-0","data-testid":"bookmark-icon",src:t})}Ioe.propTypes={author:$.string,handleClose:$.func,handlePasteAsLink:$.func,handleRetry:$.func,handleUrlChange:$.func,handleUrlSubmit:$.func,url:$.string,urlInputValue:$.string,urlPlaceholder:$.string,thumbnail:$.string,title:$.string,description:$.string,icon:$.string,publisher:$.string,captionEditor:$.object,captionEditorInitialState:$.object,isSelected:$.bool,isLoading:$.bool,urlError:$.bool,searchLinks:$.func};Loe.propTypes={src:$.string};function kD(t,e){if(!t||!e)return!1;try{let n=new URL(t),i=`/${new URL(e).pathname.split("/")[1]}`;return n.hostname===new URL(e).hostname&&n.pathname.startsWith(i)}catch{return!1}}function BFe({author:t,nodeKey:e,url:n,icon:i,title:r,description:o,publisher:a,thumbnail:s,captionEditor:l,captionEditorInitialState:c,createdWithUrl:d}){let[f]=Oe.useLexicalComposerContext(),{cardConfig:h}=N.default.useContext(ut),{isSelected:g}=N.default.useContext(vn),[m,b]=N.default.useState(n),[x,_]=N.default.useState(!1),[O,S]=N.default.useState(!1),[E,T]=N.default.useState(!1),M=B=>{if(typeof B=="string"){b(B);return}b(B.target.value)},I=async(B,R)=>{if(B){if(typeof B=="string"){if((R==="internal"||R==="default")&&wi("Link dropdown: Internal link chosen",{context:"bookmark",fromLatest:R==="default"}),R==="url"){let U=kD(B,h?.siteUrl)?"internal":"external";wi("Link dropdown: URL entered",{context:"bookmark",target:U})}j(B)}B?.key==="Enter"&&j(B.target.value)}},F=async()=>{S(!1)},W=(0,N.useCallback)(()=>{f.update(()=>{let B=A.$getNodeByKey(e),R=A.$createParagraphNode().append(Mi.$createLinkNode(m).append(A.$createTextNode(m)));B.replace(R),R.selectEnd()})},[f,e,m]),Z=(0,N.useCallback)(()=>{f.update(()=>{let B=A.$getNodeByKey(e),R=B.getNextSibling();if(R&&A.$isParagraphNode(R)&&R.getTextContentSize()===0)B.remove(),R.selectEnd();else{let U=A.$createParagraphNode();B.replace(U),U.selectEnd()}})},[f,e]),j=async B=>{f.getRootElement().focus({preventScroll:!0}),_(!0);let R;try{R=await h.fetchEmbed(B,{type:"bookmark"})}catch{_(!1),S(!0);return}f.update(()=>{let U=A.$getNodeByKey(e);U.url=B,U.author=R.metadata.author,U.icon=R.metadata.icon,U.title=R.metadata.title,U.description=R.metadata.description,U.publisher=R.metadata.publisher,U.thumbnail=R.metadata.thumbnail}),_(!1)},H=(0,N.useCallback)(async()=>{_(!0);let B;try{B=await h.fetchEmbed(n,{type:"bookmark"})}catch{_(!1),S(!0);return}f.update(()=>{let R=A.$getNodeByKey(e);R.url=B.url,R.author=B.metadata.author,R.icon=B.metadata.icon,R.title=B.metadata.title,R.description=B.metadata.description,R.publisher=B.metadata.publisher,R.thumbnail=B.metadata.thumbnail,d&&R.selectNext()}),_(!1)},[]);N.default.useEffect(()=>{if(d){b(n);try{H(n)}catch{W(n)}}},[]);let X=typeof h?.searchLinks=="function";return w.jsxs(w.Fragment,{children:[w.jsx(Ioe,{author:t,captionEditor:l,captionEditorInitialState:c,description:o,handleClose:Z,handlePasteAsLink:W,handleRetry:F,handleUrlChange:M,handleUrlSubmit:I,icon:i,isLoading:x,isSelected:g,publisher:a,searchLinks:h?.searchLinks,thumbnail:s,title:r,url:n,urlError:O,urlInputValue:m,urlPlaceholder:X?"Paste URL or search posts and pages...":"Paste URL to add bookmark content..."}),w.jsx(xt,{"data-kg-card-toolbar":"bookmark",isVisible:E,children:w.jsx(pi,{onClose:()=>T(!1)})}),w.jsx(xt,{"data-kg-card-toolbar":"bookmark",isVisible:r&&g&&!E&&h.createSnippet,children:w.jsx(gi,{children:w.jsx(lt,{dataTestId:"create-snippet",hide:!h.createSnippet,icon:"snippet",isActive:!1,label:"Save as snippet",onClick:()=>T(!0)})})})]})}var joe=A.createCommand(),Qm=class extends Ww{constructor(e={},n){super(e,n),we(this,"__captionEditor"),we(this,"__captionEditorInitialState"),we(this,"__createdWithUrl"),this.__createdWithUrl=!!e.url&&!e.metadata,Ni(this,"__captionEditor",{editor:e.captionEditor,nodes:Mr}),!e.captionEditor&&e.caption&&Pi(this,"__captionEditor",`${e.caption}`)}getIcon(){return nG}getDataset(){let e=super.getDataset(),n=this.getLatest();return e.captionEditor=n.__captionEditor,e.captionEditorInitialState=n.__captionEditorInitialState,e}exportJSON(){let e=super.exportJSON();return this.__captionEditor&&this.__captionEditor.getEditorState().read(()=>{let n=di.$generateHtmlFromNodes(this.__captionEditor,null),i=ki(n);e.caption=i}),e}decorate(){return w.jsx(Jn,{nodeKey:this.getKey(),children:w.jsx(BFe,{author:this.author,captionEditor:this.__captionEditor,captionEditorInitialState:this.__captionEditorInitialState,createdWithUrl:this.__createdWithUrl,description:this.description,icon:this.icon,nodeKey:this.getKey(),publisher:this.publisher,thumbnail:this.thumbnail,title:this.title,url:this.url})})}};we(Qm,"kgMenu",[{label:"Bookmark",desc:"Embed a link as a visual bookmark",Icon:nG,insertCommand:joe,matches:["bookmark"],queryParams:["url"],priority:4,shortcut:"/bookmark [url]"}]);var xD=t=>new Qm(t);function Roe({captionEditor:t,captionEditorInitialState:e,html:n,isSelected:i,urlInputValue:r,urlPlaceholder:o,urlError:a,isLoading:s,handleUrlChange:l,handleUrlSubmit:c,handleRetry:d,handlePasteAsLink:f,handleClose:h}){return n?w.jsxs("div",{children:[w.jsxs("div",{className:"not-kg-prose relative",children:[w.jsx(Foe,{dataTestId:"embed-iframe",html:n}),w.jsx("div",{className:"absolute inset-0 z-50 mt-0"})]}),w.jsx(A0,{captionEditor:t,captionEditorInitialState:e,captionPlaceholder:"Type caption for embed (optional)",dataTestId:"embed-caption",isSelected:i})]}):w.jsx(Coe,{dataTestId:"embed-url",handleClose:h,handlePasteAsLink:f,handleRetry:d,handleUrlChange:l,handleUrlSubmit:c,hasError:a,isLoading:s,placeholder:o,value:r})}function Foe({dataTestId:t,html:e}){let n=N.default.useRef(null),i=()=>{var s,l,c,d,f,h;let g=(c=(l=(s=n.current)==null?void 0:s.contentDocument)==null?void 0:l.body)==null?void 0:c.firstChild;if(!g)return;if(g.tagName==="IFRAME"){let b=g.getAttribute("width"),x=g.getAttribute("height");if(b&&x&&b.indexOf("%")===-1&&x.indexOf("%")===-1){let _=parseInt(b)/parseInt(x),O=n.current.offsetWidth/_;g.style.height=`${O}px`,n.current.style.height=`${O}px`,g.style.width="100%";return}if(x&&x.indexOf("%")===-1){n.current.style.height=`${x}px`;return}}let m=(h=(f=(d=n.current)==null?void 0:d.contentDocument)==null?void 0:f.scrollingElement)==null?void 0:h.scrollHeight;m&&(n.current.style.height=`${m}px`)},r={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0},o=new MutationObserver(i),a=()=>{let s=n.current.contentDocument.body;s.style.display="flex",s.style.margin="0",s.style.justifyContent="center",i(),o.observe(n.current.contentWindow.document,r)};return N.default.useEffect(()=>{let s=new ResizeObserver(i);return s.observe(n.current),function(){s.disconnect(),o.disconnect()}},[]),w.jsx("iframe",{ref:n,className:"bn miw-100 w-full","data-testid":t,srcDoc:e,tabIndex:-1,title:"embed-card-iframe",onLoad:a})}Roe.propTypes={html:$.string,isSelected:$.bool,urlInputValue:$.string,urlPlaceholder:$.string,urlError:$.bool,isLoading:$.bool,handleUrlChange:$.func,handleUrlSubmit:$.func,handleRetry:$.func,handlePasteAsLink:$.func,handleClose:$.func,captionEditor:$.object,captionEditorInitialState:$.object};Foe.propTypes={dataTestId:$.string,html:$.string};function HFe({nodeKey:t,url:e,html:n,createdWithUrl:i,embedType:r,metadata:o,captionEditor:a,captionEditorInitialState:s}){let[l]=Oe.useLexicalComposerContext(),{cardConfig:c}=N.default.useContext(ut),{isSelected:d}=N.default.useContext(vn),[f,h]=N.default.useState(""),[g,m]=N.default.useState(!1),[b,x]=N.default.useState(!1),[_,O]=N.default.useState(!1),S=W=>{h(W.target.value)},E=async W=>{W.key==="Enter"&&F(W.target.value)},T=async()=>{x(!1)},M=(0,N.useCallback)(W=>{l.update(()=>{let Z=A.$getNodeByKey(t);if(!Z)return;let j=A.$createParagraphNode().append(Mi.$createLinkNode(W).append(A.$createTextNode(W)));Z.replace(j),j.getNextSibling()||j.insertAfter(A.$createParagraphNode()),j.selectNext()})},[l,t]),I=(0,N.useCallback)(()=>{l.update(()=>{let W=A.$getNodeByKey(t),Z=W.getNextSibling();if(Z&&A.$isParagraphNode(Z)&&Z.getTextContentSize()===0)W.remove(),Z.selectEnd();else{let j=A.$createParagraphNode();W.replace(j),j.selectEnd()}})},[l,t]),F=async W=>{m(!0);let Z;try{if(Z=await c.fetchEmbed(W,{}),Z.type==="bookmark"){l.update(()=>{let j=A.$getNodeByKey(t),H=xD({url:Z.url,metadata:Z.metadata});j.replace(H)});return}}catch{if(i){m(!1),M(W);return}m(!1),x(!0);return}l.update(()=>{let j=A.$getNodeByKey(t);j.url=W,j.metadata=Z,j.embedType=Z.type,j.html=Z.html,i&&j.selectNext()}),m(!1)};return N.default.useEffect(()=>{if(i){h(e);try{F(e)}catch{M(e)}}},[]),w.jsxs(w.Fragment,{children:[w.jsx(Roe,{captionEditor:a,captionEditorInitialState:s,handleClose:I,handlePasteAsLink:M,handleRetry:T,handleUrlChange:S,handleUrlSubmit:E,html:n,isLoading:g,isSelected:d,metadata:o,url:e,urlError:b,urlInputValue:f,urlPlaceholder:"Paste URL to add embedded content..."}),w.jsx(xt,{"data-kg-card-toolbar":"embed",isVisible:_,children:w.jsx(pi,{onClose:()=>O(!1)})}),w.jsx(xt,{"data-kg-card-toolbar":"embed",isVisible:n&&d&&!_&&c.createSnippet,children:w.jsx(gi,{children:w.jsx(lt,{dataTestId:"create-snippet",hide:!c.createSnippet,icon:"snippet",isActive:!1,label:"Save as snippet",onClick:()=>O(!0)})})})]})}var Zd=A.createCommand(),Wm=class extends Uw{constructor(e={},n){super(e,n),we(this,"__captionEditor"),we(this,"__captionEditorInitialState"),we(this,"__createdWithUrl"),this.__createdWithUrl=!!e.url&&!e.html,Ni(this,"__captionEditor",{editor:e.captionEditor,nodes:Mr}),!e.captionEditor&&e.caption&&Pi(this,"__captionEditor",`${e.caption}`)}getIcon(){return fG}getDataset(){let e=super.getDataset(),n=this.getLatest();return e.captionEditor=n.__captionEditor,e.captionEditorInitialState=n.__captionEditorInitialState,e}exportJSON(){let e=super.exportJSON();return this.__captionEditor&&this.__captionEditor.getEditorState().read(()=>{let n=di.$generateHtmlFromNodes(this.__captionEditor,null),i=ki(n);e.caption=i}),e}decorate(){return w.jsx(Jn,{nodeKey:this.getKey(),children:w.jsx(HFe,{captionEditor:this.__captionEditor,captionEditorInitialState:this.__captionEditorInitialState,createdWithUrl:this.__createdWithUrl,embedType:this.embedType,html:this.html,metadata:this.metadata,nodeKey:this.getKey(),url:this.url})})}};we(Wm,"kgMenu",[{section:"Embeds",label:"Other...",desc:"/embed [url]",Icon:fG,insertCommand:Zd,matches:["embed"],queryParams:["url"],priority:100,shortcut:"/embed [url]"},{section:"Embeds",label:"YouTube",desc:"/youtube [video url]",Icon:g0e,insertCommand:Zd,queryParams:["url"],matches:["youtube"],priority:1,shortcut:"/youtube [url]"},{section:"Embeds",label:"X (formerly Twitter)",desc:"/twitter [tweet url]",Icon:BRe,insertCommand:Zd,queryParams:["url"],matches:["twitter","x"],priority:2,shortcut:"/twitter [url]"},{section:"Embeds",label:"Vimeo",desc:"/vimeo [video url]",Icon:p0e,insertCommand:Zd,queryParams:["url"],matches:["vimeo"],priority:4,shortcut:"/vimeo [url]"},{section:"Embeds",label:"CodePen",desc:"/codepen [pen url]",Icon:Jme,insertCommand:Zd,queryParams:["url"],matches:["codepen"],priority:5,shortcut:"/codepen [url]"},{section:"Embeds",label:"Spotify",desc:"/spotify [track or playlist url]",Icon:f0e,insertCommand:Zd,queryParams:["url"],matches:["spotify"],priority:6,shortcut:"/spotify [url]"},{section:"Embeds",label:"SoundCloud",desc:"/soundcloud [track or playlist url]",Icon:u0e,insertCommand:Zd,queryParams:["url"],matches:["soundcloud"],priority:7,shortcut:"/soundcloud [url]"}]);var zoe=t=>new Wm(t),ZFe=({selectedNode:t,newNode:e})=>{let n=A.$isParagraphNode(t),i=t.getTextContent()==="";t.insertAfter(e),n&&i&&t.remove();let r=A.$createNodeSelection();if(r.add(e.getKey()),A.$setSelection(r),!e.getNextSibling()){let o=A.$createParagraphNode();e.insertAfter(o)}},To={},Yt=A,Qu=ct;function Ic(t){let e=new URLSearchParams;e.append("code",t);for(let n=1;ns.append(l)),o=Sa(),a=wo(a),o.append(a),Mh(a,t.getNextSiblings()),n.insertBefore(r),n.insertAfter(o),n.replace(t)}ho(e),ho(i)}}}var Z4=class Zoe extends Yt.ElementNode{static getType(){return"listitem"}static clone(e){return new Zoe(e.__value,e.__checked,e.__key)}constructor(e,n,i){super(i),this.__value=e===void 0?1:e,this.__checked=n}createDOM(e){let n=document.createElement("li"),i=this.getParent();return It(i)&&i.getListType()==="check"&&DU(n,this,null),n.value=this.__value,$U(n,e.theme,this),n}updateDOM(e,n,i){let r=this.getParent();return It(r)&&r.getListType()==="check"&&DU(n,this,e),n.value=this.__value,$U(n,i.theme,this),!1}static transform(){return e=>{let n=e.getParent();It(n)&&(ho(n),Mn(e)||Ic(144),n.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:VFe,priority:0})}}static importJSON(e){let n=Sa();return n.setChecked(e.checked),n.setValue(e.value),n.setFormat(e.format),n.setDirection(e.direction),n}exportDOM(e){return e=this.createDOM(e._config),e.style.textAlign=this.getFormatType(),{element:e}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...e){for(let n=0;n{e.append(r)})),this.remove(),i.getChildrenSize()===0&&i.remove(),e}insertAfter(e,n=!0){var i=this.getParentOrThrow();It(i)||Ic(39);var r=this.getNextSiblings();if(Mn(e))return n=super.insertAfter(e,n),e=e.getParentOrThrow(),It(e)&&ho(e),n;if(It(e)){for(i=e,e=e.getChildren(),r=e.length-1;0<=r;r--)i=e[r],this.insertAfter(i,n);return i}if(i.insertAfter(e,n),r.length!==0){let o=wo(i.getListType());r.forEach(a=>o.append(a)),e.insertAfter(o,n)}return e}remove(e){let n=this.getPreviousSibling(),i=this.getNextSibling();super.remove(e),n&&i&&kl(n)&&kl(i)?(Hoe(n.getFirstChild(),i.getFirstChild()),i.remove()):i&&(e=i.getParent(),It(e)&&ho(e))}insertNewAfter(e,n=!0){return e=Sa(this.__checked==null?void 0:!1),this.insertAfter(e,n),e}collapseAtStart(e){let n=Yt.$createParagraphNode();this.getChildren().forEach(a=>n.append(a));var i=this.getParentOrThrow(),r=i.getParentOrThrow();let o=Mn(r);return i.getChildrenSize()===1?o?(i.remove(),r.select()):(i.insertBefore(n),i.remove(),i=e.anchor,e=e.focus,r=n.getKey(),i.type==="element"&&i.getNode().is(this)&&i.set(r,i.offset,"element"),e.type==="element"&&e.getNode().is(this)&&e.set(r,e.offset,"element")):(i.insertBefore(n),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(e){this.getWritable().__value=e}getChecked(){return this.getLatest().__checked}setChecked(e){this.getWritable().__checked=e}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var e=this.getParent();if(e===null)return this.getLatest().__indent;e=e.getParentOrThrow();let n=0;for(;Mn(e);)e=e.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){typeof e=="number"&&-1It(s))?i.push(...a):r.push(...a)),0({conversion:LU,priority:0}),ul:()=>({conversion:LU,priority:0})}}static importJSON(e){let n=wo(e.listType,e.start);return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportDOM(e){return{element:e}=super.exportDOM(e),e&&Qu.isHTMLElement(e)&&(this.__start!==1&&e.setAttribute("start",String(this.__start)),this.__listType==="check"&&e.setAttribute("__lexicalListType","check")),{element:e}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...e){for(let i=0;i{It(r)&&e.push(PU(r))})):e.push(PU(n))}return e}function LU(t){let e=t.nodeName.toLowerCase(),n=null;return e==="ol"?n=wo("number",t.start):e==="ul"&&(n=Qu.isHTMLElement(t)&&t.getAttribute("__lexicallisttype")==="check"?wo("check"):wo("bullet")),{after:YFe,node:n}}var jU={ol:"number",ul:"bullet"};function wo(t,e=1){return Yt.$applyNodeReplacement(new _D(t,e))}function It(t){return t instanceof _D}var XFe=Yt.createCommand("INSERT_UNORDERED_LIST_COMMAND"),GFe=Yt.createCommand("INSERT_ORDERED_LIST_COMMAND"),KFe=Yt.createCommand("INSERT_CHECK_LIST_COMMAND"),JFe=Yt.createCommand("REMOVE_LIST_COMMAND");To.$createListItemNode=Sa;To.$createListNode=wo;To.$getListDepth=Qoe;To.$handleListInsertParagraph=function(){var t=Yt.$getSelection();if(!Yt.$isRangeSelection(t)||!t.isCollapsed()||(t=t.anchor.getNode(),!Mn(t)||t.getChildrenSize()!==0))return!1;var e=H7(t),n=t.getParent();It(n)||Ic(40);let i=n.getParent(),r;if(Yt.$isRootOrShadowRoot(i))r=Yt.$createParagraphNode(),e.insertAfter(r);else if(Mn(i))r=Sa(),i.insertAfter(r);else return!1;if(r.select(),e=t.getNextSiblings(),0{a.remove(),o.append(a)})}return qFe(t),!0};To.$isListItemNode=Mn;To.$isListNode=It;To.INSERT_CHECK_LIST_COMMAND=KFe;To.INSERT_ORDERED_LIST_COMMAND=GFe;To.INSERT_UNORDERED_LIST_COMMAND=XFe;To.ListItemNode=Z4;To.ListNode=_D;To.REMOVE_LIST_COMMAND=JFe;To.insertList=function(t,e){t.update(()=>{var n=Yt.$getSelection();if(n!==null){var i=n.getNodes();n=n.getStartEndPoints(),n===null&&Ic(143),[n]=n,n=n.getNode();var r=n.getParent();if(Boe(n,i))i=wo(e),Yt.$isRootOrShadowRoot(r)?(n.replace(i),r=Sa(),Yt.$isElementNode(n)&&(r.setFormat(n.getFormatType()),r.setIndent(n.getIndent())),i.append(r)):Mn(n)&&(n=n.getParentOrThrow(),Mh(i,n.getChildren()),n.replace(i));else for(n=new Set,r=0;r{let e=Yt.$getSelection();if(Yt.$isRangeSelection(e)){var n=new Set,i=e.getNodes(),r=e.anchor.getNode();if(Boe(r,i))n.add(H7(r));else for(r=0;r *")}function FU(t,e=10){let n=t.getRangeAt(0).cloneRange().getClientRects();if(n.length>0){let i=n[1]||n[0],r=Uoe(t.anchorNode).getBoundingClientRect();return Math.abs(i.top-r.top)<=e}}var tze=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8.2 5 1 12l7.2 7m7.6-14 7.2 7-7.2 7"}));function nze({darkMode:t,html:e,updateHtml:n}){let i=N.default.useCallback(f=>{n(f)},[n]),r=Ne.theme({"&.cm-editor":{background:"transparent"},"&.cm-focused":{outline:"0"},"&.cm-editor .cm-content":{padding:"7px 0"},"&.cm-editor .cm-content, &.cm-editor .cm-gutter":{minHeight:"170px"},"&.cm-editor .cm-scroller":{overflow:"auto"},"&.cm-editor .cm-gutters":{background:"none",border:"none",fontFamily:"Consolas,Liberation Mono,Menlo,Courier,monospace;",color:"#CED4D9",lineHeight:"2.25rem"},"&.cm-editor .cm-lineNumbers":{padding:"0"},"&.cm-editor .cm-foldGutter":{width:"0"},"&.cm-editor .cm-line":{padding:"0 .8rem",color:"#394047",fontFamily:"Consolas,Liberation Mono,Menlo,Courier,monospace;",fontSize:"1.6rem",lineHeight:"2.25rem"},"&.cm-editor .cm-activeLine, &.cm-editor .cm-activeLineGutter":{background:"none"},"&.cm-editor .cm-cursor, &.cm-editor .cm-dropCursor":{borderLeft:"1.2px solid black"}}),o=Ne.theme({"&.cm-editor":{background:"transparent"},"&.cm-focused":{outline:"0"},"&.cm-editor .cm-content":{padding:"7px 0"},"&.cm-editor .cm-content, &.cm-editor .cm-gutter":{minHeight:"170px"},"&.cm-editor .cm-scroller":{overflow:"auto"},"&.cm-editor .cm-gutters":{background:"none",border:"none",fontFamily:"Consolas,Liberation Mono,Menlo,Courier,monospace;",color:"rgb(108, 118, 127);",lineHeight:"2.25rem"},"&.cm-editor .cm-lineNumbers":{padding:"0"},"&.cm-editor .cm-foldGutter":{width:"0"},"&.cm-editor .cm-line":{padding:"0 .8rem",color:"rgb(210, 215, 218)",fontFamily:"Consolas,Liberation Mono,Menlo,Courier,monospace;",fontSize:"1.6rem",lineHeight:"2.25rem"},"&.cm-editor .cm-activeLine, &.cm-editor .cm-activeLineGutter":{background:"none"},"&.cm-editor .cm-cursor, &.cm-editor .cm-dropCursor":{borderLeft:"1.2px solid white"}}),a=Zc.define([{tag:Y.keyword,color:"#5A5CAD"},{tag:Y.atom,color:"#6C8CD5"},{tag:Y.number,color:"#116644"},{tag:Y.definition(Y.variableName),textDecoration:"underline"},{tag:Y.variableName,color:"black"},{tag:Y.comment,color:"#0080FF",fontStyle:"italic",background:"rgba(0,0,0,.05)"},{tag:[Y.string,Y.special(Y.brace)],color:"#183691"},{tag:Y.meta,color:"yellow"},{tag:Y.bracket,color:"#63a35c"},{tag:Y.tagName,color:"#63a35c"},{tag:Y.attributeName,color:"#795da3"}]),s=Zc.define([{tag:Y.keyword,color:"#795da3"},{tag:Y.atom,color:"#6C8CD5"},{tag:Y.number,color:"#63a35c"},{tag:Y.definition(Y.variableName),textDecoration:"underline"},{tag:Y.variableName,color:"white"},{tag:Y.comment,color:"#0080FF",fontStyle:"italic",background:"rgba(0,0,0,.05)"},{tag:[Y.string,Y.special(Y.brace)],color:"rgb(72, 110, 225)"},{tag:Y.meta,color:"yellow"},{tag:Y.bracket,color:"#63a35c"},{tag:Y.tagName,color:"#63a35c"},{tag:Y.attributeName,color:"#795da3"},{tag:[Y.className,Y.propertyName],color:"rgb(72, 110, 225)"}]),l=t?o:r,c=t?s:a,d=[Ne.lineWrapping,tk(c),l,W$(),sre({defaultKeymap:!1,history:!1}),Hc.of(Jie),Hc.of(X$),voe(),Xie(),$4({joinToEvent:void 0})];return w.jsx("div",{className:"not-kg-prose min-h-[170px]",children:w.jsx(rD,{autoFocus:!0,basicSetup:!1,extensions:d,value:e,onChange:i})})}var{entries:Voe,setPrototypeOf:zU,isFrozen:ize,getPrototypeOf:rze,getOwnPropertyDescriptor:oze}=Object,{freeze:Oo,seal:ls,create:Z7}=Object,{apply:q7,construct:U7}=typeof Reflect<"u"&&Reflect;Oo||(Oo=function(t){return t});ls||(ls=function(t){return t});q7||(q7=function(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r1?e-1:0),i=1;i1?n-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:Y_;zU&&zU(t,null);let i=e.length;for(;i--;){let r=e[i];if(typeof r=="string"){let o=n(r);o!==r&&(ize(e)||(e[i]=o),r=o)}t[r]=!0}return t}function uze(t){for(let e=0;e/gm),mze=ls(/\$\{[\w\W]*/gm),vze=ls(/^data-[\-\w.\u00B7-\uFFFF]+$/),yze=ls(/^aria-[\-\w]+$/),Yoe=ls(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bze=ls(/^(?:\w+script|data):/i),wze=ls(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xoe=ls(/^html$/i),kze=ls(/^[a-z][.\w]*(-[.\w]+)+$/i),qU=Object.freeze({__proto__:null,ARIA_ATTR:yze,ATTR_WHITESPACE:wze,CUSTOM_ELEMENT:kze,DATA_ATTR:vze,DOCTYPE_NAME:Xoe,ERB_EXPR:gze,IS_ALLOWED_URI:Yoe,IS_SCRIPT_OR_DATA:bze,MUSTACHE_EXPR:pze,TMPLIT_EXPR:mze}),Zv={element:1,text:3,progressingInstruction:7,comment:8,document:9},xze=function(){return typeof window>"u"?null:window},_ze=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(n=e.getAttribute(i));let r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},UU=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Goe(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xze(),e=ne=>Goe(ne);if(e.version="3.3.0",e.removed=[],!t||!t.document||t.document.nodeType!==Zv.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t,i=n,r=i.currentScript,{DocumentFragment:o,HTMLTemplateElement:a,Node:s,Element:l,NodeFilter:c,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:h,trustedTypes:g}=t,m=l.prototype,b=Hv(m,"cloneNode"),x=Hv(m,"remove"),_=Hv(m,"nextSibling"),O=Hv(m,"childNodes"),S=Hv(m,"parentNode");if(typeof a=="function"){let ne=n.createElement("template");ne.content&&ne.content.ownerDocument&&(n=ne.content.ownerDocument)}let E,T="",{implementation:M,createNodeIterator:I,createDocumentFragment:F,getElementsByTagName:W}=n,{importNode:Z}=i,j=UU();e.isSupported=typeof Voe=="function"&&typeof S=="function"&&M&&M.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:H,ERB_EXPR:X,TMPLIT_EXPR:B,DATA_ATTR:R,ARIA_ATTR:U,IS_SCRIPT_OR_DATA:V,ATTR_WHITESPACE:K,CUSTOM_ELEMENT:te}=qU,{IS_ALLOWED_URI:oe}=qU,le=null,q=$t({},[...WU,...j8,...R8,...F8,...BU]),z=null,ae=$t({},[...HU,...z8,...ZU,...d_]),ue=Object.seal(Z7(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}})),he=null,je=null,qe=Object.seal(Z7(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),at=!0,ft=!0,ve=!1,$e=!0,tt=!1,Lt=!0,Nt=!1,Qt=!1,Ze=!1,_t=!1,Pt=!1,ze=!1,Re=!0,se=!1,Ye="user-content-",Bt=!0,ni=!1,Tt={},bn=null,Yo=$t({},["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"]),ec=null,tc=$t({},["audio","video","img","source","image","track"]),cp=null,sd=$t({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dp="http://www.w3.org/1998/Math/MathML",Js="http://www.w3.org/2000/svg",to="http://www.w3.org/1999/xhtml",ld=to,Xo=!1,up=null,nt=$t({},[dp,Js,to],I8),cd=$t({},["mi","mo","mn","ms","mtext"]),Vi=$t({},["annotation-xml"]),Bn=$t({},["title","style","font","a","script"]),wn=null,gk=["application/xhtml+xml","text/html"],Po="text/html",kn=null,ii=null,mk=n.createElement("form"),fp=function(ne){return ne instanceof RegExp||ne instanceof Function},nc=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ii&&ii===ne)){if((!ne||typeof ne!="object")&&(ne={}),ne=Ec(ne),wn=gk.indexOf(ne.PARSER_MEDIA_TYPE)===-1?Po:ne.PARSER_MEDIA_TYPE,kn=wn==="application/xhtml+xml"?I8:Y_,le=Ps(ne,"ALLOWED_TAGS")?$t({},ne.ALLOWED_TAGS,kn):q,z=Ps(ne,"ALLOWED_ATTR")?$t({},ne.ALLOWED_ATTR,kn):ae,up=Ps(ne,"ALLOWED_NAMESPACES")?$t({},ne.ALLOWED_NAMESPACES,I8):nt,cp=Ps(ne,"ADD_URI_SAFE_ATTR")?$t(Ec(sd),ne.ADD_URI_SAFE_ATTR,kn):sd,ec=Ps(ne,"ADD_DATA_URI_TAGS")?$t(Ec(tc),ne.ADD_DATA_URI_TAGS,kn):tc,bn=Ps(ne,"FORBID_CONTENTS")?$t({},ne.FORBID_CONTENTS,kn):Yo,he=Ps(ne,"FORBID_TAGS")?$t({},ne.FORBID_TAGS,kn):Ec({}),je=Ps(ne,"FORBID_ATTR")?$t({},ne.FORBID_ATTR,kn):Ec({}),Tt=Ps(ne,"USE_PROFILES")?ne.USE_PROFILES:!1,at=ne.ALLOW_ARIA_ATTR!==!1,ft=ne.ALLOW_DATA_ATTR!==!1,ve=ne.ALLOW_UNKNOWN_PROTOCOLS||!1,$e=ne.ALLOW_SELF_CLOSE_IN_ATTR!==!1,tt=ne.SAFE_FOR_TEMPLATES||!1,Lt=ne.SAFE_FOR_XML!==!1,Nt=ne.WHOLE_DOCUMENT||!1,_t=ne.RETURN_DOM||!1,Pt=ne.RETURN_DOM_FRAGMENT||!1,ze=ne.RETURN_TRUSTED_TYPE||!1,Ze=ne.FORCE_BODY||!1,Re=ne.SANITIZE_DOM!==!1,se=ne.SANITIZE_NAMED_PROPS||!1,Bt=ne.KEEP_CONTENT!==!1,ni=ne.IN_PLACE||!1,oe=ne.ALLOWED_URI_REGEXP||Yoe,ld=ne.NAMESPACE||to,cd=ne.MATHML_TEXT_INTEGRATION_POINTS||cd,Vi=ne.HTML_INTEGRATION_POINTS||Vi,ue=ne.CUSTOM_ELEMENT_HANDLING||{},ne.CUSTOM_ELEMENT_HANDLING&&fp(ne.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ue.tagNameCheck=ne.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ne.CUSTOM_ELEMENT_HANDLING&&fp(ne.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ue.attributeNameCheck=ne.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ne.CUSTOM_ELEMENT_HANDLING&&typeof ne.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ue.allowCustomizedBuiltInElements=ne.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),tt&&(ft=!1),Pt&&(_t=!0),Tt&&(le=$t({},BU),z=[],Tt.html===!0&&($t(le,WU),$t(z,HU)),Tt.svg===!0&&($t(le,j8),$t(z,z8),$t(z,d_)),Tt.svgFilters===!0&&($t(le,R8),$t(z,z8),$t(z,d_)),Tt.mathMl===!0&&($t(le,F8),$t(z,ZU),$t(z,d_))),ne.ADD_TAGS&&(typeof ne.ADD_TAGS=="function"?qe.tagCheck=ne.ADD_TAGS:(le===q&&(le=Ec(le)),$t(le,ne.ADD_TAGS,kn))),ne.ADD_ATTR&&(typeof ne.ADD_ATTR=="function"?qe.attributeCheck=ne.ADD_ATTR:(z===ae&&(z=Ec(z)),$t(z,ne.ADD_ATTR,kn))),ne.ADD_URI_SAFE_ATTR&&$t(cp,ne.ADD_URI_SAFE_ATTR,kn),ne.FORBID_CONTENTS&&(bn===Yo&&(bn=Ec(bn)),$t(bn,ne.FORBID_CONTENTS,kn)),Bt&&(le["#text"]=!0),Nt&&$t(le,["html","head","body"]),le.table&&($t(le,["tbody"]),delete he.tbody),ne.TRUSTED_TYPES_POLICY){if(typeof ne.TRUSTED_TYPES_POLICY.createHTML!="function")throw Bv('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ne.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Bv('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=ne.TRUSTED_TYPES_POLICY,T=E.createHTML("")}else E===void 0&&(E=_ze(g,r)),E!==null&&typeof T=="string"&&(T=E.createHTML(""));Oo&&Oo(ne),ii=ne}},hp=$t({},[...j8,...R8,...fze]),H0=$t({},[...F8,...hze]),VC=function(ne){let Ae=S(ne);(!Ae||!Ae.tagName)&&(Ae={namespaceURI:ld,tagName:"template"});let Ee=Y_(ne.tagName),jt=Y_(Ae.tagName);return up[ne.namespaceURI]?ne.namespaceURI===Js?Ae.namespaceURI===to?Ee==="svg":Ae.namespaceURI===dp?Ee==="svg"&&(jt==="annotation-xml"||cd[jt]):!!hp[Ee]:ne.namespaceURI===dp?Ae.namespaceURI===to?Ee==="math":Ae.namespaceURI===Js?Ee==="math"&&Vi[jt]:!!H0[Ee]:ne.namespaceURI===to?Ae.namespaceURI===Js&&!Vi[jt]||Ae.namespaceURI===dp&&!cd[jt]?!1:!H0[Ee]&&(Bn[Ee]||!hp[Ee]):!!(wn==="application/xhtml+xml"&&up[ne.namespaceURI]):!1},ps=function(ne){Qv(e.removed,{element:ne});try{S(ne).removeChild(ne)}catch{x(ne)}},ic=function(ne,Ae){try{Qv(e.removed,{attribute:Ae.getAttributeNode(ne),from:Ae})}catch{Qv(e.removed,{attribute:null,from:Ae})}if(Ae.removeAttribute(ne),ne==="is")if(_t||Pt)try{ps(Ae)}catch{}else try{Ae.setAttribute(ne,"")}catch{}},pp=function(ne){let Ae=null,Ee=null;if(Ze)ne=""+ne;else{let Ht=L8(ne,/^[\r\n\t ]+/);Ee=Ht&&Ht[0]}wn==="application/xhtml+xml"&&ld===to&&(ne=''+ne+"");let jt=E?E.createHTML(ne):ne;if(ld===to)try{Ae=new h().parseFromString(jt,wn)}catch{}if(!Ae||!Ae.documentElement){Ae=M.createDocument(ld,"template",null);try{Ae.documentElement.innerHTML=Xo?T:jt}catch{}}let Di=Ae.body||Ae.documentElement;return ne&&Ee&&Di.insertBefore(n.createTextNode(Ee),Di.childNodes[0]||null),ld===to?W.call(Ae,Nt?"html":"body")[0]:Nt?Ae.documentElement:Di},vk=function(ne){return I.call(ne.ownerDocument||ne,ne,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},of=function(ne){return ne instanceof f&&(typeof ne.nodeName!="string"||typeof ne.textContent!="string"||typeof ne.removeChild!="function"||!(ne.attributes instanceof d)||typeof ne.removeAttribute!="function"||typeof ne.setAttribute!="function"||typeof ne.namespaceURI!="string"||typeof ne.insertBefore!="function"||typeof ne.hasChildNodes!="function")},yk=function(ne){return typeof s=="function"&&ne instanceof s};function gs(ne,Ae,Ee){c_(ne,jt=>{jt.call(e,Ae,Ee,ii)})}let gp=function(ne){let Ae=null;if(gs(j.beforeSanitizeElements,ne,null),of(ne))return ps(ne),!0;let Ee=kn(ne.nodeName);if(gs(j.uponSanitizeElement,ne,{tagName:Ee,allowedTags:le}),Lt&&ne.hasChildNodes()&&!yk(ne.firstElementChild)&&fo(/<[/\w!]/g,ne.innerHTML)&&fo(/<[/\w!]/g,ne.textContent)||ne.nodeType===Zv.progressingInstruction||Lt&&ne.nodeType===Zv.comment&&fo(/<[/\w]/g,ne.data))return ps(ne),!0;if(!(qe.tagCheck instanceof Function&&qe.tagCheck(Ee))&&(!le[Ee]||he[Ee])){if(!he[Ee]&&mp(Ee)&&(ue.tagNameCheck instanceof RegExp&&fo(ue.tagNameCheck,Ee)||ue.tagNameCheck instanceof Function&&ue.tagNameCheck(Ee)))return!1;if(Bt&&!bn[Ee]){let jt=S(ne)||ne.parentNode,Di=O(ne)||ne.childNodes;if(Di&&jt){let Ht=Di.length;for(let Go=Ht-1;Go>=0;--Go){let Ao=b(Di[Go],!0);Ao.__removalCount=(ne.__removalCount||0)+1,jt.insertBefore(Ao,_(ne))}}}return ps(ne),!0}return ne instanceof l&&!VC(ne)||(Ee==="noscript"||Ee==="noembed"||Ee==="noframes")&&fo(/<\/no(script|embed|frames)/i,ne.innerHTML)?(ps(ne),!0):(tt&&ne.nodeType===Zv.text&&(Ae=ne.textContent,c_([H,X,B],jt=>{Ae=Wv(Ae,jt," ")}),ne.textContent!==Ae&&(Qv(e.removed,{element:ne.cloneNode()}),ne.textContent=Ae)),gs(j.afterSanitizeElements,ne,null),!1)},bk=function(ne,Ae,Ee){if(Re&&(Ae==="id"||Ae==="name")&&(Ee in n||Ee in mk))return!1;if(!(ft&&!je[Ae]&&fo(R,Ae))&&!(at&&fo(U,Ae))&&!(qe.attributeCheck instanceof Function&&qe.attributeCheck(Ae,ne))){if(!z[Ae]||je[Ae]){if(!(mp(ne)&&(ue.tagNameCheck instanceof RegExp&&fo(ue.tagNameCheck,ne)||ue.tagNameCheck instanceof Function&&ue.tagNameCheck(ne))&&(ue.attributeNameCheck instanceof RegExp&&fo(ue.attributeNameCheck,Ae)||ue.attributeNameCheck instanceof Function&&ue.attributeNameCheck(Ae,ne))||Ae==="is"&&ue.allowCustomizedBuiltInElements&&(ue.tagNameCheck instanceof RegExp&&fo(ue.tagNameCheck,Ee)||ue.tagNameCheck instanceof Function&&ue.tagNameCheck(Ee))))return!1}else if(!cp[Ae]&&!fo(oe,Wv(Ee,K,""))&&!((Ae==="src"||Ae==="xlink:href"||Ae==="href")&&ne!=="script"&&lze(Ee,"data:")===0&&ec[ne])&&!(ve&&!fo(V,Wv(Ee,K,"")))&&Ee)return!1}return!0},mp=function(ne){return ne!=="annotation-xml"&&L8(ne,te)},rc=function(ne){gs(j.beforeSanitizeAttributes,ne,null);let{attributes:Ae}=ne;if(!Ae||of(ne))return;let Ee={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0},jt=Ae.length;for(;jt--;){let Di=Ae[jt],{name:Ht,namespaceURI:Go,value:Ao}=Di,Ft=kn(Ht),Be=Ao,xn=Ht==="value"?Be:cze(Be);if(Ee.attrName=Ft,Ee.attrValue=xn,Ee.keepAttr=!0,Ee.forceKeepAttr=void 0,gs(j.uponSanitizeAttribute,ne,Ee),xn=Ee.attrValue,se&&(Ft==="id"||Ft==="name")&&(ic(Ht,ne),xn=Ye+xn),Lt&&fo(/((--!?|])>)|<\/(style|title|textarea)/i,xn)){ic(Ht,ne);continue}if(Ft==="attributename"&&L8(xn,"href")){ic(Ht,ne);continue}if(Ee.forceKeepAttr)continue;if(!Ee.keepAttr){ic(Ht,ne);continue}if(!$e&&fo(/\/>/i,xn)){ic(Ht,ne);continue}tt&&c_([H,X,B],Ia=>{xn=Wv(xn,Ia," ")});let vp=kn(ne.nodeName);if(!bk(vp,Ft,xn)){ic(Ht,ne);continue}if(E&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Go)switch(g.getAttributeType(vp,Ft)){case"TrustedHTML":{xn=E.createHTML(xn);break}case"TrustedScriptURL":{xn=E.createScriptURL(xn);break}}if(xn!==Be)try{Go?ne.setAttributeNS(Go,Ht,xn):ne.setAttribute(Ht,xn),of(ne)?ps(ne):QU(e.removed)}catch{ic(Ht,ne)}}gs(j.afterSanitizeAttributes,ne,null)},YC=function ne(Ae){let Ee=null,jt=vk(Ae);for(gs(j.beforeSanitizeShadowDOM,Ae,null);Ee=jt.nextNode();)gs(j.uponSanitizeShadowNode,Ee,null),gp(Ee),rc(Ee),Ee.content instanceof o&&ne(Ee.content);gs(j.afterSanitizeShadowDOM,Ae,null)};return e.sanitize=function(ne){let Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ee=null,jt=null,Di=null,Ht=null;if(Xo=!ne,Xo&&(ne=""),typeof ne!="string"&&!yk(ne))if(typeof ne.toString=="function"){if(ne=ne.toString(),typeof ne!="string")throw Bv("dirty is not a string, aborting")}else throw Bv("toString is not a function");if(!e.isSupported)return ne;if(Qt||nc(Ae),e.removed=[],typeof ne=="string"&&(ni=!1),ni){if(ne.nodeName){let Ft=kn(ne.nodeName);if(!le[Ft]||he[Ft])throw Bv("root node is forbidden and cannot be sanitized in-place")}}else if(ne instanceof s)Ee=pp(""),jt=Ee.ownerDocument.importNode(ne,!0),jt.nodeType===Zv.element&&jt.nodeName==="BODY"||jt.nodeName==="HTML"?Ee=jt:Ee.appendChild(jt);else{if(!_t&&!tt&&!Nt&&ne.indexOf("<")===-1)return E&&ze?E.createHTML(ne):ne;if(Ee=pp(ne),!Ee)return _t?null:ze?T:""}Ee&&Ze&&ps(Ee.firstChild);let Go=vk(ni?ne:Ee);for(;Di=Go.nextNode();)gp(Di),rc(Di),Di.content instanceof o&&YC(Di.content);if(ni)return ne;if(_t){if(Pt)for(Ht=F.call(Ee.ownerDocument);Ee.firstChild;)Ht.appendChild(Ee.firstChild);else Ht=Ee;return(z.shadowroot||z.shadowrootmode)&&(Ht=Z.call(i,Ht,!0)),Ht}let Ao=Nt?Ee.outerHTML:Ee.innerHTML;return Nt&&le["!doctype"]&&Ee.ownerDocument&&Ee.ownerDocument.doctype&&Ee.ownerDocument.doctype.name&&fo(Xoe,Ee.ownerDocument.doctype.name)&&(Ao=" `+Ao),tt&&c_([H,X,B],Ft=>{Ao=Wv(Ao,Ft," ")}),E&&ze?E.createHTML(Ao):Ao},e.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};nc(ne),Qt=!0},e.clearConfig=function(){ii=null,Qt=!1},e.isValidAttribute=function(ne,Ae,Ee){ii||nc({});let jt=kn(ne),Di=kn(Ae);return bk(jt,Di,Ee)},e.addHook=function(ne,Ae){typeof Ae=="function"&&Qv(j[ne],Ae)},e.removeHook=function(ne,Ae){if(Ae!==void 0){let Ee=aze(j[ne],Ae);return Ee===-1?void 0:sze(j[ne],Ee,1)[0]}return QU(j[ne])},e.removeHooks=function(ne){j[ne]=[]},e.removeAllHooks=function(){j=UU()},e}var Oze=Goe();function q4(t="",e={}){return e={replaceJS:!0,...e},e.replaceJS&&(t=t.replace(/)<[^<]*)*<\/script>/gi,'
    Embedded JavaScript
    '),t=t.replace(/)<[^<]*)*<\/iframe>/gi,'
    Embedded iFrame
    ')),Oze.sanitize(t,{ALLOWED_URI_REGEXP:/^https?:|^\/|blob:/,ADD_ATTR:["id"],FORBID_TAGS:["style"]})}function Koe({html:t,updateHtml:e,isEditing:n,darkMode:i}){return w.jsx(w.Fragment,{children:n?w.jsx(w.Fragment,{children:w.jsx(nze,{darkMode:i,html:t,updateHtml:e})}):w.jsxs("div",{children:[w.jsx(Joe,{html:t}),w.jsx("div",{className:"absolute inset-0 z-50 mt-0"})]})})}function Joe({html:t}){let e=q4(t,{replaceJS:!0});return w.jsx("div",{dangerouslySetInnerHTML:{__html:e},className:"min-h-[3.5vh] whitespace-normal"})}Joe.propTypes={html:$.string};Koe.propTypes={html:$.string,updateHtml:$.func,isEditing:$.bool,darkMode:$.bool};function Sze(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}function Cze({adjustOnResize:t,adjustOnDrag:e}={}){let n=(0,N.useRef)(null),i=3,r=(0,N.useRef)(!1),o=(0,N.useRef)(),a=(0,N.useRef)(),s=(0,N.useRef)(),l=(0,N.useRef)(),c=(0,N.useRef)(),d=(0,N.useRef)(),f=Sze(),h=(X,B)=>{let R=U=>{var V;(V=n.current)!=null&&V.contains(U.target)&&B(U)};return document.body.addEventListener(X,R,!1),R},g=(0,N.useCallback)(X=>{X.preventDefault(),X.stopPropagation()},[]),m=(0,N.useCallback)((X,B)=>{n.current.style.transform=`translate(${X}px, ${B}px)`},[n]),b=(0,N.useCallback)(({x:X,y:B})=>{o.current=X,a.current=B;let R=n.current.offsetWidth,U=n.current.offsetHeight,V={top:B,left:X,right:window.innerWidth-X-R,bottom:window.innerHeight-B-U};c.current=V,m(X,B)},[m]),x=(0,N.useCallback)(()=>({x:o.current,y:a.current,lastSpacing:c.current}),[]),_=(0,N.useCallback)(()=>{var X;d.current=(X=n.current)==null?void 0:X.style.overflow,n.current.style.overflow="hidden"},[n]),O=(0,N.useCallback)(()=>{n.current.style.overflow=d.current},[n]),S=(0,N.useCallback)(()=>{window.getSelection().removeAllRanges();let X=document.createElement("style");X.id=`stylesheet-${f}`,document.head.appendChild(X),X.sheet.insertRule("* { user-select: none !important; }",0)},[f]),E=(0,N.useCallback)(()=>{let X=document.getElementById(`stylesheet-${f}`);X?.remove()},[f]),T=(0,N.useCallback)(()=>{n.current&&(n.current.style.pointerEvents="none"),window.addEventListener("click",g,{capture:!0,passive:!1})},[n,g]),M=(0,N.useCallback)(()=>{n.current&&(n.current.style.pointerEvents=""),window.removeEventListener("click",g,{capture:!0,passive:!1})},[n,g]),I=(0,N.useCallback)(X=>{let B,R;if(X.type==="touchmove"?(B=X.touches[0].clientX,R=X.touches[0].clientY):(B=X.clientX,R=X.clientY),r.current||(Math.abs(B-s.current-o.current)>i||Math.abs(R-l.current-a.current)>i)&&(_(),S(),T(),r.current=!0),r.current){let U={x:B-s.current,y:R-l.current};e&&(U=e(n.current,{...U,lastSpacing:c.current})),b(U)}},[i,b,_,S,T,e]),F=(0,N.useCallback)(X=>{r.current=!1,window.removeEventListener("touchend",F,{capture:!0,passive:!0}),window.removeEventListener("touchmove",I,{capture:!0,passive:!0}),window.removeEventListener("mouseup",F,{capture:!0,passive:!0}),window.removeEventListener("mousemove",I,{capture:!0,passive:!0}),setTimeout(()=>{window.removeEventListener("click",g.bind(this),{capture:!0,passive:!1})},1),O(),E(),setTimeout(()=>{M()},5)},[O,E,M,I,g]),W=(0,N.useCallback)(()=>{window.addEventListener("touchend",F,{capture:!0,passive:!0}),window.addEventListener("touchmove",I,{capture:!0,passive:!0}),window.addEventListener("mouseup",F,{capture:!0,passive:!0}),window.addEventListener("mousemove",I,{capture:!0,passive:!0})},[F,I]),Z=(0,N.useCallback)(X=>{var B;if(X.stopPropagation(),r.current=!1,X.type==="touchstart"||X.button===0){X.type==="touchstart"?(s.current=X.touches[0].clientX-(o.current||0),l.current=X.touches[0].clientY-(a.current||0)):(s.current=X.clientX-(o.current||0),l.current=X.clientY-(a.current||0));for(let R of X.path||X.composedPath()){if((B=R?.matches)!=null&&B.call(R,"input, .ember-basic-dropdown-trigger"))break;if(R===n.current){W();break}}}},[n,W]),j=(0,N.useCallback)(()=>{let X=h("touchstart",Z),B=h("mousedown",Z);return()=>{var R,U;(R=n.current)==null||R.removeEventListener("touchstart",X),(U=n.current)==null||U.removeEventListener("mousedown",B)}},[Z]),H=(0,N.useCallback)(()=>{window.removeEventListener("touchend",F,{capture:!0,passive:!0}),window.removeEventListener("touchmove",I,{capture:!0,passive:!0}),window.removeEventListener("mouseup",F,{capture:!0,passive:!0}),window.removeEventListener("mousemove",I,{capture:!0,passive:!0}),setTimeout(()=>{window.removeEventListener("click",g.bind(this),{capture:!0,passive:!1})},1)},[F,I,g]);return(0,N.useEffect)(()=>{var X;let B=n.current;B.setAttribute("draggable",!0),(X=n.current)==null||X.classList.add("kg-card-movable");let R,U=j();return t&&(R=new ResizeObserver(()=>{if(o.current===void 0||a.current===void 0)return;let V=t(B,{x:o.current,y:a.current,lastSpacing:c.current});(V.x!==o.current||V.y!==a.current)&&(s.current=s.current-(V.x-o.current),l.current=l.current-(V.y-a.current),b(V))}),R.observe(B)),()=>{U(),H(),R?.disconnect(),E()}},[]),{ref:n,setPosition:b,getPosition:x}}function Bm(t){let e=t instanceof HTMLElement&&window.getComputedStyle(t).overflowY,n=e!=="visible"&&e!=="hidden";if(t){if(n&&t.scrollHeight>=t.clientHeight)return t}else return null;return Bm(t.parentNode)||document.body}var VU=20,Eze=20,Tze=66,Mze=20,Nze=20;function Pze(){return window.innerWidth<768&&window.innerHeight>window.innerWidth}var Aze=()=>{let t=document.querySelector('[data-kg-card-editing="true"]');if(!t)return{x:0,y:0};let e=t.getBoundingClientRect(),n=window.getComputedStyle(t),i={x:0,y:0};return n.transform!=="none"&&(i.x=e.left,i.y=e.top),i};function eae(t){return t?parseInt(window.getComputedStyle(t).getPropertyValue("--kg-breakout-adjustment")||0,10):0}function YU(t){let e=eae(t);return{width:window.innerWidth-e,height:window.innerHeight}}function tae(t,{x:e,y:n,origin:i={x:0,y:0},topSpacing:r,bottomSpacing:o,rightSpacing:a,leftSpacing:s,lastSpacing:l}){if(i=Aze(),!t)return{x:e+i.x,y:n+i.y};let c=eae(t);l&&l.top{let f=d.offsetHeight,h=t||document.querySelector('[data-kg-card-editing="true"]')||document.querySelector('[data-kg-card-selected="true"]');if(!h)return;let g=h.getBoundingClientRect();if(Pze()){let S=window.innerWidth/2-d.offsetWidth/2,E=g.bottom+VU;return V7(d,{x:S,y:E})}let m=Math.min(window.innerHeight,g.bottom)-g.top,b=g.top+m/2-f/2,x=g.right+VU,_=window.getComputedStyle(h),O={x:0,y:0};return _.transform!=="none"&&(O.x=g.left,O.y=g.top),qv(d,{x,y:b,origin:O})},[t]),c=(0,N.useCallback)(d=>{let{x:f,y:h,lastSpacing:g}=i(),m=YU(d);if(m.height>o.current.height){let b=m.height-o.current.height,x=l(d);x&&x.y>h&&(h+=Math.min(x.y-h,b))}if(m.width>o.current.width){let b=m.width-o.current.width,x=l(d);x&&x.x>f&&(f+=Math.min(x.x-f,b))}r(qv(d,{x:f,y:h,lastSpacing:g})),o.current=m},[l,r,i]);return(0,N.useLayoutEffect)(()=>{if(!n.current)return;let d=Bm(n.current)||document.body,f=0,h=D0(m=>{f=m,c(n.current)},100,{leading:!0,trailing:!0}),g=new ResizeObserver(m=>{var b;for(let x of m)if((b=x.contentBoxSize)!=null&&b[0]){let _=x.contentBoxSize[0].inlineSize;typeof _=="number"&&_!==f&&h(_)}});return g.observe(d),()=>{g.disconnect()}},[c,n]),(0,N.useLayoutEffect)(()=>{if(!(!n||!n.current))try{r(l(n.current))}catch(d){console.error(d)}},[l,r,n]),(0,N.useLayoutEffect)(()=>{if(e==="wide"&&a.current!=="wide"){let d=document.querySelector('[data-kg-card-editing="true"]');if(!d)return;let f=d.getBoundingClientRect(),h={x:f.left+2,y:f.top+1};s.current=h;let g=i().x-h.x,m=i().y-h.y;r(qv(n.current,{x:g,y:m,origin:h}))}else if(a.current==="wide"&&e!=="wide"){let d=i().x+s.current.x,f=i().y+s.current.y;r(qv(n.current,{x:d,y:f,origin:{x:0,y:0}}))}a.current=e},[e,i,l,r,n]),{ref:n}}var nae=(t,e)=>{let n=(0,N.useRef)(null);return{handleMousedown:()=>{let i=document.getSelection();n.current=i.rangeCount===0?null:i.getRangeAt(0)},handleClick:i=>{if(i.preventDefault(),t(e),n.current){let r=document.getSelection();r.removeAllRanges(),r.addRange(n.current),n.current=null}}}};function iae({buttons:t=[],selectedName:e,onClick:n,hasTooltip:i=!0}){return w.jsx("div",{className:"flex",children:w.jsx("ul",{className:"flex items-center justify-evenly rounded-lg bg-grey-100 font-sans text-md font-normal text-white dark:bg-grey-900",role:"menubar",children:t.map(({label:r,name:o,Icon:a,dataTestId:s,ariaLabel:l})=>w.jsx(Dze,{ariaLabel:l,dataTestId:s,hasTooltip:i,Icon:a,label:r,name:o,selectedName:e,onClick:n},`${o}-${r}`))})})}function Dze({dataTestId:t,onClick:e,label:n,ariaLabel:i,name:r,selectedName:o,Icon:a,hasTooltip:s}){let l=r===o,{handleMousedown:c,handleClick:d}=nae(e,r);return w.jsx("li",{className:"mb-0",children:w.jsxs("button",{"aria-checked":l,"aria-label":i||n,className:`group relative flex h-7 w-8 cursor-pointer items-center justify-center rounded-lg text-black dark:text-white ${l?"border border-grey-300 bg-white shadow-xs dark:border-grey-800 dark:bg-grey-950":""} ${a?"":"text-[1.3rem] font-bold"}`,"data-testid":t,role:"menuitemradio",type:"button",onClick:d,onMouseDown:c,children:[a?w.jsx(a,{className:"size-4 stroke-2"}):n,a&&n&&s&&w.jsx(tf,{label:n})]})})}iae.propTypes={selectedName:$.oneOf(["regular","wide","full","split","center","left","small","medium","large","grid","list","minimal","immersive"]).isRequired,hasTooltip:$.bool,onClick:$.func.isRequired,buttons:$.arrayOf($.shape({label:$.string,name:$.string.isRequired,Icon:$.elementType,dataTestId:$.string,ariaLabel:$.string}))};var Ize=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M17.041 12.025 6.91 22.156 1 23l.844-5.91L11.975 6.96m0-5.067 10.132 10.132M19.8 9l2.206-2.207a3.396 3.396 0 0 0 0-4.8 3.397 3.397 0 0 0-4.8 0L15 4.2"})),OD=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},J.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M22.883 19.771a.786.786 0 0 1-.668.372H1.785a.786.786 0 0 1-.666-1.202l3.93-6.286a.785.785 0 0 1 1.269-.086l3.292 3.95 6.476-8.633a.81.81 0 0 1 .7-.315.786.786 0 0 1 .628.431l5.5 11a.785.785 0 0 1-.03.769Z",clipRule:"evenodd"}),J.createElement("circle",{cx:8,cy:6,r:3,fill:"currentColor"}));function Rl({color:t="accent",dataTestId:e,href:n,size:i="small",width:r="regular",rounded:o=!0,shrink:a=!1,value:s="",placeholder:l="Add button text",type:c="button",disabled:d=!1,target:f,...h}){let g=n?"a":"button",m={type:n?null:c,href:n||null,rel:f==="_blank"?"noopener noreferrer":null,target:f||null,...h};return w.jsx(g,{className:rt("not-kg-prose inline-block cursor-pointer text-center font-sans font-medium",!a&&"shrink-0",r==="regular"||"w-full",o&&"rounded-md",s?"opacity-100":"opacity-50",t==="white"&&"bg-white text-black",t==="grey"&&"bg-grey-200 text-black",t==="black"&&"bg-black text-white",t==="accent"&&"bg-accent text-white",!["white","grey","black","accent"].includes(t)&&"bg-green text-white"),"data-testid":`${e}`,disabled:d,...m,children:w.jsx("span",{className:rt("block",i==="small"&&"px-5 py-[1rem] text-md leading-[1.4]",i==="medium"&&"px-5 py-2 text-[1.6rem]",i==="large"&&"px-6 py-3 text-lg leading-[1.35]"),"data-testid":`${e}-span`,children:s||l})})}Rl.propTypes={color:$.oneOf(["white","grey","black","accent"]),size:$.oneOf(["small","medium","large"]),width:$.oneOf(["regular","full"]),rounded:$.bool,value:$.string,placeholder:$.string,href:$.string,target:$.string,disabled:$.bool};function I0(){return(I0=Object.assign||function(t){for(var e=1;e=0||(r[n]=t[n]);return r}function Bb(t){var e=(0,N.useRef)(t),n=(0,N.useRef)(function(i){e.current&&e.current(i)});return e.current=t,n.current}var Hb=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t0:x.buttons>0)&&r.current?o(XU(r.current,x,s.current)):b(!1)},m=function(){return b(!1)};function b(x){var _=l.current,O=Y7(r.current),S=x?O.addEventListener:O.removeEventListener;S(_?"touchmove":"mousemove",g),S(_?"touchend":"mouseup",m)}return[function(x){var _=x.nativeEvent,O=r.current;if(O&&(GU(_),!function(E,T){return T&&!Fy(E)}(_,l.current)&&O)){if(Fy(_)){l.current=!0;var S=_.changedTouches||[];S.length&&(s.current=S[0].identifier)}O.focus(),o(XU(O,_,s.current)),b(!0)}},function(x){var _=x.which||x.keyCode;_<37||_>40||(x.preventDefault(),a({left:_===39?.05:_===37?-.05:0,top:_===40?.05:_===38?-.05:0}))},b]},[a,o]),d=c[0],f=c[1],h=c[2];return(0,N.useEffect)(function(){return h},[h]),N.default.createElement("div",I0({},i,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:r,onKeyDown:f,tabIndex:0,role:"slider"}))}),SD=function(t){return t.filter(Boolean).join(" ")},oae=function(t){var e=t.color,n=t.left,i=t.top,r=i===void 0?.5:i,o=SD(["react-colorful__pointer",t.className]);return N.default.createElement("div",{className:o,style:{top:100*r+"%",left:100*n+"%"}},N.default.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},Tr=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n},Lze=function(t){return Qze(X7(t))},X7=function(t){return t[0]==="#"&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?Tr(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:t.length===8?Tr(parseInt(t.substring(6,8),16)/255,2):1}},jze=function(t){return zze(Fze(t))},Rze=function(t){var e=t.s,n=t.v,i=t.a,r=(200-e)*n/100;return{h:Tr(t.h),s:Tr(r>0&&r<200?e*n/100/(r<=100?r:200-r)*100:0),l:Tr(r/2),a:Tr(i,2)}},G7=function(t){var e=Rze(t);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},Fze=function(t){var e=t.h,n=t.s,i=t.v,r=t.a;e=e/360*6,n/=100,i/=100;var o=Math.floor(e),a=i*(1-n),s=i*(1-(e-o)*n),l=i*(1-(1-e+o)*n),c=o%6;return{r:Tr(255*[i,s,a,a,l,i][c]),g:Tr(255*[l,i,i,s,a,a][c]),b:Tr(255*[a,a,l,i,i,s][c]),a:Tr(r,2)}},u_=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},zze=function(t){var e=t.r,n=t.g,i=t.b,r=t.a,o=r<1?u_(Tr(255*r)):"";return"#"+u_(e)+u_(n)+u_(i)+o},Qze=function(t){var e=t.r,n=t.g,i=t.b,r=t.a,o=Math.max(e,n,i),a=o-Math.min(e,n,i),s=a?o===e?(n-i)/a:o===n?2+(i-e)/a:4+(e-n)/a:0;return{h:Tr(60*(s<0?s+6:s)),s:Tr(o?a/o*100:0),v:Tr(o/255*100),a:r}},Wze=N.default.memo(function(t){var e=t.hue,n=t.onChange,i=SD(["react-colorful__hue",t.className]);return N.default.createElement("div",{className:i},N.default.createElement(rae,{onMove:function(r){n({h:360*r.left})},onKey:function(r){n({h:Hb(e+360*r.left,0,360)})},"aria-label":"Hue","aria-valuenow":Tr(e),"aria-valuemax":"360","aria-valuemin":"0"},N.default.createElement(oae,{className:"react-colorful__hue-pointer",left:e/360,color:G7({h:e,s:100,v:100,a:1})})))}),Bze=N.default.memo(function(t){var e=t.hsva,n=t.onChange,i={backgroundColor:G7({h:e.h,s:100,v:100,a:1})};return N.default.createElement("div",{className:"react-colorful__saturation",style:i},N.default.createElement(rae,{onMove:function(r){n({s:100*r.left,v:100-100*r.top})},onKey:function(r){n({s:Hb(e.s+100*r.left,0,100),v:Hb(e.v-100*r.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Tr(e.s)+"%, Brightness "+Tr(e.v)+"%"},N.default.createElement(oae,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:G7(e)})))}),aae=function(t,e){if(t===e)return!0;for(var n in t)if(t[n]!==e[n])return!1;return!0},Hze=function(t,e){return t.toLowerCase()===e.toLowerCase()||aae(X7(t),X7(e))};function Zze(t,e,n){var i=Bb(n),r=(0,N.useState)(function(){return t.toHsva(e)}),o=r[0],a=r[1],s=(0,N.useRef)({color:e,hsva:o});(0,N.useEffect)(function(){if(!t.equal(e,s.current.color)){var c=t.toHsva(e);s.current={hsva:c,color:e},a(c)}},[e,t]),(0,N.useEffect)(function(){var c;aae(o,s.current.hsva)||t.equal(c=t.fromHsva(o),s.current.color)||(s.current={hsva:o,color:c},i(c))},[o,t,i]);var l=(0,N.useCallback)(function(c){a(function(d){return Object.assign({},d,c)})},[]);return[o,l]}var qze=typeof window<"u"?N.useLayoutEffect:N.useEffect,Uze=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},KU=new Map,Vze=function(t){qze(function(){var e=t.current?t.current.ownerDocument:document;if(e!==void 0&&!KU.has(e)){var n=e.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,KU.set(e,n);var i=Uze();i&&n.setAttribute("nonce",i),e.head.appendChild(n)}},[])},Yze=function(t){var e=t.className,n=t.colorModel,i=t.color,r=i===void 0?n.defaultColor:i,o=t.onChange,a=U4(t,["className","colorModel","color","onChange"]),s=(0,N.useRef)(null);Vze(s);var l=Zze(n,r,o),c=l[0],d=l[1],f=SD(["react-colorful",e]);return N.default.createElement("div",I0({},a,{ref:s,className:f}),N.default.createElement(Bze,{hsva:c,onChange:d}),N.default.createElement(Wze,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xze={defaultColor:"000",toHsva:Lze,fromHsva:function(t){return jze({h:t.h,s:t.s,v:t.v,a:1})},equal:Hze},Gze=function(t){return N.default.createElement(Yze,I0({},t,{colorModel:Xze}))},Kze=/^#?([0-9A-F]{3,8})$/i,Jze=function(t){var e=t.color,n=e===void 0?"":e,i=t.onChange,r=t.onBlur,o=t.escape,a=t.validate,s=t.format,l=t.process,c=U4(t,["color","onChange","onBlur","escape","validate","format","process"]),d=(0,N.useState)(function(){return o(n)}),f=d[0],h=d[1],g=Bb(i),m=Bb(r),b=(0,N.useCallback)(function(_){var O=o(_.target.value);h(O),a(O)&&g(l?l(O):O)},[o,l,a,g]),x=(0,N.useCallback)(function(_){a(_.target.value)||h(o(n)),m(_)},[n,o,a,m]);return(0,N.useEffect)(function(){h(o(n))},[n,o]),N.default.createElement("input",I0({},c,{value:s?s(f):f,spellCheck:"false",onChange:b,onBlur:x}))},JU=function(t){return"#"+t},eQe=function(t){var e=t.prefixed,n=t.alpha,i=U4(t,["prefixed","alpha"]),r=(0,N.useCallback)(function(a){return a.replace(/([^0-9A-F]+)/gi,"").substring(0,n?8:6)},[n]),o=(0,N.useCallback)(function(a){return function(s,l){var c=Kze.exec(s),d=c?c[1].length:0;return d===3||d===6||!!l&&d===4||!!l&&d===8}(a,n)},[n]);return N.default.createElement(Jze,I0({},i,{escape:r,format:e?JU:void 0,process:JU,validate:o}))};function Wu(){let t=document.body.querySelector(".koenig-lexical");return t&&getComputedStyle(t).getPropertyValue("--kg-accent-color")||"#ff0095"}function sae(t,e,n){N.default.useEffect(()=>{if(!t)return;let i=r=>{e.current&&!e.current.contains(r.target)&&n()};return window.addEventListener("mousedown",i,{capture:!0}),()=>window.removeEventListener("mousedown",i,{capture:!0})},[t,n,e])}function tQe({value:t,eyedropper:e,hasTransparentOption:n,onChange:i,children:r}){let o=(0,N.useRef)(null),a=(0,N.useCallback)(g=>{var m,b,x;g.stopPropagation();let _=(m=o.current)==null?void 0:m.querySelector("input");g.target!==_&&((x=(b=o.current)==null?void 0:b.querySelector("input"))==null||x.focus(),g.preventDefault())},[]),s=(0,N.useRef)(!1),l=(0,N.useCallback)(()=>{var g,m;s.current=!1,(m=(g=o.current)==null?void 0:g.querySelector("input"))==null||m.focus(),document.removeEventListener("mouseup",l),document.removeEventListener("touchend",l)},[]),c=(0,N.useCallback)(()=>{s.current=!0,document.addEventListener("mouseup",l),document.addEventListener("touchend",l)},[l]),d=(0,N.useCallback)(g=>{g.preventDefault(),s.current=!0,document.body.style.setProperty("pointer-events","none"),new window.EyeDropper().open().then(m=>i(m.sRGBHex)).finally(()=>{var m,b;s.current=!1,document.body.style.removeProperty("pointer-events"),(b=(m=o.current)==null?void 0:m.querySelector("input"))==null||b.focus()})},[i]);(0,N.useEffect)(()=>{var g,m;(m=(g=o.current)==null?void 0:g.querySelector("input"))==null||m.focus()},[]);let f=t;t==="accent"?f=Wu():t==="transparent"&&(f="");let h=(0,N.useCallback)(g=>{var m,b;(b=(m=o.current)==null?void 0:m.querySelector("input"))==null||b.focus()},[]);return w.jsxs("div",{onMouseDown:a,onTouchStart:a,children:[w.jsx(Gze,{color:f||"#ffffff",onChange:i,onMouseDown:c,onTouchStart:c}),w.jsxs("div",{className:"mt-3 flex gap-2",children:[w.jsxs("div",{ref:o,className:"relative flex w-full items-center rounded-lg border border-grey-100 bg-grey-100 px-3 py-1.5 font-sans text-sm font-normal text-grey-900 transition-colors placeholder:text-grey-500 focus-within:border-green focus-within:bg-white focus-within:shadow-[0_0_0_2px_rgba(48,207,67,.25)] focus-within:outline-none dark:border-transparent dark:bg-grey-900 dark:text-white dark:selection:bg-grey-800 dark:placeholder:text-grey-700 dark:focus-within:border-green dark:hover:bg-grey-925 dark:focus:bg-grey-925",onClick:h,children:[w.jsx("span",{className:"ml-1 mr-2 text-grey-700",children:"#"}),w.jsx(eQe,{"aria-label":"Color value",className:"z-50 w-full bg-transparent",color:f,onChange:i}),e&&!!window.EyeDropper&&w.jsx("button",{className:"absolute inset-y-0 right-3 z-50 my-auto size-4 p-[1px]",type:"button",onClick:d,children:w.jsx(Ize,{className:"size-full stroke-2"})})]}),n&&w.jsx(Rl,{color:"grey",value:"Clear",onClick:()=>i("transparent")}),r]})]})}function nQe({hex:t,accent:e,transparent:n,title:i,isSelected:r,onSelect:o}){let a=e?Wu():t,s=(0,N.useRef)(null),l=c=>{c.preventDefault(),o(e?"accent":n?"transparent":t)};return w.jsxs("button",{ref:s,className:rt("group relative flex size-5 shrink-0 items-center rounded-full border border-grey-250 dark:border-grey-800",r&&"outline outline-2 outline-green"),style:{backgroundColor:a},title:i,type:"button",onClick:l,children:[n&&w.jsx("div",{className:"absolute left-0 top-0 z-10 w-[136%] origin-left rotate-45 border-b border-b-red"}),w.jsx(tf,{label:i})]})}function iQe({value:t,swatches:e,onSwatchChange:n,onTogglePicker:i,onChange:r,isExpanded:o,eyedropper:a,hasTransparentOption:s,children:l}){var c,d,f,h;let[g,m]=(0,N.useState)(!1),[b,x]=(0,N.useState)(!1),_=(0,N.useRef)(null);sae(g,_,()=>m(!1));let O=(0,N.useCallback)(M=>{M.stopPropagation(),M.preventDefault()},[]),S=t,E=(c=e.find(M=>M.hex===t))==null?void 0:c.title;t==="accent"?(S=Wu(),E=(d=e.find(M=>M.accent))==null?void 0:d.title):t==="image"?(S="transparent",E=(f=e.find(M=>M.image))==null?void 0:f.title):t==="transparent"&&(S="white",E=(h=e.find(M=>M.transparent))==null?void 0:h.title),o&&(E=null);let T=M=>{r(M)};return w.jsxs("div",{className:"relative","data-testid":"color-selector-button",children:[w.jsxs("button",{className:`relative size-6 cursor-pointer rounded-full ${t?"p-[2px]":"border border-grey-200 dark:border-grey-800"}`,type:"button",onClick:()=>{m(!g),x(!1)},children:[t&&w.jsx("div",{className:"absolute inset-0 rounded-full bg-clip-content p-[3px]",style:{background:"conic-gradient(hsl(360,100%,50%),hsl(315,100%,50%),hsl(270,100%,50%),hsl(225,100%,50%),hsl(180,100%,50%),hsl(135,100%,50%),hsl(90,100%,50%),hsl(45,100%,50%),hsl(0,100%,50%))",WebkitMask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",WebkitMaskComposite:"xor",mask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",maskComposite:"exclude"}}),w.jsxs("span",{className:rt("block size-full rounded-full border-2 border-white dark:border-grey-950",t==="image"&&"flex items-center justify-center"),style:{backgroundColor:S},children:[t==="image"&&w.jsx(OD,{className:"size-[1.4rem]"}),t==="transparent"&&w.jsx("div",{className:"absolute left-[3px] top-[3px] z-10 w-[136%] origin-left rotate-45 border-b border-b-red"})]})]}),g&&w.jsxs("div",{ref:_,className:rt("absolute -right-3 bottom-full z-10 mb-2 flex flex-col gap-3 rounded-lg bg-white p-3 shadow transition-[width] duration-200 ease-in-out dark:bg-grey-900",(o||b)&&"min-w-[296px]"),onClick:O,onMouseDown:O,onTouchStart:O,children:[!o&&l,o&&w.jsx(tQe,{eyedropper:a,hasTransparentOption:s,value:t,onChange:T}),b&&l,w.jsxs("div",{className:"flex justify-end gap-1",children:[w.jsx("div",{className:"flex items-center gap-1",children:e.map(({customContent:M,...I})=>M?w.jsx(N.Fragment,{children:M},I.title):w.jsx(nQe,{isSelected:E===I.title,onSelect:F=>{n(F)},...I},I.title))}),w.jsxs("button",{"aria-label":"Pick color",className:`group relative size-6 rounded-full ${E?"border border-grey-200 dark:border-grey-800":"p-[2px]"}`,"data-testid":"color-picker-toggle",type:"button",onClick:()=>{x(!1),i(!o)},children:[E?w.jsx("div",{className:"absolute inset-0 rounded-full bg-[conic-gradient(hsl(360,100%,50%),hsl(315,100%,50%),hsl(270,100%,50%),hsl(225,100%,50%),hsl(180,100%,50%),hsl(135,100%,50%),hsl(90,100%,50%),hsl(45,100%,50%),hsl(0,100%,50%))]"}):w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"absolute inset-0 rounded-full bg-clip-content p-[3px]",style:{background:"conic-gradient(hsl(360,100%,50%),hsl(315,100%,50%),hsl(270,100%,50%),hsl(225,100%,50%),hsl(180,100%,50%),hsl(135,100%,50%),hsl(90,100%,50%),hsl(45,100%,50%),hsl(0,100%,50%))",WebkitMask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",WebkitMaskComposite:"xor",mask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",maskComposite:"exclude"}}),w.jsx("span",{className:"block size-full rounded-full border-2 border-white dark:border-grey-950",style:{backgroundColor:t},children:t==="transparent"&&w.jsx("div",{className:"absolute left-[3px] top-[3px] z-10 w-[136%] origin-left rotate-45 border-b border-b-red"})})]}),w.jsx(tf,{label:"Pick color"})]})]})]})]})}function rQe({buttons:t=[],selectedName:e,onClick:n}){let[i,r]=(0,N.useState)(!1),o=N.default.useRef(null),a=t.find(s=>s.name===e);return sae(i,o,()=>r(!1)),w.jsxs("div",{ref:o,className:"relative",children:[w.jsxs("button",{className:`relative size-6 cursor-pointer rounded-full ${e?"p-[2px]":"border border-grey-200 dark:border-grey-800"}`,"data-testid":"color-options-button",type:"button",onClick:()=>r(!i),children:[e&&w.jsx("div",{className:"absolute inset-0 rounded-full bg-clip-content p-[3px]",style:{background:"conic-gradient(hsl(360,100%,50%),hsl(315,100%,50%),hsl(270,100%,50%),hsl(225,100%,50%),hsl(180,100%,50%),hsl(135,100%,50%),hsl(90,100%,50%),hsl(45,100%,50%),hsl(0,100%,50%))",WebkitMask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",WebkitMaskComposite:"xor",mask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",maskComposite:"exclude"}}),w.jsx("span",{className:`${a?.color||""} block size-full rounded-full border-2 border-white dark:border-grey-950`})]}),i&&w.jsx("div",{className:"absolute -right-3 bottom-full z-10 mb-2 rounded-lg bg-white px-3 py-2 shadow dark:bg-grey-900","data-testid":"color-options-popover",children:w.jsx("div",{className:"flex",children:w.jsx("ul",{className:"flex w-full items-center justify-between rounded-md font-sans text-md font-normal text-white",children:t.map(({label:s,name:l,color:c})=>l!=="image"?w.jsx(oQe,{color:c,"data-testid":`color-options-${l}-button`,label:s,name:l,selectedName:e,onClick:d=>{n(d),r(!1)}},`${l}-${s}`):w.jsx("li",{className:`mb-0 flex size-[3rem] cursor-pointer items-center justify-center rounded-full border-2 ${e===l?"border-green":"border-transparent"}`,"data-testid":"background-image-color-button",type:"button",onClick:()=>n(l),children:w.jsx("span",{className:"border-1 flex size-6 items-center justify-center rounded-full border border-black/5",children:w.jsx(mA,{className:"size-3 stroke-grey-700 stroke-2 dark:stroke-grey-500 dark:group-hover:stroke-grey-100"})})},"background-image"))})})})]})}function oQe({onClick:t,label:e,name:n,color:i,selectedName:r}){let o=n===r,{handleMousedown:a,handleClick:s}=nae(t,n);return w.jsx("li",{className:"mb-0",children:w.jsxs("button",{"aria-label":e,className:`group relative flex size-6 cursor-pointer items-center justify-center rounded-full border-2 ${o?"border-green":"border-transparent"}`,"data-testid":`color-picker-${n}`,type:"button",onClick:s,onMouseDown:a,children:[w.jsx("span",{className:`${i} size-[1.8rem] rounded-full border`}),w.jsx(tf,{label:e})]})})}var lae=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:17,viewBox:"0 0 26 17",...t},J.createElement("path",{fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"m1.469 2.5 11.5 12.143L24.469 2.5"}));function aQe({item:t,selected:e,onChange:n}){let i="";e&&(i="bg-grey-100 dark:bg-grey-950");let r=(o,a)=>{o.preventDefault(),n(a)};return w.jsx("li",{className:`${i} m-0 hover:bg-grey-100 dark:hover:bg-grey-950`,children:w.jsx("button",{className:"size-full cursor-pointer px-3 py-[7px] text-left dark:text-white","data-test-value":t.name,type:"button",onMouseDownCapture:o=>r(o,t.name),children:t.label})},t.name)}function sQe({value:t,menu:e,onChange:n,dataTestId:i}){let[r,o]=N.default.useState(!1),a=m=>{o(!r),r||m.target.focus()},s=m=>{m.preventDefault(),m.stopPropagation()},l=()=>{o(!1)},c=m=>{o(!1),n(m)},d=(m,b)=>w.jsx(aQe,{item:m,selected:b,onChange:c},m.name),f=e.find(m=>m.name===t),h=f?.label??"",g=r?"z-10":"z-0";return w.jsxs("div",{className:`relative ${g} font-sans text-sm font-normal`,"data-testid":i,children:[w.jsxs("button",{className:"relative h-9 w-full cursor-pointer rounded-lg border border-grey-150 bg-grey-150 px-3 py-1 pr-5 text-left font-sans font-normal leading-[1.5] text-grey-900 hover:border-grey-100 hover:bg-grey-100 focus-visible:outline-none dark:border-grey-900 dark:bg-grey-900 dark:text-white dark:placeholder:text-grey-800 md:h-[38px] md:py-2","data-testid":`${i}-value`,type:"button",onBlur:l,onClick:a,onMouseDownCapture:s,children:[h,w.jsx(lae,{className:`absolute right-3 top-[1.5rem] size-2 text-grey-900 ${r&&"rotate-180"}`})]}),r&&w.jsx(pD,{children:w.jsx(mD,{defaultSelected:f,getItem:d,items:e,onSelect:m=>c(m.name)})})]})}function V4({onFileChange:t,fileInputRef:e,mimeTypes:n=["image/*"],multiple:i=!1,disabled:r}){let o=n.join(",");return w.jsx("form",{onChange:t,children:w.jsx("input",{ref:e,accept:o,disabled:r,hidden:!0,multiple:i,name:"image-input",type:"file",onClick:a=>a.stopPropagation()})})}function qc({className:t,onClick:e,label:n,dataTestId:i,Icon:r}){return w.jsxs("button",{"aria-label":n,className:rt("group pointer-events-auto relative flex h-8 w-9 cursor-pointer items-center justify-center rounded-md bg-white/90 text-grey-900 transition-all hover:bg-white hover:text-black",t),"data-testid":i,type:"button",onClick:e,children:[w.jsx(r,{className:"size-4 stroke-2"}),n&&w.jsx(tf,{label:n})]})}var lQe=t=>J.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",...t},J.createElement("path",{d:"M11.25 17.25a6 6 0 1 0 12 0 6 6 0 1 0-12 0Zm6 3v-6m0 0L15 16.5m2.25-2.25 2.25 2.25"}),J.createElement("path",{d:"M8.25 20.25h-6a1.5 1.5 0 0 1-1.5-1.5V2.25a1.5 1.5 0 0 1 1.5-1.5h10.629a1.5 1.5 0 0 1 1.06.439l2.872 2.872a1.5 1.5 0 0 1 .439 1.06V8.25"}),J.createElement("path",{d:"M3.75 12.75a2.25 1.5 0 1 0 4.5 0 2.25 1.5 0 1 0-4.5 0Z"}),J.createElement("path",{d:"m8.25 12.75-.295-5.929 1.062-.113A2.685 2.685 0 0 1 11.6 7.99"})),cae=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t},J.createElement("path",{d:"M12.001 15.75v-12m4.5 4.5-4.5-4.5-4.5 4.5m15.75 7.5v1.5a3 3 0 0 1-3 3h-16.5a3 3 0 0 1-3-3v-1.5",style:{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5px"}})),cQe=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",...t},J.createElement("g",{strokeLinecap:"round",strokeWidth:2,fill:"none",stroke:"currentColor",strokeLinejoin:"round",className:"nc-icon-wrapper"},J.createElement("path",{d:"M4 10h40"}),J.createElement("path",{d:"M44 46H4V10l8-8h24l8 8z"}),J.createElement("path",{d:"M34 20c0 5.5-4.5 10-10 10s-10-4.5-10-10"}))),dQe=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",...t},J.createElement("g",{strokeLinecap:"round",strokeWidth:2,fill:"none",stroke:"currentColor",strokeLinejoin:"round",className:"nc-icon-wrapper"},J.createElement("rect",{x:2,y:18,width:31,height:26,rx:4}),J.createElement("circle",{cx:8.5,cy:7.5,r:5.5}),J.createElement("circle",{cx:25.5,cy:9.5,r:3.5}),J.createElement("path",{"data-cap":"butt",d:"m33 27 13-6v20l-13-6"}))),uQe={image:r0e,gallery:e0e,video:dQe,audio:lQe,file:cae,product:cQe},K7=({text:t,type:e})=>w.jsx("span",{className:rt("text-center font-sans text-sm font-semibold text-grey-800 transition-all group-hover:text-grey-800",e==="button"&&"px-3 py-1"),"data-kg-card-drag-text":!0,children:t}),fQe=({desc:t,hasErrors:e})=>e?null:w.jsx("p",{className:"!font-sans !text-[1.3rem] !font-medium text-grey-900",children:t}),hQe=({desc:t,hasErrors:e,icon:n,size:i})=>{if(i==="xsmall"&&e)return null;let r=uQe[n],o=rt("shrink-0 opacity-80 transition-all ease-linear hover:scale-105 group-hover:opacity-100",i==="large"&&"size-20 text-grey",i==="small"&&"size-14 text-grey",i==="xsmall"&&"size-5 text-grey-700",!["large","small","xsmall"].includes(i)&&"size-16 text-grey",i==="xsmall"&&t&&"mr-3"),a=rt("flex min-w-[auto] !font-sans !text-sm !font-normal text-grey-700 opacity-80 transition-all group-hover:opacity-100",i==="xsmall"&&"!mt-0",i!=="xsmall"&&"!mt-4");return w.jsxs(w.Fragment,{children:[w.jsx(r,{className:o}),w.jsx("p",{className:a,children:t})]})};function nf({desc:t,icon:e,filePicker:n,size:i,type:r,borderStyle:o="squared",isDraggedOver:a,errors:s=[],placeholderRef:l,dataTestId:c="media-placeholder",errorDataTestId:d="media-placeholder-errors",multiple:f=!1,...h}){let g=rt("relative flex h-full items-center justify-center",r==="button"?"rounded-lg bg-grey-100":"border bg-grey-50",i==="xsmall"&&r!=="button"&&"before:pb-[12.5%] dark:bg-grey-900",i!=="xsmall"&&r!=="button"&&"before:pb-[62.5%] dark:bg-grey-950",o==="rounded"&&r!=="button"&&"rounded-lg border-grey/20 dark:border-transparent",o!=="rounded"&&r!=="button"&&"border-grey/20 dark:border-grey/10"),m=rt("group flex cursor-pointer select-none items-center justify-center",r==="button"&&"px-3 py-1",r!=="button"&&(i==="xsmall"?"p-4":"flex-col p-20")),b=rt("font-sans text-sm font-semibold text-red",i!=="xsmall"&&"mt-3 max-w-[65%]"),x=s.map(_=>w.jsx("span",{className:b,"data-testid":d,children:_.message},_.message));return w.jsx("div",{ref:l,className:"not-kg-prose size-full",...h,"data-testid":c,children:w.jsx("div",{className:g,children:a?w.jsx(K7,{text:`Drop ${f?"'em":"it"} like it's hot \u{1F525}`,type:r}):w.jsxs("button",{className:m,name:"placeholder-button",type:"button",onClick:n,children:[r==="button"?w.jsx(fQe,{desc:t,hasErrors:s.length>0}):w.jsx(hQe,{desc:t,hasErrors:s.length>0,icon:e,size:i}),x]})})})}nf.propTypes={icon:$.oneOf(["image","gallery","video","audio","file","product"]),desc:$.string,size:$.oneOf(["xsmall","small","medium","large"]),type:$.oneOf(["image","button"]),borderStyle:$.oneOf(["squared","rounded"])};function Ys({style:t,fullWidth:e,bgStyle:n}){return w.jsx("div",{className:`rounded-full bg-grey-200 dark:bg-black ${e?"w-full":"mx-auto w-3/5"} ${n==="transparent"?"bg-white/30":"bg-grey-200"}`,"data-testid":"progress-bar",children:w.jsx("div",{className:"rounded-full bg-green py-1 text-center text-2xs leading-none text-white",style:t})})}Ys.propTypes={style:$.object,fullWidth:$.bool};function lr({fileInputRef:t}){var e;(e=t.current)==null||e.click()}function Y4({className:t,imgClassName:e,src:n,alt:i,desc:r,icon:o,size:a,type:s,borderStyle:l="squared",backgroundSize:c="cover",mimeTypes:d,onFileChange:f,dragHandler:h,isEditing:g=!0,isLoading:m,isPinturaEnabled:b,openImageEditor:x,progress:_,errors:O,onRemoveMedia:S=()=>{},additionalActions:E,setFileInputRef:T}){let M=(0,N.useRef)(null),I=Z=>{M.current=Z,T?.(Z)},F={width:`${_?.toFixed(0)}%`},W=Z=>{Z.stopPropagation(),S()};return!m&&!n?w.jsxs("div",{className:t,children:[w.jsx(nf,{borderStyle:l,dataTestId:"media-upload-placeholder",desc:g?r:"",errorDataTestId:"media-upload-errors",errors:O,filePicker:()=>lr({fileInputRef:M}),icon:o,isDraggedOver:h?.isDraggedOver,placeholderRef:h?.setRef,size:a,type:s}),w.jsx(V4,{fileInputRef:I,filePicker:()=>lr({fileInputRef:M}),mimeTypes:d,onFileChange:f})]}):w.jsxs("div",{className:rt("group/image relative flex items-center justify-center",m?"min-w-[6.8rem]":"min-w-[5.2rem]",l==="rounded"&&"rounded",t),"data-testid":"media-upload-filled",children:[n&&w.jsxs(w.Fragment,{children:[w.jsx("img",{alt:i,className:rt("mx-auto h-full w-auto min-w-[5.2rem]",l==="rounded"&&"rounded-lg",c==="cover"?"object-cover":"object-contain",e),src:n}),w.jsx("div",{className:rt("absolute inset-0 bg-gradient-to-t from-black/0 via-black/5 to-black/30 opacity-0 transition-all group-hover/image:opacity-100",l==="rounded"&&"rounded-lg")})]}),!m&&w.jsxs("div",{className:"absolute right-1 top-1 flex space-x-1 opacity-0 transition-all group-hover/image:opacity-100",children:[E,b&&w.jsx(qc,{Icon:Q4,label:"Edit",onClick:()=>x({image:n,handleSave:Z=>{f({target:{files:[Z]}})}})}),w.jsx(qc,{dataTestId:"media-upload-remove",Icon:tp,label:"Delete",onClick:W})]}),m&&w.jsx("div",{className:rt("absolute inset-0 flex min-w-full items-center justify-center overflow-hidden bg-grey-100",l==="rounded"&&"rounded-lg"),"data-testid":"custom-thumbnail-progress",children:w.jsx(Ys,{style:F})})]})}Y4.propTypes={additionalActions:$.node,alt:$.string,backgroundSize:$.oneOf(["cover","contain"]),borderStyle:$.oneOf(["squared","rounded"]),className:$.string,desc:$.string,dragHandler:$.shape({isDraggedOver:$.bool,setRef:$.func}),errors:$.arrayOf($.shape({message:$.string})),icon:$.string,imgClassName:$.string,isEditing:$.bool,isLoading:$.bool,isPinturaEnabled:$.bool,mimeTypes:$.arrayOf($.string),onFileChange:$.func,onRemoveMedia:$.func,openImageEditor:$.func,progress:$.number,setFileInputRef:$.func,size:$.string,src:$.string,type:$.oneOf(["image","button"])};function pQe({item:t,selected:e,onChange:n}){let i="";e&&(i="bg-grey-100 dark:bg-grey-900");let r=o=>{o.preventDefault(),n(t)};return w.jsx("li",{className:`${i} m-0 hover:bg-grey-100 dark:hover:bg-grey-900`,children:w.jsx("button",{className:"size-full cursor-pointer px-3 py-[7px] text-left dark:text-white","data-testid":"multiselect-dropdown-item",type:"button",onMouseDownCapture:r,children:t.label})},t.name)}function gQe({placeholder:t="",items:e=[],availableItems:n=[],onChange:i,dataTestId:r,allowAdd:o=!0}){let[a,s]=N.default.useState(!1),[l,c]=N.default.useState(""),[d,f]=N.default.useState(!1),h=N.default.useRef(null),g=F=>{s(!a),a||F.target.focus()},m=()=>{s(!1),c(""),f(!1)},b=()=>{f(!0),g()},x=F=>{!F.name||e!=null&&e.includes(F.name)||(i(e.concat(F.name)),c(""))},_=(F,W)=>{F.preventDefault(),F.stopPropagation(),i(e.filter(Z=>Z!==W.name))},O=F=>{F.key==="Backspace"&&!l&&i(e.slice(0,-1))},S=(F,W)=>w.jsx(pQe,{item:F,selected:W,onChange:x},F.name),E=e.map(F=>({name:F,label:F})),T=n.map(F=>({name:F,label:F})).filter(F=>!E.some(W=>W.name===F.name)).filter(F=>F.name.toLocaleLowerCase().includes(l.toLocaleLowerCase())),M="",I=T[0];return l&&o&&(e.find(F=>F.toLocaleLowerCase()===l.toLocaleLowerCase())||n.find(F=>F.toLocaleLowerCase()===l.toLocaleLowerCase())||T.unshift({name:l,label:w.jsxs(w.Fragment,{children:["Add ",w.jsxs("strong",{children:['"',l,'"...']})]})})),w.jsxs("div",{className:"relative z-0 font-sans text-sm font-normal","data-testid":r,children:[w.jsxs("div",{className:`relative flex w-full cursor-text flex-wrap gap-1 rounded-lg border ${d?"border-green bg-white shadow-[0_0_0_2px_rgba(48,207,67,.25)] dark:bg-grey-925":"border-grey-100 bg-grey-100 dark:border-transparent dark:bg-grey-900 dark:hover:bg-grey-925"} px-[10px] py-2 pr-5 font-sans text-sm font-normal leading-[1.5] text-grey-900 placeholder:text-grey-500 focus-visible:outline-none dark:text-white dark:selection:bg-grey-800 dark:placeholder:text-grey-700`,type:"button",onClick:()=>h.current.focus(),children:[E.map(F=>w.jsxs("button",{className:"flex cursor-pointer items-center gap-1.5 rounded bg-black py-px pl-2 pr-1 leading-[1.5] text-white dark:bg-grey-100 dark:text-grey-900","data-testid":"multiselect-dropdown-selected",type:"button",onMouseDownCapture:W=>_(W,F),children:[F.label,w.jsx($0,{className:"mt-px size-[1rem] stroke-[3]"})]},F.name)),w.jsx("div",{className:"flex-1",children:w.jsx("input",{ref:h,className:"size-full min-w-[5rem] appearance-none bg-transparent px-0 leading-none outline-none",placeholder:E.length===0?t:"",value:l,onBlur:m,onChange:F=>c(F.target.value),onFocus:b,onKeyDown:O})}),w.jsx(lae,{className:`absolute right-3 top-4 size-2 text-grey-900 ${a&&"rotate-180"}`})]}),a&&!!T.length&&w.jsxs(pD,{children:[M,w.jsx(mD,{defaultSelected:I,getItem:S,items:T,onSelect:x})]})]})}function J7(t,e){return J7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},J7(t,e)}function mQe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,J7(t,e)}$.number,$.number,$.number,$.func;var dae=({tabs:t,defaultTab:e,tabContent:n})=>{let[i,r]=(0,N.useState)(e||t[0].id),o=a=>{r(a)};return w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`no-scrollbar flex gap-4 border-b border-grey-300 dark:border-grey-900 ${t.length>1?"w-full px-6":"mx-6"}`,children:t.map(a=>w.jsx("button",{className:`-mb-px appearance-none whitespace-nowrap pb-3 pt-4 text-sm font-semibold transition-all ${t.length>1?"cursor-pointer border-b-2":"cursor-default"} ${i===a.id?"border-black text-black dark:border-white dark:text-white":"border-transparent text-grey-600 hover:border-grey-500 dark:text-grey-500 dark:hover:border-grey-500"}`,"data-testid":`tab-${a.id}`,type:"button",onClick:()=>o(a.id),children:a.label},a.id))}),w.jsx("div",{className:"flex flex-col gap-3 p-6 pt-4","data-testid":`tab-contents-${i}`,children:n[i]})]})};dae.propTypes={tabs:$.arrayOf($.shape({id:$.string.isRequired,label:$.string.isRequired})).isRequired,defaultTab:$.string,tabContent:$.objectOf($.node).isRequired};function uae({isChecked:t,onChange:e,dataTestId:n}){return w.jsxs("label",{className:"relative inline-block h-4 w-7 outline-none","data-testid":n,id:n,children:[w.jsx("input",{checked:t,className:"peer absolute hidden",type:"checkbox",onChange:e}),w.jsx("div",{className:"absolute inset-0 cursor-pointer rounded-full bg-grey-300 transition-all before:absolute before:bottom-[2px] before:left-[2px] before:size-3 before:rounded-full before:bg-white before:transition-all before:duration-100 peer-checked:bg-black peer-checked:before:translate-x-[12px] dark:bg-grey-800 dark:peer-checked:bg-green"})]})}uae.propTypes={isChecked:$.bool,onChange:$.func};function Xs({children:t,darkMode:e,cardWidth:n,tabs:i,defaultTab:r}){let{ref:o}=$ze({},n),a=N.default.useMemo(()=>i?typeof t=="object"&&t!==null?t:{default:t}:{default:t},[i,t]);return w.jsx("div",{className:`!mt-0 touch-none ${e?"dark":""}`,children:i?w.jsx("div",{ref:o,className:"not-kg-prose fixed left-0 top-0 z-[9999999] m-0 flex w-[320px] flex-col rounded-lg bg-white bg-clip-padding font-sans shadow-lg will-change-transform dark:bg-grey-950 dark:shadow-xl","data-testid":"settings-panel","data-kg-settings-panel":!0,children:w.jsx(dae,{defaultTab:r,tabContent:a,tabs:i})}):w.jsx("div",{ref:o,className:"not-kg-prose fixed left-0 top-0 z-[9999999] m-0 flex w-[320px] flex-col gap-3 rounded-lg bg-white bg-clip-padding p-6 font-sans shadow-lg will-change-transform dark:bg-grey-950 dark:shadow-xl","data-testid":"settings-panel","data-kg-settings-panel":!0,children:t})})}function Ho({label:t,description:e,isChecked:n,onChange:i,dataTestId:r}){return w.jsxs("label",{className:"flex w-full cursor-pointer items-center justify-between",children:[w.jsxs("div",{children:[w.jsx("div",{className:"text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300",children:t}),e&&w.jsx("p",{className:"mt-1 w-11/12 text-xs font-normal leading-snug text-grey-700 dark:text-grey-600",children:e})]}),w.jsx("div",{className:"flex shrink-0 pl-2",children:w.jsx(uae,{dataTestId:r,isChecked:n,onChange:i})})]})}function np({label:t,hideLabel:e,description:n,onChange:i,value:r,placeholder:o,dataTestId:a,onBlur:s}){return w.jsxs("div",{className:"flex w-full flex-col justify-between",children:[w.jsx("div",{className:e?"sr-only":"mb-1.5 text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300",children:t}),w.jsx(gD,{dataTestId:a,placeholder:o,value:r,onBlur:s,onChange:i}),n&&w.jsx("p",{className:"text-xs font-normal leading-snug text-grey-700 dark:text-grey-600",children:n})]})}function L0({dataTestId:t,label:e,value:n,onChange:i}){let{cardConfig:r}=N.default.useContext(ut),[o,a]=N.default.useState([]);N.default.useEffect(()=>{r!=null&&r.fetchAutocompleteLinks&&r.fetchAutocompleteLinks().then(l=>{a(l.map(c=>({value:c.value,label:c.label})))})},[r]);let s=o.filter(l=>l.label.toLocaleLowerCase().includes(n.toLocaleLowerCase()));return w.jsx(vQe,{dataTestId:t,label:e,listOptions:s,placeholder:"https://yoursite.com/#/portal/signup/",value:n,onChange:i})}function vQe({dataTestId:t,description:e,label:n,listOptions:i,onChange:r,placeholder:o,value:a}){function s(c){r(c.value)}let l=(c,d,f,h)=>w.jsxs(Noe,{className:rt(d&&"bg-grey-100 dark:bg-grey-925","m-0 cursor-pointer px-3 py-[7px] text-left hover:bg-grey-100 dark:hover:bg-grey-925"),dataTestId:t,item:c,scrollIntoView:h,selected:d,onClick:s,onMouseOver:f,children:[w.jsx("span",{className:"block text-sm font-normal leading-tight text-black dark:text-white","data-testid":`${t}-listOption-${c.label}`,children:c.label}),w.jsx("span",{className:"block truncate text-xs leading-tight text-grey-700 dark:text-grey-600","data-testid":`${t}-listOption-${c.value}`,children:c.value})]},c.value);return w.jsxs("div",{className:"flex w-full flex-col justify-between",children:[w.jsx("div",{className:"text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300",children:n}),w.jsx(Poe,{dataTestId:t,getItem:l,listOptions:i,placeholder:o,value:a,onChange:r}),e&&w.jsx("p",{className:"text-xs font-normal leading-snug text-grey-700 dark:text-grey-600",children:e})]})}function yQe({label:t,description:e,value:n,menu:i,onChange:r,dataTestId:o}){return w.jsxs("div",{className:"flex w-full flex-col justify-between gap-1",children:[w.jsx("div",{className:"text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300","data-testid":`${o}-label`,children:t}),w.jsx(sQe,{dataTestId:o,menu:i,value:n,onChange:r}),e&&w.jsx("p",{className:"text-xs font-normal leading-snug text-grey-700 dark:text-grey-600",children:e})]})}function bQe({label:t,description:e,placeholder:n="",items:i,availableItems:r,onChange:o,dataTestId:a,allowAdd:s=!0}){return w.jsxs("div",{className:"flex w-full flex-col justify-between gap-1",children:[w.jsx("div",{className:"text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300",children:t}),w.jsx(gQe,{allowAdd:s,availableItems:r,dataTestId:a,items:i,placeholder:n,onChange:o}),e&&w.jsx("p",{className:"text-xs font-normal leading-snug text-grey-700 dark:text-grey-600",children:e})]})}function Fl({label:t,onClick:e,selectedName:n,buttons:i,hasTooltip:r}){return w.jsxs("div",{className:"flex w-full items-center justify-between text-[1.3rem]",children:[w.jsx("div",{className:"text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300",children:t}),w.jsx("div",{className:"shrink-0 pl-2",children:w.jsx(iae,{buttons:i,hasTooltip:r,selectedName:n,onClick:e})})]})}function oS({label:t,onClick:e,selectedName:n,buttons:i,layout:r,dataTestId:o}){return w.jsxs("div",{className:`flex w-full text-[1.3rem] ${r==="stacked"?"flex-col":"items-center justify-between"}`,"data-testid":o,children:[w.jsx("div",{className:"text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300",children:t}),w.jsx("div",{className:`shrink-0 ${r==="stacked"?"-mx-1 pt-[.6rem]":"pl-2"}`,children:w.jsx(rQe,{buttons:i,selectedName:n,onClick:e})})]})}function Zb({label:t,isExpanded:e,onSwatchChange:n,onPickerChange:i,onTogglePicker:r,value:o,swatches:a,eyedropper:s,hasTransparentOption:l,dataTestId:c,children:d,showChildren:f}){let h=g=>{g.stopPropagation()};return w.jsx("div",{className:"flex-col","data-testid":c,onClick:h,children:w.jsxs("div",{className:"flex w-full items-center justify-between text-[1.3rem]",children:[w.jsx("div",{className:"text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300",children:t}),w.jsx("div",{className:"shrink-0 pl-2",children:w.jsx(iQe,{eyedropper:s,hasTransparentOption:l,isExpanded:e,showChildren:f,swatches:a,value:o,onChange:i,onSwatchChange:n,onTogglePicker:r,children:d})})]})})}function X4({className:t,imgClassName:e,label:n,hideLabel:i,onFileChange:r,isDraggedOver:o,placeholderRef:a,src:s,alt:l,isLoading:c,errors:d=[],progress:f,onRemoveMedia:h,icon:g,desc:m,size:b,type:x,stacked:_,borderStyle:O,mimeTypes:S,isPinturaEnabled:E,openImageEditor:T,setFileInputRef:M}){return w.jsxs("div",{className:rt(t,!_&&"flex justify-between gap-3"),"data-testid":"media-upload-setting",children:[w.jsx("div",{className:i?"sr-only":"mb-2 shrink-0 text-sm font-medium tracking-normal text-grey-900 dark:text-grey-400",children:n}),w.jsx(Y4,{alt:l,borderStyle:O,className:rt(_&&"h-32",!_&&s&&"h-[5.2rem]",!_&&x!=="button"&&!s&&"h-[5.2rem] w-[7.2rem]"),desc:m,dragHandler:{isDraggedOver:o,setRef:a},errors:d,icon:g,imgClassName:e,isLoading:c,isPinturaEnabled:E,mimeTypes:S,openImageEditor:T,progress:f,setFileInputRef:M,size:b,src:s,type:x,onFileChange:r,onRemoveMedia:h})]})}function CD({visibilityOptions:t,toggleVisibility:e}){return t.map((n,i)=>{let r=n.toggles.map(o=>w.jsx(Ho,{dataTestId:`visibility-toggle-${n.key}-${o.key}`,isChecked:o.checked,label:o.label,onChange:()=>e(n.key,o.key,!o.checked)},o.key));return w.jsxs("div",{className:"flex flex-col gap-3","data-testid":"visibility-settings",children:[w.jsx("p",{className:"text-sm font-bold tracking-normal text-grey-900 dark:text-grey-300",children:n.label}),r,ir.key!=="paidMembers"),i[1].toggles=i[1].toggles.filter(r=>r.key!=="paidMembers")),i}function kQe(t){var e,n,i,r,o;let a=t.find(d=>d.key==="web").toggles,s=[];(e=a.find(d=>d.key==="freeMembers"))!=null&&e.checked&&s.push("status:free"),(n=a.find(d=>d.key==="paidMembers"))!=null&&n.checked&&s.push("status:-free");let l=t.find(d=>d.key==="email").toggles,c=[];return(i=l.find(d=>d.key==="freeMembers"))!=null&&i.checked&&c.push("status:free"),(r=l.find(d=>d.key==="paidMembers"))!=null&&r.checked&&c.push("status:-free"),{web:{nonMember:((o=a.find(d=>d.key==="nonMembers"))==null?void 0:o.checked)||!1,memberSegment:s.join(",")},email:{memberSegment:c.join(",")}}}var ED=(t,e,n)=>{let i=n?.stripeEnabled,r;t.getEditorState().read(()=>{r=A.$getNodeByKey(e).visibility});let o=fae(r),a=wQe(r,{isStripeEnabled:i});return{visibilityData:o,visibilityOptions:a,toggleVisibility:(s,l,c)=>{t.update(()=>{let d=structuredClone(a),f=d.find(g=>g.key===s).toggles.find(g=>g.key===l);f.checked=c;let h=A.$getNodeByKey(e);h.visibility=kQe(d)})}}};function xQe({nodeKey:t,html:e}){let[n]=Oe.useLexicalComposerContext(),i=N.default.useContext(vn),{cardConfig:r,darkMode:o}=N.default.useContext(ut),[a,s]=N.default.useState(!1),{showVisibilitySettings:l}=Kh(),{visibilityOptions:c,toggleVisibility:d}=ED(n,t,r),f=[{id:"visibility",label:"Visibility"}],h=_=>{n.update(()=>{let O=A.$getNodeByKey(t);O.html=_})},g=_=>{_.preventDefault(),_.stopPropagation(),n.dispatchCommand(Aa,{cardKey:t,focusEditor:!1})},m=_=>{var O;((O=_?.relatedTarget)==null?void 0:O.className)!=="kg-prose"&&n.dispatchCommand(X_,{cardKey:t})},b=w.jsx(CD,{toggleVisibility:d,visibilityOptions:c}),x=N.default.useCallback(_=>{_.preventDefault(),_.stopPropagation(),n.dispatchCommand(PD,{cardKey:t})},[n,t]);return w.jsxs(w.Fragment,{children:[w.jsx(Koe,{darkMode:o,html:e,isEditing:i.isEditing,updateHtml:h,onBlur:m}),w.jsx(xt,{"data-kg-card-toolbar":"html",isVisible:a,children:w.jsx(pi,{onClose:()=>s(!1)})}),w.jsx(xt,{"data-kg-card-toolbar":"html",isVisible:i.isSelected&&!a&&!i.isEditing,children:w.jsxs(gi,{children:[w.jsx(lt,{dataTestId:"edit-html",icon:"edit",isActive:!1,label:"Edit",onClick:g}),w.jsx(Kn,{}),w.jsx(lt,{dataTestId:"show-visibility",icon:"visibility",isActive:l,label:"Visibility",onClick:x}),w.jsx(Kn,{hide:!r.createSnippet}),w.jsx(lt,{dataTestId:"create-snippet",hide:!r.createSnippet,icon:"snippet",isActive:!1,label:"Save as snippet",onClick:()=>s(!0)})]})}),l&&i.isSelected&&w.jsx(Xs,{darkMode:o,defaultTab:"visibility",tabs:f,onMouseDown:_=>{_.preventDefault(),_.stopPropagation()},children:{visibility:b}})]})}var hae=A.createCommand(),Nh=class extends Fw{getIcon(){return cG}constructor(e={},n){super(e,n)}decorate(){return w.jsx(Jn,{IndicatorIcon:tze,isVisibilityActive:this.getIsVisibilityActive(),nodeKey:this.getKey(),wrapperStyle:"wide",children:w.jsx(xQe,{html:this.__html,nodeKey:this.getKey(),visibility:this.__visibility})})}};we(Nh,"kgMenu",{label:"HTML",desc:"Insert a HTML editor card",Icon:cG,insertCommand:hae,matches:["html"],priority:18,shortcut:"/html"});function _Qe(t){return new Nh(t)}function OQe(t){return t instanceof Nh}var eV=f4,SQe=function(t="",{ghostVersion:e="4.0",type:n="mobiledoc"}={}){let i=eV.coerce(e);return typeof t!="string"||(t||"").trim()===""?"":eV.satisfies(i,"<4.x")?n==="markdown"?t.replace(/[^\w]/g,"").toLowerCase():t.replace(/[<>&"?]/g,"").trim().replace(/[^\w]/g,"-").replace(/-{2,}/g,"-").toLowerCase():encodeURIComponent(t.trim().toLowerCase().replace(/[\][!"#$%&'()*+,./:;<=>?@\\^_{|}~]/g,"").replace(/\s+/g,"-").replace(/^-|-{2,}|-$/g,""))},CQe={slugify:SQe},EQe=CQe,tV=YK,nV=f4,{slugify:TQe}=EQe,xg={},iV=function({ghostVersion:t}={}){let e=function(n,i={}){let r=TQe(n,{ghostVersion:t,type:"markdown"});return i[r]&&(i[r]+=1,r+=i[r]),r};return function(n){let i=n.renderer.rules.heading_open;n.renderer.rules.heading_open=function(r,o,a,s,l){let c={};r[o].attrs=r[o].attrs||[];let d=r[o+1].children.reduce(function(h,g){return h+g.content},""),f=e(d,c);return r[o].attrs.push(["id",f]),i?i.apply(this,arguments):l.renderToken.apply(l,arguments)}}},MQe=function(t){let e=nV.coerce(t.ghostVersion||"4.0");if(nV.satisfies(e,"<4.x")){if(xg["<4.x"])return xg["<4.x"];let n=new tV({html:!0,breaks:!0,linkify:!0}).use(MO()).use(NO()).use(PO()).use(AO()).use(iV(t)).use($O()).use(DO());return n.linkify.set({fuzzyLink:!1}),xg["<4.x"]=n,n}else{if(xg.latest)return xg.latest;let n=new tV({html:!0,breaks:!0,linkify:!0}).use(MO()).use(NO()).use(PO()).use(AO()).use(iV(t)).use($O()).use(DO());return n.linkify.set({fuzzyLink:!1}),xg.latest=n,n}},NQe={render:function(t,e={}){return MQe(e).render(t)}},PQe=NQe,pae=Da(PQe),TD=A.createCommand("PASTE_MARKDOWN_COMMAND"),MD="text/plain",ND="text/html",AQe=()=>{let[t]=Oe.useLexicalComposerContext(),[e,n]=N.default.useState(!1);return N.default.useEffect(()=>{let i=r=>{r.key==="Shift"&&n(!1)};return document.addEventListener("keyup",i),()=>{document.removeEventListener("keyup",i)}},[n]),N.default.useEffect(()=>{let i=r=>{r.key==="Shift"&&n(!0)};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i)}},[n]),N.default.useEffect(()=>ct.mergeRegister(t.registerCommand(TD,({text:i,allowBr:r})=>{let o=A.$getSelection();if(!A.$isRangeSelection(o))return!1;let a=new DataTransfer;if(e)a.setData(MD,i);else{let s=pae.render(i),l=r?s:s.replace(//g,""),c=q4(l,{replaceJS:!0});a.setData(ND,c)}return yh.$insertDataTransferForRichText(a,o,t),!0},A.COMMAND_PRIORITY_LOW)),[t,e]),null},gae={},mae={},qb={};Object.defineProperty(qb,"__esModule",{value:!0});qb.denestTransform=vae;qb.registerDenestTransform=IQe;var Ph=si,Kf=A;function $Qe(t){if(!(0,Ph.$isListNode)(t))return!1;let e=t.getParent();return!((0,Kf.$isRootNode)(e)||(0,Ph.$isListItemNode)(e))}function DQe(t){if(!(0,Ph.$isListItemNode)(t))return!1;let e=t.getParent();return!(0,Ph.$isListNode)(e)}function rV(t){return(0,Kf.$isLineBreakNode)(t)||(0,Kf.$isTextNode)(t)?!1:$Qe(t)||DQe(t)||t.isInline&&!t.isInline()&&!(0,Ph.$isListNode)(t)&&!(0,Ph.$isListItemNode)(t)}function vae(t,e){let n=t.getChildren();if(!n.some(rV))return;let i=(0,Kf.$createParagraphNode)(),r=e(t);n.forEach(a=>{rV(a)?(r.getChildrenSize()>0&&(i.append(r),r=e(t)),i.append(a)):r.append(a)}),r.getChildrenSize()>0&&i.append(r);let o=t;for(;o.getParent()&&o.getParent()!==(0,Kf.$getRoot)();)o=o.getParentOrThrow();i.getChildren().reverse().forEach(a=>{if((0,Kf.$isRootNode)(o.getParent())&&(0,Ph.$isListItemNode)(a)){let s=(0,Kf.$createParagraphNode)();s.append(...a.getChildren()),a.remove(),o.insertAfter(s);return}o.insertAfter(a)}),t.remove(),i.remove()}function IQe(t,e,n){return t.hasNodes([e])?t.registerNodeTransform(e,i=>{vae(i,n)}):()=>{}}var Ub={};Object.defineProperty(Ub,"__esModule",{value:!0});Ub.removeAlignmentTransform=yae;Ub.registerRemoveAlignmentTransform=LQe;function yae(t){t.getFormatType()!==""&&t.setFormat("")}function LQe(t,e){return t.hasNodes([e])?t.registerNodeTransform(e,yae):()=>{}}var bae=zS(G9e),Vb={};Object.defineProperty(Vb,"__esModule",{value:!0});Vb.mergeListNodesTransform=wae;Vb.registerMergeListNodesTransform=jQe;var aS=si;function wae(t){let e=t.getNextSibling();(0,aS.$isListNode)(e)&&(0,aS.$isListNode)(t)&&e.getListType()===t.getListType()&&(t.append(...e.getChildren()),e.remove())}function jQe(t){return t.hasNodes([aS.ListNode])?t.registerNodeTransform(aS.ListNode,wae):()=>{}}var G4={};Object.defineProperty(G4,"__esModule",{value:!0});G4.removeAtLinkNodesTransform=kae;G4.registerRemoveAtLinkNodesTransform=RQe;var oV=A,aV=bae;function kae(t){let e=t.getPreviousSibling(),n=t.getNextSibling();e?(0,oV.$isTextNode)(e)&&e.getTextContent().endsWith(" ")&&e.setTextContent(e.getTextContent().slice(0,-1)):n&&(0,oV.$isTextNode)(n)&&n.getTextContent().startsWith(" ")&&n.setTextContent(n.getTextContent().slice(1)),t.remove()}function RQe(t){return t.hasNodes([aV.AtLinkNode])?t.registerNodeTransform(aV.AtLinkNode,kae):()=>{}}(function(t){var e=rn&&rn.__createBinding||(Object.create?function(h,g,m,b){b===void 0&&(b=m);var x=Object.getOwnPropertyDescriptor(g,m);(!x||("get"in x?!g.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return g[m]}}),Object.defineProperty(h,b,x)}:function(h,g,m,b){b===void 0&&(b=m),h[b]=g[m]}),n=rn&&rn.__exportStar||function(h,g){for(var m in h)m!=="default"&&!Object.prototype.hasOwnProperty.call(g,m)&&e(g,h,m)};Object.defineProperty(t,"__esModule",{value:!0}),t.registerDefaultTransforms=f;let i=qb,r=Ub,o=ct,a=A,s=Jt,l=bae,c=si,d=Vb;n(qb,t),n(Vb,t),n(Ub,t),n(G4,t);function f(h){return(0,o.mergeRegister)((0,r.registerRemoveAlignmentTransform)(h,a.ParagraphNode),(0,r.registerRemoveAlignmentTransform)(h,s.HeadingNode),(0,r.registerRemoveAlignmentTransform)(h,l.ExtendedHeadingNode),(0,r.registerRemoveAlignmentTransform)(h,s.QuoteNode),(0,i.registerDenestTransform)(h,a.ParagraphNode,()=>(0,a.$createParagraphNode)()),(0,i.registerDenestTransform)(h,s.HeadingNode,g=>(0,s.$createHeadingNode)(g.getTag())),(0,i.registerDenestTransform)(h,l.ExtendedHeadingNode,g=>(0,s.$createHeadingNode)(g.getTag())),(0,i.registerDenestTransform)(h,s.QuoteNode,()=>(0,s.$createQuoteNode)()),(0,i.registerDenestTransform)(h,c.ListNode,g=>(0,c.$createListNode)(g.getListType(),g.getStart())),(0,i.registerDenestTransform)(h,c.ListItemNode,()=>(0,c.$createListItemNode)()),(0,d.registerMergeListNodesTransform)(h))}})(mae);(function(t){var e=rn&&rn.__createBinding||(Object.create?function(i,r,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(r,o);(!s||("get"in s?!r.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return r[o]}}),Object.defineProperty(i,a,s)}:function(i,r,o,a){a===void 0&&(a=o),i[a]=r[o]}),n=rn&&rn.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&e(r,i,o)};Object.defineProperty(t,"__esModule",{value:!0}),n(mae,t)})(gae);var Q8=t=>{if(!t)return!1;let{metaKey:e,key:n,target:i}=t;return n==="Escape"||e&&n==="Enter"?!1:i.matches("input, textarea")||i.cmView||i.cmIgnore||!!i.closest(".cm-editor")},Dn=A.createCommand("INSERT_CARD_COMMAND"),xu=A.createCommand("SELECT_CARD_COMMAND"),X_=A.createCommand("DESELECT_CARD_COMMAND"),Aa=A.createCommand("EDIT_CARD_COMMAND"),Hf=A.createCommand("DELETE_CARD_COMMAND"),eP=A.createCommand("PASTE_LINK_COMMAND"),PD=A.createCommand("SHOW_CARD_VISIBILITY_SETTINGS_COMMAND"),FQe=A.createCommand("HIDE_CARD_VISIBILITY_SETTINGS_COMMAND"),W8=10,sV={code:"`",superscript:"^",subscript:"~",strikethrough:"~~"};function Lf(t,e){let n=A.$createNodeSelection();n.add(e),A.$setSelection(n),document.activeElement!==t.getRootElement()&&t.getRootElement().focus({preventScroll:!0})}function _g(t,e){var n;let i=A.$getNodeByKey(e);(n=i?.isEmpty)!=null&&n.call(i)&&zQe(t,i)}function zQe(t,e){if(A.$getRoot().getLastChild().is(e)){let n=A.$createParagraphNode();A.$getRoot().append(n),n.select()}else{let n=e.getNextSibling();A.$isDecoratorNode(n)?(Wr(n),t.getRootElement().focus()):n.selectStart()}e.remove()}function QQe({editor:t,containerElem:e,cursorDidExitAtTop:n,isNested:i}){let{selectedCardKey:r,setSelectedCardKey:o,isEditingCard:a,setIsEditingCard:s,setShowVisibilitySettings:l}=Kh(),c=N.default.useRef(!1);return N.default.useEffect(()=>{let d=h=>{c.current=h.shiftKey},f=h=>{c.current=h.shiftKey};return document.addEventListener("keydown",d),document.addEventListener("keyup",f),()=>{document.removeEventListener("keydown",d),document.removeEventListener("keyup",f)}},[]),N.default.useEffect(()=>{let d=f=>{document.body.contains(f.target)&&e.current&&!e.current.contains(f.target)&&t.getEditorState().read(()=>{let h=A.$getSelection();if(A.$isNodeSelection(h)){let g=h.getNodes()[0];Yf(g)&&t.dispatchCommand(X_,{cardKey:g.getKey()})}})};return i||window.addEventListener("mousedown",d),()=>{window.removeEventListener("mousedown",d)}},[t,e,i]),N.default.useEffect(()=>ct.mergeRegister(t.registerUpdateListener(({editorState:d,tags:f})=>{if(f.has("collaboration")||f.has("card-export")||i||document.activeElement.closest("[data-lexical-decorator]"))return;let{isCardSelected:h,cardKey:g,cardNode:m}=d.read(()=>{let b=A.$getSelection();if(A.$isNodeSelection(b)&&b.getNodes().length===1&&Yf(b.getNodes()[0])){let x=b.getNodes()[0];return{isCardSelected:!0,cardKey:x.getKey(),cardNode:x}}else return{isCardSelected:!1}});h&&!r?(o(g),s(!1)):h&&r!==g&&t.update(()=>{_g(t,r),o(g),s(!1)},{tag:"history-merge"}),!h&&r&&t.update(()=>{_g(t,r),o(null),s(!1)},{tag:"history-merge"}),h&&m.__openInEditMode&&(t.update(()=>{m.clearOpenInEditMode()},{tag:"history-merge"}),s(!0))}),t.registerCommand(Dn,({cardNode:d,openInEditMode:f})=>{let h,g=A.$getSelection();if(A.$isRangeSelection(g))h=g.focus.getNode();else if(A.$isNodeSelection(g))h=g.getNodes()[0];else return!1;return h!==null&&(ZFe({selectedNode:h,newNode:d}),o(d.getKey()),f&&s(!0)),!0},A.COMMAND_PRIORITY_LOW),t.registerCommand(xu,({cardKey:d})=>{var f;if(r===d&&a){let h=A.$getNodeByKey(d);if((f=h.isEmpty)!=null&&f.call(h))return t.dispatchCommand(Hf,{cardKey:d}),!0}r&&r!==d&&(_g(t,r),l(!1)),Lf(t,d),o(d),s(!1)},A.COMMAND_PRIORITY_LOW),t.registerCommand(Aa,({cardKey:d,focusEditor:f})=>{var h;r&&r!==d&&_g(t,r),Lf(t,d),o(d);let g=A.$getNodeByKey(d);(h=g.hasEditMode)!=null&&h.call(g)&&s(!0)},A.COMMAND_PRIORITY_LOW),t.registerCommand(X_,({cardKey:d})=>{_g(t,d),o(null),s(!1),l(!1)},A.COMMAND_PRIORITY_LOW),t.registerCommand(Hf,({cardKey:d,direction:f="forward"})=>{let h=A.$getNodeByKey(d),g=h.getPreviousSibling(),m=h.getNextSibling();if(f==="backward"&&g)if(A.$isDecoratorNode(g)){let b=A.$createNodeSelection();b.add(g.getKey()),A.$setSelection(b)}else g.selectEnd?g.selectEnd():h.selectPrevious();else if(m)if(A.$isDecoratorNode(m)){let b=A.$createNodeSelection();b.add(m.getKey()),A.$setSelection(b)}else m.selectStart?m.selectStart():h.selectNext();else{let b=A.$createParagraphNode();A.$getRoot().append(b),b.select()}return h.remove(),t.getRootElement().focus(),!0},A.COMMAND_PRIORITY_LOW),t.registerCommand(A.KEY_DOWN_COMMAND,d=>!!Q8(d),A.COMMAND_PRIORITY_LOW),t.registerCommand(A.KEY_ENTER_COMMAND,d=>{var f,h;if(r&&(d.metaKey||d.ctrlKey)){let g=A.$getNodeByKey(r);if((f=g.hasEditMode)!=null&&f.call(g)){if(d.preventDefault(),a){if(t.getRootElement().focus({preventScroll:!0}),(h=g.isEmpty)!=null&&h.call(g)){if(A.$getRoot().getLastChild().is(g)){let m=A.$createParagraphNode();A.$getRoot().append(m),m.select()}else Lf(t,r),t.dispatchCommand(A.KEY_ARROW_DOWN_COMMAND);g.remove()}else Lf(t,r);s(!1)}else s(!0);return!0}}if(!d._fromNested&&document.activeElement!==t.getRootElement())return!0;if(!i&&r){d.preventDefault();let g=A.$getNodeByKey(r),m=A.$createParagraphNode();return g.insertAfter(m),m.select(),!0}if(!i){let g=A.$getSelection(),m=g?.getNodes()[0];if(A.$isTextNode(m)){let b=m.getTextContent();if(b.match(/^```(\w{1,10})?/)){d.preventDefault();let x=b.replace(/^```/,""),_=m.getTopLevelElement().insertAfter(W7({language:x,_openInEditMode:!0}));m.getTopLevelElement().remove();let O=A.$createNodeSelection();return O.add(_.getKey()),A.$setSelection(O),!0}}}},A.COMMAND_PRIORITY_LOW),t.registerCommand(A.KEY_ARROW_UP_COMMAND,d=>{let f=A.$getSelection();if(d!=null&&d.shiftKey){if(A.$isRangeSelection(f)){let h=f.anchor.getNode();if(!A.$isRootNode(h)){h=h.getTopLevelElement();let g=f.focus.getNode().getTopLevelElement(),m=g.getTopLevelElement().getPreviousSibling();if(A.$isTextNode(g)&&A.$isTextNode(m))return!1;if(A.$isDecoratorNode(h)||A.$isDecoratorNode(m))return f.anchor.offset===0?(f.focus.set("root",g.getIndexWithinParent()-1,"element"),f.anchor.set("root",h.getIndexWithinParent(),"element")):(f.focus.set("root",g.getIndexWithinParent(),"element"),f.anchor.set("root",h.getIndexWithinParent()+1,"element")),d.preventDefault(),!0}if(A.$isRootNode(h))return f.focus.offset>0&&f.focus.set("root",f.focus.offset-1,"element"),d.preventDefault(),!0}return!1}if(d!=null&&d._fromCaptionEditor&&Lf(t,r),document.activeElement!==t.getRootElement())return!0;if(A.$isNodeSelection(f)){let h=f.getNodes()[0].getPreviousSibling();return!h&&n?(f.clear(),n(),!0):A.$isDecoratorNode(h)?(Wr(h),!0):(d.preventDefault(),h.selectEnd(),!0)}if(A.$isRangeSelection(f)&&f.isCollapsed()){let h=f.anchor.getNode().getTopLevelElement(),g=window.getSelection();if(n&&RU(f))return n(),!0;let m=h?.getTextContent().trim()===""&&f.anchor.offset===0,b=f.anchor.offset===0&&f.focus.offset===0;if(m||b){let x=h.getPreviousSibling();if(A.$isDecoratorNode(x))return Wr(x),!0}else if(FU(g,W8)){let x=h.getPreviousSibling();if(A.$isDecoratorNode(x))return Wr(x),!0}}return!1},A.COMMAND_PRIORITY_LOW),t.registerCommand(A.KEY_ARROW_DOWN_COMMAND,d=>{let f=A.$getSelection();if(d!=null&&d.shiftKey){if(A.$isRangeSelection(f)){let h=f.anchor.getNode();if(!A.$isRootNode(h)){h=h.getTopLevelElement();let g=f.focus.getNode().getTopLevelElement(),m=g.getTopLevelElement().getNextSibling();if(A.$isTextNode(g)&&A.$isTextNode(m))return!1;if(A.$isDecoratorNode(h)||A.$isDecoratorNode(m))return f.anchor.offset===h.getTextContentSize()?(f.anchor.set("root",h.getIndexWithinParent()+1,"element"),f.focus.set("root",g.getIndexWithinParent()+2,"element")):(f.anchor.set("root",h.getIndexWithinParent(),"element"),f.focus.set("root",g.getIndexWithinParent()+1,"element")),d.preventDefault(),!0}if(A.$isRootNode(h))return f.focus.offset<=h.getLastChildOrThrow().getIndexWithinParent()&&f.focus.set("root",f.focus.offset+1,"element"),d.preventDefault(),!0}return!1}if(d!=null&&d._fromCaptionEditor&&Lf(t,r),document.activeElement!==t.getRootElement())return!0;if(A.$isNodeSelection(f)){let h=f.getNodes()[0],g=h.getNextSibling();if(!g){let m=A.$createParagraphNode();return h.insertAfter(m),m.select(),!0}return A.$isDecoratorNode(g)?(Wr(g),!0):(d?.preventDefault(),g.selectStart(),!0)}if(A.$isRangeSelection(f)&&f.isCollapsed()){let h=f.anchor.getNode().getTopLevelElement(),g=window.getSelection(),m=Uoe(g.anchorNode),b=h?.getTextContent().trim()===""&&f.anchor.offset===0,x=g.rangeCount!==0&&g.anchorNode===m&&g.anchorOffset===m.children.length-1&&g.focusOffset===m.children.length-1;if(b||x){let _=h.getNextSibling();if(A.$isDecoratorNode(_))return Wr(_),!0}else{let _=g.getRangeAt(0).cloneRange().getClientRects();if(_.length>0){let O=_.length>1?_[1]:_[0],S=m.getBoundingClientRect();if(Math.abs(O.bottom-S.bottom){if(document.activeElement!==t.getRootElement())return!0;let f=A.$getSelection();if(n){if(A.$isNodeSelection(f)){if(!f.getNodes()[0].getPreviousSibling())return d.preventDefault(),f.clear(),n?.(),!0}else if(RU(f))return d.preventDefault(),n(),!0}if(!A.$isNodeSelection(f))return!1;let h=f.getNodes()[0],g;return Yf(h)?g=h.getPreviousSibling():g=h.getTopLevelElement().getPreviousSibling(),A.$isDecoratorNode(g)?(d.preventDefault(),Wr(g),!0):!1},A.COMMAND_PRIORITY_LOW),t.registerCommand(A.KEY_ARROW_RIGHT_COMMAND,d=>{if(document.activeElement!==t.getRootElement())return!0;let f=A.$getSelection();if(!A.$isNodeSelection(f))return!1;let h=f.getNodes(),g=h[h.length-1],m;return Yf(g)?m=g.getNextSibling():m=g.getTopLevelElement().getNextSibling(),A.$isDecoratorNode(m)?(d.preventDefault(),Wr(m),!0):!1},A.COMMAND_PRIORITY_LOW),t.registerCommand(A.KEY_MODIFIER_COMMAND,d=>{let{altKey:f,ctrlKey:h,metaKey:g,shiftKey:m,code:b,key:x}=d,_=x==="ArrowUp"||d.keyCode===38,O=x==="ArrowDown"||d.keyCode===40;if(g&&(_||O)){let S=A.$getSelection(),E=A.$isNodeSelection(S),T=A.$isDecoratorNode(A.$getRoot().getFirstChild()),M=A.$isDecoratorNode(A.$getRoot().getLastChild());if(E||T||M){if(O){d.preventDefault();let I=A.$getRoot().getLastChild();return A.$isDecoratorNode(I)?(Wr(I),!0):(I.selectEnd(),!0)}if(_){d.preventDefault();let I=A.$getRoot().getFirstChild();return A.$isDecoratorNode(I)?(Wr(I),!0):(I.selectStart(),!0)}}}if(h&&b==="KeyQ"){d.preventDefault();let S=A.$getSelection();if(A.$isRangeSelection(S)){let E=S.anchor.getNode().getTopLevelElement();A.$isParagraphNode(E)?Ui.$setBlocksType(S,()=>Jt.$createQuoteNode()):Jt.$isQuoteNode(E)?Ui.$setBlocksType(S,()=>ute()):zH(E)&&Ui.$setBlocksType(S,()=>A.$createParagraphNode())}}if((h||g)&&f&&b==="KeyH")return d.preventDefault(),t.dispatchCommand(A.FORMAT_TEXT_COMMAND,"highlight"),!0;if(h&&m&&b==="KeyK")return t.dispatchCommand(A.FORMAT_TEXT_COMMAND,"code"),!0;if(h&&f&&b==="KeyU")return t.dispatchCommand(A.FORMAT_TEXT_COMMAND,"strikethrough"),!0;if(h&&f&&x.match(/^[1-6]$/)){d.preventDefault();let S=A.$getSelection();A.$isRangeSelection(S)&&Ui.$setBlocksType(S,()=>Jt.$createHeadingNode(`h${x}`))}if(h&&b==="KeyL"){d.preventDefault();let S=A.$getSelection();if(A.$isRangeSelection(S)){let E=S.anchor.getNode().getTopLevelElement();si.$isListNode(E)?t.update(()=>{let T=A.$createParagraphNode();Ui.$setBlocksType(S,()=>T),T.setIndent(0)}):f?t.dispatchCommand(si.INSERT_ORDERED_LIST_COMMAND,void 0):t.dispatchCommand(si.INSERT_UNORDERED_LIST_COMMAND,void 0)}}return!1},A.COMMAND_PRIORITY_LOW),t.registerCommand(A.KEY_BACKSPACE_COMMAND,d=>{if(document.activeElement!==t.getRootElement())return!0;if(!i&&r)return d.preventDefault(),t.dispatchCommand(Hf,{cardKey:r,direction:"backward"}),!0;let f=A.$getSelection();if(A.$isRangeSelection(f)&&f.isCollapsed()){let h=f.anchor.getNode(),g=h.getTopLevelElement(),m=g.getPreviousSibling(),b=f.anchor.offset===0&&f.focus.offset===0;if(b&&si.$isListItemNode(h)&&h.getIndent()===0&&h.isEmpty())return d.preventDefault(),t.dispatchCommand(A.INSERT_PARAGRAPH_COMMAND),!0;if(b&&Mi.$isLinkNode(h.getPreviousSibling())){let O=h.getPreviousSibling().getLastDescendant();if(A.$isTextNode(O))return O.spliceText(O.getTextContentSize(),1,"",!0),!0}if(A.$isParagraphNode(h)&&h.isEmpty()&&A.$isDecoratorNode(m))return g.remove(),Wr(m),!0;if(b&&si.$isListItemNode(h.getParent())){let O=h.getParent();if(O.getIndent()===0){d.preventDefault();let S=A.$createParagraphNode();return S.append(...O.getChildren()),O.replace(S),!0}}let x=h.getParent();if(b&&(Jt.$isQuoteNode(x)||zH(x))){let O=A.$createParagraphNode();return x.getChildren().forEach(S=>{O.append(S)}),x.replace(O),O.selectStart(),d.preventDefault(),!0}if(b&&A.$isDecoratorNode(m)&&x===g&&x.getFirstChild().is(h))return d.preventDefault(),m.remove(),!0;let _=h.getTextContentSize();if(f.anchor.offset===_&&f.focus.offset===_&&A.$isTextNode(h)){let O=h.getTextContent();for(let S of Object.keys(sV))if(h.hasFormat(S)){let E=sV[S],T=O;return S==="code"&&O.match(/{.*?}(?![A-Za-z\s])/)||(T=E+T+E),T=T.slice(0,-1),h.setFormat(0),h.setTextContent(T),f.anchor.offset=f.anchor.offset+T.length-O.length,f.focus.offset=f.focus.offset+T.length-O.length,d.preventDefault(),!0}}}return!1},A.COMMAND_PRIORITY_LOW),t.registerCommand(A.KEY_DELETE_COMMAND,d=>{if(document.activeElement!==t.getRootElement())return!0;if(!i&&r)return d.preventDefault(),t.dispatchCommand(Hf,{cardKey:r,direction:"forward"}),!0;let f=A.$getSelection();if(A.$isRangeSelection(f)&&f.isCollapsed()){let h=f.anchor,g=h.getNode(),m=g.getTopLevelElement(),b=m.getNextSibling();if(m?.getTextContent().trim()===""&&f.anchor.offset===0&&A.$isDecoratorNode(b))return d.preventDefault(),m.remove(),Wr(b),!0;if((h.type==="element"&&A.$isElementNode(g)&&h.offset===g.getChildrenSize()||h.type==="text"&&h.offset===g.getTextContentSize()&&h.getNode().getParent().getLastChild().is(h.getNode()))&&A.$isDecoratorNode(b))return d.preventDefault(),b.remove(),!0}return!1},A.COMMAND_PRIORITY_LOW),t.registerCommand(A.DELETE_LINE_COMMAND,d=>{if(r&&document.activeElement===t.getRootElement()&&!i)return t.dispatchCommand(Hf,{cardKey:r,direction:d?"backward":"forward"}),!0;let f=A.$getSelection();if(A.$isRangeSelection(f)&&f.isCollapsed()){let h=f.anchor.getNode(),g=h.getTopLevelElement(),m=g.getPreviousSibling(),b=g.getNextSibling(),x=d?m:b,_=window.getSelection(),O=FU(_,W8);if(A.$isDecoratorNode(x)&&O)return d&&A.$isLineBreakNode(h.getNextSibling())?(h.remove(),!0):(g.remove(),Wr(x),!0)}return!1},A.COMMAND_PRIORITY_LOW),t.registerCommand(A.KEY_TAB_COMMAND,d=>{if(document.activeElement!==t.getRootElement())return!0;if(d.shiftKey&&n){let f=A.$getSelection();if(A.$isNodeSelection(f))return d.preventDefault(),f.clear(),n(),!0;let h;if(f.isCollapsed()){let g=f.anchor.getNode();h=A.$isTextNode(g)?[g.getParent()]:[g]}else h=f.getNodes();if(!h.some(g=>g.getIndent&&g.getIndent()>0))return d.preventDefault(),n(),!0}if(!i){let f=A.$getSelection().getNodes()[0];if(A.$isTextNode(f)){let h=f.getTextContent();if(h.match(/^```(\w{1,10})?/)){d.preventDefault();let g=h.replace(/^```/,""),m=f.getTopLevelElement().insertAfter(W7({language:g,_openInEditMode:!0}));f.getTopLevelElement().remove();let b=A.$createNodeSelection();return b.add(m.getKey()),A.$setSelection(b),!0}}if(si.$isListItemNode(f)||A.$isTextNode(f)&&si.$isListItemNode(f.getParent())){d.preventDefault();let h=A.$isTextNode(f)?f.getParent():f,g=h.getIndent();return d.shiftKey?g>0&&h.setIndent(g-1):h.setIndent(g+1),!0}return d.preventDefault(),!0}},A.COMMAND_PRIORITY_LOW),t.registerCommand(A.KEY_ESCAPE_COMMAND,d=>(r&&a&&(t._parentEditor||t).dispatchCommand(xu,{cardKey:r}),t._parentEditor&&t._parentEditor.getRootElement().focus(),d.preventDefault(),!0),A.COMMAND_PRIORITY_LOW),t.registerCommand(A.PASTE_COMMAND,d=>{var f;if(document.activeElement!==t.getRootElement()&&!i)return!!Q8(d);let h=d.clipboardData;if(!h)return!1;let g=h.getData(MD),m=g?.match(/^(https?:\/\/[^\s]+)$/);if(m){let S=(f=A.$getSelection())==null?void 0:f.anchor.getNode();return S&&S.getTextContent().startsWith("/")?!1:(d.preventDefault(),t.dispatchCommand(eP,{linkMatch:m}),!0)}let b=h.getData(ND);if(g&&!b)return d?.preventDefault(),t.dispatchCommand(TD,{text:g,allowBr:!0}),!0;let x=h.files?Array.from(h.files):[],_=x.filter(S=>S.type.startsWith("image/")),O=b&&!!b.match(/<\s*img\b/gi);return _.length===1&&O?(d.preventDefault(),t.dispatchCommand(Jt.DRAG_DROP_PASTE,x),!0):!1},A.COMMAND_PRIORITY_LOW),t.registerCommand(eP,({linkMatch:d})=>{let f=A.$getSelection(),h=f.getTextContent(),g=f.anchor.getNode().getTextContent();if(h.length>0){let m=d[1];return A.$isRangeSelection(f)&&t.dispatchCommand(Mi.TOGGLE_LINK_COMMAND,{url:m,rel:null}),!0}if(g.length>0||c.current===!0){let m=d[1],b=Mi.$createLinkNode(m),x=A.$createTextNode(m);b.append(x);let _=A.$createTextNode(" ");return A.$insertNodes([b,_]),_.remove(),!0}if(h.length===0&&g.length===0){let m=d[1],b=zoe({url:m});return t.dispatchCommand(Dn,{cardNode:b,createdWithUrl:!0}),!0}return!1},A.COMMAND_PRIORITY_LOW),t.registerCommand(A.CLICK_COMMAND,d=>{if(d.target.matches('[data-lexical-decorator="true"]')){d.preventDefault();let f=A.$getNearestNodeFromDOMNode(d.target);return Lf(t,f.getKey()),!0}return!1},A.COMMAND_PRIORITY_LOW),t.registerCommand(A.CUT_COMMAND,d=>!!Q8(d),A.COMMAND_PRIORITY_LOW),t.registerCommand(PD,({cardKey:d})=>(t.update(()=>{var f;let h=A.$getNodeByKey(d);OQe(h)?(l(!0),r||t.dispatchCommand(xu,{cardKey:d,focusEditor:!0})):(f=h?.hasEditMode)!=null&&f.call(h)&&!a?(l(!0),t.dispatchCommand(Aa,{cardKey:d,focusEditor:!0})):a&&_g(t,d)}),!0),A.COMMAND_PRIORITY_LOW),t.registerCommand(FQe,({cardKey:d})=>(t.update(()=>{l(!1),t.dispatchCommand(X_,{cardKey:d})}),!0),A.COMMAND_PRIORITY_LOW))),N.default.useEffect(()=>gae.registerDefaultTransforms(t),[t]),null}function WQe({containerElem:t=document.querySelector(".koenig-editor"),cursorDidExitAtTop:e,isNested:n}){let[i]=Oe.useLexicalComposerContext();return QQe({editor:i,containerElem:t,cursorDidExitAtTop:e,isNested:n})}var Jn=({nodeKey:t,width:e,wrapperStyle:n,IndicatorIcon:i,children:r})=>{let{cardConfig:o}=N.default.useContext(ut),[a]=Oe.useLexicalComposerContext(),[s,l]=N.default.useState(null),[c,d]=N.default.useState(null),[f,h]=N.default.useState(e||"regular"),g=N.default.useRef(null),m=N.default.useRef(!1),{selectedCardKey:b,isEditingCard:x,isDragging:_}=Kh(),O=b===t,S=O&&x,E=N.default.useCallback(I=>{I.preventDefault(),I.stopPropagation(),a.dispatchCommand(PD,{cardKey:t})},[a,t]);N.default.useLayoutEffect(()=>{a.getEditorState().read(()=>{let I=A.$getNodeByKey(t);l(I.getType())})},[]),N.default.useEffect(()=>ct.mergeRegister(a.registerCommand(A.CLICK_COMMAND,I=>{var F;if(!m.current&&g.current.contains(I.target)){let W=A.$getNodeByKey(t),Z=!W,j=I.target.closest('[data-kg-allow-clickthrough="false"]'),H=I.target.closest("[data-kg-settings-panel]");return O&&(F=W?.hasEditMode)!=null&&F.call(W)&&!S&&!j&&!H?a.dispatchCommand(Aa,{cardKey:t,focusEditor:!Z}):O||a.dispatchCommand(xu,{cardKey:t,focusEditor:!Z}),Z?void 0:!0}return m.current===!0?(m.current=!1,!0):(m.current=!1,!1)},A.COMMAND_PRIORITY_LOW))),N.default.useEffect(()=>{var I;(I=g.current)!=null&&I.parentElement&&(f==="regular"?delete g.current.parentElement.dataset.kgCardWidth:(f!==e&&h(f),g.current.parentElement.dataset.kgCardWidth=e))},[f,g,e]);let T=I=>{I?a.dispatchCommand(Aa,{cardKey:t}):O||a.dispatchCommand(xu,{cardKey:t})};N.default.useEffect(()=>{let I=g.current;function F(W){if(!O&&!S){a.dispatchCommand(xu,{cardKey:t}),m.current=!0;let Z=W.target.tagName,j=["INPUT","TEXTAREA"],H=!!W.target.closest("[data-kg-allow-clickthrough]");!j.includes(Z)&&!H&&W.preventDefault()}}return I?.addEventListener("mousedown",F),()=>{I?.removeEventListener("mousedown",F)}},[a,O,S,t,g]);let M=!1;return a.getEditorState().read(()=>{var I;let F=A.$getNodeByKey(t);M=(I=F?.getIsVisibilityActive)==null?void 0:I.call(F)}),w.jsx(vn.Provider,{value:{isSelected:O,captionHasFocus:c,isEditing:S,cardWidth:f,setCardWidth:h,setCaptionHasFocus:d,setEditing:T,nodeKey:t,cardContainerRef:g},children:w.jsx(IA,{ref:g,cardType:s,cardWidth:e,feature:o?.feature,IndicatorIcon:i,isDragging:_,isEditing:S,isSelected:O,isVisibilityActive:M,wrapperStyle:n,onIndicatorClick:E,children:r})})};function AD(t){let e=t._nodes,n=[];for(let[i,{klass:r}]of e)r.kgMenu&&n.push([i,r]);return n}var K4=A.createCommand();function lV(t,e){let n=t.type;return Object.keys(e).find(i=>e[i].includes(n))}function BQe(t,e){let n=t[Symbol.iterator]();return new Promise((i,r)=>{let o=[],a=()=>{let{done:s,value:l}=n.next();if(s)return i({processed:o});let c=new FileReader;c.addEventListener("error",r),c.addEventListener("load",()=>{let d=c.result,f=lV(l,e);typeof d=="string"&&o.push({type:f,file:l}),a()}),lV(l,e)?c.readAsDataURL(l):(console.error("unsupported file type"),a())};a()})}async function HQe(t,e){let n=AD(t),i={};for(let[r,o]of n)r&&o.uploadType&&(i[r]=e[o.uploadType].mimeTypes);return{acceptableMimeTypes:i}}function ZQe(){let[t]=Oe.useLexicalComposerContext(),{fileUploader:e}=N.default.useContext(ut),n=N.default.useCallback(async i=>{if(!e)return;let{acceptableMimeTypes:r}=await HQe(t,e.fileTypes),{processed:o}=await BQe(i,r);o.forEach(a=>{t.dispatchCommand(K4,a)})},[t,e]);return N.default.useEffect(()=>t.registerCommand(A.DROP_COMMAND,i=>{let r=Array.from(i.dataTransfer.files);return r.length>0?(i.preventDefault(),i.stopPropagation(),t.dispatchCommand(Jt.DRAG_DROP_PASTE,r),!0):!1},A.COMMAND_PRIORITY_HIGH),[t]),N.default.useEffect(()=>{let i=t.getRootElement(),r=s=>{!s.dataTransfer||s.target.closest("[data-kg-card]")||(s.stopPropagation(),s.preventDefault())},o=s=>{s.preventDefault()},a=s=>{s.dataTransfer.getData("text/html")&&(s.preventDefault(),t.update(()=>{t.focus();let l=A.$getSelection();l||(A.$getRoot().selectEnd(),l=A.$getSelection()),yh.$insertDataTransferForRichText(s.dataTransfer,l,t)}))};return i.addEventListener("dragover",r),i.addEventListener("dragleave",o),i.addEventListener("drop",a),()=>{i.removeEventListener("dragover",r),i.removeEventListener("dragleave",o),i.removeEventListener("drop",a)}},[t]),N.default.useEffect(()=>t.registerCommand(Jt.DRAG_DROP_PASTE,async i=>{try{return t.focus(),await n(i)}catch(r){console.error(r)}},A.COMMAND_PRIORITY_LOW),[t,n]),null}function qQe({enabled:t=!0,canDrop:e,onDrop:n,onDropEnd:i,getDraggableInfo:r,getIndicatorPosition:o,draggableSelector:a,droppableSelector:s}){let l=N.default.useContext(ut),[c,d]=N.default.useState(null),[f,h]=N.default.useState(!1),g=N.default.useRef(null),m=N.default.useCallback(M=>{e(M)?g.current.enableDrag():g.current.disableDrag()},[e]),b=N.default.useCallback(()=>{h(!1)},[h]),x=N.default.useCallback(M=>{h(e(M))},[h,e]),_=N.default.useCallback(()=>{h(!1)},[h]),O=N.default.useCallback(M=>n?.(M)||!1,[n]),S=N.default.useCallback((M,I)=>{i?.(M,I)},[i]),E=N.default.useCallback(M=>o?.(M)||!1,[o]),T=N.default.useCallback(M=>r?.(M)||{},[r]);return N.default.useEffect(()=>{var M,I;t?(M=g.current)==null||M.enableDrag():(I=g.current)==null||I.disableDrag()},[t,c]),N.default.useEffect(()=>{!c||!l.dragDropHandler||(g.current=l.dragDropHandler.registerContainer(c,{draggableSelector:a,droppableSelector:s,isDragEnabled:t,onDragStart:m,onDragEnd:b,onDragEnterContainer:x,onDragLeaveContainer:_,getDraggableInfo:T,getIndicatorPosition:E,onDrop:O,onDropEnd:S}))},[T,E,O,S,c,a,s,t,l.dragDropHandler,b,x,_,m]),{setRef:d,isDraggedOver:f}}function Ws({handleDrop:t,disabled:e=!1}){let[n,i]=(0,N.useState)(null),[r,o]=(0,N.useState)(!1);return(0,N.useEffect)(()=>{let a=n;if(!a||e)return;a.addEventListener("dragenter",s),a.addEventListener("dragover",l),a.addEventListener("dragleave",c),a.addEventListener("drop",d);function s(h){f(h),o(!0)}function l(h){f(h),o(!0)}function c(h){f(h),o(!1)}function d(h){f(h);let{dataTransfer:g}=h;g.files&&g.files.length>0&&t(Array.from(g.files)),o(!1)}function f(h){h.preventDefault(),h.stopPropagation()}return()=>{a.removeEventListener("dragenter",s),a.removeEventListener("dragover",l),a.removeEventListener("dragleave",c),a.removeEventListener("drop",d)}},[t,n,e]),{setRef:i,isDraggedOver:r}}function J4({config:t,disabled:e=!1}){let[n,i]=(0,N.useState)(!1),[r,o]=(0,N.useState)(!1),a=(0,N.useRef)(!1),s=!e&&n&&r;(0,N.useEffect)(()=>{let c=t?.jsUrl;if(c){if(window.pintura){i(!0);return}try{let d=new URL(c);import(`${d.protocol}//${d.host}${d.pathname}`).then(()=>{i(!0)}).catch(()=>{})}catch{}}},[t?.jsUrl]),(0,N.useEffect)(()=>{let c=t?.cssUrl;if(c)try{if(document.querySelector(`link[href="${c}"]`))o(!0);else{let d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.href=c,d.onload=()=>{o(!0)},document.head.appendChild(d)}}catch{}},[t?.cssUrl]);let l=(0,N.useCallback)(({image:c,handleSave:d})=>{if(a.current=!1,wi("Image Edit Button Clicked",{location:"editor"}),c&&s){let f=new URL(c);f.searchParams.has("v")||f.searchParams.set("v",Date.now());let h=f.href,g=window.pintura.openDefaultEditor({src:h,enableTransparencyGrid:!0,util:"crop",utils:["crop","filter","finetune","redact","annotate","trim","frame","resize"],frameOptions:[[void 0,m=>m.labelNone],["solidSharp",m=>m.frameLabelMatSharp],["solidRound",m=>m.frameLabelMatRound],["lineSingle",m=>m.frameLabelLineSingle],["hook",m=>m.frameLabelCornerHooks],["polaroid",m=>m.frameLabelPolaroid]],cropSelectPresetFilter:"landscape",cropSelectPresetOptions:[[void 0,"Custom"],[1,"Square"],[2/1,"2:1"],[3/2,"3:2"],[4/3,"4:3"],[16/10,"16:10"],[16/9,"16:9"],[1/2,"1:2"],[2/3,"2:3"],[3/4,"3:4"],[10/16,"10:16"],[9/16,"9:16"]],locale:{labelButtonExport:"Save and close"},previewPad:!0,willClose:()=>a.current});g.on("loaderror",()=>{}),g.on("process",m=>{d(m.dest),wi("Image Edit Saved",{location:"editor"})})}},[s]);return(0,N.useEffect)(()=>{let c=d=>{d.target.closest('.PinturaModal button[title="Close"]')&&(a.current=!0)};return window.addEventListener("click",c,{capture:!0}),()=>{window.removeEventListener("click",c)}},[]),{isEnabled:s,openEditor:l}}var UQe=td,VQe=B4,YQe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,XQe=/^\w*$/;function GQe(t,e){if(UQe(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||VQe(t)?!0:XQe.test(t)||!YQe.test(t)||e!=null&&t in Object(e)}var KQe=GQe,xae=xee,JQe="Expected a function";function $D(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(JQe);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=t.apply(this,i);return n.cache=o.set(r,a)||o,a};return n.cache=new($D.Cache||xae),n}$D.Cache=xae;var eWe=$D,tWe=eWe,nWe=500;function iWe(t){var e=tWe(t,function(i){return n.size===nWe&&n.clear(),i}),n=e.cache;return e}var rWe=iWe,oWe=rWe,aWe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sWe=/\\(\\)?/g,lWe=oWe(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(aWe,function(n,i,r,o){e.push(r?o.replace(sWe,"$1"):i||n)}),e}),cWe=lWe,dWe=td,uWe=KQe,fWe=cWe,hWe=H4;function pWe(t,e){return dWe(t)?t:uWe(t,e)?[t]:fWe(hWe(t))}var eC=pWe,gWe=B4;function mWe(t){if(typeof t=="string"||gWe(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var DD=mWe,vWe=eC,yWe=DD;function bWe(t,e){e=vWe(e,t);for(var n=0,i=e.length;t!=null&&n0&&n(s)?e>1?_ae(s,e-1,n,i,r):eBe(r,s):i||(r[r.length]=s)}return r}var nBe=_ae,iBe=nBe;function rBe(t){var e=t==null?0:t.length;return e?iBe(t,1):[]}var oBe=rBe;function aBe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var sBe=aBe,lBe=sBe,fV=Math.max;function cBe(t,e,n){return e=fV(e===void 0?t.length-1:e,0),function(){for(var i=arguments,r=-1,o=fV(i.length-e,0),a=Array(o);++r0){if(++e>=bBe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var _Be=xBe,OBe=yBe,SBe=_Be,CBe=SBe(OBe),EBe=CBe,TBe=oBe,MBe=dBe,NBe=EBe;function PBe(t){return NBe(MBe(t,void 0,TBe),t+"")}var ABe=PBe,$Be=YWe,DBe=ABe,IBe=DBe(function(t,e){return t==null?{}:$Be(t,e)}),LBe=IBe,tP=Da(LBe);function nP(t){return new URL(t).pathname.match(/\/([^/]*)$/)[1]}function jBe({images:t,updateImages:e,isSelected:n=!1,maxImages:i=9,disabled:r=!1}){let o=N.default.useContext(ut),[a,s]=N.default.useState(null),[l,c]=N.default.useState(!1),d=N.default.useRef(null),f=N.default.useRef(!1),h=T=>{(T.type==="image"||T.cardName==="image")&&T.dataset.src&&t.length!==i&&d.current.enableDrag()},g=()=>{c(!1)},m=()=>{c(!0)},b=()=>{c(!1)},x=T=>{if(T.type!=="image"&&T.cardName!=="image")return!1;let M=[...t],{insertIndex:I}=T,F=Array.from(a.querySelectorAll("[data-image]")).indexOf(T.element);if(M.length||(I=0),E(F,I)){if(F===-1){let{dataset:W}=T,Z=T.element.querySelector(`img[src="${W.src}"]`);W.width=W.width||Z.naturalWidth,W.height=W.height||Z.naturalHeight,W.fileName=W?.fileName||nP(W.src),M.splice(I,0,W)}else{let W=M.find(j=>j.src===T.dataset.src),Z=Fj!==W),M.splice(I+Z,0,W)}return e(M),d.current.refresh(),f.current=!0,!0}return!1},_=(T,M)=>{if(f.current||!M){f.current=!1;return}let I=t.find(F=>F.src===T.dataset.src);if(I){let F=t.filter(W=>W!==I);e(F),d.current.refresh()}},O=T=>{let M=T.querySelector("img").getAttribute("src"),I=t.find(W=>W.src===M)||t.find(W=>W.previewSrc===M),F=I&&tP(I,["fileName","src","row","width","height","caption"]);return I?{type:"image",dataset:F}:{}},S=(T,M,I)=>{if(T.type!=="image"&&T.cardName!=="image")return!1;let F=M.closest("[data-row]"),W=Array.from(a.querySelectorAll("[data-image]")),Z=W.indexOf(T.element),j=W.indexOf(M);if(F&&E(Z,j,I)){let H=Array.from(F.querySelectorAll("[data-image]")),X=H.indexOf(M),B=j,R=[],U=[];return H.forEach((V,K)=>{KX&&U.push(V)}),I.match(/right/)&&(B+=1),{direction:"horizontal",position:I.match(/left/)?"left":"right",beforeElems:R,afterElems:U,insertIndex:B}}else return!1},E=(T,M,I="")=>T===-1?!0:T===M||typeof M>"u"?!1:(I.match(/left/)&&(M-=1),I.match(/right/)&&(M+=1),M!==T);return N.default.useEffect(()=>{var T,M;n?(T=d.current)==null||T.enableDrag():(M=d.current)==null||M.disableDrag()},[n,a]),N.default.useEffect(()=>{let T=a;if(!(!T||!(o!=null&&o.dragDropHandler)))return d.current=o.dragDropHandler.registerContainer(T,{draggableSelector:"[data-image]",droppableSelector:"[data-image]",isDragEnabled:!r&&t.length>0,onDragStart:h,onDragEnd:g,onDragEnterContainer:m,onDragLeaveContainer:b,getDraggableInfo:O,getIndicatorPosition:S,onDrop:x,onDropEnd:_}),()=>{d.current&&(d.current.destroy(),d.current=null)}},[a,t,o.dragDropHandler]),{setContainerRef:s,isDraggedOver:l}}function Oae({index:t,images:e,deleteImage:n,isDragging:i}){let r=e.map((o,a)=>{let s=e.length===1?"single":a===0?"first":a===e.length-1?"last":"middle";return w.jsx(Sae,{deleteImage:n,image:o,isDragging:i,position:s},o.src)});return w.jsx("div",{className:`flex flex-row justify-center ${t!==0&&"mt-4"}`,"data-row":t,children:r})}function Sae({image:t,deleteImage:e,position:n,isDragging:i}){let r={flex:`${(t.width||1)/(t.height||1)} 1 0%`},o=[],a=[];switch(n){case"first":o=["pr-2"],a=["mr-2"];break;case"middle":o=["pl-2","pr-2"],a=["ml-2","mr-2"];break;case"last":o=["pl-2"],a=["ml-2"];break}return w.jsxs("div",{className:`group/image relative ${o.join(" ")}`,"data-testid":"gallery-image",style:r,"data-image":!0,children:[w.jsx("img",{alt:t.alt,className:"pointer-events-none block size-full",height:t.height,src:t.previewSrc||t.src,width:t.width}),i?null:w.jsx("div",{className:`pointer-events-none invisible absolute inset-0 bg-gradient-to-t from-black/0 via-black/5 to-black/30 p-3 opacity-0 transition-all group-hover/image:visible group-hover/image:opacity-100 ${a.join(" ")}`,children:w.jsx("div",{className:"flex flex-row-reverse",children:w.jsx(qc,{Icon:tp,label:"Delete",onClick:()=>e(t)})})})]})}function Cae({images:t,deleteImage:e,reorderHandler:n,isDragging:i}){let r=[],o=t.length,a=function(l){return o>1&&o%3===1&&l===o-2};t.forEach((l,c)=>{let d=l.row||0;a(c)&&(d=d+1),r[d]||(r[d]=[]),r[d].push(l)});let s=r.map((l,c)=>w.jsx(Oae,{deleteImage:e,images:l,index:c,isDragging:i},c));return w.jsx("div",{ref:n.setContainerRef,className:"not-kg-prose flex flex-col","data-gallery":!0,children:s})}function Eae({openFilePicker:t,isDraggedOver:e,reorderHandler:n}){return w.jsx(nf,{desc:"Click to select up to 9 images",filePicker:t,icon:"gallery",isDraggedOver:e,multiple:!0,placeholderRef:n.setContainerRef,size:"large"})}function Tae({progress:t}){let e={width:`${t?.toFixed(0)}%`};return w.jsx("div",{className:"absolute inset-0 flex min-w-full items-center justify-center overflow-hidden bg-white/50","data-testid":"gallery-progress",children:w.jsx(Ys,{bgStyle:"transparent",style:e})})}function RBe(){return w.jsx("div",{className:"bg-black-60 pointer-events-none absolute inset-0 flex items-center bg-black/60","data-kg-card-drag-text":!0,children:w.jsx("span",{className:"sans-serif fw7 f7 block w-full text-center font-bold text-white",children:"Drop to add up to 9 images"})})}function Mae({captionEditor:t,captionEditorInitialState:e,clearErrorMessage:n,deleteImage:i,filesDropper:r,errorMessage:o,fileInputRef:a,imageMimeTypes:s=[],images:l=[],isSelected:c,onFileChange:d,uploader:f={},reorderHandler:h={}}){let g=()=>{a.current.click()},{isLoading:m,progress:b}=f,{isDraggedOver:x}=r,{isDraggedOver:_}=h,O=x||_;return w.jsxs("figure",{children:[w.jsxs("div",{ref:r.setRef,className:"not-kg-prose relative","data-testid":"gallery-container",children:[l.length?w.jsx(Cae,{deleteImage:i,images:l,isDragging:O,reorderHandler:h}):w.jsx(Eae,{isDraggedOver:O,openFilePicker:g,reorderHandler:h}),m?w.jsx(Tae,{progress:b}):null,l.length&&x?w.jsx(RBe,{}):null,o&&!O?w.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/60","data-testid":"gallery-error",children:w.jsxs("span",{className:"center sans-serif f7 block bg-red px-2 font-bold text-white",children:[o,".",w.jsx("button",{className:"ml-2 cursor-pointer underline","data-testid":"clear-gallery-error",type:"button",onClick:n,children:"Dismiss"})]})}):null,w.jsx("form",{onChange:d,children:w.jsx("input",{ref:a,accept:s.join(","),hidden:!0,multiple:!0,name:"image-input",type:"file"})})]}),w.jsx(A0,{captionEditor:t,captionEditorInitialState:e,captionPlaceholder:"Type caption for gallery (optional)",dataTestId:"gallery-card-caption",isSelected:c})]})}Oae.propTypes={deleteImage:$.func,images:$.array,index:$.number,isDragging:$.bool};Sae.propTypes={deleteImage:$.func,image:$.object,position:$.string,isDragging:$.bool};Cae.propTypes={deleteImage:$.func,filesDropper:$.object,images:$.array,isDragging:$.bool,reorderHandler:$.object};Eae.propTypes={openFilePicker:$.func,isDraggedOver:$.bool,reorderHandler:$.object};Tae.propTypes={progress:$.number};Mae.propTypes={isSelected:$.bool,onFileChange:$.func,captionEditor:$.object,captionEditorInitialState:$.object,errorMessage:$.string,clearErrorMessage:$.func,deleteImage:$.func,fileInputRef:$.object,filesDropper:$.object,imageMimeTypes:$.array,images:$.array,uploader:$.object,reorderHandler:$.object};async function ip(t){let e=new Image;return new Promise((n,i)=>{e.onload=()=>{n({width:e.naturalWidth,height:e.naturalHeight})},e.onerror=i,e.src=t})}function FBe({nodeKey:t,captionEditor:e,captionEditorInitialState:n}){let[i]=Oe.useLexicalComposerContext(),{fileUploader:r,cardConfig:o}=N.default.useContext(ut),{isSelected:a}=N.default.useContext(vn),s=N.default.useRef(),[l,c]=N.default.useState(null),[d,f]=N.default.useState(!1),[h,g]=N.default.useState(()=>i.getEditorState().read(()=>A.$getNodeByKey(t).images)),m=jBe({images:h,updateImages:_,isSelected:a}),b=r.useFileUpload("image"),x=Ws({handleDrop:M});function _(Z){zy(Z),g(Z),O(Z)}function O(Z){i.update(()=>{A.$getNodeByKey(t).setImages(Z)})}let S=Z=>{let j=h.filter(H=>H.fileName!==Z.fileName);zy(j),g(j),O(j)},E=async Z=>{let j=h.length,H=iP-j,X=Array.prototype.slice.call(Z,0,H);if(X.length{let K=U.find(te=>te.fileName===V.fileName);if(!K){console.error("Uploaded image not found in images array. Filename:",V.fileName);return}K.src=V.url}),g(B),O(B)},T=async Z=>{let j=Z.target.files;if(!(!j||!j.length))return await E(j)};async function M(Z){await E(Z)}function I(Z){Z.preventDefault(),s.current.click()}let F=()=>{c(null)},W=!a||x.isDraggedOver||m.isDraggedOver||h.length<=0;return w.jsxs(w.Fragment,{children:[w.jsx(Mae,{captionEditor:e,captionEditorInitialState:n,clearErrorMessage:F,deleteImage:S,errorMessage:l,fileInputRef:s,filesDropper:x,imageMimeTypes:r.fileTypes.image.mimeTypes,images:h,isSelected:a,reorderHandler:m,uploader:b,onFileChange:T}),w.jsx(xt,{"data-kg-card-toolbar":"gallery",isVisible:d,children:w.jsx(pi,{onClose:()=>f(!1)})}),w.jsx(xt,{"data-kg-card-toolbar":"gallery",isVisible:!W,children:w.jsxs(gi,{children:[w.jsx(lt,{dataTestId:"add-gallery-image",icon:"add",isActive:!1,label:"Add images",onClick:I}),w.jsx(Kn,{hide:!o.createSnippet}),w.jsx(lt,{dataTestId:"create-snippet",hide:!o.createSnippet,icon:"snippet",isActive:!1,label:"Save as snippet",onClick:()=>f(!0)})]})})]})}var Nae=A.createCommand(),iP=9,zBe=3,pV=["row","src","width","height","alt","caption","fileName"];function zy(t){t.forEach((e,n)=>{e.row=Math.ceil((n+1)/zBe)-1})}var Hm=class extends Yw{constructor(e={},n){super(e,n),we(this,"__captionEditor"),we(this,"__captionEditorInitialState");let{caption:i}=e;Ni(this,"__captionEditor",{editor:e.captionEditor,nodes:Mr}),!e.captionEditor&&i&&Pi(this,"__captionEditor",`${i}`)}getIcon(){return lG}getDataset(){let e=super.getDataset(),n=this.getLatest();return e.captionEditor=n.__captionEditor,e.captionEditorInitialState=n.__captionEditorInitialState,e}exportJSON(){let e=super.exportJSON();return this.__captionEditor&&this.__captionEditor.getEditorState().read(()=>{let n=di.$generateHtmlFromNodes(this.__captionEditor,null),i=ki(n);e.caption=i}),e}decorate(){return w.jsx(Jn,{nodeKey:this.getKey(),width:"wide",children:w.jsx(FBe,{captionEditor:this.__captionEditor,captionEditorInitialState:this.__captionEditorInitialState,nodeKey:this.getKey()})})}setImages(e){let n=e.slice(0,iP).map(i=>tP(i,pV));zy(n),this.images=n}addImages(e){let n=[...this.images,...e].slice(0,iP).map(i=>tP(i,pV));zy(n),this.images=n}};we(Hm,"kgMenu",[{label:"Gallery",desc:"Create an image gallery",Icon:lG,insertCommand:Nae,insertParams:{triggerFileDialog:!0},matches:["gallery"],priority:5,shortcut:"/gallery"}]);var Pae=t=>new Hm(t);function fy(t){return/\.(gif)$/.test(t)}function Aae({src:t,alt:e,previewSrc:n,imageUploader:i,imageCardDragHandler:r,imageFileDragHandler:o,isPinturaEnabled:a,openImageEditor:s,onFileChange:l}){var c;let d={width:`${(c=i.progress)==null?void 0:c.toFixed(0)}%`},f=i.progress.toFixed(0)<100?`upload in progress, ${i.progress}`:"";function h(g){o?.setRef(g),r?.setRef(g)}return w.jsxs("div",{ref:h,className:"not-kg-prose group/image relative",children:[w.jsx("img",{alt:e||f,className:`mx-auto block ${n?"opacity-40":""}`,"data-testid":i.isLoading?"image-card-loading":"image-card-populated",src:n||t}),i.isLoading?w.jsx("div",{className:"absolute inset-0 flex min-w-full items-center justify-center overflow-hidden bg-white/50","data-testid":"upload-progress",children:w.jsx(Ys,{style:d})}):w.jsx(w.Fragment,{}),r!=null&&r.isDraggedOver?w.jsx("div",{className:"absolute inset-0 flex items-center justify-center border border-grey/20 bg-black/80 dark:border-grey/10 dark:bg-grey-950",children:w.jsx(K7,{text:"Drop to convert to a gallery"})}):null,o!=null&&o.isDraggedOver?w.jsx("div",{className:"absolute inset-0 flex items-center justify-center border border-grey/20 bg-black/80 dark:border-grey/10 dark:bg-grey-950","data-testid":"drag-overlay",children:w.jsx(K7,{text:"Drop to replace image"})}):null,a&&!fy(t)&&w.jsx("div",{className:"pointer-events-none invisible absolute inset-0 bg-gradient-to-t from-black/0 via-black/5 to-black/30 p-3 opacity-0 transition-all group-hover/image:visible group-hover/image:opacity-100",children:w.jsx("div",{className:"flex flex-row-reverse",children:w.jsx(qc,{Icon:Q4,label:"Edit",onClick:()=>s({image:t,handleSave:g=>{l({target:{files:[g]}})}})})})})]})}function $ae({onFileChange:t,setFileInputRef:e,imageFileDragHandler:n,errors:i}){let r=N.default.useRef(null),o=a=>{r.current=a,e(r)};return w.jsxs(w.Fragment,{children:[w.jsx(nf,{desc:"Click to select an image",errors:i,filePicker:()=>lr({fileInputRef:r}),icon:"image",isDraggedOver:n?.isDraggedOver,placeholderRef:n?.setRef}),w.jsx(V4,{fileInputRef:o,filePicker:()=>lr({fileInputRef:r}),onFileChange:t})]})}var Dae=({src:t,altText:e,previewSrc:n,imageUploader:i,onFileChange:r,setFileInputRef:o,imageCardDragHandler:a,imageFileDragHandler:s,isPinturaEnabled:l,openImageEditor:c})=>n||t?w.jsx(Aae,{alt:e,imageCardDragHandler:a,imageFileDragHandler:s,imageUploader:i,isPinturaEnabled:l,openImageEditor:c,previewSrc:n,src:t,onFileChange:r}):w.jsx($ae,{errors:i.errors,imageFileDragHandler:s,setFileInputRef:o,onFileChange:r});function Iae({isSelected:t,src:e,onFileChange:n,captionEditor:i,captionEditorInitialState:r,altText:o,setAltText:a,setFigureRef:s,fileInputRef:l,cardWidth:c,previewSrc:d,imageUploader:f,imageCardDragHandler:h,imageFileDragHandler:g,isPinturaEnabled:m,openImageEditor:b}){let x=N.default.useRef(null);N.default.useEffect(()=>{s&&s(x)},[x,s]);let _=O=>{l&&(l.current=O.current)};return w.jsx(w.Fragment,{children:w.jsxs("figure",{ref:x,"data-kg-card-width":c,children:[w.jsx(Dae,{altText:o,imageCardDragHandler:h,imageFileDragHandler:g,imageUploader:f,isPinturaEnabled:m,openImageEditor:b,previewSrc:d,setFileInputRef:_,src:e,onFileChange:n}),w.jsx(A0,{altText:o||"",altTextPlaceholder:"Type alt text for image (optional)",captionEditor:i,captionEditorInitialState:r,captionPlaceholder:"Type caption for image (optional)",dataTestId:"image-caption-editor",isSelected:t,readOnly:!t,setAltText:a})]})})}Dae.propTypes={src:$.string,altText:$.string,previewSrc:$.string,imageUploader:$.object,onFileChange:$.func,setFileInputRef:$.func,imageFileDragHandler:$.object,imageCardDragHandler:$.object,isPinturaEnabled:$.bool,openImageEditor:$.func};Aae.propTypes={src:$.string,alt:$.string,previewSrc:$.string,imageUploader:$.object,imageCardDragHandler:$.object,imageFileDragHandler:$.object,isPinturaEnabled:$.bool,openImageEditor:$.func,onFileChange:$.func};$ae.propTypes={onFileChange:$.func,setFileInputRef:$.func,errors:$.array,imageFileDragHandler:$.object};Iae.propTypes={isSelected:$.bool,src:$.string,onFileChange:$.func,captionEditor:$.object,captionEditorInitialState:$.object,altText:$.string,setAltText:$.func,setFigureRef:$.func,fileInputRef:$.object,cardWidth:$.string,previewSrc:$.string,imageUploader:$.object,imageFileDragHandler:$.object,imageCardDragHandler:$.object,isPinturaEnabled:$.bool,openImageEditor:$.func};function ID({href:t,update:e,cancel:n}){let[i,r]=N.default.useState(t),o=(0,N.useRef)(null),a=(0,N.useRef)(null);N.default.useEffect(()=>{r(t)},[t]),(0,N.useEffect)(()=>{o.current.focus()},[]);let s=N.default.useCallback(c=>{a.current&&!a.current.contains(c.target)&&n()},[n]);N.default.useEffect(()=>(window.addEventListener("mousedown",s),()=>{window.removeEventListener("mousedown",s)}),[s]);let l=N.default.useCallback(c=>{c.key==="Escape"&&n()},[n]);return N.default.useEffect(()=>(window.addEventListener("keydown",l),()=>{window.removeEventListener("keydown",l)}),[l]),w.jsxs("div",{ref:a,className:"relative m-0 flex items-center justify-evenly gap-1 rounded-lg bg-white p-1 font-sans text-md font-normal text-black shadow-md dark:bg-grey-950",children:[w.jsx("input",{ref:o,className:"mb-[1px] h-8 w-full pl-3 pr-9 leading-loose text-grey-900 selection:bg-grey/40 dark:bg-grey-950 dark:text-grey-300 dark:selection:bg-grey-800/40 dark:selection:text-grey-100","data-testid":"link-input",name:"link-input",placeholder:"Enter url",value:i,"data-kg-link-input":!0,onInput:c=>{r(c.target.value)},onKeyDown:c=>{if(c.key==="Enter"){c.preventDefault(),e(i);return}}}),!!i&&w.jsx("button",{"aria-label":"Close",className:"absolute right-3 cursor-pointer",type:"button",onClick:c=>{c.stopPropagation(),r(""),o.current.focus()},children:w.jsx($0,{className:"size-4 stroke-2 text-grey"})})]})}ID.propTypes={href:$.string};async function QBe(t,e){if(!t.startsWith("data:"))return;let n=t.split(",")[0].split(":")[1].split(";")[0];if(!e){let r;try{r=window.crypto.randomUUID()}catch{r=Math.random().toString(36).substring(2,15)}let o=n.split("/")[1];e=`data-src-image-${r}.${o}`}let i=await fetch(t).then(r=>r.blob());return new File([i],e,{type:n,lastModified:new Date})}var hy=async(t,e,n,i)=>{if(!t)return;let r=URL.createObjectURL(t[0]);r&&await n.update(()=>{let c=A.$getNodeByKey(e);c.previewSrc=r});let{width:o,height:a}=await ip(r),s=await i(t),l=s?.[0].url;await n.update(()=>{let c=A.$getNodeByKey(e);c.width=o,c.height=a,c.src=l,c.previewSrc=null})},LD=async(t,e)=>{if(!t)return;let n=await e(t),i=n?.[0].url,{width:r,height:o}=await ip(i);return{imageSrc:i,width:r,height:o}};function WBe({nodeKey:t,initialFile:e,src:n,altText:i,captionEditor:r,captionEditorInitialState:o,triggerFileDialog:a,previewSrc:s,href:l}){var c;let[d]=Oe.useLexicalComposerContext(),[f,h]=N.default.useState(!1),{fileUploader:g,cardConfig:m}=N.default.useContext(ut),{isSelected:b,cardWidth:x,setCardWidth:_}=N.default.useContext(vn),O=N.default.useRef(),S=N.default.useRef(),[E,T]=N.default.useState(!1),M=g.useFileUpload("image"),I=Ws({handleDrop:te}),F=N.default.useCallback(oe=>oe.type==="card"&&oe.cardName==="image"&&oe.nodeKey!==t,[t]),W=N.default.useCallback(oe=>{let{type:le,cardName:q,nodeKey:z,dataset:ae}=oe;le==="card"&&q==="image"&&z&&ae&&d.update(()=>{let ue=A.$getNodeByKey(t),he=A.$getNodeByKey(z),je=Pae();ae.fileName=ae?.fileName||nP(ae.src);let qe=ue.getDataset();qe.fileName=qe?.fileName||nP(qe.src),je.addImages([qe,ae]),ue.replace(je),he.remove()})},[d,t]),Z=qQe({canDrop:F,onDrop:W}),{isEnabled:j,openEditor:H}=J4({config:m.pinturaConfig});N.default.useEffect(()=>{if(!(n!=null&&n.startsWith("data:"))||M.isLoading)return;let oe=!0;return(async()=>{let le=await QBe(n);oe&&await hy([le],t,d,M.upload)})(),()=>oe=!1},[d,M.isLoading,M.upload,t,n]),N.default.useEffect(()=>{(async le=>{le&&!n&&await hy([le],t,d,M.upload)})(e);let oe=async()=>{if(n&&!e&&!a){let{width:le,height:q}=await ip(n);d.update(()=>{let z=A.$getNodeByKey(t);z.width=le,z.height=q})}};d.getEditorState().read(()=>{let le=A.$getNodeByKey(t);return!le.width||!le.height})&&oe()},[]);let X=async oe=>{let le=oe.target.files;return d.update(()=>{let q=A.$getNodeByKey(t);q.src=""}),await hy(le,t,d,M.upload)},B=oe=>{d.update(()=>{let le=A.$getNodeByKey(t);le.href=oe})},R=oe=>{d.update(()=>{let le=A.$getNodeByKey(t);le.alt=oe})};N.default.useEffect(()=>{if(!a)return;let oe=setTimeout(()=>{lr({fileInputRef:O}),d.update(()=>{let le=A.$getNodeByKey(t);le.triggerFileDialog=!1})});return()=>{clearTimeout(oe)}});let U=oe=>{d.update(()=>{let le=A.$getNodeByKey(t);le.cardWidth=oe,_(oe)})},V=()=>{h(!1),K()},K=()=>{d.update(()=>{let oe=A.$createNodeSelection();oe.add(t),A.$setSelection(oe)})};async function te(oe){await hy(oe,t,d,M.upload)}return w.jsxs(w.Fragment,{children:[w.jsx(Iae,{altText:i,captionEditor:r,captionEditorInitialState:o,cardWidth:x,fileInputRef:O,imageCardDragHandler:Z,imageFileDragHandler:I,imageUploader:M,isPinturaEnabled:j,isSelected:b,openImageEditor:H,previewSrc:s,setAltText:R,src:n,onFileChange:X}),w.jsx(xt,{"data-kg-card-toolbar":"image",isVisible:f,children:w.jsx(ID,{cancel:V,href:l,update:oe=>{B(oe),V()}})}),w.jsx(xt,{"data-kg-card-toolbar":"image",isVisible:E,children:w.jsx(pi,{onClose:()=>T(!1)})}),w.jsxs(xt,{"data-kg-card-toolbar":"image",isVisible:n&&b&&!f&&!E,children:[w.jsx(V4,{fileInputRef:S,mimeTypes:(c=g.fileTypes.image)==null?void 0:c.mimeTypes,onFileChange:X}),w.jsxs(gi,{children:[w.jsx(lt,{hide:fy(n),icon:"imgRegular",isActive:x==="regular",label:"Regular width",onClick:()=>U("regular")}),w.jsx(lt,{hide:fy(n),icon:"imgWide",isActive:x==="wide",label:"Wide width",onClick:()=>U("wide")}),w.jsx(lt,{hide:fy(n),icon:"imgFull",isActive:x==="full",label:"Full width",onClick:()=>U("full")}),w.jsx(Kn,{hide:fy(n)}),w.jsx(lt,{icon:"link",isActive:l||!1,label:"Link",onClick:()=>{h(!0)}}),w.jsx(Kn,{hide:!m.createSnippet}),w.jsx(lt,{dataTestId:"create-snippet",hide:!m.createSnippet,icon:"snippet",isActive:!1,label:"Save as snippet",onClick:()=>T(!0)})]})]})]})}var BBe=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",strokeWidth:1.5,viewBox:"0 0 24 24",...t},J.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M1.472 13.357a9.063 9.063 0 1 0 16.682-7.09 9.063 9.063 0 1 0-16.682 7.09Zm14.749 2.863 7.029 7.03"})),HBe="https://tenor.googleapis.com",ZBe="v2",qBe=600,sS={COMMON:"common",INVALID_API_KEY:"invalid_key"};function UBe({config:t}){let[e,n]=(0,N.useState)([]),[i,r]=(0,N.useState)(null),[o,a]=(0,N.useState)(!1),[s,l]=(0,N.useState)(!1),[c,d]=(0,N.useState)([]),f=(0,N.useRef)(null),h=(0,N.useRef)(""),g=(0,N.useRef)([]),m=(0,N.useRef)(null),b=(0,N.useRef)(""),x=(0,N.useRef)(4),_=(0,N.useRef)([]),O=(0,N.useRef)([]);function S(te){return b.current=te,I(),te?T(te):M()}let E=D0((te="")=>S(te),qBe);async function T(te){h.current="search",await H(h.current,{params:{q:te,media_filter:"minimal"}})}async function M(){h.current="featured",await H(h.current,{params:{q:"excited",media_filter:"minimal"}})}function I(){O.current=[],f.current=null,F()}function F(){let te=[],oe=[];for(let le=0;le{Z(te)})}function Z(te){let oe=Math.min(...g.current),le=g.current.indexOf(oe);g.current[le]+=300*te.ratio,_.current[le].push(te),te.columnIndex=le,te.columnRowIndex=_.current[le].length-1}function j(te,oe){let[le,q]=te.media_formats.tinygif.dims;te.ratio=q/le,O.current.push(te),te.index=oe,Z(te)}async function H(te,oe){let le=`${ZBe}/${te}`.replace(/\/+/,"/"),q=new URL(le,HBe),z=new URLSearchParams(oe.params);return z.set("key",t.googleApiKey),z.set("client_key","ghost-editor"),z.set("contentfilter",V()),q.search=z.toString(),m.current=arguments,r(null),a(!0),fetch(q).then(ae=>X(ae)).then(ae=>ae.json()).then(ae=>B(ae)).then(ae=>R(ae)).then(()=>{n(_.current),d(O.current)}).catch(ae=>{!oe.ignoreErrors&&!i&&r(sS.COMMON),i&&i.startsWith("API key not valid")&&r(sS.INVALID_API_KEY),console.error(ae)}).finally(()=>{a(!1),l(!1)})}async function X(te){if(te.status>=200&&te.status<300)return te;let oe;te.headers.map["content-type"].startsWith("application/json")?oe=await te.json().then(q=>q.error.message||q.error):te.headers.map["content-type"]==="text/xml"&&(oe=await te.text()),r(oe);let le=new Error(oe);throw le.response=te,le}async function B(te){return f.current=te.next,te}async function R(te){return te.results.forEach((oe,le)=>j(oe,le)),te}function U(){if(!o){if(!O.current.length)return M();if(f.current!==null){let te={pos:f.current,media_filter:"minimal"};return h.current==="search"&&(te.q=b),l(!0),H(h.current,{params:te})}}}function V(){return t.contentFilter||"off"}function K(te){x.current=te,F(),n(_.current)}return{updateSearch:E,isLoading:o,isLazyLoading:s,error:i,loadNextPage:U,columns:e,changeColumnCount:K,gifs:c}}function VBe({error:t}){return t===sS.COMMON?w.jsx("p",{children:"Uh-oh! Trouble reaching the Tenor API, please check your connection"}):t===sS.INVALID_API_KEY?w.jsxs("p",{children:["This version of the Tenor API is no longer supported. Please update your API key by following our",w.jsx("a",{href:"https://ghost.org/docs/config/#tenor",rel:"noopener noreferrer",target:"_blank",children:" documentation here"}),"."]}):w.jsx("p",{children:t})}function YBe({gif:t,onClick:e,highlightedGif:n={}}){let i=(0,N.useRef)(null),r=t.media_formats.tinygif;(0,N.useEffect)(()=>{var a,s;n.id===t.id?(a=i.current)==null||a.focus():(s=i.current)==null||s.blur()},[t.id,n.id]);let o=()=>{e(t)};return w.jsx("button",{ref:i,className:"cursor-pointer border-2 border-transparent focus:border-green-600","data-tenor-index":t.index,type:"button",onClick:o,children:w.jsx("img",{alt:r.content_description,height:r.dims[1],src:r.url,width:r.dims[0]})})}function XBe({isLazyLoading:t}){return t?w.jsx("div",{className:"inset-y-0 w-full p-6 text-center",children:w.jsx("div",{className:"inline-block size-[50px] animate-spin rounded-full border border-black/10 before:z-10 before:mt-[7px] before:block before:size-[7px] before:rounded-full before:bg-grey-800"})}):w.jsx("div",{className:"absolute inset-y-0 left-0 flex w-full items-center justify-center overflow-hidden",children:w.jsx("div",{className:"relative inline-block size-[50px] animate-spin rounded-full border border-black/10 before:z-10 before:mt-[7px] before:block before:size-[7px] before:rounded-full before:bg-grey-800"})})}var GBe=540,KBe=940,JBe=({onGifInsert:t,onClickOutside:e,updateSearch:n,columns:i,isLoading:r,isLazyLoading:o,error:a,changeColumnCount:s,loadNextPage:l,gifs:c})=>{let d=(0,N.useRef)(null),f=(0,N.useRef)(null),[h,g]=(0,N.useState)(void 0);(0,N.useEffect)(()=>{n()},[]),(0,N.useEffect)(()=>{if(!d.current)return;let K=new ResizeObserver(te=>{let[oe]=te,le=(Array.isArray(oe.contentBoxSize)?oe.contentBoxSize[0]:oe.contentBoxSize).inlineSize,q=4;le<=GBe?q=2:le<=KBe&&(q=3),s(q)});return K.observe(d.current),()=>{K?.disconnect()}},[]),(0,N.useEffect)(()=>(document.addEventListener("keydown",Z),()=>{document.removeEventListener("keydown",Z)}),[Z]),N.default.useEffect(()=>{let K=te=>{d.current&&!d.current.contains(te.target)&&e()};return window.addEventListener("mousedown",K),()=>{window.removeEventListener("mousedown",K)}},[e]);function m(K){let te=K.media_formats.gif,oe={src:te.url,width:te.dims[0],height:te.dims[1]};t(oe)}let b=K=>{n(K.target.value)},x=K=>{let te=K.target;te.scrollTop+te.clientHeight>=te.scrollHeight-1e3&&l()};function _(){var K;(K=f.current)==null||K.focus()}function O(){g(c[0])}function S(){h!==c[c.length-1]&&g(c[h.index+1])}function E(){h.index===0&&_(),g(c[h.index-1])}function T(){let K=i[h.columnIndex][h.columnRowIndex+1];K&&g(K)}function M(){let K=i[h.columnIndex][h.columnRowIndex-1];K?g(K):_()}function I(K){var te;let oe=document.querySelector(`[data-tenor-index="${h.index}"]`).getBoundingClientRect(),le;K==="left"?le=oe.left-oe.width/2:le=oe.right+oe.width/2;let q=oe.top+oe.height/3,z,ae=0;for(;!z;){let ue=(te=document.elementFromPoint(le,q))==null?void 0:te.closest("[data-tenor-index]");if(ue?.dataset.tenorIndex!==void 0){z=ue;break}if(ae+=1,q-=5,ae>10)break}z&&g(c[z.dataset.tenorIndex])}function F(){h.columnIndex!==i.length-1&&I("right")}function W(){if(h.index===0)return _();h.columnIndex!==0&&I("left")}function Z(K){switch(K.key){case"Tab":return j(K);case"ArrowLeft":return H(K);case"ArrowRight":return X(K);case"ArrowUp":return B(K);case"ArrowDown":return R(K);case"Enter":return U(K);default:return null}}function j(K){if(K.shiftKey){if(h)return K.preventDefault(),E()}else{if(K?.target.tagName==="INPUT")return K.preventDefault(),K.target.blur(),O();if(h)return K?.preventDefault(),S()}}function H(K){h&&(K.preventDefault(),W())}function X(K){h&&(K.preventDefault(),F())}function B(K){h&&(K.preventDefault(),M())}function R(K){if(K.target.tagName==="INPUT")return K.preventDefault(),K.target.blur(),O();h&&(K.preventDefault(),T())}function U(K){if(K.preventDefault(),K.target.tagName==="INPUT")return K.target.blur(),O();if(h)return m(h)}let V=r&&!o;return w.jsxs("div",{ref:d,className:"flex h-[540px] flex-col rounded border border-grey-200 bg-grey-50 dark:border-none dark:bg-grey-900","data-testid":"tenor-selector",onClick:K=>K.stopPropagation(),children:[w.jsx("header",{className:"p-6",children:w.jsxs("div",{className:"relative w-full",children:[w.jsx(BBe,{className:"absolute left-4 top-1/2 size-4 -translate-y-2 text-grey-500 dark:text-grey-800"}),w.jsx("input",{ref:f,className:"h-10 w-full rounded-full border border-grey-300 pl-10 pr-8 font-sans text-md font-normal text-black focus:border-green focus:shadow-insetgreen dark:border-grey-800 dark:bg-grey-950 dark:text-white dark:placeholder:text-grey-800 dark:focus:border-green",placeholder:"Search Tenor for GIFs",autoFocus:!0,onChange:b})]})}),w.jsx("div",{className:"relative h-full overflow-hidden",children:w.jsxs("div",{className:"h-full overflow-auto px-6",onScroll:x,children:[!a&&!V&&w.jsx("div",{className:"flex gap-4",children:i.map((K,te)=>w.jsx("section",{className:"flex grow basis-0 flex-col justify-start gap-4",children:K.map(oe=>w.jsx(YBe,{gif:oe,highlightedGif:h,onClick:m},oe.id))},te))}),!!r&&!a&&w.jsx(XBe,{isLazyLoading:o}),!!a&&w.jsx("div",{"data-testid":"tenor-selector-error",children:w.jsx(VBe,{error:a})})]})})]})},eHe=({nodeKey:t})=>{let{cardConfig:e}=N.default.useContext(ut),n=UBe({config:e.tenor}),[i]=Oe.useLexicalComposerContext();N.default.useEffect(()=>{let a=s=>{s.key==="Escape"&&i.dispatchCommand(Hf,{cardKey:t})};return window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}},[]);let r=()=>{i.dispatchCommand(Hf,{cardKey:t})},o=async a=>{i.dispatchCommand(zae,a)};return w.jsx(JBe,{onClickOutside:r,onGifInsert:o,...n})},tHe=Object.defineProperty,nHe=(t,e,n)=>e in t?tHe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yn=(t,e,n)=>nHe(t,typeof e!="symbol"?e+"":e,n),Lae={exports:{}},Uv={};var gV;function iHe(){if(gV)return Uv;gV=1;var t=N.default,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,r=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(s,l,c){var d,f={},h=null,g=null;c!==void 0&&(h=""+c),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(g=l.ref);for(d in l)i.call(l,d)&&!o.hasOwnProperty(d)&&(f[d]=l[d]);if(s&&s.defaultProps)for(d in l=s.defaultProps,l)f[d]===void 0&&(f[d]=l[d]);return{$$typeof:e,type:s,key:h,ref:g,props:f,_owner:r.current}}return Uv.Fragment=n,Uv.jsx=a,Uv.jsxs=a,Uv}Lae.exports=iHe();var gt=Lae.exports,rP=class{constructor(e=3){Yn(this,"columnCount"),Yn(this,"columns",[]),Yn(this,"columnHeights"),this.columnCount=e,this.columns=[[]],this.columnHeights=null}reset(){let e=[],n=[];for(let i=0;iJ.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t},J.createElement("path",{d:"M20 5.5l-8 8-8-8m-3.5 13h23",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,fill:"none"})),oHe=t=>J.createElement("svg",{viewBox:"0 0 32 32",...t},J.createElement("path",{d:"M17.4 29c-.8.8-2 .8-2.8 0L2.3 16.2C-.8 13.1-.8 8 2.3 4.8c3.1-3.1 8.2-3.1 11.3 0L16 7.6l2.3-2.8c3.1-3.1 8.2-3.1 11.3 0 3.1 3.1 3.1 8.2 0 11.4L17.4 29z"})),aHe={heart:oHe,download:rHe},B8=({icon:t,label:e,...n})=>{let i=null;return t&&(i=aHe[t]),gt.jsxs("a",{className:"text-grey-700 flex h-8 shrink-0 cursor-pointer items-center rounded-md bg-white px-3 py-2 font-sans text-sm font-medium leading-6 opacity-90 transition-all ease-in-out hover:opacity-100",onClick:r=>r.stopPropagation(),...n,children:[t&&i&>.jsx(i,{className:`size-4 ${t==="heart"?"fill-red":""} stroke-[3px] ${e&&"mr-1"}`}),e&>.jsx("span",{children:e})]})},jae=({payload:t,srcUrl:e,links:n,likes:i,user:r,alt:o,urls:a,height:s,width:l,zoomed:c,insertImage:d,selectImg:f})=>{let h=g=>{g.stopPropagation(),f(c?null:t)};return gt.jsxs("div",{className:`relative mb-6 block ${c?"h-full w-[max-content] cursor-zoom-out":"w-full cursor-zoom-in"}`,style:{backgroundColor:t.color||"transparent"},"data-kg-unsplash-gallery-item":!0,onClick:h,children:[gt.jsx("img",{alt:o,className:`${c?"h-full w-auto object-contain":"block h-auto"}`,height:s,loading:"lazy",src:e,width:l,"data-kg-unsplash-gallery-img":!0}),gt.jsxs("div",{className:"absolute inset-0 flex flex-col justify-between bg-gradient-to-b from-black/5 via-black/5 to-black/30 p-5 opacity-0 transition-all ease-in-out hover:opacity-100",children:[gt.jsxs("div",{className:"flex items-center justify-end gap-3",children:[gt.jsx(B8,{"data-kg-button":"unsplash-like",href:`${n.html}/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit`,icon:"heart",label:i.toString(),rel:"noopener noreferrer",target:"_blank"}),gt.jsx(B8,{"data-kg-button":"unsplash-download",href:`${n.download}/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit&force=true`,icon:"download"})]}),gt.jsxs("div",{className:"flex items-center justify-between",children:[gt.jsxs("div",{className:"flex items-center",children:[gt.jsx("img",{alt:"author",className:"mr-2 size-8 rounded-full",src:r.profile_image.medium}),gt.jsx("div",{className:"mr-2 truncate font-sans text-sm font-medium text-white",children:r.name})]}),gt.jsx(B8,{label:"Insert image","data-kg-unsplash-insert-button":!0,onClick:g=>{g.stopPropagation(),d({src:a.regular.replace(/&w=1080/,"&w=2000"),caption:`Photo by ${r.name} / Unsplash`,height:s,width:l,alt:o,links:n})}})]})]})]})},sHe=({payload:t,insertImage:e,selectImg:n,zoomed:i})=>gt.jsx("div",{className:"flex h-full grow basis-0 justify-center","data-kg-unsplash-zoomed":!0,onClick:()=>n(null),children:gt.jsx(jae,{alt:t.alt_description,height:t.height,insertImage:e,likes:t.likes,links:t.links,payload:t,selectImg:n,srcUrl:t.urls.regular,urls:t.urls,user:t.user,width:t.width,zoomed:i})}),lHe=()=>gt.jsx("div",{className:"absolute inset-y-0 left-0 flex w-full items-center justify-center overflow-hidden pb-[8vh]","data-kg-loader":!0,children:gt.jsx("div",{className:"animate-spin before:bg-grey-800 relative inline-block size-[50px] rounded-full border border-black/10 before:z-10 before:mt-[7px] before:block before:size-[7px] before:rounded-full"})}),cHe=t=>gt.jsx("div",{className:"mr-6 flex grow basis-0 flex-col justify-start last-of-type:mr-0",children:t.children}),dHe=t=>t!=null&&t.columns?t?.columns.map((e,n)=>gt.jsx(cHe,{children:e.map(i=>gt.jsx(jae,{alt:i.alt_description,height:i.height,insertImage:t?.insertImage,likes:i.likes,links:i.links,payload:i,selectImg:t?.selectImg,srcUrl:i.urls.regular,urls:i.urls,user:i.user,width:i.width,zoomed:t?.zoomed||null},i.id))},n)):null,H8=t=>gt.jsx("div",{className:"relative h-full overflow-hidden","data-kg-unsplash-gallery":!0,children:gt.jsxs("div",{ref:t.galleryRef,className:`flex size-full justify-center overflow-auto px-20 ${t!=null&&t.zoomed?"pb-10":""}`,"data-kg-unsplash-gallery-scrollref":!0,children:[t.children,t?.isLoading&>.jsx(lHe,{})]})}),uHe=({zoomed:t,error:e,galleryRef:n,isLoading:i,dataset:r,selectImg:o,insertImage:a})=>t?gt.jsx(H8,{galleryRef:n,zoomed:t,children:gt.jsx(sHe,{alt:t.alt_description,height:t.height,insertImage:a,likes:t.likes,links:t.links,payload:t,selectImg:o,srcUrl:t.urls.regular,urls:t.urls,user:t.user,width:t.width,zoomed:t})}):e?gt.jsx(H8,{galleryRef:n,zoomed:t,children:gt.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[gt.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Error"}),gt.jsx("p",{className:"text-lg font-medium",children:e})]})}):gt.jsx(H8,{galleryRef:n,isLoading:i,zoomed:t,children:gt.jsx(dHe,{columns:r,insertImage:a,selectImg:o,zoomed:t})}),fHe=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",strokeWidth:1.5,viewBox:"0 0 24 24",...t},J.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M.75 23.249l22.5-22.5M23.25 23.249L.75.749"})),hHe=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",strokeWidth:1.5,viewBox:"0 0 24 24",...t},J.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M1.472 13.357a9.063 9.063 0 1 0 16.682-7.09 9.063 9.063 0 1 0-16.682 7.09Zm14.749 2.863 7.029 7.03"})),pHe=t=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 122.43 122.41",...t},J.createElement("path",{d:"M83.86 54.15v34.13H38.57V54.15H0v68.26h122.43V54.15H83.86zM38.57 0h45.3v34.13h-45.3z"})),gHe=({closeModal:t,handleSearch:e,children:n})=>gt.jsxs(gt.Fragment,{children:[gt.jsx("div",{className:"fixed inset-0 z-40 h-[100vh] bg-black opacity-60"}),gt.jsxs("div",{className:"not-kg-prose fixed inset-8 z-50 overflow-hidden rounded bg-white shadow-xl","data-kg-modal":"unsplash",children:[gt.jsx("button",{className:"absolute right-6 top-6 cursor-pointer",type:"button",children:gt.jsx(fHe,{className:"text-grey-400 size-4 stroke-2","data-kg-modal-close-button":!0,onClick:()=>t()})}),gt.jsxs("div",{className:"flex h-full flex-col",children:[gt.jsxs("header",{className:"flex shrink-0 items-center justify-between px-20 py-10",children:[gt.jsxs("h1",{className:"flex items-center gap-2 font-sans text-3xl font-bold text-black",children:[gt.jsx(pHe,{className:"mb-1"}),"Unsplash"]}),gt.jsxs("div",{className:"relative w-full max-w-sm",children:[gt.jsx(hHe,{className:"text-grey-700 absolute left-4 top-1/2 size-4 -translate-y-2"}),gt.jsx("input",{className:"border-grey-300 focus:border-grey-400 h-10 w-full rounded-full border border-solid pl-10 pr-8 font-sans text-md font-normal text-black focus-visible:outline-none",placeholder:"Search free high-resolution photos",autoFocus:!0,"data-kg-unsplash-search":!0,onChange:e})]})]}),n]})]})]}),mHe=[{id:"TA5hw14Coh4",slug:"a-person-standing-on-a-sand-dune-in-the-desert-TA5hw14Coh4",alternative_slugs:{en:"a-person-standing-on-a-sand-dune-in-the-desert-TA5hw14Coh4"},created_at:"2024-02-07T22:39:36Z",updated_at:"2024-03-07T23:46:14Z",promoted_at:null,width:8640,height:5760,color:"#8c5940",blur_hash:"LKD]brE2IUr?Lgwci_NaDjR*ofoe",description:"NEOM will be home to one of the world\u2019s largest nature reserves: a 25,000 sq km stretch of wilderness, encompassing two deserts divided by a mountain range. | NEOM, Saudi Arabia",alt_description:"a person standing on a sand dune in the desert",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1707345512638-997d31a10eaa?ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1707345512638-997d31a10eaa?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1707345512638-997d31a10eaa?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1707345512638-997d31a10eaa?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1707345512638-997d31a10eaa?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1707345512638-997d31a10eaa"},links:{self:"https://api.unsplash.com/photos/a-person-standing-on-a-sand-dune-in-the-desert-TA5hw14Coh4",html:"https://unsplash.com/photos/a-person-standing-on-a-sand-dune-in-the-desert-TA5hw14Coh4",download:"https://unsplash.com/photos/TA5hw14Coh4/download?ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/TA5hw14Coh4/download?ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:226,liked_by_user:!1,current_user_collections:[],sponsorship:{impression_urls:[],tagline:"Made to Change",tagline_url:"https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",sponsor:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM\u2019s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM\u2019s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},topic_submissions:{},user:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM\u2019s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM\u2019s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},{id:"UArA9A02Kvk",slug:"a-black-and-white-photo-of-a-man-with-his-head-in-his-hands-UArA9A02Kvk",alternative_slugs:{en:"a-black-and-white-photo-of-a-man-with-his-head-in-his-hands-UArA9A02Kvk"},created_at:"2024-03-05T15:48:31Z",updated_at:"2024-03-11T06:59:25Z",promoted_at:"2024-03-11T06:59:25Z",width:2160,height:2700,color:"#262626",blur_hash:"L78;S$~p00oLD%D%IVay9F9ZIUay",description:null,alt_description:"a black and white photo of a man with his head in his hands",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709653688483-fc2b356c1f36?ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709653688483-fc2b356c1f36?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709653688483-fc2b356c1f36?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709653688483-fc2b356c1f36?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709653688483-fc2b356c1f36?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709653688483-fc2b356c1f36"},links:{self:"https://api.unsplash.com/photos/a-black-and-white-photo-of-a-man-with-his-head-in-his-hands-UArA9A02Kvk",html:"https://unsplash.com/photos/a-black-and-white-photo-of-a-man-with-his-head-in-his-hands-UArA9A02Kvk",download:"https://unsplash.com/photos/UArA9A02Kvk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/UArA9A02Kvk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:20,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"gwWL9kMcm2g",updated_at:"2024-03-11T10:14:07Z",username:"nickandreka",name:"Nick Andr\xE9ka",first_name:"Nick",last_name:"Andr\xE9ka",twitter_username:null,portfolio_url:null,bio:null,location:null,links:{self:"https://api.unsplash.com/users/nickandreka",html:"https://unsplash.com/@nickandreka",photos:"https://api.unsplash.com/users/nickandreka/photos",likes:"https://api.unsplash.com/users/nickandreka/likes",portfolio:"https://api.unsplash.com/users/nickandreka/portfolio",following:"https://api.unsplash.com/users/nickandreka/following",followers:"https://api.unsplash.com/users/nickandreka/followers"},profile_image:{small:"https://images.unsplash.com/profile-1698854198608-989031a5ccdeimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1698854198608-989031a5ccdeimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1698854198608-989031a5ccdeimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"andreka.art",total_collections:0,total_likes:8,total_photos:35,total_promoted_photos:19,accepted_tos:!0,for_hire:!0,social:{instagram_username:"andreka.art",portfolio_url:null,twitter_username:null,paypal_email:null}}},{id:"QX_7m4Lh2qg",slug:"a-black-and-white-photo-of-a-lighthouse-QX_7m4Lh2qg",alternative_slugs:{en:"a-black-and-white-photo-of-a-lighthouse-QX_7m4Lh2qg"},created_at:"2024-03-10T16:46:33Z",updated_at:"2024-03-11T06:59:11Z",promoted_at:"2024-03-11T06:59:11Z",width:4e3,height:5751,color:"#f3f3f3",blur_hash:"LAQJiu~X-;9G-:?cIURj~qD%00xt",description:null,alt_description:"a black and white photo of a lighthouse",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710088912041-34d1767d376a?ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710088912041-34d1767d376a?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710088912041-34d1767d376a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710088912041-34d1767d376a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710088912041-34d1767d376a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710088912041-34d1767d376a"},links:{self:"https://api.unsplash.com/photos/a-black-and-white-photo-of-a-lighthouse-QX_7m4Lh2qg",html:"https://unsplash.com/photos/a-black-and-white-photo-of-a-lighthouse-QX_7m4Lh2qg",download:"https://unsplash.com/photos/QX_7m4Lh2qg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/QX_7m4Lh2qg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:21,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"ue6QWAAHoIQ",updated_at:"2024-03-11T08:53:54Z",username:"huzhewseh",name:"Volodymyr M",first_name:"Volodymyr",last_name:"M",twitter_username:"huzhewseh",portfolio_url:null,bio:null,location:null,links:{self:"https://api.unsplash.com/users/huzhewseh",html:"https://unsplash.com/@huzhewseh",photos:"https://api.unsplash.com/users/huzhewseh/photos",likes:"https://api.unsplash.com/users/huzhewseh/likes",portfolio:"https://api.unsplash.com/users/huzhewseh/portfolio",following:"https://api.unsplash.com/users/huzhewseh/following",followers:"https://api.unsplash.com/users/huzhewseh/followers"},profile_image:{small:"https://images.unsplash.com/profile-1663221970918-58b1620c49c9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1663221970918-58b1620c49c9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1663221970918-58b1620c49c9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"huzhewseh",total_collections:0,total_likes:0,total_photos:18,total_promoted_photos:3,accepted_tos:!0,for_hire:!0,social:{instagram_username:"huzhewseh",portfolio_url:null,twitter_username:"huzhewseh",paypal_email:null}}},{id:"fMNP7XVcct0",slug:"a-woman-standing-in-a-dark-room-with-her-eyes-closed-fMNP7XVcct0",alternative_slugs:{en:"a-woman-standing-in-a-dark-room-with-her-eyes-closed-fMNP7XVcct0"},created_at:"2024-03-09T08:40:07Z",updated_at:"2024-03-11T06:58:58Z",promoted_at:"2024-03-11T06:58:58Z",width:3264,height:4928,color:"#262626",blur_hash:"L35hY|xu00D%-;xuIUD%00j[?bWB",description:null,alt_description:"a woman standing in a dark room with her eyes closed",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709973540503-77d699279634?ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709973540503-77d699279634?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709973540503-77d699279634?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709973540503-77d699279634?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709973540503-77d699279634?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709973540503-77d699279634"},links:{self:"https://api.unsplash.com/photos/a-woman-standing-in-a-dark-room-with-her-eyes-closed-fMNP7XVcct0",html:"https://unsplash.com/photos/a-woman-standing-in-a-dark-room-with-her-eyes-closed-fMNP7XVcct0",download:"https://unsplash.com/photos/fMNP7XVcct0/download?ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/fMNP7XVcct0/download?ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:7,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"lSlibqdw_c8",updated_at:"2024-03-11T08:54:13Z",username:"vitaliyshev89",name:"Vitaliy Shevchenko",first_name:"Vitaliy",last_name:"Shevchenko",twitter_username:null,portfolio_url:null,bio:null,location:"Kharkiv, Ukraine",links:{self:"https://api.unsplash.com/users/vitaliyshev89",html:"https://unsplash.com/@vitaliyshev89",photos:"https://api.unsplash.com/users/vitaliyshev89/photos",likes:"https://api.unsplash.com/users/vitaliyshev89/likes",portfolio:"https://api.unsplash.com/users/vitaliyshev89/portfolio",following:"https://api.unsplash.com/users/vitaliyshev89/following",followers:"https://api.unsplash.com/users/vitaliyshev89/followers"},profile_image:{small:"https://images.unsplash.com/profile-1652271342920-31eebbc2c3d0image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1652271342920-31eebbc2c3d0image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1652271342920-31eebbc2c3d0image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:null,total_collections:0,total_likes:1,total_photos:205,total_promoted_photos:29,accepted_tos:!0,for_hire:!1,social:{instagram_username:null,portfolio_url:null,twitter_username:null,paypal_email:null}}},{id:"b4kKyX0BQvc",slug:"a-train-station-with-a-train-on-the-tracks-b4kKyX0BQvc",alternative_slugs:{en:"a-train-station-with-a-train-on-the-tracks-b4kKyX0BQvc"},created_at:"2024-03-08T21:58:28Z",updated_at:"2024-03-11T06:57:35Z",promoted_at:"2024-03-11T06:57:27Z",width:6e3,height:4e3,color:"#0c2626",blur_hash:"LSDJS6kD9Zxu~qkDM|xaS%j]xaV@",description:'Stunning metro train station "Elbbr\xFCcken" in Hamburg, Germany during sunset',alt_description:"a train station with a train on the tracks",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709934645859-f1ed8d3a4954"},links:{self:"https://api.unsplash.com/photos/a-train-station-with-a-train-on-the-tracks-b4kKyX0BQvc",html:"https://unsplash.com/photos/a-train-station-with-a-train-on-the-tracks-b4kKyX0BQvc",download:"https://unsplash.com/photos/b4kKyX0BQvc/download?ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/b4kKyX0BQvc/download?ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:8,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{"street-photography":{status:"approved",approved_on:"2024-03-11T06:57:35Z"}},user:{id:"TffftDPlBPk",updated_at:"2024-03-11T06:59:04Z",username:"christianlue",name:"Christian Lue",first_name:"Christian",last_name:"Lue",twitter_username:"chrrischii",portfolio_url:null,bio:null,location:"Frankfurt / Berlin",links:{self:"https://api.unsplash.com/users/christianlue",html:"https://unsplash.com/@christianlue",photos:"https://api.unsplash.com/users/christianlue/photos",likes:"https://api.unsplash.com/users/christianlue/likes",portfolio:"https://api.unsplash.com/users/christianlue/portfolio",following:"https://api.unsplash.com/users/christianlue/following",followers:"https://api.unsplash.com/users/christianlue/followers"},profile_image:{small:"https://images.unsplash.com/profile-1581889127238-ea4aa40e8cb4image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1581889127238-ea4aa40e8cb4image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1581889127238-ea4aa40e8cb4image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:null,total_collections:7,total_likes:15,total_photos:571,total_promoted_photos:103,accepted_tos:!0,for_hire:!0,social:{instagram_username:null,portfolio_url:null,twitter_username:"chrrischii",paypal_email:null}}},{id:"9633dHhioC8",slug:"a-person-walking-through-a-canyon-in-the-desert-9633dHhioC8",alternative_slugs:{en:"a-person-walking-through-a-canyon-in-the-desert-9633dHhioC8"},created_at:"2023-04-28T15:30:26Z",updated_at:"2024-03-10T10:46:58Z",promoted_at:"2023-05-13T12:02:35Z",width:8316,height:5544,color:"#734026",blur_hash:"LVHdd89G57-o.9IBsSR-~pD*M{xt",description:"Amongst expansive red sands and spectacular sandstone rock formations, Hisma Desert \u2013 NEOM, Saudi Arabia | The NEOM Nature Reserve region is being designed to deliver protection and restoration of biodiversity across 95% of NEOM.",alt_description:"a person walking through a canyon in the desert",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1682695795255-b236b1f1267d?ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1682695795255-b236b1f1267d?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1682695795255-b236b1f1267d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1682695795255-b236b1f1267d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1682695795255-b236b1f1267d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1682695795255-b236b1f1267d"},links:{self:"https://api.unsplash.com/photos/a-person-walking-through-a-canyon-in-the-desert-9633dHhioC8",html:"https://unsplash.com/photos/a-person-walking-through-a-canyon-in-the-desert-9633dHhioC8",download:"https://unsplash.com/photos/9633dHhioC8/download?ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/9633dHhioC8/download?ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:631,liked_by_user:!1,current_user_collections:[],sponsorship:{impression_urls:["https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515595&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif","https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515798&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif"],tagline:"Made to Change",tagline_url:"https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",sponsor:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM\u2019s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM\u2019s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},topic_submissions:{},user:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM\u2019s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM\u2019s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},{id:"4PmYYBFhwFM",slug:"a-close-up-of-a-car-door-with-the-word-budder-on-it-4PmYYBFhwFM",alternative_slugs:{en:"a-close-up-of-a-car-door-with-the-word-budder-on-it-4PmYYBFhwFM"},created_at:"2024-03-09T18:40:37Z",updated_at:"2024-03-11T06:57:23Z",promoted_at:"2024-03-11T06:57:23Z",width:5248,height:7872,color:"#a6a6a6",blur_hash:"LHDA40%MbGxu%L?bt7of_N%gIBRj",description:null,alt_description:"a close up of a car door with the word budder on it",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710009439657-c0dfdc051a28?ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710009439657-c0dfdc051a28?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710009439657-c0dfdc051a28?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710009439657-c0dfdc051a28?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710009439657-c0dfdc051a28?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710009439657-c0dfdc051a28"},links:{self:"https://api.unsplash.com/photos/a-close-up-of-a-car-door-with-the-word-budder-on-it-4PmYYBFhwFM",html:"https://unsplash.com/photos/a-close-up-of-a-car-door-with-the-word-budder-on-it-4PmYYBFhwFM",download:"https://unsplash.com/photos/4PmYYBFhwFM/download?ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/4PmYYBFhwFM/download?ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:5,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"Xz7_QPPM2So",updated_at:"2024-03-11T08:27:09Z",username:"tiago_f_ferreira",name:"Tiago Ferreira",first_name:"Tiago",last_name:"Ferreira",twitter_username:null,portfolio_url:"https://tiagoferreira765.wixsite.com/photographyandmusic",bio:`Photography - a hobby, a passion.\r Planet earth \u{1F30E}, a creative space to enjoy.`,location:"Lisboa, Portugal",links:{self:"https://api.unsplash.com/users/tiago_f_ferreira",html:"https://unsplash.com/@tiago_f_ferreira",photos:"https://api.unsplash.com/users/tiago_f_ferreira/photos",likes:"https://api.unsplash.com/users/tiago_f_ferreira/likes",portfolio:"https://api.unsplash.com/users/tiago_f_ferreira/portfolio",following:"https://api.unsplash.com/users/tiago_f_ferreira/following",followers:"https://api.unsplash.com/users/tiago_f_ferreira/followers"},profile_image:{small:"https://images.unsplash.com/profile-1595844391672-cdf854039843image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1595844391672-cdf854039843image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1595844391672-cdf854039843image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"tiago_f_ferreira",total_collections:1,total_likes:144,total_photos:205,total_promoted_photos:8,accepted_tos:!0,for_hire:!1,social:{instagram_username:"tiago_f_ferreira",portfolio_url:"https://tiagoferreira765.wixsite.com/photographyandmusic",twitter_username:null,paypal_email:null}}},{id:"BUhVFtY-890",slug:"a-close-up-of-a-bird-with-a-red-head-BUhVFtY-890",alternative_slugs:{en:"a-close-up-of-a-bird-with-a-red-head-BUhVFtY-890"},created_at:"2024-03-09T10:03:28Z",updated_at:"2024-03-11T06:57:20Z",promoted_at:"2024-03-11T06:57:20Z",width:3511,height:2231,color:"#262626",blur_hash:"L24epEWB0eMx$*t8OEV@RPj]baay",description:null,alt_description:"a close up of a bird with a red head",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709978601970-036e92662b46?ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709978601970-036e92662b46?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709978601970-036e92662b46?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709978601970-036e92662b46?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709978601970-036e92662b46?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709978601970-036e92662b46"},links:{self:"https://api.unsplash.com/photos/a-close-up-of-a-bird-with-a-red-head-BUhVFtY-890",html:"https://unsplash.com/photos/a-close-up-of-a-bird-with-a-red-head-BUhVFtY-890",download:"https://unsplash.com/photos/BUhVFtY-890/download?ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/BUhVFtY-890/download?ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:8,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{"textures-patterns":{status:"rejected"},spring:{status:"rejected"},"earth-hour":{status:"approved",approved_on:"2024-03-10T12:31:10Z"},health:{status:"unevaluated"},animals:{status:"unevaluated"},film:{status:"unevaluated"},travel:{status:"unevaluated"},nature:{status:"unevaluated"},wallpapers:{status:"unevaluated"}},user:{id:"3SCC0WcF-wA",updated_at:"2024-03-11T09:44:02Z",username:"refargotohp",name:"refargotohp",first_name:"refargotohp",last_name:null,twitter_username:null,portfolio_url:null,bio:"Hello \u{1F44B}\u{1F3FC} My name is Pavel, and I am a photographer. I enjoy the photo in any of its manifestations. Sequential shooting, street, studio, portraiture - it's all me. Waiting for you on my social networks - @refargotohp",location:null,links:{self:"https://api.unsplash.com/users/refargotohp",html:"https://unsplash.com/@refargotohp",photos:"https://api.unsplash.com/users/refargotohp/photos",likes:"https://api.unsplash.com/users/refargotohp/likes",portfolio:"https://api.unsplash.com/users/refargotohp/portfolio",following:"https://api.unsplash.com/users/refargotohp/following",followers:"https://api.unsplash.com/users/refargotohp/followers"},profile_image:{small:"https://images.unsplash.com/profile-1653036388874-dab6bdb375bcimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1653036388874-dab6bdb375bcimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1653036388874-dab6bdb375bcimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"refargotohp",total_collections:1,total_likes:86,total_photos:132,total_promoted_photos:61,accepted_tos:!0,for_hire:!0,social:{instagram_username:"refargotohp",portfolio_url:null,twitter_username:null,paypal_email:null}}},{id:"99clkpyauJI",slug:"there-are-bottles-of-beer-on-a-shelf-in-front-of-a-window-99clkpyauJI",alternative_slugs:{en:"there-are-bottles-of-beer-on-a-shelf-in-front-of-a-window-99clkpyauJI"},created_at:"2024-03-10T00:15:28Z",updated_at:"2024-03-11T06:56:32Z",promoted_at:"2024-03-11T06:56:32Z",width:4299,height:3448,color:"#f3f3f3",blur_hash:"LjJuGn?bM{xu~qoKRPM{9FM{t6M_",description:null,alt_description:"there are bottles of beer on a shelf in front of a window",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710029721414-9e2125e155c3?ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710029721414-9e2125e155c3?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710029721414-9e2125e155c3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710029721414-9e2125e155c3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710029721414-9e2125e155c3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710029721414-9e2125e155c3"},links:{self:"https://api.unsplash.com/photos/there-are-bottles-of-beer-on-a-shelf-in-front-of-a-window-99clkpyauJI",html:"https://unsplash.com/photos/there-are-bottles-of-beer-on-a-shelf-in-front-of-a-window-99clkpyauJI",download:"https://unsplash.com/photos/99clkpyauJI/download?ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA",download_location:"https://api.unsplash.com/photos/99clkpyauJI/download?ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA"},likes:2,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{film:{status:"approved",approved_on:"2024-03-10T16:39:06Z"}},user:{id:"TPCcwPbQzmY",updated_at:"2024-03-11T06:59:01Z",username:"suzm4film",name:"szm 4",first_name:"szm",last_name:"4",twitter_username:null,portfolio_url:null,bio:null,location:"Japan",links:{self:"https://api.unsplash.com/users/suzm4film",html:"https://unsplash.com/@suzm4film",photos:"https://api.unsplash.com/users/suzm4film/photos",likes:"https://api.unsplash.com/users/suzm4film/likes",portfolio:"https://api.unsplash.com/users/suzm4film/portfolio",following:"https://api.unsplash.com/users/suzm4film/following",followers:"https://api.unsplash.com/users/suzm4film/followers"},profile_image:{small:"https://images.unsplash.com/profile-1632890829763-5c518f873dee?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1632890829763-5c518f873dee?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1632890829763-5c518f873dee?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:null,total_collections:0,total_likes:0,total_photos:189,total_promoted_photos:19,accepted_tos:!0,for_hire:!1,social:{instagram_username:null,portfolio_url:null,twitter_username:null,paypal_email:null}}},{id:"Lbt-cZyOUM4",slug:"an-old-fashioned-typewriter-sitting-on-a-table-in-front-of-a-window-Lbt-cZyOUM4",alternative_slugs:{en:"an-old-fashioned-typewriter-sitting-on-a-table-in-front-of-a-window-Lbt-cZyOUM4"},created_at:"2024-03-09T16:58:57Z",updated_at:"2024-03-11T06:57:06Z",promoted_at:"2024-03-11T06:55:38Z",width:5783,height:3848,color:"#0c2626",blur_hash:"LkG[.y01Ri-:?bM{RjofM{xuRkWB",description:null,alt_description:"an old fashioned typewriter sitting on a table in front of a window",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710003364549-de37d4ed3413?ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710003364549-de37d4ed3413?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710003364549-de37d4ed3413?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710003364549-de37d4ed3413?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710003364549-de37d4ed3413?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710003364549-de37d4ed3413"},links:{self:"https://api.unsplash.com/photos/an-old-fashioned-typewriter-sitting-on-a-table-in-front-of-a-window-Lbt-cZyOUM4",html:"https://unsplash.com/photos/an-old-fashioned-typewriter-sitting-on-a-table-in-front-of-a-window-Lbt-cZyOUM4",download:"https://unsplash.com/photos/Lbt-cZyOUM4/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/Lbt-cZyOUM4/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:3,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"8D4VFtkiIuw",updated_at:"2024-03-11T07:28:57Z",username:"tama66",name:"Peter Herrmann",first_name:"Peter",last_name:"Herrmann",twitter_username:null,portfolio_url:null,bio:"Everything... but not boring! Instagram@Tiefstapler66",location:"Leverkusen/Germany",links:{self:"https://api.unsplash.com/users/tama66",html:"https://unsplash.com/@tama66",photos:"https://api.unsplash.com/users/tama66/photos",likes:"https://api.unsplash.com/users/tama66/likes",portfolio:"https://api.unsplash.com/users/tama66/portfolio",following:"https://api.unsplash.com/users/tama66/following",followers:"https://api.unsplash.com/users/tama66/followers"},profile_image:{small:"https://images.unsplash.com/profile-1611475141936-383e23c6cc6dimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1611475141936-383e23c6cc6dimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1611475141936-383e23c6cc6dimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"tiefstapler66",total_collections:1,total_likes:149,total_photos:363,total_promoted_photos:152,accepted_tos:!0,for_hire:!0,social:{instagram_username:"tiefstapler66",portfolio_url:null,twitter_username:null,paypal_email:null}}},{id:"D1jr0Mevs-c",slug:"an-aerial-view-of-a-body-of-water-D1jr0Mevs-c",alternative_slugs:{en:"an-aerial-view-of-a-body-of-water-D1jr0Mevs-c"},created_at:"2024-02-07T22:34:15Z",updated_at:"2024-03-10T10:54:36Z",promoted_at:null,width:5280,height:2970,color:"#0c2626",blur_hash:"LH9[JL0i+HM{^}Ezw#R.b@n$nhbb",description:"The Islands of NEOM are home to kaleidoscopic-coloured coral reefs and an abundance of diverse marine life | Islands of NEOM \u2013 NEOM, Saudi Arabia",alt_description:"an aerial view of a body of water",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1707343843982-f8275f3994c5?ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1707343843982-f8275f3994c5?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1707343843982-f8275f3994c5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1707343843982-f8275f3994c5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1707343843982-f8275f3994c5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1707343843982-f8275f3994c5"},links:{self:"https://api.unsplash.com/photos/an-aerial-view-of-a-body-of-water-D1jr0Mevs-c",html:"https://unsplash.com/photos/an-aerial-view-of-a-body-of-water-D1jr0Mevs-c",download:"https://unsplash.com/photos/D1jr0Mevs-c/download?ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/D1jr0Mevs-c/download?ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:308,liked_by_user:!1,current_user_collections:[],sponsorship:{impression_urls:[],tagline:"Made to Change",tagline_url:"https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",sponsor:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM\u2019s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM\u2019s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},topic_submissions:{},user:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM\u2019s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM\u2019s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},{id:"0RBEUjWQBBA",slug:"a-woman-standing-under-a-cherry-blossom-tree-0RBEUjWQBBA",alternative_slugs:{en:"a-woman-standing-under-a-cherry-blossom-tree-0RBEUjWQBBA"},created_at:"2024-03-10T10:15:48Z",updated_at:"2024-03-11T06:55:22Z",promoted_at:"2024-03-11T06:55:22Z",width:4672,height:7008,color:"#262626",blur_hash:"LOG8o{t7WBWB~DofR*j@D%NGR%WB",description:null,alt_description:"a woman standing under a cherry blossom tree",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710065574765-a685385c6d9a?ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710065574765-a685385c6d9a?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710065574765-a685385c6d9a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710065574765-a685385c6d9a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710065574765-a685385c6d9a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710065574765-a685385c6d9a"},links:{self:"https://api.unsplash.com/photos/a-woman-standing-under-a-cherry-blossom-tree-0RBEUjWQBBA",html:"https://unsplash.com/photos/a-woman-standing-under-a-cherry-blossom-tree-0RBEUjWQBBA",download:"https://unsplash.com/photos/0RBEUjWQBBA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/0RBEUjWQBBA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:11,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"ePlndXHeIiM",updated_at:"2024-03-11T09:04:03Z",username:"lwdzl",name:"Jack Dong",first_name:"Jack",last_name:"Dong",twitter_username:null,portfolio_url:"https://www.xiaohongshu.com/user/profile/5f11b998000000000101d8d2?xhsshare=CopyLink&appuid=5f11b998000000000101d8d2&apptime=1696562673",bio:null,location:null,links:{self:"https://api.unsplash.com/users/lwdzl",html:"https://unsplash.com/@lwdzl",photos:"https://api.unsplash.com/users/lwdzl/photos",likes:"https://api.unsplash.com/users/lwdzl/likes",portfolio:"https://api.unsplash.com/users/lwdzl/portfolio",following:"https://api.unsplash.com/users/lwdzl/following",followers:"https://api.unsplash.com/users/lwdzl/followers"},profile_image:{small:"https://images.unsplash.com/profile-1696563144074-80a8da44bcd4?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1696563144074-80a8da44bcd4?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1696563144074-80a8da44bcd4?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:null,total_collections:0,total_likes:101,total_photos:640,total_promoted_photos:112,accepted_tos:!0,for_hire:!0,social:{instagram_username:null,portfolio_url:"https://www.xiaohongshu.com/user/profile/5f11b998000000000101d8d2?xhsshare=CopyLink&appuid=5f11b998000000000101d8d2&apptime=1696562673",twitter_username:null,paypal_email:null}}},{id:"2IGDvJa2Bd0",slug:"a-path-in-the-middle-of-a-foggy-forest-2IGDvJa2Bd0",alternative_slugs:{en:"a-path-in-the-middle-of-a-foggy-forest-2IGDvJa2Bd0"},created_at:"2024-02-21T14:32:53Z",updated_at:"2024-03-11T06:54:06Z",promoted_at:"2024-03-11T06:54:06Z",width:4672,height:5840,color:"#f3f3f3",blur_hash:"L#Gv00ofD%ay~qoeM_ay%NafWVj[",description:null,alt_description:"a path in the middle of a foggy forest",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1708525736169-534ee3e24e99?ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1708525736169-534ee3e24e99?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1708525736169-534ee3e24e99?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1708525736169-534ee3e24e99?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1708525736169-534ee3e24e99?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1708525736169-534ee3e24e99"},links:{self:"https://api.unsplash.com/photos/a-path-in-the-middle-of-a-foggy-forest-2IGDvJa2Bd0",html:"https://unsplash.com/photos/a-path-in-the-middle-of-a-foggy-forest-2IGDvJa2Bd0",download:"https://unsplash.com/photos/2IGDvJa2Bd0/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/2IGDvJa2Bd0/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:11,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"zL5HAN1fnJw",updated_at:"2024-03-11T06:58:57Z",username:"viklukphotography",name:"Viktor Mischke",first_name:"Viktor",last_name:"Mischke",twitter_username:null,portfolio_url:"https://www.istockphoto.com/de/portfolio/snoviktor",bio:null,location:"Schloss Holte-Stukenbrock",links:{self:"https://api.unsplash.com/users/viklukphotography",html:"https://unsplash.com/@viklukphotography",photos:"https://api.unsplash.com/users/viklukphotography/photos",likes:"https://api.unsplash.com/users/viklukphotography/likes",portfolio:"https://api.unsplash.com/users/viklukphotography/portfolio",following:"https://api.unsplash.com/users/viklukphotography/following",followers:"https://api.unsplash.com/users/viklukphotography/followers"},profile_image:{small:"https://images.unsplash.com/profile-1646051425690-ed09fae6858fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1646051425690-ed09fae6858fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1646051425690-ed09fae6858fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"viktormischke",total_collections:0,total_likes:141,total_photos:38,total_promoted_photos:8,accepted_tos:!0,for_hire:!1,social:{instagram_username:"viktormischke",portfolio_url:"https://www.istockphoto.com/de/portfolio/snoviktor",twitter_username:null,paypal_email:null}}},{id:"PZfeP0uwBpQ",slug:"a-person-with-a-hat-on-their-head-in-a-field-PZfeP0uwBpQ",alternative_slugs:{en:"a-person-with-a-hat-on-their-head-in-a-field-PZfeP0uwBpQ"},created_at:"2024-02-24T10:57:49Z",updated_at:"2024-03-11T06:53:56Z",promoted_at:"2024-03-11T06:53:56Z",width:2720,height:4080,color:"#404026",blur_hash:"LIB:Tx%K56NGORbYxas:0KRj-poe",description:"A woman wearing a traditional coolie hat kneels in a field of green vegetables, carefully harvesting the crops.",alt_description:"a person with a hat on their head in a field",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1708771641703-0df3d179cec3?ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1708771641703-0df3d179cec3?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1708771641703-0df3d179cec3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1708771641703-0df3d179cec3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1708771641703-0df3d179cec3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1708771641703-0df3d179cec3"},links:{self:"https://api.unsplash.com/photos/a-person-with-a-hat-on-their-head-in-a-field-PZfeP0uwBpQ",html:"https://unsplash.com/photos/a-person-with-a-hat-on-their-head-in-a-field-PZfeP0uwBpQ",download:"https://unsplash.com/photos/PZfeP0uwBpQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/PZfeP0uwBpQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:2,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{people:{status:"rejected"},experimental:{status:"rejected"}},user:{id:"mWjiXj5vQuQ",updated_at:"2024-03-11T06:58:57Z",username:"chanwei_snap",name:"Chanwei",first_name:"Chanwei",last_name:null,twitter_username:null,portfolio_url:null,bio:`\u{1F44B} Just a snap-happy amateur sharing my photos with you!\r \u{1F4CD}Instagram: @chanwei.snap\r `,location:"Taipei, Taiwan",links:{self:"https://api.unsplash.com/users/chanwei_snap",html:"https://unsplash.com/@chanwei_snap",photos:"https://api.unsplash.com/users/chanwei_snap/photos",likes:"https://api.unsplash.com/users/chanwei_snap/likes",portfolio:"https://api.unsplash.com/users/chanwei_snap/portfolio",following:"https://api.unsplash.com/users/chanwei_snap/following",followers:"https://api.unsplash.com/users/chanwei_snap/followers"},profile_image:{small:"https://images.unsplash.com/profile-1705518610211-a929b876f4d5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1705518610211-a929b876f4d5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1705518610211-a929b876f4d5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"chanwei.snap",total_collections:15,total_likes:63,total_photos:150,total_promoted_photos:2,accepted_tos:!0,for_hire:!1,social:{instagram_username:"chanwei.snap",portfolio_url:null,twitter_username:null,paypal_email:null}}},{id:"1JwHaWeSK9s",slug:"a-picture-of-some-white-flowers-on-a-white-background-1JwHaWeSK9s",alternative_slugs:{en:"a-picture-of-some-white-flowers-on-a-white-background-1JwHaWeSK9s"},created_at:"2024-03-10T11:33:51Z",updated_at:"2024-03-11T06:57:09Z",promoted_at:"2024-03-11T06:53:39Z",width:3586,height:3917,color:"#f3f3d9",blur_hash:"LIQ0T^j=_4%M%MxbM{M{_4jZITbH",description:"Title: Christmas eve Artist: Callowhill, James Publisher: L. Prang & Co. Name on Item: JC Date: [ca. 1861\u20131897] https://www.digitalcommonwealth.org/search/commonwealth:7w62f880r",alt_description:"a picture of some white flowers on a white background",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710069455079-2059d3cefe91?ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710069455079-2059d3cefe91?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710069455079-2059d3cefe91?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710069455079-2059d3cefe91?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710069455079-2059d3cefe91?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710069455079-2059d3cefe91"},links:{self:"https://api.unsplash.com/photos/a-picture-of-some-white-flowers-on-a-white-background-1JwHaWeSK9s",html:"https://unsplash.com/photos/a-picture-of-some-white-flowers-on-a-white-background-1JwHaWeSK9s",download:"https://unsplash.com/photos/1JwHaWeSK9s/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/1JwHaWeSK9s/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:7,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"piFVWeoWxU8",updated_at:"2024-03-11T07:28:12Z",username:"bostonpubliclibrary",name:"Boston Public Library",first_name:"Boston",last_name:"Public Library",twitter_username:null,portfolio_url:"https://www.bpl.org/",bio:"Considered a pioneer of public library service in the United States, the Boston Public Library is among the three largest collections in the country and is committed to be \u2018Free for All\u2019.",location:"Boston, USA",links:{self:"https://api.unsplash.com/users/bostonpubliclibrary",html:"https://unsplash.com/@bostonpubliclibrary",photos:"https://api.unsplash.com/users/bostonpubliclibrary/photos",likes:"https://api.unsplash.com/users/bostonpubliclibrary/likes",portfolio:"https://api.unsplash.com/users/bostonpubliclibrary/portfolio",following:"https://api.unsplash.com/users/bostonpubliclibrary/following",followers:"https://api.unsplash.com/users/bostonpubliclibrary/followers"},profile_image:{small:"https://images.unsplash.com/profile-1579171056760-0293bb679901image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1579171056760-0293bb679901image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1579171056760-0293bb679901image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:null,total_collections:6,total_likes:0,total_photos:510,total_promoted_photos:62,accepted_tos:!0,for_hire:!1,social:{instagram_username:null,portfolio_url:"https://www.bpl.org/",twitter_username:null,paypal_email:null}}},{id:"efzvMAIpfWY",slug:"a-couple-of-people-that-are-standing-in-the-dirt-efzvMAIpfWY",alternative_slugs:{en:"a-couple-of-people-that-are-standing-in-the-dirt-efzvMAIpfWY"},created_at:"2023-04-28T12:46:16Z",updated_at:"2024-03-11T09:48:19Z",promoted_at:null,width:9504,height:6336,color:"#c07359",blur_hash:"LELo7xNHxa~Bz:s9S4nO~VbwoLS~",description:"Amongst expansive red sands and spectacular sandstone rock formations, Hisma Desert \u2013 NEOM, Saudi Arabia | The NEOM Nature Reserve region is being designed to deliver protection and restoration of biodiversity across 95% of NEOM.",alt_description:"a couple of people that are standing in the dirt",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1682685797742-42c9987a2c34?ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1682685797742-42c9987a2c34?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1682685797742-42c9987a2c34?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1682685797742-42c9987a2c34?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1682685797742-42c9987a2c34?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1682685797742-42c9987a2c34"},links:{self:"https://api.unsplash.com/photos/a-couple-of-people-that-are-standing-in-the-dirt-efzvMAIpfWY",html:"https://unsplash.com/photos/a-couple-of-people-that-are-standing-in-the-dirt-efzvMAIpfWY",download:"https://unsplash.com/photos/efzvMAIpfWY/download?ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/efzvMAIpfWY/download?ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:211,liked_by_user:!1,current_user_collections:[],sponsorship:{impression_urls:["https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515544&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif","https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515747&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif"],tagline:"Made to Change",tagline_url:"https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",sponsor:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM\u2019s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM\u2019s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},topic_submissions:{},user:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM\u2019s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM\u2019s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},{id:"j39-6Uto9QQ",slug:"a-forest-filled-with-lots-of-tall-trees-j39-6Uto9QQ",alternative_slugs:{en:"a-forest-filled-with-lots-of-tall-trees-j39-6Uto9QQ"},created_at:"2024-03-09T22:12:40Z",updated_at:"2024-03-11T07:57:13Z",promoted_at:"2024-03-11T06:51:56Z",width:3759,height:5639,color:"#26260c",blur_hash:"L79tDG?H4;IURu%MM{RP~oohIoIo",description:null,alt_description:"a forest filled with lots of tall trees",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710020339360-ce951881b835?ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710020339360-ce951881b835?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710020339360-ce951881b835?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710020339360-ce951881b835?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710020339360-ce951881b835?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710020339360-ce951881b835"},links:{self:"https://api.unsplash.com/photos/a-forest-filled-with-lots-of-tall-trees-j39-6Uto9QQ",html:"https://unsplash.com/photos/a-forest-filled-with-lots-of-tall-trees-j39-6Uto9QQ",download:"https://unsplash.com/photos/j39-6Uto9QQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/j39-6Uto9QQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:1,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"MarIhx6ztc0",updated_at:"2024-03-11T06:51:56Z",username:"brice_cooper18",name:"Brice Cooper",first_name:"Brice",last_name:"Cooper",twitter_username:null,portfolio_url:null,bio:"Always down for an adventure, capturing those adventures one photo at a time. Never stop exploring!",location:"Florida",links:{self:"https://api.unsplash.com/users/brice_cooper18",html:"https://unsplash.com/@brice_cooper18",photos:"https://api.unsplash.com/users/brice_cooper18/photos",likes:"https://api.unsplash.com/users/brice_cooper18/likes",portfolio:"https://api.unsplash.com/users/brice_cooper18/portfolio",following:"https://api.unsplash.com/users/brice_cooper18/following",followers:"https://api.unsplash.com/users/brice_cooper18/followers"},profile_image:{small:"https://images.unsplash.com/profile-1673045276376-91bb892b6e94image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1673045276376-91bb892b6e94image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1673045276376-91bb892b6e94image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"brice_cooper18",total_collections:14,total_likes:0,total_photos:1467,total_promoted_photos:51,accepted_tos:!0,for_hire:!0,social:{instagram_username:"brice_cooper18",portfolio_url:null,twitter_username:null,paypal_email:null}}},{id:"oTE1p2Awp3I",slug:"a-couple-of-people-standing-on-top-of-a-cliff-next-to-the-ocean-oTE1p2Awp3I",alternative_slugs:{en:"a-couple-of-people-standing-on-top-of-a-cliff-next-to-the-ocean-oTE1p2Awp3I"},created_at:"2024-02-27T22:15:01Z",updated_at:"2024-03-11T06:51:52Z",promoted_at:"2024-03-11T06:51:52Z",width:4e3,height:5333,color:"#c0c0c0",blur_hash:"LLE:C[u5IooJ_N%gE1ax~ps8Vsoe",description:null,alt_description:"a couple of people standing on top of a cliff next to the ocean",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709071784840-cf3ecc434749?ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709071784840-cf3ecc434749?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709071784840-cf3ecc434749?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709071784840-cf3ecc434749?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709071784840-cf3ecc434749?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709071784840-cf3ecc434749"},links:{self:"https://api.unsplash.com/photos/a-couple-of-people-standing-on-top-of-a-cliff-next-to-the-ocean-oTE1p2Awp3I",html:"https://unsplash.com/photos/a-couple-of-people-standing-on-top-of-a-cliff-next-to-the-ocean-oTE1p2Awp3I",download:"https://unsplash.com/photos/oTE1p2Awp3I/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/oTE1p2Awp3I/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:8,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"khtnjqjzcq0",updated_at:"2024-03-11T06:51:53Z",username:"mitchorr",name:"Mitchell Orr",first_name:"Mitchell",last_name:"Orr",twitter_username:null,portfolio_url:"https://mitchorr.darkroom.tech/",bio:`If you feel you would like to support my work, any donations no matter how small, would be extremely helpful. \r Thanks for looking!`,location:"Wirral",links:{self:"https://api.unsplash.com/users/mitchorr",html:"https://unsplash.com/@mitchorr",photos:"https://api.unsplash.com/users/mitchorr/photos",likes:"https://api.unsplash.com/users/mitchorr/likes",portfolio:"https://api.unsplash.com/users/mitchorr/portfolio",following:"https://api.unsplash.com/users/mitchorr/following",followers:"https://api.unsplash.com/users/mitchorr/followers"},profile_image:{small:"https://images.unsplash.com/profile-1687891061126-8858e815018fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1687891061126-8858e815018fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1687891061126-8858e815018fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"mitchorr1",total_collections:0,total_likes:41,total_photos:358,total_promoted_photos:118,accepted_tos:!0,for_hire:!0,social:{instagram_username:"mitchorr1",portfolio_url:"https://mitchorr.darkroom.tech/",twitter_username:null,paypal_email:null}}},{id:"ihmo0uRQ3jA",slug:"a-bed-sitting-in-a-bedroom-next-to-a-window-ihmo0uRQ3jA",alternative_slugs:{en:"a-bed-sitting-in-a-bedroom-next-to-a-window-ihmo0uRQ3jA"},created_at:"2024-02-24T20:00:04Z",updated_at:"2024-03-11T06:51:48Z",promoted_at:"2024-03-11T06:51:48Z",width:4e3,height:6e3,color:"#260c0c",blur_hash:"L78;b;?I4Xx?tcIUD+xt03oy-.M|",description:null,alt_description:"a bed sitting in a bedroom next to a window",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1708804309492-5ef3f3458c33?ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1708804309492-5ef3f3458c33?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1708804309492-5ef3f3458c33?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1708804309492-5ef3f3458c33?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1708804309492-5ef3f3458c33?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1708804309492-5ef3f3458c33"},links:{self:"https://api.unsplash.com/photos/a-bed-sitting-in-a-bedroom-next-to-a-window-ihmo0uRQ3jA",html:"https://unsplash.com/photos/a-bed-sitting-in-a-bedroom-next-to-a-window-ihmo0uRQ3jA",download:"https://unsplash.com/photos/ihmo0uRQ3jA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/ihmo0uRQ3jA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:20,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"Og5qBrDjufI",updated_at:"2024-03-11T06:51:49Z",username:"mariailves",name:"Maria Ilves",first_name:"Maria",last_name:"Ilves",twitter_username:null,portfolio_url:"http://www.mariailves.com",bio:null,location:"Ambleside",links:{self:"https://api.unsplash.com/users/mariailves",html:"https://unsplash.com/@mariailves",photos:"https://api.unsplash.com/users/mariailves/photos",likes:"https://api.unsplash.com/users/mariailves/likes",portfolio:"https://api.unsplash.com/users/mariailves/portfolio",following:"https://api.unsplash.com/users/mariailves/following",followers:"https://api.unsplash.com/users/mariailves/followers"},profile_image:{small:"https://images.unsplash.com/profile-1708802611867-ab4ff1564c8cimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1708802611867-ab4ff1564c8cimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1708802611867-ab4ff1564c8cimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"mariailves_",total_collections:0,total_likes:0,total_photos:38,total_promoted_photos:4,accepted_tos:!0,for_hire:!0,social:{instagram_username:"mariailves_",portfolio_url:"http://www.mariailves.com",twitter_username:null,paypal_email:null}}},{id:"UvQtTVdFi9I",slug:"UvQtTVdFi9I",alternative_slugs:{en:"UvQtTVdFi9I"},created_at:"2016-08-12T16:12:25Z",updated_at:"2024-03-11T06:50:27Z",promoted_at:"2024-03-11T06:50:27Z",width:3648,height:5472,color:"#8ca673",blur_hash:"LGG9g4IAVax[.Zxus=kB9HtQ%LRj",description:null,alt_description:null,breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1471018289981-5d9f06e2bf45?ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1471018289981-5d9f06e2bf45?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1471018289981-5d9f06e2bf45?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1471018289981-5d9f06e2bf45?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1471018289981-5d9f06e2bf45?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1471018289981-5d9f06e2bf45"},links:{self:"https://api.unsplash.com/photos/UvQtTVdFi9I",html:"https://unsplash.com/photos/UvQtTVdFi9I",download:"https://unsplash.com/photos/UvQtTVdFi9I/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/UvQtTVdFi9I/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:60,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"dhG1THiRwtA",updated_at:"2024-03-11T06:50:28Z",username:"clarissemeyer",name:"Clarisse Meyer",first_name:"Clarisse",last_name:"Meyer",twitter_username:"claireymeyer",portfolio_url:"https://www.clarisserae.com",bio:`Photo | Video | Design - Southern California & Beyond\r Instagram: @clarisse.rae`,location:"Orange County, CA",links:{self:"https://api.unsplash.com/users/clarissemeyer",html:"https://unsplash.com/@clarissemeyer",photos:"https://api.unsplash.com/users/clarissemeyer/photos",likes:"https://api.unsplash.com/users/clarissemeyer/likes",portfolio:"https://api.unsplash.com/users/clarissemeyer/portfolio",following:"https://api.unsplash.com/users/clarissemeyer/following",followers:"https://api.unsplash.com/users/clarissemeyer/followers"},profile_image:{small:"https://images.unsplash.com/profile-1470948329031-558b487bdf37?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1470948329031-558b487bdf37?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1470948329031-558b487bdf37?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"clarisse.rae",total_collections:2,total_likes:139,total_photos:99,total_promoted_photos:58,accepted_tos:!1,for_hire:!1,social:{instagram_username:"clarisse.rae",portfolio_url:"https://www.clarisserae.com",twitter_username:"claireymeyer",paypal_email:null}}},{id:"iswshBYbTBk",slug:"a-woman-riding-an-escalator-down-an-escalator-iswshBYbTBk",alternative_slugs:{en:"a-woman-riding-an-escalator-down-an-escalator-iswshBYbTBk"},created_at:"2024-02-27T19:26:10Z",updated_at:"2024-03-11T06:48:50Z",promoted_at:"2024-03-11T06:48:50Z",width:3940,height:2634,color:"#73a673",blur_hash:"LEDn~t%{y:WXDPVtH[jt8{o|VGk9",description:null,alt_description:"a woman riding an escalator down an escalator",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709061965707-9a89ffb23103?ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709061965707-9a89ffb23103?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709061965707-9a89ffb23103?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709061965707-9a89ffb23103?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709061965707-9a89ffb23103?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709061965707-9a89ffb23103"},links:{self:"https://api.unsplash.com/photos/a-woman-riding-an-escalator-down-an-escalator-iswshBYbTBk",html:"https://unsplash.com/photos/a-woman-riding-an-escalator-down-an-escalator-iswshBYbTBk",download:"https://unsplash.com/photos/iswshBYbTBk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/iswshBYbTBk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:4,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{people:{status:"rejected"}},user:{id:"d-2o2yQwtxY",updated_at:"2024-03-11T06:48:59Z",username:"vitalymazur",name:"Vitalii Mazur",first_name:"Vitalii",last_name:"Mazur",twitter_username:"@madebyvitalii",portfolio_url:"https://www.behance.net/vitaliimazur",bio:`Life through photography \u{1F33F} \r Feel free to support me via PayPal (vitaly.mazur@icloud.com) if you like to use my shots. Also I'm available for a photoshoot in Toronto \u{1F4F8}\u{1F1E8}\u{1F1E6}`,location:"Toronto, Canada",links:{self:"https://api.unsplash.com/users/vitalymazur",html:"https://unsplash.com/@vitalymazur",photos:"https://api.unsplash.com/users/vitalymazur/photos",likes:"https://api.unsplash.com/users/vitalymazur/likes",portfolio:"https://api.unsplash.com/users/vitalymazur/portfolio",following:"https://api.unsplash.com/users/vitalymazur/following",followers:"https://api.unsplash.com/users/vitalymazur/followers"},profile_image:{small:"https://images.unsplash.com/profile-1708119387274-fad12c7d293b?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1708119387274-fad12c7d293b?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1708119387274-fad12c7d293b?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"vitalymazur ",total_collections:14,total_likes:773,total_photos:263,total_promoted_photos:15,accepted_tos:!0,for_hire:!0,social:{instagram_username:"vitalymazur ",portfolio_url:"https://www.behance.net/vitaliimazur",twitter_username:"@madebyvitalii",paypal_email:null}}},{id:"uSNuKKh7wpA",slug:"a-picture-of-a-green-object-with-a-white-background-uSNuKKh7wpA",alternative_slugs:{en:"a-picture-of-a-green-object-with-a-white-background-uSNuKKh7wpA"},created_at:"2024-03-01T10:58:28Z",updated_at:"2024-03-11T06:48:07Z",promoted_at:"2024-03-11T06:48:07Z",width:9600,height:5400,color:"#d9d9d9",blur_hash:"LJLq]_WI_3%eo$xa?cRi~qobITM|",description:"Made in blender 4.0",alt_description:"a picture of a green object with a white background",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709290649154-54c725bd4484?ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709290649154-54c725bd4484?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709290649154-54c725bd4484?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709290649154-54c725bd4484?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709290649154-54c725bd4484?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709290649154-54c725bd4484"},links:{self:"https://api.unsplash.com/photos/a-picture-of-a-green-object-with-a-white-background-uSNuKKh7wpA",html:"https://unsplash.com/photos/a-picture-of-a-green-object-with-a-white-background-uSNuKKh7wpA",download:"https://unsplash.com/photos/uSNuKKh7wpA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/uSNuKKh7wpA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:42,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{"3d-renders":{status:"approved",approved_on:"2024-03-06T08:20:20Z"},experimental:{status:"approved",approved_on:"2024-03-06T07:38:30Z"}},user:{id:"5TCQxdaW0wE",updated_at:"2024-03-11T10:04:04Z",username:"theshubhamdhage",name:"Shubham Dhage",first_name:"Shubham",last_name:"Dhage",twitter_username:"theshubhamdhage",portfolio_url:"https://theshubhamdhage.com/",bio:"Creating things is my passion.",location:"Pune, India",links:{self:"https://api.unsplash.com/users/theshubhamdhage",html:"https://unsplash.com/@theshubhamdhage",photos:"https://api.unsplash.com/users/theshubhamdhage/photos",likes:"https://api.unsplash.com/users/theshubhamdhage/likes",portfolio:"https://api.unsplash.com/users/theshubhamdhage/portfolio",following:"https://api.unsplash.com/users/theshubhamdhage/following",followers:"https://api.unsplash.com/users/theshubhamdhage/followers"},profile_image:{small:"https://images.unsplash.com/profile-1702918491890-622aa47079a5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1702918491890-622aa47079a5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1702918491890-622aa47079a5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"theshubhamdhage",total_collections:2,total_likes:296,total_photos:734,total_promoted_photos:147,accepted_tos:!0,for_hire:!0,social:{instagram_username:"theshubhamdhage",portfolio_url:"https://theshubhamdhage.com/",twitter_username:"theshubhamdhage",paypal_email:null}}},{id:"7lN8MJPnlXs",slug:"a-close-up-of-a-pine-tree-with-lots-of-needles-7lN8MJPnlXs",alternative_slugs:{en:"a-close-up-of-a-pine-tree-with-lots-of-needles-7lN8MJPnlXs"},created_at:"2024-03-06T19:31:23Z",updated_at:"2024-03-11T06:47:23Z",promoted_at:"2024-03-11T06:47:23Z",width:6720,height:4480,color:"#26260c",blur_hash:"L05OKD},~lR7TJRj%d^$_0E49Is:",description:null,alt_description:"a close up of a pine tree with lots of needles",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709753422610-39ed7ddf9e08?ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709753422610-39ed7ddf9e08?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709753422610-39ed7ddf9e08?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709753422610-39ed7ddf9e08?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709753422610-39ed7ddf9e08?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709753422610-39ed7ddf9e08"},links:{self:"https://api.unsplash.com/photos/a-close-up-of-a-pine-tree-with-lots-of-needles-7lN8MJPnlXs",html:"https://unsplash.com/photos/a-close-up-of-a-pine-tree-with-lots-of-needles-7lN8MJPnlXs",download:"https://unsplash.com/photos/7lN8MJPnlXs/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/7lN8MJPnlXs/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:5,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{"textures-patterns":{status:"approved",approved_on:"2024-03-11T06:47:18Z"}},user:{id:"gMFqynHNocY",updated_at:"2024-03-11T06:48:57Z",username:"blakecheekk",name:"Blake Cheek",first_name:"Blake",last_name:"Cheek",twitter_username:"blakecheekk",portfolio_url:"http://blakecheek.com",bio:"Photographer and Videographer. Lover of coffee and Jesus. ",location:"Atlanta, Ga",links:{self:"https://api.unsplash.com/users/blakecheekk",html:"https://unsplash.com/@blakecheekk",photos:"https://api.unsplash.com/users/blakecheekk/photos",likes:"https://api.unsplash.com/users/blakecheekk/likes",portfolio:"https://api.unsplash.com/users/blakecheekk/portfolio",following:"https://api.unsplash.com/users/blakecheekk/following",followers:"https://api.unsplash.com/users/blakecheekk/followers"},profile_image:{small:"https://images.unsplash.com/profile-1709746841716-156061dd4fe9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1709746841716-156061dd4fe9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1709746841716-156061dd4fe9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"blakecheekk",total_collections:4,total_likes:0,total_photos:423,total_promoted_photos:165,accepted_tos:!0,for_hire:!0,social:{instagram_username:"blakecheekk",portfolio_url:"http://blakecheek.com",twitter_username:"blakecheekk",paypal_email:null}}},{id:"Fw8vp9G6FtE",slug:"the-contents-of-a-backpack-laid-out-on-a-table-Fw8vp9G6FtE",alternative_slugs:{en:"the-contents-of-a-backpack-laid-out-on-a-table-Fw8vp9G6FtE"},created_at:"2024-03-10T00:43:31Z",updated_at:"2024-03-11T06:46:50Z",promoted_at:"2024-03-11T06:46:50Z",width:6240,height:4160,color:"#262626",blur_hash:"LIINNov{ae}=56I]eToaEmWC^iI;",description:null,alt_description:"the contents of a backpack laid out on a table",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710031407576-135a680d6e10?ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710031407576-135a680d6e10?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710031407576-135a680d6e10?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710031407576-135a680d6e10?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710031407576-135a680d6e10?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710031407576-135a680d6e10"},links:{self:"https://api.unsplash.com/photos/the-contents-of-a-backpack-laid-out-on-a-table-Fw8vp9G6FtE",html:"https://unsplash.com/photos/the-contents-of-a-backpack-laid-out-on-a-table-Fw8vp9G6FtE",download:"https://unsplash.com/photos/Fw8vp9G6FtE/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/Fw8vp9G6FtE/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:4,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"UmKpkFAcSDE",updated_at:"2024-03-11T06:46:50Z",username:"taylorheeryphoto",name:"Taylor Heery",first_name:"Taylor",last_name:"Heery",twitter_username:"tahegri",portfolio_url:"http://www.taylorheery.com",bio:`VENMO: @taylorheeryphoto\r Fujifilm fanatic.`,location:"Hendersonville, NC",links:{self:"https://api.unsplash.com/users/taylorheeryphoto",html:"https://unsplash.com/@taylorheeryphoto",photos:"https://api.unsplash.com/users/taylorheeryphoto/photos",likes:"https://api.unsplash.com/users/taylorheeryphoto/likes",portfolio:"https://api.unsplash.com/users/taylorheeryphoto/portfolio",following:"https://api.unsplash.com/users/taylorheeryphoto/following",followers:"https://api.unsplash.com/users/taylorheeryphoto/followers"},profile_image:{small:"https://images.unsplash.com/profile-1710031596049-549d947d2a3a?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1710031596049-549d947d2a3a?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1710031596049-549d947d2a3a?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"taylorheeryphoto",total_collections:0,total_likes:107,total_photos:520,total_promoted_photos:209,accepted_tos:!0,for_hire:!0,social:{instagram_username:"taylorheeryphoto",portfolio_url:"http://www.taylorheery.com",twitter_username:"tahegri",paypal_email:null}}},{id:"e75CfMG0Sgo",slug:"a-person-with-a-backpack-looking-at-mountains-e75CfMG0Sgo",alternative_slugs:{en:"a-person-with-a-backpack-looking-at-mountains-e75CfMG0Sgo"},created_at:"2023-04-28T12:46:16Z",updated_at:"2024-03-10T11:50:20Z",promoted_at:null,width:5429,height:3619,color:"#a6c0d9",blur_hash:"LnHLYm%0IAi_?wn$ngj[OtRjs:f6",description:"Nature Reserve \u2013 NEOM, Saudi Arabia | The NEOM Nature Reserve region is being designed to deliver protection and restoration of biodiversity across 95% of NEOM.",alt_description:"a person with a backpack looking at mountains",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1682685796002-e05458d61f07?ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1682685796002-e05458d61f07?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1682685796002-e05458d61f07?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1682685796002-e05458d61f07?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1682685796002-e05458d61f07?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1682685796002-e05458d61f07"},links:{self:"https://api.unsplash.com/photos/a-person-with-a-backpack-looking-at-mountains-e75CfMG0Sgo",html:"https://unsplash.com/photos/a-person-with-a-backpack-looking-at-mountains-e75CfMG0Sgo",download:"https://unsplash.com/photos/e75CfMG0Sgo/download?ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/e75CfMG0Sgo/download?ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:174,liked_by_user:!1,current_user_collections:[],sponsorship:{impression_urls:["https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515577&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif","https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515780&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif"],tagline:"Made to Change",tagline_url:"https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",sponsor:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM\u2019s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM\u2019s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},topic_submissions:{},user:{id:"mYizSrdJkkU",updated_at:"2024-03-11T08:54:08Z",username:"neom",name:"NEOM",first_name:"NEOM",last_name:null,twitter_username:"neom",portfolio_url:"http://www.neom.com",bio:"Located in the northwest of Saudi Arabia, NEOM\u2019s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM\u2019s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",location:"NEOM, Saudi Arabia",links:{self:"https://api.unsplash.com/users/neom",html:"https://unsplash.com/@neom",photos:"https://api.unsplash.com/users/neom/photos",likes:"https://api.unsplash.com/users/neom/likes",portfolio:"https://api.unsplash.com/users/neom/portfolio",following:"https://api.unsplash.com/users/neom/following",followers:"https://api.unsplash.com/users/neom/followers"},profile_image:{small:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"discoverneom",total_collections:7,total_likes:1,total_photos:222,total_promoted_photos:72,accepted_tos:!0,for_hire:!1,social:{instagram_username:"discoverneom",portfolio_url:"http://www.neom.com",twitter_username:"neom",paypal_email:null}}},{id:"jSjHcyHFOdQ",slug:"a-picture-of-a-green-plant-in-a-dark-room-jSjHcyHFOdQ",alternative_slugs:{en:"a-picture-of-a-green-plant-in-a-dark-room-jSjHcyHFOdQ"},created_at:"2024-02-08T15:36:25Z",updated_at:"2024-03-11T06:46:46Z",promoted_at:"2024-03-11T06:46:46Z",width:8400,height:5600,color:"#0c260c",blur_hash:"L44CLsVuD7pF.Po2R7R*-.oyX5My",description:null,alt_description:"a picture of a green plant in a dark room",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1707406543260-ed14bbd0d086?ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1707406543260-ed14bbd0d086?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1707406543260-ed14bbd0d086?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1707406543260-ed14bbd0d086?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1707406543260-ed14bbd0d086?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1707406543260-ed14bbd0d086"},links:{self:"https://api.unsplash.com/photos/a-picture-of-a-green-plant-in-a-dark-room-jSjHcyHFOdQ",html:"https://unsplash.com/photos/a-picture-of-a-green-plant-in-a-dark-room-jSjHcyHFOdQ",download:"https://unsplash.com/photos/jSjHcyHFOdQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/jSjHcyHFOdQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:14,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"ogQykx6hk_c",updated_at:"2024-03-11T06:46:46Z",username:"pawel_czerwinski",name:"Pawel Czerwinski",first_name:"Pawel",last_name:"Czerwinski",twitter_username:"pm_cze",portfolio_url:"http://paypal.me/pmcze",bio:"Questions about how you can use the photos? help.unsplash.com/en/collections/1463188-unsplash-license \u{1F44D}",location:"Poland",links:{self:"https://api.unsplash.com/users/pawel_czerwinski",html:"https://unsplash.com/@pawel_czerwinski",photos:"https://api.unsplash.com/users/pawel_czerwinski/photos",likes:"https://api.unsplash.com/users/pawel_czerwinski/likes",portfolio:"https://api.unsplash.com/users/pawel_czerwinski/portfolio",following:"https://api.unsplash.com/users/pawel_czerwinski/following",followers:"https://api.unsplash.com/users/pawel_czerwinski/followers"},profile_image:{small:"https://images.unsplash.com/profile-1592328433409-d9ce8a5333eaimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1592328433409-d9ce8a5333eaimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1592328433409-d9ce8a5333eaimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"pmcze",total_collections:7,total_likes:39154,total_photos:2137,total_promoted_photos:1760,accepted_tos:!0,for_hire:!1,social:{instagram_username:"pmcze",portfolio_url:"http://paypal.me/pmcze",twitter_username:"pm_cze",paypal_email:null}}},{id:"OfGHUYX0CCg",slug:"a-body-of-water-that-has-some-waves-on-it-OfGHUYX0CCg",alternative_slugs:{en:"a-body-of-water-that-has-some-waves-on-it-OfGHUYX0CCg"},created_at:"2024-03-06T14:06:51Z",updated_at:"2024-03-11T08:56:52Z",promoted_at:"2024-03-11T06:45:54Z",width:8192,height:5460,color:"#260c0c",blur_hash:"LUF{kg=cj@fQ}XxFS3azxFfjS2WW",description:null,alt_description:"a body of water that has some waves on it",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709733167477-25398ca709c0?ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709733167477-25398ca709c0?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709733167477-25398ca709c0?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709733167477-25398ca709c0?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709733167477-25398ca709c0?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709733167477-25398ca709c0"},links:{self:"https://api.unsplash.com/photos/a-body-of-water-that-has-some-waves-on-it-OfGHUYX0CCg",html:"https://unsplash.com/photos/a-body-of-water-that-has-some-waves-on-it-OfGHUYX0CCg",download:"https://unsplash.com/photos/OfGHUYX0CCg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/OfGHUYX0CCg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:16,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{"earth-hour":{status:"approved",approved_on:"2024-03-07T09:43:45Z"}},user:{id:"uFFemR6e1vs",updated_at:"2024-03-11T06:48:56Z",username:"marcospradobr",name:"Marcos Paulo Prado",first_name:"Marcos Paulo",last_name:"Prado",twitter_username:null,portfolio_url:"https://www.instagram.com/eusoumarcosprado",bio:"People and commercial photographer based in Rio de Janeiro, Brasil",location:"Rio de Janeiro, Brazil",links:{self:"https://api.unsplash.com/users/marcospradobr",html:"https://unsplash.com/@marcospradobr",photos:"https://api.unsplash.com/users/marcospradobr/photos",likes:"https://api.unsplash.com/users/marcospradobr/likes",portfolio:"https://api.unsplash.com/users/marcospradobr/portfolio",following:"https://api.unsplash.com/users/marcospradobr/following",followers:"https://api.unsplash.com/users/marcospradobr/followers"},profile_image:{small:"https://images.unsplash.com/profile-1572910425876-25d44d080554image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1572910425876-25d44d080554image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1572910425876-25d44d080554image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"eusoumarcosprado",total_collections:0,total_likes:306,total_photos:413,total_promoted_photos:139,accepted_tos:!0,for_hire:!0,social:{instagram_username:"eusoumarcosprado",portfolio_url:"https://www.instagram.com/eusoumarcosprado",twitter_username:null,paypal_email:null}}},{id:"VKQpbzeWbrk",slug:"a-bouquet-of-orange-and-white-tulips-on-a-red-door-VKQpbzeWbrk",alternative_slugs:{en:"a-bouquet-of-orange-and-white-tulips-on-a-red-door-VKQpbzeWbrk"},created_at:"2024-03-09T21:24:04Z",updated_at:"2024-03-11T06:45:51Z",promoted_at:"2024-03-11T06:45:51Z",width:2592,height:3872,color:"#8c2626",blur_hash:"LFI2{Exr0gE}Dlo|=_W-5RE3O=xH",description:null,alt_description:"a bouquet of orange and white tulips on a red door",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1710018337941-58197591d55a?ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1710018337941-58197591d55a?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1710018337941-58197591d55a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1710018337941-58197591d55a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1710018337941-58197591d55a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710018337941-58197591d55a"},links:{self:"https://api.unsplash.com/photos/a-bouquet-of-orange-and-white-tulips-on-a-red-door-VKQpbzeWbrk",html:"https://unsplash.com/photos/a-bouquet-of-orange-and-white-tulips-on-a-red-door-VKQpbzeWbrk",download:"https://unsplash.com/photos/VKQpbzeWbrk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/VKQpbzeWbrk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:3,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"H8-Yyg-eX4A",updated_at:"2024-03-11T06:48:56Z",username:"jaelphotos",name:"Jael Coon",first_name:"Jael",last_name:"Coon",twitter_username:null,portfolio_url:"https://linktr.ee/jaelcoon",bio:"Coffee drinker, photographer, artist and chef/baker",location:"USA",links:{self:"https://api.unsplash.com/users/jaelphotos",html:"https://unsplash.com/@jaelphotos",photos:"https://api.unsplash.com/users/jaelphotos/photos",likes:"https://api.unsplash.com/users/jaelphotos/likes",portfolio:"https://api.unsplash.com/users/jaelphotos/portfolio",following:"https://api.unsplash.com/users/jaelphotos/following",followers:"https://api.unsplash.com/users/jaelphotos/followers"},profile_image:{small:"https://images.unsplash.com/profile-1693432710439-47b22b3f6a9eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1693432710439-47b22b3f6a9eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1693432710439-47b22b3f6a9eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"jaelcoon",total_collections:51,total_likes:0,total_photos:230,total_promoted_photos:3,accepted_tos:!0,for_hire:!1,social:{instagram_username:"jaelcoon",portfolio_url:"https://linktr.ee/jaelcoon",twitter_username:null,paypal_email:null}}},{id:"W6AqsLH6HOg",slug:"a-license-plate-on-the-back-of-a-car-W6AqsLH6HOg",alternative_slugs:{en:"a-license-plate-on-the-back-of-a-car-W6AqsLH6HOg"},created_at:"2024-03-06T06:59:15Z",updated_at:"2024-03-11T06:45:45Z",promoted_at:"2024-03-11T06:45:45Z",width:6e3,height:4e3,color:"#595959",blur_hash:"LYE_]gO?}qOsW--Ux]$%RPoeX9oz",description:null,alt_description:"a license plate on the back of a car",breadcrumbs:[],urls:{raw:"https://images.unsplash.com/photo-1709708210553-490ba885fcf6?ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",full:"https://images.unsplash.com/photo-1709708210553-490ba885fcf6?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",regular:"https://images.unsplash.com/photo-1709708210553-490ba885fcf6?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",small:"https://images.unsplash.com/photo-1709708210553-490ba885fcf6?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",thumb:"https://images.unsplash.com/photo-1709708210553-490ba885fcf6?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",small_s3:"https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709708210553-490ba885fcf6"},links:{self:"https://api.unsplash.com/photos/a-license-plate-on-the-back-of-a-car-W6AqsLH6HOg",html:"https://unsplash.com/photos/a-license-plate-on-the-back-of-a-car-W6AqsLH6HOg",download:"https://unsplash.com/photos/W6AqsLH6HOg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw",download_location:"https://api.unsplash.com/photos/W6AqsLH6HOg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw"},likes:3,liked_by_user:!1,current_user_collections:[],sponsorship:null,topic_submissions:{},user:{id:"VNV70zPYNto",updated_at:"2024-03-11T06:48:56Z",username:"venajeborec",name:"V\xE1clav Pechar",first_name:"V\xE1clav",last_name:"Pechar",twitter_username:null,portfolio_url:null,bio:`Photographer from South Bohemia \u270C\u{1F3FB}\r Be free to contact me to book a shoot \u{1F64F}\u{1F3FB}`,location:"Czech Republic - P\xEDsek",links:{self:"https://api.unsplash.com/users/venajeborec",html:"https://unsplash.com/@venajeborec",photos:"https://api.unsplash.com/users/venajeborec/photos",likes:"https://api.unsplash.com/users/venajeborec/likes",portfolio:"https://api.unsplash.com/users/venajeborec/portfolio",following:"https://api.unsplash.com/users/venajeborec/following",followers:"https://api.unsplash.com/users/venajeborec/followers"},profile_image:{small:"https://images.unsplash.com/profile-1687031143105-2420498da92eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",medium:"https://images.unsplash.com/profile-1687031143105-2420498da92eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",large:"https://images.unsplash.com/profile-1687031143105-2420498da92eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"},instagram_username:"amazingvena",total_collections:0,total_likes:7,total_photos:324,total_promoted_photos:30,accepted_tos:!0,for_hire:!0,social:{instagram_username:"amazingvena",portfolio_url:null,twitter_username:null,paypal_email:null}}}],vHe=mHe,oP=class{constructor(){Yn(this,"photos",vHe),Yn(this,"PAGINATION",{}),Yn(this,"REQUEST_IS_RUNNING",!1),Yn(this,"SEARCH_IS_RUNNING",!1),Yn(this,"LAST_REQUEST_URL",""),Yn(this,"ERROR",null),Yn(this,"IS_LOADING",!1),Yn(this,"currentPage",1)}async fetchPhotos(){this.IS_LOADING=!0;let e=(this.currentPage-1)*30,n=this.currentPage*30;return this.currentPage+=1,this.IS_LOADING=!1,this.photos.slice(e,n)}async fetchNextPage(){if(this.REQUEST_IS_RUNNING||this.SEARCH_IS_RUNNING)return null;let e=await this.fetchPhotos();return e.length>0?e:null}async searchPhotos(e){this.SEARCH_IS_RUNNING=!0;let n=this.photos.filter(i=>i.description&&i.description.toLowerCase().includes(e.toLowerCase())||i.alt_description&&i.alt_description.toLowerCase().includes(e.toLowerCase()));return this.SEARCH_IS_RUNNING=!1,n}searchIsRunning(){return this.SEARCH_IS_RUNNING}triggerDownload(e){}},aP=class{constructor(e){Yn(this,"_provider"),this._provider=e}async fetchPhotos(){return await this._provider.fetchPhotos()}async searchPhotos(e){return await this._provider.searchPhotos(e)}async triggerDownload(e){this._provider.triggerDownload(e)}async fetchNextPage(){return await this._provider.fetchNextPage()||null}searchIsRunning(){return this._provider.searchIsRunning()}},sP=class{constructor(e){Yn(this,"API_URL","https://api.unsplash.com"),Yn(this,"HEADERS"),Yn(this,"ERROR",null),Yn(this,"PAGINATION",{}),Yn(this,"REQUEST_IS_RUNNING",!1),Yn(this,"SEARCH_IS_RUNNING",!1),Yn(this,"LAST_REQUEST_URL",""),Yn(this,"IS_LOADING",!1),this.HEADERS=e}async makeRequest(e){if(this.REQUEST_IS_RUNNING)return null;this.LAST_REQUEST_URL=e;let n={method:"GET",headers:this.HEADERS};try{this.REQUEST_IS_RUNNING=!0,this.IS_LOADING=!0;let i=await fetch(e,n),r=await this.checkStatus(i);this.extractPagination(r);let o=await r.json();return"results"in o?o.results:o}catch(i){return this.ERROR=i,null}finally{this.REQUEST_IS_RUNNING=!1,this.IS_LOADING=!1}}extractPagination(e){let n=new RegExp('<(.*)>; rel="(.*)"'),i=[],r={};for(let o of e.headers.entries())o[0]==="link"&&i.push(o[1]);return i&&i.toString().split(",").forEach(o=>{if(o){let a=n.exec(o);a&&(r[a[2]]=a[1])}}),this.PAGINATION=r,e}async fetchPhotos(){let e=`${this.API_URL}/photos?per_page=30`;return await this.makeRequest(e)}async fetchNextPage(){if(this.REQUEST_IS_RUNNING||this.SEARCH_IS_RUNNING)return null;if(this.PAGINATION.next){let e=`${this.PAGINATION.next}`,n=await this.makeRequest(e);if(n)return n}return null}async searchPhotos(e){let n=`${this.API_URL}/search/photos?query=${e}&per_page=30`;return await this.makeRequest(n)||[]}async triggerDownload(e){e.links.download_location&&await this.makeRequest(e.links.download_location)}async checkStatus(e){if(e.status>=200&&e.status<300)return e;let n="",i,r=e.headers.get("content-type");if(r==="application/json")i=e.json().then(o=>o.errors[0]);else if(r==="text/xml")i=e.text();else throw new Error("Unsupported content type");return i.then(o=>{throw e.status===403&&e.headers.get("x-ratelimit-remaining")==="0"&&(n="Unsplash API rate limit reached, please try again later."),n=n||o||`Error ${e.status}: Uh-oh! Trouble reaching the Unsplash API`,this.ERROR=n,new Error(n)})}searchIsRunning(){return this.SEARCH_IS_RUNNING}},lP=class{constructor(e,n){Yn(this,"photoUseCases"),Yn(this,"masonryService"),Yn(this,"photos",[]),this.photoUseCases=e,this.masonryService=n}async loadNew(){let e=await this.photoUseCases.fetchPhotos();this.photos=e,await this.layoutPhotos()}async layoutPhotos(){this.masonryService.reset(),this.photos&&this.photos.forEach(e=>{e.ratio=e.height/e.width,this.masonryService.addPhotoToColumns(e)})}getColumns(){return this.masonryService.getColumns()}async updateSearch(e){let n=await this.photoUseCases.searchPhotos(e);this.photos=n,this.layoutPhotos()}async loadNextPage(){let e=await this.photoUseCases.fetchNextPage()||[];this.photos=[...this.photos,...e],this.layoutPhotos()}clearPhotos(){this.photos=[]}triggerDownload(e){this.photoUseCases.triggerDownload(e)}searchIsRunning(){return this.photoUseCases.searchIsRunning()}},yHe=({onClose:t,onImageInsert:e,unsplashProviderConfig:n})=>{let i=(0,N.useMemo)(()=>n?new sP(n):new oP,[n]),r=(0,N.useMemo)(()=>new aP(i),[i]),o=(0,N.useMemo)(()=>new rP(3),[]),a=(0,N.useMemo)(()=>new lP(r,o),[r,o]),s=(0,N.useRef)(null),[l,c]=(0,N.useState)(0),[d,f]=(0,N.useState)(0),[h,g]=(0,N.useState)(a.searchIsRunning()||!0),m=(0,N.useRef)(!1),[b,x]=(0,N.useState)(""),[_,O]=(0,N.useState)(null),[S,E]=(0,N.useState)([]);N.default.useEffect(()=>{s.current&&_===null&&d!==0&&(s.current.scrollTop=d,f(0))},[_,l,d]),N.default.useEffect(()=>{let j=H=>{H.key==="Escape"&&t()};return window.addEventListener("keydown",j),()=>{window.removeEventListener("keydown",j)}},[t]),N.default.useEffect(()=>{let j=s.current;if(!_)return j&&j.addEventListener("scroll",()=>{c(j.scrollTop)}),()=>{j&&j.removeEventListener("scroll",()=>{c(j.scrollTop)})}},[s,_]);let T=N.default.useCallback(async()=>{if(m.current===!1||b.length===0){E([]),a.clearPhotos(),await a.loadNew();let j=a.getColumns();E(j||[]),s.current&&s.current.scrollTop!==0&&(s.current.scrollTop=0),g(!1)}},[a,b]),M=async j=>{let H=j.target.value;H.length>2&&(O(null),x(H)),H.length===0&&(x(""),m.current=!1,await T())},I=N.default.useCallback(async()=>{if(b){g(!0),E([]),a.clearPhotos(),await a.updateSearch(b);let j=a.getColumns();j&&E(j),s.current&&s.current.scrollTop!==0&&(s.current.scrollTop=0),g(!1)}},[b,a]);N.default.useEffect(()=>{let j=setTimeout(async()=>{b.length>2?await I():await T()},300);return()=>{m.current=!0,clearTimeout(j)}},[b,I,T]);let F=N.default.useCallback(async()=>{g(!0),await a.loadNextPage();let j=a.getColumns();E(j||[]),g(!1)},[a]);N.default.useEffect(()=>{let j=s.current;if(j){let H=async()=>{_===null&&j.scrollTop+j.clientHeight>=j.scrollHeight-1e3&&await F()};return j.addEventListener("scroll",H),()=>{j.removeEventListener("scroll",H)}}},[s,F,_]);let W=j=>{j&&(O(j),f(l)),j===null&&(O(null),s.current&&(s.current.scrollTop=d))};async function Z(j){j.src&&(a.triggerDownload(j),e(j))}return gt.jsx(gHe,{closeModal:t,handleSearch:M,children:gt.jsx(uHe,{dataset:S,error:null,galleryRef:s,insertImage:Z,isLoading:h,selectImg:W,zoomed:_})})},Rae=({unsplashConf:t,onImageInsert:e,onClose:n})=>w.jsx(ep,{children:w.jsx(yHe,{unsplashProviderConfig:t,onClose:n,onImageInsert:e})}),bHe=({nodeKey:t,isModalOpen:e=!0})=>{let{cardConfig:n}=N.default.useContext(ut),[i]=Oe.useLexicalComposerContext(),[r,o]=N.default.useState(e),a=()=>{t&&i.update(()=>{A.$getNodeByKey(t).remove()})},s=async l=>{i.update(()=>{let c=A.$getNodeByKey(t);c.src=l.src,c.height=l.height,c.width=l.width,c.caption=l.caption,c.alt=l.alt;let d=xoe({editor:c.__captionEditor,initialHtml:`${l.caption}`});c.__captionEditor.setEditorState(d);let f=A.$createNodeSelection();f.add(c.getKey()),A.$setSelection(f)}),o(!1)};return r?w.jsx(Rae,{unsplashConf:n.unsplash,onClose:a,onImageInsert:s}):null},Fae=A.createCommand("OPEN_TENOR_SELECTOR_COMMAND"),zae=A.createCommand("INSERT_FROM_TENOR_COMMAND"),Qae=A.createCommand("OPEN_UNSPLASH_SELECTOR_COMMAND"),wHe=()=>{let[t]=Oe.useLexicalComposerContext();return N.default.useEffect(()=>{if(!t.hasNodes([zl])){console.error("ImagePlugin: ImageNode not registered");return}return ct.mergeRegister(t.registerCommand(Fae,async e=>{let n=fm({...e,selector:eHe,isImageHidden:!0});return t.dispatchCommand(Dn,{cardNode:n}),!0},A.COMMAND_PRIORITY_LOW),t.registerCommand(zae,async e=>{let n=fm(e),i=A.$getSelection().getNodes()[0];return t.dispatchCommand(Dn,{cardNode:n}),i.remove(),!0},A.COMMAND_PRIORITY_LOW),t.registerCommand(Qae,async e=>{let n=fm({...e,selector:bHe});return t.dispatchCommand(Dn,{cardNode:n}),!0},A.COMMAND_PRIORITY_LOW))},[t]),null},cP=A.createCommand(),zl=class extends Nw{constructor(e={},n){super(e,n),we(this,"__triggerFileDialog",!1),we(this,"__previewSrc",null),we(this,"__captionEditor"),we(this,"__captionEditorInitialState");let{previewSrc:i,triggerFileDialog:r,initialFile:o,selector:a,isImageHidden:s}=e;this.__previewSrc=i||"",this.__triggerFileDialog=!e.src&&r||!1,this.__initialFile=o||null,this.__selector=a,this.__isImageHidden=s,Ni(this,"__captionEditor",{editor:e.captionEditor,nodes:Mr}),!e.captionEditor&&e.caption&&Pi(this,"__captionEditor",`${e.caption}`)}getIcon(){return dG}getDataset(){let e=super.getDataset();e.__previewSrc=this.__previewSrc,e.__triggerFileDialog=this.__triggerFileDialog;let n=this.getLatest();return e.captionEditor=n.__captionEditor,e.captionEditorInitialState=n.__captionEditorInitialState,e}get previewSrc(){return this.getLatest().__previewSrc}set previewSrc(e){let n=this.getWritable();n.__previewSrc=e}set triggerFileDialog(e){let n=this.getWritable();n.__triggerFileDialog=e}createDOM(){return document.createElement("div")}exportJSON(){let e=super.exportJSON();return this.__captionEditor&&this.__captionEditor.getEditorState().read(()=>{let n=di.$generateHtmlFromNodes(this.__captionEditor,null),i=ki(n,{firstChildInnerContent:!0});e.caption=i}),e}decorate(){let e=this.__selector;return w.jsxs(Jn,{nodeKey:this.getKey(),width:this.__cardWidth,children:[this.__selector&&w.jsx(e,{nodeKey:this.getKey()}),!this.__isImageHidden&&w.jsx(WBe,{altText:this.__alt,captionEditor:this.__captionEditor,captionEditorInitialState:this.__captionEditorInitialState,href:this.href,initialFile:this.__initialFile,nodeKey:this.getKey(),previewSrc:this.previewSrc,src:this.src,triggerFileDialog:this.__triggerFileDialog})]})}};we(zl,"kgMenu",[{label:"Image",desc:"Upload, or embed with /image [url]",Icon:dG,insertCommand:cP,insertParams:{triggerFileDialog:!0},matches:["image","img"],queryParams:["src"],priority:1,shortcut:"/image"},{section:"Embeds",label:"Unsplash",desc:"/unsplash [search term or url]",Icon:h0e,insertCommand:Qae,insertParams:{triggerFileDialog:!1},isHidden:({config:t})=>!(t!=null&&t.unsplash),matches:["unsplash","uns"],queryParams:["src"],priority:3,shortcut:"/unsplash"},{label:"GIF",desc:"Search and embed gifs",Icon:t0e,insertCommand:Fae,insertParams:{triggerFileDialog:!1},matches:["gif","giphy","tenor"],priority:17,queryParams:["src"],isHidden:({config:t})=>!(t!=null&&t.tenor),shortcut:"/gif"}]),we(zl,"uploadType","image");var fm=t=>new zl(t);function kHe(t){return t instanceof zl}function xHe(t,e,n,i){var r=-1,o=t==null?0:t.length;for(i&&o&&(n=t[++r]);++r"u"?!1:(n.match(/top/)&&(e-=1),n.match(/bottom/)&&(e+=1),e!==t)}function Lg(t,e){return jD(t,e,n=>n.parentNode)}function RZe(t,e){return t=t.nextElementSibling,jD(t,e,n=>n.nextElementSibling)}function FZe(t,e){return t=t.previousElementSibling,jD(t,e,n=>n.previousElementSibling)}function zZe(t){if(!t)return hP();let e=getComputedStyle(t).getPropertyValue("position"),n=e==="absolute",i=Lg(t,r=>n&&QZe(r)?!1:WZe(r));return e==="fixed"&&!i?hP():i}function hP(){var t;return((t=document.scrollingElement)==null?void 0:t.body)||document.scrollingElement||document.element}function _V(t,e){t.style.webkitUserSelect=e,t.style.mozUserSelect=e,t.style.msUserSelect=e,t.style.oUserSelect=e,t.style.userSelect=e}function jD(t,e,n){if(!t)return null;let i=e,r=e,o=typeof e=="string",a=typeof e=="function";function s(c){if(c){if(o)return c.matches(i);if(a)return r(c)}else return c}let l=t;do{if(s(l))return l;l=n(l)}while(l&&l!==document.body&&l!==document)}function QZe(t){return getComputedStyle(t).getPropertyValue("position")==="static"}function WZe(t){let e=/(auto|scroll)/,n=getComputedStyle(t,null),i=n.getPropertyValue("overflow")+n.getPropertyValue("overflow-y")+n.getPropertyValue("overflow-x");return e.test(i)}var tse={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,n="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(n=!1));function r(l,c,d){this.fn=l,this.context=c,this.once=d||!1}function o(l,c,d,f,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var g=new r(d,f||l,h),m=n?n+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],g]:l._events[m].push(g):(l._events[m]=g,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new i:delete l._events[c]}function s(){this._events=new i,this._eventsCount=0}s.prototype.eventNames=function(){var l=[],c,d;if(this._eventsCount===0)return l;for(d in c=this._events)e.call(c,d)&&l.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},s.prototype.listeners=function(l){var c=n?n+l:l,d=this._events[c];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,h=d.length,g=new Array(h);fi.height?(o=200,a=200/r):(o=200*r,a=200),n=document.createElement("img"),n.width=o,n.height=a,n.id="koenig-drag-drop-ghost",n.src=i.src,n.style.position="absolute",n.style.top="0",n.style.left=`-${o}px`,n.style.zIndex=jZe,n.style.willChange="transform"}else{console.warn("No element found in draggable");return}}if(n)return n;console.warn(`No default createGhostElement handler for type "${e.type}"`)}enableDrag(){this.isDragEnabled=!0,this.element.dataset[G_]="true",this.refresh()}disableDrag(){this.isDragEnabled=!1,delete this.element.dataset[G_],this.refresh()}refresh(){this.draggables.forEach(e=>{delete e.dataset[dP]}),this.droppables.forEach(e=>{delete e.dataset[uP]}),this.draggables=[],this.droppables=[],this.isDragEnabled&&(this.element.querySelectorAll(this.draggableSelector).forEach(e=>{e.dataset[dP]="true",this.draggables.push(e)}),this.element.querySelectorAll(this.droppableSelector).forEach(e=>{e.dataset[uP]="true",this.droppables.push(e)}))}},ZZe={speed:8,sensitivity:50},gP=class{constructor(){this.options=Object.assign({},ZZe),this.currentMousePosition=null,this.findScrollableElementFrame=null,this.scrollableElement=null,this.scrollAnimationFrame=null,this._scroll=this._scroll.bind(this),this._isSafari=navigator.userAgent.indexOf("Safari")!==-1&&navigator.userAgent.indexOf("Chrome")===-1}dragStart(e){this.findScrollableElementFrame=requestAnimationFrame(()=>{this.scrollableElement=this.getScrollableElement(e.element)})}dragMove(e){this.findScrollableElementFrame=requestAnimationFrame(()=>{this.scrollableElement=this.getScrollableElement(e.target)}),this.scrollableElement&&(this.currentMousePosition={clientX:e.mousePosition.x,clientY:e.mousePosition.y},this.scrollAnimationFrame=requestAnimationFrame(this._scroll))}dragStop(){cancelAnimationFrame(this.scrollAnimationFrame),cancelAnimationFrame(this.findScrollableElementFrame),this.currentMousePosition=null,this.findScrollableElementFrame=null,this.scrollableElement=null,this.scrollAnimationFrame=null}getScrollableElement(e){let n=zZe(e);return n===hP()&&(n=document.querySelector(".gh-koenig-editor")),n}_scroll(){if(!this.scrollableElement||!this.currentMousePosition)return;cancelAnimationFrame(this.scrollAnimationFrame);let{speed:e,sensitivity:n}=this.options,i=this.scrollableElement.getBoundingClientRect(),r=this.scrollableElement,o=this.currentMousePosition.clientX,a=this.currentMousePosition.clientY,{offsetHeight:s,offsetWidth:l}=r,c=i.top+s-a,d=a-i.top;c